diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..739b5e1 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,6 @@ +# Used by "mix format" +[ + import_deps: [:phoenix], + plugins: [Phoenix.LiveView.HTMLFormatter], + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{heex,ex,exs}", "*.{heex,ex,exs}"] +] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..48380e8 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,39 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Tests + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + name: Build and test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Elixir + uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0 + with: + elixir-version: '1.15.2' # [Required] Define the Elixir version + otp-version: '26.0' # [Required] Define the Erlang/OTP version + - name: Restore dependencies cache + uses: actions/cache@v3 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + - name: Install dependencies + run: mix deps.get + - name: Run tests + run: mix test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..06249f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez + +# Ignore package tarball (built via "mix hex.build"). +phoenix_analytics-*.tar + +# Temporary files, for example, from tests. +/tmp/ + +/priv/static/cache_manifest.json + +# Ignore digested assets cache. +/priv/static/cache_manifest.json + +npm-debug.log +/assets/node_modules/ + +/assets/meta.json + +analytics.duckdb +analytics.duckdb.wal + +test_analytics.duckdb +test_analytics.duckdb.wal + +*.duckdb +*.duckdb.wal + +.DS_Store +**/*.DS_Store + +test/vegeta/* +!test/vegeta/vegeta.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..373497e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 @lalabuy948 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..17fd184 --- /dev/null +++ b/README.md @@ -0,0 +1,149 @@ +# 📊 Phoenix Analytics + +

+ GitHub CI + Latest release + View documentation +

+ +![](/github/hero.png) + +Phoenix Analytics is embedded plug and play tool designed for Phoenix applications. It provides a simple and efficient way to track and analyze user behavior and application performance without impacting your main application's performance and database. + +Key features: +- ⚡️ Lightweight and fast analytics tracking +- ⛓️‍💥 Separate storage using DuckDB to avoid affecting your main database +- 🔌 Easy integration with Phoenix applications +- 📊 Minimalistic dashboard for data visualization + +> The decision to use [DuckDB](https://duckdb.org) as the storage was made to ensure that the analytics data collection process does not interfere with or degrade the performance of your application's primary transactional database. This separation allows for efficient data storage and querying specifically optimized for analytics purposes, while keeping your main database focused on serving your application's core functionality. + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed +by adding `phoenix_analytics` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [ + {:phoenix_analytics, "~> 0.1.0"} + ] +end +``` + +Update `config/config.exs` + +```exs +config :phoenix_analytics, + database_path: System.get_env("DUCK_PATH") || "analytics.duckdb", + app_domain: System.get_env("PHX_HOST") || "example.com" +``` + +Add migration file + +> In case you have ecto less / no migrations project you can do the following: + +> `iex -S mix` `PhoenixAnalytics.Migration.up()` + +```sh +mix ecto.gen.migration add_phoenix_analytics +``` + +```elixir +defmodule MyApp.Repo.Migrations.AddPhoenixAnalytics do + def up, do: PhoenixAnalytics.Migration.up() + def down, do: PhoenixAnalytics.Migration.down() +end +``` + +```sh +mix ecto.migrate +``` + +Add plug to enable tracking to `endpoint.ex`, ‼️ add it straight after your `Plug.Static` + +```elixir +plug PhoenixAnalytics.Plugs.RequestTracker +``` + +Add dashboard route to your `router.ex` + +```elixir +use PhoenixAnalytics.Web, :router + +phoenix_analytics_dashboard "/analytics" +``` + +> ‼️ Please test thoroughly before proceeding to production! + +## Documentation + +Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) +and published on [HexDocs](https://hexdocs.pm). Once published, the docs can +be found at . + +Shortcuts: + +- `t` -> today +- `ctrl+t` -> yesterday +- `w` -> last_week +- `m` -> last_30_days +- `q` -> last_90_days +- `y` -> last_12_month +- `ctrl+w` -> previous_week +- `ctrl+m` -> previous_month +- `ctrl+q` -> previous_quarter +- `ctrl+y` -> previous_year +- `a` -> all_time + +### Development + +If you would like to contribute, first you would need to install deps, assets and then compile css and js. +I put everything under next mix command: + +```sh +mix setup +``` + +Then you would need some database with seeds. Here is command for this: + +```sh +DUCK_PATH="dev.duckdb" mix run priv/repo/seeds.exs +``` + +Lastly you can start dev server: + +```sh +DUCK_PATH="dev.duckdb" elixir priv/repo/dev.exs +``` + +or + +```sh +DUCK_PATH="dev.duckdb" iex priv/repo/dev.exs +``` + +You can navigate to `http://localhost:4000/dev/analytics` + +## Performance test + +I performed [vegeta](https://github.com/tsenart/vegeta) test on basic Macbook Air M2, to see if plug will affect application performance. +Script can be found here: `vegeta/vegeta.sh` + +| With plug | Without | +| ---------------------- | ---------------------- | +| ![with](/github/vegeta-with.png) | ![without](/github/vegeta-without.png) | + +## For whom this library + +- [x] Single instance Phoenix app +- [x] Multiple instances of Phoenix app without auto scaling group + +- [ ] Multiple instances of Phoenix app **with** auto scaling group + +There is a plan to build a separate backend to be powered by ClickHouse in order to track requests across multiple nodes in orchestrated scenarios. + +### Heavily inspired by + +- [https://github.com/elixir-error-tracker/error-tracker](https://github.com/elixir-error-tracker/error-tracker) +- [https://plausible.io](https://plausible.io) diff --git a/assets/components.json b/assets/components.json new file mode 100644 index 0000000..d427ba4 --- /dev/null +++ b/assets/components.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "default", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "css/app.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "/react/components", + "utils": "@/lib/utils" + } +} diff --git a/assets/css/app.css b/assets/css/app.css new file mode 100644 index 0000000..bf15f23 --- /dev/null +++ b/assets/css/app.css @@ -0,0 +1,74 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 44%; + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + --destructive: 0 72% 51%; + --destructive-foreground: 210 40% 98%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 221.2 83.2% 53.3%; + --radius: 0.5rem; + + --chart-1: 221.2 83.2% 53.3%; + --chart-2: 212 95% 68%; + --chart-3: 216 92% 60%; + --chart-4: 210 98% 78%; + --chart-5: 212 97% 87%; + } + + .dark { + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + --muted: 240 3.7% 15.9%; + --muted-foreground: 240 5% 64.9%; + --accent: 240 3.7% 15.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 72% 51%; + --destructive-foreground: 210 40% 98%; + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + --ring: 221.2 83.2% 53.3%; + + --chart-1: 221.2 83.2% 53.3%; + --chart-2: 212 95% 68%; + --chart-3: 216 92% 60%; + --chart-4: 210 98% 78%; + --chart-5: 212 97% 87%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + font-feature-settings: + "rlig" 1, + "calt" 1; + } +} diff --git a/assets/js/app.js b/assets/js/app.js new file mode 100644 index 0000000..284793d --- /dev/null +++ b/assets/js/app.js @@ -0,0 +1,75 @@ +// If you want to use Phoenix channels, run `mix help phx.gen.channel` +// to get started and then uncomment the line below. +// import "./user_socket.js" + +// You can include dependencies in two ways. +// +// The simplest option is to put them in assets/vendor and +// import them using relative paths: +// +// import "../vendor/some-package.js" +// +// Alternatively, you can `npm install some-package --prefix assets` and import +// them using a path starting with the package name: +// +// import "some-package" +// + +// Include phoenix_html to handle method=PUT/DELETE in forms and buttons. +import "phoenix_html"; +// Establish Phoenix Socket and LiveView configuration. +import { Socket } from "phoenix"; +import { LiveSocket } from "phoenix_live_view"; +import topbar from "topbar"; + +import components from "../react"; +import { getHooks } from "@mrdotb/live-react"; + +const hooks = { + ...getHooks(components), +}; + +let csrfToken = document + .querySelector("meta[name='csrf-token']") + .getAttribute("content"); +let liveSocket = new LiveSocket("/live", Socket, { + longPollFallbackMs: 2500, + params: { _csrf_token: csrfToken }, + hooks: hooks, +}); + +// Show progress bar on live navigation and form submits +topbar.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }); +window.addEventListener("phx:page-loading-start", (_info) => topbar.show(300)); +window.addEventListener("phx:page-loading-stop", (_info) => topbar.hide()); + +// connect if there are any LiveViews on the page +liveSocket.connect(); + +// expose liveSocket on window for web console debug logs and latency simulation: +// >> liveSocket.enableDebug() +// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session +// >> liveSocket.disableLatencySim() +window.liveSocket = liveSocket; + +const getThemePreference = () => { + if (typeof localStorage !== "undefined" && localStorage.getItem("theme")) { + return localStorage.getItem("theme"); + } + return window.matchMedia("(prefers-color-scheme: dark)").matches + ? "dark" + : "light"; +}; +const isDark = getThemePreference() === "dark"; +document.documentElement.classList[isDark ? "add" : "remove"]("dark"); + +if (typeof localStorage !== "undefined") { + const observer = new MutationObserver(() => { + const isDark = document.documentElement.classList.contains("dark"); + localStorage.setItem("theme", isDark ? "dark" : "light"); + }); + observer.observe(document.documentElement, { + attributes: true, + attributeFilter: ["class"], + }); +} diff --git a/assets/package-lock.json b/assets/package-lock.json new file mode 100644 index 0000000..312724c --- /dev/null +++ b/assets/package-lock.json @@ -0,0 +1,3316 @@ +{ + "name": "assets", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-slot": "^1.1.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "cmdk": "^1.0.0", + "date-fns": "^3.6.0", + "lucide-react": "^0.428.0", + "react": "^18.3.1", + "react-day-picker": "^8.10.1", + "react-dom": "^18.3.1", + "react-hotkeys-hook": "^4.5.0", + "recharts": "^2.12.7", + "tailwind-merge": "^2.5.2", + "tailwindcss-animate": "^1.0.7", + "topbar": "^3.0.0", + "use-between": "^1.3.5" + }, + "devDependencies": { + "@mrdotb/live-react": "^0.1.0", + "@types/react": "^18.3.3" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.7.tgz", + "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.7" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.10", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.10.tgz", + "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.7" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", + "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz", + "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==", + "license": "MIT" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mrdotb/live-react": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mrdotb/live-react/-/live-react-0.1.0.tgz", + "integrity": "sha512-LoBhvGBctEjs93OXcPzUvAZWb4Z0koIzMwHqRlWXg17xgs6gpzKupivwhLo6ohNYEzOJpfSCDBAFtDqx4T8XXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@radix-ui/number": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.0.tgz", + "integrity": "sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==", + "license": "MIT" + }, + "node_modules/@radix-ui/primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-arrow": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", + "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-collection": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", + "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-context": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-direction": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", + "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dropdown-menu": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.1.tgz", + "integrity": "sha512-y8E+x9fBq9qvteD2Zwa4397pUVhYsh9iq44b5RD5qu1GMJWBCBuVg1hMyItbc6+zH00TxGRqd9Iot4wzf3OoBQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-menu": "2.1.1", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-menu": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.1.tgz", + "integrity": "sha512-oa3mXRRVjHi6DZu/ghuzdylyjaMXLymx83irM7hTxutQbD+7IhPKdMdRHD26Rm+kHRrWcrUkkRPv5pd47a2xFQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-roving-focus": "1.1.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popover": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.1.tgz", + "integrity": "sha512-3y1A3isulwnWhvTTwmIreiB8CF4L+qRjZnK1wYLO7pplddzXKby/GnZ2M7OZY3qgnl6p9AodUIHRYGXNah8Y7g==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popper": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", + "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==", + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.0.0", + "@radix-ui/react-arrow": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-rect": "1.1.0", + "@radix-ui/react-use-size": "1.1.0", + "@radix-ui/rect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-roving-focus": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz", + "integrity": "sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-select": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.1.tgz", + "integrity": "sha512-8iRDfyLtzxlprOo9IicnzvpsO1wNCkuwzzCM+Z5Rb5tNOpCdMvcc2AkzX0Fz+Tz9v6NJ5B/7EEgyZveo4FBRfQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.0", + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-popper": "1.2.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-visually-hidden": "1.1.0", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-previous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", + "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-rect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz", + "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/rect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-size": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-visually-hidden": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz", + "integrity": "sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/rect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", + "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==", + "license": "MIT" + }, + "node_modules/@types/d3-array": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz", + "integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz", + "integrity": "sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.6.tgz", + "integrity": "sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", + "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", + "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "license": "MIT", + "peer": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", + "peer": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "license": "MIT", + "peer": true + }, + "node_modules/aria-hidden": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT", + "peer": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "peer": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", + "peer": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/class-variance-authority": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz", + "integrity": "sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "2.0.0" + }, + "funding": { + "url": "https://joebell.co.uk" + } + }, + "node_modules/class-variance-authority/node_modules/clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cmdk": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cmdk/-/cmdk-1.0.0.tgz", + "integrity": "sha512-gDzVf0a09TvoJ5jnuPvygTB77+XdOSwEmJ88L6XPFPlv7T3RxbP9jgenfylrAMD0+Le1aO0nVjQUzl2g+vjz5Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-dialog": "1.0.5", + "@radix-ui/react-primitive": "1.0.3" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/cmdk/node_modules/@radix-ui/primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.1.tgz", + "integrity": "sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-compose-refs": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz", + "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-context": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.1.tgz", + "integrity": "sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-dialog": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz", + "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-context": "1.0.1", + "@radix-ui/react-dismissable-layer": "1.0.5", + "@radix-ui/react-focus-guards": "1.0.1", + "@radix-ui/react-focus-scope": "1.0.4", + "@radix-ui/react-id": "1.0.1", + "@radix-ui/react-portal": "1.0.4", + "@radix-ui/react-presence": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-slot": "1.0.2", + "@radix-ui/react-use-controllable-state": "1.0.1", + "aria-hidden": "^1.1.1", + "react-remove-scroll": "2.5.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz", + "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/primitive": "1.0.1", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-callback-ref": "1.0.1", + "@radix-ui/react-use-escape-keydown": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-focus-guards": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz", + "integrity": "sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-focus-scope": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz", + "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-primitive": "1.0.3", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-id": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz", + "integrity": "sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-layout-effect": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-portal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz", + "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-primitive": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-presence": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", + "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1", + "@radix-ui/react-use-layout-effect": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-primitive": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", + "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-slot": "1.0.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-slot": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", + "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz", + "integrity": "sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz", + "integrity": "sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz", + "integrity": "sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-use-callback-ref": "1.0.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz", + "integrity": "sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/cmdk/node_modules/react-remove-scroll": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", + "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.3", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "peer": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "license": "MIT", + "peer": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/date-fns": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "license": "MIT" + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "license": "MIT", + "peer": true + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT", + "peer": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT", + "peer": true + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "license": "ISC", + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "peer": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "license": "ISC", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", + "peer": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "license": "MIT", + "peer": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC", + "peer": true + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "license": "MIT", + "peer": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT", + "peer": true + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC", + "peer": true + }, + "node_modules/lucide-react": { + "version": "0.428.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.428.0.tgz", + "integrity": "sha512-rGrzslfEcgqwh+TLBC5qJ8wvVIXhLvAIXVFKNHndYyb1utSxxn9rXOC+1CNJLi6yNOooyPqIs6+3YCp6uSiEvg==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "license": "BlueOak-1.0.0", + "peer": true + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT", + "peer": true + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "license": "ISC", + "peer": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "license": "MIT", + "peer": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "license": "MIT", + "peer": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "license": "MIT", + "peer": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "license": "MIT", + "peer": true + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-day-picker": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.1.tgz", + "integrity": "sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==", + "license": "MIT", + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/gpbl" + }, + "peerDependencies": { + "date-fns": "^2.28.0 || ^3.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-hotkeys-hook": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-4.5.0.tgz", + "integrity": "sha512-Samb85GSgAWFQNvVt3PS90LPPGSf9mkH/r4au81ZP1yOIFayLC3QAvqTgGtJ8YEDMXtPmaVBs6NgipHO6h4Mug==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.1", + "react-dom": ">=16.8.1" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/react-remove-scroll": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.4", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-remove-scroll-bar": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz", + "integrity": "sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==", + "license": "MIT", + "dependencies": { + "react-style-singleton": "^2.2.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-smooth": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.1.tgz", + "integrity": "sha512-OE4hm7XqR0jNOq3Qmk9mFLyd6p2+j6bvbPJ7qlB7+oo0eNcL2l7WQzG6MBnT3EXY6xzkLMUBec3AfewJdA0J8w==", + "license": "MIT", + "dependencies": { + "fast-equals": "^5.0.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-style-singleton": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", + "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", + "license": "MIT", + "dependencies": { + "get-nonce": "^1.0.0", + "invariant": "^2.2.4", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "license": "MIT", + "peer": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", + "peer": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/recharts": { + "version": "2.12.7", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.12.7.tgz", + "integrity": "sha512-hlLJMhPQfv4/3NBSAyq3gzGg4h2v69RJh6KU7b3pXYNNAELs9kEoXOjbkxdXpALqKBoVmVptGfLpxdaVYqjmXQ==", + "license": "MIT", + "dependencies": { + "clsx": "^2.0.0", + "eventemitter3": "^4.0.1", + "lodash": "^4.17.21", + "react-is": "^16.10.2", + "react-smooth": "^4.0.0", + "recharts-scale": "^0.4.4", + "tiny-invariant": "^1.3.1", + "victory-vendor": "^36.6.8" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/recharts-scale": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/recharts-scale/-/recharts-scale-0.4.5.tgz", + "integrity": "sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w==", + "license": "MIT", + "dependencies": { + "decimal.js-light": "^2.4.1" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "license": "MIT", + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT", + "peer": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwind-merge": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.2.tgz", + "integrity": "sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz", + "integrity": "sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.0", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.0", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", + "resolve": "^1.22.2", + "sucrase": "^3.32.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss-animate": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", + "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "license": "MIT", + "peer": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "license": "MIT", + "peer": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/topbar": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/topbar/-/topbar-3.0.0.tgz", + "integrity": "sha512-mhczD7KfYi1anfoMPKRdl0wPSWiYc0YOK4KyycYs3EaNT15pVVNDG5CtfgZcEBWIPJEdfR7r8K4hTXDD2ECBVQ==", + "license": "MIT" + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "license": "0BSD" + }, + "node_modules/use-between": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/use-between/-/use-between-1.3.5.tgz", + "integrity": "sha512-IP9eJfszZr0aah/6i/pzaM7n/QgMPwWKJ+mnWqT5O0qFhLnztPbkVC6L7zI6ygeBIMJHfmUGvsw0b28pyrEGSA==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/use-callback-ref": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.2.tgz", + "integrity": "sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sidecar": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", + "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", + "license": "MIT", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT", + "peer": true + }, + "node_modules/victory-vendor": { + "version": "36.9.2", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.9.2.tgz", + "integrity": "sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT", + "peer": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yaml": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", + "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "license": "ISC", + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/assets/package.json b/assets/package.json new file mode 100644 index 0000000..ddbef11 --- /dev/null +++ b/assets/package.json @@ -0,0 +1,27 @@ +{ + "dependencies": { + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-slot": "^1.1.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "cmdk": "^1.0.0", + "date-fns": "^3.6.0", + "lucide-react": "^0.428.0", + "react": "^18.3.1", + "react-day-picker": "^8.10.1", + "react-dom": "^18.3.1", + "react-hotkeys-hook": "^4.5.0", + "recharts": "^2.12.7", + "tailwind-merge": "^2.5.2", + "tailwindcss-animate": "^1.0.7", + "topbar": "^3.0.0", + "use-between": "^1.3.5" + }, + "devDependencies": { + "@mrdotb/live-react": "^0.1.0", + "@types/react": "^18.3.3" + } +} diff --git a/assets/react/components/DateRange.ts b/assets/react/components/DateRange.ts new file mode 100644 index 0000000..d968493 --- /dev/null +++ b/assets/react/components/DateRange.ts @@ -0,0 +1,4 @@ +export type DateRange = { + from: Date; + to: Date; +}; diff --git a/assets/react/components/DateRangePicker.tsx b/assets/react/components/DateRangePicker.tsx new file mode 100644 index 0000000..05e2bc5 --- /dev/null +++ b/assets/react/components/DateRangePicker.tsx @@ -0,0 +1,200 @@ +"use client"; + +import * as React from "react"; +import { format, addDays } from "date-fns"; +import { Calendar as CalendarIcon } from "lucide-react"; +import { DateRange } from "react-day-picker"; + +import { cn } from "@/lib/utils"; +import { Button } from "@/components/ui/button"; +import { Calendar } from "@/components/ui/calendar"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; +import { + Select, + SelectTrigger, + SelectValue, + SelectContent, + SelectItem, +} from "@/components/ui/select"; +import { SelectSeparator } from "@/components/ui/select"; +import { useHotkeys } from "react-hotkeys-hook"; + +type DateRangePickerProps = { + from: Date; + to: Date; +}; + +const getDateRange = (value: string): { from: Date; to: Date } => { + const today = new Date(); + let from, to; + + switch (value) { + case "today": + from = to = today; + break; + case "yesterday": + to = today; + from = addDays(today, -1); + break; + case "last_week": + to = today; + from = addDays(today, -7); + break; + case "last_30_days": + to = today; + from = addDays(today, -30); + break; + case "last_90_days": + to = today; + from = addDays(today, -90); + break; + case "last_12_month": + to = today; + from = addDays(today, -365); + break; + case "previous_week": + to = addDays(today, -7); // End of last week (yesterday) + from = addDays(today, -14); // Start of last week + break; + case "previous_month": + to = new Date(today.getFullYear(), today.getMonth(), 0); + from = new Date(today.getFullYear(), today.getMonth() - 1, 1); + break; + case "previous_quarter": + const currentQuarter = Math.floor(today.getMonth() / 3); + to = new Date(today.getFullYear(), currentQuarter * 3, 0); + from = new Date(today.getFullYear(), (currentQuarter - 1) * 3, 1); + break; + case "previous_year": + to = new Date(today.getFullYear() - 1, 11, 31); + from = new Date(today.getFullYear() - 1, 0, 1); + break; + case "all_time": + from = new Date(0); // Earliest possible date + to = today; + break; + default: + from = to = today; + } + + return { from, to }; +}; + +export function DateRangePicker({ + dateRange, + pushEvent, +}: { + dateRange: DateRangePickerProps; + pushEvent: any; +}) { + const [date, setDate] = React.useState({ + from: dateRange.from, + to: dateRange.to, + }); + + const set_selected = (value: string): void => { + const { from, to } = getDateRange(value); + + setDate({ from, to }); + + pushEvent("set_date", { + value: { + from: format(from, "yyyy-MM-dd 00:00:00"), + to: format(to, "yyyy-MM-dd 23:59:59"), + }, + }); + }; + + useHotkeys("t", () => set_selected("today"), []); + useHotkeys("ctrl+t", () => set_selected("yesterday"), []); + useHotkeys("w", () => set_selected("last_week"), []); + useHotkeys("m", () => set_selected("last_30_days"), []); + useHotkeys("q", () => set_selected("last_90_days"), []); + useHotkeys("y", () => set_selected("last_12_month"), []); + useHotkeys("ctrl+w", () => set_selected("previous_week"), []); + useHotkeys("ctrl+m", () => set_selected("previous_month"), []); + useHotkeys("ctrl+q", () => set_selected("previous_quarter"), []); + useHotkeys("ctrl+y", () => set_selected("previous_year"), []); + useHotkeys("a", () => set_selected("all_time"), []); + + return ( +
+ + + + + + + { + setDate(value); + if (value?.from && value?.to) { + const fromDate = format(value.from, "yyyy-MM-dd 00:00:00"); + const toDate = format(value.to, "yyyy-MM-dd 23:59:59"); + + pushEvent("set_date", { + value: { + from: fromDate, + to: toDate, + }, + }); + } + }} + numberOfMonths={1} + /> + + +
+ ); +} diff --git a/assets/react/components/DeviceChart.tsx b/assets/react/components/DeviceChart.tsx new file mode 100644 index 0000000..fe760b4 --- /dev/null +++ b/assets/react/components/DeviceChart.tsx @@ -0,0 +1,139 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { Label, Pie, PieChart } from "recharts"; +import { nFormatter } from "@/lib/utils"; + +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + ChartConfig, + ChartContainer, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { DateRange } from "./DateRange"; + +const chartConfig = { + visits: { + label: "Visits", + }, + desktop: { + label: "Desktop", + color: "hsl(var(--chart-1))", + }, + tablet: { + label: "Tablet", + color: "hsl(var(--chart-2))", + }, + mobile: { + label: "Mobile", + color: "hsl(var(--chart-3))", + }, +} satisfies ChartConfig; + +type ChartData = { + device: string; + visits: number; + fill: string; +}; + +export function DeviceChart({ + chartData, + dateRange, +}: { + chartData: ChartData[]; + dateRange: DateRange; +}) { + chartData.forEach((item) => { + item.fill = `var(--color-${item.device})`; + }); + + return ( + + + Device Usage + + {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + + + + + + + } + /> + + + + + + +
+ Showing total visits split by device type +
+
+
+ ); +} diff --git a/assets/react/components/IntervalHook.ts b/assets/react/components/IntervalHook.ts new file mode 100644 index 0000000..44be539 --- /dev/null +++ b/assets/react/components/IntervalHook.ts @@ -0,0 +1,13 @@ +import { useState } from "react"; +import { useBetween } from "use-between"; + +const useIntervalState = () => { + const [interval, setInterval] = useState("day"); + + return { + interval, + setInterval, + }; +}; + +export const useSharedIntervalState = () => useBetween(useIntervalState); diff --git a/assets/react/components/PopularChart.tsx b/assets/react/components/PopularChart.tsx new file mode 100644 index 0000000..d00c38c --- /dev/null +++ b/assets/react/components/PopularChart.tsx @@ -0,0 +1,118 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { + Bar, + BarChart, + CartesianGrid, + LabelList, + XAxis, + YAxis, +} from "recharts"; + +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { + ChartConfig, + ChartContainer, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { DateRange } from "./DateRange"; + +const chartConfig = { + visits: { + label: "Visits", + color: "hsl(var(--chart-3))", + }, + label: { + color: "hsl(var(--foreground))", + }, +} satisfies ChartConfig; + +type ChartData = { + source: string; + visits: number; +}; + +export function PopularChart({ + chartData, + chartTitle, + dateRange, +}: { + chartData: ChartData[]; + chartTitle: string; + dateRange: DateRange; +}) { + return ( + + + {chartTitle} + + {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + + + + + + + value.slice(0, 3)} + hide + /> + + + } + /> + + + + + + + +
+ Showing total visits for {chartTitle.toLowerCase()} +
+
+
+ ); +} diff --git a/assets/react/components/RequestsChart.tsx b/assets/react/components/RequestsChart.tsx new file mode 100644 index 0000000..b079052 --- /dev/null +++ b/assets/react/components/RequestsChart.tsx @@ -0,0 +1,149 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"; + +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + ChartConfig, + ChartContainer, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; + +import { DateRange } from "./DateRange"; +import { useSharedIntervalState } from "./IntervalHook"; + +const chartConfig = { + views: { + label: "Total requests", + }, + hits: { + label: "Total requests", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig; + +type ChartData = { + date: string; + requests: number; +}; + +export function RequestsChart({ + chartData, + dateRange, + pushEvent, +}: { + chartData: ChartData[]; + dateRange: DateRange; + pushEvent: any; +}) { + const { interval, setInterval } = useSharedIntervalState(); + const updateInterval = (value: string) => { + setInterval(value); + + pushEvent("set_interval", { + value: { + interval: value, + }, + }); + }; + + return ( + + +
+ Total requests + + Showing total requests for {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + +
+ +
+ + + + + { + const date = new Date(value); + return date.toLocaleDateString("en-US", { + month: "short", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "month" && { year: "numeric" }), + }); + }} + /> + { + return new Date(value).toLocaleDateString("en-US", { + month: "short", + year: "numeric", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "hour" && { hour: "numeric" }), + }); + }} + /> + } + /> + + + + +
+ ); +} diff --git a/assets/react/components/ResChart.tsx b/assets/react/components/ResChart.tsx new file mode 100644 index 0000000..b9b853e --- /dev/null +++ b/assets/react/components/ResChart.tsx @@ -0,0 +1,119 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { + Bar, + BarChart, + CartesianGrid, + LabelList, + XAxis, + YAxis, +} from "recharts"; + +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + ChartConfig, + ChartContainer, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { DateRange } from "./DateRange"; + +const chartConfig = { + duration: { + label: "Duration", + color: "hsl(var(--chart-3))", + }, + label: { + color: "hsl(var(--foreground))", + }, +} satisfies ChartConfig; + +type ChartData = { + path: string; + duration: number; +}; + +export function ResChart({ + chartData, + chartTitle, + dateRange, +}: { + chartData: ChartData[]; + chartTitle: string; + dateRange: DateRange; +}) { + return ( + + + {chartTitle} + + {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + + + + + + + value.slice(0, 3)} + hide + /> + + + } + /> + + + + + + + +
+ Request duration for {chartTitle.toLowerCase()} +
+
+
+ ); +} diff --git a/assets/react/components/SingleStat.tsx b/assets/react/components/SingleStat.tsx new file mode 100644 index 0000000..7fb113e --- /dev/null +++ b/assets/react/components/SingleStat.tsx @@ -0,0 +1,96 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { Bar, BarChart, Rectangle, XAxis } from "recharts"; + +import { + Card, + CardContent, + CardHeader, + CardTitle, + CardDescription, +} from "@/components/ui/card"; + +import { ChartContainer } from "@/components/ui/chart"; +import { nFormatter } from "./lib/utils"; + +import { DateRange } from "./DateRange"; + +type ChartData = { + date: string; + hits: number; +}; + +const ChartConfig = { + hits: { + label: "Hits", + color: "hsl(var(--chart-1))", + }, +}; + +export function SingleStat({ + statData, + statUnit, + statTitle, + chartData, + dateRange, +}: { + statData: number; + statUnit: string; + statTitle: string; + chartData: ChartData[]; + dateRange: DateRange; +}) { + return ( + + + {statTitle} + + {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + + + +
+ {statUnit === "time" + ? statData < 60000 + ? `${(statData / 1000).toFixed(2)}s` + : `${(statData / 60000).toFixed(2)}m` + : nFormatter(statData, 2)} + + {statUnit}/period + +
+ + + } + /> + + + +
+
+ ); +} diff --git a/assets/react/components/StatusChart.tsx b/assets/react/components/StatusChart.tsx new file mode 100644 index 0000000..aca81b4 --- /dev/null +++ b/assets/react/components/StatusChart.tsx @@ -0,0 +1,235 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"; + +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + ChartConfig, + ChartContainer, + ChartLegend, + ChartLegendContent, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; + +import { DateRange } from "./DateRange"; +import { useSharedIntervalState } from "./IntervalHook"; + +const chartConfig = { + oks: { + label: "200s", + color: "hsl(var(--chart-5))", + }, + redirs: { + label: "300s", + color: "hsl(var(--chart-4))", + }, + errors: { + label: "400s", + color: "hsl(var(--chart-2))", + }, + fails: { + label: "500s", + color: "hsl(var(--chart-1))", + }, +} satisfies ChartConfig; + +type ChartData = { + date: string; + oks: number; + redirs: number; + erorrs: number; + fails: number; +}; + +export function StatusChart({ + chartData, + dateRange, + pushEvent, +}: { + chartData: ChartData[]; + dateRange: DateRange; + intervalx: string; + pushEvent: any; +}) { + const { interval, setInterval } = useSharedIntervalState(); + const updateInterval = (value: string) => { + setInterval(value); + + pushEvent("set_interval", { + value: { + interval: value, + }, + }); + }; + + return ( + + +
+ HTTP Statuses + + Showing HTTP statuses for the {format(dateRange.from, "dd LLL, y")}{" "} + - {format(dateRange.to, "dd LLL, y")} + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + { + const date = new Date(value); + return date.toLocaleDateString("en-US", { + month: "short", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "month" && { year: "numeric" }), + }); + }} + /> + { + return new Date(value).toLocaleDateString("en-US", { + month: "short", + year: "numeric", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "hour" && { hour: "numeric" }), + }); + }} + indicator="dashed" + /> + } + /> + + + + + } /> + + + +
+ ); +} diff --git a/assets/react/components/ThemeToggle.tsx b/assets/react/components/ThemeToggle.tsx new file mode 100644 index 0000000..ded5369 --- /dev/null +++ b/assets/react/components/ThemeToggle.tsx @@ -0,0 +1,52 @@ +import * as React from "react"; +import { Moon, Sun } from "lucide-react"; + +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; + +export function ThemeToggle() { + const [theme, setThemeState] = React.useState< + "theme-light" | "dark" | "system" + >("theme-light"); + + React.useEffect(() => { + const isDarkMode = document.documentElement.classList.contains("dark"); + setThemeState(isDarkMode ? "dark" : "theme-light"); + }, []); + + React.useEffect(() => { + const isDark = + theme === "dark" || + (theme === "system" && + window.matchMedia("(prefers-color-scheme: dark)").matches); + document.documentElement.classList[isDark ? "add" : "remove"]("dark"); + }, [theme]); + + return ( + + + + + + setThemeState("theme-light")}> + Light + + setThemeState("dark")}> + Dark + + setThemeState("system")}> + System + + + + ); +} diff --git a/assets/react/components/VisitsChart.tsx b/assets/react/components/VisitsChart.tsx new file mode 100644 index 0000000..df92bcc --- /dev/null +++ b/assets/react/components/VisitsChart.tsx @@ -0,0 +1,194 @@ +"use client"; + +import * as React from "react"; +import { format } from "date-fns"; +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"; + +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + ChartConfig, + ChartContainer, + ChartLegend, + ChartLegendContent, + ChartTooltip, + ChartTooltipContent, +} from "@/components/ui/chart"; + +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; + +import { useSharedIntervalState } from "./IntervalHook"; + +const chartConfig = { + visitors: { + label: "Visitors", + }, + total: { + label: "Total", + color: "hsl(var(--chart-1))", + }, + unique: { + label: "Unique", + color: "hsl(var(--chart-2))", + }, +} satisfies ChartConfig; + +type ChartData = { + date: string; + total_visits: number; + unique_visits: number; +}; + +type DateRange = { + from: Date; + to: Date; +}; + +export function VisitsChart({ + chartData, + dateRange, + pushEvent, +}: { + chartData: ChartData[]; + dateRange: DateRange; + intervalx: string; + pushEvent: any; +}) { + const { interval, setInterval } = useSharedIntervalState(); + const updateInterval = (value: string) => { + setInterval(value); + + pushEvent("set_interval", { + value: { + interval: value, + }, + }); + }; + + return ( + + +
+ Total visits + + Showing total visits for {format(dateRange.from, "dd LLL, y")} -{" "} + {format(dateRange.to, "dd LLL, y")} + +
+ +
+ + + + + + + + + + + + + + + { + const date = new Date(value); + return date.toLocaleDateString("en-US", { + month: "short", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "month" && { year: "numeric" }), + }); + }} + /> + { + return new Date(value).toLocaleDateString("en-US", { + month: "short", + year: "numeric", + ...(interval !== "month" && { day: "numeric" }), + ...(interval === "hour" && { hour: "numeric" }), + }); + }} + indicator="dashed" + /> + } + /> + + + } /> + + + +
+ ); +} diff --git a/assets/react/components/lib/utils.ts b/assets/react/components/lib/utils.ts new file mode 100644 index 0000000..99c7752 --- /dev/null +++ b/assets/react/components/lib/utils.ts @@ -0,0 +1,23 @@ +import { type ClassValue, clsx } from "clsx"; +import { twMerge } from "tailwind-merge"; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} + +export function nFormatter(num: number, digits: number) { + const lookup = [ + { value: 1, symbol: "" }, + { value: 1e3, symbol: "k" }, + { value: 1e6, symbol: "M" }, + { value: 1e9, symbol: "G" }, + { value: 1e12, symbol: "T" }, + { value: 1e15, symbol: "P" }, + { value: 1e18, symbol: "E" }, + ]; + const regexp = /\.0+$|(?<=\.[0-9]*[1-9])0+$/; + const item = lookup.findLast((item) => num >= item.value); + return item + ? (num / item.value).toFixed(digits).replace(regexp, "").concat(item.symbol) + : "0"; +} diff --git a/assets/react/components/ui/button.tsx b/assets/react/components/ui/button.tsx new file mode 100644 index 0000000..57c9fe4 --- /dev/null +++ b/assets/react/components/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; + +import { cn } from "@/lib/utils"; + +const buttonVariants = cva( + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + }, +); + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean; +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button"; + return ( + + ); + }, +); +Button.displayName = "Button"; + +export { Button, buttonVariants }; diff --git a/assets/react/components/ui/calendar.tsx b/assets/react/components/ui/calendar.tsx new file mode 100644 index 0000000..5880514 --- /dev/null +++ b/assets/react/components/ui/calendar.tsx @@ -0,0 +1,64 @@ +import * as React from "react"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import { DayPicker } from "react-day-picker"; + +import { cn } from "@/lib/utils"; +import { buttonVariants } from "@/components/ui/button"; + +export type CalendarProps = React.ComponentProps; + +function Calendar({ + className, + classNames, + showOutsideDays = true, + ...props +}: CalendarProps) { + return ( + , + IconRight: ({ ...props }) => , + }} + {...props} + /> + ); +} +Calendar.displayName = "Calendar"; + +export { Calendar }; diff --git a/assets/react/components/ui/card.tsx b/assets/react/components/ui/card.tsx new file mode 100644 index 0000000..dc3b01d --- /dev/null +++ b/assets/react/components/ui/card.tsx @@ -0,0 +1,86 @@ +import * as React from "react"; + +import { cn } from "@/lib/utils"; + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +Card.displayName = "Card"; + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +CardHeader.displayName = "CardHeader"; + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)); +CardTitle.displayName = "CardTitle"; + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)); +CardDescription.displayName = "CardDescription"; + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)); +CardContent.displayName = "CardContent"; + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +CardFooter.displayName = "CardFooter"; + +export { + Card, + CardHeader, + CardFooter, + CardTitle, + CardDescription, + CardContent, +}; diff --git a/assets/react/components/ui/chart.tsx b/assets/react/components/ui/chart.tsx new file mode 100644 index 0000000..ba084ed --- /dev/null +++ b/assets/react/components/ui/chart.tsx @@ -0,0 +1,363 @@ +import * as React from "react"; +import * as RechartsPrimitive from "recharts"; + +import { cn } from "@/lib/utils"; + +// Format: { THEME_NAME: CSS_SELECTOR } +const THEMES = { light: "", dark: ".dark" } as const; + +export type ChartConfig = { + [k in string]: { + label?: React.ReactNode; + icon?: React.ComponentType; + } & ( + | { color?: string; theme?: never } + | { color?: never; theme: Record } + ); +}; + +type ChartContextProps = { + config: ChartConfig; +}; + +const ChartContext = React.createContext(null); + +function useChart() { + const context = React.useContext(ChartContext); + + if (!context) { + throw new Error("useChart must be used within a "); + } + + return context; +} + +const ChartContainer = React.forwardRef< + HTMLDivElement, + React.ComponentProps<"div"> & { + config: ChartConfig; + children: React.ComponentProps< + typeof RechartsPrimitive.ResponsiveContainer + >["children"]; + } +>(({ id, className, children, config, ...props }, ref) => { + const uniqueId = React.useId(); + const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`; + + return ( + +
+ + + {children} + +
+
+ ); +}); +ChartContainer.displayName = "Chart"; + +const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { + const colorConfig = Object.entries(config).filter( + ([_, config]) => config.theme || config.color, + ); + + if (!colorConfig.length) { + return null; + } + + return ( + + + + + + <%= @inner_content %> + + diff --git a/lib/phoenix_analytics/web/gettext.ex b/lib/phoenix_analytics/web/gettext.ex new file mode 100644 index 0000000..93bae22 --- /dev/null +++ b/lib/phoenix_analytics/web/gettext.ex @@ -0,0 +1,5 @@ +defmodule PhoenixAnalytics.Web.Gettext do + @moduledoc false + + use Gettext, otp_app: :phoenix_analytics +end diff --git a/lib/phoenix_analytics/web/hooks/set_assigns.ex b/lib/phoenix_analytics/web/hooks/set_assigns.ex new file mode 100644 index 0000000..4665ccb --- /dev/null +++ b/lib/phoenix_analytics/web/hooks/set_assigns.ex @@ -0,0 +1,7 @@ +defmodule PhoenixAnalytics.Web.Hooks.SetAssigns do + @moduledoc false + + def on_mount({:set_dashboard_path, path}, _params, _session, socket) do + {:cont, %{socket | private: Map.put(socket.private, :dashboard_path, path)}} + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/device_chart.ex b/lib/phoenix_analytics/web/live/components/charts/device_chart.ex new file mode 100644 index 0000000..9795164 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/device_chart.ex @@ -0,0 +1,56 @@ +defmodule PhoenixAnalytics.Web.Live.Components.DeviceChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react name="DeviceChart" dateRange={@date_range} chartData={@chart_data} socket={@socket} /> +
+ """ + end + + @impl true + def update(assigns, socket) do + date_range = assigns.date_range + chart_data = chart_data(date_range) + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data)} + end + + defp chart_data(%{from: from, to: to} = _date_range) do + cache_key = "devices_usage:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_data(from, to) end) + + value + end + + defp fetch_data(from, to) do + query = Analytics.devices_usage(from, to) + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [device, visits | _] <- result do + %{"device" => device, "visits" => visits} + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/popular_chart.ex b/lib/phoenix_analytics/web/live/components/charts/popular_chart.ex new file mode 100644 index 0000000..eeb2072 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/popular_chart.ex @@ -0,0 +1,68 @@ +defmodule PhoenixAnalytics.Web.Live.Components.PopularChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react + name="PopularChart" + dateRange={@date_range} + chartData={@chart_data} + chartTitle={@chart_title} + socket={@socket} + /> +
+ """ + end + + @impl true + def update(assigns, socket) do + data_source = assigns.source + date_range = assigns.date_range + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data(data_source, date_range))} + end + + defp chart_data(source, %{from: from, to: to} = _date_range) do + cache_key = "popular_chart:#{source}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_data(source, from, to) end) + + value + end + + defp fetch_data(source, from, to) do + query = + case source do + :pages -> Analytics.popular_pages(from, to) + :referers -> Analytics.popular_referer(from, to) + :not_founds -> Analytics.popular_not_found(from, to) + end + + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [%{"source" => source, "visits" => visits}] <- result do + %{"source" => source, "visits" => visits} + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/requests_chart.ex b/lib/phoenix_analytics/web/live/components/charts/requests_chart.ex new file mode 100644 index 0000000..ef85afe --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/requests_chart.ex @@ -0,0 +1,56 @@ +defmodule PhoenixAnalytics.Web.Live.Components.RequestsChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react name="RequestsChart" dateRange={@date_range} chartData={@chart_data} socket={@socket} /> +
+ """ + end + + @impl true + def update(assigns, socket) do + interval = assigns.interval + date_range = assigns.date_range + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data(date_range, interval))} + end + + def chart_data(%{from: from, to: to} = _date_range, interval) do + cache_key = "requests_chart:#{interval}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_chart_data(from, to, interval) end) + + value + end + + defp fetch_chart_data(from, to, interval) do + query = Analytics.total_requests_per_period(from, to, interval) + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [date, hits] <- result do + %{"date" => date, "hits" => hits} + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/res_chart.ex b/lib/phoenix_analytics/web/live/components/charts/res_chart.ex new file mode 100644 index 0000000..afe28f1 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/res_chart.ex @@ -0,0 +1,67 @@ +defmodule PhoenixAnalytics.Web.Live.Components.ResChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react + name="ResChart" + dateRange={@date_range} + chartData={@chart_data} + chartTitle={@chart_title} + socket={@socket} + /> +
+ """ + end + + @impl true + def update(assigns, socket) do + data_source = assigns.source + date_range = assigns.date_range + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data(data_source, date_range))} + end + + defp chart_data(source, %{from: from, to: to} = _date_range) do + cache_key = "slowest_chart:#{source}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_data(source, from, to) end) + + value + end + + defp fetch_data(source, from, to) do + query = + case source do + :pages -> Analytics.slowest_pages(from, to) + :resources -> Analytics.slowest_resources(from, to) + end + + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [%{"path" => path, "duration" => duration}] <- result do + %{"path" => path, "duration" => duration} + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/status_chart.ex b/lib/phoenix_analytics/web/live/components/charts/status_chart.ex new file mode 100644 index 0000000..7f4df68 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/status_chart.ex @@ -0,0 +1,62 @@ +defmodule PhoenixAnalytics.Web.Live.Components.StatusChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react name="StatusChart" dateRange={@date_range} chartData={@chart_data} socket={@socket} /> +
+ """ + end + + @impl true + def update(assigns, socket) do + date_range = assigns.date_range + interval = assigns.interval + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data(date_range, interval))} + end + + defp chart_data(%{from: from, to: to} = _date_range, interval) do + cache_key = "statuses_per_period:#{interval}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_data(from, to, interval) end) + + value + end + + defp fetch_data(from, to, interval) do + query = Analytics.statuses_per_period(from, to, interval) + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [date | [{_, oks}, {_, redirects}, {_, errors}, {_, fails} | _]] <- result do + %{ + "date" => date, + "oks" => oks, + "redirs" => redirects, + "errors" => errors, + "fails" => fails + } + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/charts/visits_chart.ex b/lib/phoenix_analytics/web/live/components/charts/visits_chart.ex new file mode 100644 index 0000000..3e26c21 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/charts/visits_chart.ex @@ -0,0 +1,60 @@ +defmodule PhoenixAnalytics.Web.Live.Components.VisitsChart do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + @impl true + def render(assigns) do + ~H""" +
+ <.react name="VisitsChart" dateRange={@date_range} chartData={@chart_data} socket={@socket} /> +
+ """ + end + + @impl true + def update(assigns, socket) do + date_range = assigns.date_range + interval = assigns.interval + + {:ok, + assign(socket, assigns) + |> assign(:chart_data, chart_data(date_range, interval))} + end + + defp chart_data(%{from: from, to: to} = _date_range, interval) do + cache_key = "visits_per_period:#{interval}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_data(from, to, interval) end) + + value + end + + defp fetch_data(from, to, interval) do + query = Analytics.visits_per_period(from, to, interval) + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [date | [total_visits, unique_visits | _]] <- result do + %{ + "date" => date, + "total" => total_visits, + "unique" => unique_visits + } + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/components/footer.ex b/lib/phoenix_analytics/web/live/components/footer.ex new file mode 100644 index 0000000..a4ea6a7 --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/footer.ex @@ -0,0 +1,67 @@ +defmodule PhoenixAnalytics.Web.Live.Components.Footer do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + @impl true + def render(assigns) do + ~H""" +
+
+ <%!-- Left side of footer --%> +
+

<%= Date.utc_today().year %>

+
+ + <%!-- Mid of footer --%> + + + <%!-- Right side of footer --%> +
+ <.react name="ThemeToggle" socket={@socket} /> +
+
+
+ """ + end +end diff --git a/lib/phoenix_analytics/web/live/components/header.ex b/lib/phoenix_analytics/web/live/components/header.ex new file mode 100644 index 0000000..14e8eda --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/header.ex @@ -0,0 +1,62 @@ +defmodule PhoenixAnalytics.Web.Live.Components.Header do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + @impl true + def render(assigns) do + ~H""" +
+
+ <%!-- Left side of navbar --%> + + + <%!-- Right side of navbar --%> +
+ <.react name="DateRangePicker" socket={@socket} dateRange={@date_range} /> + <.react name="ThemeToggle" socket={@socket} /> +
+
+
+ """ + end + + @impl true + def update(assigns, socket) do + {:ok, assign(socket, :date_range, assigns.date_range)} + end + + @impl true + def handle_event("set_date", %{"value" => %{"from" => from, "to" => to}}, socket) do + send(self(), {:set_date, %{from: from, to: to}}) + {:noreply, socket} + end +end diff --git a/lib/phoenix_analytics/web/live/components/stats/single_stat.ex b/lib/phoenix_analytics/web/live/components/stats/single_stat.ex new file mode 100644 index 0000000..3daacfb --- /dev/null +++ b/lib/phoenix_analytics/web/live/components/stats/single_stat.ex @@ -0,0 +1,117 @@ +defmodule PhoenixAnalytics.Web.Live.Components.SingleStat do + @moduledoc false + + use PhoenixAnalytics.Web, :live_component + + alias PhoenixAnalytics.Services.Cache + alias PhoenixAnalytics.Services.Telemetry + alias PhoenixAnalytics.Repo + alias PhoenixAnalytics.Queries.Analytics + + def render(assigns) do + ~H""" +
+ <.react + name="SingleStat" + statData={@stat_data} + statUnit={@stat_unit} + statTitle={@stat_title} + dateRange={@date_range} + chartData={@chart_data} + socket={@socket} + /> +
+ """ + end + + def update(assigns, socket) do + stat_data = stat_data(assigns.source, assigns.date_range) + chart_data = chart_data(assigns.source, assigns.date_range) + + stat_title = + case assigns.source do + :unique_visitors -> "Unique visitors" + :total_pageviews -> "Total Pageviews" + :total_requests -> "Total Requests" + :views_per_visit -> "Views per Visit" + :visit_duration -> "Visit Duration" + :bounce_rate -> "Bounce Rate" + end + + {:ok, + assign(socket, assigns) + |> assign(:stat_title, stat_title) + |> assign(:stat_data, stat_data) + |> assign(:chart_data, chart_data)} + end + + defp stat_data(source, %{from: from, to: to} = _date_range) do + cache_key = "stat:#{source}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_stat_data(source, from, to) end) + + value + end + + defp fetch_stat_data(source, from, to) do + query = + case source do + :unique_visitors -> Analytics.unique_visitors(from, to) + :total_pageviews -> Analytics.total_pageviews(from, to) + :total_requests -> Analytics.total_requests(from, to) + :views_per_visit -> Analytics.average_views_per_visit(from, to) + :visit_duration -> Analytics.average_visit_duration(from, to) + :bounce_rate -> Analytics.bounce_rate(from, to) + end + + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + 0 + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + 0 + + [[formatted | _] | _] -> + formatted + end + end + + defp chart_data(source, %{from: from, to: to} = _date_range) do + cache_key = "stat_chart:#{source}:#{from}:#{to}" + + {_, value} = Cache.fetch(cache_key, fn -> fetch_chart_data(source, from, to) end) + + value + end + + defp fetch_chart_data(source, from, to) do + query = + case source do + :unique_visitors -> Analytics.unique_visitors_per_period_limited(from, to) + :total_pageviews -> Analytics.total_pageviews_per_period_limited(from, to) + :total_requests -> Analytics.total_requests_per_period_limited(from, to) + :views_per_visit -> Analytics.views_per_visit_per_period_limited(from, to) + :visit_duration -> Analytics.visit_duration_per_period_limited(from, to) + :bounce_rate -> Analytics.bounce_rate_per_period_limited(from, to) + end + + result = Repo.execute_fetch({query, []}) + + case result do + [] -> + [] + + {:error, reason} -> + Telemetry.log_error(:fetch_data, reason) + [] + + _ -> + for [date, hits] <- result do + %{"date" => date, "hits" => hits} + end + end + end +end diff --git a/lib/phoenix_analytics/web/live/dashboard.html.heex b/lib/phoenix_analytics/web/live/dashboard.html.heex new file mode 100644 index 0000000..bdddee9 --- /dev/null +++ b/lib/phoenix_analytics/web/live/dashboard.html.heex @@ -0,0 +1,132 @@ +<.live_component + id="header" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.Header} +/> + +
+ <.live_component + id="unique-visitors-stat" + source={:unique_visitors} + date_range={@date_range} + stat_unit="visits" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> + + <.live_component + id="total-pageviews-stat" + source={:total_pageviews} + date_range={@date_range} + stat_unit="views" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> + + <.live_component + id="total-requests-stat" + source={:total_requests} + date_range={@date_range} + stat_unit="requests" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> + + <.live_component + id="views-per-visit-stat" + source={:views_per_visit} + date_range={@date_range} + stat_unit="views" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> + + <.live_component + id="visit-duration-stat" + source={:visit_duration} + date_range={@date_range} + stat_unit="time" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> + + <.live_component + id="bounce-rate-stat" + source={:bounce_rate} + date_range={@date_range} + stat_unit="%" + module={PhoenixAnalytics.Web.Live.Components.SingleStat} + /> +
+ +<.live_component + id="visits-chart" + date_range={@date_range} + interval={@interval} + module={PhoenixAnalytics.Web.Live.Components.VisitsChart} +/> + +
+ <.live_component + id="popular-pages-chart" + source={:pages} + chart_title="Top Pages" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.PopularChart} + /> + + <.live_component + id="popular-referer-chart" + source={:referers} + chart_title="Top Referer" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.PopularChart} + /> + + <.live_component + id="device-usage-chart-1" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.DeviceChart} + /> +
+ +
+ <.live_component + id="statuses-chart" + date_range={@date_range} + interval={@interval} + module={PhoenixAnalytics.Web.Live.Components.StatusChart} + /> +
+ +
+ <.live_component + id="slowest-pages-chart" + source={:pages} + chart_title="Slowest Pages" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.ResChart} + /> + + <.live_component + id="slowest-resources-chart" + source={:resources} + chart_title="Slowest Resources" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.ResChart} + /> + + <.live_component + id="popular-404-chart" + source={:not_founds} + chart_title="404s" + date_range={@date_range} + module={PhoenixAnalytics.Web.Live.Components.PopularChart} + /> +
+ +
+ <.live_component + id="requests-chart" + date_range={@date_range} + interval={@interval} + module={PhoenixAnalytics.Web.Live.Components.RequestsChart} + /> +
+ +<.live_component id="header" module={PhoenixAnalytics.Web.Live.Components.Footer} /> diff --git a/lib/phoenix_analytics/web/live/dashboard_live.ex b/lib/phoenix_analytics/web/live/dashboard_live.ex new file mode 100644 index 0000000..008f664 --- /dev/null +++ b/lib/phoenix_analytics/web/live/dashboard_live.ex @@ -0,0 +1,29 @@ +defmodule PhoenixAnalytics.Web.Live.Dashboard do + @moduledoc false + + use PhoenixAnalytics.Web, :live_view + + @impl true + def mount(_params, _session, socket) do + today = Date.utc_today() + three_months_ago = today |> Date.add(-3 * 30) |> Date.beginning_of_month() + + default_to = today |> Date.to_string() |> Kernel.<>(" 23:59:59") + default_from = three_months_ago |> Date.to_string() |> Kernel.<>(" 00:00:00") + + range = %{from: default_from, to: default_to} + default_interval = "day" + + {:ok, socket |> assign(:date_range, range) |> assign(:interval, default_interval)} + end + + @impl true + def handle_event("set_date", %{"value" => %{"from" => from, "to" => to}}, socket) do + {:noreply, assign(socket, :date_range, %{from: from, to: to})} + end + + @impl true + def handle_event("set_interval", %{"value" => %{"interval" => interval}}, socket) do + {:noreply, assign(socket, :interval, interval)} + end +end diff --git a/lib/phoenix_analytics/web/router.ex b/lib/phoenix_analytics/web/router.ex new file mode 100644 index 0000000..c6cd0a8 --- /dev/null +++ b/lib/phoenix_analytics/web/router.ex @@ -0,0 +1,73 @@ +defmodule PhoenixAnalytics.Web.Router do + @moduledoc """ + PhoenixAnalytics.Web.Router + + This module provides routing functionality for the Phoenix Analytics dashboard. + + It defines a macro `phoenix_analytics_dashboard` that sets up the necessary routes + for the analytics dashboard, and a helper function `parse_options` to process + the options passed to the macro. + + ## Macro: phoenix_analytics_dashboard/2 + + Creates routes for the Phoenix Analytics dashboard. + + ### Parameters: + - path: The base path for the dashboard routes. + - opts: Optional keyword list of configuration options. + + ### Options: + - :as - The name for the live session (default: :phoenix_analytics_dashboard) + - :on_mount - Additional mount hooks to be executed (default: []) + + ### Usage: + ```elixir + phoenix_analytics_dashboard "/analytics" + ``` + + ## Function: parse_options/2 + + Processes the options passed to the `phoenix_analytics_dashboard` macro. + + ### Parameters: + - opts: The options keyword list. + - path: The base path for the dashboard. + + ### Returns: + A tuple containing the session name and session options. + + This function sets up the default on_mount hooks, including a custom hook to set + the dashboard path, and allows for additional custom hooks to be added. + It also configures the root layout for the dashboard. + """ + defmacro phoenix_analytics_dashboard(path, opts \\ []) do + quote bind_quoted: [path: path, opts: opts] do + scoped_path = Phoenix.Router.scoped_path(__MODULE__, path) + {session_name, session_opts} = parse_options(opts, scoped_path) + + scope path, alias: false, as: false do + import Phoenix.LiveView.Router, only: [live: 4, live_session: 3] + + live_session session_name, session_opts do + live("/", PhoenixAnalytics.Web.Live.Dashboard, :index, as: session_name) + end + end + end + end + + def parse_options(opts, path) do + custom_on_mount = Keyword.get(opts, :on_mount, []) + + on_mount = + [{PhoenixAnalytics.Web.Hooks.SetAssigns, {:set_dashboard_path, path}}] ++ custom_on_mount + + session_name = Keyword.get(opts, :as, :phoenix_analytics_dashboard) + + session_opts = [ + on_mount: on_mount, + root_layout: {PhoenixAnalytics.Web.Layouts, :root} + ] + + {session_name, session_opts} + end +end diff --git a/mix.exs b/mix.exs new file mode 100644 index 0000000..9811a49 --- /dev/null +++ b/mix.exs @@ -0,0 +1,123 @@ +defmodule PhoenixAnalytics.MixProject do + use Mix.Project + + @version "0.1.0" + + def project do + [ + app: :phoenix_analytics, + version: @version, + elixir: "~> 1.15", + elixirc_paths: elixirc_paths(Mix.env()), + start_permanent: Mix.env() == :prod, + aliases: aliases(), + deps: deps(), + description: description(), + package: package(), + source_url: "https://github.com/lalabuy948/PhoenixAnalytics", + homepage_url: "https://github.com/lalabuy948/PhoenixAnalytics", + name: "PhoenixAnalytics", + docs: [ + main: "PhoenixAnalytics", + formatters: ["html"], + groups_for_modules: groups_for_modules(), + api_reference: false, + extras: ["README.md"], + main: "readme" + ] + ] + end + + def package do + [ + licenses: ["Apache-2.0"], + links: %{ + "GitHub" => "https://github.com/lalabuy948/PhoenixAnalytics" + }, + maintainers: [ + "lalabuy948" + ], + files: ~w(lib priv/static/assets LICENSE mix.exs README.md .formatter.exs) + ] + end + + def description do + "Plug and play analytics for Phoenix applications. " + end + + defp elixirc_paths(:test), do: ["lib", "test/support"] + defp elixirc_paths(_), do: ["lib"] + + # Run "mix help compile.app" to learn about applications. + def application do + [ + mod: {PhoenixAnalytics.Application, []}, + extra_applications: [:logger, :telemetry] + ] + end + + # Run "mix help deps" to learn about dependencies. + defp deps do + [ + {:uuid, "~> 1.1"}, + {:plug, "~> 1.16"}, + {:cachex, "~> 3.6"}, + {:gettext, "~> 0.20"}, + {:duckdbex, "~> 0.3"}, + {:telemetry, "~> 1.2"}, + {:live_react, "~> 0.1"}, + {:phoenix_live_view, "~> 1.0.0-rc.1 or ~> 1.0"}, + # --- dev deps --- + {:ex_doc, "~> 0.33", only: :dev}, + {:esbuild, "~> 0.8", only: :dev, runtime: false}, + {:tailwind, "~> 0.1", only: :dev, runtime: false} + ] + end + + defp groups_for_modules do + [ + Integrations: [ + PhoenixAnalytics.Plugs.RequestTracker + ], + Entities: [ + PhoenixAnalytics.Entities.RequestLog + ], + Dashboard: [ + PhoenixAnalytics.Web.Router + ], + Services: [ + PhoenixAnalytics.Services.Batcher, + PhoenixAnalytics.Services.Cache, + PhoenixAnalytics.Services.PubSub, + PhoenixAnalytics.Services.Telemetry, + PhoenixAnalytics.Services.Utility + ], + Repository: [ + PhoenixAnalytics.Repo + ] + ] + end + + defp aliases do + [ + setup: ["deps.get", "assets.setup", "assets.build"], + "assets.setup": [ + "tailwind.install --if-missing", + "esbuild.install --if-missing", + "cmd --cd assets npm install" + ], + "assets.build": [ + "tailwind phoenix_analytics", + "esbuild phoenix_analytics" + ], + "assets.watch": [ + "tailwind phoenix_analytics --watch", + "esbuild phoenix_analytics --watch" + ], + "assets.deploy": [ + "tailwind phoenix_analytics --minify", + "esbuild phoenix_analytics --minify --metafile=meta.json" + ] + ] + end +end diff --git a/mix.lock b/mix.lock new file mode 100644 index 0000000..dc4aace --- /dev/null +++ b/mix.lock @@ -0,0 +1,35 @@ +%{ + "cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"}, + "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, + "cc_precompiler": {:hex, :cc_precompiler, "0.1.10", "47c9c08d8869cf09b41da36538f62bc1abd3e19e41701c2cea2675b53c704258", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "f6e046254e53cd6b41c6bacd70ae728011aa82b2742a80d6e2214855c6e06b22"}, + "duckdbex": {:hex, :duckdbex, "0.3.2", "5d50847ffdd790a18d091ed6841509970e2fe2be1e254a64a826755be0ac7408", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.8", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3a5ee4053c04044a5802df90bbcf35156870cca690e0f2c258604a3d71c4d5b2"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"}, + "elixir_make": {:hex, :elixir_make, "0.8.4", "4960a03ce79081dee8fe119d80ad372c4e7badb84c493cc75983f9d3bc8bde0f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "6e7f1d619b5f61dfabd0a20aa268e575572b542ac31723293a4c1a567d5ef040"}, + "esbuild": {:hex, :esbuild, "0.8.1", "0cbf919f0eccb136d2eeef0df49c4acf55336de864e63594adcea3814f3edf41", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "25fc876a67c13cb0a776e7b5d7974851556baeda2085296c14ab48555ea7560f"}, + "eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"}, + "ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"}, + "expo": {:hex, :expo, "1.0.1", "f9e2f984f5b8d195815d52d0ba264798c12c8d2f2606f76fa4c60e8ebe39474d", [:mix], [], "hexpm", "f250b33274e3e56513644858c116f255d35c767c2b8e96a512fe7839ef9306a1"}, + "gettext": {:hex, :gettext, "0.26.1", "38e14ea5dcf962d1fc9f361b63ea07c0ce715a8ef1f9e82d3dfb8e67e0416715", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "01ce56f188b9dc28780a52783d6529ad2bc7124f9744e571e1ee4ea88bf08734"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, + "jumper": {:hex, :jumper, "1.0.2", "68cdcd84472a00ac596b4e6459a41b3062d4427cbd4f1e8c8793c5b54f1406a7", [:mix], [], "hexpm", "9b7782409021e01ab3c08270e26f36eb62976a38c1aa64b2eaf6348422f165e1"}, + "live_react": {:hex, :live_react, "0.1.0", "5b406ee4108125f833938c52d7a0eb4611854d421e9a345def5cca450711dfe8", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 3.3.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.18.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "1d499253bcaf8f4391454b96af3abfff6cdd35ef99b1104edf6c802e06726050"}, + "makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, + "mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, + "phoenix": {:hex, :phoenix, "1.7.14", "a7d0b3f1bc95987044ddada111e77bd7f75646a08518942c72a8440278ae7825", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "c7859bc56cc5dfef19ecfc240775dae358cbaa530231118a9e014df392ace61a"}, + "phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.0-rc.6", "47d2669995ea326e5c71f5c1bc9177109cebf211385c638faa7b5862a401e516", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e56e4f1642a0b20edc2488cab30e5439595e0d8b5b259f76ef98b1c4e2e5b527"}, + "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, + "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, + "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, + "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, + "sleeplocks": {:hex, :sleeplocks, "1.1.3", "96a86460cc33b435c7310dbd27ec82ca2c1f24ae38e34f8edde97f756503441a", [:rebar3], [], "hexpm", "d3b3958552e6eb16f463921e70ae7c767519ef8f5be46d7696cc1ed649421321"}, + "tailwind": {:hex, :tailwind, "0.2.3", "277f08145d407de49650d0a4685dc062174bdd1ae7731c5f1da86163a24dfcdb", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "8e45e7a34a676a7747d04f7913a96c770c85e6be810a1d7f91e713d3a3655b5d"}, + "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, + "unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"}, + "uuid": {:hex, :uuid, "1.1.8", "e22fc04499de0de3ed1116b770c7737779f226ceefa0badb3592e64d5cfb4eb9", [:mix], [], "hexpm", "c790593b4c3b601f5dc2378baae7efaf5b3d73c4c6456ba85759905be792f2ac"}, + "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, + "websock_adapter": {:hex, :websock_adapter, "0.5.7", "65fa74042530064ef0570b75b43f5c49bb8b235d6515671b3d250022cb8a1f9e", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d0f478ee64deddfec64b800673fd6e0c8888b079d9f3444dd96d2a98383bdbd1"}, +} diff --git a/priv/repo/dev.exs b/priv/repo/dev.exs new file mode 100644 index 0000000..2a137fa --- /dev/null +++ b/priv/repo/dev.exs @@ -0,0 +1,102 @@ +#!/usr/bin/env elixir +Mix.install([ + {:phoenix_playground, "~> 0.1.5"}, + {:phoenix_analytics, path: "../phoenix_analytics", force: true} +]) + +IO.puts("DUCK_PATH: #{System.get_env("DUCK_PATH")}") +PhoenixAnalytics.Migration.up() + +defmodule DevLive do + use Phoenix.LiveView + + def mount(_params, _session, socket) do + {:ok, assign(socket, count: 0)} + end + + def render(assigns) do + ~H""" + <%= @count %> + + + + + """ + end + + def handle_event("inc", _params, socket) do + {:noreply, assign(socket, count: socket.assigns.count + 1)} + end + + def handle_event("dec", _params, socket) do + {:noreply, assign(socket, count: socket.assigns.count - 1)} + end +end + +defmodule DevController do + use Phoenix.Controller, formats: [:html] + use Phoenix.Component + plug :put_layout, false + plug :put_view, __MODULE__ + + def index(conn, params) do + count = + case Integer.parse(params["count"] || "") do + {n, ""} -> n + _ -> 0 + end + + render(conn, :index, count: count) + end + + def index(assigns) do + ~H""" + <%= @count %> + + + + + """ + end +end + +defmodule DevRouter do + use Phoenix.Router + import Phoenix.LiveView.Router + + use PhoenixAnalytics.Web, :router + + pipeline :browser do + plug :accepts, ["html"] + plug :fetch_session + plug :put_secure_browser_headers + # plug PhoenixAnalytics.Plugs.RequestTracker + end + + scope "/" do + pipe_through :browser + + live_session :default do + live "/", DevLive + end + end + + scope "/dev" do + pipe_through :browser + + phoenix_analytics_dashboard("/analytics") + end +end + +PhoenixPlayground.start( + plug: DevRouter, + endpoint_options: [ + secret_key_base: "gpaTilt0aZo38EYNrPqIA8rNGhsuysCMe8GxMps6/HZQ3xnjtIiG0UyKIHBaI+FM" + ], + open_browser: false, + child_specs: [] +) diff --git a/priv/repo/queries.exs b/priv/repo/queries.exs new file mode 100644 index 0000000..b81403c --- /dev/null +++ b/priv/repo/queries.exs @@ -0,0 +1,166 @@ +alias PhoenixAnalytics.Queries.Analytics + +{:ok, db} = Duckdbex.open("analytics.duckdb") +{:ok, conn} = Duckdbex.connection(db) + +today = Date.utc_today() +three_months_ago = today |> Date.add(-3 * 30) |> Date.beginning_of_month() + +default_to = today |> Date.to_string() |> Kernel.<>(" 23:59:59") +default_from = three_months_ago |> Date.to_string() |> Kernel.<>(" 00:00:00") + +# --- total users --- + +today = Date.utc_today() +week_ago = Date.utc_today() |> Date.add(-7) + +{:ok, result_ref} = Duckdbex.query(conn, Analytics.unique_visitors(week_ago, today)) +[[result | _] | _] = Duckdbex.fetch_all(result_ref) + +IO.inspect("Total users: #{result}") + +# --- slowest pages --- + +query = Analytics.slowest_pages(Date.utc_today() |> Date.add(-7), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +for [%{"path" => path, "duration" => duration}] <- result do + IO.inspect("Page: #{path} Speed: #{duration}") +end + +# --- slowest resources --- + +query = Analytics.slowest_resources(Date.utc_today() |> Date.add(-7), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +for [%{"path" => path, "duration" => duration}] <- result do + IO.inspect("Resource: #{path} Speed: #{duration}") +end + +# --- visits per day --- + +query = + Analytics.visits_per_period(Date.utc_today() |> Date.add(-180), Date.utc_today(), "day") + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +for [date | [visits | _]] <- result do + IO.puts("Date: #{date} Visits: #{visits}") +end + +# --- devices usage --- + +query = Analytics.devices_usage(Date.utc_today() |> Date.add(-180), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +for [device, visits | _] <- result do + IO.puts("Device: #{device} Visits: #{visits}") +end + +# --- http statuses --- + +query = + Analytics.statuses_per_period(Date.utc_today() |> Date.add(-30), Date.utc_today(), "day") + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect(result) + +for [date | [{_, oks}, {_, redirects}, {_, errors}, {_, fails} | _]] <- result do + IO.puts("Date: #{date} Oks: #{oks} Redirs: #{redirects} Errs: #{errors} Fails: #{fails}") +end + +# --- total_requests_per_period --- + +query = Analytics.total_requests_per_period(Date.utc_today() |> Date.add(-30), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +for [date, hits] <- result do + IO.inspect("date: #{date} | hits: #{hits}") +end + +# --- views per visit --- + +query = + Analytics.views_per_visit_per_period_limited( + Date.utc_today() |> Date.add(-30), + Date.utc_today() + ) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect("--- views per visit ---") + +for [date, hits | _] <- result do + IO.inspect("date: #{date} | hits: #{hits}") +end + +# --- average views per visit --- + +query = + Analytics.average_views_per_visit(Date.utc_today() |> Date.add(-30), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect("--- average views per visit ---") +IO.inspect(result) + +# --- visit duration per period --- + +query = + Analytics.visit_duration_per_period_limited( + Date.utc_today() |> Date.add(-30), + Date.utc_today() |> Date.add(1) + ) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect("--- visit duration per period ---") + +for [date, hits | _] <- result do + IO.inspect("date: #{date} | hits: #{hits}") +end + +# --- avg visit duration --- + +query = + Analytics.average_visit_duration(Date.utc_today() |> Date.add(-30), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect("--- avg visit duration ---") +IO.inspect(result) + +# --- bounce rate --- + +query = Analytics.bounce_rate(Date.utc_today() |> Date.add(-30), Date.utc_today()) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect(" --- bounce rate ---") +IO.inspect(result) + +# --- bounce rate per period --- + +query = Analytics.bounce_rate_per_period_limited(default_from, default_to) + +{:ok, result_ref} = Duckdbex.query(conn, query) +result = Duckdbex.fetch_all(result_ref) + +IO.inspect("--- bounce rate per period ---") +IO.inspect(result) diff --git a/priv/repo/seed_data.exs b/priv/repo/seed_data.exs new file mode 100644 index 0000000..0443246 --- /dev/null +++ b/priv/repo/seed_data.exs @@ -0,0 +1,116 @@ +defmodule SeedData do + alias PhoenixAnalytics.Services.Utility + @methods ["GET", "POST", "PUT", "DELETE"] + @paths [ + "/", + "/home", + "/login", + "/update-profile", + "/contact", + "/about", + "/assets/app.css", + "/assets/app.js" + ] + @user_agents [ + "Mozilla/5.0 (Linux; U; Android 9; en-us; SM-J337A Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36", + "Mozilla/5.0 (Linux; Android 11; SM-G960F Build/RP1A.200720.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1", + "Mozilla/5.0 (iPad; CPU OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0", + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15", + "Mozilla/5.0 (Linux; U; Android 8.1.0; en-us; Redmi Note 5 Build/OPM1.171019.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36", + "Mozilla/5.0 (Linux; Android 9; Pixel 2 Build/PQ3A.190801.002) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36", + "Mozilla/5.0 (iPad; CPU OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0", + "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0", + "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/16B92 Safari/605.1.15", + "Mozilla/5.0 (Linux; Android 10; SM-G981U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36", + "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko", + "Mozilla/5.0 (Linux; Android 8.0.0; SM-G935V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15", + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", + "Mozilla/5.0 (Linux; Android 11; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Mobile Safari/537.36", + "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", + "Mozilla/5.0 (Linux; Android 10; SM-G965U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Mobile Safari/537.36", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; AS; rv:11.0) like Gecko", + "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-A705FN Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Mobile Safari/537.36", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15", + "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "Mozilla/5.0 (Linux; Android 9; SM-J737T1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36", + "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8", + "Mozilla/5.0 (Linux; U; Android 10; en-US; SM-G973U Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36" + ] + + @referers [ + "https://example.com", + "https://example.com/login", + "https://example.com/profile" + ] + + def generate_request_data do + %PhoenixAnalytics.Entities.RequestLog{ + request_id: UUID.uuid4(), + method: Enum.random(@methods), + path: Enum.random(@paths), + status_code: Enum.random([200, 201, 400, 401, 403, 404, 500, 301, 302]), + duration_ms: :rand.uniform() * 1000, + user_agent: Enum.random(@user_agents), + remote_ip: Enum.random(generate_random_ips()), + referer: Enum.random(@referers), + device_type: Utility.get_device_type(Enum.random(@user_agents)), + session_id: UUID.uuid4(), + session_page_views: if(:rand.uniform() < 0.9, do: 1, else: :rand.uniform(5) + 1), + inserted_at: PhoenixAnalytics.Services.Utility.inserted_at() + } + end + + defp generate_random_ips do + for _ <- 1..10 do + "#{:rand.uniform(255)}.#{:rand.uniform(255)}.#{:rand.uniform(255)}.#{:rand.uniform(255)}" + end + end + + defp get_device_type(agent_string) do + cond do + String.contains?(agent_string, "Mobile") -> "mobile" + String.contains?(agent_string, "Pad") -> "tablet" + true -> "desktop" + end + end + + defp random_inserted_at do + now = NaiveDateTime.utc_now() + random_seconds = :rand.uniform(360 * 24 * 60 * 60) + random_time = NaiveDateTime.add(now, -random_seconds, :second) + format_timestamp(random_time) + end + + defp format_timestamp(datetime) do + datetime + |> NaiveDateTime.truncate(:millisecond) + |> NaiveDateTime.to_string() + |> String.replace("T", " ") + end + + def prepare_values(request_data) do + values = [ + UUID.uuid4(), + request_data.method, + request_data.path, + request_data.status_code, + request_data.duration_ms, + request_data.user_agent, + request_data.remote_ip, + request_data.referer, + get_device_type(request_data.user_agent), + request_data.session_id, + request_data.session_page_views, + random_inserted_at() + ] + + values + end +end diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs new file mode 100644 index 0000000..0b70c0c --- /dev/null +++ b/priv/repo/seeds.exs @@ -0,0 +1,27 @@ +# Example seed data + +Code.require_file("./priv/repo/seed_data.exs") + +PhoenixAnalytics.Migration.up() + +db_path = System.get_env("DUCK_PATH") || "analytics.duckdb" +{:ok, db} = Duckdbex.open(db_path) +{:ok, conn} = Duckdbex.connection(db) +{:ok, appender} = Duckdbex.appender(conn, "requests") + +batch_size = 1_000 + +1..1_000_000 +|> Enum.chunk_every(batch_size) +|> Enum.with_index(1) +|> Enum.each(fn {data, index} -> + prepared_data = + Task.async_stream(data, fn _ -> + SeedData.generate_request_data() |> SeedData.prepare_values() + end) + |> Enum.map(fn {:ok, result} -> result end) + + IO.inspect(label: "Chunk #{index} - Number of Records: #{index * batch_size}") + + Duckdbex.appender_add_rows(appender, prepared_data) +end) diff --git a/priv/static/assets/app.css b/priv/static/assets/app.css new file mode 100644 index 0000000..e087af5 --- /dev/null +++ b/priv/static/assets/app.css @@ -0,0 +1 @@ +/*! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}:root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 44%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 72% 51%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:0.5rem;--chart-1:221.2 83.2% 53.3%;--chart-2:212 95% 68%;--chart-3:216 92% 60%;--chart-4:210 98% 78%;--chart-5:212 97% 87%}.dark{--background:240 10% 3.9%;--foreground:0 0% 98%;--card:240 10% 3.9%;--card-foreground:0 0% 98%;--popover:240 10% 3.9%;--popover-foreground:0 0% 98%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:240 3.7% 15.9%;--muted-foreground:240 5% 64.9%;--accent:240 3.7% 15.9%;--accent-foreground:0 0% 98%;--destructive:0 72% 51%;--destructive-foreground:210 40% 98%;--border:240 3.7% 15.9%;--input:240 3.7% 15.9%;--ring:221.2 83.2% 53.3%;--chart-1:221.2 83.2% 53.3%;--chart-2:212 95% 68%;--chart-3:216 92% 60%;--chart-4:210 98% 78%;--chart-5:212 97% 87%}*{border-color:hsl(var(--border))}body{font-feature-settings:"rlig" 1,"calt" 1;background-color:hsl(var(--background));color:hsl(var(--foreground))}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{bottom:0;left:0;right:0;top:0}.-inset-y-px{bottom:-1px;top:-1px}.-left-4{left:-1rem}.-right-4{right:-1rem}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-2{top:.5rem}.top-6{top:1.5rem}.z-50{z-index:50}.-m-3{margin:-.75rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-my-4{margin-bottom:-1rem;margin-top:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-0\.5{margin-bottom:.125rem;margin-top:.125rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-20{margin-top:5rem}.mb-20,.my-20{margin-bottom:5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-10{margin-top:2.5rem}.mt-11{margin-top:2.75rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1/1}.aspect-video{aspect-ratio:16/9}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[250px\]{height:250px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[250px\]{max-height:250px}.min-h-\[6rem\]{min-height:6rem}.min-h-full{min-height:100%}.w-0{width:0}.w-1{width:.25rem}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[170px\]{width:170px}.w-\[175px\]{width:175px}.w-\[200px\]{width:200px}.w-\[276px\]{width:276px}.w-\[40rem\]{width:40rem}.w-\[72px\]{width:72px}.w-auto{width:auto}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-3xl{max-width:48rem}.max-w-screen-lg{max-width:1024px}.max-w-screen-sm{max-width:640px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem}.rotate-0{--tw-rotate:0deg}.rotate-0,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.scroll-mt-20{scroll-margin-top:5rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-zinc-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(244 244 245/var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:--color-border}.border-border\/50{border-color:hsl(var(--border)/.5)}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.bg-\[--color-bg\]{background-color:--color-bg}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-zinc-50\/90{background-color:#fafafae6}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-cyan-900{fill:#164e63}.fill-foreground{fill:hsl(var(--foreground))}.fill-muted-foreground{fill:hsl(var(--muted-foreground))}.fill-rose-900{fill:#881337}.p-0{padding:0}.p-1{padding:.25rem}.p-14{padding:3.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-20{padding-bottom:5rem;padding-top:5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.pb-0{padding-bottom:0}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[0\.8rem\]{font-size:.8rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.shadow-zinc-700\/10{--tw-shadow-color:#3f3f461a;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid #0000;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity))}.ring-zinc-700\/10{--tw-ring-color:#3f3f461a}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-40:hover{opacity:.4}.focus\:border-rose-400:focus{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.focus\:border-zinc-400:focus{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.active\:text-white\/80:active{color:#fffc}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.group:hover .group-hover\:opacity-70{opacity:.7}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent)/.5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-duration:.15s;animation-name:exit}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.dark .dark\:-rotate-90{--tw-rotate:-90deg}.dark .dark\:-rotate-90,.dark .dark\:rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark .dark\:rotate-0{--tw-rotate:0deg}.dark .dark\:scale-0{--tw-scale-x:0;--tw-scale-y:0}.dark .dark\:scale-0,.dark .dark\:scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark .dark\:scale-100{--tw-scale-x:1;--tw-scale-y:1}@media (min-width:640px){.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:w-96{width:24rem}.sm\:w-full{width:100%}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1}.sm\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:flex-row{flex-direction:row}.sm\:gap-8{gap:2rem}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:overflow-visible{overflow:visible}.sm\:rounded-l-xl{border-bottom-left-radius:.75rem;border-top-left-radius:.75rem}.sm\:rounded-r-xl{border-bottom-right-radius:.75rem;border-top-right-radius:.75rem}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-6{padding-top:1.5rem}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:gap-6{gap:1.5rem}}@media (min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-bottom:2rem;padding-top:2rem}}@media (min-width:1280px){.xl\:gap-10{gap:2.5rem}}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-bottom-left-radius:calc(var(--radius) - 2px);border-top-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-bottom-right-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent)/.5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-bottom-right-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border)/.5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid #0000;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid #0000;outline-offset:2px} \ No newline at end of file diff --git a/priv/static/assets/app.js b/priv/static/assets/app.js new file mode 100644 index 0000000..99d465c --- /dev/null +++ b/priv/static/assets/app.js @@ -0,0 +1,308 @@ +"use strict";(()=>{var EG=Object.create;var sh=Object.defineProperty;var TG=Object.getOwnPropertyDescriptor;var RG=Object.getOwnPropertyNames,ih=Object.getOwnPropertySymbols,_G=Object.getPrototypeOf,Ub=Object.prototype.hasOwnProperty,zO=Object.prototype.propertyIsEnumerable;var WO=(e,t,r)=>t in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fe=(e,t)=>{for(var r in t||={})Ub.call(t,r)&&WO(e,r,t[r]);if(ih)for(var r of ih(t))zO.call(t,r)&&WO(e,r,t[r]);return e};var Ie=(e,t)=>{var r={};for(var n in e)Ub.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ih)for(var n of ih(e))t.indexOf(n)<0&&zO.call(e,n)&&(r[n]=e[n]);return r};var M=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),MG=(e,t)=>{for(var r in t)sh(e,r,{get:t[r],enumerable:!0})},DG=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of RG(t))!Ub.call(e,a)&&a!==r&&sh(e,a,{get:()=>t[a],enumerable:!(n=TG(t,a))||n.enumerable});return e};var R=(e,t,r)=>(r=e!=null?EG(_G(e)):{},DG(t||!e||!e.__esModule?sh(r,"default",{value:e,enumerable:!0}):r,e));var Rk=M((Tk,Sh)=>{(function(e,t){"use strict";function r(){n.width=e.innerWidth,n.height=5*u.barThickness;var c=n.getContext("2d");c.shadowBlur=u.shadowBlur,c.shadowColor=u.shadowColor;var d,p=c.createLinearGradient(0,0,n.width,0);for(d in u.barColors)p.addColorStop(d,u.barColors[d]);c.lineWidth=u.barThickness,c.beginPath(),c.moveTo(0,u.barThickness/2),c.lineTo(Math.ceil(a*n.width),u.barThickness/2),c.strokeStyle=p,c.stroke()}var n,a,o,i=null,s=null,l=null,u={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},f={config:function(c){for(var d in c)u.hasOwnProperty(d)&&(u[d]=c[d])},show:function(c){var d,p;o||(c?l=l||setTimeout(()=>f.show(),c):(o=!0,s!==null&&e.cancelAnimationFrame(s),n||((p=(n=t.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",u.className&&n.classList.add(u.className),d="resize",c=r,(p=e).addEventListener?p.addEventListener(d,c,!1):p.attachEvent?p.attachEvent("on"+d,c):p["on"+d]=c),n.parentElement||t.body.appendChild(n),n.style.opacity=1,n.style.display="block",f.progress(0),u.autoRun&&function h(){i=e.requestAnimationFrame(h),f.progress("+"+.05*Math.pow(1-Math.sqrt(a),2))}()))},progress:function(c){return c===void 0||(typeof c=="string"&&(c=(0<=c.indexOf("+")||0<=c.indexOf("-")?a:0)+parseFloat(c)),a=1{"use strict";var kf=Symbol.for("react.element"),j6=Symbol.for("react.portal"),q6=Symbol.for("react.fragment"),U6=Symbol.for("react.strict_mode"),H6=Symbol.for("react.profiler"),W6=Symbol.for("react.provider"),z6=Symbol.for("react.context"),V6=Symbol.for("react.forward_ref"),$6=Symbol.for("react.suspense"),G6=Symbol.for("react.memo"),K6=Symbol.for("react.lazy"),_k=Symbol.iterator;function X6(e){return e===null||typeof e!="object"?null:(e=_k&&e[_k]||e["@@iterator"],typeof e=="function"?e:null)}var Nk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fk=Object.assign,Bk={};function Fl(e,t,r){this.props=e,this.context=t,this.refs=Bk,this.updater=r||Nk}Fl.prototype.isReactComponent={};Fl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jk(){}jk.prototype=Fl.prototype;function sw(e,t,r){this.props=e,this.context=t,this.refs=Bk,this.updater=r||Nk}var lw=sw.prototype=new jk;lw.constructor=sw;Fk(lw,Fl.prototype);lw.isPureReactComponent=!0;var Mk=Array.isArray,qk=Object.prototype.hasOwnProperty,uw={current:null},Uk={key:!0,ref:!0,__self:!0,__source:!0};function Hk(e,t,r){var n,a={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)qk.call(t,n)&&!Uk.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1{"use strict";Vk.exports=zk()});var Jk=M(Oh=>{"use strict";var tK=G(),rK=Symbol.for("react.element"),nK=Symbol.for("react.fragment"),aK=Object.prototype.hasOwnProperty,oK=tK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,iK={key:!0,ref:!0,__self:!0,__source:!0};function Yk(e,t,r){var n,a={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)aK.call(t,n)&&!iK.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:rK,type:e,key:o,ref:i,props:a,_owner:oK.current}}Oh.Fragment=nK;Oh.jsx=Yk;Oh.jsxs=Yk});var _t=M((CPe,Qk)=>{"use strict";Qk.exports=Jk()});var C1=M(Ge=>{"use strict";function xw(e,t){var r=e.length;e.push(t);e:for(;0>>1,a=e[n];if(0>>1;nRh(s,r))lRh(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(lRh(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function Rh(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(m1=performance,Ge.unstable_now=function(){return m1.now()}):(vw=Date,h1=vw.now(),Ge.unstable_now=function(){return vw.now()-h1});var m1,vw,h1,Va=[],ci=[],zK=1,Fn=null,mr=3,Dh=!1,vs=!1,Uf=!1,y1=typeof setTimeout=="function"?setTimeout:null,x1=typeof clearTimeout=="function"?clearTimeout:null,v1=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bw(e){for(var t=xa(ci);t!==null;){if(t.callback===null)Mh(ci);else if(t.startTime<=e)Mh(ci),t.sortIndex=t.expirationTime,xw(Va,t);else break;t=xa(ci)}}function ww(e){if(Uf=!1,bw(e),!vs)if(xa(Va)!==null)vs=!0,Cw(Sw);else{var t=xa(ci);t!==null&&Pw(ww,t.startTime-e)}}function Sw(e,t){vs=!1,Uf&&(Uf=!1,x1(Hf),Hf=-1),Dh=!0;var r=mr;try{for(bw(t),Fn=xa(Va);Fn!==null&&(!(Fn.expirationTime>t)||e&&!S1());){var n=Fn.callback;if(typeof n=="function"){Fn.callback=null,mr=Fn.priorityLevel;var a=n(Fn.expirationTime<=t);t=Ge.unstable_now(),typeof a=="function"?Fn.callback=a:Fn===xa(Va)&&Mh(Va),bw(t)}else Mh(Va);Fn=xa(Va)}if(Fn!==null)var o=!0;else{var i=xa(ci);i!==null&&Pw(ww,i.startTime-t),o=!1}return o}finally{Fn=null,mr=r,Dh=!1}}var Nh=!1,_h=null,Hf=-1,b1=5,w1=-1;function S1(){return!(Ge.unstable_now()-w1e||125n?(e.sortIndex=r,xw(ci,e),xa(Va)===null&&e===xa(ci)&&(Uf?(x1(Hf),Hf=-1):Uf=!0,Pw(ww,r-n))):(e.sortIndex=a,xw(Va,e),vs||Dh||(vs=!0,Cw(Sw))),e};Ge.unstable_shouldYield=S1;Ge.unstable_wrapCallback=function(e){var t=mr;return function(){var r=mr;mr=t;try{return e.apply(this,arguments)}finally{mr=r}}}});var I1=M((VPe,P1)=>{"use strict";P1.exports=C1()});var kR=M(gn=>{"use strict";var VK=G(),hn=I1();function Z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gw=Object.prototype.hasOwnProperty,$K=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,L1={},A1={};function GK(e){return Gw.call(A1,e)?!0:Gw.call(L1,e)?!1:$K.test(e)?A1[e]=!0:(L1[e]=!0,!1)}function KK(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function XK(e,t,r,n){if(t===null||typeof t>"u"||KK(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tr(e,t,r,n,a,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var tr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){tr[e]=new Tr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];tr[t]=new Tr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){tr[e]=new Tr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){tr[e]=new Tr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){tr[e]=new Tr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){tr[e]=new Tr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){tr[e]=new Tr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){tr[e]=new Tr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){tr[e]=new Tr(e,5,!1,e.toLowerCase(),null,!1,!1)});var j0=/[\-:]([a-z])/g;function q0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(j0,q0);tr[t]=new Tr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(j0,q0);tr[t]=new Tr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(j0,q0);tr[t]=new Tr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){tr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!1,!1)});tr.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){tr[e]=new Tr(e,1,!1,e.toLowerCase(),null,!0,!0)});function U0(e,t,r,n){var a=tr.hasOwnProperty(t)?tr[t]:null;(a!==null?a.type!==0:n||!(2s||a[i]!==o[s]){var l=` +`+a[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{Lw=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Jf(e):""}function YK(e){switch(e.tag){case 5:return Jf(e.type);case 16:return Jf("Lazy");case 13:return Jf("Suspense");case 19:return Jf("SuspenseList");case 0:case 2:case 15:return e=Aw(e.type,!1),e;case 11:return e=Aw(e.type.render,!1),e;case 1:return e=Aw(e.type,!0),e;default:return""}}function Jw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $l:return"Fragment";case Vl:return"Portal";case Kw:return"Profiler";case H0:return"StrictMode";case Xw:return"Suspense";case Yw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ME:return(e.displayName||"Context")+".Consumer";case _E:return(e._context.displayName||"Context")+".Provider";case W0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z0:return t=e.displayName||null,t!==null?t:Jw(e.type)||"Memo";case di:t=e._payload,e=e._init;try{return Jw(e(t))}catch{}}return null}function JK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jw(t);case 8:return t===H0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function NE(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QK(e){var t=NE(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bh(e){e._valueTracker||(e._valueTracker=QK(e))}function FE(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=NE(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function dv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qw(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function k1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Li(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function BE(e,t){t=t.checked,t!=null&&U0(e,"checked",t,!1)}function Zw(e,t){BE(e,t);var r=Li(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?e0(e,t.type,r):t.hasOwnProperty("defaultValue")&&e0(e,t.type,Li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function E1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function e0(e,t,r){(t!=="number"||dv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Qf=Array.isArray;function nu(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=jh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var td={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ZK=["Webkit","ms","Moz","O"];Object.keys(td).forEach(function(e){ZK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),td[t]=td[e]})});function HE(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||td.hasOwnProperty(e)&&td[e]?(""+t).trim():t+"px"}function WE(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=HE(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var eX=mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function n0(e,t){if(t){if(eX[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function a0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var o0=null;function V0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var i0=null,au=null,ou=null;function _1(e){if(e=kd(e)){if(typeof i0!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=qv(t),i0(e.stateNode,e.type,t))}}function zE(e){au?ou?ou.push(e):ou=[e]:au=e}function VE(){if(au){var e=au,t=ou;if(ou=au=null,_1(e),t)for(e=0;e>>=0,e===0?32:31-(fX(e)/dX|0)|0}var qh=64,Uh=4194304;function Zf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~a;s!==0?n=Zf(s):(o&=i,o!==0&&(n=Zf(o)))}else i=r&~a,i!==0?n=Zf(i):o!==0&&(n=Zf(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Ad(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pa(t),e[t]=r}function vX(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=nd),H1=String.fromCharCode(32),W1=!1;function fT(e,t){switch(e){case"keyup":return zX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gl=!1;function $X(e,t){switch(e){case"compositionend":return dT(t);case"keypress":return t.which!==32?null:(W1=!0,H1);case"textInput":return e=t.data,e===H1&&W1?null:e;default:return null}}function GX(e,t){if(Gl)return e==="compositionend"||!Z0&&fT(e,t)?(e=uT(),nv=Y0=vi=null,Gl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$1(r)}}function vT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gT(){for(var e=window,t=dv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=dv(e.document)}return t}function eS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function r9(e){var t=gT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&vT(r.ownerDocument.documentElement,r)){if(n!==null&&eS(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,o=Math.min(n.start,a);n=n.end===void 0?o:Math.min(n.end,a),!e.extend&&o>n&&(a=n,n=o,o=a),a=G1(r,o);var i=G1(r,n);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Kl=null,d0=null,od=null,p0=!1;function K1(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;p0||Kl==null||Kl!==dv(n)||(n=Kl,"selectionStart"in n&&eS(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),od&&gd(od,n)||(od=n,n=xv(d0,"onSelect"),0Jl||(e.current=x0[Jl],x0[Jl]=null,Jl--)}function Ke(e,t){Jl++,x0[Jl]=e.current,e.current=t}var Ai={},yr=ki(Ai),Qr=ki(!1),Ps=Ai;function cu(e,t){var r=e.type.contextTypes;if(!r)return Ai;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in r)a[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Zr(e){return e=e.childContextTypes,e!=null}function wv(){tt(Qr),tt(yr)}function nE(e,t,r){if(yr.current!==Ai)throw Error(Z(168));Ke(yr,t),Ke(Qr,r)}function LT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(Z(108,JK(e)||"Unknown",a));return mt({},r,n)}function Sv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ai,Ps=yr.current,Ke(yr,e),Ke(Qr,Qr.current),!0}function aE(e,t,r){var n=e.stateNode;if(!n)throw Error(Z(169));r?(e=LT(e,t,Ps),n.__reactInternalMemoizedMergedChildContext=e,tt(Qr),tt(yr),Ke(yr,e)):tt(Qr),Ke(Qr,r)}var Po=null,Uv=!1,Bw=!1;function AT(e){Po===null?Po=[e]:Po.push(e)}function d9(e){Uv=!0,AT(e)}function Ei(){if(!Bw&&Po!==null){Bw=!0;var e=0,t=je;try{var r=Po;for(je=1;e>=i,a-=i,Io=1<<32-Pa(t)+a|r<A?(_=P,P=null):_=P.sibling;var T=d(g,P,w[A],b);if(T===null){P===null&&(P=_);break}e&&P&&T.alternate===null&&t(g,P),v=o(T,v,A),S===null?y=T:S.sibling=T,S=T,P=_}if(A===w.length)return r(g,P),ot&&gs(g,A),y;if(P===null){for(;AA?(_=P,P=null):_=P.sibling;var D=d(g,P,T.value,b);if(D===null){P===null&&(P=_);break}e&&P&&D.alternate===null&&t(g,P),v=o(D,v,A),S===null?y=D:S.sibling=D,S=D,P=_}if(T.done)return r(g,P),ot&&gs(g,A),y;if(P===null){for(;!T.done;A++,T=w.next())T=c(g,T.value,b),T!==null&&(v=o(T,v,A),S===null?y=T:S.sibling=T,S=T);return ot&&gs(g,A),y}for(P=n(g,P);!T.done;A++,T=w.next())T=p(P,g,A,T.value,b),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?A:T.key),v=o(T,v,A),S===null?y=T:S.sibling=T,S=T);return e&&P.forEach(function(N){return t(g,N)}),ot&&gs(g,A),y}function x(g,v,w,b){if(typeof w=="object"&&w!==null&&w.type===$l&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Fh:e:{for(var y=w.key,S=v;S!==null;){if(S.key===y){if(y=w.type,y===$l){if(S.tag===7){r(g,S.sibling),v=a(S,w.props.children),v.return=g,g=v;break e}}else if(S.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===di&&sE(y)===S.type){r(g,S.sibling),v=a(S,w.props),v.ref=Gf(g,S,w),v.return=g,g=v;break e}r(g,S);break}else t(g,S);S=S.sibling}w.type===$l?(v=Cs(w.props.children,g.mode,b,w.key),v.return=g,g=v):(b=fv(w.type,w.key,w.props,null,g.mode,b),b.ref=Gf(g,v,w),b.return=g,g=b)}return i(g);case Vl:e:{for(S=w.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){r(g,v.sibling),v=a(v,w.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=$w(w,g.mode,b),v.return=g,g=v}return i(g);case di:return S=w._init,x(g,v,S(w._payload),b)}if(Qf(w))return h(g,v,w,b);if(Wf(w))return m(g,v,w,b);Qh(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(r(g,v.sibling),v=a(v,w),v.return=g,g=v):(r(g,v),v=Vw(w,g.mode,b),v.return=g,g=v),i(g)):r(g,v)}return x}var du=TT(!0),RT=TT(!1),Iv=ki(null),Lv=null,eu=null,aS=null;function oS(){aS=eu=Lv=null}function iS(e){var t=Iv.current;tt(Iv),e._currentValue=t}function S0(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function su(e,t){Lv=e,aS=eu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jr=!0),e.firstContext=null)}function Hn(e){var t=e._currentValue;if(aS!==e)if(e={context:e,memoizedValue:t,next:null},eu===null){if(Lv===null)throw Error(Z(308));eu=e,Lv.dependencies={lanes:0,firstContext:e}}else eu=eu.next=e;return t}var bs=null;function sS(e){bs===null?bs=[e]:bs.push(e)}function _T(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,sS(t)):(r.next=a.next,a.next=r),t.interleaved=r,Eo(e,n)}function Eo(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var pi=!1;function lS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function MT(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Si(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Oe&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Eo(e,r)}return a=n.interleaved,a===null?(t.next=t,sS(n)):(t.next=a.next,a.next=t),n.interleaved=t,Eo(e,r)}function ov(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,G0(e,r)}}function lE(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?a=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?a=o=t:o=o.next=t}else a=o=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Av(e,t,r,n){var a=e.updateQueue;pi=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==i&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(o!==null){var c=a.baseState;i=0,f=u=l=null,s=o;do{var d=s.lane,p=s.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(d=t,p=r,m.tag){case 1:if(h=m.payload,typeof h=="function"){c=h.call(p,c,d);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,d=typeof h=="function"?h.call(p,c,d):h,d==null)break e;c=mt({},c,d);break e;case 2:pi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=a.effects,d===null?a.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=p,l=c):f=f.next=p,i|=d;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;d=s,s=d.next,d.next=null,a.lastBaseUpdate=d,a.shared.pending=null}}while(1);if(f===null&&(l=c),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=f,t=a.shared.interleaved,t!==null){a=t;do i|=a.lane,a=a.next;while(a!==t)}else o===null&&(a.shared.lanes=0);As|=i,e.lanes=i,e.memoizedState=c}}function uE(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=qw.transition;qw.transition={};try{e(!1),t()}finally{je=r,qw.transition=n}}function JT(){return Wn().memoizedState}function v9(e,t,r){var n=Pi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},QT(e))ZT(t,r);else if(r=_T(e,t,r,n),r!==null){var a=Er();Ia(r,e,n,a),eR(r,t,n)}}function g9(e,t,r){var n=Pi(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(QT(e))ZT(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,r);if(a.hasEagerState=!0,a.eagerState=s,La(s,i)){var l=t.interleaved;l===null?(a.next=a,sS(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=_T(e,t,a,n),r!==null&&(a=Er(),Ia(r,e,n,a),eR(r,t,n))}}function QT(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function ZT(e,t){id=kv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function eR(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,G0(e,r)}}var Ev={readContext:Hn,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},y9={readContext:Hn,useCallback:function(e,t){return Ga().memoizedState=[e,t===void 0?null:t],e},useContext:Hn,useEffect:fE,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,sv(4194308,4,$T.bind(null,t,e),r)},useLayoutEffect:function(e,t){return sv(4194308,4,e,t)},useInsertionEffect:function(e,t){return sv(4,2,e,t)},useMemo:function(e,t){var r=Ga();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ga();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=v9.bind(null,pt,e),[n.memoizedState,e]},useRef:function(e){var t=Ga();return e={current:e},t.memoizedState=e},useState:cE,useDebugValue:vS,useDeferredValue:function(e){return Ga().memoizedState=e},useTransition:function(){var e=cE(!1),t=e[0];return e=h9.bind(null,e[1]),Ga().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pt,a=Ga();if(ot){if(r===void 0)throw Error(Z(407));r=r()}else{if(r=t(),Wt===null)throw Error(Z(349));Ls&30||BT(n,t,r)}a.memoizedState=r;var o={value:r,getSnapshot:t};return a.queue=o,fE(qT.bind(null,n,o,e),[e]),n.flags|=2048,Id(9,jT.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Ga(),t=Wt.identifierPrefix;if(ot){var r=Lo,n=Io;r=(n&~(1<<32-Pa(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Ka]=t,e[bd]=n,cR(e,t,!1,!1),t.stateNode=e;e:{switch(i=a0(r,n),r){case"dialog":et("cancel",e),et("close",e),a=n;break;case"iframe":case"object":case"embed":et("load",e),a=n;break;case"video":case"audio":for(a=0;ahu&&(t.flags|=128,n=!0,Kf(o,!1),t.lanes=4194304)}else{if(!n)if(e=Ov(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Kf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ot)return vr(t),null}else 2*St()-o.renderingStartTime>hu&&r!==1073741824&&(t.flags|=128,n=!0,Kf(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=St(),t.sibling=null,r=dt.current,Ke(dt,n?r&1|2:r&1),t):(vr(t),null);case 22:case 23:return SS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?dn&1073741824&&(vr(t),t.subtreeFlags&6&&(t.flags|=8192)):vr(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function L9(e,t){switch(rS(t),t.tag){case 1:return Zr(t.type)&&wv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pu(),tt(Qr),tt(yr),fS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cS(t),null;case 13:if(tt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));fu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(dt),null;case 4:return pu(),null;case 10:return iS(t.type._context),null;case 22:case 23:return SS(),null;case 24:return null;default:return null}}var ev=!1,gr=!1,A9=typeof WeakSet=="function"?WeakSet:Set,oe=null;function tu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){xt(e,t,n)}else r.current=null}function T0(e,t,r){try{r()}catch(n){xt(e,t,n)}}var SE=!1;function O9(e,t){if(m0=gv,e=gT(),eS(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||a!==0&&c.nodeType!==3||(s=i+a),c!==o||n!==0&&c.nodeType!==3||(l=i+n),c.nodeType===3&&(i+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++u===a&&(s=i),d===o&&++f===n&&(l=i),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(h0={focusedElem:e,selectionRange:r},gv=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:wa(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(b){xt(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return h=SE,SE=!1,h}function sd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&T0(t,r,o)}a=a.next}while(a!==n)}}function zv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function R0(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function pR(e){var t=e.alternate;t!==null&&(e.alternate=null,pR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ka],delete t[bd],delete t[y0],delete t[c9],delete t[f9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mR(e){return e.tag===5||e.tag===3||e.tag===4}function CE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=bv));else if(n!==4&&(e=e.child,e!==null))for(_0(e,t,r),e=e.sibling;e!==null;)_0(e,t,r),e=e.sibling}function M0(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(M0(e,t,r),e=e.sibling;e!==null;)M0(e,t,r),e=e.sibling}var Zt=null,Sa=!1;function fi(e,t,r){for(r=r.child;r!==null;)hR(e,t,r),r=r.sibling}function hR(e,t,r){if(Xa&&typeof Xa.onCommitFiberUnmount=="function")try{Xa.onCommitFiberUnmount(Nv,r)}catch{}switch(r.tag){case 5:gr||tu(r,t);case 6:var n=Zt,a=Sa;Zt=null,fi(e,t,r),Zt=n,Sa=a,Zt!==null&&(Sa?(e=Zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Zt.removeChild(r.stateNode));break;case 18:Zt!==null&&(Sa?(e=Zt,r=r.stateNode,e.nodeType===8?Fw(e.parentNode,r):e.nodeType===1&&Fw(e,r),hd(e)):Fw(Zt,r.stateNode));break;case 4:n=Zt,a=Sa,Zt=r.stateNode.containerInfo,Sa=!0,fi(e,t,r),Zt=n,Sa=a;break;case 0:case 11:case 14:case 15:if(!gr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var o=a,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&T0(r,t,i),a=a.next}while(a!==n)}fi(e,t,r);break;case 1:if(!gr&&(tu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){xt(r,t,s)}fi(e,t,r);break;case 21:fi(e,t,r);break;case 22:r.mode&1?(gr=(n=gr)||r.memoizedState!==null,fi(e,t,r),gr=n):fi(e,t,r);break;default:fi(e,t,r)}}function PE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new A9),t.forEach(function(n){var a=F9.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function ba(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=i),n&=~o}if(n=a,n=St()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*E9(n/1960))-n,10e?16:e,gi===null)var n=!1;else{if(e=gi,gi=null,_v=0,Oe&6)throw Error(Z(331));var a=Oe;for(Oe|=4,oe=e.current;oe!==null;){var o=oe,i=o.child;if(oe.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lSt()-bS?Ss(e,0):xS|=r),en(e,t)}function CR(e,t){t===0&&(e.mode&1?(t=Uh,Uh<<=1,!(Uh&130023424)&&(Uh=4194304)):t=1);var r=Er();e=Eo(e,t),e!==null&&(Ad(e,t,r),en(e,r))}function N9(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),CR(e,r)}function F9(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Z(314))}n!==null&&n.delete(t),CR(e,r)}var PR;PR=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qr.current)Jr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Jr=!1,P9(e,t,r);Jr=!!(e.flags&131072)}else Jr=!1,ot&&t.flags&1048576&&OT(t,Pv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;lv(e,t),e=t.pendingProps;var a=cu(t,yr.current);su(t,r),a=pS(null,t,n,e,a,r);var o=mS();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Zr(n)?(o=!0,Sv(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,lS(t),a.updater=Wv,t.stateNode=a,a._reactInternals=t,P0(t,n,e,r),t=A0(null,t,n,!0,o,r)):(t.tag=0,ot&&o&&tS(t),kr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(lv(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=j9(n),e=wa(n,e),a){case 0:t=L0(null,t,n,e,r);break e;case 1:t=xE(null,t,n,e,r);break e;case 11:t=gE(null,t,n,e,r);break e;case 14:t=yE(null,t,n,wa(n.type,e),r);break e}throw Error(Z(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:wa(n,a),L0(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:wa(n,a),xE(e,t,n,a,r);case 3:e:{if(sR(t),e===null)throw Error(Z(387));n=t.pendingProps,o=t.memoizedState,a=o.element,MT(e,t),Av(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=mu(Error(Z(423)),t),t=bE(e,t,n,r,a);break e}else if(n!==a){a=mu(Error(Z(424)),t),t=bE(e,t,n,r,a);break e}else for(pn=wi(t.stateNode.containerInfo.firstChild),mn=t,ot=!0,Ca=null,r=RT(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(fu(),n===a){t=To(e,t,r);break e}kr(e,t,n,r)}t=t.child}return t;case 5:return DT(t),e===null&&w0(t),n=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,i=a.children,v0(n,a)?i=null:o!==null&&v0(n,o)&&(t.flags|=32),iR(e,t),kr(e,t,i,r),t.child;case 6:return e===null&&w0(t),null;case 13:return lR(e,t,r);case 4:return uS(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=du(t,null,n,r):kr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:wa(n,a),gE(e,t,n,a,r);case 7:return kr(e,t,t.pendingProps,r),t.child;case 8:return kr(e,t,t.pendingProps.children,r),t.child;case 12:return kr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,Ke(Iv,n._currentValue),n._currentValue=i,o!==null)if(La(o.value,i)){if(o.children===a.children&&!Qr.current){t=To(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Ao(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),S0(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(Z(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),S0(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}kr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,su(t,r),a=Hn(a),n=n(a),t.flags|=1,kr(e,t,n,r),t.child;case 14:return n=t.type,a=wa(n,t.pendingProps),a=wa(n.type,a),yE(e,t,n,a,r);case 15:return aR(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:wa(n,a),lv(e,t),t.tag=1,Zr(n)?(e=!0,Sv(t)):e=!1,su(t,r),tR(t,n,a),P0(t,n,a,r),A0(null,t,n,!0,e,r);case 19:return uR(e,t,r);case 22:return oR(e,t,r)}throw Error(Z(156,t.tag))};function IR(e,t){return QE(e,t)}function B9(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(e,t,r,n){return new B9(e,t,r,n)}function PS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j9(e){if(typeof e=="function")return PS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W0)return 11;if(e===z0)return 14}return 2}function Ii(e,t){var r=e.alternate;return r===null?(r=qn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function fv(e,t,r,n,a,o){var i=2;if(n=e,typeof e=="function")PS(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $l:return Cs(r.children,a,o,t);case H0:i=8,a|=8;break;case Kw:return e=qn(12,r,t,a|2),e.elementType=Kw,e.lanes=o,e;case Xw:return e=qn(13,r,t,a),e.elementType=Xw,e.lanes=o,e;case Yw:return e=qn(19,r,t,a),e.elementType=Yw,e.lanes=o,e;case DE:return $v(r,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _E:i=10;break e;case ME:i=9;break e;case W0:i=11;break e;case z0:i=14;break e;case di:i=16,n=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=qn(i,r,t,a),t.elementType=e,t.type=n,t.lanes=o,t}function Cs(e,t,r,n){return e=qn(7,e,n,t),e.lanes=r,e}function $v(e,t,r,n){return e=qn(22,e,n,t),e.elementType=DE,e.lanes=r,e.stateNode={isHidden:!1},e}function Vw(e,t,r){return e=qn(6,e,null,t),e.lanes=r,e}function $w(e,t,r){return t=qn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function q9(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kw(0),this.expirationTimes=kw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kw(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function IS(e,t,r,n,a,o,i,s,l){return e=new q9(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},lS(o),e}function U9(e,t,r){var n=3{"use strict";function ER(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ER)}catch(e){console.error(e)}}ER(),TR.exports=kR()});var Dr=M((J1e,mN)=>{var fQ=Array.isArray;mN.exports=fQ});var _C=M((Q1e,hN)=>{var dQ=typeof global=="object"&&global&&global.Object===Object&&global;hN.exports=dQ});var ka=M((Z1e,vN)=>{var pQ=_C(),mQ=typeof self=="object"&&self&&self.Object===Object&&self,hQ=pQ||mQ||Function("return this")();vN.exports=hQ});var Fu=M((eEe,gN)=>{var vQ=ka(),gQ=vQ.Symbol;gN.exports=gQ});var wN=M((tEe,bN)=>{var yN=Fu(),xN=Object.prototype,yQ=xN.hasOwnProperty,xQ=xN.toString,Xd=yN?yN.toStringTag:void 0;function bQ(e){var t=yQ.call(e,Xd),r=e[Xd];try{e[Xd]=void 0;var n=!0}catch{}var a=xQ.call(e);return n&&(t?e[Xd]=r:delete e[Xd]),a}bN.exports=bQ});var CN=M((rEe,SN)=>{var wQ=Object.prototype,SQ=wQ.toString;function CQ(e){return SQ.call(e)}SN.exports=CQ});var to=M((nEe,LN)=>{var PN=Fu(),PQ=wN(),IQ=CN(),LQ="[object Null]",AQ="[object Undefined]",IN=PN?PN.toStringTag:void 0;function OQ(e){return e==null?e===void 0?AQ:LQ:IN&&IN in Object(e)?PQ(e):IQ(e)}LN.exports=OQ});var ro=M((aEe,AN)=>{function kQ(e){return e!=null&&typeof e=="object"}AN.exports=kQ});var Ks=M((oEe,ON)=>{var EQ=to(),TQ=ro(),RQ="[object Symbol]";function _Q(e){return typeof e=="symbol"||TQ(e)&&EQ(e)==RQ}ON.exports=_Q});var Fg=M((iEe,kN)=>{var MQ=Dr(),DQ=Ks(),NQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQ=/^\w*$/;function BQ(e,t){if(MQ(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||DQ(e)?!0:FQ.test(e)||!NQ.test(e)||t!=null&&e in Object(t)}kN.exports=BQ});var Yn=M((sEe,EN)=>{function jQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}EN.exports=jQ});var it=M((lEe,TN)=>{var qQ=to(),UQ=Yn(),HQ="[object AsyncFunction]",WQ="[object Function]",zQ="[object GeneratorFunction]",VQ="[object Proxy]";function $Q(e){if(!UQ(e))return!1;var t=qQ(e);return t==WQ||t==zQ||t==HQ||t==VQ}TN.exports=$Q});var _N=M((uEe,RN)=>{var GQ=ka(),KQ=GQ["__core-js_shared__"];RN.exports=KQ});var NN=M((cEe,DN)=>{var MC=_N(),MN=function(){var e=/[^.]+$/.exec(MC&&MC.keys&&MC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function XQ(e){return!!MN&&MN in e}DN.exports=XQ});var DC=M((fEe,FN)=>{var YQ=Function.prototype,JQ=YQ.toString;function QQ(e){if(e!=null){try{return JQ.call(e)}catch{}try{return e+""}catch{}}return""}FN.exports=QQ});var jN=M((dEe,BN)=>{var ZQ=it(),eZ=NN(),tZ=Yn(),rZ=DC(),nZ=/[\\^$.*+?()[\]{}|]/g,aZ=/^\[object .+?Constructor\]$/,oZ=Function.prototype,iZ=Object.prototype,sZ=oZ.toString,lZ=iZ.hasOwnProperty,uZ=RegExp("^"+sZ.call(lZ).replace(nZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cZ(e){if(!tZ(e)||eZ(e))return!1;var t=ZQ(e)?uZ:aZ;return t.test(rZ(e))}BN.exports=cZ});var UN=M((pEe,qN)=>{function fZ(e,t){return e?.[t]}qN.exports=fZ});var Fi=M((mEe,HN)=>{var dZ=jN(),pZ=UN();function mZ(e,t){var r=pZ(e,t);return dZ(r)?r:void 0}HN.exports=mZ});var Yd=M((hEe,WN)=>{var hZ=Fi(),vZ=hZ(Object,"create");WN.exports=vZ});var $N=M((vEe,VN)=>{var zN=Yd();function gZ(){this.__data__=zN?zN(null):{},this.size=0}VN.exports=gZ});var KN=M((gEe,GN)=>{function yZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}GN.exports=yZ});var YN=M((yEe,XN)=>{var xZ=Yd(),bZ="__lodash_hash_undefined__",wZ=Object.prototype,SZ=wZ.hasOwnProperty;function CZ(e){var t=this.__data__;if(xZ){var r=t[e];return r===bZ?void 0:r}return SZ.call(t,e)?t[e]:void 0}XN.exports=CZ});var QN=M((xEe,JN)=>{var PZ=Yd(),IZ=Object.prototype,LZ=IZ.hasOwnProperty;function AZ(e){var t=this.__data__;return PZ?t[e]!==void 0:LZ.call(t,e)}JN.exports=AZ});var e2=M((bEe,ZN)=>{var OZ=Yd(),kZ="__lodash_hash_undefined__";function EZ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=OZ&&t===void 0?kZ:t,this}ZN.exports=EZ});var r2=M((wEe,t2)=>{var TZ=$N(),RZ=KN(),_Z=YN(),MZ=QN(),DZ=e2();function Bu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{function NZ(){this.__data__=[],this.size=0}n2.exports=NZ});var Bg=M((CEe,o2)=>{function FZ(e,t){return e===t||e!==e&&t!==t}o2.exports=FZ});var Jd=M((PEe,i2)=>{var BZ=Bg();function jZ(e,t){for(var r=e.length;r--;)if(BZ(e[r][0],t))return r;return-1}i2.exports=jZ});var l2=M((IEe,s2)=>{var qZ=Jd(),UZ=Array.prototype,HZ=UZ.splice;function WZ(e){var t=this.__data__,r=qZ(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HZ.call(t,r,1),--this.size,!0}s2.exports=WZ});var c2=M((LEe,u2)=>{var zZ=Jd();function VZ(e){var t=this.__data__,r=zZ(t,e);return r<0?void 0:t[r][1]}u2.exports=VZ});var d2=M((AEe,f2)=>{var $Z=Jd();function GZ(e){return $Z(this.__data__,e)>-1}f2.exports=GZ});var m2=M((OEe,p2)=>{var KZ=Jd();function XZ(e,t){var r=this.__data__,n=KZ(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}p2.exports=XZ});var Qd=M((kEe,h2)=>{var YZ=a2(),JZ=l2(),QZ=c2(),ZZ=d2(),eee=m2();function ju(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var tee=Fi(),ree=ka(),nee=tee(ree,"Map");v2.exports=nee});var x2=M((TEe,y2)=>{var g2=r2(),aee=Qd(),oee=jg();function iee(){this.size=0,this.__data__={hash:new g2,map:new(oee||aee),string:new g2}}y2.exports=iee});var w2=M((REe,b2)=>{function see(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}b2.exports=see});var Zd=M((_Ee,S2)=>{var lee=w2();function uee(e,t){var r=e.__data__;return lee(t)?r[typeof t=="string"?"string":"hash"]:r.map}S2.exports=uee});var P2=M((MEe,C2)=>{var cee=Zd();function fee(e){var t=cee(this,e).delete(e);return this.size-=t?1:0,t}C2.exports=fee});var L2=M((DEe,I2)=>{var dee=Zd();function pee(e){return dee(this,e).get(e)}I2.exports=pee});var O2=M((NEe,A2)=>{var mee=Zd();function hee(e){return mee(this,e).has(e)}A2.exports=hee});var E2=M((FEe,k2)=>{var vee=Zd();function gee(e,t){var r=vee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}k2.exports=gee});var qg=M((BEe,T2)=>{var yee=x2(),xee=P2(),bee=L2(),wee=O2(),See=E2();function qu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var R2=qg(),Cee="Expected a function";function NC(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Cee);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(NC.Cache||R2),r}NC.Cache=R2;_2.exports=NC});var D2=M((qEe,M2)=>{var Pee=FC(),Iee=500;function Lee(e){var t=Pee(e,function(n){return r.size===Iee&&r.clear(),n}),r=t.cache;return t}M2.exports=Lee});var F2=M((UEe,N2)=>{var Aee=D2(),Oee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kee=/\\(\\)?/g,Eee=Aee(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Oee,function(r,n,a,o){t.push(a?o.replace(kee,"$1"):n||r)}),t});N2.exports=Eee});var Ug=M((HEe,B2)=>{function Tee(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r{var j2=Fu(),Ree=Ug(),_ee=Dr(),Mee=Ks(),Dee=1/0,q2=j2?j2.prototype:void 0,U2=q2?q2.toString:void 0;function H2(e){if(typeof e=="string")return e;if(_ee(e))return Ree(e,H2)+"";if(Mee(e))return U2?U2.call(e):"";var t=e+"";return t=="0"&&1/e==-Dee?"-0":t}W2.exports=H2});var BC=M((zEe,V2)=>{var Nee=z2();function Fee(e){return e==null?"":Nee(e)}V2.exports=Fee});var jC=M((VEe,$2)=>{var Bee=Dr(),jee=Fg(),qee=F2(),Uee=BC();function Hee(e,t){return Bee(e)?e:jee(e,t)?[e]:qee(Uee(e))}$2.exports=Hee});var ep=M(($Ee,G2)=>{var Wee=Ks(),zee=1/0;function Vee(e){if(typeof e=="string"||Wee(e))return e;var t=e+"";return t=="0"&&1/e==-zee?"-0":t}G2.exports=Vee});var Hg=M((GEe,K2)=>{var $ee=jC(),Gee=ep();function Kee(e,t){t=$ee(t,e);for(var r=0,n=t.length;e!=null&&r{var Xee=Hg();function Yee(e,t,r){var n=e==null?void 0:Xee(e,t);return n===void 0?r:n}X2.exports=Yee});var Jn=M((XEe,Y2)=>{function Jee(e){return e==null}Y2.exports=Jee});var Wg=M((YEe,J2)=>{var Qee=to(),Zee=Dr(),ete=ro(),tte="[object String]";function rte(e){return typeof e=="string"||!Zee(e)&&ete(e)&&Qee(e)==tte}J2.exports=rte});var Z2=M(qe=>{"use strict";var $t=typeof Symbol=="function"&&Symbol.for,qC=$t?Symbol.for("react.element"):60103,UC=$t?Symbol.for("react.portal"):60106,zg=$t?Symbol.for("react.fragment"):60107,Vg=$t?Symbol.for("react.strict_mode"):60108,$g=$t?Symbol.for("react.profiler"):60114,Gg=$t?Symbol.for("react.provider"):60109,Kg=$t?Symbol.for("react.context"):60110,HC=$t?Symbol.for("react.async_mode"):60111,Xg=$t?Symbol.for("react.concurrent_mode"):60111,Yg=$t?Symbol.for("react.forward_ref"):60112,Jg=$t?Symbol.for("react.suspense"):60113,nte=$t?Symbol.for("react.suspense_list"):60120,Qg=$t?Symbol.for("react.memo"):60115,Zg=$t?Symbol.for("react.lazy"):60116,ate=$t?Symbol.for("react.block"):60121,ote=$t?Symbol.for("react.fundamental"):60117,ite=$t?Symbol.for("react.responder"):60118,ste=$t?Symbol.for("react.scope"):60119;function bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case qC:switch(e=e.type,e){case HC:case Xg:case zg:case $g:case Vg:case Jg:return e;default:switch(e=e&&e.$$typeof,e){case Kg:case Yg:case Zg:case Qg:case Gg:return e;default:return t}}case UC:return t}}}function Q2(e){return bn(e)===Xg}qe.AsyncMode=HC;qe.ConcurrentMode=Xg;qe.ContextConsumer=Kg;qe.ContextProvider=Gg;qe.Element=qC;qe.ForwardRef=Yg;qe.Fragment=zg;qe.Lazy=Zg;qe.Memo=Qg;qe.Portal=UC;qe.Profiler=$g;qe.StrictMode=Vg;qe.Suspense=Jg;qe.isAsyncMode=function(e){return Q2(e)||bn(e)===HC};qe.isConcurrentMode=Q2;qe.isContextConsumer=function(e){return bn(e)===Kg};qe.isContextProvider=function(e){return bn(e)===Gg};qe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===qC};qe.isForwardRef=function(e){return bn(e)===Yg};qe.isFragment=function(e){return bn(e)===zg};qe.isLazy=function(e){return bn(e)===Zg};qe.isMemo=function(e){return bn(e)===Qg};qe.isPortal=function(e){return bn(e)===UC};qe.isProfiler=function(e){return bn(e)===$g};qe.isStrictMode=function(e){return bn(e)===Vg};qe.isSuspense=function(e){return bn(e)===Jg};qe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zg||e===Xg||e===$g||e===Vg||e===Jg||e===nte||typeof e=="object"&&e!==null&&(e.$$typeof===Zg||e.$$typeof===Qg||e.$$typeof===Gg||e.$$typeof===Kg||e.$$typeof===Yg||e.$$typeof===ote||e.$$typeof===ite||e.$$typeof===ste||e.$$typeof===ate)};qe.typeOf=bn});var WC=M((QEe,eF)=>{"use strict";eF.exports=Z2()});var zC=M((ZEe,tF)=>{var lte=to(),ute=ro(),cte="[object Number]";function fte(e){return typeof e=="number"||ute(e)&<e(e)==cte}tF.exports=fte});var ey=M((eTe,rF)=>{var dte=zC();function pte(e){return dte(e)&&e!=+e}rF.exports=pte});var wF=M((hTe,bF)=>{function Ete(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(a);++n{var Tte=wF();function Rte(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Tte(e,t,r)}SF.exports=Rte});var nP=M((gTe,PF)=>{var _te="\\ud800-\\udfff",Mte="\\u0300-\\u036f",Dte="\\ufe20-\\ufe2f",Nte="\\u20d0-\\u20ff",Fte=Mte+Dte+Nte,Bte="\\ufe0e\\ufe0f",jte="\\u200d",qte=RegExp("["+jte+_te+Fte+Bte+"]");function Ute(e){return qte.test(e)}PF.exports=Ute});var LF=M((yTe,IF)=>{function Hte(e){return e.split("")}IF.exports=Hte});var MF=M((xTe,_F)=>{var AF="\\ud800-\\udfff",Wte="\\u0300-\\u036f",zte="\\ufe20-\\ufe2f",Vte="\\u20d0-\\u20ff",$te=Wte+zte+Vte,Gte="\\ufe0e\\ufe0f",Kte="["+AF+"]",aP="["+$te+"]",oP="\\ud83c[\\udffb-\\udfff]",Xte="(?:"+aP+"|"+oP+")",OF="[^"+AF+"]",kF="(?:\\ud83c[\\udde6-\\uddff]){2}",EF="[\\ud800-\\udbff][\\udc00-\\udfff]",Yte="\\u200d",TF=Xte+"?",RF="["+Gte+"]?",Jte="(?:"+Yte+"(?:"+[OF,kF,EF].join("|")+")"+RF+TF+")*",Qte=RF+TF+Jte,Zte="(?:"+[OF+aP+"?",aP,kF,EF,Kte].join("|")+")",ere=RegExp(oP+"(?="+oP+")|"+Zte+Qte,"g");function tre(e){return e.match(ere)||[]}_F.exports=tre});var NF=M((bTe,DF)=>{var rre=LF(),nre=nP(),are=MF();function ore(e){return nre(e)?are(e):rre(e)}DF.exports=ore});var BF=M((wTe,FF)=>{var ire=CF(),sre=nP(),lre=NF(),ure=BC();function cre(e){return function(t){t=ure(t);var r=sre(t)?lre(t):void 0,n=r?r[0]:t.charAt(0),a=r?ire(r,1).join(""):t.slice(1);return n[e]()+a}}FF.exports=cre});var iy=M((STe,jF)=>{var fre=BF(),dre=fre("toUpperCase");jF.exports=dre});var fB=M((P_e,cB)=>{var Ure=Qd();function Hre(){this.__data__=new Ure,this.size=0}cB.exports=Hre});var pB=M((I_e,dB)=>{function Wre(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}dB.exports=Wre});var hB=M((L_e,mB)=>{function zre(e){return this.__data__.get(e)}mB.exports=zre});var gB=M((A_e,vB)=>{function Vre(e){return this.__data__.has(e)}vB.exports=Vre});var xB=M((O_e,yB)=>{var $re=Qd(),Gre=jg(),Kre=qg(),Xre=200;function Yre(e,t){var r=this.__data__;if(r instanceof $re){var n=r.__data__;if(!Gre||n.length{var Jre=Qd(),Qre=fB(),Zre=pB(),ene=hB(),tne=gB(),rne=xB();function Zu(e){var t=this.__data__=new Jre(e);this.size=t.size}Zu.prototype.clear=Qre;Zu.prototype.delete=Zre;Zu.prototype.get=ene;Zu.prototype.has=tne;Zu.prototype.set=rne;bB.exports=Zu});var SB=M((E_e,wB)=>{var nne="__lodash_hash_undefined__";function ane(e){return this.__data__.set(e,nne),this}wB.exports=ane});var PB=M((T_e,CB)=>{function one(e){return this.__data__.has(e)}CB.exports=one});var qP=M((R_e,IB)=>{var ine=qg(),sne=SB(),lne=PB();function hy(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ine;++t{function une(e,t){for(var r=-1,n=e==null?0:e.length;++r{function cne(e,t){return e.has(t)}AB.exports=cne});var WP=M((D_e,OB)=>{var fne=qP(),dne=UP(),pne=HP(),mne=1,hne=2;function vne(e,t,r,n,a,o){var i=r&mne,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,p=r&hne?new fne:void 0;for(o.set(e,t),o.set(t,e);++c{var gne=ka(),yne=gne.Uint8Array;kB.exports=yne});var RB=M((F_e,TB)=>{function xne(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}TB.exports=xne});var vy=M((B_e,_B)=>{function bne(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}_B.exports=bne});var BB=M((j_e,FB)=>{var MB=Fu(),DB=EB(),wne=Bg(),Sne=WP(),Cne=RB(),Pne=vy(),Ine=1,Lne=2,Ane="[object Boolean]",One="[object Date]",kne="[object Error]",Ene="[object Map]",Tne="[object Number]",Rne="[object RegExp]",_ne="[object Set]",Mne="[object String]",Dne="[object Symbol]",Nne="[object ArrayBuffer]",Fne="[object DataView]",NB=MB?MB.prototype:void 0,zP=NB?NB.valueOf:void 0;function Bne(e,t,r,n,a,o,i){switch(r){case Fne:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Nne:return!(e.byteLength!=t.byteLength||!o(new DB(e),new DB(t)));case Ane:case One:case Tne:return wne(+e,+t);case kne:return e.name==t.name&&e.message==t.message;case Rne:case Mne:return e==t+"";case Ene:var s=Cne;case _ne:var l=n&Ine;if(s||(s=Pne),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;n|=Lne,i.set(e,t);var f=Sne(s(e),s(t),n,a,o,i);return i.delete(e),f;case Dne:if(zP)return zP.call(e)==zP.call(t)}return!1}FB.exports=Bne});var VP=M((q_e,jB)=>{function jne(e,t){for(var r=-1,n=t.length,a=e.length;++r{var qne=VP(),Une=Dr();function Hne(e,t,r){var n=t(e);return Une(e)?n:qne(n,r(e))}qB.exports=Hne});var WB=M((H_e,HB)=>{function Wne(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r{function zne(){return[]}zB.exports=zne});var KB=M((z_e,GB)=>{var Vne=WB(),$ne=VB(),Gne=Object.prototype,Kne=Gne.propertyIsEnumerable,$B=Object.getOwnPropertySymbols,Xne=$B?function(e){return e==null?[]:(e=Object(e),Vne($B(e),function(t){return Kne.call(e,t)}))}:$ne;GB.exports=Xne});var YB=M((V_e,XB)=>{function Yne(e,t){for(var r=-1,n=Array(e);++r{var Jne=to(),Qne=ro(),Zne="[object Arguments]";function eae(e){return Qne(e)&&Jne(e)==Zne}JB.exports=eae});var gy=M((G_e,tj)=>{var ZB=QB(),tae=ro(),ej=Object.prototype,rae=ej.hasOwnProperty,nae=ej.propertyIsEnumerable,aae=ZB(function(){return arguments}())?ZB:function(e){return tae(e)&&rae.call(e,"callee")&&!nae.call(e,"callee")};tj.exports=aae});var nj=M((K_e,rj)=>{function oae(){return!1}rj.exports=oae});var $P=M((sp,ec)=>{var iae=ka(),sae=nj(),ij=typeof sp=="object"&&sp&&!sp.nodeType&&sp,aj=ij&&typeof ec=="object"&&ec&&!ec.nodeType&&ec,lae=aj&&aj.exports===ij,oj=lae?iae.Buffer:void 0,uae=oj?oj.isBuffer:void 0,cae=uae||sae;ec.exports=cae});var yy=M((X_e,sj)=>{var fae=9007199254740991,dae=/^(?:0|[1-9]\d*)$/;function pae(e,t){var r=typeof e;return t=t??fae,!!t&&(r=="number"||r!="symbol"&&dae.test(e))&&e>-1&&e%1==0&&e{var mae=9007199254740991;function hae(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mae}lj.exports=hae});var cj=M((J_e,uj)=>{var vae=to(),gae=xy(),yae=ro(),xae="[object Arguments]",bae="[object Array]",wae="[object Boolean]",Sae="[object Date]",Cae="[object Error]",Pae="[object Function]",Iae="[object Map]",Lae="[object Number]",Aae="[object Object]",Oae="[object RegExp]",kae="[object Set]",Eae="[object String]",Tae="[object WeakMap]",Rae="[object ArrayBuffer]",_ae="[object DataView]",Mae="[object Float32Array]",Dae="[object Float64Array]",Nae="[object Int8Array]",Fae="[object Int16Array]",Bae="[object Int32Array]",jae="[object Uint8Array]",qae="[object Uint8ClampedArray]",Uae="[object Uint16Array]",Hae="[object Uint32Array]",nt={};nt[Mae]=nt[Dae]=nt[Nae]=nt[Fae]=nt[Bae]=nt[jae]=nt[qae]=nt[Uae]=nt[Hae]=!0;nt[xae]=nt[bae]=nt[Rae]=nt[wae]=nt[_ae]=nt[Sae]=nt[Cae]=nt[Pae]=nt[Iae]=nt[Lae]=nt[Aae]=nt[Oae]=nt[kae]=nt[Eae]=nt[Tae]=!1;function Wae(e){return yae(e)&&gae(e.length)&&!!nt[vae(e)]}uj.exports=Wae});var GP=M((Q_e,fj)=>{function zae(e){return function(t){return e(t)}}fj.exports=zae});var pj=M((lp,tc)=>{var Vae=_C(),dj=typeof lp=="object"&&lp&&!lp.nodeType&&lp,up=dj&&typeof tc=="object"&&tc&&!tc.nodeType&&tc,$ae=up&&up.exports===dj,KP=$ae&&Vae.process,Gae=function(){try{var e=up&&up.require&&up.require("util").types;return e||KP&&KP.binding&&KP.binding("util")}catch{}}();tc.exports=Gae});var XP=M((Z_e,vj)=>{var Kae=cj(),Xae=GP(),mj=pj(),hj=mj&&mj.isTypedArray,Yae=hj?Xae(hj):Kae;vj.exports=Yae});var yj=M((eMe,gj)=>{var Jae=YB(),Qae=gy(),Zae=Dr(),eoe=$P(),toe=yy(),roe=XP(),noe=Object.prototype,aoe=noe.hasOwnProperty;function ooe(e,t){var r=Zae(e),n=!r&&Qae(e),a=!r&&!n&&eoe(e),o=!r&&!n&&!a&&roe(e),i=r||n||a||o,s=i?Jae(e.length,String):[],l=s.length;for(var u in e)(t||aoe.call(e,u))&&!(i&&(u=="length"||a&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||toe(u,l)))&&s.push(u);return s}gj.exports=ooe});var bj=M((tMe,xj)=>{var ioe=Object.prototype;function soe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ioe;return e===r}xj.exports=soe});var YP=M((rMe,wj)=>{function loe(e,t){return function(r){return e(t(r))}}wj.exports=loe});var Cj=M((nMe,Sj)=>{var uoe=YP(),coe=uoe(Object.keys,Object);Sj.exports=coe});var Ij=M((aMe,Pj)=>{var foe=bj(),doe=Cj(),poe=Object.prototype,moe=poe.hasOwnProperty;function hoe(e){if(!foe(e))return doe(e);var t=[];for(var r in Object(e))moe.call(e,r)&&r!="constructor"&&t.push(r);return t}Pj.exports=hoe});var rc=M((oMe,Lj)=>{var voe=it(),goe=xy();function yoe(e){return e!=null&&goe(e.length)&&!voe(e)}Lj.exports=yoe});var cp=M((iMe,Aj)=>{var xoe=yj(),boe=Ij(),woe=rc();function Soe(e){return woe(e)?xoe(e):boe(e)}Aj.exports=Soe});var kj=M((sMe,Oj)=>{var Coe=UB(),Poe=KB(),Ioe=cp();function Loe(e){return Coe(e,Ioe,Poe)}Oj.exports=Loe});var Rj=M((lMe,Tj)=>{var Ej=kj(),Aoe=1,Ooe=Object.prototype,koe=Ooe.hasOwnProperty;function Eoe(e,t,r,n,a,o){var i=r&Aoe,s=Ej(e),l=s.length,u=Ej(t),f=u.length;if(l!=f&&!i)return!1;for(var c=l;c--;){var d=s[c];if(!(i?d in t:koe.call(t,d)))return!1}var p=o.get(e),h=o.get(t);if(p&&h)return p==t&&h==e;var m=!0;o.set(e,t),o.set(t,e);for(var x=i;++c{var Toe=Fi(),Roe=ka(),_oe=Toe(Roe,"DataView");_j.exports=_oe});var Nj=M((cMe,Dj)=>{var Moe=Fi(),Doe=ka(),Noe=Moe(Doe,"Promise");Dj.exports=Noe});var JP=M((fMe,Fj)=>{var Foe=Fi(),Boe=ka(),joe=Foe(Boe,"Set");Fj.exports=joe});var jj=M((dMe,Bj)=>{var qoe=Fi(),Uoe=ka(),Hoe=qoe(Uoe,"WeakMap");Bj.exports=Hoe});var Gj=M((pMe,$j)=>{var QP=Mj(),ZP=jg(),eI=Nj(),tI=JP(),rI=jj(),Vj=to(),nc=DC(),qj="[object Map]",Woe="[object Object]",Uj="[object Promise]",Hj="[object Set]",Wj="[object WeakMap]",zj="[object DataView]",zoe=nc(QP),Voe=nc(ZP),$oe=nc(eI),Goe=nc(tI),Koe=nc(rI),Zs=Vj;(QP&&Zs(new QP(new ArrayBuffer(1)))!=zj||ZP&&Zs(new ZP)!=qj||eI&&Zs(eI.resolve())!=Uj||tI&&Zs(new tI)!=Hj||rI&&Zs(new rI)!=Wj)&&(Zs=function(e){var t=Vj(e),r=t==Woe?e.constructor:void 0,n=r?nc(r):"";if(n)switch(n){case zoe:return zj;case Voe:return qj;case $oe:return Uj;case Goe:return Hj;case Koe:return Wj}return t});$j.exports=Zs});var tq=M((mMe,eq)=>{var nI=jP(),Xoe=WP(),Yoe=BB(),Joe=Rj(),Kj=Gj(),Xj=Dr(),Yj=$P(),Qoe=XP(),Zoe=1,Jj="[object Arguments]",Qj="[object Array]",by="[object Object]",eie=Object.prototype,Zj=eie.hasOwnProperty;function tie(e,t,r,n,a,o){var i=Xj(e),s=Xj(t),l=i?Qj:Kj(e),u=s?Qj:Kj(t);l=l==Jj?by:l,u=u==Jj?by:u;var f=l==by,c=u==by,d=l==u;if(d&&Yj(e)){if(!Yj(t))return!1;i=!0,f=!1}if(d&&!f)return o||(o=new nI),i||Qoe(e)?Xoe(e,t,r,n,a,o):Yoe(e,t,l,r,n,a,o);if(!(r&Zoe)){var p=f&&Zj.call(e,"__wrapped__"),h=c&&Zj.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,x=h?t.value():t;return o||(o=new nI),a(m,x,r,n,o)}}return d?(o||(o=new nI),Joe(e,t,r,n,a,o)):!1}eq.exports=tie});var wy=M((hMe,aq)=>{var rie=tq(),rq=ro();function nq(e,t,r,n,a){return e===t?!0:e==null||t==null||!rq(e)&&!rq(t)?e!==e&&t!==t:rie(e,t,r,n,nq,a)}aq.exports=nq});var iq=M((vMe,oq)=>{var nie=jP(),aie=wy(),oie=1,iie=2;function sie(e,t,r,n){var a=r.length,o=a,i=!n;if(e==null)return!o;for(e=Object(e);a--;){var s=r[a];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a{var lie=Yn();function uie(e){return e===e&&!lie(e)}sq.exports=uie});var uq=M((yMe,lq)=>{var cie=aI(),fie=cp();function die(e){for(var t=fie(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,cie(a)]}return t}lq.exports=die});var oI=M((xMe,cq)=>{function pie(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}cq.exports=pie});var dq=M((bMe,fq)=>{var mie=iq(),hie=uq(),vie=oI();function gie(e){var t=hie(e);return t.length==1&&t[0][2]?vie(t[0][0],t[0][1]):function(r){return r===e||mie(r,e,t)}}fq.exports=gie});var mq=M((wMe,pq)=>{function yie(e,t){return e!=null&&t in Object(e)}pq.exports=yie});var vq=M((SMe,hq)=>{var xie=jC(),bie=gy(),wie=Dr(),Sie=yy(),Cie=xy(),Pie=ep();function Iie(e,t,r){t=xie(t,e);for(var n=-1,a=t.length,o=!1;++n{var Lie=mq(),Aie=vq();function Oie(e,t){return e!=null&&Aie(e,t,Lie)}gq.exports=Oie});var bq=M((PMe,xq)=>{var kie=wy(),Eie=Bi(),Tie=yq(),Rie=Fg(),_ie=aI(),Mie=oI(),Die=ep(),Nie=1,Fie=2;function Bie(e,t){return Rie(e)&&_ie(t)?Mie(Die(e),t):function(r){var n=Eie(r,e);return n===void 0&&n===t?Tie(r,e):kie(t,n,Nie|Fie)}}xq.exports=Bie});var el=M((IMe,wq)=>{function jie(e){return e}wq.exports=jie});var Cq=M((LMe,Sq)=>{function qie(e){return function(t){return t?.[e]}}Sq.exports=qie});var Iq=M((AMe,Pq)=>{var Uie=Hg();function Hie(e){return function(t){return Uie(t,e)}}Pq.exports=Hie});var Aq=M((OMe,Lq)=>{var Wie=Cq(),zie=Iq(),Vie=Fg(),$ie=ep();function Gie(e){return Vie(e)?Wie($ie(e)):zie(e)}Lq.exports=Gie});var Ea=M((kMe,Oq)=>{var Kie=dq(),Xie=bq(),Yie=el(),Jie=Dr(),Qie=Aq();function Zie(e){return typeof e=="function"?e:e==null?Yie:typeof e=="object"?Jie(e)?Xie(e[0],e[1]):Kie(e):Qie(e)}Oq.exports=Zie});var iI=M((EMe,kq)=>{function ese(e,t,r,n){for(var a=e.length,o=r+(n?1:-1);n?o--:++o{function tse(e){return e!==e}Eq.exports=tse});var _q=M((RMe,Rq)=>{function rse(e,t,r){for(var n=r-1,a=e.length;++n{var nse=iI(),ase=Tq(),ose=_q();function ise(e,t,r){return t===t?ose(e,t,r):nse(e,ase,r)}Mq.exports=ise});var Fq=M((MMe,Nq)=>{var sse=Dq();function lse(e,t){var r=e==null?0:e.length;return!!r&&sse(e,t,0)>-1}Nq.exports=lse});var jq=M((DMe,Bq)=>{function use(e,t,r){for(var n=-1,a=e==null?0:e.length;++n{function cse(){}qq.exports=cse});var Wq=M((FMe,Hq)=>{var sI=JP(),fse=Uq(),dse=vy(),pse=1/0,mse=sI&&1/dse(new sI([,-0]))[1]==pse?function(e){return new sI(e)}:fse;Hq.exports=mse});var Vq=M((BMe,zq)=>{var hse=qP(),vse=Fq(),gse=jq(),yse=HP(),xse=Wq(),bse=vy(),wse=200;function Sse(e,t,r){var n=-1,a=vse,o=e.length,i=!0,s=[],l=s;if(r)i=!1,a=gse;else if(o>=wse){var u=t?null:xse(e);if(u)return bse(u);i=!1,a=yse,l=new hse}else l=t?[]:s;e:for(;++n{var Cse=Ea(),Pse=Vq();function Ise(e,t){return e&&e.length?Pse(e,Cse(t,2)):[]}$q.exports=Ise});var aU=M((VMe,nU)=>{var tU=Fu(),Fse=gy(),Bse=Dr(),rU=tU?tU.isConcatSpreadable:void 0;function jse(e){return Bse(e)||Fse(e)||!!(rU&&e&&e[rU])}nU.exports=jse});var cI=M(($Me,iU)=>{var qse=VP(),Use=aU();function oU(e,t,r,n,a){var o=-1,i=e.length;for(r||(r=Use),a||(a=[]);++o0&&r(s)?t>1?oU(s,t-1,r,n,a):qse(a,s):n||(a[a.length]=s)}return a}iU.exports=oU});var lU=M((GMe,sU)=>{function Hse(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),s=i.length;s--;){var l=i[e?s:++a];if(r(o[l],l,o)===!1)break}return t}}sU.exports=Hse});var cU=M((KMe,uU)=>{var Wse=lU(),zse=Wse();uU.exports=zse});var fI=M((XMe,fU)=>{var Vse=cU(),$se=cp();function Gse(e,t){return e&&Vse(e,t,$se)}fU.exports=Gse});var pU=M((YMe,dU)=>{var Kse=rc();function Xse(e,t){return function(r,n){if(r==null)return r;if(!Kse(r))return e(r,n);for(var a=r.length,o=t?a:-1,i=Object(r);(t?o--:++o{var Yse=fI(),Jse=pU(),Qse=Jse(Yse);mU.exports=Qse});var dI=M((QMe,hU)=>{var Zse=Iy(),ele=rc();function tle(e,t){var r=-1,n=ele(e)?Array(e.length):[];return Zse(e,function(a,o,i){n[++r]=t(a,o,i)}),n}hU.exports=tle});var gU=M((ZMe,vU)=>{function rle(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}vU.exports=rle});var bU=M((eDe,xU)=>{var yU=Ks();function nle(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,o=yU(e),i=t!==void 0,s=t===null,l=t===t,u=yU(t);if(!s&&!u&&!o&&e>t||o&&i&&l&&!s&&!u||n&&i&&l||!r&&l||!a)return 1;if(!n&&!o&&!u&&e{var ale=bU();function ole(e,t,r){for(var n=-1,a=e.criteria,o=t.criteria,i=a.length,s=r.length;++n=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}wU.exports=ole});var PU=M((rDe,CU)=>{var pI=Ug(),ile=Hg(),sle=Ea(),lle=dI(),ule=gU(),cle=GP(),fle=SU(),dle=el(),ple=Dr();function mle(e,t,r){t.length?t=pI(t,function(o){return ple(o)?function(i){return ile(i,o.length===1?o[0]:o)}:o}):t=[dle];var n=-1;t=pI(t,cle(sle));var a=lle(e,function(o,i,s){var l=pI(t,function(u){return u(o)});return{criteria:l,index:++n,value:o}});return ule(a,function(o,i){return fle(o,i,r)})}CU.exports=mle});var LU=M((nDe,IU)=>{function hle(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}IU.exports=hle});var kU=M((aDe,OU)=>{var vle=LU(),AU=Math.max;function gle(e,t,r){return t=AU(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=AU(n.length-t,0),i=Array(o);++a{function yle(e){return function(){return e}}EU.exports=yle});var mI=M((iDe,RU)=>{var xle=Fi(),ble=function(){try{var e=xle(Object,"defineProperty");return e({},"",{}),e}catch{}}();RU.exports=ble});var DU=M((sDe,MU)=>{var wle=TU(),_U=mI(),Sle=el(),Cle=_U?function(e,t){return _U(e,"toString",{configurable:!0,enumerable:!1,value:wle(t),writable:!0})}:Sle;MU.exports=Cle});var FU=M((lDe,NU)=>{var Ple=800,Ile=16,Lle=Date.now;function Ale(e){var t=0,r=0;return function(){var n=Lle(),a=Ile-(n-r);if(r=n,a>0){if(++t>=Ple)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}NU.exports=Ale});var jU=M((uDe,BU)=>{var Ole=DU(),kle=FU(),Ele=kle(Ole);BU.exports=Ele});var UU=M((cDe,qU)=>{var Tle=el(),Rle=kU(),_le=jU();function Mle(e,t){return _le(Rle(e,t,Tle),e+"")}qU.exports=Mle});var fp=M((fDe,HU)=>{var Dle=Bg(),Nle=rc(),Fle=yy(),Ble=Yn();function jle(e,t,r){if(!Ble(r))return!1;var n=typeof t;return(n=="number"?Nle(r)&&Fle(t,r.length):n=="string"&&t in r)?Dle(r[t],e):!1}HU.exports=jle});var Ly=M((dDe,zU)=>{var qle=cI(),Ule=PU(),Hle=UU(),WU=fp(),Wle=Hle(function(e,t){if(e==null)return[];var r=t.length;return r>1&&WU(e,t[0],t[1])?t=[]:r>2&&WU(t[0],t[1],t[2])&&(t=[t[0]]),Ule(e,qle(t,1),[])});zU.exports=Wle});var fH=M((ADe,cH)=>{var bue=ka(),wue=function(){return bue.Date.now()};cH.exports=wue});var pH=M((ODe,dH)=>{var Sue=/\s/;function Cue(e){for(var t=e.length;t--&&Sue.test(e.charAt(t)););return t}dH.exports=Cue});var hH=M((kDe,mH)=>{var Pue=pH(),Iue=/^\s+/;function Lue(e){return e&&e.slice(0,Pue(e)+1).replace(Iue,"")}mH.exports=Lue});var SI=M((EDe,yH)=>{var Aue=hH(),vH=Yn(),Oue=Ks(),gH=0/0,kue=/^[-+]0x[0-9a-f]+$/i,Eue=/^0b[01]+$/i,Tue=/^0o[0-7]+$/i,Rue=parseInt;function _ue(e){if(typeof e=="number")return e;if(Oue(e))return gH;if(vH(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vH(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Aue(e);var r=Eue.test(e);return r||Tue.test(e)?Rue(e.slice(2),r?2:8):kue.test(e)?gH:+e}yH.exports=_ue});var wH=M((TDe,bH)=>{var Mue=Yn(),CI=fH(),xH=SI(),Due="Expected a function",Nue=Math.max,Fue=Math.min;function Bue(e,t,r){var n,a,o,i,s,l,u=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(Due);t=xH(t)||0,Mue(r)&&(f=!!r.leading,c="maxWait"in r,o=c?Nue(xH(r.maxWait)||0,t):o,d="trailing"in r?!!r.trailing:d);function p(S){var P=n,A=a;return n=a=void 0,u=S,i=e.apply(A,P),i}function h(S){return u=S,s=setTimeout(g,t),f?p(S):i}function m(S){var P=S-l,A=S-u,_=t-P;return c?Fue(_,o-A):_}function x(S){var P=S-l,A=S-u;return l===void 0||P>=t||P<0||c&&A>=o}function g(){var S=CI();if(x(S))return v(S);s=setTimeout(g,m(S))}function v(S){return s=void 0,d&&n?p(S):(n=a=void 0,i)}function w(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function b(){return s===void 0?i:v(CI())}function y(){var S=CI(),P=x(S);if(n=arguments,a=this,l=S,P){if(s===void 0)return h(l);if(c)return clearTimeout(s),s=setTimeout(g,t),p(l)}return s===void 0&&(s=setTimeout(g,t)),i}return y.cancel=w,y.flush=b,y}bH.exports=Bue});var PI=M((RDe,SH)=>{var jue=wH(),que=Yn(),Uue="Expected a function";function Hue(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(Uue);return que(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),jue(e,t,{leading:n,maxWait:t,trailing:a})}SH.exports=Hue});var Bp=M((Gje,c3)=>{var Mde=Ks();function Dde(e,t,r){for(var n=-1,a=e.length;++n{function Nde(e,t){return e>t}f3.exports=Nde});var dL=M((Xje,d3)=>{var Fde=Bp(),Bde=fL(),jde=el();function qde(e){return e&&e.length?Fde(e,jde,Bde):void 0}d3.exports=qde});var pL=M((Yje,p3)=>{function Ude(e,t){return e{var Hde=Bp(),Wde=pL(),zde=el();function Vde(e){return e&&e.length?Hde(e,zde,Wde):void 0}m3.exports=Vde});var g3=M((Qje,v3)=>{var $de=Ug(),Gde=Ea(),Kde=dI(),Xde=Dr();function Yde(e,t){var r=Xde(e)?$de:Kde;return r(e,Gde(t,3))}v3.exports=Yde});var x3=M((Zje,y3)=>{var Jde=cI(),Qde=g3();function Zde(e,t){return Jde(Qde(e,t),1)}y3.exports=Zde});var Pc=M((eqe,b3)=>{var epe=wy();function tpe(e,t){return epe(e,t)}b3.exports=tpe});var mL=M((w3,gx)=>{(function(e){"use strict";var t=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},n=!0,a="[DecimalError] ",o=a+"Invalid argument: ",i=a+"Exponent out of range: ",s=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f,c=1e7,d=7,p=9007199254740991,h=s(p/d),m={};m.absoluteValue=m.abs=function(){var I=new this.constructor(this);return I.s&&(I.s=1),I},m.comparedTo=m.cmp=function(I){var C,L,O,E,k=this;if(I=new k.constructor(I),k.s!==I.s)return k.s||-I.s;if(k.e!==I.e)return k.e>I.e^k.s<0?1:-1;for(O=k.d.length,E=I.d.length,C=0,L=OI.d[C]^k.s<0?1:-1;return O===E?0:O>E^k.s<0?1:-1},m.decimalPlaces=m.dp=function(){var I=this,C=I.d.length-1,L=(C-I.e)*d;if(C=I.d[C],C)for(;C%10==0;C/=10)L--;return L<0?0:L},m.dividedBy=m.div=function(I){return w(this,new this.constructor(I))},m.dividedToIntegerBy=m.idiv=function(I){var C=this,L=C.constructor;return T(w(C,new L(I),0,1),L.precision)},m.equals=m.eq=function(I){return!this.cmp(I)},m.exponent=function(){return y(this)},m.greaterThan=m.gt=function(I){return this.cmp(I)>0},m.greaterThanOrEqualTo=m.gte=function(I){return this.cmp(I)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return this.s===0},m.lessThan=m.lt=function(I){return this.cmp(I)<0},m.lessThanOrEqualTo=m.lte=function(I){return this.cmp(I)<1},m.logarithm=m.log=function(I){var C,L=this,O=L.constructor,E=O.precision,k=E+5;if(I===void 0)I=new O(10);else if(I=new O(I),I.s<1||I.eq(f))throw Error(a+"NaN");if(L.s<1)throw Error(a+(L.s?"NaN":"-Infinity"));return L.eq(f)?new O(0):(n=!1,C=w(A(L,k),A(I,k),k),n=!0,T(C,E))},m.minus=m.sub=function(I){var C=this;return I=new C.constructor(I),C.s==I.s?D(C,I):x(C,(I.s=-I.s,I))},m.modulo=m.mod=function(I){var C,L=this,O=L.constructor,E=O.precision;if(I=new O(I),!I.s)throw Error(a+"NaN");return L.s?(n=!1,C=w(L,I,0,1).times(I),n=!0,L.minus(C)):T(new O(L),E)},m.naturalExponential=m.exp=function(){return b(this)},m.naturalLogarithm=m.ln=function(){return A(this)},m.negated=m.neg=function(){var I=new this.constructor(this);return I.s=-I.s||0,I},m.plus=m.add=function(I){var C=this;return I=new C.constructor(I),C.s==I.s?x(C,I):D(C,(I.s=-I.s,I))},m.precision=m.sd=function(I){var C,L,O,E=this;if(I!==void 0&&I!==!!I&&I!==1&&I!==0)throw Error(o+I);if(C=y(E)+1,O=E.d.length-1,L=O*d+1,O=E.d[O],O){for(;O%10==0;O/=10)L--;for(O=E.d[0];O>=10;O/=10)L++}return I&&C>L?C:L},m.squareRoot=m.sqrt=function(){var I,C,L,O,E,k,F,q=this,$=q.constructor;if(q.s<1){if(!q.s)return new $(0);throw Error(a+"NaN")}for(I=y(q),n=!1,E=Math.sqrt(+q),E==0||E==1/0?(C=v(q.d),(C.length+I)%2==0&&(C+="0"),E=Math.sqrt(C),I=s((I+1)/2)-(I<0||I%2),E==1/0?C="5e"+I:(C=E.toExponential(),C=C.slice(0,C.indexOf("e")+1)+I),O=new $(C)):O=new $(E.toString()),L=$.precision,E=F=L+3;;)if(k=O,O=k.plus(w(q,k,F+2)).times(.5),v(k.d).slice(0,F)===(C=v(O.d)).slice(0,F)){if(C=C.slice(F-3,F+1),E==F&&C=="4999"){if(T(k,L+1,0),k.times(k).eq(q)){O=k;break}}else if(C!="9999")break;F+=4}return n=!0,T(O,L)},m.times=m.mul=function(I){var C,L,O,E,k,F,q,$,ee,J=this,W=J.constructor,ie=J.d,V=(I=new W(I)).d;if(!J.s||!I.s)return new W(0);for(I.s*=J.s,L=J.e+I.e,$=ie.length,ee=V.length,$=0;){for(C=0,E=$+O;E>O;)q=k[E]+V[O]*ie[E-O-1]+C,k[E--]=q%c|0,C=q/c|0;k[E]=(k[E]+C)%c|0}for(;!k[--F];)k.pop();return C?++L:k.shift(),I.d=k,I.e=L,n?T(I,W.precision):I},m.toDecimalPlaces=m.todp=function(I,C){var L=this,O=L.constructor;return L=new O(L),I===void 0?L:(g(I,0,t),C===void 0?C=O.rounding:g(C,0,8),T(L,I+y(L)+1,C))},m.toExponential=function(I,C){var L,O=this,E=O.constructor;return I===void 0?L=N(O,!0):(g(I,0,t),C===void 0?C=E.rounding:g(C,0,8),O=T(new E(O),I+1,C),L=N(O,!0,I+1)),L},m.toFixed=function(I,C){var L,O,E=this,k=E.constructor;return I===void 0?N(E):(g(I,0,t),C===void 0?C=k.rounding:g(C,0,8),O=T(new k(E),I+y(E)+1,C),L=N(O.abs(),!1,I+y(O)+1),E.isneg()&&!E.isZero()?"-"+L:L)},m.toInteger=m.toint=function(){var I=this,C=I.constructor;return T(new C(I),y(I)+1,C.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(I){var C,L,O,E,k,F,q=this,$=q.constructor,ee=12,J=+(I=new $(I));if(!I.s)return new $(f);if(q=new $(q),!q.s){if(I.s<1)throw Error(a+"Infinity");return q}if(q.eq(f))return q;if(O=$.precision,I.eq(f))return T(q,O);if(C=I.e,L=I.d.length-1,F=C>=L,k=q.s,F){if((L=J<0?-J:J)<=p){for(E=new $(f),C=Math.ceil(O/d+4),n=!1;L%2&&(E=E.times(q),j(E.d,C)),L=s(L/2),L!==0;)q=q.times(q),j(q.d,C);return n=!0,I.s<0?new $(f).div(E):T(E,O)}}else if(k<0)throw Error(a+"NaN");return k=k<0&&I.d[Math.max(C,L)]&1?-1:1,q.s=1,n=!1,E=I.times(A(q,O+ee)),n=!0,E=b(E),E.s=k,E},m.toPrecision=function(I,C){var L,O,E=this,k=E.constructor;return I===void 0?(L=y(E),O=N(E,L<=k.toExpNeg||L>=k.toExpPos)):(g(I,1,t),C===void 0?C=k.rounding:g(C,0,8),E=T(new k(E),I,C),L=y(E),O=N(E,I<=L||L<=k.toExpNeg,I)),O},m.toSignificantDigits=m.tosd=function(I,C){var L=this,O=L.constructor;return I===void 0?(I=O.precision,C=O.rounding):(g(I,1,t),C===void 0?C=O.rounding:g(C,0,8)),T(new O(L),I,C)},m.toString=m.valueOf=m.val=m.toJSON=function(){var I=this,C=y(I),L=I.constructor;return N(I,C<=L.toExpNeg||C>=L.toExpPos)};function x(I,C){var L,O,E,k,F,q,$,ee,J=I.constructor,W=J.precision;if(!I.s||!C.s)return C.s||(C=new J(I)),n?T(C,W):C;if($=I.d,ee=C.d,F=I.e,E=C.e,$=$.slice(),k=F-E,k){for(k<0?(O=$,k=-k,q=ee.length):(O=ee,E=F,q=$.length),F=Math.ceil(W/d),q=F>q?F+1:q+1,k>q&&(k=q,O.length=1),O.reverse();k--;)O.push(0);O.reverse()}for(q=$.length,k=ee.length,q-k<0&&(k=q,O=ee,ee=$,$=O),L=0;k;)L=($[--k]=$[k]+ee[k]+L)/c|0,$[k]%=c;for(L&&($.unshift(L),++E),q=$.length;$[--q]==0;)$.pop();return C.d=$,C.e=E,n?T(C,W):C}function g(I,C,L){if(I!==~~I||IL)throw Error(o+I)}function v(I){var C,L,O,E=I.length-1,k="",F=I[0];if(E>0){for(k+=F,C=1;CF?1:-1;else for(q=$=0;qE[q]?1:-1;break}return $}function L(O,E,k){for(var F=0;k--;)O[k]-=F,F=O[k]1;)O.shift()}return function(O,E,k,F){var q,$,ee,J,W,ie,V,re,Q,U,be,de,ze,Be,yt,un,pr,Mn,Dn=O.constructor,qO=O.s==E.s?1:-1,va=O.d,at=E.d;if(!O.s)return new Dn(O);if(!E.s)throw Error(a+"Division by zero");for($=O.e-E.e,pr=at.length,yt=va.length,V=new Dn(qO),re=V.d=[],ee=0;at[ee]==(va[ee]||0);)++ee;if(at[ee]>(va[ee]||0)&&--$,k==null?de=k=Dn.precision:F?de=k+(y(O)-y(E))+1:de=k,de<0)return new Dn(0);if(de=de/d+2|0,ee=0,pr==1)for(J=0,at=at[0],de++;(ee1&&(at=I(at,J),va=I(va,J),pr=at.length,yt=va.length),Be=pr,Q=va.slice(0,pr),U=Q.length;U=c/2&&++un;do J=0,q=C(at,Q,pr,U),q<0?(be=Q[0],pr!=U&&(be=be*c+(Q[1]||0)),J=be/un|0,J>1?(J>=c&&(J=c-1),W=I(at,J),ie=W.length,U=Q.length,q=C(W,Q,ie,U),q==1&&(J--,L(W,pr16)throw Error(i+y(I));if(!I.s)return new J(f);for(C==null?(n=!1,q=W):q=C,F=new J(.03125);I.abs().gte(.1);)I=I.times(F),ee+=5;for(O=Math.log(l(2,ee))/Math.LN10*2+5|0,q+=O,L=E=k=new J(f),J.precision=q;;){if(E=T(E.times(I),q),L=L.times(++$),F=k.plus(w(E,L,q)),v(F.d).slice(0,q)===v(k.d).slice(0,q)){for(;ee--;)k=T(k.times(k),q);return J.precision=W,C==null?(n=!0,T(k,W)):k}k=F}}function y(I){for(var C=I.e*d,L=I.d[0];L>=10;L/=10)C++;return C}function S(I,C,L){if(C>I.LN10.sd())throw n=!0,L&&(I.precision=L),Error(a+"LN10 precision limit exceeded");return T(new I(I.LN10),C)}function P(I){for(var C="";I--;)C+="0";return C}function A(I,C){var L,O,E,k,F,q,$,ee,J,W=1,ie=10,V=I,re=V.d,Q=V.constructor,U=Q.precision;if(V.s<1)throw Error(a+(V.s?"NaN":"-Infinity"));if(V.eq(f))return new Q(0);if(C==null?(n=!1,ee=U):ee=C,V.eq(10))return C==null&&(n=!0),S(Q,ee);if(ee+=ie,Q.precision=ee,L=v(re),O=L.charAt(0),k=y(V),Math.abs(k)<15e14){for(;O<7&&O!=1||O==1&&L.charAt(1)>3;)V=V.times(I),L=v(V.d),O=L.charAt(0),W++;k=y(V),O>1?(V=new Q("0."+L),k++):V=new Q(O+"."+L.slice(1))}else return $=S(Q,ee+2,U).times(k+""),V=A(new Q(O+"."+L.slice(1)),ee-ie).plus($),Q.precision=U,C==null?(n=!0,T(V,U)):V;for(q=F=V=w(V.minus(f),V.plus(f),ee),J=T(V.times(V),ee),E=3;;){if(F=T(F.times(J),ee),$=q.plus(w(F,new Q(E),ee)),v($.d).slice(0,ee)===v(q.d).slice(0,ee))return q=q.times(2),k!==0&&(q=q.plus(S(Q,ee+2,U).times(k+""))),q=w(q,new Q(W),ee),Q.precision=U,C==null?(n=!0,T(q,U)):q;q=$,E+=2}}function _(I,C){var L,O,E;for((L=C.indexOf("."))>-1&&(C=C.replace(".","")),(O=C.search(/e/i))>0?(L<0&&(L=O),L+=+C.slice(O+1),C=C.substring(0,O)):L<0&&(L=C.length),O=0;C.charCodeAt(O)===48;)++O;for(E=C.length;C.charCodeAt(E-1)===48;)--E;if(C=C.slice(O,E),C){if(E-=O,L=L-O-1,I.e=s(L/d),I.d=[],O=(L+1)%d,L<0&&(O+=d),Oh||I.e<-h))throw Error(i+L)}else I.s=0,I.e=0,I.d=[0];return I}function T(I,C,L){var O,E,k,F,q,$,ee,J,W=I.d;for(F=1,k=W[0];k>=10;k/=10)F++;if(O=C-F,O<0)O+=d,E=C,ee=W[J=0];else{if(J=Math.ceil((O+1)/d),k=W.length,J>=k)return I;for(ee=k=W[J],F=1;k>=10;k/=10)F++;O%=d,E=O-d+F}if(L!==void 0&&(k=l(10,F-E-1),q=ee/k%10|0,$=C<0||W[J+1]!==void 0||ee%k,$=L<4?(q||$)&&(L==0||L==(I.s<0?3:2)):q>5||q==5&&(L==4||$||L==6&&(O>0?E>0?ee/l(10,F-E):0:W[J-1])%10&1||L==(I.s<0?8:7))),C<1||!W[0])return $?(k=y(I),W.length=1,C=C-k-1,W[0]=l(10,(d-C%d)%d),I.e=s(-C/d)||0):(W.length=1,W[0]=I.e=I.s=0),I;if(O==0?(W.length=J,k=1,J--):(W.length=J+1,k=l(10,d-O),W[J]=E>0?(ee/l(10,F-E)%l(10,E)|0)*k:0),$)for(;;)if(J==0){(W[0]+=k)==c&&(W[0]=1,++I.e);break}else{if(W[J]+=k,W[J]!=c)break;W[J--]=0,k=1}for(O=W.length;W[--O]===0;)W.pop();if(n&&(I.e>h||I.e<-h))throw Error(i+y(I));return I}function D(I,C){var L,O,E,k,F,q,$,ee,J,W,ie=I.constructor,V=ie.precision;if(!I.s||!C.s)return C.s?C.s=-C.s:C=new ie(I),n?T(C,V):C;if($=I.d,W=C.d,O=C.e,ee=I.e,$=$.slice(),F=ee-O,F){for(J=F<0,J?(L=$,F=-F,q=W.length):(L=W,O=ee,q=$.length),E=Math.max(Math.ceil(V/d),q)+2,F>E&&(F=E,L.length=1),L.reverse(),E=F;E--;)L.push(0);L.reverse()}else{for(E=$.length,q=W.length,J=E0;--E)$[q++]=0;for(E=W.length;E>F;){if($[--E]0?k=k.charAt(0)+"."+k.slice(1)+P(O):F>1&&(k=k.charAt(0)+"."+k.slice(1)),k=k+(E<0?"e":"e+")+E):E<0?(k="0."+P(-E-1)+k,L&&(O=L-F)>0&&(k+=P(O))):E>=F?(k+=P(E+1-F),L&&(O=L-E-1)>0&&(k=k+"."+P(O))):((O=E+1)0&&(E+1===F&&(k+="."),k+=P(O))),I.s<0?"-"+k:k}function j(I,C){if(I.length>C)return I.length=C,!0}function B(I){var C,L,O;function E(k){var F=this;if(!(F instanceof E))return new E(k);if(F.constructor=E,k instanceof E){F.s=k.s,F.e=k.e,F.d=(k=k.d)?k.slice():k;return}if(typeof k=="number"){if(k*0!==0)throw Error(o+k);if(k>0)F.s=1;else if(k<0)k=-k,F.s=-1;else{F.s=0,F.e=0,F.d=[0];return}if(k===~~k&&k<1e7){F.e=0,F.d=[k];return}return _(F,k.toString())}else if(typeof k!="string")throw Error(o+k);if(k.charCodeAt(0)===45?(k=k.slice(1),F.s=-1):F.s=1,u.test(k))_(F,k);else throw Error(o+k)}if(E.prototype=m,E.ROUND_UP=0,E.ROUND_DOWN=1,E.ROUND_CEIL=2,E.ROUND_FLOOR=3,E.ROUND_HALF_UP=4,E.ROUND_HALF_DOWN=5,E.ROUND_HALF_EVEN=6,E.ROUND_HALF_CEIL=7,E.ROUND_HALF_FLOOR=8,E.clone=B,E.config=E.set=H,I===void 0&&(I={}),I)for(O=["precision","rounding","toExpNeg","toExpPos","LN10"],C=0;C=E[C+1]&&O<=E[C+2])this[L]=O;else throw Error(o+L+": "+O);if((O=I[L="LN10"])!==void 0)if(O==Math.LN10)this[L]=new this(O);else throw Error(o+L+": "+O);return this}r=B(r),r.default=r.Decimal=r,f=new r(1),typeof define=="function"&&define.amd?define(function(){return r}):typeof gx<"u"&&gx.exports?gx.exports=r:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),e.Decimal=r)})(w3)});var sz=M((Mqe,iz)=>{function Ime(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}iz.exports=Ime});var Iz=M((Jqe,Pz)=>{"use strict";var Jme="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Pz.exports=Jme});var kz=M((Qqe,Oz)=>{"use strict";var Qme=Iz();function Lz(){}function Az(){}Az.resetWarningCache=Lz;Oz.exports=function(){function e(n,a,o,i,s,l){if(l!==Qme){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Az,resetWarningCache:Lz};return r.PropTypes=r,r}});var Mx=M((tUe,Ez)=>{Ez.exports=kz()();var Zqe,eUe});var R4=M((SHe,T4)=>{var Yve=Bp(),Jve=fL(),Qve=Ea();function Zve(e,t){return e&&e.length?Yve(e,Qve(t,2),Jve):void 0}T4.exports=Zve});var M4=M((CHe,_4)=>{var ege=Bp(),tge=Ea(),rge=pL();function nge(e,t){return e&&e.length?ege(e,tge(t,2),rge):void 0}_4.exports=nge});var Y4=M((UHe,X4)=>{var Sge=YP(),Cge=Sge(Object.getPrototypeOf,Object);X4.exports=Cge});var Z4=M((HHe,Q4)=>{var Pge=to(),Ige=Y4(),Lge=ro(),Age="[object Object]",Oge=Function.prototype,kge=Object.prototype,J4=Oge.toString,Ege=kge.hasOwnProperty,Tge=J4.call(Object);function Rge(e){if(!Lge(e)||Pge(e)!=Age)return!1;var t=Ige(e);if(t===null)return!0;var r=Ege.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&J4.call(r)==Tge}Q4.exports=Rge});var tV=M((WHe,eV)=>{var _ge=to(),Mge=ro(),Dge="[object Boolean]";function Nge(e){return e===!0||e===!1||Mge(e)&&_ge(e)==Dge}eV.exports=Nge});var wV=M((gWe,bV)=>{var pye=Math.ceil,mye=Math.max;function hye(e,t,r,n){for(var a=-1,o=mye(pye((t-e)/(r||1)),0),i=Array(o);o--;)i[n?o:++a]=e,e+=r;return i}bV.exports=hye});var xA=M((yWe,CV)=>{var vye=SI(),SV=1/0,gye=17976931348623157e292;function yye(e){if(!e)return e===0?e:0;if(e=vye(e),e===SV||e===-SV){var t=e<0?-1:1;return t*gye}return e===e?e:0}CV.exports=yye});var IV=M((xWe,PV)=>{var xye=wV(),bye=fp(),bA=xA();function wye(e){return function(t,r,n){return n&&typeof n!="number"&&bye(t,r,n)&&(r=n=void 0),t=bA(t),r===void 0?(r=t,t=0):r=bA(r),n=n===void 0?t{var Sye=IV(),Cye=Sye();LV.exports=Cye});var BV=M((TWe,FV)=>{var Mye=Iy();function Dye(e,t){var r;return Mye(e,function(n,a,o){return r=t(n,a,o),!r}),!!r}FV.exports=Dye});var qV=M((RWe,jV)=>{var Nye=UP(),Fye=Ea(),Bye=BV(),jye=Dr(),qye=fp();function Uye(e,t,r){var n=jye(e)?Nye:Bye;return r&&qye(e,t,r)&&(t=void 0),n(e,Fye(t,3))}jV.exports=Uye});var WV=M((MWe,HV)=>{var UV=mI();function Hye(e,t,r){t=="__proto__"&&UV?UV(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}HV.exports=Hye});var VV=M((DWe,zV)=>{var Wye=WV(),zye=fI(),Vye=Ea();function $ye(e,t){var r={};return t=Vye(t,3),zye(e,function(n,a,o){Wye(r,a,t(n,a,o))}),r}zV.exports=$ye});var GV=M((NWe,$V)=>{function Gye(e,t){for(var r=-1,n=e==null?0:e.length;++r{var Kye=Iy();function Xye(e,t){var r=!0;return Kye(e,function(n,a,o){return r=!!t(n,a,o),r}),r}KV.exports=Xye});var IA=M((BWe,YV)=>{var Yye=GV(),Jye=XV(),Qye=Ea(),Zye=Dr(),exe=fp();function txe(e,t,r){var n=Zye(e)?Yye:Jye;return r&&exe(e,t,r)&&(t=void 0),n(e,Qye(t,3))}YV.exports=txe});var v5=M((i3e,h5)=>{var Sxe=Ea(),Cxe=rc(),Pxe=cp();function Ixe(e){return function(t,r,n){var a=Object(t);if(!Cxe(t)){var o=Sxe(r,3);t=Pxe(t),r=function(s){return o(a[s],s,a)}}var i=e(t,r,n);return i>-1?a[o?t[i]:i]:void 0}}h5.exports=Ixe});var y5=M((s3e,g5)=>{var Lxe=xA();function Axe(e){var t=Lxe(e),r=t%1;return t===t?r?t-r:t:0}g5.exports=Axe});var b5=M((l3e,x5)=>{var Oxe=iI(),kxe=Ea(),Exe=y5(),Txe=Math.max;function Rxe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Exe(r);return a<0&&(a=Txe(n+a,0)),Oxe(e,kxe(t,3),a)}x5.exports=Rxe});var S5=M((u3e,w5)=>{var _xe=v5(),Mxe=b5(),Dxe=_xe(Mxe);w5.exports=Dxe});var g$=M((Yze,$A)=>{"use strict";var Hbe=Object.prototype.hasOwnProperty,qr="~";function Hm(){}Object.create&&(Hm.prototype=Object.create(null),new Hm().__proto__||(qr=!1));function Wbe(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function v$(e,t,r,n,a){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new Wbe(r,n||e,a),i=qr?qr+t:t;return e._events[i]?e._events[i].fn?e._events[i]=[e._events[i],o]:e._events[i].push(o):(e._events[i]=o,e._eventsCount++),e}function bb(e,t){--e._eventsCount===0?e._events=new Hm:delete e._events[t]}function Lr(){this._events=new Hm,this._eventsCount=0}Lr.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)Hbe.call(r,n)&&t.push(qr?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Lr.prototype.listeners=function(t){var r=qr?qr+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,o=n.length,i=new Array(o);a{"use strict";var IG=Ti();BO.createRoot=IG.createRoot,BO.hydrateRoot=IG.hydrateRoot;var e8e});(function(){var e=t();function t(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function a(o,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var s=document.createEvent("CustomEvent");return s.initCustomEvent(o,i.bubbles,i.cancelable,i.detail),s}return a.prototype=window.Event.prototype,a}function r(a,o){var i=document.createElement("input");return i.type="hidden",i.name=a,i.value=o,i}function n(a,o){var i=a.getAttribute("data-to"),s=r("_method",a.getAttribute("data-method")),l=r("_csrf_token",a.getAttribute("data-csrf")),u=document.createElement("form"),f=document.createElement("input"),c=a.getAttribute("target");u.method=a.getAttribute("data-method")==="get"?"get":"post",u.action=i,u.style.display="none",c?u.target=c:o&&(u.target="_blank"),u.appendChild(l),u.appendChild(s),document.body.appendChild(u),f.type="submit",u.appendChild(f),f.click()}window.addEventListener("click",function(a){var o=a.target;if(!a.defaultPrevented)for(;o&&o.getAttribute;){var i=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!o.dispatchEvent(i))return a.preventDefault(),a.stopImmediatePropagation(),!1;if(o.getAttribute("data-method")&&o.getAttribute("data-to"))return n(o,a.metaKey||a.shiftKey),a.preventDefault(),!1;o=o.parentNode}},!1),window.addEventListener("phoenix.link.click",function(a){var o=a.target.getAttribute("data-confirm");o&&!window.confirm(o)&&a.preventDefault()},!1)})();var gf=e=>typeof e=="function"?e:function(){return e},NG=typeof self<"u"?self:null,vf=typeof window<"u"?window:null,us=NG||vf||us,FG="2.0.0",qa={connecting:0,open:1,closing:2,closed:3},BG=1e4,jG=1e3,cn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},vo={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Hb={longpoll:"longpoll",websocket:"websocket"},qG={complete:4},lh=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},VO=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},UG=class{constructor(e,t,r){this.state=cn.closed,this.topic=e,this.params=gf(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new lh(this,vo.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new VO(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=cn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=cn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=cn.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=cn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new lh(this,vo.leave,gf({}),this.timeout).send(),this.state=cn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(vo.reply,(n,a)=>{this.trigger(this.replyEventName(a),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(vo.close,e)}onError(e){return this.on(vo.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new lh(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=cn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(vo.close,"leave")},r=new lh(this,vo.leave,gf({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=cn.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let a=this.onMessage(e,t,r,n);if(t&&!a)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(i=>i.event===e);for(let i=0;i{let s=this.parseJSON(e.responseText);i&&i(s)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,a,o,i,s){return e.open(t,r,!0),e.timeout=o,e.setRequestHeader("Content-Type",n),e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{if(e.readyState===qG.complete&&s){let l=this.parseJSON(e.responseText);s(l)}},i&&(e.ontimeout=i),e.send(a),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let a=t?`${t}[${n}]`:n,o=e[n];typeof o=="object"?r.push(this.serialize(o,a)):r.push(encodeURIComponent(a)+"="+encodeURIComponent(o))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},HG=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let a=0;athis.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Hb.websocket),"$1/"+Hb.longpoll)}endpointURL(){return ch.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=qa.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===qa.open||this.readyState===qa.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:r,messages:n}=e;this.token=r}else t=0;switch(t){case 200:n.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=qa.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}})}send(e){typeof e!="string"&&(e=HG(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",e.join(` +`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let a of this.reqs)a.abort();this.readyState=qa.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,a){let o,i=()=>{this.reqs.delete(o),n()};o=ch.request(e,this.endpointURL(),t,r,this.timeout,i,s=>{this.reqs.delete(o),this.isActive()&&a(s)}),this.reqs.add(o)}};var uh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,a,o,i]=JSON.parse(e);return t({join_ref:r,ref:n,topic:a,event:o,payload:i})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:a,payload:o}=e,i=this.META_LENGTH+t.length+r.length+a.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+i),l=new DataView(s),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,a.length),l.setUint8(u++,n.length),Array.from(t,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(r,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(a,c=>l.setUint8(u++,c.charCodeAt(0))),Array.from(n,c=>l.setUint8(u++,c.charCodeAt(0)));var f=new Uint8Array(s.byteLength+o.byteLength);return f.set(new Uint8Array(s),0),f.set(new Uint8Array(o),s.byteLength),f.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),o=t.getUint8(3),i=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(i,i+n));i=i+n;let l=r.decode(e.slice(i,i+a));i=i+a;let u=r.decode(e.slice(i,i+o));i=i+o;let f=e.slice(i,e.byteLength);return{join_ref:s,ref:null,topic:l,event:u,payload:f}},decodeReply(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),o=t.getUint8(3),i=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(s,s+n));s=s+n;let u=r.decode(e.slice(s,s+a));s=s+a;let f=r.decode(e.slice(s,s+o));s=s+o;let c=r.decode(e.slice(s,s+i));s=s+i;let d=e.slice(s,e.byteLength),p={status:c,response:d};return{join_ref:l,ref:u,topic:f,event:vo.reply,payload:p}},decodeBroadcast(e,t,r){let n=t.getUint8(1),a=t.getUint8(2),o=this.HEADER_LENGTH+2,i=r.decode(e.slice(o,o+n));o=o+n;let s=r.decode(e.slice(o,o+a));o=o+a;let l=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:i,event:s,payload:l}}},$O=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||BG,this.transport=t.transport||us.WebSocket||hf,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||us&&us.sessionStorage,this.establishedConnections=0,this.defaultEncoder=uh.encode.bind(uh),this.defaultDecoder=uh.decode.bind(uh),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==hf?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;vf&&vf.addEventListener&&(vf.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),vf.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,a,o)=>{console.log(`${n}: ${a}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=gf(t.params||{}),this.endPoint=`${e}/${Hb.websocket}`,this.vsn=t.vsn||FG,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new VO(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return hf}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=ch.appendParams(ch.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(e,t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=gf(e)),!this.conn&&(this.longPollFallbackMs&&this.transport!==hf?this.connectWithFallback(hf,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(a=>{a.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,a,o,i=s=>{this.log("transport",`falling back to ${e.name}...`,s),this.off([a,o]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${e.name}`))return i("memorized");this.fallbackTimer=setTimeout(i,t),o=this.onError(s=>{this.log("transport","error",s),n&&!r&&(clearTimeout(this.fallbackTimer),i(s))}),this.onOpen(()=>{if(r=!0,!n)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${e.name}`,"true"),this.log("transport",`established ${e.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(i,t),this.ping(s=>{this.log("transport","connected to primary after",s),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),jG,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();this.waitForBufferDone(()=>{this.conn&&(t?this.conn.close(t,r||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t=1){if(t===5||!this.conn||!this.conn.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(e,t+1)},150*t)}waitForSocketClosed(e,t=1){if(t===5||!this.conn||this.conn.readyState===qa.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(e,t+1)},150*t)}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&t!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,r])=>r(e))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(e,t,r)}),(t===this.transport||r>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(vo.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case qa.connecting:return"connecting";case qa.open:return"open";case qa.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new UG(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:a,join_ref:o}=e;this.log("push",`${t} ${r} (${o}, ${a})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:a,ref:o,join_ref:i}=t;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${a.status||""} ${r} ${n} ${o&&"("+o+")"||""}`,a);for(let s=0;sr.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};var bk="consecutive-reloads",WG=10,zG=5e3,VG=1e4,$G=3e4,wk=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],yo="data-phx-component",Wb="data-phx-link",GG="track-static",KG="data-phx-link-state",Ml="data-phx-ref-loading",ya="data-phx-ref-src",Nn="data-phx-ref-lock",Sk="track-uploads",xo="data-phx-upload-ref",rw="data-phx-preflighted-refs",XG="data-phx-done-refs",GO="drop-target",Jb="data-phx-active-refs",yh="phx:live-file:updated",Ck="data-phx-skip",Pk="data-phx-id",KO="data-phx-prune",Qb="page-loading",XO="phx-connected",yf="phx-loading",fh="phx-error",YO="phx-client-error",zb="phx-server-error",ds="data-phx-parent-id",nw="data-phx-main",ii="data-phx-root-id",Zb="viewport-top",ew="viewport-bottom",YG="trigger-action",bh="phx-has-focused",JG=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],Ik=["checkbox","radio"],Of="phx-has-submitted",za="data-phx-session",Nl=`[${za}]`,JO="data-phx-sticky",fs="data-phx-static",tw="data-phx-readonly",_l="data-phx-disabled",QO="disable-with",wh="data-phx-disable-with-restore",xf="hook",QG="debounce",ZG="throttle",Lf="update",Vb="stream",$b="data-phx-stream",e6="key",Ua="phxPrivate",ZO="auto-recover",dh="phx:live-socket:debug",Gb="phx:live-socket:profiling",Kb="phx:live-socket:latency-sim",t6="progress",ek="mounted",r6=1,n6=200,a6="phx-",o6=3e4,bf="debounce-trigger",wf="throttled",tk="debounce-prev-key",i6={debounce:300,throttle:300},rk=[Ml,ya,Nn,Qb],ph="d",Ha="s",Xb="r",Ar="c",nk="e",ak="r",ok="t",s6="p",ik="stream",l6=class{constructor(e,t,r){this.liveSocket=r,this.entry=e,this.offset=0,this.chunkSize=t,this.chunkTimer=null,this.errored=!1,this.uploadChannel=r.channel(`lvu:${e.ref}`,{token:e.metadata()})}error(e){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(e))}upload(){this.uploadChannel.onError(e=>this.error(e)),this.uploadChannel.join().receive("ok",e=>this.readNextChunk()).receive("error",e=>this.error(e))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let e=new window.FileReader,t=this.entry.file.slice(this.offset,this.chunkSize+this.offset);e.onload=r=>{if(r.target.error===null)this.offset+=r.target.result.byteLength,this.pushChunk(r.target.result);else return fn("Read error: "+r.target.error)},e.readAsArrayBuffer(t)}pushChunk(e){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:t})=>this.error(t))}},fn=(e,t)=>console.error&&console.error(e,t),go=e=>{let t=typeof e;return t==="number"||t==="string"&&/^(0|[1-9]\d*)$/.test(e)};function u6(){let e=new Set,t=document.querySelectorAll("*[id]");for(let r=0,n=t.length;r{e.liveSocket.isDebugEnabled()&&console.log(`${e.id} ${t}: ${r} - `,n)},Sf=e=>typeof e=="function"?e:function(){return e},xh=e=>JSON.parse(JSON.stringify(e)),Af=(e,t,r)=>{do{if(e.matches(`[${t}]`)&&!e.disabled)return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1&&!(r&&r.isSameNode(e)||e.matches(Nl)));return null},Rl=e=>e!==null&&typeof e=="object"&&!(e instanceof Array),f6=(e,t)=>JSON.stringify(e)===JSON.stringify(t),sk=e=>{for(let t in e)return!1;return!0},oi=(e,t)=>e&&t(e),d6=function(e,t,r,n){e.forEach(a=>{new l6(a,r.config.chunk_size,n).upload()})},Lk={canPushState(){return typeof history.pushState<"u"},dropLocal(e,t,r){return e.removeItem(this.localKey(t,r))},updateLocal(e,t,r,n,a){let o=this.getLocal(e,t,r),i=this.localKey(t,r),s=o===null?n:a(o);return e.setItem(i,JSON.stringify(s)),s},getLocal(e,t,r){return JSON.parse(e.getItem(this.localKey(t,r)))},updateCurrentState(e){this.canPushState()&&history.replaceState(e(history.state||{}),"",window.location.href)},pushState(e,t,r){if(this.canPushState()){if(r!==window.location.href){if(t.type=="redirect"&&t.scroll){let a=history.state||{};a.scroll=t.scroll,history.replaceState(a,"",window.location.href)}delete t.scroll,history[e+"State"](t,"",r||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():t.type==="redirect"&&window.scroll(0,0)}}else this.redirect(r)},setCookie(e,t){document.cookie=`${e}=${t}`},getCookie(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${e}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(e,t){t&&Lk.setCookie("__phoenix_flash__",t+"; max-age=60000; path=/"),window.location=e},localKey(e,t){return`${e}-${t}`},getHashTargetEl(e){let t=e.toString().substring(1);if(t!=="")return document.getElementById(t)||document.querySelector(`a[name="${t}"]`)}},Wa=Lk,p6={focusMain(){let e=document.querySelector("main h1, main, h1");if(e){let t=e.tabIndex;e.tabIndex=-1,e.focus(),e.tabIndex=t}},anyOf(e,t){return t.find(r=>e instanceof r)},isFocusable(e,t){return e instanceof HTMLAnchorElement&&e.rel!=="ignore"||e instanceof HTMLAreaElement&&e.href!==void 0||!e.disabled&&this.anyOf(e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||e instanceof HTMLIFrameElement||e.tabIndex>0||!t&&e.getAttribute("tabindex")!==null&&e.getAttribute("aria-hidden")!=="true"},attemptFocus(e,t){if(this.isFocusable(e,t))try{e.focus()}catch{}return!!document.activeElement&&document.activeElement.isSameNode(e)},focusFirstInteractive(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t,!0)||this.focusFirstInteractive(t,!0))return!0;t=t.nextElementSibling}},focusFirst(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t)||this.focusFirst(t))return!0;t=t.nextElementSibling}},focusLast(e){let t=e.lastElementChild;for(;t;){if(this.attemptFocus(t)||this.focusLast(t))return!0;t=t.previousElementSibling}}},Dl=p6,lk=[],uk=200,m6={exec(e,t,r,n,a){let[o,i]=a||[null,{callback:a&&a.callback}];(t.charAt(0)==="["?JSON.parse(t):[[o,i]]).forEach(([l,u])=>{l===o&&i.data&&(u.data=Object.assign(u.data||{},i.data),u.callback=u.callback||i.callback),this.filterToEls(n,u).forEach(f=>{this[`exec_${l}`](e,t,r,n,f,u)})})},isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length>0)},isInViewport(e){let t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return t.right>0&&t.bottom>0&&t.left{let u=l.getAttribute(o);if(!u)throw new Error(`expected ${o} to contain JS command on "${i}"`);r.liveSocket.execJS(l,u,e)})},exec_dispatch(e,t,r,n,a,{to:o,event:i,detail:s,bubbles:l}){s=s||{},s.dispatcher=n,z.dispatchEvent(a,i,{detail:s,bubbles:l})},exec_push(e,t,r,n,a,o){let{event:i,data:s,target:l,page_loading:u,loading:f,value:c,dispatcher:d,callback:p}=o,h={loading:f,value:c,target:l,page_loading:!!u},m=e==="change"&&d?d:n,x=l||m.getAttribute(r.binding("target"))||m;r.withinTargets(x,(g,v)=>{if(g.isConnected())if(e==="change"){let{newCid:w,_target:b}=o;b=b||(z.isFormInput(n)?n.name:void 0),b&&(h._target=b),g.pushInput(n,v,w,i||t,h,p)}else if(e==="submit"){let{submitter:w}=o;g.submitForm(n,v,i||t,w,h,p)}else g.pushEvent(e,n,v,i||t,s,h,p)})},exec_navigate(e,t,r,n,a,{href:o,replace:i}){r.liveSocket.historyRedirect(o,i?"replace":"push")},exec_patch(e,t,r,n,a,{href:o,replace:i}){r.liveSocket.pushHistoryPatch(o,i?"replace":"push",n)},exec_focus(e,t,r,n,a){window.requestAnimationFrame(()=>Dl.attemptFocus(a))},exec_focus_first(e,t,r,n,a){window.requestAnimationFrame(()=>Dl.focusFirstInteractive(a)||Dl.focusFirst(a))},exec_push_focus(e,t,r,n,a){window.requestAnimationFrame(()=>lk.push(a||n))},exec_pop_focus(e,t,r,n,a){window.requestAnimationFrame(()=>{let o=lk.pop();o&&o.focus()})},exec_add_class(e,t,r,n,a,{names:o,transition:i,time:s,blocking:l}){this.addOrRemoveClasses(a,o,[],i,s,r,l)},exec_remove_class(e,t,r,n,a,{names:o,transition:i,time:s,blocking:l}){this.addOrRemoveClasses(a,[],o,i,s,r,l)},exec_toggle_class(e,t,r,n,a,{to:o,names:i,transition:s,time:l,blocking:u}){this.toggleClasses(a,i,s,l,r,u)},exec_toggle_attr(e,t,r,n,a,{attr:[o,i,s]}){a.hasAttribute(o)?s!==void 0?a.getAttribute(o)===i?this.setOrRemoveAttrs(a,[[o,s]],[]):this.setOrRemoveAttrs(a,[[o,i]],[]):this.setOrRemoveAttrs(a,[],[o]):this.setOrRemoveAttrs(a,[[o,i]],[])},exec_transition(e,t,r,n,a,{time:o,transition:i,blocking:s}){this.addOrRemoveClasses(a,[],[],i,o,r,s)},exec_toggle(e,t,r,n,a,{display:o,ins:i,outs:s,time:l,blocking:u}){this.toggle(e,r,a,o,i,s,l,u)},exec_show(e,t,r,n,a,{display:o,transition:i,time:s,blocking:l}){this.show(e,r,a,o,i,s,l)},exec_hide(e,t,r,n,a,{display:o,transition:i,time:s,blocking:l}){this.hide(e,r,a,o,i,s,l)},exec_set_attr(e,t,r,n,a,{attr:[o,i]}){this.setOrRemoveAttrs(a,[[o,i]],[])},exec_remove_attr(e,t,r,n,a,{attr:o}){this.setOrRemoveAttrs(a,[],[o])},show(e,t,r,n,a,o,i){this.isVisible(r)||this.toggle(e,t,r,n,a,null,o,i)},hide(e,t,r,n,a,o,i){this.isVisible(r)&&this.toggle(e,t,r,n,null,a,o,i)},toggle(e,t,r,n,a,o,i,s){i=i||uk;let[l,u,f]=a||[[],[],[]],[c,d,p]=o||[[],[],[]];if(l.length>0||c.length>0)if(this.isVisible(r)){let h=()=>{this.addOrRemoveClasses(r,d,l.concat(u).concat(f)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(r,c,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(r,p,d))})},m=()=>{this.addOrRemoveClasses(r,[],c.concat(p)),z.putSticky(r,"toggle",x=>x.style.display="none"),r.dispatchEvent(new Event("phx:hide-end"))};r.dispatchEvent(new Event("phx:hide-start")),s===!1?(h(),setTimeout(m,i)):t.transition(i,h,m)}else{if(e==="remove")return;let h=()=>{this.addOrRemoveClasses(r,u,c.concat(d).concat(p));let x=n||this.defaultDisplay(r);z.putSticky(r,"toggle",g=>g.style.display=x),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(r,l,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(r,f,u))})},m=()=>{this.addOrRemoveClasses(r,[],l.concat(f)),r.dispatchEvent(new Event("phx:show-end"))};r.dispatchEvent(new Event("phx:show-start")),s===!1?(h(),setTimeout(m,i)):t.transition(i,h,m)}else this.isVisible(r)?window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("phx:hide-start")),z.putSticky(r,"toggle",h=>h.style.display="none"),r.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("phx:show-start"));let h=n||this.defaultDisplay(r);z.putSticky(r,"toggle",m=>m.style.display=h),r.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(e,t,r,n,a){window.requestAnimationFrame(()=>{let[o,i]=z.getSticky(e,"classes",[[],[]]),s=t.filter(u=>o.indexOf(u)<0&&!e.classList.contains(u)),l=t.filter(u=>i.indexOf(u)<0&&e.classList.contains(u));this.addOrRemoveClasses(e,s,l,r,n,a)})},addOrRemoveClasses(e,t,r,n,a,o,i){a=a||uk;let[s,l,u]=n||[[],[],[]];if(s.length>0){let f=()=>{this.addOrRemoveClasses(e,l,[].concat(s).concat(u)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(e,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(e,u,l))})},c=()=>this.addOrRemoveClasses(e,t.concat(u),r.concat(s).concat(l));i===!1?(f(),setTimeout(c,a)):o.transition(a,f,c);return}window.requestAnimationFrame(()=>{let[f,c]=z.getSticky(e,"classes",[[],[]]),d=t.filter(x=>f.indexOf(x)<0&&!e.classList.contains(x)),p=r.filter(x=>c.indexOf(x)<0&&e.classList.contains(x)),h=f.filter(x=>r.indexOf(x)<0).concat(d),m=c.filter(x=>t.indexOf(x)<0).concat(p);z.putSticky(e,"classes",x=>(x.classList.remove(...m),x.classList.add(...h),[h,m]))})},setOrRemoveAttrs(e,t,r){let[n,a]=z.getSticky(e,"attrs",[[],[]]),o=t.map(([l,u])=>l).concat(r),i=n.filter(([l,u])=>!o.includes(l)).concat(t),s=a.filter(l=>!o.includes(l)).concat(r);z.putSticky(e,"attrs",l=>(s.forEach(u=>l.removeAttribute(u)),i.forEach(([u,f])=>l.setAttribute(u,f)),[i,s]))},hasAllClasses(e,t){return t.every(r=>e.classList.contains(r))},isToggledOut(e,t){return!this.isVisible(e)||this.hasAllClasses(e,t)},filterToEls(e,{to:t}){return t?z.all(document,t):[e]},defaultDisplay(e){return{tr:"table-row",td:"table-cell"}[e.tagName.toLowerCase()]||"block"}},ga=m6,cs={byId(e){return document.getElementById(e)||fn(`no id found for ${e}`)},removeClass(e,t){e.classList.remove(t),e.classList.length===0&&e.removeAttribute("class")},all(e,t,r){if(!e)return[];let n=Array.from(e.querySelectorAll(t));return r?n.forEach(r):n},childNodeLength(e){let t=document.createElement("template");return t.innerHTML=e,t.content.childElementCount},isUploadInput(e){return e.type==="file"&&e.getAttribute(xo)!==null},isAutoUpload(e){return e.hasAttribute("data-phx-auto-upload")},findUploadInputs(e){let t=e.id,r=this.all(document,`input[type="file"][${xo}][form="${t}"]`);return this.all(e,`input[type="file"][${xo}]`).concat(r)},findComponentNodeList(e,t){return this.filterWithinSameLiveView(this.all(e,`[${yo}="${t}"]`),e)},isPhxDestroyed(e){return!!(e.id&&cs.private(e,"destroyed"))},wantsNewTab(e){let t=e.ctrlKey||e.shiftKey||e.metaKey||e.button&&e.button===1,r=e.target instanceof HTMLAnchorElement&&e.target.hasAttribute("download"),n=e.target.hasAttribute("target")&&e.target.getAttribute("target").toLowerCase()==="_blank",a=e.target.hasAttribute("target")&&!e.target.getAttribute("target").startsWith("_");return t||n||r||a},isUnloadableFormSubmit(e){return e.target&&e.target.getAttribute("method")==="dialog"||e.submitter&&e.submitter.getAttribute("formmethod")==="dialog"?!1:!e.defaultPrevented&&!this.wantsNewTab(e)},isNewPageClick(e,t){let r=e.target instanceof HTMLAnchorElement?e.target.getAttribute("href"):null,n;if(e.defaultPrevented||r===null||this.wantsNewTab(e)||r.startsWith("mailto:")||r.startsWith("tel:")||e.target.isContentEditable)return!1;try{n=new URL(r)}catch{try{n=new URL(r,t)}catch{return!0}}return n.host===t.host&&n.protocol===t.protocol&&n.pathname===t.pathname&&n.search===t.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(e){this.isPhxChild(e)&&e.setAttribute(za,""),this.putPrivate(e,"destroyed",!0)},findPhxChildrenInFragment(e,t){let r=document.createElement("template");return r.innerHTML=e,this.findPhxChildren(r.content,t)},isIgnored(e,t){return(e.getAttribute(t)||e.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(e,t,r){return e.getAttribute&&r.indexOf(e.getAttribute(t))>=0},findPhxSticky(e){return this.all(e,`[${JO}]`)},findPhxChildren(e,t){return this.all(e,`${Nl}[${ds}="${t}"]`)},findExistingParentCIDs(e,t){let r=new Set,n=new Set;return t.forEach(a=>{this.filterWithinSameLiveView(this.all(e,`[${yo}="${a}"]`),e).forEach(o=>{r.add(a),this.all(o,`[${yo}]`).map(i=>parseInt(i.getAttribute(yo))).forEach(i=>n.add(i))})}),n.forEach(a=>r.delete(a)),r},filterWithinSameLiveView(e,t){return t.querySelector(Nl)?e.filter(r=>this.withinSameLiveView(r,t)):e},withinSameLiveView(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(e.getAttribute(za)!==null)return!1}},private(e,t){return e[Ua]&&e[Ua][t]},deletePrivate(e,t){e[Ua]&&delete e[Ua][t]},putPrivate(e,t,r){e[Ua]||(e[Ua]={}),e[Ua][t]=r},updatePrivate(e,t,r,n){let a=this.private(e,t);a===void 0?this.putPrivate(e,t,n(r)):this.putPrivate(e,t,n(a))},syncPendingAttrs(e,t){e.hasAttribute(ya)&&(wk.forEach(r=>{e.classList.contains(r)&&t.classList.add(r)}),rk.filter(r=>e.hasAttribute(r)).forEach(r=>{t.setAttribute(r,e.getAttribute(r))}))},copyPrivates(e,t){t[Ua]&&(e[Ua]=t[Ua])},putTitle(e){let t=document.querySelector("title");if(t){let{prefix:r,suffix:n}=t.dataset;document.title=`${r||""}${e}${n||""}`}else document.title=e},debounce(e,t,r,n,a,o,i,s){let l=e.getAttribute(r),u=e.getAttribute(a);l===""&&(l=n),u===""&&(u=o);let f=l||u;switch(f){case null:return s();case"blur":this.once(e,"debounce-blur")&&e.addEventListener("blur",()=>{i()&&s()});return;default:let c=parseInt(f),d=()=>u?this.deletePrivate(e,wf):s(),p=this.incCycle(e,bf,d);if(isNaN(c))return fn(`invalid throttle/debounce value: ${f}`);if(u){let m=!1;if(t.type==="keydown"){let x=this.private(e,tk);this.putPrivate(e,tk,t.key),m=x!==t.key}if(!m&&this.private(e,wf))return!1;{s();let x=setTimeout(()=>{i()&&this.triggerCycle(e,bf)},c);this.putPrivate(e,wf,x)}}else setTimeout(()=>{i()&&this.triggerCycle(e,bf,p)},c);let h=e.form;h&&this.once(h,"bind-debounce")&&h.addEventListener("submit",()=>{Array.from(new FormData(h).entries(),([m])=>{let x=h.querySelector(`[name="${m}"]`);this.incCycle(x,bf),this.deletePrivate(x,wf)})}),this.once(e,"bind-debounce")&&e.addEventListener("blur",()=>{clearTimeout(this.private(e,wf)),this.triggerCycle(e,bf)})}},triggerCycle(e,t,r){let[n,a]=this.private(e,t);r||(r=n),r===n&&(this.incCycle(e,t),a())},once(e,t){return this.private(e,t)===!0?!1:(this.putPrivate(e,t,!0),!0)},incCycle(e,t,r=function(){}){let[n]=this.private(e,t)||[0,r];return n++,this.putPrivate(e,t,[n,r]),n},maybeAddPrivateHooks(e,t,r){e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute(r))&&e.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},isUsedInput(e){return e.nodeType===Node.ELEMENT_NODE&&(this.private(e,bh)||this.private(e,Of))},resetForm(e){Array.from(e.elements).forEach(t=>{this.deletePrivate(t,bh),this.deletePrivate(t,Of)})},isPhxChild(e){return e.getAttribute&&e.getAttribute(ds)},isPhxSticky(e){return e.getAttribute&&e.getAttribute(JO)!==null},isChildOfAny(e,t){return!!t.find(r=>r.contains(e))},firstPhxChild(e){return this.isPhxChild(e)?e:this.all(e,`[${ds}]`)[0]},dispatchEvent(e,t,r={}){let n=!0;e.nodeName==="INPUT"&&e.type==="file"&&t==="click"&&(n=!1);let i={bubbles:r.bubbles===void 0?n:!!r.bubbles,cancelable:!0,detail:r.detail||{}},s=t==="click"?new MouseEvent("click",i):new CustomEvent(t,i);e.dispatchEvent(s)},cloneNode(e,t){if(typeof t>"u")return e.cloneNode(!0);{let r=e.cloneNode(!1);return r.innerHTML=t,r}},mergeAttrs(e,t,r={}){let n=new Set(r.exclude||[]),a=r.isIgnored,o=t.attributes;for(let s=o.length-1;s>=0;s--){let l=o[s].name;if(n.has(l))l==="value"&&e.value===t.value&&e.setAttribute("value",t.getAttribute(l));else{let u=t.getAttribute(l);e.getAttribute(l)!==u&&(!a||a&&l.startsWith("data-"))&&e.setAttribute(l,u)}}let i=e.attributes;for(let s=i.length-1;s>=0;s--){let l=i[s].name;a?l.startsWith("data-")&&!t.hasAttribute(l)&&!rk.includes(l)&&e.removeAttribute(l):t.hasAttribute(l)||e.removeAttribute(l)}},mergeFocusedInput(e,t){e instanceof HTMLSelectElement||cs.mergeAttrs(e,t,{exclude:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange(e){return e.setSelectionRange&&(e.type==="text"||e.type==="textarea")},restoreFocus(e,t,r){if(e instanceof HTMLSelectElement&&e.focus(),!cs.isTextualInput(e))return;e.matches(":focus")||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,r)},isFormInput(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&e.type!=="button"},syncAttrsToProps(e){e instanceof HTMLInputElement&&Ik.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=e.getAttribute("checked")!==null)},isTextualInput(e){return JG.indexOf(e.type)>=0},isNowTriggerFormExternal(e,t){return e.getAttribute&&e.getAttribute(t)!==null},cleanChildNodes(e,t){if(cs.isPhxUpdate(e,t,["append","prepend"])){let r=[];e.childNodes.forEach(n=>{n.id||(!(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()==="")&&n.nodeType!==Node.COMMENT_NODE&&fn(`only HTML element tags with an id are allowed inside containers with phx-update. + +removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}" + +`),r.push(n))}),r.forEach(n=>n.remove())}},replaceRootContainer(e,t,r){let n=new Set(["id",za,fs,nw,ii]);if(e.tagName.toLowerCase()===t.toLowerCase())return Array.from(e.attributes).filter(a=>!n.has(a.name.toLowerCase())).forEach(a=>e.removeAttribute(a.name)),Object.keys(r).filter(a=>!n.has(a.toLowerCase())).forEach(a=>e.setAttribute(a,r[a])),e;{let a=document.createElement(t);return Object.keys(r).forEach(o=>a.setAttribute(o,r[o])),n.forEach(o=>a.setAttribute(o,e.getAttribute(o))),a.innerHTML=e.innerHTML,e.replaceWith(a),a}},getSticky(e,t,r){let n=(cs.private(e,"sticky")||[]).find(([a])=>t===a);if(n){let[a,o,i]=n;return i}else return typeof r=="function"?r():r},deleteSticky(e,t){this.updatePrivate(e,"sticky",[],r=>r.filter(([n,a])=>n!==t))},putSticky(e,t,r){let n=r(e);this.updatePrivate(e,"sticky",[],a=>{let o=a.findIndex(([i])=>t===i);return o>=0?a[o]=[t,r,n]:a.push([t,r,n]),a})},applyStickyOperations(e){let t=cs.private(e,"sticky");t&&t.forEach(([r,n,a])=>this.putSticky(e,r,n))}},z=cs,Cf=class{static isActive(e,t){let r=t._phxRef===void 0,a=e.getAttribute(Jb).split(",").indexOf(Ot.genFileRef(t))>=0;return t.size>0&&(r||a)}static isPreflighted(e,t){return e.getAttribute(rw).split(",").indexOf(Ot.genFileRef(t))>=0&&this.isActive(e,t)}static isPreflightInProgress(e){return e._preflightInProgress===!0}static markPreflightInProgress(e){e._preflightInProgress=!0}constructor(e,t,r,n){this.ref=Ot.genFileRef(t),this.fileEl=e,this.file=t,this.view=r,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(yh,this._onElUpdated),this.autoUpload=n}metadata(){return this.meta}progress(e){this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Ot.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(e="failed"){this.fileEl.removeEventListener(yh,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:e}),this.isAutoUpload()||Ot.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(e){this._onDone=()=>{this.fileEl.removeEventListener(yh,this._onElUpdated),e()}}onElUpdated(){this.fileEl.getAttribute(Jb).split(",").indexOf(this.ref)===-1&&(Ot.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(e){if(this.meta.uploader){let t=e[this.meta.uploader]||fn(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:t}}else return{name:"channel",callback:d6}}zipPostFlight(e){this.meta=e.entries[this.ref],this.meta||fn(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:e})}},h6=0,Ot=class{static genFileRef(e){let t=e._phxRef;return t!==void 0?t:(e._phxRef=(h6++).toString(),e._phxRef)}static getEntryDataURL(e,t,r){let n=this.activeFiles(e).find(a=>this.genFileRef(a)===t);r(URL.createObjectURL(n))}static hasUploadsInProgress(e){let t=0;return z.findUploadInputs(e).forEach(r=>{r.getAttribute(rw)!==r.getAttribute(XG)&&t++}),t>0}static serializeUploads(e){let t=this.activeFiles(e),r={};return t.forEach(n=>{let a={path:e.name},o=e.getAttribute(xo);r[o]=r[o]||[],a.ref=this.genFileRef(n),a.last_modified=n.lastModified,a.name=n.name||a.ref,a.relative_path=n.webkitRelativePath,a.type=n.type,a.size=n.size,typeof n.meta=="function"&&(a.meta=n.meta()),r[o].push(a)}),r}static clearFiles(e){e.value=null,e.removeAttribute(xo),z.putPrivate(e,"files",[])}static untrackFile(e,t){z.putPrivate(e,"files",z.private(e,"files").filter(r=>!Object.is(r,t)))}static trackFiles(e,t,r){if(e.getAttribute("multiple")!==null){let n=t.filter(a=>!this.activeFiles(e).find(o=>Object.is(o,a)));z.updatePrivate(e,"files",[],a=>a.concat(n)),e.value=null}else r&&r.files.length>0&&(e.files=r.files),z.putPrivate(e,"files",t)}static activeFileInputs(e){let t=z.findUploadInputs(e);return Array.from(t).filter(r=>r.files&&this.activeFiles(r).length>0)}static activeFiles(e){return(z.private(e,"files")||[]).filter(t=>Cf.isActive(e,t))}static inputsAwaitingPreflight(e){let t=z.findUploadInputs(e);return Array.from(t).filter(r=>this.filesAwaitingPreflight(r).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(t=>!Cf.isPreflighted(e,t)&&!Cf.isPreflightInProgress(t))}static markPreflightInProgress(e){e.forEach(t=>Cf.markPreflightInProgress(t.file))}constructor(e,t,r){this.autoUpload=z.isAutoUpload(e),this.view=t,this.onComplete=r,this._entries=Array.from(Ot.filesAwaitingPreflight(e)||[]).map(n=>new Cf(e,n,t,this.autoUpload)),Ot.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(e,t,r){this._entries=this._entries.map(a=>(a.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(a.zipPostFlight(e),a.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),a));let n=this._entries.reduce((a,o)=>{if(!o.meta)return a;let{name:i,callback:s}=o.uploader(r.uploaders);return a[i]=a[i]||{callback:s,entries:[]},a[i].entries.push(o),a},{});for(let a in n){let{callback:o,entries:i}=n[a];o(i,t,e,r)}}},Ak={LiveFileUpload:{activeRefs(){return this.el.getAttribute(Jb)},preflightedRefs(){return this.el.getAttribute(rw)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,e===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(yh))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(xo)),Ot.getEntryDataURL(this.inputEl,this.ref,e=>{this.url=e,this.el.src=e})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Dl.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Dl.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Dl.focusFirst(this.el)}}},Ok=e=>["HTML","BODY"].indexOf(e.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>=0?e:Ok(e.parentElement),ck=e=>e?e.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,aw=e=>e?e.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,ow=e=>e?e.getBoundingClientRect().top:0,v6=(e,t)=>{let r=e.getBoundingClientRect();return r.top>=ow(t)&&r.left>=0&&r.top<=aw(t)},g6=(e,t)=>{let r=e.getBoundingClientRect();return r.right>=ow(t)&&r.left>=0&&r.bottom<=aw(t)},fk=(e,t)=>{let r=e.getBoundingClientRect();return r.top>=ow(t)&&r.left>=0&&r.top<=aw(t)};Ak.InfiniteScroll={mounted(){this.scrollContainer=Ok(this.el);let e=ck(this.scrollContainer),t=!1,r=500,n=null,a=this.throttle(r,(s,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,s,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(r,(s,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,s,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{fk(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),i=this.throttle(r,(s,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,s,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{fk(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=s=>{let l=ck(this.scrollContainer);if(n)return e=l,n();let u=this.el.getBoundingClientRect(),f=this.el.getAttribute(this.liveSocket.binding("viewport-top")),c=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),d=this.el.lastElementChild,p=this.el.firstElementChild,h=le;h&&f&&!t&&u.top>=0?(t=!0,a(f,p)):m&&t&&u.top<=0&&(t=!1),f&&h&&v6(p,this.scrollContainer)?o(f,p):c&&m&&g6(d,this.scrollContainer)&&i(c,d),e=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(e,t){let r=0,n;return(...a)=>{let o=Date.now(),i=e-(o-r);i<=0||i>e?(n&&(clearTimeout(n),n=null),r=o,t(...a)):n||(n=setTimeout(()=>{r=Date.now(),n=null,t(...a)},i))}}};var y6=Ak,x6=class{constructor(e){this.el=e,this.loadingRef=e.hasAttribute(Ml)?parseInt(e.getAttribute(Ml),10):null,this.lockRef=e.hasAttribute(Nn)?parseInt(e.getAttribute(Nn),10):null}maybeUndo(e,t){this.isWithin(e)&&(this.undoLocks(e,t),this.undoLoading(e),this.isFullyResolvedBy(e)&&this.el.removeAttribute(ya))}isWithin(e){return!(this.loadingRef!==null&&this.loadingRef>e&&this.lockRef!==null&&this.lockRef>e)}undoLocks(e,t){if(!this.isLockUndoneBy(e))return;let r=z.private(this.el,Nn);r&&(t(r),z.deletePrivate(this.el,Nn)),this.el.removeAttribute(Nn),this.el.dispatchEvent(new CustomEvent("phx:unlock",{bubbles:!0,cancelable:!1}))}undoLoading(e){if(!this.isLoadingUndoneBy(e)){this.canUndoLoading(e)&&this.el.classList.contains("phx-submit-loading")&&this.el.classList.remove("phx-change-loading");return}if(this.canUndoLoading(e)){this.el.removeAttribute(Ml);let t=this.el.getAttribute(_l),r=this.el.getAttribute(tw);r!==null&&(this.el.readOnly=r==="true",this.el.removeAttribute(tw)),t!==null&&(this.el.disabled=t==="true",this.el.removeAttribute(_l));let n=this.el.getAttribute(wh);n!==null&&(this.el.innerText=n,this.el.removeAttribute(wh))}wk.forEach(t=>{(t!=="phx-submit-loading"||this.canUndoLoading(e))&&z.removeClass(this.el,t)})}isLoadingUndoneBy(e){return this.loadingRef===null?!1:this.loadingRef<=e}isLockUndoneBy(e){return this.lockRef===null?!1:this.lockRef<=e}isFullyResolvedBy(e){return(this.loadingRef===null||this.loadingRef<=e)&&(this.lockRef===null||this.lockRef<=e)}canUndoLoading(e){return this.lockRef===null||this.lockRef<=e}},b6=class{constructor(e,t,r){let n=new Set,a=new Set([...t.children].map(i=>i.id)),o=[];Array.from(e.children).forEach(i=>{if(i.id&&(n.add(i.id),a.has(i.id))){let s=i.previousElementSibling&&i.previousElementSibling.id;o.push({elementId:i.id,previousElementId:s})}}),this.containerId=t.id,this.updateType=r,this.elementsToModify=o,this.elementIdsToAdd=[...a].filter(i=>!n.has(i))}perform(){let e=z.byId(this.containerId);this.elementsToModify.forEach(t=>{t.previousElementId?oi(document.getElementById(t.previousElementId),r=>{oi(document.getElementById(t.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==r.id||r.insertAdjacentElement("afterend",n)})}):oi(document.getElementById(t.elementId),r=>{r.previousElementSibling==null||e.insertAdjacentElement("afterbegin",r)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(t=>{oi(document.getElementById(t),r=>e.insertAdjacentElement("afterbegin",r))})}},dk=11;function w6(e,t){var r=t.attributes,n,a,o,i,s;if(!(t.nodeType===dk||e.nodeType===dk)){for(var l=r.length-1;l>=0;l--)n=r[l],a=n.name,o=n.namespaceURI,i=n.value,o?(a=n.localName||a,s=e.getAttributeNS(o,a),s!==i&&(n.prefix==="xmlns"&&(a=n.name),e.setAttributeNS(o,a,i))):(s=e.getAttribute(a),s!==i&&e.setAttribute(a,i));for(var u=e.attributes,f=u.length-1;f>=0;f--)n=u[f],a=n.name,o=n.namespaceURI,o?(a=n.localName||a,t.hasAttributeNS(o,a)||e.removeAttributeNS(o,a)):t.hasAttribute(a)||e.removeAttribute(a)}}var mh,S6="http://www.w3.org/1999/xhtml",Gr=typeof document>"u"?void 0:document,C6=!!Gr&&"content"in Gr.createElement("template"),P6=!!Gr&&Gr.createRange&&"createContextualFragment"in Gr.createRange();function I6(e){var t=Gr.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function L6(e){mh||(mh=Gr.createRange(),mh.selectNode(Gr.body));var t=mh.createContextualFragment(e);return t.childNodes[0]}function A6(e){var t=Gr.createElement("body");return t.innerHTML=e,t.childNodes[0]}function O6(e){return e=e.trim(),C6?I6(e):P6?L6(e):A6(e)}function hh(e,t){var r=e.nodeName,n=t.nodeName,a,o;return r===n?!0:(a=r.charCodeAt(0),o=n.charCodeAt(0),a<=90&&o>=97?r===n.toUpperCase():o<=90&&a>=97?n===r.toUpperCase():!1)}function k6(e,t){return!t||t===S6?Gr.createElement(e):Gr.createElementNS(t,e)}function E6(e,t){for(var r=e.firstChild;r;){var n=r.nextSibling;t.appendChild(r),r=n}return t}function Yb(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var pk={OPTION:function(e,t){var r=e.parentNode;if(r){var n=r.nodeName.toUpperCase();n==="OPTGROUP"&&(r=r.parentNode,n=r&&r.nodeName.toUpperCase()),n==="SELECT"&&!r.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}Yb(e,t,"selected")},INPUT:function(e,t){Yb(e,t,"checked"),Yb(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var n=e.firstChild;if(n){var a=n.nodeValue;if(a==r||!r&&a==e.placeholder)return;n.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r=-1,n=0,a=e.firstChild,o,i;a;)if(i=a.nodeName&&a.nodeName.toUpperCase(),i==="OPTGROUP")o=a,a=o.firstChild;else{if(i==="OPTION"){if(a.hasAttribute("selected")){r=n;break}n++}a=a.nextSibling,!a&&o&&(a=o.nextSibling,o=null)}e.selectedIndex=r}}},Pf=1,mk=11,hk=3,vk=8;function ai(){}function T6(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function R6(e){return function(r,n,a){if(a||(a={}),typeof n=="string")if(r.nodeName==="#document"||r.nodeName==="HTML"||r.nodeName==="BODY"){var o=n;n=Gr.createElement("html"),n.innerHTML=o}else n=O6(n);else n.nodeType===mk&&(n=n.firstElementChild);var i=a.getNodeKey||T6,s=a.onBeforeNodeAdded||ai,l=a.onNodeAdded||ai,u=a.onBeforeElUpdated||ai,f=a.onElUpdated||ai,c=a.onBeforeNodeDiscarded||ai,d=a.onNodeDiscarded||ai,p=a.onBeforeElChildrenUpdated||ai,h=a.skipFromChildren||ai,m=a.addChild||function(C,L){return C.appendChild(L)},x=a.childrenOnly===!0,g=Object.create(null),v=[];function w(C){v.push(C)}function b(C,L){if(C.nodeType===Pf)for(var O=C.firstChild;O;){var E=void 0;L&&(E=i(O))?w(E):(d(O),O.firstChild&&b(O,L)),O=O.nextSibling}}function y(C,L,O){c(C)!==!1&&(L&&L.removeChild(C),d(C),b(C,O))}function S(C){if(C.nodeType===Pf||C.nodeType===mk)for(var L=C.firstChild;L;){var O=i(L);O&&(g[O]=L),S(L),L=L.nextSibling}}S(r);function P(C){l(C);for(var L=C.firstChild;L;){var O=L.nextSibling,E=i(L);if(E){var k=g[E];k&&hh(L,k)?(L.parentNode.replaceChild(k,L),_(k,L)):P(L)}else P(L);L=O}}function A(C,L,O){for(;L;){var E=L.nextSibling;(O=i(L))?w(O):y(L,C,!0),L=E}}function _(C,L,O){var E=i(L);if(E&&delete g[E],!O){var k=u(C,L);if(k===!1||(k instanceof HTMLElement&&(C=k),e(C,L),f(C),p(C,L)===!1))return}C.nodeName!=="TEXTAREA"?T(C,L):pk.TEXTAREA(C,L)}function T(C,L){var O=h(C,L),E=L.firstChild,k=C.firstChild,F,q,$,ee,J;e:for(;E;){for(ee=E.nextSibling,F=i(E);!O&&k;){if($=k.nextSibling,E.isSameNode&&E.isSameNode(k)){E=ee,k=$;continue e}q=i(k);var W=k.nodeType,ie=void 0;if(W===E.nodeType&&(W===Pf?(F?F!==q&&((J=g[F])?$===J?ie=!1:(C.insertBefore(J,k),q?w(q):y(k,C,!0),k=J,q=i(k)):ie=!1):q&&(ie=!1),ie=ie!==!1&&hh(k,E),ie&&_(k,E)):(W===hk||W==vk)&&(ie=!0,k.nodeValue!==E.nodeValue&&(k.nodeValue=E.nodeValue))),ie){E=ee,k=$;continue e}q?w(q):y(k,C,!0),k=$}if(F&&(J=g[F])&&hh(J,E))O||m(C,J),_(J,E);else{var V=s(E);V!==!1&&(V&&(E=V),E.actualize&&(E=E.actualize(C.ownerDocument||Gr)),m(C,E),P(E))}E=ee,k=$}A(C,k,q);var re=pk[C.nodeName];re&&re(C,L)}var D=r,N=D.nodeType,j=n.nodeType;if(!x){if(N===Pf)j===Pf?hh(r,n)||(d(r),D=E6(r,k6(n.nodeName,n.namespaceURI))):D=n;else if(N===hk||N===vk){if(j===N)return D.nodeValue!==n.nodeValue&&(D.nodeValue=n.nodeValue),D;D=n}}if(D===n)d(r);else{if(n.isSameNode&&n.isSameNode(D))return;if(_(D,n,x),v)for(var B=0,H=v.length;B{if(z.syncPendingAttrs(o,i),!e.isSameNode(o)&&o.hasAttribute(Nn)||z.isIgnored(o,a))return!1;if(n&&n.isSameNode(o)&&z.isFormInput(o))return z.mergeFocusedInput(o,i),!1}})}constructor(e,t,r,n,a,o){this.view=e,this.liveSocket=e.liveSocket,this.container=t,this.id=r,this.rootID=e.root.id,this.html=n,this.streams=a,this.streamInserts={},this.streamComponentRestore={},this.targetCID=o,this.cidPatch=go(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.targetContainer=this.isCIDPatch()?this.targetCIDContainer(n):t,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(e,t){this.callbacks[`before${e}`].push(t)}after(e,t){this.callbacks[`after${e}`].push(t)}trackBefore(e,...t){this.callbacks[`before${e}`].forEach(r=>r(...t))}trackAfter(e,...t){this.callbacks[`after${e}`].forEach(r=>r(...t))}markPrunableContentForRemoval(){let e=this.liveSocket.binding(Lf);z.all(this.container,`[${e}=append] > *, [${e}=prepend] > *`,t=>{t.setAttribute(KO,"")})}perform(e){let{view:t,liveSocket:r,html:n,container:a,targetContainer:o}=this;if(this.isCIDPatch()&&!o)return;let i=r.getActiveElement(),{selectionStart:s,selectionEnd:l}=i&&z.hasSelectionRange(i)?i:{},u=r.binding(Lf),f=r.binding(Zb),c=r.binding(ew),d=r.binding(YG),p=[],h=[],m=[],x=null;function g(v,w,b=!1){gk(v,w,{childrenOnly:v.getAttribute(yo)===null&&!b,getNodeKey:y=>z.isPhxDestroyed(y)?null:e?y.id:y.id||y.getAttribute&&y.getAttribute(Pk),skipFromChildren:y=>y.getAttribute(u)===Vb,addChild:(y,S)=>{let{ref:P,streamAt:A}=this.getStreamInsert(S);if(P===void 0)return y.appendChild(S);if(this.setStreamRef(S,P),A===0)y.insertAdjacentElement("afterbegin",S);else if(A===-1)y.appendChild(S);else if(A>0){let _=Array.from(y.children)[A];y.insertBefore(S,_)}},onBeforeNodeAdded:y=>{z.maybeAddPrivateHooks(y,f,c),this.trackBefore("added",y);let S=y;return!e&&this.streamComponentRestore[y.id]&&(S=this.streamComponentRestore[y.id],delete this.streamComponentRestore[y.id],g.call(this,S,y,!0)),S},onNodeAdded:y=>{y.getAttribute&&this.maybeReOrderStream(y,!0),y instanceof HTMLImageElement&&y.srcset?y.srcset=y.srcset:y instanceof HTMLVideoElement&&y.autoplay&&y.play(),z.isNowTriggerFormExternal(y,d)&&(x=y),(z.isPhxChild(y)&&t.ownsElement(y)||z.isPhxSticky(y)&&t.ownsElement(y.parentNode))&&this.trackAfter("phxChildAdded",y),p.push(y)},onNodeDiscarded:y=>this.onNodeDiscarded(y),onBeforeNodeDiscarded:y=>y.getAttribute&&y.getAttribute(KO)!==null?!0:!(y.parentElement!==null&&y.id&&z.isPhxUpdate(y.parentElement,u,[Vb,"append","prepend"])||this.maybePendingRemove(y)||this.skipCIDSibling(y)),onElUpdated:y=>{z.isNowTriggerFormExternal(y,d)&&(x=y),h.push(y),this.maybeReOrderStream(y,!1)},onBeforeElUpdated:(y,S)=>{if(z.syncPendingAttrs(y,S),z.maybeAddPrivateHooks(S,f,c),z.cleanChildNodes(S,u),this.skipCIDSibling(S))return this.maybeReOrderStream(y),!1;if(z.isPhxSticky(y))return[za,fs,ii].map(_=>[_,y.getAttribute(_),S.getAttribute(_)]).forEach(([_,T,D])=>{D&&T!==D&&y.setAttribute(_,D)}),!1;if(z.isIgnored(y,u)||y.form&&y.form.isSameNode(x))return this.trackBefore("updated",y,S),z.mergeAttrs(y,S,{isIgnored:z.isIgnored(y,u)}),h.push(y),z.applyStickyOperations(y),!1;if(y.type==="number"&&y.validity&&y.validity.badInput)return!1;let P=i&&y.isSameNode(i)&&z.isFormInput(y),A=P&&this.isChangedSelect(y,S);if(y.hasAttribute(ya)){z.isUploadInput(y)&&(z.mergeAttrs(y,S,{isIgnored:!0}),this.trackBefore("updated",y,S),h.push(y)),z.applyStickyOperations(y);let T=y.hasAttribute(Nn)?z.private(y,Nn)||y.cloneNode(!0):null;T&&(z.putPrivate(y,Nn,T),P||(y=T))}if(z.isPhxChild(S)){let _=y.getAttribute(za);return z.mergeAttrs(y,S,{exclude:[fs]}),_!==""&&y.setAttribute(za,_),y.setAttribute(ii,this.rootID),z.applyStickyOperations(y),!1}return z.copyPrivates(S,y),P&&y.type!=="hidden"&&!A?(this.trackBefore("updated",y,S),z.mergeFocusedInput(y,S),z.syncAttrsToProps(y),h.push(y),z.applyStickyOperations(y),!1):(A&&y.blur(),z.isPhxUpdate(S,u,["append","prepend"])&&m.push(new b6(y,S,S.getAttribute(u))),z.syncAttrsToProps(S),z.applyStickyOperations(S),this.trackBefore("updated",y,S),y)}})}return this.trackBefore("added",a),this.trackBefore("updated",a,a),r.time("morphdom",()=>{this.streams.forEach(([v,w,b,y])=>{w.forEach(([S,P,A])=>{this.streamInserts[S]={ref:v,streamAt:P,limit:A,reset:y}}),y!==void 0&&z.all(a,`[${$b}="${v}"]`,S=>{this.removeStreamChildElement(S)}),b.forEach(S=>{let P=a.querySelector(`[id="${S}"]`);P&&this.removeStreamChildElement(P)})}),e&&z.all(this.container,`[${u}=${Vb}]`,v=>{this.liveSocket.owner(v,w=>{w===this.view&&Array.from(v.children).forEach(b=>{this.removeStreamChildElement(b)})})}),g.call(this,o,n)}),r.isDebugEnabled()&&(u6(),Array.from(document.querySelectorAll("input[name=id]")).forEach(v=>{v.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. +`,v)})),m.length>0&&r.time("post-morph append/prepend restoration",()=>{m.forEach(v=>v.perform())}),r.silenceEvents(()=>z.restoreFocus(i,s,l)),z.dispatchEvent(document,"phx:update"),p.forEach(v=>this.trackAfter("added",v)),h.forEach(v=>this.trackAfter("updated",v)),this.transitionPendingRemoves(),x&&(r.unload(),Object.getPrototypeOf(x).submit.call(x)),!0}onNodeDiscarded(e){(z.isPhxChild(e)||z.isPhxSticky(e))&&this.liveSocket.destroyViewByEl(e),this.trackAfter("discarded",e)}maybePendingRemove(e){return e.getAttribute&&e.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(e),!0):!1}removeStreamChildElement(e){this.streamInserts[e.id]?(this.streamComponentRestore[e.id]=e,e.remove()):this.maybePendingRemove(e)||(e.remove(),this.onNodeDiscarded(e))}getStreamInsert(e){return(e.id?this.streamInserts[e.id]:{})||{}}setStreamRef(e,t){z.putSticky(e,$b,r=>r.setAttribute($b,t))}maybeReOrderStream(e,t){let{ref:r,streamAt:n,reset:a}=this.getStreamInsert(e);if(n!==void 0&&(this.setStreamRef(e,r),!(!a&&!t)&&e.parentElement)){if(n===0)e.parentElement.insertBefore(e,e.parentElement.firstElementChild);else if(n>0){let o=Array.from(e.parentElement.children),i=o.indexOf(e);if(n>=o.length-1)e.parentElement.appendChild(e);else{let s=o[n];i>n?e.parentElement.insertBefore(e,s):e.parentElement.insertBefore(e,s.nextElementSibling)}}this.maybeLimitStream(e)}}maybeLimitStream(e){let{limit:t}=this.getStreamInsert(e),r=t!==null&&Array.from(e.parentElement.children);t&&t<0&&r.length>t*-1?r.slice(0,r.length+t).forEach(n=>this.removeStreamChildElement(n)):t&&t>=0&&r.length>t&&r.slice(t).forEach(n=>this.removeStreamChildElement(n))}transitionPendingRemoves(){let{pendingRemoves:e,liveSocket:t}=this;e.length>0&&(t.transitionRemoves(e),t.requestDOMUpdate(()=>{e.forEach(r=>{let n=z.firstPhxChild(r);n&&t.destroyViewByEl(n),r.remove()}),this.trackAfter("transitionsDiscarded",e)}))}isChangedSelect(e,t){if(!(e instanceof HTMLSelectElement)||e.multiple)return!1;if(e.options.length!==t.options.length)return!0;let r=e.selectedOptions[0],n=t.selectedOptions[0];return r&&r.hasAttribute("selected")&&n.setAttribute("selected",r.getAttribute("selected")),!e.isEqualNode(t)}isCIDPatch(){return this.cidPatch}skipCIDSibling(e){return e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(Ck)}targetCIDContainer(e){if(!this.isCIDPatch())return;let[t,...r]=z.findComponentNodeList(this.container,this.targetCID);return r.length===0&&z.childNodeLength(e)===1?t:t&&t.parentNode}indexOf(e,t){return Array.from(e.children).indexOf(t)}},M6=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),D6=new Set(["'",'"']),yk=(e,t,r)=>{let n=0,a=!1,o,i,s,l,u,f,c=e.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(c===null)throw new Error(`malformed html ${e}`);for(n=c[0].length,o=c[1],s=c[2],l=n,n;n";n++)if(e.charAt(n)==="="){let h=e.slice(n-3,n)===" id";n++;let m=e.charAt(n);if(D6.has(m)){let x=n;for(n++,n;n=o.length+s.length;){let h=e.charAt(d);if(a)h==="-"&&e.slice(d-3,d)===""&&e.slice(d-2,d)==="--")a=!0,d-=3;else{if(h===">")break;d-=1}}i=e.slice(d+1,e.length);let p=Object.keys(t).map(h=>t[h]===!0?h:`${h}="${t[h]}"`).join(" ");if(r){let h=u?` id="${u}"`:"";M6.has(s)?f=`<${s}${h}${p===""?"":" "}${p}/>`:f=`<${s}${h}${p===""?"":" "}${p}>`}else{let h=e.slice(l,d+1);f=`<${s}${p===""?"":" "}${p}${h}`}return[f,o,i]},xk=class{static extract(e){let{[ak]:t,[nk]:r,[ok]:n}=e;return delete e[ak],delete e[nk],delete e[ok],{diff:e,title:n,reply:t||null,events:r||[]}}constructor(e,t){this.viewId=e,this.rendered={},this.magicId=0,this.mergeDiff(t)}parentViewId(){return this.viewId}toString(e){let[t,r]=this.recursiveToString(this.rendered,this.rendered[Ar],e,!0,{});return[t,r]}recursiveToString(e,t=e[Ar],r,n,a){r=r?new Set(r):null;let o={buffer:"",components:t,onlyCids:r,streams:new Set};return this.toOutputBuffer(e,null,o,n,a),[o.buffer,o.streams]}componentCIDs(e){return Object.keys(e[Ar]||{}).map(t=>parseInt(t))}isComponentOnlyDiff(e){return e[Ar]?Object.keys(e).length===1:!1}getComponent(e,t){return e[Ar][t]}resetRender(e){this.rendered[Ar][e]&&(this.rendered[Ar][e].reset=!0)}mergeDiff(e){let t=e[Ar],r={};if(delete e[Ar],this.rendered=this.mutableMerge(this.rendered,e),this.rendered[Ar]=this.rendered[Ar]||{},t){let n=this.rendered[Ar];for(let a in t)t[a]=this.cachedFindComponent(a,t[a],n,t,r);for(let a in t)n[a]=t[a];e[Ar]=t}}cachedFindComponent(e,t,r,n,a){if(a[e])return a[e];{let o,i,s=t[Ha];if(go(s)){let l;s>0?l=this.cachedFindComponent(s,n[s],r,n,a):l=r[-s],i=l[Ha],o=this.cloneMerge(l,t,!0),o[Ha]=i}else o=t[Ha]!==void 0||r[e]===void 0?t:this.cloneMerge(r[e],t,!1);return a[e]=o,o}}mutableMerge(e,t){return t[Ha]!==void 0?t:(this.doMutableMerge(e,t),e)}doMutableMerge(e,t){for(let r in t){let n=t[r],a=e[r];Rl(n)&&n[Ha]===void 0&&Rl(a)?this.doMutableMerge(a,n):e[r]=n}e[Xb]&&(e.newRender=!0)}cloneMerge(e,t,r){let n={...e,...t};for(let a in n){let o=t[a],i=e[a];Rl(o)&&o[Ha]===void 0&&Rl(i)?n[a]=this.cloneMerge(i,o,r):o===void 0&&Rl(i)&&(n[a]=this.cloneMerge(i,{},r))}return r?(delete n.magicId,delete n.newRender):e[Xb]&&(n.newRender=!0),n}componentToString(e){let[t,r]=this.recursiveCIDToString(this.rendered[Ar],e,null),[n,a,o]=yk(t,{});return[n,r]}pruneCIDs(e){e.forEach(t=>delete this.rendered[Ar][t])}get(){return this.rendered}isNewFingerprint(e={}){return!!e[Ha]}templateStatic(e,t){return typeof e=="number"?t[e]:e}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(e,t,r,n,a={}){if(e[ph])return this.comprehensionToBuffer(e,t,r);let{[Ha]:o}=e;o=this.templateStatic(o,t);let i=e[Xb],s=r.buffer;i&&(r.buffer=""),n&&i&&!e.magicId&&(e.newRender=!0,e.magicId=this.nextMagicID()),r.buffer+=o[0];for(let l=1;l0||l.length>0||u)&&(delete e[ik],e[ph]=[],r.streams.add(o))}dynamicToBuffer(e,t,r,n){if(typeof e=="number"){let[a,o]=this.recursiveCIDToString(r.components,e,r.onlyCids);r.buffer+=a,r.streams=new Set([...r.streams,...o])}else Rl(e)?this.toOutputBuffer(e,t,r,n,{}):r.buffer+=e}recursiveCIDToString(e,t,r){let n=e[t]||fn(`no component for CID ${t}`,e),a={[yo]:t},o=r&&!r.has(t);n.newRender=!o,n.magicId=`c${t}-${this.parentViewId()}`;let i=!n.reset,[s,l]=this.recursiveToString(n,e,r,i,a);return delete n.reset,[s,l]}},N6=1,If=class{static makeID(){return N6++}static elementID(e){return e.phxHookId}constructor(e,t,r){this.__view=e,this.liveSocket=e.liveSocket,this.__callbacks=r,this.__listeners=new Set,this.__isDisconnected=!1,this.el=t,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(e,t={},r=function(){}){return this.__view.pushHookEvent(this.el,null,e,t,r)}pushEventTo(e,t,r={},n=function(){}){return this.__view.withinTargets(e,(a,o)=>a.pushHookEvent(this.el,o,t,r,n))}handleEvent(e,t){let r=(n,a)=>a?e:t(n.detail);return window.addEventListener(`phx:${e}`,r),this.__listeners.add(r),r}removeHandleEvent(e){let t=e(null,!0);window.removeEventListener(`phx:${t}`,e),this.__listeners.delete(e)}upload(e,t){return this.__view.dispatchUploads(null,e,t)}uploadTo(e,t,r){return this.__view.withinTargets(e,(n,a)=>{n.dispatchUploads(a,t,r)})}__cleanup__(){this.__listeners.forEach(e=>this.removeHandleEvent(e))}},F6=(e,t)=>{let r=e.endsWith("[]"),n=r?e.slice(0,-2):e;return n=n.replace(/([^\[\]]+)(\]?$)/,`${t}$1$2`),r&&(n+="[]"),n},gh=(e,t,r=[])=>{let{submitter:n,...a}=t,o;if(n&&n.name){let f=document.createElement("input");f.type="hidden";let c=n.getAttribute("form");c&&f.setAttribute("form",c),f.name=n.name,f.value=n.value,n.parentElement.insertBefore(f,n),o=f}let i=new FormData(e),s=[];i.forEach((f,c,d)=>{f instanceof File&&s.push(c)}),s.forEach(f=>i.delete(f));let l=new URLSearchParams,u=Array.from(e.elements);for(let[f,c]of i.entries())if(r.length===0||r.indexOf(f)>=0){let d=u.filter(m=>m.name===f),p=!d.some(m=>z.private(m,bh)||z.private(m,Of)),h=d.every(m=>m.type==="hidden");p&&!(n&&n.name==f)&&!h&&l.append(F6(f,"_unused_"),""),l.append(f,c)}n&&o&&n.parentElement.removeChild(o);for(let f in a)l.append(f,a[f]);return l.toString()},kk=class{constructor(e,t,r,n,a){this.isDead=!1,this.liveSocket=t,this.flash=n,this.parent=r,this.root=r?r.root:this,this.el=e,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||void 0,params:this.connectParams(a),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(nw)}connectParams(e){let t=this.liveSocket.params(this.el),r=z.all(document,`[${this.binding(GG)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return r.length>0&&(t._track_static=r),t._mounts=this.joinCount,t._live_referer=e,t}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(za)}getStatic(){let e=this.el.getAttribute(fs);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let t=()=>{e();for(let r in this.viewHooks)this.destroyHook(this.viewHooks[r])};z.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",t).receive("error",t).receive("timeout",t)}setContainerClasses(...e){this.el.classList.remove(XO,yf,fh,YO,zb),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let t in this.viewHooks)this.viewHooks[t].__disconnected();this.setContainerClasses(yf)}}execAll(e){z.all(this.el,`[${e}]`,t=>this.liveSocket.execJS(t,t.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(XO),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,t){this.liveSocket.log(this,e,t)}transition(e,t,r=function(){}){this.liveSocket.transition(e,t,r)}withinTargets(e,t,r=document,n){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,a=>t(a,e));if(go(e))z.findComponentNodeList(n||this.el,e).length===0?fn(`no component found matching phx-target of ${e}`):t(this,parseInt(e));else{let a=Array.from(r.querySelectorAll(e));a.length===0&&fn(`nothing found matching the phx-target selector "${e}"`),a.forEach(o=>this.liveSocket.owner(o,i=>t(i,o)))}}applyDiff(e,t,r){this.log(e,()=>["",xh(t)]);let{diff:n,reply:a,events:o,title:i}=xk.extract(t);r({diff:n,reply:a,events:o}),typeof i=="string"&&window.requestAnimationFrame(()=>z.putTitle(i))}onJoin(e){let{rendered:t,container:r,liveview_version:n}=e;if(r){let[a,o]=r;this.el=z.replaceRootContainer(this.el,a,o)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),n!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${n}. To avoid issues, please ensure that your assets use the same version as the server.`),Wa.dropLocal(this.liveSocket.localStorage,window.location.pathname,bk),this.applyDiff("mount",t,({diff:a,events:o})=>{this.rendered=new xk(this.id,a);let[i,s]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.maybeRecoverForms(i,()=>{this.onJoinComplete(e,i,s,o)})})}dropPendingRefs(){z.all(document,`[${ya}="${this.refSrc()}"]`,e=>{e.removeAttribute(Ml),e.removeAttribute(ya),e.removeAttribute(Nn)})}onJoinComplete({live_patch:e},t,r,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,t,r,n);z.findPhxChildrenInFragment(t,this.id).filter(o=>{let i=o.id&&this.el.querySelector(`[id="${o.id}"]`),s=i&&i.getAttribute(fs);return s&&o.setAttribute(fs,s),i&&i.setAttribute(ii,this.root.id),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,r,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,t,r,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,r,n)])}attachTrueDocEl(){this.el=z.byId(this.id),this.el.setAttribute(ii,this.root.id)}execNewMounted(e=this.el){let t=this.binding(Zb),r=this.binding(ew);z.all(e,`[${t}], [${r}]`,n=>{this.ownsElement(n)&&(z.maybeAddPrivateHooks(n,t,r),this.maybeAddNewHook(n))}),z.all(e,`[${this.binding(xf)}], [data-phx-${xf}]`,n=>{this.ownsElement(n)&&this.maybeAddNewHook(n)}),z.all(e,`[${this.binding(ek)}]`,n=>{this.ownsElement(n)&&this.maybeMounted(n)})}applyJoinPatch(e,t,r,n){this.attachTrueDocEl();let a=new vh(this,this.el,this.id,t,r,null);if(a.markPrunableContentForRemoval(),this.performPatch(a,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),e){let{kind:o,to:i}=e;this.liveSocket.historyPatch(i,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);let r=this.getHook(e),n=r&&z.isIgnored(e,this.binding(Lf));if(r&&!e.isEqualNode(t)&&!(n&&f6(e.dataset,t.dataset)))return r.__beforeUpdate(),r}maybeMounted(e){let t=e.getAttribute(this.binding(ek)),r=t&&z.private(e,"mounted");t&&!r&&(this.liveSocket.execJS(e,t),z.putPrivate(e,"mounted",!0))}maybeAddNewHook(e,t){let r=this.addHook(e);r&&r.__mounted()}performPatch(e,t,r=!1){let n=[],a=!1,o=new Set;return this.liveSocket.triggerDOM("onPatchStart",[e.targetContainer]),e.after("added",i=>{this.liveSocket.triggerDOM("onNodeAdded",[i]);let s=this.binding(Zb),l=this.binding(ew);z.maybeAddPrivateHooks(i,s,l),this.maybeAddNewHook(i),i.getAttribute&&this.maybeMounted(i)}),e.after("phxChildAdded",i=>{z.isPhxSticky(i)?this.liveSocket.joinRootViews():a=!0}),e.before("updated",(i,s)=>{this.triggerBeforeUpdateHook(i,s)&&o.add(i.id)}),e.after("updated",i=>{o.has(i.id)&&this.getHook(i).__updated()}),e.after("discarded",i=>{i.nodeType===Node.ELEMENT_NODE&&n.push(i)}),e.after("transitionsDiscarded",i=>this.afterElementsRemoved(i,t)),e.perform(r),this.afterElementsRemoved(n,t),this.liveSocket.triggerDOM("onPatchEnd",[e.targetContainer]),a}afterElementsRemoved(e,t){let r=[];e.forEach(n=>{let a=z.all(n,`[${yo}]`),o=z.all(n,`[${this.binding(xf)}]`);a.concat(n).forEach(i=>{let s=this.componentID(i);go(s)&&r.indexOf(s)===-1&&r.push(s)}),o.concat(n).forEach(i=>{let s=this.getHook(i);s&&this.destroyHook(s)})}),t&&this.maybePushComponentsDestroyed(r)}joinNewChildren(){z.findPhxChildren(this.el,this.id).forEach(e=>this.joinChild(e))}maybeRecoverForms(e,t){let r=this.binding("change"),n=this.root.formsForRecovery,a=document.createElement("template");a.innerHTML=e;let o=a.content.firstElementChild;o.id=this.id,o.setAttribute(ii,this.root.id),o.setAttribute(za,this.getSession()),o.setAttribute(fs,this.getStatic()),o.setAttribute(ds,this.parent?this.parent.id:null);let i=z.all(a.content,"form").filter(s=>s.id&&n[s.id]).filter(s=>!this.pendingForms.has(s.id)).filter(s=>n[s.id].getAttribute(r)===s.getAttribute(r)).map(s=>[n[s.id],s]);if(i.length===0)return t();i.forEach(([s,l],u)=>{this.pendingForms.add(l.id),this.pushFormRecovery(s,l,a.content.firstElementChild,()=>{this.pendingForms.delete(l.id),u===i.length-1&&t()})})}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){return e.id===this.id?this:this.children[e.getAttribute(ds)][e.id]}destroyDescendent(e){for(let t in this.root.children)for(let r in this.root.children[t])if(r===e)return this.root.children[t][r].destroy()}joinChild(e){if(!this.getChildById(e.id)){let r=new kk(e,this.liveSocket,this);return this.root.children[this.id][r.id]=r,r.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,t])=>{e.isDestroyed()||t()}),this.pendingJoinOps=[]})}update(e,t){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);let r=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{z.findExistingParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach(a=>{this.componentPatch(this.rendered.getComponent(e,a),a)&&(r=!0)})}):sk(e)||this.liveSocket.time("full patch complete",()=>{let[n,a]=this.renderContainer(e,"update"),o=new vh(this,this.el,this.id,n,a,null);r=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(t),r&&this.joinNewChildren()}renderContainer(e,t){return this.liveSocket.time(`toString diff (${t})`,()=>{let r=this.el.tagName,n=e?this.rendered.componentCIDs(e):null,[a,o]=this.rendered.toString(n);return[`<${r}>${a}`,o]})}componentPatch(e,t){if(sk(e))return!1;let[r,n]=this.rendered.componentToString(t),a=new vh(this,this.el,this.id,r,n,t);return this.performPatch(a,!0)}getHook(e){return this.viewHooks[If.elementID(e)]}addHook(e){if(If.elementID(e)||!e.getAttribute)return;let t=e.getAttribute(`data-phx-${xf}`)||e.getAttribute(this.binding(xf));if(t&&!this.ownsElement(e))return;let r=this.liveSocket.getHookCallbacks(t);if(r){e.id||fn(`no DOM ID for hook "${t}". Hooks require a unique ID on each element.`,e);let n=new If(this,e,r);return this.viewHooks[If.elementID(n.el)]=n,n}else t!==null&&fn(`unknown hook found for "${t}"`,e)}destroyHook(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[If.elementID(e.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:e,events:t})=>this.update(e,t)),this.pendingDiffs=[],this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let t=this.root.children[this.id]||{};for(let r in t)e(this.getChildById(r))}onChannel(e,t){this.liveSocket.onChannel(this.channel,e,r=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>t(r)]):this.liveSocket.requestDOMUpdate(()=>t(r))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:t,events:r})=>this.update(t,r))})}),this.onChannel("redirect",({to:e,flash:t})=>this.onRedirect({to:e,flash:t})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:t,kind:r,flash:n}=e,a=this.expandURL(t);this.liveSocket.historyRedirect(a,r,n)}onLivePatch(e){let{to:t,kind:r}=e;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,r)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:t}){this.liveSocket.redirect(e,t)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=t=>{t=t||function(){},e?e(this.joinCount,t):t()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",t=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(t))}).receive("error",t=>!this.isDestroyed()&&this.onJoinError(t)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(e){if(e.reason==="reload"){this.log("error",()=>[`failed mount with ${e.status}. Falling back to page request`,e]),this.isMain()&&this.onRedirect({to:this.href});return}else if(e.reason==="unauthorized"||e.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.isMain()&&this.onRedirect({to:this.href});return}if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);this.displayError([yf,fh,zb]),this.log("error",()=>["unable to join",e]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(e){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(n6)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([yf,fh,zb]):this.displayError([yf,fh,YO]))}displayError(e){this.isMain()&&z.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...e),this.execAll(this.binding("disconnected"))}pushWithReply(e,t,r,n=function(){}){if(!this.isConnected())return;let[a,[o],i]=e?e():[null,[],{}],s=function(){};return(i.page_loading||o&&o.getAttribute(this.binding(Qb))!==null)&&(s=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof r.cid!="number"&&delete r.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(t,r,o6).receive("ok",l=>{let u=f=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),s(),n(l,f)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:f,reply:c,events:d})=>{a!==null&&this.undoRefs(a),this.update(f,d),u(c)})}):(a!==null&&this.undoRefs(a),u(null))}))}undoRefs(e,t){t=t?new Set(t):null,this.isConnected()&&z.all(document,`[${ya}="${this.refSrc()}"]`,r=>{t&&!t.has(r)||this.undoElRef(r,e)})}undoElRef(e,t){new x6(e).maybeUndo(t,n=>{let a=this.triggerBeforeUpdateHook(e,n);vh.patchWithClonedTree(e,n,this.liveSocket),z.all(e,`[${ya}="${this.refSrc()}"]`,o=>this.undoElRef(o,t)),this.execNewMounted(e),a&&a.__updated()})}refSrc(){return this.el.id}putRef(e,t,r={}){let n=this.ref++,a=this.binding(QO);if(r.loading){let o=z.all(document,r.loading).map(i=>({el:i,lock:!0,loading:!0}));e=e.concat(o)}for(let{el:o,lock:i,loading:s}of e){if(!i&&!s)throw new Error("putRef requires lock or loading");if(o.setAttribute(ya,this.refSrc()),s&&o.setAttribute(Ml,n),i&&o.setAttribute(Nn,n),!s||r.submitter&&!(o===r.submitter||o===r.form))continue;o.classList.add(`phx-${t}-loading`),o.dispatchEvent(new CustomEvent(`phx:${t}-loading`,{bubbles:!0,cancelable:!1}));let l=o.getAttribute(a);l!==null&&(o.getAttribute(wh)||o.setAttribute(wh,o.innerText),l!==""&&(o.innerText=l),o.setAttribute(_l,o.getAttribute(_l)||o.disabled),o.setAttribute("disabled",""))}return[n,e.map(({el:o})=>o),r]}componentID(e){let t=e.getAttribute&&e.getAttribute(yo);return t?parseInt(t):null}targetComponentID(e,t,r={}){if(go(t))return t;let n=r.target||e.getAttribute(this.binding("target"));return go(n)?parseInt(n):t&&(n!==null||r.target)?this.closestComponentID(t):null}closestComponentID(e){return go(e)?e:e?oi(e.closest(`[${yo}]`),t=>this.ownsElement(t)&&this.componentID(t)):null}pushHookEvent(e,t,r,n,a){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",r,n]),!1;let[o,i,s]=this.putRef([{el:e,loading:!0,lock:!0}],"hook");return this.pushWithReply(()=>[o,i,s],"event",{type:"hook",event:r,value:n,cid:this.closestComponentID(t)},(l,u)=>a(u,o)),o}extractMeta(e,t,r){let n=this.binding("value-");for(let a=0;a=0&&!e.checked&&delete t.value),r){t||(t={});for(let a in r)t[a]=r[a]}return t}pushEvent(e,t,r,n,a,o={},i){this.pushWithReply(()=>this.putRef([{el:t,loading:!0,lock:!0}],e,o),"event",{type:e,event:n,value:this.extractMeta(t,a,o.value),cid:this.targetComponentID(t,r,o)},(s,l)=>i&&i(l))}pushFileProgress(e,t,r,n=function(){}){this.liveSocket.withinOwners(e.form,(a,o)=>{a.pushWithReply(null,"progress",{event:e.getAttribute(a.binding(t6)),ref:e.getAttribute(xo),entry_ref:t,progress:r,cid:a.targetComponentID(e.form,o)},n)})}pushInput(e,t,r,n,a,o){let i,s=go(r)?r:this.targetComponentID(e.form,t,a),l=()=>this.putRef([{el:e,loading:!0,lock:!0},{el:e.form,loading:!0,lock:!0}],"change",a),u,f=this.extractMeta(e.form);e instanceof HTMLButtonElement&&(f.submitter=e),e.getAttribute(this.binding("change"))?u=gh(e.form,{_target:a._target,...f},[e.name]):u=gh(e.form,{_target:a._target,...f}),z.isUploadInput(e)&&e.files&&e.files.length>0&&Ot.trackFiles(e,Array.from(e.files)),i=Ot.serializeUploads(e);let c={type:"form",event:n,value:u,uploads:i,cid:s};this.pushWithReply(l,"event",c,d=>{if(z.isUploadInput(e)&&z.isAutoUpload(e)){if(Ot.filesAwaitingPreflight(e).length>0){let[p,h]=l();this.undoRefs(p,[e.form]),this.uploadFiles(e.form,t,p,s,m=>{o&&o(d),this.triggerAwaitingSubmit(e.form),this.undoRefs(p)})}}else o&&o(d)})}triggerAwaitingSubmit(e){let t=this.getScheduledSubmit(e);if(t){let[r,n,a,o]=t;this.cancelSubmit(e),o()}}getScheduledSubmit(e){return this.formSubmits.find(([t,r,n,a])=>t.isSameNode(e))}scheduleSubmit(e,t,r,n){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,r,n])}cancelSubmit(e){this.formSubmits=this.formSubmits.filter(([t,r,n])=>t.isSameNode(e)?(this.undoRefs(r),!1):!0)}disableForm(e,t={}){let r=c=>!(Af(c,`${this.binding(Lf)}=ignore`,c.form)||Af(c,"data-phx-update=ignore",c.form)),n=c=>c.hasAttribute(this.binding(QO)),a=c=>c.tagName=="BUTTON",o=c=>["INPUT","TEXTAREA","SELECT"].includes(c.tagName),i=Array.from(e.elements),s=i.filter(n),l=i.filter(a).filter(r),u=i.filter(o).filter(r);l.forEach(c=>{c.setAttribute(_l,c.disabled),c.disabled=!0}),u.forEach(c=>{c.setAttribute(tw,c.readOnly),c.readOnly=!0,c.files&&(c.setAttribute(_l,c.disabled),c.disabled=!0)}),e.setAttribute(this.binding(Qb),"");let f=s.concat(l).concat(u).map(c=>({el:c,loading:!0,lock:!0}));return this.putRef([{el:e,loading:!0,lock:!1}].concat(f),"submit",t)}pushFormSubmit(e,t,r,n,a,o){let i=()=>this.disableForm(e,{...a,form:e,submitter:n}),s=this.targetComponentID(e,t);if(Ot.hasUploadsInProgress(e)){let[l,u]=i(),f=()=>this.pushFormSubmit(e,t,r,n,a,o);return this.scheduleSubmit(e,l,a,f)}else if(Ot.inputsAwaitingPreflight(e).length>0){let[l,u]=i(),f=()=>[l,u,a];this.uploadFiles(e,t,l,s,c=>{if(Ot.inputsAwaitingPreflight(e).length>0)return this.undoRefs(l);let d=this.extractMeta(e),p=gh(e,{submitter:n,...d});this.pushWithReply(f,"event",{type:"form",event:r,value:p,cid:s},o)})}else if(!(e.hasAttribute(ya)&&e.classList.contains("phx-submit-loading"))){let l=this.extractMeta(e),u=gh(e,{submitter:n,...l});this.pushWithReply(i,"event",{type:"form",event:r,value:u,cid:s},o)}}uploadFiles(e,t,r,n,a){let o=this.joinCount,i=Ot.activeFileInputs(e),s=i.length;i.forEach(l=>{let u=new Ot(l,this,()=>{s--,s===0&&a()}),f=u.entries().map(d=>d.toPreflightPayload());if(f.length===0){s--;return}let c={ref:l.getAttribute(xo),entries:f,cid:this.targetComponentID(l.form,t)};this.log("upload",()=>["sending preflight request",c]),this.pushWithReply(null,"allow_upload",c,d=>{if(this.log("upload",()=>["got preflight response",d]),u.entries().forEach(p=>{d.entries&&!d.entries[p.ref]&&this.handleFailedEntryPreflight(p.ref,"failed preflight",u)}),d.error||Object.keys(d.entries).length===0)this.undoRefs(r),(d.error||[]).map(([h,m])=>{this.handleFailedEntryPreflight(h,m,u)});else{let p=h=>{this.channel.onError(()=>{this.joinCount===o&&h()})};u.initAdapterUpload(d,p,this.liveSocket)}})})}handleFailedEntryPreflight(e,t,r){if(r.isAutoUpload()){let n=r.entries().find(a=>a.ref===e.toString());n&&n.cancel()}else r.entries().map(n=>n.cancel());this.log("upload",()=>[`error for entry ${e}`,t])}dispatchUploads(e,t,r){let n=this.targetCtxElement(e)||this.el,a=z.findUploadInputs(n).filter(o=>o.name===t);a.length===0?fn(`no live file inputs found matching the name "${t}"`):a.length>1?fn(`duplicate live file inputs found matching the name "${t}"`):z.dispatchEvent(a[0],Sk,{detail:{files:r}})}targetCtxElement(e){if(go(e)){let[t]=z.findComponentNodeList(this.el,e);return t}else return e||null}pushFormRecovery(e,t,r,n){let a=this.binding("change"),o=t.getAttribute(this.binding("target"))||t,i=t.getAttribute(this.binding(ZO))||t.getAttribute(this.binding("change")),s=Array.from(e.elements).filter(f=>z.isFormInput(f)&&f.name&&!f.hasAttribute(a));if(s.length===0)return;s.forEach(f=>f.hasAttribute(xo)&&Ot.clearFiles(f));let l=s.find(f=>f.type!=="hidden")||s[0],u=0;this.withinTargets(o,(f,c)=>{let d=this.targetComponentID(t,c);u++,f.pushInput(l,c,d,i,{_target:l.name},()=>{u--,u===0&&n()})},r,r)}pushLinkPatch(e,t,r){let n=this.liveSocket.setPendingLink(e),a=t?()=>this.putRef([{el:t,loading:!0,lock:!0}],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),i=e.startsWith("/")?`${location.protocol}//${location.host}${e}`:e,s=this.pushWithReply(a,"live_patch",{url:i},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(e,null,r,n):(this.liveSocket.commitPendingLink(n)&&(this.href=e),this.applyPendingUpdates(),r&&r(n))})});s?s.receive("timeout",o):o()}getFormsForRecovery(){if(this.joinCount===0)return{};let e=this.binding("change");return z.all(this.el,`form[${e}]`).filter(t=>t.id).filter(t=>t.elements.length>0).filter(t=>t.getAttribute(this.binding(ZO))!=="ignore").map(t=>t.cloneNode(!0)).reduce((t,r)=>(t[r.id]=r,t),{})}maybePushComponentsDestroyed(e){let t=e.filter(r=>z.findComponentNodeList(this.el,r).length===0);t.length>0&&(t.forEach(r=>this.rendered.resetRender(r)),this.pushWithReply(null,"cids_will_destroy",{cids:t},()=>{this.liveSocket.requestDOMUpdate(()=>{let r=t.filter(n=>z.findComponentNodeList(this.el,n).length===0);r.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:r},n=>{this.rendered.pruneCIDs(n.cids)})})}))}ownsElement(e){let t=e.closest(Nl);return e.getAttribute(ds)===this.id||t&&t.id===this.id||!t&&this.isDead}submitForm(e,t,r,n,a={}){z.putPrivate(e,Of,!0),Array.from(e.elements).forEach(i=>z.putPrivate(i,Of,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,r,n,a,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}};var Ek=class{constructor(e,t,r={}){if(this.unloaded=!1,!t||t.constructor.name==="Object")throw new Error(` + a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: + + import {Socket} from "phoenix" + import {LiveSocket} from "phoenix_live_view" + let liveSocket = new LiveSocket("/live", Socket, {...}) + `);this.socket=new t(e,r),this.bindingPrefix=r.bindingPrefix||a6,this.opts=r,this.params=Sf(r.params||{}),this.viewLogger=r.viewLogger,this.metadataCallbacks=r.metadata||{},this.defaults=Object.assign(xh(i6),r.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=xh(window.location),this.hooks=r.hooks||{},this.uploaders=r.uploaders||{},this.loaderTimeout=r.loaderTimeout||r6,this.reloadWithJitterTimer=null,this.maxReloads=r.maxReloads||WG,this.reloadJitterMin=r.reloadJitterMin||zG,this.reloadJitterMax=r.reloadJitterMax||VG,this.failsafeJitter=r.failsafeJitter||$G,this.localStorage=r.localStorage||window.localStorage,this.sessionStorage=r.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.boundEventNames=new Set,this.serverCloseRef=null,this.domCallbacks=Object.assign({onPatchStart:Sf(),onPatchEnd:Sf(),onNodeAdded:Sf(),onBeforeElUpdated:Sf()},r.dom||{}),this.transitions=new B6,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.0.0-rc.6"}isProfileEnabled(){return this.sessionStorage.getItem(Gb)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(dh)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(dh)==="false"}enableDebug(){this.sessionStorage.setItem(dh,"true")}enableProfiling(){this.sessionStorage.setItem(Gb,"true")}disableDebug(){this.sessionStorage.setItem(dh,"false")}disableProfiling(){this.sessionStorage.removeItem(Gb)}enableLatencySim(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(Kb,e)}disableLatencySim(){this.sessionStorage.removeItem(Kb)}getLatencySim(){let e=this.sessionStorage.getItem(Kb);return e?parseInt(e):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let e=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?e():document.addEventListener("DOMContentLoaded",()=>e())}disconnect(e){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(e)}replaceTransport(e){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(e),this.connect()}execJS(e,t,r=null){this.owner(e,n=>ga.exec(r,t,n,e))}execJSHookPush(e,t,r,n){this.withinOwners(e,a=>{ga.exec("hook",t,a,e,["push",{data:r,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(e,t){this.domCallbacks[e](...t)}time(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);let r=t();return console.timeEnd(e),r}log(e,t,r){if(this.viewLogger){let[n,a]=r();this.viewLogger(e,t,n,a)}else if(this.isDebugEnabled()){let[n,a]=r();c6(e,t,n,a)}}requestDOMUpdate(e){this.transitions.after(e)}transition(e,t,r=function(){}){this.transitions.addTransition(e,t,r)}onChannel(e,t,r){e.on(t,n=>{let a=this.getLatencySim();a?setTimeout(()=>r(n),a):r(n)})}wrapPush(e,t,r){let n=this.getLatencySim(),a=e.joinCount;if(!n)return this.isConnected()&&t.timeout?r().receive("timeout",()=>{e.joinCount===a&&!e.isDestroyed()&&this.reloadWithJitter(e,()=>{this.log(e,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):r();let o={receives:[],receive(i,s){this.receives.push([i,s])}};return setTimeout(()=>{e.isDestroyed()||o.receives.reduce((i,[s,l])=>i.receive(s,l),r())},n),o}reloadWithJitter(e,t){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let r=this.reloadJitterMin,n=this.reloadJitterMax,a=Math.floor(Math.random()*(n-r+1))+r,o=Wa.updateLocal(this.localStorage,window.location.pathname,bk,0,i=>i+1);o>this.maxReloads&&(a=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{e.isDestroyed()||e.isConnected()||(e.destroy(),t?t():this.log(e,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(e,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},a)}getHookCallbacks(e){return e&&e.startsWith("Phoenix.")?y6[e.split(".")[1]]:this.hooks[e]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(e){return`${this.getBindingPrefix()}${e}`}channel(e,t){return this.socket.channel(e,t)}joinDeadView(){let e=document.body;if(e&&!this.isPhxView(e)&&!this.isPhxView(document.firstElementChild)){let t=this.newRootView(e);t.setHref(this.getHref()),t.joinDead(),this.main||(this.main=t),window.requestAnimationFrame(()=>t.execNewMounted())}}joinRootViews(){let e=!1;return z.all(document,`${Nl}:not([${ds}])`,t=>{if(!this.getRootById(t.id)){let r=this.newRootView(t);r.setHref(this.getHref()),r.join(),t.hasAttribute(nw)&&(this.main=r)}e=!0}),e}redirect(e,t){this.unload(),Wa.redirect(e,t)}replaceMain(e,t,r=null,n=this.setPendingLink(e)){let a=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=z.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,t,a),this.main.setRedirect(e),this.transitionRemoves(null,!0),this.main.join((i,s)=>{i===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{z.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,r&&r(n),s()})})}transitionRemoves(e,t){let r=this.binding("remove");if(e=e||z.all(document,`[${r}]`),t){let n=z.findPhxSticky(document)||[];e=e.filter(a=>!z.isChildOfAny(a,n))}e.forEach(n=>{for(let a of this.boundEventNames)n.addEventListener(a,o=>{o.preventDefault(),o.stopImmediatePropagation()},!0);this.execJS(n,n.getAttribute(r),"remove")})}isPhxView(e){return e.getAttribute&&e.getAttribute(za)!==null}newRootView(e,t,r){let n=new kk(e,this,null,t,r);return this.roots[n.id]=n,n}owner(e,t){let r=oi(e.closest(Nl),n=>this.getViewByEl(n))||this.main;r&&t(r)}withinOwners(e,t){this.owner(e,r=>t(r,e))}getViewByEl(e){let t=e.getAttribute(ii);return oi(this.getRootById(t),r=>r.getDescendentByEl(e))}getRootById(e){return this.roots[e]}destroyAllViews(){for(let e in this.roots)this.roots[e].destroy(),delete this.roots[e];this.main=null}destroyViewByEl(e){let t=this.getRootById(e.getAttribute(ii));t&&t.id===e.id?(t.destroy(),delete this.roots[t.id]):t&&t.destroyDescendent(e.id)}setActiveElement(e){if(this.activeElement===e)return;this.activeElement=e;let t=()=>{e===this.activeElement&&(this.activeElement=null),e.removeEventListener("mouseup",this),e.removeEventListener("touchend",this)};e.addEventListener("mouseup",t),e.addEventListener("touchend",t)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:e}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(t=>{if(t&&t.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",t=>{t.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),e||this.bindNav(),this.bindClicks(),e||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(t,r,n,a,o,i)=>{let s=a.getAttribute(this.binding(e6)),l=t.key&&t.key.toLowerCase();if(s&&s.toLowerCase()!==l)return;let u={key:t.key,...this.eventMeta(r,t,a)};ga.exec(r,o,n,a,["push",{data:u}])}),this.bind({blur:"focusout",focus:"focusin"},(t,r,n,a,o,i)=>{if(!i){let s={key:t.key,...this.eventMeta(r,t,a)};ga.exec(r,o,n,a,["push",{data:s}])}}),this.bind({blur:"blur",focus:"focus"},(t,r,n,a,o,i)=>{if(i==="window"){let s=this.eventMeta(r,t,a);ga.exec(r,o,n,a,["push",{data:s}])}}),this.on("dragover",t=>t.preventDefault()),this.on("drop",t=>{t.preventDefault();let r=oi(Af(t.target,this.binding(GO)),o=>o.getAttribute(this.binding(GO))),n=r&&document.getElementById(r),a=Array.from(t.dataTransfer.files||[]);!n||n.disabled||a.length===0||!(n.files instanceof FileList)||(Ot.trackFiles(n,a,t.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(Sk,t=>{let r=t.target;if(!z.isUploadInput(r))return;let n=Array.from(t.detail.files||[]).filter(a=>a instanceof File||a instanceof Blob);Ot.trackFiles(r,n),r.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(e,t,r){let n=this.metadataCallbacks[e];return n?n(t,r):{}}setPendingLink(e){return this.linkRef++,this.pendingLink=e,this.linkRef}commitPendingLink(e){return this.linkRef!==e?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(e,t){for(let r in e){let n=e[r];this.on(n,a=>{let o=this.binding(r),i=this.binding(`window-${r}`),s=a.target.getAttribute&&a.target.getAttribute(o);s?this.debounce(a.target,a,n,()=>{this.withinOwners(a.target,l=>{t(a,r,l,a.target,s,null)})}):z.all(document,`[${i}]`,l=>{let u=l.getAttribute(i);this.debounce(l,a,n,()=>{this.withinOwners(l,f=>{t(a,r,f,l,u,"window")})})})})}}bindClicks(){this.on("mousedown",e=>this.clickStartedAtTarget=e.target),this.bindClick("click","click")}bindClick(e,t){let r=this.binding(t);window.addEventListener(e,n=>{let a=null;n.detail===0&&(this.clickStartedAtTarget=n.target);let o=this.clickStartedAtTarget||n.target;a=Af(o,r),this.dispatchClickAway(n,o),this.clickStartedAtTarget=null;let i=a&&a.getAttribute(r);if(!i){z.isNewPageClick(n,window.location)&&this.unload();return}a.getAttribute("href")==="#"&&n.preventDefault(),!a.hasAttribute(ya)&&this.debounce(a,n,"click",()=>{this.withinOwners(a,s=>{ga.exec("click",i,s,a,["push",{data:this.eventMeta("click",n,a)}])})})},!1)}dispatchClickAway(e,t){let r=this.binding("click-away");z.all(document,`[${r}]`,n=>{n.isSameNode(t)||n.contains(t)||this.withinOwners(n,a=>{let o=n.getAttribute(r);ga.isVisible(n)&&ga.isInViewport(n)&&ga.exec("click",o,a,n,["push",{data:this.eventMeta("click",e,e.target)}])})})}bindNav(){if(!Wa.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let e=null;window.addEventListener("scroll",t=>{clearTimeout(e),e=setTimeout(()=>{Wa.updateCurrentState(r=>Object.assign(r,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",t=>{if(!this.registerNewLocation(window.location))return;let{type:r,id:n,root:a,scroll:o}=t.state||{},i=window.location.href;z.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:r==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&r==="patch"&&n===this.main.id?this.main.pushLinkPatch(i,null,()=>{this.maybeScroll(o)}):this.replaceMain(i,null,()=>{a&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",t=>{let r=Af(t.target,Wb),n=r&&r.getAttribute(Wb);if(!n||!this.isConnected()||!this.main||z.wantsNewTab(t))return;let a=r.href instanceof SVGAnimatedString?r.href.baseVal:r.href,o=r.getAttribute(KG);t.preventDefault(),t.stopImmediatePropagation(),this.pendingLink!==a&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(a,o,r);else if(n==="redirect")this.historyRedirect(a,o);else throw new Error(`expected ${Wb} to be "patch" or "redirect", got: ${n}`);let i=r.getAttribute(this.binding("click"));i&&this.requestDOMUpdate(()=>this.execJS(r,i,"click"))})},!1)}maybeScroll(e){typeof e=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}dispatchEvent(e,t={}){z.dispatchEvent(window,`phx:${e}`,{detail:t})}dispatchEvents(e){e.forEach(([t,r])=>this.dispatchEvent(t,r))}withPageLoading(e,t){z.dispatchEvent(window,"phx:page-loading-start",{detail:e});let r=()=>z.dispatchEvent(window,"phx:page-loading-stop",{detail:e});return t?t(r):r}pushHistoryPatch(e,t,r){if(!this.isConnected()||!this.main.isMain())return Wa.redirect(e);this.withPageLoading({to:e,kind:"patch"},n=>{this.main.pushLinkPatch(e,r,a=>{this.historyPatch(e,t,a),n()})})}historyPatch(e,t,r=this.setPendingLink(e)){this.commitPendingLink(r)&&(Wa.pushState(t,{type:"patch",id:this.main.id},e),z.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:e,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(e,t,r){if(!this.isConnected()||!this.main.isMain())return Wa.redirect(e,r);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:a,host:o}=window.location;e=`${a}//${o}${e}`}let n=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},a=>{this.replaceMain(e,r,o=>{o===this.linkRef&&(Wa.pushState(t,{type:"redirect",id:this.main.id,scroll:n},e),z.dispatchEvent(window,"phx:navigate",{detail:{href:e,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),a()})})}replaceRootHistory(){Wa.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(e){let{pathname:t,search:r}=this.currentLocation;return t+r===e.pathname+e.search?!1:(this.currentLocation=xh(e),!0)}bindForms(){let e=0,t=!1;this.on("submit",r=>{let n=r.target.getAttribute(this.binding("submit")),a=r.target.getAttribute(this.binding("change"));!t&&a&&!n&&(t=!0,r.preventDefault(),this.withinOwners(r.target,o=>{o.disableForm(r.target),window.requestAnimationFrame(()=>{z.isUnloadableFormSubmit(r)&&this.unload(),r.target.submit()})}))}),this.on("submit",r=>{let n=r.target.getAttribute(this.binding("submit"));if(!n){z.isUnloadableFormSubmit(r)&&this.unload();return}r.preventDefault(),r.target.disabled=!0,this.withinOwners(r.target,a=>{ga.exec("submit",n,a,r.target,["push",{submitter:r.submitter}])})});for(let r of["change","input"])this.on(r,n=>{let a=this.binding("change"),o=n.target,i=o.getAttribute(a),s=o.form&&o.form.getAttribute(a),l=i||s;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let u=i?o:o.form,f=e;e++;let{at:c,type:d}=z.private(o,"prev-iteration")||{};c===f-1&&r==="change"&&d==="input"||(z.putPrivate(o,"prev-iteration",{at:f,type:r}),this.debounce(o,n,r,()=>{this.withinOwners(u,p=>{z.putPrivate(o,bh,!0),z.isTextualInput(o)||this.setActiveElement(o),ga.exec("change",l,p,o,["push",{_target:n.target.name,dispatcher:u}])})}))});this.on("reset",r=>{let n=r.target;z.resetForm(n);let a=Array.from(n.elements).find(o=>o.type==="reset");a&&window.requestAnimationFrame(()=>{a.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(e,t,r,n){if(r==="blur"||r==="focusout")return n();let a=this.binding(QG),o=this.binding(ZG),i=this.defaults.debounce.toString(),s=this.defaults.throttle.toString();this.withinOwners(e,l=>{let u=()=>!l.isDestroyed()&&document.body.contains(e);z.debounce(e,t,a,i,o,s,u,()=>{n()})})}silenceEvents(e){this.silenced=!0,e(),this.silenced=!1}on(e,t){this.boundEventNames.add(e),window.addEventListener(e,r=>{this.silenced||t(r)})}},B6=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(e=>{clearTimeout(e),this.transitions.delete(e)}),this.flushPendingOps()}after(e){this.size()===0?e():this.pushPendingOp(e)}addTransition(e,t,r){t();let n=setTimeout(()=>{this.transitions.delete(n),r(),this.flushPendingOps()},e);this.transitions.add(n)}pushPendingOp(e){this.pendingOps.push(e)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let e=this.pendingOps.shift();e&&(e(),this.flushPendingOps())}};var qb=R(Rk());var br=R(G());var Ah=R(G());var $k=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lh=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");var Ef=R(G());var Gk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Kk=(0,Ef.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:i,...s},l)=>(0,Ef.createElement)("svg",{ref:l,...Gk,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Lh("lucide",a),...s},[...i.map(([u,f])=>(0,Ef.createElement)(u,f)),...Array.isArray(o)?o:[o]]));var Ut=(e,t)=>{let r=(0,Ah.forwardRef)(({className:n,...a},o)=>(0,Ah.createElement)(Kk,{ref:o,iconNode:t,className:Lh(`lucide-${$k(e)}`,n),...a}));return r.displayName=`${e}`,r};var Tf=Ut("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);var ps=Ut("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bl=Ut("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var Rf=Ut("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var ms=Ut("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var _f=Ut("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Mf=Ut("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var Df=Ut("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);var Nf=Ut("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var Eh=R(G());var Qt=R(G(),1);var Xk=R(G(),1);function eK(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hs(...e){return t=>e.forEach(r=>eK(r,t))}function Le(...e){return Xk.useCallback(hs(...e),e)}var jl=R(_t(),1),Kr=Qt.forwardRef((e,t)=>{let{children:r,...n}=e,a=Qt.Children.toArray(r),o=a.find(lK);if(o){let i=o.props.children,s=a.map(l=>l===o?Qt.Children.count(i)>1?Qt.Children.only(null):Qt.isValidElement(i)?i.props.children:null:l);return(0,jl.jsx)(fw,{...n,ref:t,children:Qt.isValidElement(i)?Qt.cloneElement(i,void 0,s):null})}return(0,jl.jsx)(fw,{...n,ref:t,children:r})});Kr.displayName="Slot";var fw=Qt.forwardRef((e,t)=>{let{children:r,...n}=e;if(Qt.isValidElement(r)){let a=cK(r);return Qt.cloneElement(r,{...uK(n,r.props),ref:t?hs(t,a):a})}return Qt.Children.count(r)>1?Qt.Children.only(null):null});fw.displayName="SlotClone";var sK=({children:e})=>(0,jl.jsx)(jl.Fragment,{children:e});function lK(e){return Qt.isValidElement(e)&&e.type===sK}function uK(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...s)=>{o(...s),a(...s)}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function cK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Zk(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,r1=e1,n1=(e,t)=>r=>{var n;if(t?.variants==null)return r1(e,r?.class,r?.className);let{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(u=>{let f=r?.[u],c=o?.[u];if(f===null)return null;let d=t1(f)||t1(c);return a[u][d]}),s=r&&Object.entries(r).reduce((u,f)=>{let[c,d]=f;return d===void 0||(u[c]=d),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:c,className:d,...p}=f;return Object.entries(p).every(h=>{let[m,x]=h;return Array.isArray(x)?x.includes({...o,...s}[m]):{...o,...s}[m]===x})?[...u,c,d]:u},[]);return r1(e,i,l,r?.class,r?.className)};function a1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{let t=pK(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(hw);return s[0]===""&&s.length!==1&&s.shift(),s1(s,t)||dK(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},s1=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?s1(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;let o=e.join(hw);return t.validators.find(({validator:i})=>i(o))?.classGroupId},o1=/^\[(.+)\]$/,dK=e=>{if(o1.test(e)){let t=o1.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},pK=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return hK(Object.entries(e.classGroups),r).forEach(([o,i])=>{mw(i,n,o,t)}),n},mw=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){let o=a===""?t:i1(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(mK(a)){mw(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,i])=>{mw(i,i1(t,o),r,n)})})},i1=(e,t)=>{let r=e;return t.split(hw).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},mK=e=>e.isThemeGetter,hK=(e,t)=>t?e.map(([r,n])=>{let a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,s])=>[t+i,s])):o);return[r,a]}):e,vK=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,a=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return a(o,i),i},set(o,i){r.has(o)?r.set(o,i):a(o,i)}}},l1="!",gK=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,i=s=>{let l=[],u=0,f=0,c;for(let x=0;xf?c-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},yK=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},xK=e=>({cache:vK(e.cacheSize),parseClassName:gK(e),...fK(e)}),bK=/\s+/,wK=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],i=e.trim().split(bK),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:f,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:p}=r(u),h=!!p,m=n(h?d.substring(0,p):d);if(!m){if(!h){s=u+(s.length>0?" "+s:s);continue}if(m=n(d),!m){s=u+(s.length>0?" "+s:s);continue}h=!1}let x=yK(f).join(":"),g=c?x+l1:x,v=g+m;if(o.includes(v))continue;o.push(v);let w=a(m,h);for(let b=0;b0?" "+s:s)}return s};function SK(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nc(f),e());return r=xK(u),n=r.cache.get,a=r.cache.set,o=s,s(l)}function s(l){let u=n(l);if(u)return u;let f=wK(l,r);return a(l,f),f}return function(){return o(SK.apply(null,arguments))}}var Ze=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},c1=/^\[(?:([a-z-]+):)?(.+)\]$/i,PK=/^\d+\/\d+$/,IK=new Set(["px","full","screen"]),LK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AK=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,OK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EK=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bo=e=>ql(e)||IK.has(e)||PK.test(e),si=e=>Ul(e,"length",BK),ql=e=>!!e&&!Number.isNaN(Number(e)),pw=e=>Ul(e,"number",ql),Ff=e=>!!e&&Number.isInteger(Number(e)),TK=e=>e.endsWith("%")&&ql(e.slice(0,-1)),ye=e=>c1.test(e),li=e=>LK.test(e),RK=new Set(["length","size","percentage"]),_K=e=>Ul(e,RK,f1),MK=e=>Ul(e,"position",f1),DK=new Set(["image","url"]),NK=e=>Ul(e,DK,qK),FK=e=>Ul(e,"",jK),Bf=()=>!0,Ul=(e,t,r)=>{let n=c1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},BK=e=>AK.test(e)&&!OK.test(e),f1=()=>!1,jK=e=>kK.test(e),qK=e=>EK.test(e);var UK=()=>{let e=Ze("colors"),t=Ze("spacing"),r=Ze("blur"),n=Ze("brightness"),a=Ze("borderColor"),o=Ze("borderRadius"),i=Ze("borderSpacing"),s=Ze("borderWidth"),l=Ze("contrast"),u=Ze("grayscale"),f=Ze("hueRotate"),c=Ze("invert"),d=Ze("gap"),p=Ze("gradientColorStops"),h=Ze("gradientColorStopPositions"),m=Ze("inset"),x=Ze("margin"),g=Ze("opacity"),v=Ze("padding"),w=Ze("saturate"),b=Ze("scale"),y=Ze("sepia"),S=Ze("skew"),P=Ze("space"),A=Ze("translate"),_=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",ye,t],N=()=>[ye,t],j=()=>["",bo,si],B=()=>["auto",ql,ye],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],C=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ye],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[ql,ye];return{cacheSize:500,separator:":",theme:{colors:[Bf],spacing:[bo,si],blur:["none","",li,ye],brightness:k(),borderColor:[e],borderRadius:["none","","full",li,ye],borderSpacing:N(),borderWidth:j(),contrast:k(),grayscale:O(),hueRotate:k(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[TK,si],inset:D(),margin:D(),opacity:k(),padding:N(),saturate:k(),scale:k(),sepia:O(),skew:k(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[li]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),ye]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ff,ye]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Ff,ye]}],"grid-cols":[{"grid-cols":[Bf]}],"col-start-end":[{col:["auto",{span:["full",Ff,ye]},ye]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[Bf]}],"row-start-end":[{row:["auto",{span:[Ff,ye]},ye]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[li]},li]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",li,si]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pw]}],"font-family":[{font:[Bf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",ql,pw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bo,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bo,si]}],"underline-offset":[{"underline-offset":["auto",bo,ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),MK]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_K]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},NK]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:I()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[bo,ye]}],"outline-w":[{outline:[bo,si]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[bo,si]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",li,FK]}],"shadow-color":[{shadow:[Bf]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...C(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":C()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",li,ye]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[w]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ff,ye]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bo,si,pw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var d1=CK(UK);function ve(...e){return d1(dw(e))}function kh(e,t){let r=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"},{value:1e18,symbol:"E"}],n=new RegExp("\\.0+$|(?<=\\.[0-9]*[1-9])0+$"),a=r.findLast(o=>e>=o.value);return a?(e/a.value).toFixed(t).replace(n,"").concat(a.symbol):"0"}var Th=n1("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),jf=Eh.forwardRef((i,o)=>{var s=i,{className:e,variant:t,size:r,asChild:n=!1}=s,a=Ie(s,["className","variant","size","asChild"]);return Eh.createElement(n?Kr:"button",fe({className:ve(Th({variant:t,size:r,className:e})),ref:o},a))});jf.displayName="Button";var Ve=R(G());var Nt=R(G(),1);function le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var wo=R(G(),1),p1=R(_t(),1);function Xr(e,t=[]){let r=[];function n(o,i){let s=wo.createContext(i),l=r.length;r=[...r,i];function u(c){let{scope:d,children:p,...h}=c,m=d?.[e][l]||s,x=wo.useMemo(()=>h,Object.values(h));return(0,p1.jsx)(m.Provider,{value:x,children:p})}function f(c,d){let p=d?.[e][l]||s,h=wo.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,f]}let a=()=>{let o=r.map(i=>wo.createContext(i));return function(s){let l=s?.[e]||o;return wo.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return a.scopeName=e,[n,HK(a,...t)]}function HK(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){let i=n.reduce((s,{useScope:l,scopeName:u})=>{let c=l(o)[`__scope${u}`];return{...s,...c}},{});return wo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ui=R(G(),1);var Hl=R(G(),1);function wt(e){let t=Hl.useRef(e);return Hl.useEffect(()=>{t.current=e}),Hl.useMemo(()=>(...r)=>t.current?.(...r),[])}function So({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,a]=WK({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,s=wt(r),l=ui.useCallback(u=>{if(o){let c=typeof u=="function"?u(e):u;c!==e&&s(c)}else a(u)},[o,e,a,s]);return[i,l]}function WK({defaultProp:e,onChange:t}){let r=ui.useState(e),[n]=r,a=ui.useRef(n),o=wt(t);return ui.useEffect(()=>{a.current!==n&&(o(n),a.current=n)},[n,a,o]),r}var RR=R(G(),1),_R=R(Ti(),1);var MR=R(_t(),1),$9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],xe=$9.reduce((e,t)=>{let r=RR.forwardRef((n,a)=>{let{asChild:o,...i}=n,s=o?Kr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,MR.jsx)(s,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Jv(e,t){e&&_R.flushSync(()=>e.dispatchEvent(t))}var ue=R(G(),1);var Ri=R(G(),1);var Qv=R(_t(),1);function yu(e){let t=e+"CollectionProvider",[r,n]=Xr(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{let{scope:h,children:m}=p,x=Ri.default.useRef(null),g=Ri.default.useRef(new Map).current;return(0,Qv.jsx)(a,{scope:h,itemMap:g,collectionRef:x,children:m})};i.displayName=t;let s=e+"CollectionSlot",l=Ri.default.forwardRef((p,h)=>{let{scope:m,children:x}=p,g=o(s,m),v=Le(h,g.collectionRef);return(0,Qv.jsx)(Kr,{ref:v,children:x})});l.displayName=s;let u=e+"CollectionItemSlot",f="data-radix-collection-item",c=Ri.default.forwardRef((p,h)=>{let{scope:m,children:x,...g}=p,v=Ri.default.useRef(null),w=Le(h,v),b=o(u,m);return Ri.default.useEffect(()=>(b.itemMap.set(v,{ref:v,...g}),()=>void b.itemMap.delete(v))),(0,Qv.jsx)(Kr,{[f]:"",ref:w,children:x})});c.displayName=u;function d(p){let h=o(e+"CollectionConsumer",p);return Ri.default.useCallback(()=>{let x=h.collectionRef.current;if(!x)return[];let g=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:l,ItemSlot:c},d,n]}var Zv=R(G(),1),G9=R(_t(),1),K9=Zv.createContext(void 0);function xu(e){let t=Zv.useContext(K9);return e||t||"ltr"}var ht=R(G(),1);var DR=R(G(),1);function NR(e,t=globalThis?.document){let r=wt(e);DR.useEffect(()=>{let n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ES=R(_t(),1),X9="DismissableLayer",kS="dismissableLayer.update",Y9="dismissableLayer.pointerDownOutside",J9="dismissableLayer.focusOutside",FR,jR=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ts=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(jR),[f,c]=ht.useState(null),d=f?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),h=Le(t,P=>c(P)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(x),v=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,b=v>=g,y=eY(P=>{let A=P.target,_=[...u.branches].some(T=>T.contains(A));!b||_||(a?.(P),i?.(P),P.defaultPrevented||s?.())},d),S=tY(P=>{let A=P.target;[...u.branches].some(T=>T.contains(A))||(o?.(P),i?.(P),P.defaultPrevented||s?.())},d);return NR(P=>{v===u.layers.size-1&&(n?.(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),ht.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(FR=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),BR(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=FR)}},[f,d,r,u]),ht.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),BR())},[f,u]),ht.useEffect(()=>{let P=()=>p({});return document.addEventListener(kS,P),()=>document.removeEventListener(kS,P)},[]),(0,ES.jsx)(xe.div,{...l,ref:h,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,S.onFocusCapture),onBlurCapture:le(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,y.onPointerDownCapture)})});Ts.displayName=X9;var Q9="DismissableLayerBranch",Z9=ht.forwardRef((e,t)=>{let r=ht.useContext(jR),n=ht.useRef(null),a=Le(t,n);return ht.useEffect(()=>{let o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),(0,ES.jsx)(xe.div,{...e,ref:a})});Z9.displayName=Q9;function eY(e,t=globalThis?.document){let r=wt(e),n=ht.useRef(!1),a=ht.useRef(()=>{});return ht.useEffect(()=>{let o=s=>{if(s.target&&!n.current){let u=function(){qR(Y9,r,f,{discrete:!0})};var l=u;let f={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function tY(e,t=globalThis?.document){let r=wt(e),n=ht.useRef(!1);return ht.useEffect(()=>{let a=o=>{o.target&&!n.current&&qR(J9,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function BR(){let e=new CustomEvent(kS);document.dispatchEvent(e)}function qR(e,t,r,{discrete:n}){let a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Jv(a,o):a.dispatchEvent(o)}var HR=R(G(),1),TS=0;function bu(){HR.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??UR()),document.body.insertAdjacentElement("beforeend",e[1]??UR()),TS++,()=>{TS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),TS--}},[])}function UR(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var zn=R(G(),1);var GR=R(_t(),1),RS="focusScope.autoFocusOnMount",_S="focusScope.autoFocusOnUnmount",WR={bubbles:!1,cancelable:!0},rY="FocusScope",Rs=zn.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=zn.useState(null),u=wt(a),f=wt(o),c=zn.useRef(null),d=Le(t,m=>l(m)),p=zn.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;zn.useEffect(()=>{if(n){let v=function(S){if(p.paused||!s)return;let P=S.target;s.contains(P)?c.current=P:_i(c.current,{select:!0})},w=function(S){if(p.paused||!s)return;let P=S.relatedTarget;P!==null&&(s.contains(P)||_i(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(let A of S)A.removedNodes.length>0&&_i(s)};var m=v,x=w,g=b;document.addEventListener("focusin",v),document.addEventListener("focusout",w);let y=new MutationObserver(b);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),y.disconnect()}}},[n,s,p.paused]),zn.useEffect(()=>{if(s){VR.add(p);let m=document.activeElement;if(!s.contains(m)){let g=new CustomEvent(RS,WR);s.addEventListener(RS,u),s.dispatchEvent(g),g.defaultPrevented||(nY(lY(KR(s)),{select:!0}),document.activeElement===m&&_i(s))}return()=>{s.removeEventListener(RS,u),setTimeout(()=>{let g=new CustomEvent(_S,WR);s.addEventListener(_S,f),s.dispatchEvent(g),g.defaultPrevented||_i(m??document.body,{select:!0}),s.removeEventListener(_S,f),VR.remove(p)},0)}}},[s,u,f,p]);let h=zn.useCallback(m=>{if(!r&&!n||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(x&&g){let v=m.currentTarget,[w,b]=aY(v);w&&b?!m.shiftKey&&g===b?(m.preventDefault(),r&&_i(w,{select:!0})):m.shiftKey&&g===w&&(m.preventDefault(),r&&_i(b,{select:!0})):g===v&&m.preventDefault()}},[r,n,p.paused]);return(0,GR.jsx)(xe.div,{tabIndex:-1,...i,ref:d,onKeyDown:h})});Rs.displayName=rY;function nY(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(_i(n,{select:t}),document.activeElement!==r)return}function aY(e){let t=KR(e),r=zR(t,e),n=zR(t.reverse(),e);return[r,n]}function KR(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zR(e,t){for(let r of e)if(!oY(r,{upTo:t}))return r}function oY(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function iY(e){return e instanceof HTMLInputElement&&"select"in e}function _i(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&iY(e)&&t&&e.select()}}var VR=sY();function sY(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=$R(e,t),e.unshift(t)},remove(t){e=$R(e,t),e[0]?.resume()}}}function $R(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function lY(e){return e.filter(t=>t.tagName!=="A")}var MS=R(G(),1);var XR=R(G(),1),Ct=globalThis?.document?XR.useLayoutEffect:()=>{};var uY=MS["useId".toString()]||(()=>{}),cY=0;function tn(e){let[t,r]=MS.useState(uY());return Ct(()=>{e||r(n=>n??String(cY++))},[e]),e||(t?`radix-${t}`:"")}var yn=R(G(),1);var YR=["top","right","bottom","left"];var Vn=Math.min,Rr=Math.max,Rd=Math.round,_d=Math.floor,_o=e=>({x:e,y:e}),fY={left:"right",right:"left",bottom:"top",top:"bottom"},dY={start:"end",end:"start"};function tg(e,t,r){return Rr(e,Vn(t,r))}function Ja(e,t){return typeof e=="function"?e(t):e}function Qa(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function ng(e){return e==="y"?"height":"width"}function Mo(e){return["top","bottom"].includes(Qa(e))?"y":"x"}function ag(e){return rg(Mo(e))}function JR(e,t,r){r===void 0&&(r=!1);let n=_s(e),a=ag(e),o=ng(a),i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Td(i)),[i,Td(i)]}function QR(e){let t=Td(e);return[eg(e),t,eg(t)]}function eg(e){return e.replace(/start|end/g,t=>dY[t])}function pY(e,t,r){let n=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:i;default:return[]}}function ZR(e,t,r,n){let a=_s(e),o=pY(Qa(e),r==="start",n);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(eg)))),o}function Td(e){return e.replace(/left|right|bottom|top/g,t=>fY[t])}function mY(e){return{top:0,right:0,bottom:0,left:0,...e}}function DS(e){return typeof e!="number"?mY(e):{top:e,right:e,bottom:e,left:e}}function Ms(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function e_(e,t,r){let{reference:n,floating:a}=e,o=Mo(t),i=ag(t),s=ng(i),l=Qa(t),u=o==="y",f=n.x+n.width/2-a.width/2,c=n.y+n.height/2-a.height/2,d=n[s]/2-a[s]/2,p;switch(l){case"top":p={x:f,y:n.y-a.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-a.width,y:c};break;default:p={x:n.x,y:n.y}}switch(_s(t)){case"start":p[i]-=d*(r&&u?-1:1);break;case"end":p[i]+=d*(r&&u?-1:1);break}return p}var n_=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:i}=r,s=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:c}=e_(u,n,l),d=n,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=Ja(e,t)||{};if(u==null)return{};let c=DS(f),d={x:r,y:n},p=ag(a),h=ng(p),m=await i.getDimensions(u),x=p==="y",g=x?"top":"left",v=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=o.reference[h]+o.reference[p]-d[p]-o.floating[h],y=d[p]-o.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),P=S?S[w]:0;(!P||!await(i.isElement==null?void 0:i.isElement(S)))&&(P=s.floating[w]||o.floating[h]);let A=b/2-y/2,_=P/2-m[h]/2-1,T=Vn(c[g],_),D=Vn(c[v],_),N=T,j=P-m[h]-D,B=P/2-m[h]/2+A,H=tg(N,B,j),I=!l.arrow&&_s(a)!=null&&B!==H&&o.reference[h]/2-(BB<=0)){var D,N;let B=(((D=o.flip)==null?void 0:D.index)||0)+1,H=P[B];if(H)return{data:{index:B,overflows:T},reset:{placement:H}};let I=(N=T.filter(C=>C.overflows[0]<=0).sort((C,L)=>C.overflows[1]-L.overflows[1])[0])==null?void 0:N.placement;if(!I)switch(p){case"bestFit":{var j;let C=(j=T.filter(L=>{if(S){let O=Mo(L.placement);return O===v||O==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(O=>O>0).reduce((O,E)=>O+E,0)]).sort((L,O)=>L[1]-O[1])[0])==null?void 0:j[0];C&&(I=C);break}case"initialPlacement":I=s;break}if(a!==I)return{reset:{placement:I}}}return{}}}};function t_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function r_(e){return YR.some(t=>e[t]>=0)}var i_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...a}=Ja(e,t);switch(n){case"referenceHidden":{let o=await wu(t,{...a,elementContext:"reference"}),i=t_(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:r_(i)}}}case"escaped":{let o=await wu(t,{...a,altBoundary:!0}),i=t_(o,r.floating);return{data:{escapedOffsets:i,escaped:r_(i)}}}default:return{}}}}};async function hY(e,t){let{placement:r,platform:n,elements:a}=e,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=Qa(r),s=_s(r),l=Mo(r)==="y",u=["left","top"].includes(i)?-1:1,f=o&&l?-1:1,c=Ja(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*f,y:d*u}:{x:d*u,y:p*f}}var s_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:a,y:o,placement:i,middlewareData:s}=t,l=await hY(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},l_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:g,y:v}=x;return{x:g,y:v}}},...l}=Ja(e,t),u={x:r,y:n},f=await wu(t,l),c=Mo(Qa(a)),d=rg(c),p=u[d],h=u[c];if(o){let x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=p+f[x],w=p-f[g];p=tg(v,p,w)}if(i){let x=c==="y"?"top":"left",g=c==="y"?"bottom":"right",v=h+f[x],w=h-f[g];h=tg(v,h,w)}let m=s.fn({...t,[d]:p,[c]:h});return{...m,data:{x:m.x-r,y:m.y-n}}}}},u_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Ja(e,t),f={x:r,y:n},c=Mo(a),d=rg(c),p=f[d],h=f[c],m=Ja(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let w=d==="y"?"height":"width",b=o.reference[d]-o.floating[w]+x.mainAxis,y=o.reference[d]+o.reference[w]-x.mainAxis;py&&(p=y)}if(u){var g,v;let w=d==="y"?"width":"height",b=["top","left"].includes(Qa(a)),y=o.reference[c]-o.floating[w]+(b&&((g=i.offset)==null?void 0:g[c])||0)+(b?0:x.crossAxis),S=o.reference[c]+o.reference[w]+(b?0:((v=i.offset)==null?void 0:v[c])||0)-(b?x.crossAxis:0);hS&&(h=S)}return{[d]:p,[c]:h}}}},c_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:a,elements:o}=t,{apply:i=()=>{},...s}=Ja(e,t),l=await wu(t,s),u=Qa(r),f=_s(r),c=Mo(r)==="y",{width:d,height:p}=n.floating,h,m;u==="top"||u==="bottom"?(h=u,m=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,h=f==="end"?"top":"bottom");let x=p-l.top-l.bottom,g=d-l.left-l.right,v=Vn(p-l[h],x),w=Vn(d-l[m],g),b=!t.middlewareData.shift,y=v,S=w;if(c?S=f||b?Vn(w,g):g:y=f||b?Vn(v,x):x,b&&!f){let A=Rr(l.left,0),_=Rr(l.right,0),T=Rr(l.top,0),D=Rr(l.bottom,0);c?S=d-2*(A!==0||_!==0?A+_:Rr(l.left,l.right)):y=p-2*(T!==0||D!==0?T+D:Rr(l.top,l.bottom))}await i({...t,availableWidth:S,availableHeight:y});let P=await a.getDimensions(o.floating);return d!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Ns(e){return d_(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Za(e){var t;return(t=(d_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d_(e){return e instanceof Node||e instanceof rn(e).Node}function $n(e){return e instanceof Element||e instanceof rn(e).Element}function Aa(e){return e instanceof HTMLElement||e instanceof rn(e).HTMLElement}function f_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot}function Su(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=Gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function p_(e){return["table","td","th"].includes(Ns(e))}function Md(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function og(e){let t=ig(),r=$n(e)?Gn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function m_(e){let t=Do(e);for(;Aa(t)&&!Fs(t);){if(og(t))return t;if(Md(t))return null;t=Do(t)}return null}function ig(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fs(e){return["html","body","#document"].includes(Ns(e))}function Gn(e){return rn(e).getComputedStyle(e)}function Dd(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Do(e){if(Ns(e)==="html")return e;let t=e.assignedSlot||e.parentNode||f_(e)&&e.host||Za(e);return f_(t)?t.host:t}function h_(e){let t=Do(e);return Fs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Aa(t)&&Su(t)?t:h_(t)}function Ds(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=h_(e),o=a===((n=e.ownerDocument)==null?void 0:n.body),i=rn(a);if(o){let s=sg(i);return t.concat(i,i.visualViewport||[],Su(a)?a:[],s&&r?Ds(s):[])}return t.concat(a,Ds(a,[],r))}function sg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y_(e){let t=Gn(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Aa(e),o=a?e.offsetWidth:r,i=a?e.offsetHeight:n,s=Rd(r)!==o||Rd(n)!==i;return s&&(r=o,n=i),{width:r,height:n,$:s}}function FS(e){return $n(e)?e:e.contextElement}function Cu(e){let t=FS(e);if(!Aa(t))return _o(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:o}=y_(t),i=(o?Rd(r.width):r.width)/n,s=(o?Rd(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var vY=_o(0);function x_(e){let t=rn(e);return!ig()||!t.visualViewport?vY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gY(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rn(e)?!1:t}function Bs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),o=FS(e),i=_o(1);t&&(n?$n(n)&&(i=Cu(n)):i=Cu(e));let s=gY(o,r,n)?x_(o):_o(0),l=(a.left+s.x)/i.x,u=(a.top+s.y)/i.y,f=a.width/i.x,c=a.height/i.y;if(o){let d=rn(o),p=n&&$n(n)?rn(n):n,h=d,m=sg(h);for(;m&&n&&p!==h;){let x=Cu(m),g=m.getBoundingClientRect(),v=Gn(m),w=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,b=g.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,f*=x.x,c*=x.y,l+=w,u+=b,h=rn(m),m=sg(h)}}return Ms({width:f,height:c,x:l,y:u})}function yY(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,o=a==="fixed",i=Za(n),s=t?Md(t.floating):!1;if(n===i||s&&o)return r;let l={scrollLeft:0,scrollTop:0},u=_o(1),f=_o(0),c=Aa(n);if((c||!c&&!o)&&((Ns(n)!=="body"||Su(i))&&(l=Dd(n)),Aa(n))){let d=Bs(n);u=Cu(n),f.x=d.x+n.clientLeft,f.y=d.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+f.x,y:r.y*u.y-l.scrollTop*u.y+f.y}}function xY(e){return Array.from(e.getClientRects())}function b_(e){return Bs(Za(e)).left+Dd(e).scrollLeft}function bY(e){let t=Za(e),r=Dd(e),n=e.ownerDocument.body,a=Rr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Rr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+b_(e),s=-r.scrollTop;return Gn(n).direction==="rtl"&&(i+=Rr(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:i,y:s}}function wY(e,t){let r=rn(e),n=Za(e),a=r.visualViewport,o=n.clientWidth,i=n.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;let u=ig();(!u||u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s,y:l}}function SY(e,t){let r=Bs(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Aa(e)?Cu(e):_o(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,l=a*o.x,u=n*o.y;return{width:i,height:s,x:l,y:u}}function v_(e,t,r){let n;if(t==="viewport")n=wY(e,r);else if(t==="document")n=bY(Za(e));else if($n(t))n=SY(t,r);else{let a=x_(e);n={...t,x:t.x-a.x,y:t.y-a.y}}return Ms(n)}function w_(e,t){let r=Do(e);return r===t||!$n(r)||Fs(r)?!1:Gn(r).position==="fixed"||w_(r,t)}function CY(e,t){let r=t.get(e);if(r)return r;let n=Ds(e,[],!1).filter(s=>$n(s)&&Ns(s)!=="body"),a=null,o=Gn(e).position==="fixed",i=o?Do(e):e;for(;$n(i)&&!Fs(i);){let s=Gn(i),l=og(i);!l&&s.position==="fixed"&&(a=null),(o?!l&&!a:!l&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Su(i)&&!l&&w_(e,i))?n=n.filter(f=>f!==i):a=s,i=Do(i)}return t.set(e,n),n}function PY(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,i=[...r==="clippingAncestors"?Md(t)?[]:CY(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((u,f)=>{let c=v_(t,f,a);return u.top=Rr(c.top,u.top),u.right=Vn(c.right,u.right),u.bottom=Vn(c.bottom,u.bottom),u.left=Rr(c.left,u.left),u},v_(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function IY(e){let{width:t,height:r}=y_(e);return{width:t,height:r}}function LY(e,t,r){let n=Aa(t),a=Za(t),o=r==="fixed",i=Bs(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=_o(0);if(n||!n&&!o)if((Ns(t)!=="body"||Su(a))&&(s=Dd(t)),n){let c=Bs(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else a&&(l.x=b_(a));let u=i.left+s.scrollLeft-l.x,f=i.top+s.scrollTop-l.y;return{x:u,y:f,width:i.width,height:i.height}}function NS(e){return Gn(e).position==="static"}function g_(e,t){return!Aa(e)||Gn(e).position==="fixed"?null:t?t(e):e.offsetParent}function S_(e,t){let r=rn(e);if(Md(e))return r;if(!Aa(e)){let a=Do(e);for(;a&&!Fs(a);){if($n(a)&&!NS(a))return a;a=Do(a)}return r}let n=g_(e,t);for(;n&&p_(n)&&NS(n);)n=g_(n,t);return n&&Fs(n)&&NS(n)&&!og(n)?r:n||m_(e)||r}var AY=async function(e){let t=this.getOffsetParent||S_,r=this.getDimensions,n=await r(e.floating);return{reference:LY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function OY(e){return Gn(e).direction==="rtl"}var C_={convertOffsetParentRelativeRectToViewportRelativeRect:yY,getDocumentElement:Za,getClippingRect:PY,getOffsetParent:S_,getElementRects:AY,getClientRects:xY,getDimensions:IY,getScale:Cu,isElement:$n,isRTL:OY};function kY(e,t){let r=null,n,a=Za(e);function o(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();let{left:u,top:f,width:c,height:d}=e.getBoundingClientRect();if(s||t(),!c||!d)return;let p=_d(f),h=_d(a.clientWidth-(u+c)),m=_d(a.clientHeight-(f+d)),x=_d(u),v={rootMargin:-p+"px "+-h+"px "+-m+"px "+-x+"px",threshold:Rr(0,Vn(1,l))||1},w=!0;function b(y){let S=y[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):n=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}return i(!0),o}function BS(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=FS(e),f=a||o?[...u?Ds(u):[],...Ds(t)]:[];f.forEach(g=>{a&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});let c=u&&s?kY(u,r):null,d=-1,p=null;i&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let h,m=l?Bs(e):null;l&&x();function x(){let g=Bs(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&r(),m=g,h=requestAnimationFrame(x)}return r(),()=>{var g;f.forEach(v=>{a&&v.removeEventListener("scroll",r),o&&v.removeEventListener("resize",r)}),c?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var P_=s_;var I_=l_,L_=o_,A_=c_,O_=i_,jS=a_;var k_=u_,qS=(e,t,r)=>{let n=new Map,a={platform:C_,...r},o={...a.platform,_c:n};return n_(e,t,{...a,platform:o})};var Et=R(G(),1),cg=R(G(),1),R_=R(Ti(),1),lg=typeof document<"u"?cg.useLayoutEffect:cg.useEffect;function ug(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ug(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let o=a[n];if(!(o==="_owner"&&e.$$typeof)&&!ug(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function __(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function E_(e,t){let r=__(e);return Math.round(t*r)/r}function T_(e){let t=Et.useRef(e);return lg(()=>{t.current=e}),t}function M_(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,c]=Et.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=Et.useState(n);ug(d,n)||p(n);let[h,m]=Et.useState(null),[x,g]=Et.useState(null),v=Et.useCallback(C=>{C!==S.current&&(S.current=C,m(C))},[]),w=Et.useCallback(C=>{C!==P.current&&(P.current=C,g(C))},[]),b=o||h,y=i||x,S=Et.useRef(null),P=Et.useRef(null),A=Et.useRef(f),_=l!=null,T=T_(l),D=T_(a),N=Et.useCallback(()=>{if(!S.current||!P.current)return;let C={placement:t,strategy:r,middleware:d};D.current&&(C.platform=D.current),qS(S.current,P.current,C).then(L=>{let O={...L,isPositioned:!0};j.current&&!ug(A.current,O)&&(A.current=O,R_.flushSync(()=>{c(O)}))})},[d,t,r,D]);lg(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,c(C=>({...C,isPositioned:!1})))},[u]);let j=Et.useRef(!1);lg(()=>(j.current=!0,()=>{j.current=!1}),[]),lg(()=>{if(b&&(S.current=b),y&&(P.current=y),b&&y){if(T.current)return T.current(b,y,N);N()}},[b,y,N,T,_]);let B=Et.useMemo(()=>({reference:S,floating:P,setReference:v,setFloating:w}),[v,w]),H=Et.useMemo(()=>({reference:b,floating:y}),[b,y]),I=Et.useMemo(()=>{let C={position:r,left:0,top:0};if(!H.floating)return C;let L=E_(H.floating,f.x),O=E_(H.floating,f.y);return s?{...C,transform:"translate("+L+"px, "+O+"px)",...__(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:O}},[r,s,H.floating,f.x,f.y]);return Et.useMemo(()=>({...f,update:N,refs:B,elements:H,floatingStyles:I}),[f,N,B,H,I])}var EY=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?jS({element:n.current,padding:a}).fn(r):{}:n?jS({element:n,padding:a}).fn(r):{}}}},D_=(e,t)=>({...P_(e),options:[e,t]}),N_=(e,t)=>({...I_(e),options:[e,t]}),F_=(e,t)=>({...k_(e),options:[e,t]}),B_=(e,t)=>({...L_(e),options:[e,t]}),j_=(e,t)=>({...A_(e),options:[e,t]});var q_=(e,t)=>({...O_(e),options:[e,t]});var U_=(e,t)=>({...EY(e),options:[e,t]});var H_=R(G(),1);var US=R(_t(),1),TY="Arrow",W_=H_.forwardRef((e,t)=>{let{children:r,width:n=10,height:a=5,...o}=e;return(0,US.jsx)(xe.svg,{...o,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,US.jsx)("polygon",{points:"0,0 30,0 15,10"})})});W_.displayName=TY;var z_=W_;var V_=R(G(),1);function $_(e){let[t,r]=V_.useState(void 0);return Ct(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let o=a[0],i,s;if("borderBoxSize"in o){let l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Mi=R(_t(),1);var HS="Popper",[G_,No]=Xr(HS),[_Y,K_]=G_(HS),X_=e=>{let{__scopePopper:t,children:r}=e,[n,a]=yn.useState(null);return(0,Mi.jsx)(_Y,{scope:t,anchor:n,onAnchorChange:a,children:r})};X_.displayName=HS;var Y_="PopperAnchor",J_=yn.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...a}=e,o=K_(Y_,r),i=yn.useRef(null),s=Le(t,i);return yn.useEffect(()=>{o.onAnchorChange(n?.current||i.current)}),n?null:(0,Mi.jsx)(xe.div,{...a,ref:s})});J_.displayName=Y_;var WS="PopperContent",[MY,DY]=G_(WS),Q_=yn.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,x=K_(WS,r),[g,v]=yn.useState(null),w=Le(t,W=>v(W)),[b,y]=yn.useState(null),S=$_(b),P=S?.width??0,A=S?.height??0,_=n+(o!=="center"?"-"+o:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(u)?u:[u],N=D.length>0,j={padding:T,boundary:D.filter(FY),altBoundary:N},{refs:B,floatingStyles:H,placement:I,isPositioned:C,middlewareData:L}=M_({strategy:"fixed",placement:_,whileElementsMounted:(...W)=>BS(...W,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[D_({mainAxis:a+A,alignmentAxis:i}),l&&N_({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?F_():void 0,...j}),l&&B_({...j}),j_({...j,apply:({elements:W,rects:ie,availableWidth:V,availableHeight:re})=>{let{width:Q,height:U}=ie.reference,be=W.floating.style;be.setProperty("--radix-popper-available-width",`${V}px`),be.setProperty("--radix-popper-available-height",`${re}px`),be.setProperty("--radix-popper-anchor-width",`${Q}px`),be.setProperty("--radix-popper-anchor-height",`${U}px`)}}),b&&U_({element:b,padding:s}),BY({arrowWidth:P,arrowHeight:A}),d&&q_({strategy:"referenceHidden",...j})]}),[O,E]=tM(I),k=wt(h);Ct(()=>{C&&k?.()},[C,k]);let F=L.arrow?.x,q=L.arrow?.y,$=L.arrow?.centerOffset!==0,[ee,J]=yn.useState();return Ct(()=>{g&&J(window.getComputedStyle(g).zIndex)},[g]),(0,Mi.jsx)("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:C?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,["--radix-popper-transform-origin"]:[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Mi.jsx)(MY,{scope:r,placedSide:O,onArrowChange:y,arrowX:F,arrowY:q,shouldHideArrow:$,children:(0,Mi.jsx)(xe.div,{"data-side":O,"data-align":E,...m,ref:w,style:{...m.style,animation:C?void 0:"none"}})})})});Q_.displayName=WS;var Z_="PopperArrow",NY={top:"bottom",right:"left",bottom:"top",left:"right"},eM=yn.forwardRef(function(t,r){let{__scopePopper:n,...a}=t,o=DY(Z_,n),i=NY[o.placedSide];return(0,Mi.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,Mi.jsx)(z_,{...a,ref:r,style:{...a.style,display:"block"}})})});eM.displayName=Z_;function FY(e){return e!==null}var BY=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:a}=t,i=a.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=tM(r),c={start:"0%",center:"50%",end:"100%"}[f],d=(a.arrow?.x??0)+s/2,p=(a.arrow?.y??0)+l/2,h="",m="";return u==="bottom"?(h=i?c:`${d}px`,m=`${-l}px`):u==="top"?(h=i?c:`${d}px`,m=`${n.floating.height+l}px`):u==="right"?(h=`${-l}px`,m=i?c:`${p}px`):u==="left"&&(h=`${n.floating.width+l}px`,m=i?c:`${p}px`),{data:{x:h,y:m}}}});function tM(e){let[t,r="center"]=e.split("-");return[t,r]}var js=X_,qs=J_,Pu=Q_,Iu=eM;var fg=R(G(),1),rM=R(Ti(),1);var nM=R(_t(),1),jY="Portal",Us=fg.forwardRef((e,t)=>{let{container:r,...n}=e,[a,o]=fg.useState(!1);Ct(()=>o(!0),[]);let i=r||a&&globalThis?.document?.body;return i?rM.default.createPortal((0,nM.jsx)(xe.div,{...n,ref:t}),i):null});Us.displayName=jY;var nn=R(G(),1),aM=R(Ti(),1);var oM=R(G(),1);function qY(e,t){return oM.useReducer((r,n)=>t[r][n]??r,e)}var Fo=e=>{let{present:t,children:r}=e,n=UY(t),a=typeof r=="function"?r({present:n.isPresent}):nn.Children.only(r),o=Le(n.ref,HY(a));return typeof r=="function"||n.isPresent?nn.cloneElement(a,{ref:o}):null};Fo.displayName="Presence";function UY(e){let[t,r]=nn.useState(),n=nn.useRef({}),a=nn.useRef(e),o=nn.useRef("none"),i=e?"mounted":"unmounted",[s,l]=qY(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return nn.useEffect(()=>{let u=dg(n.current);o.current=s==="mounted"?u:"none"},[s]),Ct(()=>{let u=n.current,f=a.current;if(f!==e){let d=o.current,p=dg(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Ct(()=>{if(t){let u=c=>{let p=dg(n.current).includes(c.animationName);c.target===t&&p&&aM.flushSync(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(o.current=dg(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:nn.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function dg(e){return e?.animationName||"none"}function HY(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zt=R(G(),1);var Di=R(_t(),1),VS="rovingFocusGroup.onEntryFocus",WY={bubbles:!1,cancelable:!0},pg="RovingFocusGroup",[$S,iM,zY]=yu(pg),[VY,GS]=Xr(pg,[zY]),[$Y,GY]=VY(pg),sM=zt.forwardRef((e,t)=>(0,Di.jsx)($S.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Di.jsx)($S.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Di.jsx)(KY,{...e,ref:t})})}));sM.displayName=pg;var KY=zt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,d=zt.useRef(null),p=Le(t,d),h=xu(o),[m=null,x]=So({prop:i,defaultProp:s,onChange:l}),[g,v]=zt.useState(!1),w=wt(u),b=iM(r),y=zt.useRef(!1),[S,P]=zt.useState(0);return zt.useEffect(()=>{let A=d.current;if(A)return A.addEventListener(VS,w),()=>A.removeEventListener(VS,w)},[w]),(0,Di.jsx)($Y,{scope:r,orientation:n,dir:h,loop:a,currentTabStopId:m,onItemFocus:zt.useCallback(A=>x(A),[x]),onItemShiftTab:zt.useCallback(()=>v(!0),[]),onFocusableItemAdd:zt.useCallback(()=>P(A=>A+1),[]),onFocusableItemRemove:zt.useCallback(()=>P(A=>A-1),[]),children:(0,Di.jsx)(xe.div,{tabIndex:g||S===0?-1:0,"data-orientation":n,...c,ref:p,style:{outline:"none",...e.style},onMouseDown:le(e.onMouseDown,()=>{y.current=!0}),onFocus:le(e.onFocus,A=>{let _=!y.current;if(A.target===A.currentTarget&&_&&!g){let T=new CustomEvent(VS,WY);if(A.currentTarget.dispatchEvent(T),!T.defaultPrevented){let D=b().filter(I=>I.focusable),N=D.find(I=>I.active),j=D.find(I=>I.id===m),H=[N,j,...D].filter(Boolean).map(I=>I.ref.current);cM(H,f)}}y.current=!1}),onBlur:le(e.onBlur,()=>v(!1))})})}),lM="RovingFocusGroupItem",uM=zt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:o,...i}=e,s=tn(),l=o||s,u=GY(lM,r),f=u.currentTabStopId===l,c=iM(r),{onFocusableItemAdd:d,onFocusableItemRemove:p}=u;return zt.useEffect(()=>{if(n)return d(),()=>p()},[n,d,p]),(0,Di.jsx)($S.ItemSlot,{scope:r,id:l,focusable:n,active:a,children:(0,Di.jsx)(xe.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:le(e.onMouseDown,h=>{n?u.onItemFocus(l):h.preventDefault()}),onFocus:le(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:le(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let m=JY(h,u.orientation,u.dir);if(m!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let g=c().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();let v=g.indexOf(h.currentTarget);g=u.loop?QY(g,v+1):g.slice(v+1)}setTimeout(()=>cM(g))}})})})});uM.displayName=lM;var XY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JY(e,t,r){let n=YY(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return XY[n]}function cM(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function QY(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var fM=sM,dM=uM;var e7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lu=new WeakMap,mg=new WeakMap,hg={},KS=0,pM=function(e){return e&&(e.host||pM(e.parentNode))},t7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=pM(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},r7=function(e,t,r,n){var a=t7(t,Array.isArray(e)?e:[e]);hg[r]||(hg[r]=new WeakMap);var o=hg[r],i=[],s=new Set,l=new Set(a),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};a.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(d){if(s.has(d))f(d);else try{var p=d.getAttribute(n),h=p!==null&&p!=="false",m=(Lu.get(d)||0)+1,x=(o.get(d)||0)+1;Lu.set(d,m),o.set(d,x),i.push(d),m===1&&h&&mg.set(d,!0),x===1&&d.setAttribute(r,"true"),h||d.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(t),s.clear(),KS++,function(){i.forEach(function(c){var d=Lu.get(c)-1,p=o.get(c)-1;Lu.set(c,d),o.set(c,p),d||(mg.has(c)||c.removeAttribute(n),mg.delete(c)),p||c.removeAttribute(r)}),KS--,KS||(Lu=new WeakMap,Lu=new WeakMap,mg=new WeakMap,hg={})}},Au=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||e7(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),r7(n,a,r,"aria-hidden")):function(){return null}};var an=function(){return an=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return u7;var t=c7(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var f7=Fd(),Ou="data-scroll-locked",d7=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(XS,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body[`).concat(Ou,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(i,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Hs,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(Ws,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(Hs," .").concat(Hs,` { + right: 0 `).concat(n,`; + } + + .`).concat(Ws," .").concat(Ws,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(Ou,`] { + `).concat(YS,": ").concat(s,`px; + } +`)},CM=function(){var e=parseInt(document.body.getAttribute(Ou)||"0",10);return isFinite(e)?e:0},p7=function(){ku.useEffect(function(){return document.body.setAttribute(Ou,(CM()+1).toString()),function(){var e=CM()-1;e<=0?document.body.removeAttribute(Ou):document.body.setAttribute(Ou,e.toString())}},[])},oC=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;p7();var o=ku.useMemo(function(){return aC(a)},[a]);return ku.createElement(f7,{styles:d7(o,!t,a,r?"":"!important")})};var iC=!1;if(typeof window<"u")try{Bd=Object.defineProperty({},"passive",{get:function(){return iC=!0,!0}}),window.addEventListener("test",Bd,Bd),window.removeEventListener("test",Bd,Bd)}catch{iC=!1}var Bd,zs=iC?{passive:!1}:!1;var m7=function(e){return e.tagName==="TEXTAREA"},PM=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!m7(e)&&r[t]==="visible")},h7=function(e){return PM(e,"overflowY")},v7=function(e){return PM(e,"overflowX")},sC=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=IM(e,n);if(a){var o=LM(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},g7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},y7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},IM=function(e,t){return e==="v"?h7(t):v7(t)},LM=function(e,t){return e==="v"?g7(t):y7(t)},x7=function(e,t){return e==="h"&&t==="rtl"?-1:1},AM=function(e,t,r,n,a){var o=x7(e,window.getComputedStyle(t).direction),i=o*n,s=r.target,l=t.contains(s),u=!1,f=i>0,c=0,d=0;do{var p=LM(e,s),h=p[0],m=p[1],x=p[2],g=m-x-o*h;(h||g)&&IM(e,s)&&(c+=g,d+=h),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(a&&Math.abs(c)<1||!a&&i>c)||!f&&(a&&Math.abs(d)<1||!a&&-i>d))&&(u=!0),u};var bg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},OM=function(e){return[e.deltaX,e.deltaY]},kM=function(e){return e&&"current"in e?e.current:e},b7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},w7=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},S7=0,Eu=[];function EM(e){var t=rt.useRef([]),r=rt.useRef([0,0]),n=rt.useRef(),a=rt.useState(S7++)[0],o=rt.useState(Fd)[0],i=rt.useRef(e);rt.useEffect(function(){i.current=e},[e]),rt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var m=mM([e.lockRef.current],(e.shards||[]).map(kM),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=rt.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!i.current.allowPinchZoom;var g=bg(m),v=r.current,w="deltaX"in m?m.deltaX:v[0]-g[0],b="deltaY"in m?m.deltaY:v[1]-g[1],y,S=m.target,P=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in m&&P==="h"&&S.type==="range")return!1;var A=sC(P,S);if(!A)return!0;if(A?y=P:(y=P==="v"?"h":"v",A=sC(P,S)),!A)return!1;if(!n.current&&"changedTouches"in m&&(w||b)&&(n.current=y),!y)return!0;var _=n.current||y;return AM(_,x,m,_==="h"?w:b,!0)},[]),l=rt.useCallback(function(m){var x=m;if(!(!Eu.length||Eu[Eu.length-1]!==o)){var g="deltaY"in x?OM(x):bg(x),v=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&b7(y.delta,g)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var w=(i.current.shards||[]).map(kM).filter(Boolean).filter(function(y){return y.contains(x.target)}),b=w.length>0?s(x,w[0]):!i.current.noIsolation;b&&x.cancelable&&x.preventDefault()}}},[]),u=rt.useCallback(function(m,x,g,v){var w={name:m,delta:x,target:g,should:v,shadowParent:C7(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),f=rt.useCallback(function(m){r.current=bg(m),n.current=void 0},[]),c=rt.useCallback(function(m){u(m.type,OM(m),m.target,s(m,e.lockRef.current))},[]),d=rt.useCallback(function(m){u(m.type,bg(m),m.target,s(m,e.lockRef.current))},[]);rt.useEffect(function(){return Eu.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:d}),document.addEventListener("wheel",l,zs),document.addEventListener("touchmove",l,zs),document.addEventListener("touchstart",f,zs),function(){Eu=Eu.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,zs),document.removeEventListener("touchmove",l,zs),document.removeEventListener("touchstart",f,zs)}},[]);var p=e.removeScrollBar,h=e.inert;return rt.createElement(rt.Fragment,null,h?rt.createElement(o,{styles:w7(a)}):null,p?rt.createElement(oC,{gapMode:e.gapMode}):null)}function C7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var TM=ZS(xg,EM);var RM=wg.forwardRef(function(e,t){return wg.createElement(Nd,an({},e,{ref:t,sideCar:TM}))});RM.classNames=Nd.classNames;var Vs=RM;var ge=R(_t(),1),lC=["Enter"," "],P7=["ArrowDown","PageUp","Home"],MM=["ArrowUp","PageDown","End"],I7=[...P7,...MM],L7={ltr:[...lC,"ArrowRight"],rtl:[...lC,"ArrowLeft"]},A7={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hd="Menu",[qd,O7,k7]=yu(Hd),[$s,uC]=Xr(Hd,[k7,No,GS]),Wd=No(),DM=GS(),[NM,Ni]=$s(Hd),[E7,zd]=$s(Hd),FM=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:o,modal:i=!0}=e,s=Wd(t),[l,u]=ue.useState(null),f=ue.useRef(!1),c=wt(o),d=xu(a);return ue.useEffect(()=>{let p=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),(0,ge.jsx)(js,{...s,children:(0,ge.jsx)(NM,{scope:t,open:r,onOpenChange:c,content:l,onContentChange:u,children:(0,ge.jsx)(E7,{scope:t,onClose:ue.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:f,dir:d,modal:i,children:n})})})};FM.displayName=Hd;var T7="MenuAnchor",cC=ue.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=Wd(r);return(0,ge.jsx)(qs,{...a,...n,ref:t})});cC.displayName=T7;var fC="MenuPortal",[R7,BM]=$s(fC,{forceMount:void 0}),jM=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:a}=e,o=Ni(fC,t);return(0,ge.jsx)(R7,{scope:t,forceMount:r,children:(0,ge.jsx)(Fo,{present:r||o.open,children:(0,ge.jsx)(Us,{asChild:!0,container:a,children:n})})})};jM.displayName=fC;var Kn="MenuContent",[_7,dC]=$s(Kn),qM=ue.forwardRef((e,t)=>{let r=BM(Kn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,o=Ni(Kn,e.__scopeMenu),i=zd(Kn,e.__scopeMenu);return(0,ge.jsx)(qd.Provider,{scope:e.__scopeMenu,children:(0,ge.jsx)(Fo,{present:n||o.open,children:(0,ge.jsx)(qd.Slot,{scope:e.__scopeMenu,children:i.modal?(0,ge.jsx)(M7,{...a,ref:t}):(0,ge.jsx)(D7,{...a,ref:t})})})})}),M7=ue.forwardRef((e,t)=>{let r=Ni(Kn,e.__scopeMenu),n=ue.useRef(null),a=Le(t,n);return ue.useEffect(()=>{let o=n.current;if(o)return Au(o)},[]),(0,ge.jsx)(pC,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:le(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),D7=ue.forwardRef((e,t)=>{let r=Ni(Kn,e.__scopeMenu);return(0,ge.jsx)(pC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),pC=ue.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,...m}=e,x=Ni(Kn,r),g=zd(Kn,r),v=Wd(r),w=DM(r),b=O7(r),[y,S]=ue.useState(null),P=ue.useRef(null),A=Le(t,P,x.onContentChange),_=ue.useRef(0),T=ue.useRef(""),D=ue.useRef(0),N=ue.useRef(null),j=ue.useRef("right"),B=ue.useRef(0),H=h?Vs:ue.Fragment,I=h?{as:Kr,allowPinchZoom:!0}:void 0,C=O=>{let E=T.current+O,k=b().filter(W=>!W.disabled),F=document.activeElement,q=k.find(W=>W.ref.current===F)?.textValue,$=k.map(W=>W.textValue),ee=K7($,E,q),J=k.find(W=>W.textValue===ee)?.ref.current;(function W(ie){T.current=ie,window.clearTimeout(_.current),ie!==""&&(_.current=window.setTimeout(()=>W(""),1e3))})(E),J&&setTimeout(()=>J.focus())};ue.useEffect(()=>()=>window.clearTimeout(_.current),[]),bu();let L=ue.useCallback(O=>j.current===N.current?.side&&Y7(O,N.current?.area),[]);return(0,ge.jsx)(_7,{scope:r,searchRef:T,onItemEnter:ue.useCallback(O=>{L(O)&&O.preventDefault()},[L]),onItemLeave:ue.useCallback(O=>{L(O)||(P.current?.focus(),S(null))},[L]),onTriggerLeave:ue.useCallback(O=>{L(O)&&O.preventDefault()},[L]),pointerGraceTimerRef:D,onPointerGraceIntentChange:ue.useCallback(O=>{N.current=O},[]),children:(0,ge.jsx)(H,{...I,children:(0,ge.jsx)(Rs,{asChild:!0,trapped:a,onMountAutoFocus:le(o,O=>{O.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,ge.jsx)(Ts,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:d,onDismiss:p,children:(0,ge.jsx)(fM,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:y,onCurrentTabStopIdChange:S,onEntryFocus:le(l,O=>{g.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,ge.jsx)(Pu,{role:"menu","aria-orientation":"vertical","data-state":rD(x.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:le(m.onKeyDown,O=>{let k=O.target.closest("[data-radix-menu-content]")===O.currentTarget,F=O.ctrlKey||O.altKey||O.metaKey,q=O.key.length===1;k&&(O.key==="Tab"&&O.preventDefault(),!F&&q&&C(O.key));let $=P.current;if(O.target!==$||!I7.includes(O.key))return;O.preventDefault();let J=b().filter(W=>!W.disabled).map(W=>W.ref.current);MM.includes(O.key)&&J.reverse(),$7(J)}),onBlur:le(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(_.current),T.current="")}),onPointerMove:le(e.onPointerMove,Ud(O=>{let E=O.target,k=B.current!==O.clientX;if(O.currentTarget.contains(E)&&k){let F=O.clientX>B.current?"right":"left";j.current=F,B.current=O.clientX}}))})})})})})})});qM.displayName=Kn;var N7="MenuGroup",mC=ue.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,ge.jsx)(xe.div,{role:"group",...n,ref:t})});mC.displayName=N7;var F7="MenuLabel",UM=ue.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,ge.jsx)(xe.div,{...n,ref:t})});UM.displayName=F7;var Sg="MenuItem",_M="menu.itemSelect",Pg=ue.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...a}=e,o=ue.useRef(null),i=zd(Sg,e.__scopeMenu),s=dC(Sg,e.__scopeMenu),l=Le(t,o),u=ue.useRef(!1),f=()=>{let c=o.current;if(!r&&c){let d=new CustomEvent(_M,{bubbles:!0,cancelable:!0});c.addEventListener(_M,p=>n?.(p),{once:!0}),Jv(c,d),d.defaultPrevented?u.current=!1:i.onClose()}};return(0,ge.jsx)(HM,{...a,ref:l,disabled:r,onClick:le(e.onClick,f),onPointerDown:c=>{e.onPointerDown?.(c),u.current=!0},onPointerUp:le(e.onPointerUp,c=>{u.current||c.currentTarget?.click()}),onKeyDown:le(e.onKeyDown,c=>{let d=s.searchRef.current!=="";r||d&&c.key===" "||lC.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});Pg.displayName=Sg;var HM=ue.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:a,...o}=e,i=dC(Sg,r),s=DM(r),l=ue.useRef(null),u=Le(t,l),[f,c]=ue.useState(!1),[d,p]=ue.useState("");return ue.useEffect(()=>{let h=l.current;h&&p((h.textContent??"").trim())},[o.children]),(0,ge.jsx)(qd.ItemSlot,{scope:r,disabled:n,textValue:a??d,children:(0,ge.jsx)(dM,{asChild:!0,...s,focusable:!n,children:(0,ge.jsx)(xe.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:le(e.onPointerMove,Ud(h=>{n?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:le(e.onPointerLeave,Ud(h=>i.onItemLeave(h))),onFocus:le(e.onFocus,()=>c(!0)),onBlur:le(e.onBlur,()=>c(!1))})})})}),B7="MenuCheckboxItem",WM=ue.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...a}=e;return(0,ge.jsx)(KM,{scope:e.__scopeMenu,checked:r,children:(0,ge.jsx)(Pg,{role:"menuitemcheckbox","aria-checked":Cg(r)?"mixed":r,...a,ref:t,"data-state":gC(r),onSelect:le(a.onSelect,()=>n?.(Cg(r)?!0:!r),{checkForDefaultPrevented:!1})})})});WM.displayName=B7;var zM="MenuRadioGroup",[j7,q7]=$s(zM,{value:void 0,onValueChange:()=>{}}),VM=ue.forwardRef((e,t)=>{let{value:r,onValueChange:n,...a}=e,o=wt(n);return(0,ge.jsx)(j7,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,ge.jsx)(mC,{...a,ref:t})})});VM.displayName=zM;var $M="MenuRadioItem",GM=ue.forwardRef((e,t)=>{let{value:r,...n}=e,a=q7($M,e.__scopeMenu),o=r===a.value;return(0,ge.jsx)(KM,{scope:e.__scopeMenu,checked:o,children:(0,ge.jsx)(Pg,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":gC(o),onSelect:le(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});GM.displayName=$M;var hC="MenuItemIndicator",[KM,U7]=$s(hC,{checked:!1}),XM=ue.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,o=U7(hC,r);return(0,ge.jsx)(Fo,{present:n||Cg(o.checked)||o.checked===!0,children:(0,ge.jsx)(xe.span,{...a,ref:t,"data-state":gC(o.checked)})})});XM.displayName=hC;var H7="MenuSeparator",YM=ue.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,ge.jsx)(xe.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});YM.displayName=H7;var W7="MenuArrow",JM=ue.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=Wd(r);return(0,ge.jsx)(Iu,{...a,...n,ref:t})});JM.displayName=W7;var vC="MenuSub",[z7,QM]=$s(vC),V7=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,o=Ni(vC,t),i=Wd(t),[s,l]=ue.useState(null),[u,f]=ue.useState(null),c=wt(a);return ue.useEffect(()=>(o.open===!1&&c(!1),()=>c(!1)),[o.open,c]),(0,ge.jsx)(js,{...i,children:(0,ge.jsx)(NM,{scope:t,open:n,onOpenChange:c,content:u,onContentChange:f,children:(0,ge.jsx)(z7,{scope:t,contentId:tn(),triggerId:tn(),trigger:s,onTriggerChange:l,children:r})})})};V7.displayName=vC;var jd="MenuSubTrigger",ZM=ue.forwardRef((e,t)=>{let r=Ni(jd,e.__scopeMenu),n=zd(jd,e.__scopeMenu),a=QM(jd,e.__scopeMenu),o=dC(jd,e.__scopeMenu),i=ue.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},f=ue.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return ue.useEffect(()=>f,[f]),ue.useEffect(()=>{let c=s.current;return()=>{window.clearTimeout(c),l(null)}},[s,l]),(0,ge.jsx)(cC,{asChild:!0,...u,children:(0,ge.jsx)(HM,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":rD(r.open),...e,ref:hs(t,a.onTriggerChange),onClick:c=>{e.onClick?.(c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:le(e.onPointerMove,Ud(c=>{o.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:le(e.onPointerLeave,Ud(c=>{f();let d=r.content?.getBoundingClientRect();if(d){let p=r.content?.dataset.side,h=p==="right",m=h?-5:5,x=d[h?"left":"right"],g=d[h?"right":"left"];o.onPointerGraceIntentChange({area:[{x:c.clientX+m,y:c.clientY},{x,y:d.top},{x:g,y:d.top},{x:g,y:d.bottom},{x,y:d.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(c),c.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:le(e.onKeyDown,c=>{let d=o.searchRef.current!=="";e.disabled||d&&c.key===" "||L7[n.dir].includes(c.key)&&(r.onOpenChange(!0),r.content?.focus(),c.preventDefault())})})})});ZM.displayName=jd;var eD="MenuSubContent",tD=ue.forwardRef((e,t)=>{let r=BM(Kn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,o=Ni(Kn,e.__scopeMenu),i=zd(Kn,e.__scopeMenu),s=QM(eD,e.__scopeMenu),l=ue.useRef(null),u=Le(t,l);return(0,ge.jsx)(qd.Provider,{scope:e.__scopeMenu,children:(0,ge.jsx)(Fo,{present:n||o.open,children:(0,ge.jsx)(qd.Slot,{scope:e.__scopeMenu,children:(0,ge.jsx)(pC,{id:s.contentId,"aria-labelledby":s.triggerId,...a,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:le(e.onFocusOutside,f=>{f.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:le(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:le(e.onKeyDown,f=>{let c=f.currentTarget.contains(f.target),d=A7[i.dir].includes(f.key);c&&d&&(o.onOpenChange(!1),s.trigger?.focus(),f.preventDefault())})})})})})});tD.displayName=eD;function rD(e){return e?"open":"closed"}function Cg(e){return e==="indeterminate"}function gC(e){return Cg(e)?"indeterminate":e?"checked":"unchecked"}function $7(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function G7(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function K7(e,t,r){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1,i=G7(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function X7(e,t){let{x:r,y:n}=e,a=!1;for(let o=0,i=t.length-1;on!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(a=!a)}return a}function Y7(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return X7(r,t)}function Ud(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nD=FM,aD=cC,oD=jM,iD=qM,sD=mC,lD=UM,uD=Pg,cD=WM,fD=VM,dD=GM,pD=XM,mD=YM,hD=JM;var vD=ZM,gD=tD;var Vt=R(_t(),1),yC="DropdownMenu",[Q7,UAe]=Xr(yC,[uC]),_r=uC(),[Z7,yD]=Q7(yC),xD=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=_r(t),u=Nt.useRef(null),[f=!1,c]=So({prop:a,defaultProp:o,onChange:i});return(0,Vt.jsx)(Z7,{scope:t,triggerId:tn(),triggerRef:u,contentId:tn(),open:f,onOpenChange:c,onOpenToggle:Nt.useCallback(()=>c(d=>!d),[c]),modal:s,children:(0,Vt.jsx)(nD,{...l,open:f,onOpenChange:c,dir:n,modal:s,children:r})})};xD.displayName=yC;var bD="DropdownMenuTrigger",wD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,o=yD(bD,r),i=_r(r);return(0,Vt.jsx)(aD,{asChild:!0,...i,children:(0,Vt.jsx)(xe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:hs(t,o.triggerRef),onPointerDown:le(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:le(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});wD.displayName=bD;var eJ="DropdownMenuPortal",SD=e=>{let{__scopeDropdownMenu:t,...r}=e,n=_r(t);return(0,Vt.jsx)(oD,{...n,...r})};SD.displayName=eJ;var CD="DropdownMenuContent",PD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=yD(CD,r),o=_r(r),i=Nt.useRef(!1);return(0,Vt.jsx)(iD,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...n,ref:t,onCloseAutoFocus:le(e.onCloseAutoFocus,s=>{i.current||a.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:le(e.onInteractOutside,s=>{let l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!a.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PD.displayName=CD;var tJ="DropdownMenuGroup",rJ=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(sD,{...a,...n,ref:t})});rJ.displayName=tJ;var nJ="DropdownMenuLabel",ID=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(lD,{...a,...n,ref:t})});ID.displayName=nJ;var aJ="DropdownMenuItem",LD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(uD,{...a,...n,ref:t})});LD.displayName=aJ;var oJ="DropdownMenuCheckboxItem",AD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(cD,{...a,...n,ref:t})});AD.displayName=oJ;var iJ="DropdownMenuRadioGroup",sJ=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(fD,{...a,...n,ref:t})});sJ.displayName=iJ;var lJ="DropdownMenuRadioItem",OD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(dD,{...a,...n,ref:t})});OD.displayName=lJ;var uJ="DropdownMenuItemIndicator",kD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(pD,{...a,...n,ref:t})});kD.displayName=uJ;var cJ="DropdownMenuSeparator",ED=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(mD,{...a,...n,ref:t})});ED.displayName=cJ;var fJ="DropdownMenuArrow",dJ=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(hD,{...a,...n,ref:t})});dJ.displayName=fJ;var pJ="DropdownMenuSubTrigger",TD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(vD,{...a,...n,ref:t})});TD.displayName=pJ;var mJ="DropdownMenuSubContent",RD=Nt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=_r(r);return(0,Vt.jsx)(gD,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});RD.displayName=mJ;var _D=xD,MD=wD,DD=SD,xC=PD;var bC=ID,wC=LD,SC=AD;var CC=OD,PC=kD,IC=ED;var LC=TD,AC=RD;var ND=_D,FD=MD;var vJ=Ve.forwardRef((o,a)=>{var i=o,{className:e,inset:t,children:r}=i,n=Ie(i,["className","inset","children"]);return Ve.createElement(LC,fe({ref:a,className:ve("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e)},n),r,Ve.createElement(ms,{className:"ml-auto h-4 w-4"}))});vJ.displayName=LC.displayName;var gJ=Ve.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return Ve.createElement(AC,fe({ref:r,className:ve("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},t))});gJ.displayName=AC.displayName;var OC=Ve.forwardRef((a,n)=>{var o=a,{className:e,sideOffset:t=4}=o,r=Ie(o,["className","sideOffset"]);return Ve.createElement(DD,null,Ve.createElement(xC,fe({ref:n,sideOffset:t,className:ve("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},r)))});OC.displayName=xC.displayName;var Vd=Ve.forwardRef((a,n)=>{var o=a,{className:e,inset:t}=o,r=Ie(o,["className","inset"]);return Ve.createElement(wC,fe({ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e)},r))});Vd.displayName=wC.displayName;var yJ=Ve.forwardRef((o,a)=>{var i=o,{className:e,children:t,checked:r}=i,n=Ie(i,["className","children","checked"]);return Ve.createElement(SC,fe({ref:a,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r},n),Ve.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},Ve.createElement(PC,null,Ve.createElement(ps,{className:"h-4 w-4"}))),t)});yJ.displayName=SC.displayName;var xJ=Ve.forwardRef((a,n)=>{var o=a,{className:e,children:t}=o,r=Ie(o,["className","children"]);return Ve.createElement(CC,fe({ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},r),Ve.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},Ve.createElement(PC,null,Ve.createElement(Mf,{className:"h-2 w-2 fill-current"}))),t)});xJ.displayName=CC.displayName;var bJ=Ve.forwardRef((a,n)=>{var o=a,{className:e,inset:t}=o,r=Ie(o,["className","inset"]);return Ve.createElement(bC,fe({ref:n,className:ve("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e)},r))});bJ.displayName=bC.displayName;var wJ=Ve.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return Ve.createElement(IC,fe({ref:r,className:ve("-mx-1 my-1 h-px bg-muted",e)},t))});wJ.displayName=IC.displayName;var SJ=r=>{var n=r,{className:e}=n,t=Ie(n,["className"]);return Ve.createElement("span",fe({className:ve("ml-auto text-xs tracking-widest opacity-60",e)},t))};SJ.displayName="DropdownMenuShortcut";function BD(){let[e,t]=br.useState("theme-light");return br.useEffect(()=>{let r=document.documentElement.classList.contains("dark");t(r?"dark":"theme-light")},[]),br.useEffect(()=>{let r=e==="dark"||e==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList[r?"add":"remove"]("dark")},[e]),br.createElement(ND,null,br.createElement(FD,{asChild:!0},br.createElement(jf,{variant:"outline",size:"icon"},br.createElement(Nf,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),br.createElement(Df,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),br.createElement("span",{className:"sr-only"},"Toggle theme"))),br.createElement(OC,{align:"end"},br.createElement(Vd,{onClick:()=>t("theme-light")},"Light"),br.createElement(Vd,{onClick:()=>t("dark")},"Dark"),br.createElement(Vd,{onClick:()=>t("system")},"System")))}var Me=R(G());function se(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function vt(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xe(e,t){let r=se(e);return isNaN(t)?vt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xn(e,t){let r=se(e);if(isNaN(t))return vt(e,NaN);if(!t)return r;let n=r.getDate(),a=vt(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);let o=a.getDate();return n>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),n),r)}var CJ=Math.pow(10,8)*24*60*60*1e3,sOe=-CJ,Tu=6048e5,jD=864e5;var PJ=3600;var qD=PJ*24,lOe=qD*7,IJ=qD*365.2425,LJ=IJ/12,uOe=LJ*3;var AJ={};function eo(){return AJ}function wr(e,t){let r=eo(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=se(e),o=a.getDay(),i=(o=a.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Bo(e){let t=se(e);return t.setHours(0,0,0,0),t}function Ru(e){let t=se(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Xn(e,t){let r=Bo(e),n=Bo(t),a=+r-Ru(r),o=+n-Ru(n);return Math.round((a-o)/jD)}function UD(e){let t=Ig(e),r=vt(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Oa(r)}function Lg(e,t){let r=t*7;return Xe(e,r)}function HD(e,t){return xn(e,t*12)}function WD(e){let t;return e.forEach(function(r){let n=se(r);(t===void 0||t{let n=se(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Mr(e,t){let r=Bo(e),n=Bo(t);return+r==+n}function $d(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VD(e){if(!$d(e)&&typeof e!="number")return!1;let t=se(e);return!isNaN(Number(t))}function _u(e,t){let r=se(e),n=se(t),a=r.getFullYear()-n.getFullYear(),o=r.getMonth()-n.getMonth();return a*12+o}function $D(e,t,r){let n=wr(e,r),a=wr(t,r),o=+n-Ru(n),i=+a-Ru(a);return Math.round((o-i)/Tu)}function Ag(e){let t=se(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Sr(e){let t=se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Og(e){let t=se(e),r=vt(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Gd(e,t){let r=eo(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=se(e),o=a.getDay(),i=(o{let n,a=OJ[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function kg(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var kJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},EJ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},TJ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KD={date:kg({formats:kJ,defaultWidth:"full"}),time:kg({formats:EJ,defaultWidth:"full"}),dateTime:kg({formats:TJ,defaultWidth:"full"})};var RJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XD=(e,t,r,n)=>RJ[e];function Mu(e){return(t,r)=>{let n=r?.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;a=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;a=e.values[s]||e.values[i]}let o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}var _J={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},DJ={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},NJ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},FJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},BJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jJ=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},YD={ordinalNumber:jJ,era:Mu({values:_J,defaultWidth:"wide"}),quarter:Mu({values:MJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Mu({values:DJ,defaultWidth:"wide"}),day:Mu({values:NJ,defaultWidth:"wide"}),dayPeriod:Mu({values:FJ,defaultWidth:"wide",formattingValues:BJ,defaultFormattingWidth:"wide"})};function Du(e){return(t,r={})=>{let n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;let i=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?UJ(s,c=>c.test(i)):qJ(s,c=>c.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let f=t.slice(i.length);return{value:u,rest:f}}}function qJ(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function UJ(e,t){for(let r=0;r{let n=t.match(e.matchPattern);if(!n)return null;let a=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;let s=t.slice(a.length);return{value:i,rest:s}}}var HJ=/^(\d+)(th|st|nd|rd)?/i,WJ=/\d+/i,zJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VJ={any:[/^b/i,/^(a|c)/i]},$J={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GJ={any:[/1/i,/2/i,/3/i,/4/i]},KJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},XJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},JJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},QJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ZJ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},QD={ordinalNumber:JD({matchPattern:HJ,parsePattern:WJ,valueCallback:e=>parseInt(e,10)}),era:Du({matchPatterns:zJ,defaultMatchWidth:"wide",parsePatterns:VJ,defaultParseWidth:"any"}),quarter:Du({matchPatterns:$J,defaultMatchWidth:"wide",parsePatterns:GJ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Du({matchPatterns:KJ,defaultMatchWidth:"wide",parsePatterns:XJ,defaultParseWidth:"any"}),day:Du({matchPatterns:YJ,defaultMatchWidth:"wide",parsePatterns:JJ,defaultParseWidth:"any"}),dayPeriod:Du({matchPatterns:QJ,defaultMatchWidth:"any",parsePatterns:ZJ,defaultParseWidth:"any"})};var Kd={code:"en-US",formatDistance:GD,formatLong:KD,formatRelative:XD,localize:YD,match:QD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ZD(e){let t=se(e);return Xn(t,Og(t))+1}function Eg(e){let t=se(e),r=+Oa(t)-+UD(t);return Math.round(r/Tu)+1}function Tg(e,t){let r=se(e),n=r.getFullYear(),a=eo(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=vt(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);let s=wr(i,t),l=vt(e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);let u=wr(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function eN(e,t){let r=eo(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=Tg(e,t),o=vt(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),wr(o,t)}function Rg(e,t){let r=se(e),n=+wr(r,t)-+eN(r,t);return Math.round(n/Tu)+1}function Re(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var jo={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return Re(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Re(r+1,2)},d(e,t){return Re(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Re(e.getHours()%12||12,t.length)},H(e,t){return Re(e.getHours(),t.length)},m(e,t){return Re(e.getMinutes(),t.length)},s(e,t){return Re(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return Re(a,t.length)}};var Nu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},EC={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return jo.y(e,t)},Y:function(e,t,r,n){let a=Tg(e,n),o=a>0?a:1-a;if(t==="YY"){let i=o%100;return Re(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):Re(o,t.length)},R:function(e,t){let r=Ig(e);return Re(r,t.length)},u:function(e,t){let r=e.getFullYear();return Re(r,t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Re(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Re(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return jo.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Re(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a=Rg(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):Re(a,t.length)},I:function(e,t,r){let n=Eg(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Re(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):jo.d(e,t)},D:function(e,t,r){let n=ZD(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Re(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Re(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Re(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return Re(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),a;switch(n===12?a=Nu.noon:n===0?a=Nu.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),a;switch(n>=17?a=Nu.evening:n>=12?a=Nu.afternoon:n>=4?a=Nu.morning:a=Nu.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return jo.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):jo.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Re(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Re(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):jo.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):jo.s(e,t)},S:function(e,t){return jo.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return rN(n);case"XXXX":case"XX":return Gs(n);case"XXXXX":case"XXX":default:return Gs(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return rN(n);case"xxxx":case"xx":return Gs(n);case"xxxxx":case"xxx":default:return Gs(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tN(n,":");case"OOOO":default:return"GMT"+Gs(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tN(n,":");case"zzzz":default:return"GMT"+Gs(n,":")}},t:function(e,t,r){let n=Math.trunc(e.getTime()/1e3);return Re(n,t.length)},T:function(e,t,r){let n=e.getTime();return Re(n,t.length)}};function tN(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return o===0?r+String(a):r+String(a)+t+Re(o,2)}function rN(e,t){return e%60===0?(e>0?"-":"+")+Re(Math.abs(e)/60,2):Gs(e,t)}function Gs(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Re(Math.trunc(n/60),2),o=Re(n%60,2);return r+a+t+o}var nN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},aN=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eQ=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return nN(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",nN(n,t)).replace("{{time}}",aN(a,t))},oN={p:aN,P:eQ};var tQ=/^D+$/,rQ=/^Y+$/,nQ=["D","DD","YY","YYYY"];function iN(e){return tQ.test(e)}function sN(e){return rQ.test(e)}function lN(e,t,r){let n=aQ(e,t,r);if(console.warn(n),nQ.includes(e))throw new RangeError(n)}function aQ(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var oQ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iQ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sQ=/^'([^]*?)'?$/,lQ=/''/g,uQ=/[a-zA-Z]/;function Ce(e,t,r){let n=eo(),a=r?.locale??n.locale??Kd,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=se(e);if(!VD(s))throw new RangeError("Invalid time value");let l=t.match(iQ).map(f=>{let c=f[0];if(c==="p"||c==="P"){let d=oN[c];return d(f,a.formatLong)}return f}).join("").match(oQ).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let c=f[0];if(c==="'")return{isToken:!1,value:cQ(f)};if(EC[c])return{isToken:!0,value:f};if(c.match(uQ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:f}});a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));let u={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map(f=>{if(!f.isToken)return f.value;let c=f.value;(!r?.useAdditionalWeekYearTokens&&sN(c)||!r?.useAdditionalDayOfYearTokens&&iN(c))&&lN(c,t,String(e));let d=EC[c[0]];return d(s,c,a.localize,u)}).join("")}function cQ(e){let t=e.match(sQ);return t?t[1].replace(lQ,"'"):e}function uN(e){let t=se(e),r=t.getFullYear(),n=t.getMonth(),a=vt(e,0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function cN(e){return Math.trunc(+se(e)/1e3)}function fN(e){let t=se(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function dN(e,t){return $D(fN(e),Sr(e),t)+1}function _g(e,t){let r=se(e),n=se(t);return r.getTime()>n.getTime()}function TC(e,t){let r=se(e),n=se(t);return+r<+n}function Mg(e,t){let r=se(e),n=se(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function pN(e,t){let r=se(e),n=se(t);return r.getFullYear()===n.getFullYear()}function Dg(e,t){return Xe(e,-t)}function Ng(e,t){let r=se(e),n=r.getFullYear(),a=r.getDate(),o=vt(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);let i=uN(o);return r.setMonth(t,Math.min(a,i)),r}function RC(e,t){let r=se(e);return isNaN(+r)?vt(e,NaN):(r.setFullYear(t),r)}var oy=R(G());var YC=R(Bi()),Hu=R(Jn()),pF=R(Wg()),mF=R(it()),hF=R(Yn()),Wu=R(G()),vF=R(WC());var ty=R(Wg()),VC=R(ey()),nF=R(Bi()),aF=R(zC()),Pt=function(t){return t===0?0:t>0?1:-1},qo=function(t){return(0,ty.default)(t)&&t.indexOf("%")===t.length-1},Y=function(t){return(0,aF.default)(t)&&!(0,VC.default)(t)},Ye=function(t){return Y(t)||(0,ty.default)(t)},mte=0,Qn=function(t){var r=++mte;return"".concat(t||"").concat(r)},It=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!(0,ty.default)(t))return n;var o;if(qo(t)){var i=t.indexOf("%");o=r*parseFloat(t.slice(0,i))/100}else o=+t;return(0,VC.default)(o)&&(o=n),a&&o>r&&(o=r),o},no=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},oF=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xte(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function XC(e){return XC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},XC(e)}var cF={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};var Zn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},fF=null,KC=null,JC=function e(t){if(t===fF&&Array.isArray(KC))return KC;var r=[];return Wu.Children.forEach(t,function(n){(0,Hu.default)(n)||((0,vF.isFragment)(n)?r=r.concat(e(n.props.children)):r.push(n))}),KC=r,fF=t,r};function Ft(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Zn(a)}):n=[Zn(t)],JC(e).forEach(function(a){var o=(0,YC.default)(a,"type.displayName")||(0,YC.default)(a,"type.name");n.indexOf(o)!==-1&&r.push(a)}),r}function Cr(e,t){var r=Ft(e,t);return r&&r[0]}var QC=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Y(n)||n<=0||!Y(a)||a<=0)},bte=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],wte=function(t){return t&&t.type&&(0,pF.default)(t.type)&&bte.indexOf(t.type)>=0},gF=function(t){return t&&XC(t)==="object"&&"cx"in t&&"cy"in t&&"r"in t},Ste=function(t,r,n,a){var o,i=(o=ry===null||ry===void 0?void 0:ry[a])!==null&&o!==void 0?o:[];return!(0,mF.default)(t)&&(a&&i.includes(r)||lF.includes(r))||n&&ny.includes(r)};var te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if((0,Wu.isValidElement)(t)&&(a=t.props),!(0,hF.default)(a))return null;var o={};return Object.keys(a).forEach(function(i){var s;Ste((s=a)===null||s===void 0?void 0:s[i],i,r,n)&&(o[i]=a[i])}),o},ay=function e(t,r){if(t===r)return!0;var n=Wu.Children.count(t);if(n!==Wu.Children.count(r))return!1;if(n===0)return!0;if(n===1)return dF(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ite(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function tp(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,o=e.className,i=e.style,s=e.title,l=e.desc,u=Pte(e,Cte),f=a||{width:r,height:n,x:0,y:0},c=ae("recharts-surface",o);return oy.default.createElement("svg",eP({},te(u,!0,"svg"),{className:c,width:r,height:n,style:i,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),oy.default.createElement("title",null,s),oy.default.createElement("desc",null,l),t)}var rP=R(G());var Lte=["children","className"];function tP(){return tP=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ote(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var pe=rP.default.forwardRef(function(e,t){var r=e.children,n=e.className,a=Ate(e,Lte),o=ae("recharts-layer",n);return rP.default.createElement("g",tP({className:o},te(a,!0),{ref:t}),r)});var qi=R(G());var Sn=R(G()),BP=R(it());var kte=!1,Gt=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qF;let r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;aJs)if(!(Math.abs(c*l-u*f)>Js)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-i,h=a-s,m=l*l+u*u,x=p*p+h*h,g=Math.sqrt(m),v=Math.sqrt(d),w=o*Math.tan((sP-Math.acos((m+d-x)/(2*g*v)))/2),b=w/v,y=w/g;Math.abs(b-1)>Js&&this._append`L${t+b*f},${r+b*c}`,this._append`A${o},${o},0,0,${+(c*p>f*h)},${this._x1=t+y*l},${this._y1=r+y*u}`}}arc(t,r,n,a,o,i){if(t=+t,r=+r,n=+n,i=!!i,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,f=r+l,c=1^i,d=i?a-o:o-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Js||Math.abs(this._y1-f)>Js)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%lP+lP),d>pre?this._append`A${n},${n},0,1,${c},${t-s},${r-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:d>Js&&this._append`A${n},${n},0,${+(d>=sP)},${c},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}};function UF(){return new Qs}UF.prototype=Qs.prototype;function Vu(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Qs(t)}var RTe=Array.prototype.slice;function $u(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function HF(e){this._context=e}HF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ji(e){return new HF(e)}function sy(e){return e[0]}function ly(e){return e[1]}function np(e,t){var r=De(!0),n=null,a=ji,o=null,i=Vu(s);e=typeof e=="function"?e:e===void 0?sy:De(e),t=typeof t=="function"?t:t===void 0?ly:De(t);function s(l){var u,f=(l=$u(l)).length,c,d=!1,p;for(n==null&&(o=a(p=i())),u=0;u<=f;++u)!(u=p;--h)s.point(w[h],b[h]);s.lineEnd(),s.areaEnd()}g&&(w[d]=+e(x,d,c),b[d]=+t(x,d,c),s.point(n?+n(x,d,c):w[d],r?+r(x,d,c):b[d]))}if(v)return s=null,v+""||null}function f(){return np().defined(a).curve(i).context(o)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:De(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:De(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(a=typeof c=="function"?c:De(!!c),u):a},u.curve=function(c){return arguments.length?(i=c,o!=null&&(s=i(o)),u):i},u.context=function(c){return arguments.length?(c==null?o=s=null:s=i(o=c),u):o},u}var uy=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};function uP(e){return new uy(e,!0)}function cP(e){return new uy(e,!1)}var Ku={draw(e,t){let r=Kt(t/Ys);e.moveTo(r,0),e.arc(0,0,r,0,zu)}};var fP={draw(e,t){let r=Kt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var WF=Kt(1/3),hre=WF*2,dP={draw(e,t){let r=Kt(t/hre),n=r*WF;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var pP={draw(e,t){let r=Kt(t),n=-r/2;e.rect(n,n,r,r)}};var vre=.8908130915292852,zF=rp(Ys/10)/rp(7*Ys/10),gre=rp(zu/10)*zF,yre=-iP(zu/10)*zF,mP={draw(e,t){let r=Kt(t*vre),n=gre*r,a=yre*r;e.moveTo(0,-r),e.lineTo(n,a);for(let o=1;o<5;++o){let i=zu*o/5,s=iP(i),l=rp(i);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}};var hP=Kt(3),vP={draw(e,t){let r=-Kt(t/(hP*3));e.moveTo(0,r*2),e.lineTo(-hP*r,-r),e.lineTo(hP*r,-r),e.closePath()}};var ea=-.5,ta=Kt(3)/2,gP=1/Kt(12),xre=(gP/2+1)*3,yP={draw(e,t){let r=Kt(t/xre),n=r/2,a=r*gP,o=n,i=r*gP+r,s=-o,l=i;e.moveTo(n,a),e.lineTo(o,i),e.lineTo(s,l),e.lineTo(ea*n-ta*a,ta*n+ea*a),e.lineTo(ea*o-ta*i,ta*o+ea*i),e.lineTo(ea*s-ta*l,ta*s+ea*l),e.lineTo(ea*n+ta*a,ea*a-ta*n),e.lineTo(ea*o+ta*i,ea*i-ta*o),e.lineTo(ea*s+ta*l,ea*l-ta*s),e.closePath()}};function cy(e,t){let r=null,n=Vu(a);e=typeof e=="function"?e:De(e||Ku),t=typeof t=="function"?t:De(t===void 0?64:+t);function a(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:De(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:De(+o),a):t},a.context=function(o){return arguments.length?(r=o??null,a):r},a}function Xu(){}function Yu(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function VF(e){this._context=e}VF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xP(e){return new VF(e)}function $F(e){this._context=e}$F.prototype={areaStart:Xu,areaEnd:Xu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bP(e){return new $F(e)}function GF(e){this._context=e}GF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Yu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wP(e){return new GF(e)}function KF(e){this._context=e}KF.prototype={areaStart:Xu,areaEnd:Xu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function SP(e){return new KF(e)}function XF(e){return e<0?-1:1}function YF(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),i=(r-e._y1)/(a||n<0&&-0),s=(o*a+i*n)/(n+a);return(XF(o)+XF(i))*Math.min(Math.abs(o),Math.abs(i),.5*Math.abs(s))||0}function JF(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function CP(e,t,r){var n=e._x0,a=e._y0,o=e._x1,i=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,a+s*t,o-s,i-s*r,o,i)}function fy(e){this._context=e}fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:CP(this,this._t0,JF(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,CP(this,JF(this,r=YF(this,e,t)),r);break;default:CP(this,this._t0,r=YF(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function QF(e){this._context=new ZF(e)}(QF.prototype=Object.create(fy.prototype)).point=function(e,t){fy.prototype.point.call(this,t,e)};function ZF(e){this._context=e}ZF.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function PP(e){return new fy(e)}function IP(e){return new QF(e)}function tB(e){this._context=e}tB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=eB(e),a=eB(t),o=0,i=1;i=0;--t)a[t]=(i[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function AP(e){return new dy(e,.5)}function OP(e){return new dy(e,0)}function kP(e){return new dy(e,1)}function ra(e,t){if((i=e.length)>1)for(var r=1,n,a,o=e[t[0]],i,s=o.length;r=0;)r[t]=t;return r}function bre(e,t){return e[t]}function wre(e){let t=[];return t.key=e,t}function EP(){var e=De([]),t=Ju,r=ra,n=bre;function a(o){var i=Array.from(e.apply(this,arguments),wre),s,l=i.length,u=-1,f;for(let c of o)for(s=0,++u;s0){for(var r,n,a=0,o=e[0].length,i;a0){for(var r=0,n=e[t[0]],a,o=n.length;r0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,i;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ore(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var oB={symbolCircle:Ku,symbolCross:fP,symbolDiamond:dP,symbolSquare:pP,symbolStar:mP,symbolTriangle:vP,symbolWye:yP},kre=Math.PI/180,Ere=function(t){var r="symbol".concat((0,DP.default)(t));return oB[r]||Ku},Tre=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*kre;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Rre=function(t,r){oB["symbol".concat((0,DP.default)(t))]=r},op=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,o=a===void 0?64:a,i=t.sizeType,s=i===void 0?"area":i,l=Are(t,Cre),u=nB(nB({},l),{},{type:n,size:o,sizeType:s}),f=function(){var x=Ere(n),g=cy().type(x).size(Tre(o,s,n));return g()},c=u.className,d=u.cx,p=u.cy,h=te(u,!0);return d===+d&&p===+p&&o===+o?aB.default.createElement("path",MP({},h,{className:ae("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};op.registerSymbol=Rre;function Qu(e){return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function NP(){return NP=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?u:p.color;return Sn.default.createElement("li",NP({className:x,style:c,key:"legend-item-".concat(h)},wn(n.props,p,h)),Sn.default.createElement(tp,{width:i,height:i,viewBox:f,style:d},n.renderIcon(p)),Sn.default.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m?m(g,p,h):g))})}},{key:"render",value:function(){var n=this.props,a=n.payload,o=n.layout,i=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?i:"left"};return Sn.default.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),t}(Sn.PureComponent);ip(my,"displayName","Legend");ip(my,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var lI=R(Gq()),Kq=R(it());function Sy(e,t,r){return t===!0?(0,lI.default)(e,r):(0,Kq.default)(t)?(0,lI.default)(e,t):e}function ac(e){return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}var Lse=["ref"];function Xq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tl(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mse(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function Dse(e){return e.value}function Nse(e,t){if(qi.default.isValidElement(e))return qi.default.cloneElement(e,t);if(typeof e=="function")return qi.default.createElement(e,t);var r=t.ref,n=_se(t,Lse);return qi.default.createElement(my,n)}var Jq=1,ao=function(e){Tse(t,e);function t(){var r;Ase(this,t);for(var n=arguments.length,a=new Array(n),o=0;oJq||Math.abs(a.height-this.lastBoundingBox.height)>Jq)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?tl({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,o=a.layout,i=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,f=a.chartHeight,c,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(i==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();c={left:((u||0)-p.width)/2}}else c=i==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var h=this.getBBoxSnapshot();d={top:((f||0)-h.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return tl(tl({},c),d)}},{key:"render",value:function(){var n=this,a=this.props,o=a.content,i=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,c=tl(tl({position:"absolute",width:i||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return qi.default.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},Nse(o,tl(tl({},this.props),{},{payload:Sy(f,u,Dse)})))}}],[{key:"getWithHeight",value:function(n,a){var o=n.props.layout;return o==="vertical"&&Y(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}]),t}(qi.PureComponent);Py(ao,"displayName","Legend");Py(ao,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ui=R(G());var oo=R(G()),GU=R(Ly()),KU=R(Jn());function dp(e){return dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(e)}function vI(){return vI=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(pp,"-left"),Y(r)&&t&&Y(t.x)&&r=t.y),"".concat(pp,"-top"),Y(n)&&t&&Y(t.y)&&nm?Math.max(f,l[n]):Math.max(c,l[n])}function nue(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function JU(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,o=e.reverseDirection,i=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,c;return i.height>0&&i.width>0&&r?(f=YU({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.width,viewBox:l,viewBoxDimension:l.width}),c=YU({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:o,tooltipDimension:i.height,viewBox:l,viewBoxDimension:l.height}),u=nue({translateX:f,translateY:c,useTranslate3d:s})):u=tue,{cssProperties:u,cssClasses:rue({translateX:f,translateY:c,coordinate:r})}}function oc(e){return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function QU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ZU(e){for(var t=1;ttH||Math.abs(n.height-this.state.lastBoundingBox.height)>tH)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,o=a.active,i=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,f=a.coordinate,c=a.hasPayload,d=a.isAnimationActive,p=a.offset,h=a.position,m=a.reverseDirection,x=a.useTranslate3d,g=a.viewBox,v=a.wrapperStyle,w=JU({allowEscapeViewBox:i,coordinate:f,offsetTopLeft:p,position:h,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:g}),b=w.cssClasses,y=w.cssProperties,S=ZU(ZU({transition:d&&o?"transform ".concat(s,"ms ").concat(l):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&c?"visible":"hidden",position:"absolute",top:0,left:0},v);return ky.default.createElement("div",{tabIndex:-1,className:b,style:S,ref:function(A){n.wrapperNode=A}},u)}}]),t}(ky.PureComponent);var cue=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},nr={isSsr:cue(),get:function(t){return nr[t]},set:function(t,r){if(typeof t=="string")nr[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(a){nr[a]=t[a]})}}};function ic(e){return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function oH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iH(e){for(var t=1;t0;return Ui.default.createElement(aH,{allowEscapeViewBox:i,animationDuration:s,animationEasing:l,isAnimationActive:d,active:o,coordinate:f,hasPayload:S,offset:p,position:x,reverseDirection:g,useTranslate3d:v,viewBox:w,wrapperStyle:b},xue(u,iH(iH({},this.props),{},{payload:y})))}}]),t}(Ui.PureComponent);wI(Cn,"displayName","Tooltip");wI(Cn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Tt=R(G()),IH=R(PI()),II=R(WC());function hp(e){return hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hp(e)}function CH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ty(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(j=(0,IH.default)(j,m,{trailing:!0,leading:!1}));var B=new ResizeObserver(j),H=y.current.getBoundingClientRect(),I=H.width,C=H.height;return D(I,C),B.observe(y.current),function(){B.disconnect()}},[D,m]);var N=(0,Tt.useMemo)(function(){var j=_.containerWidth,B=_.containerHeight;if(j<0||B<0)return null;Gt(qo(i)||qo(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,i,l),Gt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var H=qo(i)?j:i,I=qo(l)?B:l;r&&r>0&&(H?I=H/r:I&&(H=I*r),d&&I>d&&(I=d)),Gt(H>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,H,I,i,l,f,c,r);var C=!Array.isArray(p)&&(0,II.isElement)(p)&&Zn(p.type).endsWith("Chart");return Tt.default.Children.map(p,function(L){return(0,II.isElement)(L)?(0,Tt.cloneElement)(L,Ty({width:H,height:I},C?{style:Ty({height:"100%",width:"100%",maxHeight:I,maxWidth:H},L.props.style)}:{})):L})},[r,p,l,d,c,f,_,i]);return Tt.default.createElement("div",{id:x?"".concat(x):void 0,className:ae("recharts-responsive-container",g),style:Ty(Ty({},b),{},{width:i,height:l,minWidth:f,minHeight:c,maxHeight:d}),ref:y},N)});var vp=function(t){return null};vp.displayName="Cell";var xp=R(G()),kI=R(Jn());function gp(e){return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gp(e)}function LH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AI(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nr.isSsr)return{width:0,height:0};var n=rce(r),a=JSON.stringify({text:t,copyStyle:n});if(sc.widthCache[a])return sc.widthCache[a];try{var o=document.getElementById(AH);o||(o=document.createElement("span"),o.setAttribute("id",AH),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=AI(AI({},tce),n);Object.assign(o.style,i),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return sc.widthCache[a]=l,++sc.cacheCount>ece&&(sc.cacheCount=0,sc.widthCache={}),l}catch{return{width:0,height:0}}},OH=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yp(e){return yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yp(e)}function _y(e,t){return ice(e)||oce(e,t)||ace(e,t)||nce()}function nce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ace(e,t){if(e){if(typeof e=="string")return kH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kH(e,t)}}function kH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bce(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function FH(e,t){return Pce(e)||Cce(e,t)||Sce(e,t)||wce()}function wce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sce(e,t){if(e){if(typeof e=="string")return BH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BH(e,t)}}function BH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(I,C){var L=C.word,O=C.width,E=I[I.length-1];if(E&&(a==null||o||E.width+O+nC.width?I:C})};if(!f)return p;for(var m="\u2026",x=function(H){var I=c.slice(0,H),C=HH({breakAll:u,style:l,children:I+m}).wordsWithComputedWidth,L=d(C),O=L.length>i||h(L).width>Number(a);return[O,L]},g=0,v=c.length-1,w=0,b;g<=v&&w<=c.length-1;){var y=Math.floor((g+v)/2),S=y-1,P=x(S),A=FH(P,2),_=A[0],T=A[1],D=x(y),N=FH(D,1),j=N[0];if(!_&&!j&&(g=y+1),_&&j&&(v=y-1),!_&&j){b=T;break}w++}return b||p},jH=function(t){var r=(0,kI.default)(t)?[]:t.toString().split(UH);return[{words:r}]},Lce=function(t){var r=t.width,n=t.scaleToFit,a=t.children,o=t.style,i=t.breakAll,s=t.maxLines;if((r||n)&&!nr.isSsr){var l,u,f=HH({breakAll:i,children:a,style:o});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;l=c,u=d}else return jH(a);return Ice({breakAll:i,children:a,maxLines:s,style:o},l,u,r,n)}return jH(a)},qH="#808080",Pn=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,o=a===void 0?0:a,i=t.lineHeight,s=i===void 0?"1em":i,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,h=t.verticalAnchor,m=h===void 0?"end":h,x=t.fill,g=x===void 0?qH:x,v=NH(t,yce),w=(0,xp.useMemo)(function(){return Lce({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:c,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,c,v.style,v.width]),b=v.dx,y=v.dy,S=v.angle,P=v.className,A=v.breakAll,_=NH(v,xce);if(!Ye(n)||!Ye(o))return null;var T=n+(Y(b)?b:0),D=o+(Y(y)?y:0),N;switch(m){case"start":N=My("calc(".concat(u,")"));break;case"middle":N=My("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=My("calc(".concat(w.length-1," * -").concat(s,")"));break}var j=[];if(c){var B=w[0].width,H=v.width;j.push("scale(".concat((Y(H)?H/B:1)/B,")"))}return S&&j.push("rotate(".concat(S,", ").concat(T,", ").concat(D,")")),j.length&&(_.transform=j.join(" ")),xp.default.createElement("text",OI({},te(_,!0),{x:T,y:D,className:ae("recharts-text",P),textAnchor:p,fill:g.includes("url")?qH:g}),w.map(function(I,C){var L=I.words.join(A?"":" ");return xp.default.createElement("tspan",{x:T,dy:C===0?N:s,key:L},L)}))};var bt=R(G()),Zp=R(Jn()),em=R(it()),qL=R(Yn());var ez=R(Jn()),tz=R(G()),rz=R(it());var vx={};MG(vx,{scaleBand:()=>Hi,scaleDiverging:()=>mx,scaleDivergingLog:()=>uL,scaleDivergingPow:()=>hx,scaleDivergingSqrt:()=>u3,scaleDivergingSymlog:()=>cL,scaleIdentity:()=>Qy,scaleImplicit:()=>Uy,scaleLinear:()=>fl,scaleLog:()=>Zy,scaleOrdinal:()=>fc,scalePoint:()=>Wi,scalePow:()=>Rp,scaleQuantile:()=>rx,scaleQuantize:()=>nx,scaleRadial:()=>tx,scaleSequential:()=>cx,scaleSequentialLog:()=>sL,scaleSequentialPow:()=>fx,scaleSequentialQuantile:()=>dx,scaleSequentialSqrt:()=>l3,scaleSequentialSymlog:()=>lL,scaleSqrt:()=>EW,scaleSymlog:()=>ex,scaleThreshold:()=>ax,scaleTime:()=>oL,scaleUtc:()=>iL,tickFormat:()=>Ap});function Nr(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function EI(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function nl(e){let t,r,n;e.length!==2?(t=Nr,r=(s,l)=>Nr(e(s),l),n=(s,l)=>e(s)-l):(t=e===Nr||e===EI?e:Ace,r=e,n=e);function a(s,l,u=0,f=s.length){if(u>>1;r(s[c],l)<0?u=c+1:f=c}while(u>>1;r(s[c],l)<=0?u=c+1:f=c}while(uu&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:a,center:i,right:o}}function Ace(){return 0}function bp(e){return e===null?NaN:+e}function*WH(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of e)(n=t(n,++r,e))!=null&&(n=+n)>=n&&(yield n)}}var zH=nl(Nr),VH=zH.right,Oce=zH.left,kce=nl(bp).center,Ta=VH;var uc=class extends Map{constructor(t,r=Rce){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,a]of t)this.set(n,a)}get(t){return super.get($H(this,t))}has(t){return super.has($H(this,t))}set(t,r){return super.set(Ece(this,t),r)}delete(t){return super.delete(Tce(this,t))}};function $H({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function Ece({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Tce({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Rce(e){return e!==null&&typeof e=="object"?e.valueOf():e}function GH(e=Nr){if(e===Nr)return TI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function TI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}var _ce=Math.sqrt(50),Mce=Math.sqrt(10),Dce=Math.sqrt(2);function Dy(e,t,r){let n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),i=o>=_ce?10:o>=Mce?5:o>=Dce?2:1,s,l,u;return a<0?(u=Math.pow(10,-a)/i,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,a)*i,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];let n=t=a))return[];let s=o-a+1,l=new Array(s);if(n)if(i<0)for(let u=0;u=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r=a)&&(r=a)}return r}function Fy(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function By(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?TI:GH(a);n>r;){if(n-r>600){let l=n-r+1,u=t-r+1,f=Math.log(l),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(l-c)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*c/l+d)),h=Math.min(n,Math.floor(t+(l-u)*c/l+d));By(e,t,p,h,a)}let o=e[t],i=r,s=n;for(Sp(e,r,t),a(e[n],o)>0&&Sp(e,r,n);i0;)--s}a(e[r],o)===0?Sp(e,r,s):(++s,Sp(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Sp(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function jy(e,t,r){if(e=Float64Array.from(WH(e,r)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Fy(e);if(t>=1)return Ny(e);var n,a=(n-1)*t,o=Math.floor(a),i=Ny(By(e,o).subarray(0,o+1)),s=Fy(e.subarray(o+1));return i+(s-i)*(a-o)}}function RI(e,t,r=bp){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),i=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return i+(s-i)*(a-o)}}function qy(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Wy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Wy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Fce.exec(e))?new on(t[1],t[2],t[3],1):(t=Bce.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jce.exec(e))?Wy(t[1],t[2],t[3],t[4]):(t=qce.exec(e))?Wy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Uce.exec(e))?tW(t[1],t[2]/100,t[3]/100,1):(t=Hce.exec(e))?tW(t[1],t[2]/100,t[3]/100,t[4]):XH.hasOwnProperty(e)?QH(XH[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function QH(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Wy(e,t,r,n){return n<=0&&(e=t=r=NaN),new on(e,t,r,n)}function Vce(e){return e instanceof Ip||(e=zi(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function pc(e,t,r,n){return arguments.length===1?Vce(e):new on(e,t,r,n??1)}function on(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Hy(on,pc,_I(Ip,{brighter(e){return e=e==null?Vy:Math.pow(Vy,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cp:Math.pow(Cp,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(il(this.r),il(this.g),il(this.b),$y(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ZH,formatHex:ZH,formatHex8:$ce,formatRgb:eW,toString:eW}));function ZH(){return`#${ol(this.r)}${ol(this.g)}${ol(this.b)}`}function $ce(){return`#${ol(this.r)}${ol(this.g)}${ol(this.b)}${ol((isNaN(this.opacity)?1:this.opacity)*255)}`}function eW(){let e=$y(this.opacity);return`${e===1?"rgb(":"rgba("}${il(this.r)}, ${il(this.g)}, ${il(this.b)}${e===1?")":`, ${e})`}`}function $y(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function il(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ol(e){return e=il(e),(e<16?"0":"")+e.toString(16)}function tW(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ra(e,t,r,n)}function nW(e){if(e instanceof Ra)return new Ra(e.h,e.s,e.l,e.opacity);if(e instanceof Ip||(e=zi(e)),!e)return new Ra;if(e instanceof Ra)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),i=NaN,s=o-a,l=(o+a)/2;return s?(t===o?i=(r-n)/s+(r0&&l<1?0:i,new Ra(i,s,l,e.opacity)}function aW(e,t,r,n){return arguments.length===1?nW(e):new Ra(e,t,r,n??1)}function Ra(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Hy(Ra,aW,_I(Ip,{brighter(e){return e=e==null?Vy:Math.pow(Vy,e),new Ra(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cp:Math.pow(Cp,e),new Ra(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new on(MI(e>=240?e-240:e+120,a,n),MI(e,a,n),MI(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ra(rW(this.h),zy(this.s),zy(this.l),$y(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=$y(this.opacity);return`${e===1?"hsl(":"hsla("}${rW(this.h)}, ${zy(this.s)*100}%, ${zy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function rW(e){return e=(e||0)%360,e<0?e+360:e}function zy(e){return Math.max(0,Math.min(1,e||0))}function MI(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function DI(e,t,r,n,a){var o=e*e,i=o*e;return((1-3*e+3*o-i)*t+(4-6*o+3*i)*r+(1+3*e+3*o-3*i)*n+i*a)/6}function oW(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],o=e[n+1],i=n>0?e[n-1]:2*a-o,s=n()=>e;function Gce(e,t){return function(r){return e+r*t}}function Kce(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function sW(e){return(e=+e)==1?Gy:function(t,r){return r-t?Kce(t,r,e):Lp(isNaN(t)?r:t)}}function Gy(e,t){var r=t-e;return r?Gce(e,r):Lp(isNaN(e)?t:e)}var NI=function e(t){var r=sW(t);function n(a,o){var i=r((a=pc(a)).r,(o=pc(o)).r),s=r(a.g,o.g),l=r(a.b,o.b),u=Gy(a.opacity,o.opacity);return function(f){return a.r=i(f),a.g=s(f),a.b=l(f),a.opacity=u(f),a+""}}return n.gamma=e,n}(1);function lW(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),o=new Array(r),i,s;for(i=0;ir&&(o=t.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,l.push({i,x:Vi(n,a)})),r=FI.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Qce(e,t,r){var n=e[0],a=e[1],o=t[0],i=t[1];return a2?Zce:Qce,l=u=null,c}function c(d){return d==null||isNaN(d=+d)?o:(l||(l=s(e.map(n),t,r)))(n(i(d)))}return c.invert=function(d){return i(a((u||(u=s(t,e.map(n),Vi)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,$i),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=sl,f()},c.clamp=function(d){return arguments.length?(i=d?!0:Bt,f()):i!==Bt},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(o=d,c):o},function(d,p){return n=d,a=p,f()}}function ul(){return ll()(Bt,Bt)}function vW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function cl(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function lo(e){return e=cl(Math.abs(e)),e?e[1]:NaN}function gW(e,t){return function(r,n){for(var a=r.length,o=[],i=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[i=(i+1)%e.length];return o.reverse().join(t)}}function yW(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var efe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uo(e){if(!(t=efe.exec(e)))throw new Error("invalid format: "+e);var t;return new Xy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}uo.prototype=Xy.prototype;function Xy(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Xy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function xW(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var UI;function bW(e,t){var r=cl(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(UI=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,i=n.length;return o===i?n:o>i?n+new Array(o-i+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+cl(e,Math.max(0,t+o-1))[0]}function HI(e,t){var r=cl(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}var WI={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vW,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>HI(e*100,t),r:HI,s:bW,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zI(e){return e}var wW=Array.prototype.map,SW=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function CW(e){var t=e.grouping===void 0||e.thousands===void 0?zI:gW(wW.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?zI:yW(wW.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c){c=uo(c);var d=c.fill,p=c.align,h=c.sign,m=c.symbol,x=c.zero,g=c.width,v=c.comma,w=c.precision,b=c.trim,y=c.type;y==="n"?(v=!0,y="g"):WI[y]||(w===void 0&&(w=12),b=!0,y="g"),(x||d==="0"&&p==="=")&&(x=!0,d="0",p="=");var S=m==="$"?r:m==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",P=m==="$"?n:/[%p]/.test(y)?i:"",A=WI[y],_=/[defgprs%]/.test(y);w=w===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function T(D){var N=S,j=P,B,H,I;if(y==="c")j=A(D)+j,D="";else{D=+D;var C=D<0||1/D<0;if(D=isNaN(D)?l:A(Math.abs(D),w),b&&(D=xW(D)),C&&+D==0&&h!=="+"&&(C=!1),N=(C?h==="("?h:s:h==="-"||h==="("?"":h)+N,j=(y==="s"?SW[8+UI/3]:"")+j+(C&&h==="("?")":""),_){for(B=-1,H=D.length;++BI||I>57){j=(I===46?a+D.slice(B+1):D.slice(B))+j,D=D.slice(0,B);break}}}v&&!x&&(D=t(D,1/0));var L=N.length+D.length+j.length,O=L>1)+N+D+j+O.slice(L);break;default:D=O+N+D+j;break}return o(D)}return T.toString=function(){return c+""},T}function f(c,d){var p=u((c=uo(c),c.type="f",c)),h=Math.max(-8,Math.min(8,Math.floor(lo(d)/3)))*3,m=Math.pow(10,-h),x=SW[8+h/3];return function(g){return p(m*g)+x}}return{format:u,formatPrefix:f}}var Yy,mc,Jy;VI({thousands:",",grouping:[3],currency:["$",""]});function VI(e){return Yy=CW(e),mc=Yy.format,Jy=Yy.formatPrefix,Yy}function $I(e){return Math.max(0,-lo(Math.abs(e)))}function GI(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lo(t)/3)))*3-lo(Math.abs(e)))}function KI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lo(t)-lo(e))+1}function Ap(e,t,r,n){var a=cc(e,t,r),o;switch(n=uo(n??",f"),n.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=GI(a,i))&&(n.precision=o),Jy(n,i)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=KI(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=$I(a))&&(n.precision=o-(n.type==="%")*2);break}}return mc(n)}function Fr(e){var t=e.domain;return e.ticks=function(r){var n=t();return al(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Ap(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,i=n[a],s=n[o],l,u,f=10;for(s0;){if(u=wp(i,s,r),u===l)return n[a]=i,n[o]=s,t(n);if(u>0)i=Math.floor(i/u)*u,s=Math.ceil(s/u)*u;else if(u<0)i=Math.ceil(i*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function fl(){var e=ul();return e.copy=function(){return so(e,fl())},st.apply(e,arguments),Fr(e)}function Qy(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,$i),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return Qy(e).unknown(t)},e=arguments.length?Array.from(e,$i):[0,1],Fr(r)}function Op(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],i;return oMath.pow(e,t)}function ofe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function LW(e){return(t,r)=>-e(-t,r)}function kp(e){let t=e(PW,IW),r=t.domain,n=10,a,o;function i(){return a=ofe(n),o=afe(n),r()[0]<0?(a=LW(a),o=LW(o),e(tfe,rfe)):e(PW,IW),t}return t.base=function(s){return arguments.length?(n=+s,i()):n},t.domain=function(s){return arguments.length?(r(s),i()):r()},t.ticks=s=>{let l=r(),u=l[0],f=l[l.length-1],c=f0){for(;d<=p;++d)for(h=1;hf)break;g.push(m)}}else for(;d<=p;++d)for(h=n-1;h>=1;--h)if(m=d>0?h/o(-d):h*o(d),!(mf)break;g.push(m)}g.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=uo(l)).precision==null&&(l.trim=!0),l=mc(l)),s===1/0)return l;let u=Math.max(1,n*s/t.ticks().length);return f=>{let c=f/o(Math.round(a(f)));return c*nr(Op(r(),{floor:s=>o(Math.floor(a(s))),ceil:s=>o(Math.ceil(a(s)))})),t}function Zy(){let e=kp(ll()).domain([1,10]);return e.copy=()=>so(e,Zy()).base(e.base()),st.apply(e,arguments),e}function AW(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function OW(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ep(e){var t=1,r=e(AW(t),OW(t));return r.constant=function(n){return arguments.length?e(AW(t=+n),OW(t)):t},Fr(r)}function ex(){var e=Ep(ll());return e.copy=function(){return so(e,ex()).constant(e.constant())},st.apply(e,arguments)}function kW(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ife(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sfe(e){return e<0?-e*e:e*e}function Tp(e){var t=e(Bt,Bt),r=1;function n(){return r===1?e(Bt,Bt):r===.5?e(ife,sfe):e(kW(r),kW(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Fr(t)}function Rp(){var e=Tp(ll());return e.copy=function(){return so(e,Rp()).exponent(e.exponent())},st.apply(e,arguments),e}function EW(){return Rp.apply(null,arguments).exponent(.5)}function TW(e){return Math.sign(e)*e*e}function lfe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function tx(){var e=ul(),t=[0,1],r=!1,n;function a(o){var i=lfe(e(o));return isNaN(i)?n:r?Math.round(i):i}return a.invert=function(o){return e.invert(TW(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,$i)).map(TW)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return tx(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},st.apply(a,arguments),Fr(a)}function rx(){var e=[],t=[],r=[],n;function a(){var i=0,s=Math.max(1,t.length);for(r=new Array(s-1);++i0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},i.unknown=function(l){return arguments.length&&(o=l),i},i.thresholds=function(){return n.slice()},i.copy=function(){return nx().domain([e,t]).range(a).unknown(o)},st.apply(Fr(i),arguments)}function ax(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Ta(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var i=t.indexOf(o);return[e[i-1],e[i]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return ax().domain(e).range(t).unknown(r)},st.apply(a,arguments)}var XI=new Date,YI=new Date;function $e(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{let i=a(o),s=a.ceil(o);return o-i(t(o=new Date(+o),i==null?1:Math.floor(i)),o),a.range=(o,i,s)=>{let l=[];if(o=a.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(u$e(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!o(i););else for(;--s>=0;)for(;t(i,1),!o(i););}),r&&(a.count=(o,i)=>(XI.setTime(+o),YI.setTime(+i),e(XI),e(YI),Math.floor(r(XI,YI))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?i=>n(i)%o===0:i=>a.count(0,i)%o===0):a)),a}var _p=$e(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);_p.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$e(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):_p);var uBe=_p.range;var oa=$e(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),RW=oa.range;var hc=$e(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),ufe=hc.range,vc=$e(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),cfe=vc.range;var gc=$e(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),ffe=gc.range,yc=$e(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),dfe=yc.range;var Ho=$e(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),pfe=Ho.range,ml=$e(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),mfe=ml.range,ox=$e(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),hfe=ox.range;function hl(e){return $e(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}var Wo=hl(0),xc=hl(1),MW=hl(2),DW=hl(3),Gi=hl(4),NW=hl(5),FW=hl(6),BW=Wo.range,vfe=xc.range,gfe=MW.range,yfe=DW.range,xfe=Gi.range,bfe=NW.range,wfe=FW.range;function vl(e){return $e(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var zo=vl(0),bc=vl(1),jW=vl(2),qW=vl(3),Ki=vl(4),UW=vl(5),HW=vl(6),WW=zo.range,Sfe=bc.range,Cfe=jW.range,Pfe=qW.range,Ife=Ki.range,Lfe=UW.range,Afe=HW.range;var wc=$e(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Ofe=wc.range,Sc=$e(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),kfe=Sc.range;var Ln=$e(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$e(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});var Efe=Ln.range,An=$e(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());An.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$e(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});var Tfe=An.range;function VW(e,t,r,n,a,o){let i=[[oa,1,1e3],[oa,5,5*1e3],[oa,15,15*1e3],[oa,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[a,1,36e5],[a,3,3*36e5],[a,6,6*36e5],[a,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function s(u,f,c){let d=fx).right(i,d);if(p===i.length)return e.every(cc(u/31536e6,f/31536e6,c));if(p===0)return _p.every(Math.max(cc(u,f,c),1));let[h,m]=i[d/i[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(de=rL(Dp(U.y,0,1)),ze=de.getUTCDay(),de=ze>4||ze===0?bc.ceil(de):bc(de),de=ml.offset(de,(U.V-1)*7),U.y=de.getUTCFullYear(),U.m=de.getUTCMonth(),U.d=de.getUTCDate()+(U.w+6)%7):(de=tL(Dp(U.y,0,1)),ze=de.getDay(),de=ze>4||ze===0?xc.ceil(de):xc(de),de=Ho.offset(de,(U.V-1)*7),U.y=de.getFullYear(),U.m=de.getMonth(),U.d=de.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),ze="Z"in U?rL(Dp(U.y,0,1)).getUTCDay():tL(Dp(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(ze+5)%7:U.w+U.U*7-(ze+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,rL(U)):tL(U)}}function A(V,re,Q,U){for(var be=0,de=re.length,ze=Q.length,Be,yt;be=ze)return-1;if(Be=re.charCodeAt(be++),Be===37){if(Be=re.charAt(be++),yt=y[Be in $W?re.charAt(be++):Be],!yt||(U=yt(V,Q,U))<0)return-1}else if(Be!=Q.charCodeAt(U++))return-1}return U}function _(V,re,Q){var U=u.exec(re.slice(Q));return U?(V.p=f.get(U[0].toLowerCase()),Q+U[0].length):-1}function T(V,re,Q){var U=p.exec(re.slice(Q));return U?(V.w=h.get(U[0].toLowerCase()),Q+U[0].length):-1}function D(V,re,Q){var U=c.exec(re.slice(Q));return U?(V.w=d.get(U[0].toLowerCase()),Q+U[0].length):-1}function N(V,re,Q){var U=g.exec(re.slice(Q));return U?(V.m=v.get(U[0].toLowerCase()),Q+U[0].length):-1}function j(V,re,Q){var U=m.exec(re.slice(Q));return U?(V.m=x.get(U[0].toLowerCase()),Q+U[0].length):-1}function B(V,re,Q){return A(V,t,re,Q)}function H(V,re,Q){return A(V,r,re,Q)}function I(V,re,Q){return A(V,n,re,Q)}function C(V){return i[V.getDay()]}function L(V){return o[V.getDay()]}function O(V){return l[V.getMonth()]}function E(V){return s[V.getMonth()]}function k(V){return a[+(V.getHours()>=12)]}function F(V){return 1+~~(V.getMonth()/3)}function q(V){return i[V.getUTCDay()]}function $(V){return o[V.getUTCDay()]}function ee(V){return l[V.getUTCMonth()]}function J(V){return s[V.getUTCMonth()]}function W(V){return a[+(V.getUTCHours()>=12)]}function ie(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var re=S(V+="",w);return re.toString=function(){return V},re},parse:function(V){var re=P(V+="",!1);return re.toString=function(){return V},re},utcFormat:function(V){var re=S(V+="",b);return re.toString=function(){return V},re},utcParse:function(V){var re=P(V+="",!0);return re.toString=function(){return V},re}}}var $W={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,_fe=/^%/,Mfe=/[\\^$*+?|[\]().{}]/g;function Te(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o[t.toLowerCase(),r]))}function Nfe(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ffe(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Bfe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function jfe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function qfe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function GW(e,t,r){var n=Xt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function KW(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Ufe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Hfe(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Wfe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function XW(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zfe(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function YW(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Vfe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $fe(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Gfe(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Kfe(e,t,r){var n=Xt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Xfe(e,t,r){var n=_fe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Yfe(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Jfe(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function JW(e,t){return Te(e.getDate(),t,2)}function Qfe(e,t){return Te(e.getHours(),t,2)}function Zfe(e,t){return Te(e.getHours()%12||12,t,2)}function ede(e,t){return Te(1+Ho.count(Ln(e),e),t,3)}function r3(e,t){return Te(e.getMilliseconds(),t,3)}function tde(e,t){return r3(e,t)+"000"}function rde(e,t){return Te(e.getMonth()+1,t,2)}function nde(e,t){return Te(e.getMinutes(),t,2)}function ade(e,t){return Te(e.getSeconds(),t,2)}function ode(e){var t=e.getDay();return t===0?7:t}function ide(e,t){return Te(Wo.count(Ln(e)-1,e),t,2)}function n3(e){var t=e.getDay();return t>=4||t===0?Gi(e):Gi.ceil(e)}function sde(e,t){return e=n3(e),Te(Gi.count(Ln(e),e)+(Ln(e).getDay()===4),t,2)}function lde(e){return e.getDay()}function ude(e,t){return Te(xc.count(Ln(e)-1,e),t,2)}function cde(e,t){return Te(e.getFullYear()%100,t,2)}function fde(e,t){return e=n3(e),Te(e.getFullYear()%100,t,2)}function dde(e,t){return Te(e.getFullYear()%1e4,t,4)}function pde(e,t){var r=e.getDay();return e=r>=4||r===0?Gi(e):Gi.ceil(e),Te(e.getFullYear()%1e4,t,4)}function mde(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Te(t/60|0,"0",2)+Te(t%60,"0",2)}function QW(e,t){return Te(e.getUTCDate(),t,2)}function hde(e,t){return Te(e.getUTCHours(),t,2)}function vde(e,t){return Te(e.getUTCHours()%12||12,t,2)}function gde(e,t){return Te(1+ml.count(An(e),e),t,3)}function a3(e,t){return Te(e.getUTCMilliseconds(),t,3)}function yde(e,t){return a3(e,t)+"000"}function xde(e,t){return Te(e.getUTCMonth()+1,t,2)}function bde(e,t){return Te(e.getUTCMinutes(),t,2)}function wde(e,t){return Te(e.getUTCSeconds(),t,2)}function Sde(e){var t=e.getUTCDay();return t===0?7:t}function Cde(e,t){return Te(zo.count(An(e)-1,e),t,2)}function o3(e){var t=e.getUTCDay();return t>=4||t===0?Ki(e):Ki.ceil(e)}function Pde(e,t){return e=o3(e),Te(Ki.count(An(e),e)+(An(e).getUTCDay()===4),t,2)}function Ide(e){return e.getUTCDay()}function Lde(e,t){return Te(bc.count(An(e)-1,e),t,2)}function Ade(e,t){return Te(e.getUTCFullYear()%100,t,2)}function Ode(e,t){return e=o3(e),Te(e.getUTCFullYear()%100,t,2)}function kde(e,t){return Te(e.getUTCFullYear()%1e4,t,4)}function Ede(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ki(e):Ki.ceil(e),Te(e.getUTCFullYear()%1e4,t,4)}function Tde(){return"+0000"}function ZW(){return"%"}function e3(e){return+e}function t3(e){return Math.floor(+e/1e3)}var Cc,ix,i3,sx,s3;aL({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function aL(e){return Cc=nL(e),ix=Cc.format,i3=Cc.parse,sx=Cc.utcFormat,s3=Cc.utcParse,Cc}function Rde(e){return new Date(e)}function _de(e){return e instanceof Date?+e:+new Date(+e)}function lx(e,t,r,n,a,o,i,s,l,u){var f=ul(),c=f.invert,d=f.domain,p=u(".%L"),h=u(":%S"),m=u("%I:%M"),x=u("%I %p"),g=u("%a %d"),v=u("%b %d"),w=u("%B"),b=u("%Y");function y(S){return(l(S)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>jy(e,o/n))},r.copy=function(){return dx(t).domain(e)},aa.apply(r,arguments)}function px(){var e=0,t=.5,r=1,n=1,a,o,i,s,l,u=Bt,f,c=!1,d;function p(m){return isNaN(m=+m)?d:(m=.5+((m=+f(m))-o)*(n*me.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,a):e(t-i,S3(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=e[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,o=l}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function xpe(e){if(Array.isArray(e))return e}function wL(e){var t=gl(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]}function SL(e,t,r){if(e.lte(0))return new Ne.default(0);var n=Hp.getDigitCount(e.toNumber()),a=new Ne.default(10).pow(n),o=e.div(a),i=n!==1?.05:.1,s=new Ne.default(Math.ceil(o.div(i).toNumber())).add(r).mul(i),l=s.mul(a);return t?l:new Ne.default(Math.ceil(l))}function L3(e,t,r){var n=1,a=new Ne.default(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ne.default(10).pow(Hp.getDigitCount(e)-1),a=new Ne.default(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ne.default(Math.floor(e)))}else e===0?a=new Ne.default(Math.floor((t-1)/2)):r||(a=new Ne.default(Math.floor(e)));var i=Math.floor((t-1)/2),s=gL(vL(function(l){return a.add(new Ne.default(l-i).mul(n)).toNumber()}),qp);return s(0,t)}function A3(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ne.default(0),tickMin:new Ne.default(0),tickMax:new Ne.default(0)};var o=SL(new Ne.default(t).sub(e).div(r-1),n,a),i;e<=0&&t>=0?i=new Ne.default(0):(i=new Ne.default(e).add(t).div(2),i=i.sub(new Ne.default(i).mod(o)));var s=Math.ceil(i.sub(e).div(o).toNumber()),l=Math.ceil(new Ne.default(t).sub(i).div(o).toNumber()),u=s+l+1;return u>r?A3(e,t,r,n,a+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:o,tickMin:i.sub(new Ne.default(s).mul(o)),tickMax:i.add(new Ne.default(l).mul(o))})}function bpe(e){var t=gl(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),s=wL([r,n]),l=gl(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(xL(qp(0,a-1).map(function(){return 1/0}))):[].concat(xL(qp(0,a-1).map(function(){return-1/0})),[f]);return r>n?Up(c):c}if(u===f)return L3(u,a,o);var d=A3(u,f,i,o),p=d.step,h=d.tickMin,m=d.tickMax,x=Hp.rangeStep(h,m.add(new Ne.default(.1).mul(p)),p);return r>n?Up(x):x}function wpe(e){var t=gl(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),s=wL([r,n]),l=gl(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[r,n];if(u===f)return L3(u,a,o);var c=SL(new Ne.default(f).sub(u).div(i-1),o,0),d=gL(vL(function(h){return new Ne.default(u).add(new Ne.default(h).mul(c)).toNumber()}),qp),p=d(0,i).filter(function(h){return h>=u&&h<=f});return r>n?Up(p):p}function Spe(e,t){var r=gl(e,2),n=r[0],a=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=wL([n,a]),s=gl(i,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var f=Math.max(t,2),c=SL(new Ne.default(u).sub(l).div(f-1),o,0),d=[].concat(xL(Hp.rangeStep(new Ne.default(l),new Ne.default(u).sub(new Ne.default(.99).mul(c)),c)),[u]);return n>a?Up(d):d}var CL=yx(bpe),Cpe=yx(wpe),PL=yx(Spe);var xx=R(G());var Ppe=!0,IL="Invariant failed";function _a(e,t){if(!e){if(Ppe)throw new Error(IL);var r=typeof t=="function"?t():t,n=r?"".concat(IL,": ").concat(r):IL;throw new Error(n)}}var Ipe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function bx(){return bx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Rpe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function Ic(e){var t=e.offset,r=e.layout,n=e.width,a=e.dataKey,o=e.data,i=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,u=Tpe(e,Ipe),f=te(u,!1);e.direction==="x"&&s.type!=="number"&&_a(!1);var c=o.map(function(d){var p=i(d,a),h=p.x,m=p.y,x=p.value,g=p.errorVal;if(!g)return null;var v=[],w,b;if(Array.isArray(g)){var y=Lpe(g,2);w=y[0],b=y[1]}else w=b=g;if(r==="vertical"){var S=s.scale,P=m+t,A=P+n,_=P-n,T=S(x-w),D=S(x+b);v.push({x1:D,y1:A,x2:D,y2:_}),v.push({x1:T,y1:P,x2:D,y2:P}),v.push({x1:T,y1:A,x2:T,y2:_})}else if(r==="horizontal"){var N=l.scale,j=h+t,B=j-n,H=j+n,I=N(x-w),C=N(x+b);v.push({x1:B,y1:C,x2:H,y2:C}),v.push({x1:j,y1:I,x2:j,y2:C}),v.push({x1:B,y1:I,x2:H,y2:I})}return xx.default.createElement(pe,bx({className:"recharts-errorBar",key:"bar-".concat(v.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},f),v.map(function(L){return xx.default.createElement("line",bx({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return xx.default.createElement(pe,{className:"recharts-errorBars"},c)}Ic.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};Ic.displayName="ErrorBar";function Wp(e){return Wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(e)}function k3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LL(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,s=(r=n?.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,u=0;u0?a[u-1].coordinate:a[s-1].coordinate,c=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Pt(c-f)!==Pt(d-c)){var h=[];if(Pt(d-c)===Pt(l[1]-l[0])){p=d;var m=c+l[1]-l[0];h[0]=Math.min(m,(m+f)/2),h[1]=Math.max(m,(m+f)/2)}else{p=f;var x=d+l[1]-l[0];h[0]=Math.min(c,(x+c)/2),h[1]=Math.max(c,(x+c)/2)}var g=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>g[0]&&t<=g[1]||t>=h[0]&&t<=h[1]){i=a[u].index;break}}else{var v=Math.min(f,d),w=Math.max(f,d);if(t>(v+c)/2&&t<=(w+c)/2){i=a[u].index;break}}}else for(var b=0;b0&&b(n[b].coordinate+n[b-1].coordinate)/2&&t<=(n[b].coordinate+n[b+1].coordinate)/2||b===s-1&&t>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}return i},zp=function(t){var r=t,n=r.type.displayName,a=t.props,o=a.stroke,i=a.fill,s;switch(n){case"Line":s=o;break;case"Area":case"Radar":s=o&&o!=="none"?o:i;break;default:s=i;break}return s},U3=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var i={},s=Object.keys(o),l=0,u=s.length;l=0});if(g&&g.length){var v=g[0].props.barSize,w=g[0].props[x];i[w]||(i[w]=[]);var b=(0,On.default)(v)?r:v;i[w].push({item:g[0],stackList:g.slice(1),barSize:(0,On.default)(b)?void 0:It(b,n,0)})}}return i},H3=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,o=t.sizeList,i=o===void 0?[]:o,s=t.maxBarSize,l=i.length;if(l<1)return null;var u=It(r,a,0,!0),f,c=[];if(i[0].barSize===+i[0].barSize){var d=!1,p=a/l,h=i.reduce(function(b,y){return b+y.barSize||0},0);h+=(l-1)*u,h>=a&&(h-=(l-1)*u,u=0),h>=a&&p>0&&(d=!0,p*=.9,h=l*p);var m=(a-h)/2>>0,x={offset:m-u,size:0};f=i.reduce(function(b,y){var S={item:y.item,position:{offset:x.offset+x.size+u,size:d?p:y.barSize}},P=[].concat(T3(b),[S]);return x=P[P.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){P.push({item:A,position:x})}),P},c)}else{var g=It(n,a,0,!0);a-2*g-(l-1)*u<=0&&(u=0);var v=(a-2*g-(l-1)*u)/l;v>1&&(v>>=0);var w=s===+s?Math.min(v,s):v;f=i.reduce(function(b,y,S){var P=[].concat(T3(b),[{item:y.item,position:{offset:g+(v+u)*S+(v-w)/2,size:w}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){P.push({item:A,position:P[P.length-1].position})}),P},c)}return f},W3=function(t,r,n,a){var o=n.children,i=n.width,s=n.margin,l=i-(s.left||0)-(s.right||0),u=wx({children:o,legendWidth:l});if(u){var f=a||{},c=f.width,d=f.height,p=u.align,h=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&h==="middle")&&p!=="center"&&Y(t[p]))return ia(ia({},t),{},Lc({},p,t[p]+(c||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&h!=="middle"&&Y(t[h]))return ia(ia({},t),{},Lc({},h,t[h]+(d||0)))}return t},Hpe=function(t,r,n){return(0,On.default)(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},z3=function(t,r,n,a,o){var i=r.props.children,s=Ft(i,Ic).filter(function(u){return Hpe(a,o,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var c=lt(f,n);if((0,On.default)(c))return u;var d=Array.isArray(c)?[(0,Gp.default)(c),(0,$p.default)(c)]:[c,c],p=l.reduce(function(h,m){var x=lt(f,m,0),g=d[0]-Math.abs(Array.isArray(x)?x[0]:x),v=d[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(g,h[0]),Math.max(v,h[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},V3=function(t,r,n,a,o){var i=r.map(function(s){return z3(t,s,n,o,a)}).filter(function(s){return!(0,On.default)(s)});return i&&i.length?i.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},EL=function(t,r,n,a,o){var i=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&z3(t,l,u,a)||Oc(t,u,n,o)});if(n==="number")return i.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return i.reduce(function(l,u){for(var f=0,c=u.length;f=2?Pt(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=o?o.indexOf(c):c;return{coordinate:a(d)+u,value:c,offset:u}});return f.filter(function(c){return!(0,Sx.default)(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:a(c)+u,value:c,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(c){return{coordinate:a(c)+u,value:c,offset:u}}):a.domain().map(function(c,d){return{coordinate:a(c)+u,value:o?o[c]:c,index:d,offset:u}})},AL=new WeakMap,Kp=function(t,r){if(typeof r!="function")return t;AL.has(t)||AL.set(t,new WeakMap);var n=AL.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},Cx=function(t,r,n){var a=t.scale,o=t.type,i=t.layout,s=t.axisType;if(a==="auto")return i==="radial"&&s==="radiusAxis"?{scale:Hi(),realScaleType:"band"}:i==="radial"&&s==="angleAxis"?{scale:fl(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Wi(),realScaleType:"point"}:o==="category"?{scale:Hi(),realScaleType:"band"}:{scale:fl(),realScaleType:"linear"};if((0,D3.default)(a)){var l="scale".concat((0,F3.default)(a));return{scale:(vx[l]||Wi)(),realScaleType:vx[l]?l:"point"}}return(0,Ac.default)(a)?{scale:a}:{scale:Wi(),realScaleType:"point"}},R3=1e-4,Px=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),o=Math.min(a[0],a[1])-R3,i=Math.max(a[0],a[1])+R3,s=t(r[0]),l=t(r[n-1]);(si||li)&&t.domain([r[0],r[n-1]])}},$3=function(t,r){if(!t)return null;for(var n=0,a=t.length;na)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]=0?(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1]):(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1])}},zpe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n=0?(t[i][n][0]=o,t[i][n][1]=o+s,o=t[i][n][1]):(t[i][n][0]=0,t[i][n][1]=0)}},Vpe={sign:Wpe,expand:TP,none:ra,silhouette:RP,wiggle:_P,positive:zpe},$pe=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),o=Vpe[n],i=EP().keys(a).value(function(s,l){return+lt(s,l,0)}).order(Ju).offset(o);return i(t)},K3=function(t,r,n,a,o,i){if(!t)return null;var s=i?r.reverse():r,l={},u=s.reduce(function(c,d){var p=d.props,h=p.stackId,m=p.hide;if(m)return c;var x=d.props[n],g=c[x]||{hasStack:!1,stackGroups:{}};if(Ye(h)){var v=g.stackGroups[h]||{numericAxisId:n,cateAxisId:a,items:[]};v.items.push(d),g.hasStack=!0,g.stackGroups[h]=v}else g.stackGroups[Qn("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return ia(ia({},c),{},Lc({},x,g))},l),f={};return Object.keys(u).reduce(function(c,d){var p=u[d];if(p.hasStack){var h={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,x){var g=p.stackGroups[x];return ia(ia({},m),{},Lc({},x,{numericAxisId:n,cateAxisId:a,items:g.items,stackedData:$pe(t,g.items,o)}))},h)}return ia(ia({},c),{},Lc({},d,p))},f)},Ix=function(t,r){var n=r.realScaleType,a=r.type,o=r.tickCount,i=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&a==="number"&&i&&(i[0]==="auto"||i[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=CL(u,o,s);return t.domain([(0,Gp.default)(f),(0,$p.default)(f)]),{niceTicks:f}}if(o&&a==="number"){var c=t.domain(),d=PL(c,o,s);return{niceTicks:d}}return null};function _L(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,i=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!(0,On.default)(a[t.dataKey])){var s=Uu(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=lt(a,(0,On.default)(i)?t.dataKey:i);return(0,On.default)(l)?null:t.scale(l)}var ML=function(t){var r=t.axis,n=t.ticks,a=t.offset,o=t.bandSize,i=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=lt(i,r.dataKey,r.domain[s]);return(0,On.default)(l)?null:r.scale(l)-o/2+a},X3=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return a<=0&&o>=0?0:o<0?o:a}return n[0]},Y3=function(t,r){var n=t.props.stackId;if(Ye(n)){var a=r[n];if(a){var o=a.items.indexOf(t);return o>=0?a.stackedData[o]:null}}return null},Gpe=function(t){return t.reduce(function(r,n){return[(0,Gp.default)(n.concat([r[0]]).filter(Y)),(0,$p.default)(n.concat([r[1]]).filter(Y))]},[1/0,-1/0])},DL=function(t,r,n){return Object.keys(t).reduce(function(a,o){var i=t[o],s=i.stackedData,l=s.reduce(function(u,f){var c=Gpe(f.slice(r,n+1));return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},_3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,M3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lx=function(t,r,n){if((0,Ac.default)(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Y(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(_3.test(t[0])){var o=+_3.exec(t[0])[1];a[0]=r[0]-o}else(0,Ac.default)(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Y(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(M3.test(t[1])){var i=+M3.exec(t[1])[1];a[1]=r[1]+i}else(0,Ac.default)(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},kc=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var o=(0,j3.default)(r,function(c){return c.coordinate}),i=1/0,s=1,l=o.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},nz=function(t,r,n,a,o){var i=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=It(t.cx,i,i/2),c=It(t.cy,s,s/2),d=FL(i,s,n),p=It(t.innerRadius,d,0),h=It(t.outerRadius,d,d*.8),m=Object.keys(r);return m.reduce(function(x,g){var v=r[g],w=v.domain,b=v.reversed,y;if((0,ez.default)(v.range))a==="angleAxis"?y=[l,u]:a==="radiusAxis"&&(y=[p,h]),b&&(y=[y[1],y[0]]);else{y=v.range;var S=y,P=Ype(S,2);l=P[0],u=P[1]}var A=Cx(v,o),_=A.realScaleType,T=A.scale;T.domain(w).range(y),Px(T);var D=Ix(T,$o($o({},v),{},{realScaleType:_})),N=$o($o($o({},v),D),{},{range:y,radius:h,realScaleType:_,scale:T,cx:f,cy:c,innerRadius:p,outerRadius:h,startAngle:l,endAngle:u});return $o($o({},x),{},Z3({},g,N))},{})},rme=function(t,r){var n=t.x,a=t.y,o=r.x,i=r.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(a-i,2))},nme=function(t,r){var n=t.x,a=t.y,o=r.cx,i=r.cy,s=rme({x:n,y:a},{x:o,y:i});if(s<=0)return{radius:s};var l=(n-o)/s,u=Math.acos(l);return a>i&&(u=2*Math.PI-u),{radius:s,angle:tme(u),angleInRadian:u}},ame=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),i=Math.min(a,o);return{startAngle:r-i*360,endAngle:n-i*360}},ome=function(t,r){var n=r.startAngle,a=r.endAngle,o=Math.floor(n/360),i=Math.floor(a/360),s=Math.min(o,i);return t+s*360},BL=function(t,r){var n=t.x,a=t.y,o=nme({x:n,y:a},r),i=o.radius,s=o.angle,l=r.innerRadius,u=r.outerRadius;if(iu)return!1;if(i===0)return!0;var f=ame(r),c=f.startAngle,d=f.endAngle,p=s,h;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return h?$o($o({},r),{},{radius:i,angle:ome(p,r)}):null},Ox=function(t){return!(0,tz.isValidElement)(t)&&!(0,rz.default)(t)&&typeof t!="boolean"?t.className:""};function Jp(e){return Jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jp(e)}var ime=["offset"];function sme(e){return fme(e)||cme(e)||ume(e)||lme()}function lme(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ume(e,t){if(e){if(typeof e=="string")return jL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jL(e,t)}}function cme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fme(e){if(Array.isArray(e))return jL(e)}function jL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pme(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function az(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t=0?1:-1,w,b;a==="insideStart"?(w=p+v*i,b=m):a==="insideEnd"?(w=h-v*i,b=!m):a==="end"&&(w=h+v*i,b=m),b=g<=0?b:!b;var y=Ae(u,f,x,w),S=Ae(u,f,x,w+(b?1:-1)*359),P="M".concat(y.x,",").concat(y.y,` + A`).concat(x,",").concat(x,",0,1,").concat(b?0:1,`, + `).concat(S.x,",").concat(S.y),A=(0,Zp.default)(t.id)?Qn("recharts-radial-line-"):t.id;return bt.default.createElement("text",Qp({},n,{dominantBaseline:"central",className:ae("recharts-radial-bar-label",s)}),bt.default.createElement("defs",null,bt.default.createElement("path",{id:A,d:P})),bt.default.createElement("textPath",{xlinkHref:"#".concat(A)},r))},bme=function(t){var r=t.viewBox,n=t.offset,a=t.position,o=r,i=o.cx,s=o.cy,l=o.innerRadius,u=o.outerRadius,f=o.startAngle,c=o.endAngle,d=(f+c)/2;if(a==="outside"){var p=Ae(i,s,u+n,d),h=p.x,m=p.y;return{x:h,y:m,textAnchor:h>=i?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"end"};var x=(l+u)/2,g=Ae(i,s,x,d),v=g.x,w=g.y;return{x:v,y:w,textAnchor:"middle",verticalAnchor:"middle"}},wme=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,o=t.position,i=r,s=i.x,l=i.y,u=i.width,f=i.height,c=f>=0?1:-1,d=c*a,p=c>0?"end":"start",h=c>0?"start":"end",m=u>=0?1:-1,x=m*a,g=m>0?"end":"start",v=m>0?"start":"end";if(o==="top"){var w={x:s+u/2,y:l-c*a,textAnchor:"middle",verticalAnchor:p};return jt(jt({},w),n?{height:Math.max(l-n.y,0),width:u}:{})}if(o==="bottom"){var b={x:s+u/2,y:l+f+d,textAnchor:"middle",verticalAnchor:h};return jt(jt({},b),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(o==="left"){var y={x:s-x,y:l+f/2,textAnchor:g,verticalAnchor:"middle"};return jt(jt({},y),n?{width:Math.max(y.x-n.x,0),height:f}:{})}if(o==="right"){var S={x:s+u+x,y:l+f/2,textAnchor:v,verticalAnchor:"middle"};return jt(jt({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var P=n?{width:u,height:f}:{};return o==="insideLeft"?jt({x:s+x,y:l+f/2,textAnchor:v,verticalAnchor:"middle"},P):o==="insideRight"?jt({x:s+u-x,y:l+f/2,textAnchor:g,verticalAnchor:"middle"},P):o==="insideTop"?jt({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:h},P):o==="insideBottom"?jt({x:s+u/2,y:l+f-d,textAnchor:"middle",verticalAnchor:p},P):o==="insideTopLeft"?jt({x:s+x,y:l+d,textAnchor:v,verticalAnchor:h},P):o==="insideTopRight"?jt({x:s+u-x,y:l+d,textAnchor:g,verticalAnchor:h},P):o==="insideBottomLeft"?jt({x:s+x,y:l+f-d,textAnchor:v,verticalAnchor:p},P):o==="insideBottomRight"?jt({x:s+u-x,y:l+f-d,textAnchor:g,verticalAnchor:p},P):(0,qL.default)(o)&&(Y(o.x)||qo(o.x))&&(Y(o.y)||qo(o.y))?jt({x:s+It(o.x,u),y:l+It(o.y,f),textAnchor:"end",verticalAnchor:"end"},P):jt({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Sme=function(t){return"cx"in t&&Y(t.cx)};function Ue(e){var t=e.offset,r=t===void 0?5:t,n=dme(e,ime),a=jt({offset:r},n),o=a.viewBox,i=a.position,s=a.value,l=a.children,u=a.content,f=a.className,c=f===void 0?"":f,d=a.textBreakAll;if(!o||(0,Zp.default)(s)&&(0,Zp.default)(l)&&!(0,bt.isValidElement)(u)&&!(0,em.default)(u))return null;if((0,bt.isValidElement)(u))return(0,bt.cloneElement)(u,a);var p;if((0,em.default)(u)){if(p=(0,bt.createElement)(u,a),(0,bt.isValidElement)(p))return p}else p=gme(a);var h=Sme(o),m=te(a,!0);if(h&&(i==="insideStart"||i==="insideEnd"||i==="end"))return xme(a,p,m);var x=h?bme(a):wme(a);return bt.default.createElement(Pn,Qp({className:ae("recharts-label",c)},m,x,{breakAll:d}),p)}Ue.displayName="Label";var oz=function(t){var r=t.cx,n=t.cy,a=t.angle,o=t.startAngle,i=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,h=t.left,m=t.width,x=t.height,g=t.clockWise,v=t.labelViewBox;if(v)return v;if(Y(m)&&Y(x)){if(Y(c)&&Y(d))return{x:c,y:d,width:m,height:x};if(Y(p)&&Y(h))return{x:p,y:h,width:m,height:x}}return Y(c)&&Y(d)?{x:c,y:d,width:0,height:0}:Y(r)&&Y(n)?{cx:r,cy:n,startAngle:o||a||0,endAngle:i||a||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:g}:t.viewBox?t.viewBox:{}},Cme=function(t,r){return t?t===!0?bt.default.createElement(Ue,{key:"label-implicit",viewBox:r}):Ye(t)?bt.default.createElement(Ue,{key:"label-implicit",viewBox:r,value:t}):(0,bt.isValidElement)(t)?t.type===Ue?(0,bt.cloneElement)(t,{key:"label-implicit",viewBox:r}):bt.default.createElement(Ue,{key:"label-implicit",content:t,viewBox:r}):(0,em.default)(t)?bt.default.createElement(Ue,{key:"label-implicit",content:t,viewBox:r}):(0,qL.default)(t)?bt.default.createElement(Ue,Qp({viewBox:r},t,{key:"label-implicit"})):null:null},Pme=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,o=oz(t),i=Ft(a,Ue).map(function(l,u){return(0,bt.cloneElement)(l,{viewBox:r||o,key:"label-".concat(u)})});if(!n)return i;var s=Cme(t.label,r||o);return[s].concat(sme(i))};Ue.parseViewBox=oz;Ue.renderCallByParent=Pme;var Go=R(G()),kx=R(Jn()),fz=R(Yn()),dz=R(it()),pz=R(sz());function tm(e){return tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tm(e)}var Lme=["valueAccessor"],Ame=["data","dataKey","clockWise","id","textBreakAll"];function Ome(e){return Rme(e)||Tme(e)||Eme(e)||kme()}function kme(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eme(e,t){if(e){if(typeof e=="string")return UL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UL(e,t)}}function Tme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rme(e){if(Array.isArray(e))return UL(e)}function UL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Nme(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var Fme=function(t){return Array.isArray(t.value)?(0,pz.default)(t.value):t.value};function ar(e){var t=e.valueAccessor,r=t===void 0?Fme:t,n=cz(e,Lme),a=n.data,o=n.dataKey,i=n.clockWise,s=n.id,l=n.textBreakAll,u=cz(n,Ame);return!a||!a.length?null:Go.default.createElement(pe,{className:"recharts-label-list"},a.map(function(f,c){var d=(0,kx.default)(o)?r(f,c):lt(f&&f.payload,o),p=(0,kx.default)(s)?{}:{id:"".concat(s,"-").concat(c)};return Go.default.createElement(Ue,Ex({},te(f,!0),u,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:l,viewBox:Ue.parseViewBox((0,kx.default)(i)?f:uz(uz({},f),{},{clockWise:i})),key:"label-".concat(c),index:c}))}))}ar.displayName="LabelList";function Bme(e,t){return e?e===!0?Go.default.createElement(ar,{key:"labelList-implicit",data:t}):Go.default.isValidElement(e)||(0,dz.default)(e)?Go.default.createElement(ar,{key:"labelList-implicit",data:t,content:e}):(0,fz.default)(e)?Go.default.createElement(ar,Ex({data:t},e,{key:"labelList-implicit"})):null:null}function jme(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Ft(n,ar).map(function(i,s){return(0,Go.cloneElement)(i,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var o=Bme(e.label,t);return[o].concat(Ome(a))}ar.renderCallByParent=jme;var vz=R(G());function rm(e){return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(e)}function HL(){return HL=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(i>u),`, + `).concat(c.x,",").concat(c.y,` + `);if(a>0){var p=Ae(r,n,a,i),h=Ae(r,n,a,u);d+="L ".concat(h.x,",").concat(h.y,` + A `).concat(a,",").concat(a,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(i<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},zme=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,i=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,c=Pt(f-u),d=Tx({cx:r,cy:n,radius:o,angle:u,sign:c,cornerRadius:i,cornerIsExternal:l}),p=d.circleTangency,h=d.lineTangency,m=d.theta,x=Tx({cx:r,cy:n,radius:o,angle:f,sign:-c,cornerRadius:i,cornerIsExternal:l}),g=x.circleTangency,v=x.lineTangency,w=x.theta,b=l?Math.abs(u-f):Math.abs(u-f)-m-w;if(b<0)return s?"M ".concat(h.x,",").concat(h.y,` + a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0 + a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0 + `):gz({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f});var y="M ".concat(h.x,",").concat(h.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` + A`).concat(o,",").concat(o,",0,").concat(+(b>180),",").concat(+(c<0),",").concat(g.x,",").concat(g.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(v.x,",").concat(v.y,` + `);if(a>0){var S=Tx({cx:r,cy:n,radius:a,angle:u,sign:c,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),P=S.circleTangency,A=S.lineTangency,_=S.theta,T=Tx({cx:r,cy:n,radius:a,angle:f,sign:-c,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),D=T.circleTangency,N=T.lineTangency,j=T.theta,B=l?Math.abs(u-f):Math.abs(u-f)-_-j;if(B<0&&i===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(N.x,",").concat(N.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(D.x,",").concat(D.y,` + A`).concat(a,",").concat(a,",0,").concat(+(B>180),",").concat(+(c>0),",").concat(P.x,",").concat(P.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(A.x,",").concat(A.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},Vme={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Rx=function(t){var r=hz(hz({},Vme),t),n=r.cx,a=r.cy,o=r.innerRadius,i=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(i0&&Math.abs(f-c)<360?x=zme({cx:n,cy:a,innerRadius:o,outerRadius:i,cornerRadius:Math.min(m,h/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:c}):x=gz({cx:n,cy:a,innerRadius:o,outerRadius:i,startAngle:f,endAngle:c}),vz.default.createElement("path",HL({},te(r,!0),{className:p,d:x,role:"img"}))};var wz=R(G());var Sz=R(iy()),Cz=R(it());function om(e){return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},om(e)}function WL(){return WL=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function nhe(e,t){return Ec(e.getTime(),t.getTime())}function Dz(e,t,r){if(e.size!==t.size)return!1;for(var n={},a=e.entries(),o=0,i,s;(i=a.next())&&!i.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var c=i.value,d=c[0],p=c[1],h=s.value,m=h[0],x=h[1];!u&&!n[f]&&(u=r.equals(d,m,o,f,e,t,r)&&r.equals(p,x,d,m,e,t,r))&&(n[f]=!0),f++}if(!u)return!1;o++}return!0}function ahe(e,t,r){var n=Mz(e),a=n.length;if(Mz(t).length!==a)return!1;for(var o;a-- >0;)if(o=n[a],o===qz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jz(t,o)||!r.equals(e[o],t[o],o,o,e,t,r))return!1;return!0}function im(e,t,r){var n=Rz(e),a=n.length;if(Rz(t).length!==a)return!1;for(var o,i,s;a-- >0;)if(o=n[a],o===qz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jz(t,o)||!r.equals(e[o],t[o],o,o,e,t,r)||(i=_z(e,o),s=_z(t,o),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function ohe(e,t){return Ec(e.valueOf(),t.valueOf())}function ihe(e,t){return e.source===t.source&&e.flags===t.flags}function Nz(e,t,r){if(e.size!==t.size)return!1;for(var n={},a=e.values(),o,i;(o=a.next())&&!o.done;){for(var s=t.values(),l=!1,u=0;(i=s.next())&&!i.done;)!l&&!n[u]&&(l=r.equals(o.value,i.value,o.value,i.value,e,t,r))&&(n[u]=!0),u++;if(!l)return!1}return!0}function she(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var lhe="[object Arguments]",uhe="[object Boolean]",che="[object Date]",fhe="[object Map]",dhe="[object Number]",phe="[object Object]",mhe="[object RegExp]",hhe="[object Set]",vhe="[object String]",ghe=Array.isArray,Fz=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Bz=Object.assign,yhe=Object.prototype.toString.call.bind(Object.prototype.toString);function xhe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,a=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,i=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,c,d){if(f===c)return!0;if(f==null||c==null||typeof f!="object"||typeof c!="object")return f!==f&&c!==c;var p=f.constructor;if(p!==c.constructor)return!1;if(p===Object)return a(f,c,d);if(ghe(f))return t(f,c,d);if(Fz!=null&&Fz(f))return l(f,c,d);if(p===Date)return r(f,c,d);if(p===RegExp)return i(f,c,d);if(p===Map)return n(f,c,d);if(p===Set)return s(f,c,d);var h=yhe(f);return h===che?r(f,c,d):h===mhe?i(f,c,d):h===fhe?n(f,c,d):h===hhe?s(f,c,d):h===phe?typeof f.then!="function"&&typeof c.then!="function"&&a(f,c,d):h===lhe?a(f,c,d):h===uhe||h===dhe||h===vhe?o(f,c,d):!1}}function bhe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?im:rhe,areDatesEqual:nhe,areMapsEqual:n?Tz(Dz,im):Dz,areObjectsEqual:n?im:ahe,arePrimitiveWrappersEqual:ohe,areRegExpsEqual:ihe,areSetsEqual:n?Tz(Nz,im):Nz,areTypedArraysEqual:n?im:she};if(r&&(a=Bz({},a,r(a))),t){var o=Dx(a.areArraysEqual),i=Dx(a.areMapsEqual),s=Dx(a.areObjectsEqual),l=Dx(a.areSetsEqual);a=Bz({},a,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return a}function whe(e){return function(t,r,n,a,o,i,s){return e(t,r,s)}}function She(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,o=e.strict;if(n)return function(l,u){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,p=f.meta;return r(l,u,{cache:d,equals:a,meta:p,strict:o})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:o})};var i={cache:void 0,equals:a,meta:void 0,strict:o};return function(l,u){return r(l,u,i)}}var Uz=Xi(),rUe=Xi({strict:!0}),nUe=Xi({circular:!0}),aUe=Xi({circular:!0,strict:!0}),oUe=Xi({createInternalComparator:function(){return Ec}}),iUe=Xi({strict:!0,createInternalComparator:function(){return Ec}}),sUe=Xi({circular:!0,createInternalComparator:function(){return Ec}}),lUe=Xi({circular:!0,createInternalComparator:function(){return Ec},strict:!0});function Xi(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,o=e.strict,i=o===void 0?!1:o,s=bhe(e),l=xhe(s),u=n?n(l):whe(l);return She({circular:r,comparator:l,createState:a,equals:u,strict:i})}function Che(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Nx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(o){r<0&&(r=o),o-r>t?(e(o),r=-1):Che(a)};requestAnimationFrame(n)}function zL(e){return zL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zL(e)}function Phe(e){return Ohe(e)||Ahe(e)||Lhe(e)||Ihe()}function Ihe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lhe(e,t){if(e){if(typeof e=="string")return Hz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hz(e,t)}}function Hz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&x<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var c=Kz(a,i),d=Kz(o,s),p=Uhe(a,i),h=function(g){return g>1?1:g<0?0:g},m=function(g){for(var v=g>1?1:g,w=v,b=0;b<8;++b){var y=c(w)-v,S=p(w);if(Math.abs(y-v)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,i=t.dt,s=i===void 0?17:i,l=function(f,c,d){var p=-(f-c)*n,h=d*o,m=d+(p-h)*s/1e3,x=d*s/1e3+f;return Math.abs(x-c)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eve(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function QL(e){return ave(e)||nve(e)||rve(e)||tve()}function tve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rve(e,t){if(e){if(typeof e=="string")return ZL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZL(e,t)}}function nve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ave(e){if(Array.isArray(e))return ZL(e)}function ZL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jx(e){return jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jx(e)}var qx=function(e){lve(r,e);var t=uve(r);function r(n,a){var o;ove(this,r),o=t.call(this,n,a);var i=o.props,s=i.isActive,l=i.attributeName,u=i.from,f=i.to,c=i.steps,d=i.children,p=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(rA(o)),o.changeStyle=o.changeStyle.bind(rA(o)),!s||p<=0)return o.state={style:{}},typeof d=="function"&&(o.state={style:f}),tA(o);if(c&&c.length)o.state={style:c[0].style};else if(u){if(typeof d=="function")return o.state={style:u},tA(o);o.state={style:l?cm({},l,u):u}}else o.state={style:{}};return o}return ive(r,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,i=a.canBegin;this.mounted=!0,!(!o||!i)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,i=o.isActive,s=o.canBegin,l=o.attributeName,u=o.shouldReAnimate,f=o.to,c=o.from,d=this.state.style;if(s){if(!i){var p={style:l?cm({},l,f):f};this.state&&d&&(l&&d[l]!==f||!l&&d!==f)&&this.setState(p);return}if(!(Uz(a.to,f)&&a.canBegin&&a.isActive)){var h=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=h||u?c:a.to;if(this.state&&d){var x={style:l?cm({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(x)}this.runAnimation(Ma(Ma({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,i=a.from,s=a.to,l=a.duration,u=a.easing,f=a.begin,c=a.onAnimationEnd,d=a.onAnimationStart,p=n4(i,s,Zz(u),l,this.changeStyle),h=function(){o.stopJSAnimation=p()};this.manager.start([d,f,h,l,c])}},{key:"runStepAnimation",value:function(a){var o=this,i=a.steps,s=a.begin,l=a.onAnimationStart,u=i[0],f=u.style,c=u.duration,d=c===void 0?0:c,p=function(m,x,g){if(g===0)return m;var v=x.duration,w=x.easing,b=w===void 0?"ease":w,y=x.style,S=x.properties,P=x.onAnimationEnd,A=g>0?i[g-1]:x,_=S||Object.keys(y);if(typeof b=="function"||b==="spring")return[].concat(QL(m),[o.runJSAnimation.bind(o,{from:A.style,to:y,duration:v,easing:b}),v]);var T=$L(_,v,b),D=Ma(Ma(Ma({},A.style),y),{},{transition:T});return[].concat(QL(m),[D,v,P]).filter(Gz)};return this.manager.start([l].concat(QL(i.reduce(p,[f,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=VL());var o=a.begin,i=a.duration,s=a.attributeName,l=a.to,u=a.easing,f=a.onAnimationStart,c=a.onAnimationEnd,d=a.steps,p=a.children,h=this.manager;if(this.unSubscribe=h.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var m=s?cm({},s,l):l,x=$L(Object.keys(m),i,u);h.start([f,o,Ma(Ma({},m),{},{transition:x}),i,c])}},{key:"render",value:function(){var a=this.props,o=a.children,i=a.begin,s=a.duration,l=a.attributeName,u=a.easing,f=a.isActive,c=a.steps,d=a.from,p=a.to,h=a.canBegin,m=a.onAnimationEnd,x=a.shouldReAnimate,g=a.onAnimationReStart,v=Zhe(a,Qhe),w=fo.Children.count(o),b=this.state.style;if(typeof o=="function")return o(b);if(!f||w===0||s<=0)return o;var y=function(P){var A=P.props,_=A.style,T=_===void 0?{}:_,D=A.className,N=(0,fo.cloneElement)(P,Ma(Ma({},v),{},{style:Ma(Ma({},T),b),className:D}));return N};return w===1?y(fo.Children.only(o)):fo.default.createElement("div",null,fo.Children.map(o,function(S){return y(S)}))}}]),r}(fo.PureComponent);qx.displayName="Animate";qx.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};qx.propTypes={from:_e.default.oneOfType([_e.default.object,_e.default.string]),to:_e.default.oneOfType([_e.default.object,_e.default.string]),attributeName:_e.default.string,duration:_e.default.number,begin:_e.default.number,easing:_e.default.oneOfType([_e.default.string,_e.default.func]),steps:_e.default.arrayOf(_e.default.shape({duration:_e.default.number.isRequired,style:_e.default.object.isRequired,easing:_e.default.oneOfType([_e.default.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),_e.default.func]),properties:_e.default.arrayOf("string"),onAnimationEnd:_e.default.func})),children:_e.default.oneOfType([_e.default.node,_e.default.func]),isActive:_e.default.bool,canBegin:_e.default.bool,onAnimationEnd:_e.default.func,shouldReAnimate:_e.default.bool,onAnimationStart:_e.default.func,onAnimationReStart:_e.default.func};var Ux=qx;var vm=R(G());function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vve(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function d4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function p4(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gx(e){return Gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gx(e)}function dA(e,t,r){return t=h4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h4(e){var t=Cve(e,"string");return Nc(t)==="symbol"?t:String(t)}function Cve(e,t){if(Nc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lA=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.steps,n=t.duration;return r&&r.length?r.reduce(function(a,o){return a+(Number.isFinite(o.duration)&&o.duration>0?o.duration:0)},0):Number.isFinite(n)?n:0},v4=function(e){xve(r,e);var t=bve(r);function r(){var n;return gve(this,r),n=t.call(this),dA(fA(n),"handleEnter",function(a,o){var i=n.props,s=i.appearOptions,l=i.enterOptions;n.handleStyleActive(o?s:l)}),dA(fA(n),"handleExit",function(){var a=n.props.leaveOptions;n.handleStyleActive(a)}),n.state={isActive:!1},n}return yve(r,[{key:"handleStyleActive",value:function(a){if(a){var o=a.onAnimationEnd?function(){a.onAnimationEnd()}:null;this.setState(p4(p4({},a),{},{onAnimationEnd:o,isActive:!0}))}}},{key:"parseTimeout",value:function(){var a=this.props,o=a.appearOptions,i=a.enterOptions,s=a.leaveOptions;return lA(o)+lA(i)+lA(s)}},{key:"render",value:function(){var a=this,o=this.props,i=o.children,s=o.appearOptions,l=o.enterOptions,u=o.leaveOptions,f=hve(o,mve);return wl.default.createElement(oA,uA({},f,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(){return wl.default.createElement(Ux,a.state,wl.Children.only(i))})}}]),r}(wl.Component);v4.propTypes={appearOptions:hm.default.object,enterOptions:hm.default.object,leaveOptions:hm.default.object,children:hm.default.element};var g4=v4;function y4(e){var t=e.component,r=e.children,n=e.appear,a=e.enter,o=e.leave;return vm.default.createElement(sA,{component:t},vm.Children.map(r,function(i,s){return vm.default.createElement(g4,{appearOptions:n,enterOptions:a,leaveOptions:o,key:"child-".concat(s)},i)}))}y4.propTypes={appear:Yi.default.object,enter:Yi.default.object,leave:Yi.default.object,children:Yi.default.oneOfType([Yi.default.array,Yi.default.element]),component:Yi.default.any};y4.defaultProps={component:"span"};var la=Ux;function gm(e){return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gm(e)}function Kx(){return Kx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,f;if(i>0&&o instanceof Array){for(var c=[0,0,0,0],d=0,p=4;di?i:o[d];f="M".concat(t,",").concat(r+s*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(u,",").concat(t+l*c[0],",").concat(r)),f+="L ".concat(t+n-l*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+s*c[1])),f+="L ".concat(t+n,",").concat(r+a-s*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(u,`, + `).concat(t+n-l*c[2],",").concat(r+a)),f+="L ".concat(t+l*c[3],",").concat(r+a),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+a-s*c[3])),f+="Z"}else if(i>0&&o===+o&&o>0){var h=Math.min(i,o);f="M ".concat(t,",").concat(r+s*h,` + A `).concat(h,",").concat(h,",0,0,").concat(u,",").concat(t+l*h,",").concat(r,` + L `).concat(t+n-l*h,",").concat(r,` + A `).concat(h,",").concat(h,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*h,` + L `).concat(t+n,",").concat(r+a-s*h,` + A `).concat(h,",").concat(h,",0,0,").concat(u,",").concat(t+n-l*h,",").concat(r+a,` + L `).concat(t+l*h,",").concat(r+a,` + A `).concat(h,",").concat(h,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*h," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},C4=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,o=r.x,i=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(o,o+s),f=Math.max(o,o+s),c=Math.min(i,i+l),d=Math.max(i,i+l);return n>=u&&n<=f&&a>=c&&a<=d}return!1},Rve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Yo=function(t){var r=w4(w4({},Rve),t),n=(0,Da.useRef)(),a=(0,Da.useState)(-1),o=Pve(a,2),i=o[0],s=o[1];(0,Da.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&s(b)}catch{}},[]);var l=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,h=r.animationEasing,m=r.animationDuration,x=r.animationBegin,g=r.isAnimationActive,v=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var w=ae("recharts-rectangle",p);return v?Da.default.createElement(la,{canBegin:i>0,from:{width:f,height:c,x:l,y:u},to:{width:f,height:c,x:l,y:u},duration:m,animationEasing:h,isActive:v},function(b){var y=b.width,S=b.height,P=b.x,A=b.y;return Da.default.createElement(la,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,isActive:g,easing:h},Da.default.createElement("path",Kx({},te(r,!0),{className:w,d:S4(P,A,y,S,d),ref:n})))}):Da.default.createElement("path",Kx({},te(r,!0),{className:w,d:S4(l,u,f,c,d)}))};var Fc=R(G());var _ve=["points","className","baseLinePoints","connectNulls"];function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Dve(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function P4(e){return jve(e)||Bve(e)||Fve(e)||Nve()}function Nve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fve(e,t){if(e){if(typeof e=="string")return pA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pA(e,t)}}function Bve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jve(e){if(Array.isArray(e))return pA(e)}function pA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){I4(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),I4(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ym=function(t,r){var n=qve(t);r&&(n=[n.reduce(function(o,i){return[].concat(P4(o),P4(i))},[])]);var a=n.map(function(o){return o.reduce(function(i,s,l){return"".concat(i).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},Uve=function(t,r,n){var a=ym(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ym(r.reverse(),n).slice(1))},L4=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,o=t.connectNulls,i=Mve(t,_ve);if(!r||!r.length)return null;var s=ae("recharts-polygon",n);if(a&&a.length){var l=i.stroke&&i.stroke!=="none",u=Uve(r,a,o);return Fc.default.createElement("g",{className:s},Fc.default.createElement("path",Bc({},te(i,!0),{fill:u.slice(-1)==="Z"?i.fill:"none",stroke:"none",d:u})),l?Fc.default.createElement("path",Bc({},te(i,!0),{fill:"none",d:ym(r,o)})):null,l?Fc.default.createElement("path",Bc({},te(i,!0),{fill:"none",d:ym(a,o)})):null)}var f=ym(r,o);return Fc.default.createElement("path",Bc({},te(i,!0),{fill:f.slice(-1)==="Z"?i.fill:"none",className:s,d:f}))};var A4=R(G());function mA(){return mA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kve(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var Xve=function(t,r,n,a,o,i){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(i,",").concat(r,"h").concat(n)},E4=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,o=a===void 0?0:a,i=t.top,s=i===void 0?0:i,l=t.left,u=l===void 0?0:l,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,h=t.className,m=Gve(t,Hve),x=Wve({x:n,y:o,top:s,left:u,width:c,height:p},m);return!Y(n)||!Y(o)||!Y(c)||!Y(p)||!Y(s)||!Y(u)?null:k4.default.createElement("path",hA({},te(x,!0),{className:ae("recharts-cross",h),d:Xve(n,o,c,p,s,u)}))};var po=R(G()),q4=R(R4()),U4=R(M4()),H4=R(it());var age=["cx","cy","angle","ticks","axisLine"],oge=["ticks","tick","angle","tickFormatter","stroke"];function jc(e){return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ige(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function sge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F4(e,t){for(var r=0;rV4?i=a==="outer"?"start":"end":o<-V4?i=a==="outer"?"end":"start":i="middle",i}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,o=n.cy,i=n.radius,s=n.axisLine,l=n.axisLineType,u=Cl(Cl({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return ua.default.createElement(Ji,Pl({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:o,r:i}));var f=this.props.ticks,c=f.map(function(d){return Ae(a,o,i,d.coordinate)});return ua.default.createElement(L4,Pl({className:"recharts-polar-angle-axis-line"},u,{points:c}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,o=a.ticks,i=a.tick,s=a.tickLine,l=a.tickFormatter,u=a.stroke,f=te(this.props,!1),c=te(i,!1),d=Cl(Cl({},f),{},{fill:"none"},te(s,!1)),p=o.map(function(h,m){var x=n.getTickLineCoord(h),g=n.getTickTextAnchor(h),v=Cl(Cl(Cl({textAnchor:g},f),{},{stroke:"none",fill:u},c),{},{index:m,payload:h,x:x.x2,y:x.y2});return ua.default.createElement(pe,Pl({className:ae("recharts-polar-angle-axis-tick",Ox(i)),key:"tick-".concat(h.coordinate)},wn(n.props,h,m)),s&&ua.default.createElement("line",Pl({className:"recharts-polar-angle-axis-tick-line"},d,x)),i&&t.renderTickItem(i,v,l?l(h.value,m):h.value))});return ua.default.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,a=n.ticks,o=n.radius,i=n.axisLine;return o<=0||!a||!a.length?null:ua.default.createElement(pe,{className:ae("recharts-polar-angle-axis",this.props.className)},i&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,o){var i;return ua.default.isValidElement(n)?i=ua.default.cloneElement(n,a):(0,K4.default)(n)?i=n(a):i=ua.default.createElement(Pn,Pl({},a,{className:"recharts-polar-angle-axis-tick-value"}),o),i}}]),t}(ua.PureComponent);Qx(Sm,"displayName","PolarAngleAxis");Qx(Sm,"axisType","angleAxis");Qx(Sm,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var ir=R(G());var yV=R(Bi()),xV=R(Pc()),Il=R(Jn()),Wc=R(it());var En=R(G()),uV=R(it()),cV=R(Z4()),fV=R(tV()),dV=R(Pc());var ca=R(G());function Cm(e){return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:f,lowerWidth:c,height:d,x:l,y:u},duration:m,animationEasing:h,isActive:g},function(w){var b=w.upperWidth,y=w.lowerWidth,S=w.height,P=w.x,A=w.y;return ca.default.createElement(la,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,easing:h},ca.default.createElement("path",Zx({},te(r,!0),{className:v,d:oV(P,A,b,y,S),ref:n})))}):ca.default.createElement("g",null,ca.default.createElement("path",Zx({},te(r,!0),{className:v,d:oV(l,u,f,c,d)})))};var $ge=["option","shapeType","propTransformer","activeClassName","isActive"];function Pm(e){return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(e)}function Gge(e,t){if(e==null)return{};var r=Kge(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kge(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function sV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eb(e){for(var t=1;t0?(0,yV.default)(w,"paddingAngle",0):0;if(y){var P=rr(y.endAngle-y.startAngle,w.endAngle-w.startAngle),A=ut(ut({},w),{},{startAngle:v+S,endAngle:v+P(m)+S});x.push(A),v=A.endAngle}else{var _=w.endAngle,T=w.startAngle,D=rr(0,_-T),N=D(m),j=ut(ut({},w),{},{startAngle:v+S,endAngle:v+N+S});x.push(j),v=j.endAngle}}),ir.default.createElement(pe,null,n.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(n){var a=this;n.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var i=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[i].focus(),a.setState({sectorToFocus:i});break}case"ArrowRight":{var s=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}default:}}}},{key:"renderSectors",value:function(){var n=this.props,a=n.sectors,o=n.isAnimationActive,i=this.state.prevSectors;return o&&a&&a.length&&(!i||!(0,xV.default)(i,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,a=this.props,o=a.hide,i=a.sectors,s=a.className,l=a.label,u=a.cx,f=a.cy,c=a.innerRadius,d=a.outerRadius,p=a.isAnimationActive,h=this.state.isAnimationFinished;if(o||!i||!i.length||!Y(u)||!Y(f)||!Y(c)||!Y(d))return null;var m=ae("recharts-pie",s);return ir.default.createElement(pe,{tabIndex:this.props.rootTabIndex,className:m,ref:function(g){n.pieRef=g}},this.renderSectors(),l&&this.renderLabels(i),Ue.renderCallByParent(this.props,null,!1),(!p||h)&&ar.renderCallByParent(this.props,i,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return a.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:n.sectors!==a.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,a){return n>a?"start":n=360?v:v-1)*l,b=x-v*p-w,y=n.reduce(function(A,_){var T=lt(_,g,0);return A+(Y(T)?T:0)},0),S;if(y>0){var P;S=n.map(function(A,_){var T=lt(A,g,0),D=lt(A,f,_),N=(Y(T)?T:0)/y,j;_?j=P.endAngle+Pt(m)*l*(T!==0?1:0):j=i;var B=j+Pt(m)*((T!==0?p:0)+N*b),H=(j+B)/2,I=(h.innerRadius+h.outerRadius)/2,C=[{name:D,value:T,payload:A,dataKey:g,type:d}],L=Ae(h.cx,h.cy,I,H);return P=ut(ut(ut({percent:N,cornerRadius:o,name:D,tooltipPayload:C,midAngle:H,middleRadius:I,tooltipPosition:L},A),h),{},{value:lt(A,g),startAngle:j,endAngle:B,payload:A,paddingAngle:Pt(m)*l}),P})}return ut(ut({},h),{},{sectors:S,data:n})});var Lt=R(G());var PA=R(it()),NV=R(wA());function Am(e){return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Am(e)}function AV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OV(e){for(var t=1;t0&&n.handleDrag(a.changedTouches[0])}),Tn(mo(n),"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,o=a.endIndex,i=a.onDragEnd,s=a.startIndex;i?.({endIndex:o,startIndex:s})}),n.detachDragEndListener()}),Tn(mo(n),"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Tn(mo(n),"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Tn(mo(n),"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Tn(mo(n),"handleSlideDragStart",function(a){var o=_V(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(mo(n),"startX"),endX:n.handleTravellerDragStart.bind(mo(n),"endX")},n.state={},n}return Oye(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,o=n.endX,i=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,c=Math.min(a,o),d=Math.max(a,o),p=t.getIndexInRange(i,c),h=t.getIndexInRange(i,d);return{startIndex:p-p%l,endIndex:h===f?f:h-h%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,o=a.data,i=a.tickFormatter,s=a.dataKey,l=lt(o[n],s,n);return(0,PA.default)(i)?i(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,o=a.slideMoveStartX,i=a.startX,s=a.endX,l=this.props,u=l.x,f=l.width,c=l.travellerWidth,d=l.startIndex,p=l.endIndex,h=l.onChange,m=n.pageX-o;m>0?m=Math.min(m,u+f-c-s,u+f-c-i):m<0&&(m=Math.max(m,u-i,u-s));var x=this.getIndex({startX:i+m,endX:s+m});(x.startIndex!==d||x.endIndex!==p)&&h&&h(x),this.setState({startX:i+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var o=_V(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,o=a.brushMoveStartX,i=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[i],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,h=f.onChange,m=f.gap,x=f.data,g={startX:this.state.startX,endX:this.state.endX},v=n.pageX-o;v>0?v=Math.min(v,c+d-p-u):v<0&&(v=Math.max(v,c-u)),g[i]=u+v;var w=this.getIndex(g),b=w.startIndex,y=w.endIndex,S=function(){var A=x.length-1;return i==="startX"&&(s>l?b%m===0:y%m===0)||sl?y%m===0:b%m===0)||s>l&&y===A};this.setState(Tn(Tn({},i,u+v),"brushMoveStartX",n.pageX),function(){h&&S()&&h(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var o=this,i=this.state,s=i.scaleValues,l=i.startX,u=i.endX,f=this.state[a],c=s.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=s.length)){var p=s[d];a==="startX"&&p>=u||a==="endX"&&p<=l||this.setState(Tn({},a,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,o=n.y,i=n.width,s=n.height,l=n.fill,u=n.stroke;return Lt.default.createElement("rect",{stroke:u,fill:l,x:a,y:o,width:i,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,o=n.y,i=n.width,s=n.height,l=n.data,u=n.children,f=n.padding,c=Lt.Children.only(u);return c?Lt.default.cloneElement(c,{x:a,y:o,width:i,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var o,i,s=this,l=this.props,u=l.y,f=l.travellerWidth,c=l.height,d=l.traveller,p=l.ariaLabel,h=l.data,m=l.startIndex,x=l.endIndex,g=Math.max(n,this.props.x),v=SA(SA({},te(this.props,!1)),{},{x:g,y:u,width:f,height:c}),w=p||"Min value: ".concat((o=h[m])===null||o===void 0?void 0:o.name,", Max value: ").concat((i=h[x])===null||i===void 0?void 0:i.name);return Lt.default.createElement(pe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),s.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,v))}},{key:"renderSlide",value:function(n,a){var o=this.props,i=o.y,s=o.height,l=o.stroke,u=o.travellerWidth,f=Math.min(n,a)+u,c=Math.max(Math.abs(a-n)-u,0);return Lt.default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:i,width:c,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,o=n.endIndex,i=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,h={pointerEvents:"none",fill:u};return Lt.default.createElement(pe,{className:"recharts-brush-texts"},Lt.default.createElement(Pn,ab({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:i+s/2},h),this.getTextOfTick(a)),Lt.default.createElement(Pn,ab({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+l+p,y:i+s/2},h),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,a=n.data,o=n.className,i=n.children,s=n.x,l=n.y,u=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,h=d.endX,m=d.isTextActive,x=d.isSlideMoving,g=d.isTravellerMoving,v=d.isTravellerFocused;if(!a||!a.length||!Y(s)||!Y(l)||!Y(u)||!Y(f)||u<=0||f<=0)return null;var w=ae("recharts-brush",o),b=Lt.default.Children.count(i)===1,y=EV("userSelect","none");return Lt.default.createElement(pe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),b&&this.renderPanorama(),this.renderSlide(p,h),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(h,"endX"),(m||x||g||v||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,o=n.y,i=n.width,s=n.height,l=n.stroke,u=Math.floor(o+s/2)-1;return Lt.default.createElement(Lt.default.Fragment,null,Lt.default.createElement("rect",{x:a,y:o,width:i,height:s,fill:l,stroke:"none"}),Lt.default.createElement("line",{x1:a+1,y1:u,x2:a+i-1,y2:u,fill:"none",stroke:"#fff"}),Lt.default.createElement("line",{x1:a+1,y1:u+2,x2:a+i-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var o;return Lt.default.isValidElement(n)?o=Lt.default.cloneElement(n,a):(0,PA.default)(n)?o=n(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(n,a){var o=n.data,i=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,f=n.startIndex,c=n.endIndex;if(o!==a.prevData||u!==a.prevUpdateId)return SA({prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:i},o&&o.length?_ye({data:o,width:i,x:s,travellerWidth:l,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(a.scale&&(i!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+i-l]);var d=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:i,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var o=n.length,i=0,s=o-1;s-i>1;){var l=Math.floor((i+s)/2);n[l]>a?s=l:i=l}return a>=n[s]?s:i}}]),t}(Lt.PureComponent);Tn(Ll,"displayName","Brush");Tn(Ll,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Rm=R(G()),q5=R(it()),U5=R(qV());var sn=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r};var c5=R(VV()),f5=R(IA());var Br=R(G());var o5=R(Pc()),i5=R(Jn());var QV=R(G());var rxe=["x","y"];function km(e){return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(e)}function LA(){return LA=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sxe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function lxe(e,t){var r=e.x,n=e.y,a=ixe(e,rxe),o="".concat(r),i=parseInt(o,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),f=parseInt(u,10),c="".concat(t.width||a.width),d=parseInt(c,10);return Om(Om(Om(Om(Om({},t),a),i?{x:i}:{}),l?{y:l}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function AA(e){return QV.default.createElement(tb,LA({shapeType:"rectangle",propTransformer:lxe,activeClassName:"recharts-active-bar"},e))}var ZV=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var o=typeof n=="number";return o?t(n,a):(o||_a(!1),r)}};var uxe=["value","background"],r5;function Gc(e){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function cxe(e,t){if(e==null)return{};var r=fxe(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fxe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function ib(){return ib=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(B)0&&Math.abs(j)0&&(j=Math.min(($||0)-(B[ee-1]||0),j))}),Number.isFinite(j)){var H=j/N,I=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(P=H*I/2),m.padding==="no-gap"){var C=It(t.barCategoryGap,H*I),L=H*I/2;P=L-C-(L-C)/I*C}}}a==="xAxis"?A=[n.left+(w.left||0)+(P||0),n.left+n.width-(w.right||0)-(P||0)]:a==="yAxis"?A=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(P||0),n.top+n.height-(w.bottom||0)-(P||0)]:A=m.range,y&&(A=[A[1],A[0]]);var O=Cx(m,o,d),E=O.scale,k=O.realScaleType;E.domain(g).range(A),Px(E);var F=Ix(E,Na(Na({},m),{},{realScaleType:k}));a==="xAxis"?(D=x==="top"&&!b||x==="bottom"&&b,_=n.left,T=c[S]-D*m.height):a==="yAxis"&&(D=x==="left"&&!b||x==="right"&&b,_=c[S]-D*m.width,T=n.top);var q=Na(Na(Na({},m),F),{},{realScaleType:k,x:_,y:T,scale:E,width:a==="xAxis"?n.width:m.width,height:a==="yAxis"?n.height:m.height});return q.bandSize=kc(q,F),!m.hide&&a==="xAxis"?c[S]+=(D?-1:1)*q.height:m.hide||(c[S]+=(D?-1:1)*q.width),Na(Na({},p),{},lb({},h,q))},{})},kA=function(t,r){var n=t.x,a=t.y,o=r.x,i=r.y;return{x:Math.min(n,o),y:Math.min(a,i),width:Math.abs(o-n),height:Math.abs(i-a)}},d5=function(t){var r=t.x1,n=t.y1,a=t.x2,o=t.y2;return kA({x:r,y:n},{x:a,y:o})},p5=function(){function e(t){yxe(this,e),this.scale=t}return xxe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+i}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],o=n[n.length-1];return a<=o?r>=a&&r<=o:r>=o&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}]),e}();lb(p5,"EPS",1e-4);var Kc=function(t){var r=Object.keys(t).reduce(function(n,a){return Na(Na({},n),{},lb({},a,p5.create(t[a])))},{});return Na(Na({},r),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.bandAware,s=o.position;return(0,c5.default)(a,function(l,u){return r[u].apply(l,{bandAware:i,position:s})})},isInRange:function(a){return(0,f5.default)(a,function(o,i){return r[i].isInRange(o)})}})};function wxe(e){return(e%180+180)%180}var m5=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=wxe(a),i=o*Math.PI/180,s=Math.atan(n/r),l=i>s&&ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function Y5(e,t){return pb(e,t+1)}function J5(e,t,r,n,a){for(var o=(n||[]).slice(),i=t.start,s=t.end,l=0,u=1,f=i,c=function(){var h=n?.[l];if(h===void 0)return{v:pb(n,u)};var m=l,x,g=function(){return x===void 0&&(x=r(h,m)),x},v=h.coordinate,w=l===0||Zc(e,v,g,f,s);w||(l=0,f=i,u+=1),w&&(f=v+e*(g()/2+a),l+=u)},d;u<=o.length;)if(d=c(),d)return d.v;return[]}function Bm(e){return Bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bm(e)}function Q5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t0?p.coordinate-x*e:p.coordinate})}else o[d]=p=Pr(Pr({},p),{},{tickCoord:p.coordinate});var g=Zc(e,p.tickCoord,m,s,l);g&&(l=p.tickCoord-e*(m()/2+a),o[d]=Pr(Pr({},p),{},{isShow:!0}))},f=i-1;f>=0;f--)u(f);return o}function abe(e,t,r,n,a,o){var i=(n||[]).slice(),s=i.length,l=t.start,u=t.end;if(o){var f=n[s-1],c=r(f,s-1),d=e*(f.coordinate+e*c/2-u);i[s-1]=f=Pr(Pr({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=Zc(e,f.tickCoord,function(){return c},l,u);p&&(u=f.tickCoord-e*(c/2+a),i[s-1]=Pr(Pr({},f),{},{isShow:!0}))}for(var h=o?s-1:s,m=function(v){var w=i[v],b,y=function(){return b===void 0&&(b=r(w,v)),b};if(v===0){var S=e*(w.coordinate-e*y()/2-l);i[v]=w=Pr(Pr({},w),{},{tickCoord:S<0?w.coordinate-S*e:w.coordinate})}else i[v]=w=Pr(Pr({},w),{},{tickCoord:w.coordinate});var P=Zc(e,w.tickCoord,y,l,u);P&&(l=w.tickCoord+e*(y()/2+a),i[v]=Pr(Pr({},w),{},{isShow:!0}))},x=0;x=2?Pt(a[1].coordinate-a[0].coordinate):1,g=X5(o,x,p);return l==="equidistantPreserveStart"?J5(x,g,m,a,i):(l==="preserveStart"||l==="preserveStartEnd"?d=abe(x,g,m,a,i,l==="preserveStartEnd"):d=nbe(x,g,m,a,i),d.filter(function(v){return v.isShow}))}var obe=["viewBox"],ibe=["viewBox"],sbe=["ticks"];function tf(e){return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function ef(){return ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function ube(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t$(e,t){for(var r=0;r0?l(this.props):l(p)),i<=0||s<=0||!h||!h.length?null:Fa.default.createElement(pe,{className:ae("recharts-cartesian-axis",u),ref:function(x){n.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(h,this.state.fontSize,this.state.letterSpacing),Ue.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,o){var i;return Fa.default.isValidElement(n)?i=Fa.default.cloneElement(n,a):(0,mb.default)(n)?i=n(a):i=Fa.default.createElement(Pn,ef({},a,{className:"recharts-cartesian-axis-tick-value"}),o),i}}]),t}(Fa.Component);jA(Jo,"displayName","CartesianAxis");jA(Jo,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var lr=R(G()),vb=R(it());var vbe=["x1","y1","x2","y2","key"],gbe=["offset"];function Ol(e){return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(e)}function a$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var Sbe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,o=t.y,i=t.width,s=t.height;return lr.default.createElement("rect",{x:a,y:o,width:i,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function i$(e,t){var r;if(lr.default.isValidElement(e))r=lr.default.cloneElement(e,t);else if((0,vb.default)(e))r=e(t);else{var n=t.x1,a=t.y1,o=t.x2,i=t.y2,s=t.key,l=o$(t,vbe),u=te(l,!1),f=u.offset,c=o$(u,gbe);r=lr.default.createElement("line",Al({},c,{x1:n,y1:a,x2:o,y2:i,fill:"none",key:s}))}return r}function Cbe(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var i=o.map(function(s,l){var u=Ir(Ir({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return i$(a,u)});return lr.default.createElement("g",{className:"recharts-cartesian-grid-horizontal"},i)}function Pbe(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;var i=o.map(function(s,l){var u=Ir(Ir({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return i$(a,u)});return lr.default.createElement("g",{className:"recharts-cartesian-grid-vertical"},i)}function Ibe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,i=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var h=!f[p+1],m=h?a+i-d:f[p+1]-d;if(m<=0)return null;var x=p%t.length;return lr.default.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:m,width:o,stroke:"none",fill:t[x],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return lr.default.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function Lbe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,i=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(d){return Math.round(d+o-o)}).sort(function(d,p){return d-p});o!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var h=!f[p+1],m=h?o+s-d:f[p+1]-d;if(m<=0)return null;var x=p%n.length;return lr.default.createElement("rect",{key:"react-".concat(p),x:d,y:i,width:m,height:l,stroke:"none",fill:n[x],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return lr.default.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Abe=function(t,r){var n=t.xAxis,a=t.width,o=t.height,i=t.offset;return RL(jm(Ir(Ir(Ir({},Jo.defaultProps),n),{},{ticks:kn(n,!0),viewBox:{x:0,y:0,width:a,height:o}})),i.left,i.left+i.width,r)},Obe=function(t,r){var n=t.yAxis,a=t.width,o=t.height,i=t.offset;return RL(jm(Ir(Ir(Ir({},Jo.defaultProps),n),{},{ticks:kn(n,!0),viewBox:{x:0,y:0,width:a,height:o}})),i.top,i.top+i.height,r)},rf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function pa(e){var t,r,n,a,o,i,s=Xc(),l=Yc(),u=N5(),f=Ir(Ir({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:rf.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:rf.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:rf.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:rf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:rf.vertical,verticalFill:(i=e.verticalFill)!==null&&i!==void 0?i:rf.verticalFill,x:Y(e.x)?e.x:u.left,y:Y(e.y)?e.y:u.top,width:Y(e.width)?e.width:u.width,height:Y(e.height)?e.height:u.height}),c=f.x,d=f.y,p=f.width,h=f.height,m=f.syncWithTicks,x=f.horizontalValues,g=f.verticalValues,v=_5(),w=M5();if(!Y(p)||p<=0||!Y(h)||h<=0||!Y(c)||c!==+c||!Y(d)||d!==+d)return null;var b=f.verticalCoordinatesGenerator||Abe,y=f.horizontalCoordinatesGenerator||Obe,S=f.horizontalPoints,P=f.verticalPoints;if((!S||!S.length)&&(0,vb.default)(y)){var A=x&&x.length,_=y({yAxis:w?Ir(Ir({},w),{},{ticks:A?x:w.ticks}):void 0,width:s,height:l,offset:u},A?!0:m);Gt(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ol(_),"]")),Array.isArray(_)&&(S=_)}if((!P||!P.length)&&(0,vb.default)(b)){var T=g&&g.length,D=b({xAxis:v?Ir(Ir({},v),{},{ticks:T?g:v.ticks}):void 0,width:s,height:l,offset:u},T?!0:m);Gt(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ol(D),"]")),Array.isArray(D)&&(P=D)}return lr.default.createElement("g",{className:"recharts-cartesian-grid"},lr.default.createElement(Sbe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),lr.default.createElement(Cbe,Al({},f,{offset:u,horizontalPoints:S,xAxis:v,yAxis:w})),lr.default.createElement(Pbe,Al({},f,{offset:u,verticalPoints:P,xAxis:v,yAxis:w})),lr.default.createElement(Ibe,Al({},f,{horizontalPoints:S})),lr.default.createElement(Lbe,Al({},f,{verticalPoints:P})))}pa.displayName="CartesianGrid";var ct=R(G());var yb=R(it()),Um=R(dL()),UA=R(Jn()),d$=R(ey()),HA=R(Pc());var kbe=["layout","type","stroke","connectNulls","isRange","ref"],u$;function nf(e){return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function Ebe(e,t){if(e==null)return{};var r=Tbe(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!(0,HA.default)(f,i)||!(0,HA.default)(c,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(i,s,n,a)}},{key:"render",value:function(){var n,a=this.props,o=a.hide,i=a.dot,s=a.points,l=a.className,u=a.top,f=a.left,c=a.xAxis,d=a.yAxis,p=a.width,h=a.height,m=a.isAnimationActive,x=a.id;if(o||!s||!s.length)return null;var g=this.state.isAnimationFinished,v=s.length===1,w=ae("recharts-area",l),b=c&&c.allowDataOverflow,y=d&&d.allowDataOverflow,S=b||y,P=(0,UA.default)(x)?this.id:x,A=(n=te(i,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,T=_===void 0?3:_,D=A.strokeWidth,N=D===void 0?2:D,j=gF(i)?i:{},B=j.clipDot,H=B===void 0?!0:B,I=T*2+N;return ct.default.createElement(pe,{className:w},b||y?ct.default.createElement("defs",null,ct.default.createElement("clipPath",{id:"clipPath-".concat(P)},ct.default.createElement("rect",{x:b?f:f-p/2,y:y?u:u-h/2,width:b?p:p*2,height:y?h:h*2})),!H&&ct.default.createElement("clipPath",{id:"clipPath-dots-".concat(P)},ct.default.createElement("rect",{x:f-I/2,y:u-I/2,width:p+I,height:h+I}))):null,v?null:this.renderArea(S,P),(i||v)&&this.renderDots(S,H,P),(!m||g)&&ar.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}]),t}(ct.PureComponent);u$=ur;ho(ur,"displayName","Area");ho(ur,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!nr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ho(ur,"getBaseValue",function(e,t,r,n){var a=e.layout,o=e.baseValue,i=t.props.baseValue,s=i??o;if(Y(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),c=Math.min(u[0],u[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});ho(ur,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,p=t.layout,h=u&&u.length,m=u$.getBaseValue(t,r,n,a),x=p==="horizontal",g=!1,v=c.map(function(b,y){var S;h?S=u[f+y]:(S=lt(b,l),Array.isArray(S)?g=!0:S=[m,S]);var P=S[1]==null||h&<(b,l)==null;return x?{x:_L({axis:n,ticks:o,bandSize:s,entry:b,index:y}),y:P?null:a.scale(S[1]),value:S,payload:b}:{x:P?null:n.scale(S[1]),y:_L({axis:a,ticks:i,bandSize:s,entry:b,index:y}),value:S,payload:b}}),w;return h||g?w=v.map(function(b){var y=Array.isArray(b.value)?b.value[0]:null;return x?{x:b.x,y:y!=null&&b.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:b.y}}):w=x?a.scale(m):n.scale(m),Zi({points:v,baseLine:w,layout:p,isRange:g},d)});ho(ur,"renderDotItem",function(e,t){var r;if(ct.default.isValidElement(e))r=ct.default.cloneElement(e,t);else if((0,yb.default)(e))r=e(t);else{var n=ae("recharts-area-dot",typeof e!="boolean"?e.className:"");r=ct.default.createElement(Ji,kl({},t,{className:n}))}return r});var p$=R(G());function WA(){return WA=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function twe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function rwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k$(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?i:t&&t.length&&Y(a)&&Y(o)?t.slice(a,o+1):[]};function q$(e){return e==="number"?[0,"auto"]:void 0}var YA=function(t,r,n,a){var o=t.graphicalItems,i=t.tooltipAxis,s=Ob(r,t);return n<0||!o||!o.length||n>=s.length?null:o.reduce(function(l,u){var f,c=(f=u.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(i.dataKey&&!i.allowDuplicatedCategory){var p=c===void 0?s:c;d=Uu(p,i.dataKey,a)}else d=c&&c[n]||s[n];return d?[].concat(uf(l),[Ax(u,d)]):l},[])},T$=function(t,r,n,a){var o=a||{x:t.chartX,y:t.chartY},i=pwe(o,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=q3(i,s,u,l);if(f>=0&&u){var c=u[f]&&u[f].value,d=YA(t,r,f,c),p=mwe(n,s,f,o);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},hwe=function(t,r){var n=r.axes,a=r.graphicalItems,o=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=TL(f,o);return n.reduce(function(h,m){var x,g=m.props,v=g.type,w=g.dataKey,b=g.allowDataOverflow,y=g.allowDuplicatedCategory,S=g.scale,P=g.ticks,A=g.includeHidden,_=m.props[i];if(h[_])return h;var T=Ob(t.data,{graphicalItems:a.filter(function(F){return F.props[i]===_}),dataStartIndex:l,dataEndIndex:u}),D=T.length,N,j,B;S$(m.props.domain,b,v)&&(N=Lx(m.props.domain,null,b),p&&(v==="number"||S!=="auto")&&(B=Oc(T,w,"category")));var H=q$(v);if(!N||N.length===0){var I,C=(I=m.props.domain)!==null&&I!==void 0?I:H;if(w){if(N=Oc(T,w,v),v==="category"&&p){var L=oF(N);y&&L?(j=N,N=(0,Ab.default)(0,D)):y||(N=NL(C,N,m).reduce(function(F,q){return F.indexOf(q)>=0?F:[].concat(uf(F),[q])},[]))}else if(v==="category")y?N=N.filter(function(F){return F!==""&&!(0,of.default)(F)}):N=NL(C,N,m).reduce(function(F,q){return F.indexOf(q)>=0||q===""||(0,of.default)(q)?F:[].concat(uf(F),[q])},[]);else if(v==="number"){var O=V3(T,a.filter(function(F){return F.props[i]===_&&(A||!F.props.hide)}),w,o,f);O&&(N=O)}p&&(v==="number"||S!=="auto")&&(B=Oc(T,w,"category"))}else p?N=(0,Ab.default)(0,D):s&&s[_]&&s[_].hasStack&&v==="number"?N=d==="expand"?[0,1]:DL(s[_].stackGroups,l,u):N=EL(T,a.filter(function(F){return F.props[i]===_&&(A||!F.props.hide)}),v,f,!0);if(v==="number")N=xb(c,N,_,o,P),C&&(N=Lx(C,N,b));else if(v==="category"&&C){var E=C,k=N.every(function(F){return E.indexOf(F)>=0});k&&(N=E)}}return K(K({},h),{},me({},_,K(K({},m.props),{},{axisType:o,domain:N,categoricalDomain:B,duplicateDomain:j,originalDomain:(x=m.props.domain)!==null&&x!==void 0?x:H,isCategorical:p,layout:f})))},{})},vwe=function(t,r){var n=r.graphicalItems,a=r.Axis,o=r.axisType,i=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=Ob(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,h=TL(f,o),m=-1;return n.reduce(function(x,g){var v=g.props[i],w=q$("number");if(!x[v]){m++;var b;return h?b=(0,Ab.default)(0,p):s&&s[v]&&s[v].hasStack?(b=DL(s[v].stackGroups,l,u),b=xb(c,b,v,o)):(b=Lx(w,EL(d,n.filter(function(y){return y.props[i]===v&&!y.props.hide}),"number",f),a.defaultProps.allowDataOverflow),b=xb(c,b,v,o)),K(K({},x),{},me({},v,K(K({axisType:o},a.defaultProps),{},{hide:!0,orientation:(0,sf.default)(fwe,"".concat(o,".").concat(m%2),null),domain:b,originalDomain:w,isCategorical:h,layout:f})))}return x},{})},gwe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,o=r.AxisComp,i=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.children,c="".concat(a,"Id"),d=Ft(f,o),p={};return d&&d.length?p=hwe(t,{axes:d,graphicalItems:i,axisType:a,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):i&&i.length&&(p=vwe(t,{Axis:o,graphicalItems:i,axisType:a,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},ywe=function(t){var r=no(t),n=kn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,F$.default)(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:kc(r,n)}},R$=function(t){var r=t.children,n=t.defaultShowTooltip,a=Cr(r,Ll),o=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(i=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},xwe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Zn(r&&r.type);return n&&n.indexOf("Bar")>=0})},_$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},bwe=function(t,r){var n=t.props,a=t.graphicalItems,o=t.xAxisMap,i=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,f=n.height,c=n.children,d=n.margin||{},p=Cr(c,Ll),h=Cr(c,ao),m=Object.keys(l).reduce(function(y,S){var P=l[S],A=P.orientation;return!P.mirror&&!P.hide?K(K({},y),{},me({},A,y[A]+P.width)):y},{left:d.left||0,right:d.right||0}),x=Object.keys(i).reduce(function(y,S){var P=i[S],A=P.orientation;return!P.mirror&&!P.hide?K(K({},y),{},me({},A,(0,sf.default)(y,"".concat(A))+P.height)):y},{top:d.top||0,bottom:d.bottom||0}),g=K(K({},x),m),v=g.bottom;p&&(g.bottom+=p.props.height||Ll.defaultProps.height),h&&r&&(g=W3(g,a,n,r));var w=u-g.left-g.right,b=f-g.top-g.bottom;return K(K({brushBottom:v},g),{},{width:Math.max(w,0),height:Math.max(b,0)})},wwe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},cf=function(t){var r,n=t.chartName,a=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,u=t.axisComponents,f=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,p=function(x,g){var v=g.graphicalItems,w=g.stackGroups,b=g.offset,y=g.updateId,S=g.dataStartIndex,P=g.dataEndIndex,A=x.barSize,_=x.layout,T=x.barGap,D=x.barCategoryGap,N=x.maxBarSize,j=_$(_),B=j.numericAxisName,H=j.cateAxisName,I=xwe(v),C=[];return v.forEach(function(L,O){var E=Ob(x.data,{graphicalItems:[L],dataStartIndex:S,dataEndIndex:P}),k=L.props,F=k.dataKey,q=k.maxBarSize,$=L.props["".concat(B,"Id")],ee=L.props["".concat(H,"Id")],J={},W=u.reduce(function(Mn,Dn){var qO,va,at=g["".concat(Dn.axisType,"Map")],UO=L.props["".concat(Dn.axisType,"Id")];at&&at[UO]||Dn.axisType==="zAxis"||_a(!1);var HO=at[UO];return K(K({},Mn),{},me(me({},Dn.axisType,HO),"".concat(Dn.axisType,"Ticks"),kn(HO)))},J),ie=W[H],V=W["".concat(H,"Ticks")],re=w&&w[$]&&w[$].hasStack&&Y3(L,w[$].stackGroups),Q=Zn(L.type).indexOf("Bar")>=0,U=kc(ie,V),be=[],de=I&&U3({barSize:A,stackGroups:w,totalSize:wwe(W,H)});if(Q){var ze,Be,yt=(0,of.default)(q)?N:q,un=(ze=(Be=kc(ie,V,!0))!==null&&Be!==void 0?Be:yt)!==null&&ze!==void 0?ze:0;be=H3({barGap:T,barCategoryGap:D,bandSize:un!==U?un:U,sizeList:de[ee],maxBarSize:yt}),un!==U&&(be=be.map(function(Mn){return K(K({},Mn),{},{position:K(K({},Mn.position),{},{offset:Mn.position.offset-un/2})})}))}var pr=L&&L.type&&L.type.getComposedData;pr&&C.push({props:K(K({},pr(K(K({},W),{},{displayedData:E,props:x,dataKey:F,item:L,bandSize:U,barPosition:be,offset:b,stackedData:re,layout:_,dataStartIndex:S,dataEndIndex:P}))),{},me(me(me({key:L.key||"item-".concat(O)},B,W[B]),H,W[H]),"animationId",y)),childIndex:xF(L,x.children),item:L})}),C},h=function(x,g){var v=x.props,w=x.dataStartIndex,b=x.dataEndIndex,y=x.updateId;if(!QC({props:v}))return null;var S=v.children,P=v.layout,A=v.stackOffset,_=v.data,T=v.reverseStackOrder,D=_$(P),N=D.numericAxisName,j=D.cateAxisName,B=Ft(S,a),H=K3(_,B,"".concat(N,"Id"),"".concat(j,"Id"),A,T),I=u.reduce(function(k,F){var q="".concat(F.axisType,"Map");return K(K({},k),{},me({},q,gwe(v,K(K({},F),{},{graphicalItems:B,stackGroups:F.axisType===N&&H,dataStartIndex:w,dataEndIndex:b}))))},{}),C=bwe(K(K({},I),{},{props:v,graphicalItems:B}),g?.legendBBox);Object.keys(I).forEach(function(k){I[k]=c(v,I[k],C,k.replace("Map",""),n)});var L=I["".concat(j,"Map")],O=ywe(L),E=p(v,K(K({},I),{},{dataStartIndex:w,dataEndIndex:b,updateId:y,graphicalItems:B,stackGroups:H,offset:C}));return K(K({formattedGraphicalItems:E,graphicalItems:B,offset:C,stackGroups:H},O),I)};return r=function(m){iwe(x,m);function x(g){var v,w,b;return rwe(this,x),b=awe(this,x,[g]),me(ke(b),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),me(ke(b),"accessibilityManager",new w$),me(ke(b),"handleLegendBBoxUpdate",function(y){if(y){var S=b.state,P=S.dataStartIndex,A=S.dataEndIndex,_=S.updateId;b.setState(K({legendBBox:y},h({props:b.props,dataStartIndex:P,dataEndIndex:A,updateId:_},K(K({},b.state),{},{legendBBox:y}))))}}),me(ke(b),"handleReceiveSyncEvent",function(y,S,P){if(b.props.syncId===y){if(P===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(S)}}),me(ke(b),"handleBrushChange",function(y){var S=y.startIndex,P=y.endIndex;if(S!==b.state.dataStartIndex||P!==b.state.dataEndIndex){var A=b.state.updateId;b.setState(function(){return K({dataStartIndex:S,dataEndIndex:P},h({props:b.props,dataStartIndex:S,dataEndIndex:P,updateId:A},b.state))}),b.triggerSyncEvent({dataStartIndex:S,dataEndIndex:P})}}),me(ke(b),"handleMouseEnter",function(y){var S=b.getMouseInfo(y);if(S){var P=K(K({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var A=b.props.onMouseEnter;(0,Qo.default)(A)&&A(P,y)}}),me(ke(b),"triggeredAfterMouseMove",function(y){var S=b.getMouseInfo(y),P=S?K(K({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(P),b.triggerSyncEvent(P);var A=b.props.onMouseMove;(0,Qo.default)(A)&&A(P,y)}),me(ke(b),"handleItemMouseEnter",function(y){b.setState(function(){return{isTooltipActive:!0,activeItem:y,activePayload:y.tooltipPayload,activeCoordinate:y.tooltipPosition||{x:y.cx,y:y.cy}}})}),me(ke(b),"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),me(ke(b),"handleMouseMove",function(y){y.persist(),b.throttleTriggeredAfterMouseMove(y)}),me(ke(b),"handleMouseLeave",function(y){b.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};b.setState(S),b.triggerSyncEvent(S);var P=b.props.onMouseLeave;(0,Qo.default)(P)&&P(S,y)}),me(ke(b),"handleOuterEvent",function(y){var S=yF(y),P=(0,sf.default)(b.props,"".concat(S));if(S&&(0,Qo.default)(P)){var A,_;/.*touch.*/i.test(S)?_=b.getMouseInfo(y.changedTouches[0]):_=b.getMouseInfo(y),P((A=_)!==null&&A!==void 0?A:{},y)}}),me(ke(b),"handleClick",function(y){var S=b.getMouseInfo(y);if(S){var P=K(K({},S),{},{isTooltipActive:!0});b.setState(P),b.triggerSyncEvent(P);var A=b.props.onClick;(0,Qo.default)(A)&&A(P,y)}}),me(ke(b),"handleMouseDown",function(y){var S=b.props.onMouseDown;if((0,Qo.default)(S)){var P=b.getMouseInfo(y);S(P,y)}}),me(ke(b),"handleMouseUp",function(y){var S=b.props.onMouseUp;if((0,Qo.default)(S)){var P=b.getMouseInfo(y);S(P,y)}}),me(ke(b),"handleTouchMove",function(y){y.changedTouches!=null&&y.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(y.changedTouches[0])}),me(ke(b),"handleTouchStart",function(y){y.changedTouches!=null&&y.changedTouches.length>0&&b.handleMouseDown(y.changedTouches[0])}),me(ke(b),"handleTouchEnd",function(y){y.changedTouches!=null&&y.changedTouches.length>0&&b.handleMouseUp(y.changedTouches[0])}),me(ke(b),"triggerSyncEvent",function(y){b.props.syncId!==void 0&&wb.emit(Sb,b.props.syncId,y,b.eventEmitterSymbol)}),me(ke(b),"applySyncEvent",function(y){var S=b.props,P=S.layout,A=S.syncMethod,_=b.state.updateId,T=y.dataStartIndex,D=y.dataEndIndex;if(y.dataStartIndex!==void 0||y.dataEndIndex!==void 0)b.setState(K({dataStartIndex:T,dataEndIndex:D},h({props:b.props,dataStartIndex:T,dataEndIndex:D,updateId:_},b.state)));else if(y.activeTooltipIndex!==void 0){var N=y.chartX,j=y.chartY,B=y.activeTooltipIndex,H=b.state,I=H.offset,C=H.tooltipTicks;if(!I)return;if(typeof A=="function")B=A(C,y);else if(A==="value"){B=-1;for(var L=0;L=0){var re,Q;if(N.dataKey&&!N.allowDuplicatedCategory){var U=typeof N.dataKey=="function"?V:"payload.".concat(N.dataKey.toString());re=Uu(L,U,B),Q=O&&E&&Uu(E,U,B)}else re=L?.[j],Q=O&&E&&E[j];if(ee||$){var be=y.props.activeIndex!==void 0?y.props.activeIndex:j;return[(0,He.cloneElement)(y,K(K(K({},A.props),W),{},{activeIndex:be})),null,null]}if(!(0,of.default)(re))return[ie].concat(uf(b.renderActivePoints({item:A,activePoint:re,basePoint:Q,childIndex:j,isRange:O})))}else{var de,ze=(de=b.getItemByXY(b.state.activeCoordinate))!==null&&de!==void 0?de:{graphicalItem:ie},Be=ze.graphicalItem,yt=Be.item,un=yt===void 0?y:yt,pr=Be.childIndex,Mn=K(K(K({},A.props),W),{},{activeIndex:pr});return[(0,He.cloneElement)(un,Mn),null,null]}return O?[ie,null,null]:[ie,null]}),me(ke(b),"renderCustomized",function(y,S,P){return(0,He.cloneElement)(y,K(K({key:"recharts-customized-".concat(P)},b.props),b.state))}),me(ke(b),"renderMap",{CartesianGrid:{handler:Ib,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:Ib},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:Ib},YAxis:{handler:Ib},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((v=g.id)!==null&&v!==void 0?v:Qn("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=(0,B$.default)(b.triggeredAfterMouseMove,(w=g.throttleDelay)!==null&&w!==void 0?w:1e3/60),b.state={},b}return nwe(x,[{key:"componentDidMount",value:function(){var v,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(v=this.props.margin.left)!==null&&v!==void 0?v:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var v=this.props,w=v.children,b=v.data,y=v.height,S=v.layout,P=Cr(w,Cn);if(P){var A=P.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length)){var _=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,T=YA(this.state,b,A,_),D=this.state.tooltipTicks[A].coordinate,N=(this.state.offset.top+y)/2,j=S==="horizontal",B=j?{x:D,y:N}:{y:D,x:N},H=this.state.formattedGraphicalItems.find(function(C){var L=C.item;return L.type.name==="Scatter"});H&&(B=K(K({},B),H.props.points[A].tooltipPosition),T=H.props.points[A].tooltipPayload);var I={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:_,activePayload:T,activeCoordinate:B};this.setState(I),this.renderCursor(P),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(v,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==v.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==v.margin){var b,y;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(y=this.props.margin.top)!==null&&y!==void 0?y:0}})}return null}},{key:"componentDidUpdate",value:function(v){ay([Cr(v.children,Cn)],[Cr(this.props.children,Cn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var v=Cr(this.props.children,Cn);if(v&&typeof v.props.shared=="boolean"){var w=v.props.shared?"axis":"item";return l.indexOf(w)>=0?w:i}return i}},{key:"getMouseInfo",value:function(v){if(!this.container)return null;var w=this.container,b=w.getBoundingClientRect(),y=OH(b),S={chartX:Math.round(v.pageX-y.left),chartY:Math.round(v.pageY-y.top)},P=b.width/w.offsetWidth||1,A=this.inRange(S.chartX,S.chartY,P);if(!A)return null;var _=this.state,T=_.xAxisMap,D=_.yAxisMap,N=this.getTooltipEventType();if(N!=="axis"&&T&&D){var j=no(T).scale,B=no(D).scale,H=j&&j.invert?j.invert(S.chartX):null,I=B&&B.invert?B.invert(S.chartY):null;return K(K({},S),{},{xValue:H,yValue:I})}var C=T$(this.state,this.props.data,this.props.layout,A);return C?K(K({},S),C):null}},{key:"inRange",value:function(v,w){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=this.props.layout,S=v/b,P=w/b;if(y==="horizontal"||y==="vertical"){var A=this.state.offset,_=S>=A.left&&S<=A.left+A.width&&P>=A.top&&P<=A.top+A.height;return _?{x:S,y:P}:null}var T=this.state,D=T.angleAxisMap,N=T.radiusAxisMap;if(D&&N){var j=no(D);return BL({x:S,y:P},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var v=this.props.children,w=this.getTooltipEventType(),b=Cr(v,Cn),y={};b&&w==="axis"&&(b.props.trigger==="click"?y={onClick:this.handleClick}:y={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var S=Xs(this.props,this.handleOuterEvent);return K(K({},S),y)}},{key:"addListener",value:function(){wb.on(Sb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){wb.removeListener(Sb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(v,w,b){for(var y=this.state.formattedGraphicalItems,S=0,P=y.length;S{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("div",fe({ref:r,className:ve("rounded-lg border bg-card text-card-foreground shadow-sm",e)},t))});Ur.displayName="Card";var Hr=ln.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("div",fe({ref:r,className:ve("flex flex-col space-y-1.5 p-6",e)},t))});Hr.displayName="CardHeader";var Wr=ln.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("h3",fe({ref:r,className:ve("text-2xl font-semibold leading-none tracking-tight",e)},t))});Wr.displayName="CardTitle";var zr=ln.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("p",fe({ref:r,className:ve("text-sm text-muted-foreground",e)},t))});zr.displayName="CardDescription";var Vr=ln.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("div",fe({ref:r,className:ve("p-6 pt-0",e)},t))});Vr.displayName="CardContent";var El=ln.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return ln.createElement("div",fe({ref:r,className:ve("flex items-center p-6 pt-0",e)},t))});El.displayName="CardFooter";var Pe=R(G());var Cwe={light:"",dark:".dark"},U$=Pe.createContext(null);function H$(){let e=Pe.useContext(U$);if(!e)throw new Error("useChart must be used within a ");return e}var $r=Pe.forwardRef((i,o)=>{var s=i,{id:e,className:t,children:r,config:n}=s,a=Ie(s,["id","className","children","config"]);let l=Pe.useId(),u=`chart-${e||l.replace(/:/g,"")}`;return Pe.createElement(U$.Provider,{value:{config:n}},Pe.createElement("div",fe({"data-chart":u,ref:o,className:ve("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t)},a),Pe.createElement(Pwe,{id:u,config:n}),Pe.createElement(LI,null,r)))});$r.displayName="Chart";var Pwe=({id:e,config:t})=>{let r=Object.entries(t).filter(([n,a])=>a.theme||a.color);return r.length?Pe.createElement("style",{dangerouslySetInnerHTML:{__html:Object.entries(Cwe).map(([n,a])=>` +${a} [data-chart=${e}] { +${r.map(([o,i])=>{var l;let s=((l=i.theme)==null?void 0:l[n])||i.color;return s?` --color-${o}: ${s};`:null}).join(` +`)} +} +`).join(` +`)}}):null},ma=Cn,Rn=Pe.forwardRef(({active:e,payload:t,className:r,indicator:n="dot",hideLabel:a=!1,hideIndicator:o=!1,label:i,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:c,labelKey:d},p)=>{let{config:h}=H$(),m=Pe.useMemo(()=>{var y;if(a||!(t!=null&&t.length))return null;let[g]=t,v=`${d||g.dataKey||g.name||"value"}`,w=QA(h,g,v),b=!d&&typeof i=="string"?((y=h[i])==null?void 0:y.label)||i:w==null?void 0:w.label;return s?Pe.createElement("div",{className:ve("font-medium",l)},s(b,t)):b?Pe.createElement("div",{className:ve("font-medium",l)},b):null},[i,s,t,a,l,h,d]);if(!e||!(t!=null&&t.length))return null;let x=t.length===1&&n!=="dot";return Pe.createElement("div",{ref:p,className:ve("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r)},x?null:m,Pe.createElement("div",{className:"grid gap-1.5"},t.map((g,v)=>{let w=`${c||g.name||g.dataKey||"value"}`,b=QA(h,g,w),y=f||g.payload.fill||g.color;return Pe.createElement("div",{key:g.dataKey,className:ve("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",n==="dot"&&"items-center")},u&&(g==null?void 0:g.value)!==void 0&&g.name?u(g.value,g.name,g,v,g.payload):Pe.createElement(Pe.Fragment,null,b!=null&&b.icon?Pe.createElement(b.icon,null):!o&&Pe.createElement("div",{className:ve("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":x&&n==="dashed"}),style:{"--color-bg":y,"--color-border":y}}),Pe.createElement("div",{className:ve("flex flex-1 justify-between leading-none",x?"items-end":"items-center")},Pe.createElement("div",{className:"grid gap-1.5"},x?m:null,Pe.createElement("span",{className:"text-muted-foreground"},(b==null?void 0:b.label)||g.name)),g.value&&Pe.createElement("span",{className:"font-mono font-medium tabular-nums text-foreground"},g.value.toLocaleString()))))})))});Rn.displayName="ChartTooltip";var kb=ao,Gm=Pe.forwardRef(({className:e,hideIcon:t=!1,payload:r,verticalAlign:n="bottom",nameKey:a},o)=>{let{config:i}=H$();return r!=null&&r.length?Pe.createElement("div",{ref:o,className:ve("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",e)},r.map(s=>{let l=`${a||s.dataKey||"value"}`,u=QA(i,s,l);return Pe.createElement("div",{key:s.value,className:ve("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")},u!=null&&u.icon&&!t?Pe.createElement(u.icon,null):Pe.createElement("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),u==null?void 0:u.label)})):null});Gm.displayName="ChartLegend";function QA(e,t,r){if(typeof t!="object"||t===null)return;let n="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0,a=r;return r in t&&typeof t[r]=="string"?a=t[r]:n&&r in n&&typeof n[r]=="string"&&(a=n[r]),a in e?e[a]:e[r]}var We=R(G());var ne=R(G(),1),iO=R(Ti(),1);function ZA(e,[t,r]){return Math.min(r,Math.max(t,e))}var Eb=R(G(),1);function W$(e){let t=Eb.useRef({value:e,previous:e});return Eb.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var z$=R(G(),1);var V$=R(_t(),1),Iwe="VisuallyHidden",eO=z$.forwardRef((e,t)=>(0,V$.jsx)(xe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));eO.displayName=Iwe;var ce=R(_t(),1),Lwe=[" ","Enter","ArrowUp","ArrowDown"],Awe=[" ","Enter"],Xm="Select",[Rb,_b,Owe]=yu(Xm),[ff,JVe]=Xr(Xm,[Owe,No]),Mb=No(),[kwe,es]=ff(Xm),[Ewe,Twe]=ff(Xm),$$=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:d,required:p}=e,h=Mb(t),[m,x]=ne.useState(null),[g,v]=ne.useState(null),[w,b]=ne.useState(!1),y=xu(u),[S=!1,P]=So({prop:n,defaultProp:a,onChange:o}),[A,_]=So({prop:i,defaultProp:s,onChange:l}),T=ne.useRef(null),D=m?!!m.closest("form"):!0,[N,j]=ne.useState(new Set),B=Array.from(N).map(H=>H.props.value).join(";");return(0,ce.jsx)(js,{...h,children:(0,ce.jsxs)(kwe,{required:p,scope:t,trigger:m,onTriggerChange:x,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:tn(),value:A,onValueChange:_,open:S,onOpenChange:P,dir:y,triggerPointerDownPosRef:T,disabled:d,children:[(0,ce.jsx)(Rb.Provider,{scope:t,children:(0,ce.jsx)(Ewe,{scope:e.__scopeSelect,onNativeOptionAdd:ne.useCallback(H=>{j(I=>new Set(I).add(H))},[]),onNativeOptionRemove:ne.useCallback(H=>{j(I=>{let C=new Set(I);return C.delete(H),C})},[]),children:r})}),D?(0,ce.jsxs)(g8,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:c,value:A,onChange:H=>_(H.target.value),disabled:d,children:[A===void 0?(0,ce.jsx)("option",{value:""}):null,Array.from(N)]},B):null]})})};$$.displayName=Xm;var G$="SelectTrigger",K$=ne.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...a}=e,o=Mb(r),i=es(G$,r),s=i.disabled||n,l=Le(t,i.onTriggerChange),u=_b(r),[f,c,d]=y8(h=>{let m=u().filter(v=>!v.disabled),x=m.find(v=>v.value===i.value),g=x8(m,h,x);g!==void 0&&i.onValueChange(g.value)}),p=()=>{s||(i.onOpenChange(!0),d())};return(0,ce.jsx)(qs,{asChild:!0,...o,children:(0,ce.jsx)(xe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":v8(i.value)?"":void 0,...a,ref:l,onClick:le(a.onClick,h=>{h.currentTarget.focus()}),onPointerDown:le(a.onPointerDown,h=>{let m=h.target;m.hasPointerCapture(h.pointerId)&&m.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:le(a.onKeyDown,h=>{let m=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&c(h.key),!(m&&h.key===" ")&&Lwe.includes(h.key)&&(p(),h.preventDefault())})})})});K$.displayName=G$;var X$="SelectValue",Y$=ne.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:a,children:o,placeholder:i="",...s}=e,l=es(X$,r),{onValueNodeHasChildrenChange:u}=l,f=o!==void 0,c=Le(t,l.onValueNodeChange);return Ct(()=>{u(f)},[u,f]),(0,ce.jsx)(xe.span,{...s,ref:c,style:{pointerEvents:"none"},children:v8(l.value)?(0,ce.jsx)(ce.Fragment,{children:i}):o})});Y$.displayName=X$;var Rwe="SelectIcon",J$=ne.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...a}=e;return(0,ce.jsx)(xe.span,{"aria-hidden":!0,...a,ref:t,children:n||"\u25BC"})});J$.displayName=Rwe;var _we="SelectPortal",Q$=e=>(0,ce.jsx)(Us,{asChild:!0,...e});Q$.displayName=_we;var Tl="SelectContent",Z$=ne.forwardRef((e,t)=>{let r=es(Tl,e.__scopeSelect),[n,a]=ne.useState();if(Ct(()=>{a(new DocumentFragment)},[]),!r.open){let o=n;return o?iO.createPortal((0,ce.jsx)(e8,{scope:e.__scopeSelect,children:(0,ce.jsx)(Rb.Slot,{scope:e.__scopeSelect,children:(0,ce.jsx)("div",{children:e.children})})}),o):null}return(0,ce.jsx)(t8,{...e,ref:t})});Z$.displayName=Tl;var ei=10,[e8,ts]=ff(Tl),Mwe="SelectContentImpl",t8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x,...g}=e,v=es(Tl,r),[w,b]=ne.useState(null),[y,S]=ne.useState(null),P=Le(t,W=>b(W)),[A,_]=ne.useState(null),[T,D]=ne.useState(null),N=_b(r),[j,B]=ne.useState(!1),H=ne.useRef(!1);ne.useEffect(()=>{if(w)return Au(w)},[w]),bu();let I=ne.useCallback(W=>{let[ie,...V]=N().map(U=>U.ref.current),[re]=V.slice(-1),Q=document.activeElement;for(let U of W)if(U===Q||(U?.scrollIntoView({block:"nearest"}),U===ie&&y&&(y.scrollTop=0),U===re&&y&&(y.scrollTop=y.scrollHeight),U?.focus(),document.activeElement!==Q))return},[N,y]),C=ne.useCallback(()=>I([A,w]),[I,A,w]);ne.useEffect(()=>{j&&C()},[j,C]);let{onOpenChange:L,triggerPointerDownPosRef:O}=v;ne.useEffect(()=>{if(w){let W={x:0,y:0},ie=re=>{W={x:Math.abs(Math.round(re.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(re.pageY)-(O.current?.y??0))}},V=re=>{W.x<=10&&W.y<=10?re.preventDefault():w.contains(re.target)||L(!1),document.removeEventListener("pointermove",ie),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",V,{capture:!0})}}},[w,L,O]),ne.useEffect(()=>{let W=()=>L(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[L]);let[E,k]=y8(W=>{let ie=N().filter(Q=>!Q.disabled),V=ie.find(Q=>Q.ref.current===document.activeElement),re=x8(ie,W,V);re&&setTimeout(()=>re.ref.current.focus())}),F=ne.useCallback((W,ie,V)=>{let re=!H.current&&!V;(v.value!==void 0&&v.value===ie||re)&&(_(W),re&&(H.current=!0))},[v.value]),q=ne.useCallback(()=>w?.focus(),[w]),$=ne.useCallback((W,ie,V)=>{let re=!H.current&&!V;(v.value!==void 0&&v.value===ie||re)&&D(W)},[v.value]),ee=n==="popper"?tO:r8,J=ee===tO?{side:s,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x}:{};return(0,ce.jsx)(e8,{scope:r,content:w,viewport:y,onViewportChange:S,itemRefCallback:F,selectedItem:A,onItemLeave:q,itemTextRefCallback:$,focusSelectedItem:C,selectedItemText:T,position:n,isPositioned:j,searchRef:E,children:(0,ce.jsx)(Vs,{as:Kr,allowPinchZoom:!0,children:(0,ce.jsx)(Rs,{asChild:!0,trapped:v.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:le(a,W=>{v.trigger?.focus({preventScroll:!0}),W.preventDefault()}),children:(0,ce.jsx)(Ts,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,ce.jsx)(ee,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:W=>W.preventDefault(),...g,...J,onPlaced:()=>B(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:le(g.onKeyDown,W=>{let ie=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!ie&&W.key.length===1&&k(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let re=N().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(W.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){let Q=W.target,U=re.indexOf(Q);re=re.slice(U+1)}setTimeout(()=>I(re)),W.preventDefault()}})})})})})})});t8.displayName=Mwe;var Dwe="SelectItemAlignedPosition",r8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...a}=e,o=es(Tl,r),i=ts(Tl,r),[s,l]=ne.useState(null),[u,f]=ne.useState(null),c=Le(t,P=>f(P)),d=_b(r),p=ne.useRef(!1),h=ne.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:g,focusSelectedItem:v}=i,w=ne.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&u&&m&&x&&g){let P=o.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),_=o.valueNode.getBoundingClientRect(),T=g.getBoundingClientRect();if(o.dir!=="rtl"){let Q=T.left-A.left,U=_.left-Q,be=P.left-U,de=P.width+be,ze=Math.max(de,A.width),Be=window.innerWidth-ei,yt=ZA(U,[ei,Be-ze]);s.style.minWidth=de+"px",s.style.left=yt+"px"}else{let Q=A.right-T.right,U=window.innerWidth-_.right-Q,be=window.innerWidth-P.right-U,de=P.width+be,ze=Math.max(de,A.width),Be=window.innerWidth-ei,yt=ZA(U,[ei,Be-ze]);s.style.minWidth=de+"px",s.style.right=yt+"px"}let D=d(),N=window.innerHeight-ei*2,j=m.scrollHeight,B=window.getComputedStyle(u),H=parseInt(B.borderTopWidth,10),I=parseInt(B.paddingTop,10),C=parseInt(B.borderBottomWidth,10),L=parseInt(B.paddingBottom,10),O=H+I+j+L+C,E=Math.min(x.offsetHeight*5,O),k=window.getComputedStyle(m),F=parseInt(k.paddingTop,10),q=parseInt(k.paddingBottom,10),$=P.top+P.height/2-ei,ee=N-$,J=x.offsetHeight/2,W=x.offsetTop+J,ie=H+I+W,V=O-ie;if(ie<=$){let Q=x===D[D.length-1].ref.current;s.style.bottom="0px";let U=u.clientHeight-m.offsetTop-m.offsetHeight,be=Math.max(ee,J+(Q?q:0)+U+C),de=ie+be;s.style.height=de+"px"}else{let Q=x===D[0].ref.current;s.style.top="0px";let be=Math.max($,H+m.offsetTop+(Q?F:0)+J)+V;s.style.height=be+"px",m.scrollTop=ie-$+m.offsetTop}s.style.margin=`${ei}px 0`,s.style.minHeight=E+"px",s.style.maxHeight=N+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[d,o.trigger,o.valueNode,s,u,m,x,g,o.dir,n]);Ct(()=>w(),[w]);let[b,y]=ne.useState();Ct(()=>{u&&y(window.getComputedStyle(u).zIndex)},[u]);let S=ne.useCallback(P=>{P&&h.current===!0&&(w(),v?.(),h.current=!1)},[w,v]);return(0,ce.jsx)(Fwe,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,ce.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:(0,ce.jsx)(xe.div,{...a,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});r8.displayName=Dwe;var Nwe="SelectPopperPosition",tO=ne.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:a=ei,...o}=e,i=Mb(r);return(0,ce.jsx)(Pu,{...i,...o,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tO.displayName=Nwe;var[Fwe,sO]=ff(Tl,{}),rO="SelectViewport",n8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...a}=e,o=ts(rO,r),i=sO(rO,r),s=Le(t,o.onViewportChange),l=ne.useRef(0);return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,ce.jsx)(Rb.Slot,{scope:r,children:(0,ce.jsx)(xe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"auto",...a.style},onScroll:le(a.onScroll,u=>{let f=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=i;if(d?.current&&c){let p=Math.abs(l.current-f.scrollTop);if(p>0){let h=window.innerHeight-ei*2,m=parseFloat(c.style.minHeight),x=parseFloat(c.style.height),g=Math.max(m,x);if(g0?b:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});n8.displayName=rO;var a8="SelectGroup",[Bwe,jwe]=ff(a8),qwe=ne.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=tn();return(0,ce.jsx)(Bwe,{scope:r,id:a,children:(0,ce.jsx)(xe.div,{role:"group","aria-labelledby":a,...n,ref:t})})});qwe.displayName=a8;var o8="SelectLabel",i8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=jwe(o8,r);return(0,ce.jsx)(xe.div,{id:a.id,...n,ref:t})});i8.displayName=o8;var Tb="SelectItem",[Uwe,s8]=ff(Tb),l8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:a=!1,textValue:o,...i}=e,s=es(Tb,r),l=ts(Tb,r),u=s.value===n,[f,c]=ne.useState(o??""),[d,p]=ne.useState(!1),h=Le(t,g=>l.itemRefCallback?.(g,n,a)),m=tn(),x=()=>{a||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,ce.jsx)(Uwe,{scope:r,value:n,disabled:a,textId:m,isSelected:u,onItemTextChange:ne.useCallback(g=>{c(v=>v||(g?.textContent??"").trim())},[]),children:(0,ce.jsx)(Rb.ItemSlot,{scope:r,value:n,disabled:a,textValue:f,children:(0,ce.jsx)(xe.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:le(i.onFocus,()=>p(!0)),onBlur:le(i.onBlur,()=>p(!1)),onPointerUp:le(i.onPointerUp,x),onPointerMove:le(i.onPointerMove,g=>{a?l.onItemLeave?.():g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(i.onPointerLeave,g=>{g.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:le(i.onKeyDown,g=>{l.searchRef?.current!==""&&g.key===" "||(Awe.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});l8.displayName=Tb;var Km="SelectItemText",u8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:a,...o}=e,i=es(Km,r),s=ts(Km,r),l=s8(Km,r),u=Twe(Km,r),[f,c]=ne.useState(null),d=Le(t,g=>c(g),l.onItemTextChange,g=>s.itemTextRefCallback?.(g,l.value,l.disabled)),p=f?.textContent,h=ne.useMemo(()=>(0,ce.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return Ct(()=>(m(h),()=>x(h)),[m,x,h]),(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(xe.span,{id:l.textId,...o,ref:d}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?iO.createPortal(o.children,i.valueNode):null]})});u8.displayName=Km;var c8="SelectItemIndicator",f8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return s8(c8,r).isSelected?(0,ce.jsx)(xe.span,{"aria-hidden":!0,...n,ref:t}):null});f8.displayName=c8;var nO="SelectScrollUpButton",d8=ne.forwardRef((e,t)=>{let r=ts(nO,e.__scopeSelect),n=sO(nO,e.__scopeSelect),[a,o]=ne.useState(!1),i=Le(t,n.onScrollButtonChange);return Ct(()=>{if(r.viewport&&r.isPositioned){let l=function(){let f=u.scrollTop>0;o(f)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?(0,ce.jsx)(m8,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});d8.displayName=nO;var aO="SelectScrollDownButton",p8=ne.forwardRef((e,t)=>{let r=ts(aO,e.__scopeSelect),n=sO(aO,e.__scopeSelect),[a,o]=ne.useState(!1),i=Le(t,n.onScrollButtonChange);return Ct(()=>{if(r.viewport&&r.isPositioned){let l=function(){let f=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?(0,ce.jsx)(m8,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});p8.displayName=aO;var m8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...a}=e,o=ts("SelectScrollButton",r),i=ne.useRef(null),s=_b(r),l=ne.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return ne.useEffect(()=>()=>l(),[l]),Ct(()=>{s().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,ce.jsx)(xe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:le(a.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:le(a.onPointerMove,()=>{o.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:le(a.onPointerLeave,()=>{l()})})}),Hwe="SelectSeparator",h8=ne.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,ce.jsx)(xe.div,{"aria-hidden":!0,...n,ref:t})});h8.displayName=Hwe;var oO="SelectArrow",Wwe=ne.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=Mb(r),o=es(oO,r),i=ts(oO,r);return o.open&&i.position==="popper"?(0,ce.jsx)(Iu,{...a,...n,ref:t}):null});Wwe.displayName=oO;function v8(e){return e===""||e===void 0}var g8=ne.forwardRef((e,t)=>{let{value:r,...n}=e,a=ne.useRef(null),o=Le(t,a),i=W$(r);return ne.useEffect(()=>{let s=a.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&f){let c=new Event("change",{bubbles:!0});f.call(s,r),s.dispatchEvent(c)}},[i,r]),(0,ce.jsx)(eO,{asChild:!0,children:(0,ce.jsx)("select",{...n,ref:o,defaultValue:r})})});g8.displayName="BubbleSelect";function y8(e){let t=wt(e),r=ne.useRef(""),n=ne.useRef(0),a=ne.useCallback(i=>{let s=r.current+i;t(s),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),o=ne.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return ne.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,o]}function x8(e,t,r){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1,i=zwe(e,Math.max(o,0));a.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function zwe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var b8=$$,lO=K$,w8=Y$,S8=J$,C8=Q$,uO=Z$,P8=n8;var cO=i8,fO=l8,I8=u8,L8=f8,dO=d8,pO=p8,mO=h8;var rs=b8;var ns=w8,ti=We.forwardRef((a,n)=>{var o=a,{className:e,children:t}=o,r=Ie(o,["className","children"]);return We.createElement(lO,fe({ref:n,className:ve("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e)},r),t,We.createElement(S8,{asChild:!0},We.createElement(Bl,{className:"h-4 w-4 opacity-50"})))});ti.displayName=lO.displayName;var A8=We.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return We.createElement(dO,fe({ref:r,className:ve("flex cursor-default items-center justify-center py-1",e)},t),We.createElement(_f,{className:"h-4 w-4"}))});A8.displayName=dO.displayName;var O8=We.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return We.createElement(pO,fe({ref:r,className:ve("flex cursor-default items-center justify-center py-1",e)},t),We.createElement(Bl,{className:"h-4 w-4"}))});O8.displayName=pO.displayName;var ri=We.forwardRef((o,a)=>{var i=o,{className:e,children:t,position:r="popper"}=i,n=Ie(i,["className","children","position"]);return We.createElement(C8,null,We.createElement(uO,fe({ref:a,className:ve("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r},n),We.createElement(A8,null),We.createElement(P8,{className:ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),We.createElement(O8,null)))});ri.displayName=uO.displayName;var $we=We.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return We.createElement(cO,fe({ref:r,className:ve("py-1.5 pl-8 pr-2 text-sm font-semibold",e)},t))});$we.displayName=cO.displayName;var gt=We.forwardRef((a,n)=>{var o=a,{className:e,children:t}=o,r=Ie(o,["className","children"]);return We.createElement(fO,fe({ref:n,className:ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},r),We.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},We.createElement(L8,null,We.createElement(ps,{className:"h-4 w-4"}))),We.createElement(I8,null,t))});gt.displayName=fO.displayName;var Ym=We.forwardRef((n,r)=>{var a=n,{className:e}=a,t=Ie(a,["className"]);return We.createElement(mO,fe({ref:r,className:ve("-mx-1 my-1 h-px bg-muted",e)},t))});Ym.displayName=mO.displayName;var _8=R(G());var E8=R(G()),eh=R(G()),Gwe=E8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hO=Gwe.ReactCurrentDispatcher,Kwe=()=>(0,eh.useReducer)(()=>({}))[1],Xwe=e=>()=>{let t=`Hook "${e}" no possible to using inside useBetween scope.`;throw console.error(t),new Error(t)},gO=(e,t)=>Object.is(e,t),Jm=(e,t)=>!e||!t||e.length!==t.length||e.some((r,n)=>!gO(r,t[n])),Ywe=()=>typeof window>"u",k8=new Map,Qm=[],Db=0,df=[],os=[],Zm=()=>{},vO=Ywe(),Jwe,as=()=>{let e=Db++;return Qm[e]=Qm[e]||{}},T8={useState(e){let t=as(),r=Zm;return t.initialized||(t.state=typeof e=="function"?e():e,t.set=n=>{if(typeof n=="function")return t.set(n(t.state));gO(n,t.state)||(t.state=n,r())},t.initialized=!0),[t.state,t.set]},useReducer(e,t,r){let n=as(),a=Zm;return n.initialized||(n.state=r?r(t):t,n.dispatch=o=>{let i=e(n.state,o);gO(i,n.state)||(n.state=i,a())},n.initialized=!0),[n.state,n.dispatch]},useEffect(e,t){if(vO)return;let r=as();r.initialized?Jm(r.deps,t)&&(r.deps=t,df.push([r,t,e])):(r.deps=t,r.initialized=!0,df.push([r,t,e]))},useLayoutEffect(e,t){if(vO)return;let r=as();r.initialized?Jm(r.deps,t)&&(r.deps=t,os.push([r,t,e])):(r.deps=t,r.initialized=!0,os.push([r,t,e]))},useCallback(e,t){let r=as();return r.initialized?Jm(r.deps,t)&&(r.deps=t,r.fn=e):(r.fn=e,r.deps=t,r.initialized=!0),r.fn},useMemo(e,t){let r=as();return r.initialized?Jm(r.deps,t)&&(r.deps=t,r.state=e()):(r.deps=t,r.state=e(),r.initialized=!0),r.state},useRef(e){let t=as();return t.initialized||(t.state={current:e},t.initialized=!0),t.state},useImperativeHandle(e,t,r){if(vO)return;let n=as();n.initialized?Jm(n.deps,r)&&(n.deps=r,os.push([n,r,()=>{typeof e=="function"?e(t()):e.current=t()}])):(n.deps=r,n.initialized=!0,os.push([n,r,()=>{typeof e=="function"?e(t()):e.current=t()}]))}};["readContext","useContext","useDebugValue","useResponder","useDeferredValue","useTransition"].forEach(e=>T8[e]=Xwe(e));var Qwe=(e,t)=>{let r=[],n=[],a,o=[],i=!1;t&&t.mock&&(a=t.mock,i=!0);let s=()=>{n.slice().forEach(p=>p())},l=()=>{if(i)return;let p=hO.current,h=[Db,df,os,Qm,Zm],m=!1,x=!0;if(Db=0,df=[],os=[],Qm=r,Zm=()=>{x?m=!0:l()},hO.current=T8,a=e(Jwe),[os,df].forEach(g=>g.forEach(([v,w,b])=>{if(v.deps=w,v.unsub){let S=v.unsub;o=o.filter(P=>P!==S),S()}let y=b();typeof y=="function"?(o.push(y),v.unsub=y):v.unsub=null})),[Db,df,os,Qm,Zm]=h,hO.current=p,x=!1,!m){s();return}l()};return{init:()=>l(),get:()=>a,sub:p=>{n.indexOf(p)===-1&&n.push(p)},unsub:p=>{n=n.filter(h=>h!==p)},unsubs:()=>o,mock:p=>{i=!0,a=p,s()},unmock:()=>{i=!1,l()}}},Zwe=e=>{let t=k8.get(e);return t||(t=Qwe(e),k8.set(e,t),t.init()),t},R8=e=>{let t=Kwe(),r=Zwe(e);return r.sub(t),(0,eh.useEffect)(()=>(r.sub(t),()=>r.unsub(t)),[r,t]),r.get()};var e0e=()=>{let[e,t]=(0,_8.useState)("day");return{interval:e,setInterval:t}},pf=()=>R8(e0e);var t0e={visitors:{label:"Visitors"},total:{label:"Total",color:"hsl(var(--chart-1))"},unique:{label:"Unique",color:"hsl(var(--chart-2))"}};function M8({chartData:e,dateRange:t,pushEvent:r}){let{interval:n,setInterval:a}=pf(),o=i=>{a(i),r("set_interval",{value:{interval:i}})};return Me.createElement(Ur,null,Me.createElement(Hr,{className:"flex items-center gap-2 py-5 space-y-0 border-b sm:flex-row"},Me.createElement("div",{className:"grid flex-1 gap-1 text-center sm:text-left"},Me.createElement(Wr,null,"Total visits"),Me.createElement(zr,null,"Showing total visits for ",Ce(t.from,"dd LLL, y")," -"," ",Ce(t.to,"dd LLL, y"))),Me.createElement(rs,{value:n,onValueChange:o},Me.createElement(ti,{className:"w-[160px] rounded-lg sm:ml-auto","aria-label":"Select a value"},Me.createElement(ns,{placeholder:"Interval"})),Me.createElement(ri,{className:"rounded-xl"},Me.createElement(gt,{value:"hour",className:"rounded-lg"},"Per hour"),Me.createElement(gt,{value:"day",className:"rounded-lg"},"Per day"),Me.createElement(gt,{value:"month",className:"rounded-lg"},"Per month")))),Me.createElement(Vr,{className:"px-2 pt-4 sm:px-6 sm:pt-6"},Me.createElement($r,{config:t0e,className:"aspect-auto h-[250px] w-full"},Me.createElement($m,{data:e},Me.createElement("defs",null,Me.createElement("linearGradient",{id:"fillTotal",x1:"0",y1:"0",x2:"0",y2:"1"},Me.createElement("stop",{offset:"5%",stopColor:"var(--color-total)",stopOpacity:.8}),Me.createElement("stop",{offset:"95%",stopColor:"var(--color-total)",stopOpacity:.1})),Me.createElement("linearGradient",{id:"fillUnique",x1:"0",y1:"0",x2:"0",y2:"1"},Me.createElement("stop",{offset:"5%",stopColor:"var(--color-unique)",stopOpacity:.8}),Me.createElement("stop",{offset:"95%",stopColor:"var(--color-unique)",stopOpacity:.1}))),Me.createElement(pa,{vertical:!1}),Me.createElement(qt,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32,tickFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short"},n!=="month"&&{day:"numeric"}),n==="month"&&{year:"numeric"}))}),Me.createElement(ma,{cursor:!1,content:Me.createElement(Rn,{labelFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short",year:"numeric"},n!=="month"&&{day:"numeric"}),n==="hour"&&{hour:"numeric"})),indicator:"dashed"})}),Me.createElement(ur,{dataKey:"total",type:"natural",fill:"url(#fillTotal)",stroke:"var(--color-total)",stackId:"a"}),Me.createElement(ur,{dataKey:"unique",type:"natural",fill:"url(#fillUnique)",stroke:"var(--color-unique)",stackId:"b"}),Me.createElement(kb,{content:Me.createElement(Gm,null)})))))}var cr=R(G());var r0e={duration:{label:"Duration",color:"hsl(var(--chart-3))"},label:{color:"hsl(var(--foreground))"}};function D8({chartData:e,chartTitle:t,dateRange:r}){return cr.createElement(Ur,null,cr.createElement(Hr,null,cr.createElement(Wr,null,t),cr.createElement(zr,null,Ce(r.from,"dd LLL, y")," -"," ",Ce(r.to,"dd LLL, y"))),cr.createElement(Vr,{className:"flex-1 pb-0"},cr.createElement($r,{config:r0e,className:"mx-auto aspect-square max-h-[250px]"},cr.createElement(Zo,{accessibilityLayer:!0,data:e,layout:"vertical",margin:{right:16}},cr.createElement(pa,{horizontal:!1}),cr.createElement(Ba,{dataKey:"path",type:"category",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:n=>n.slice(0,3),hide:!0}),cr.createElement(qt,{dataKey:"duration",type:"number",hide:!0}),cr.createElement(ma,{cursor:!1,content:cr.createElement(Rn,{className:"w-[175px]",indicator:"line"})}),cr.createElement(sr,{dataKey:"duration",layout:"vertical",fill:"var(--color-duration)",radius:4},cr.createElement(ar,{dataKey:"path",position:"insideLeft",fill:"var(--color-label)",offset:8,fontSize:12}))))),cr.createElement(El,{className:"flex-col items-start gap-2 text-sm mt-2"},cr.createElement("div",{className:"leading-none text-muted-foreground"},"Request duration for ",t.toLowerCase())))}var fr=R(G());var n0e={visits:{label:"Visits"},desktop:{label:"Desktop",color:"hsl(var(--chart-1))"},tablet:{label:"Tablet",color:"hsl(var(--chart-2))"},mobile:{label:"Mobile",color:"hsl(var(--chart-3))"}};function N8({chartData:e,dateRange:t}){return e.forEach(r=>{r.fill=`var(--color-${r.device})`}),fr.createElement(Ur,{className:"flex flex-col"},fr.createElement(Hr,null,fr.createElement(Wr,null,"Device Usage"),fr.createElement(zr,null,Ce(t.from,"dd LLL, y")," -"," ",Ce(t.to,"dd LLL, y"))),fr.createElement(Vr,{className:"flex-1 pb-0"},fr.createElement($r,{config:n0e,className:"mx-auto aspect-square max-h-[250px]"},fr.createElement(JA,null,fr.createElement(ma,{cursor:!1,content:fr.createElement(Rn,{className:"w-[150px]",hideLabel:!0,indicator:"dashed"})}),fr.createElement(da,{data:e,dataKey:"visits",nameKey:"device",innerRadius:60,strokeWidth:5},fr.createElement(Ue,{content:({viewBox:r})=>{if(r&&"cx"in r&&"cy"in r)return fr.createElement("text",{x:r.cx,y:r.cy,textAnchor:"middle",dominantBaseline:"middle"},fr.createElement("tspan",{x:r.cx,y:r.cy,className:"fill-foreground text-3xl font-bold"},kh(e.reduce((n,a)=>n+a.visits,0),1)),fr.createElement("tspan",{x:r.cx,y:(r.cy||0)+24,className:"fill-muted-foreground"},"Visits"))}}))))),fr.createElement(El,{className:"flex-col items-start gap-2 text-sm mt-2"},fr.createElement("div",{className:"leading-none text-muted-foreground"},"Showing total visits split by device type")))}var we=R(G());var a0e={oks:{label:"200s",color:"hsl(var(--chart-5))"},redirs:{label:"300s",color:"hsl(var(--chart-4))"},errors:{label:"400s",color:"hsl(var(--chart-2))"},fails:{label:"500s",color:"hsl(var(--chart-1))"}};function F8({chartData:e,dateRange:t,pushEvent:r}){let{interval:n,setInterval:a}=pf(),o=i=>{a(i),r("set_interval",{value:{interval:i}})};return we.createElement(Ur,null,we.createElement(Hr,{className:"flex items-center gap-2 py-5 space-y-0 border-b sm:flex-row"},we.createElement("div",{className:"grid flex-1 gap-1 text-center sm:text-left"},we.createElement(Wr,null,"HTTP Statuses"),we.createElement(zr,null,"Showing HTTP statuses for the ",Ce(t.from,"dd LLL, y")," ","- ",Ce(t.to,"dd LLL, y"))),we.createElement(rs,{value:n,onValueChange:o},we.createElement(ti,{className:"w-[160px] rounded-lg sm:ml-auto","aria-label":"Select a value"},we.createElement(ns,{placeholder:"Interval"})),we.createElement(ri,{className:"rounded-xl"},we.createElement(gt,{value:"hour",className:"rounded-lg"},"Per hour"),we.createElement(gt,{value:"day",className:"rounded-lg"},"Per day"),we.createElement(gt,{value:"month",className:"rounded-lg"},"Per month")))),we.createElement(Vr,{className:"px-2 pt-4 sm:px-6 sm:pt-6"},we.createElement($r,{config:a0e,className:"aspect-auto h-[250px] w-full"},we.createElement($m,{data:e},we.createElement("defs",null,we.createElement("linearGradient",{id:"fillOks",x1:"0",y1:"0",x2:"0",y2:"1"},we.createElement("stop",{offset:"5%",stopColor:"var(--color-oks)",stopOpacity:.8}),we.createElement("stop",{offset:"95%",stopColor:"var(--color-oks)",stopOpacity:.1})),we.createElement("linearGradient",{id:"fillRedirs",x1:"0",y1:"0",x2:"0",y2:"1"},we.createElement("stop",{offset:"5%",stopColor:"var(--color-redirs)",stopOpacity:.8}),we.createElement("stop",{offset:"95%",stopColor:"var(--color-redirs)",stopOpacity:.1})),we.createElement("linearGradient",{id:"fillErrors",x1:"0",y1:"0",x2:"0",y2:"1"},we.createElement("stop",{offset:"5%",stopColor:"var(--color-errors)",stopOpacity:.8}),we.createElement("stop",{offset:"95%",stopColor:"var(--color-errors)",stopOpacity:.1})),we.createElement("linearGradient",{id:"fillFails",x1:"0",y1:"0",x2:"0",y2:"1"},we.createElement("stop",{offset:"5%",stopColor:"var(--color-fails)",stopOpacity:.8}),we.createElement("stop",{offset:"95%",stopColor:"var(--color-fails)",stopOpacity:.1}))),we.createElement(pa,{vertical:!1}),we.createElement(qt,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32,tickFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short"},n!=="month"&&{day:"numeric"}),n==="month"&&{year:"numeric"}))}),we.createElement(ma,{cursor:!1,content:we.createElement(Rn,{labelFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short",year:"numeric"},n!=="month"&&{day:"numeric"}),n==="hour"&&{hour:"numeric"})),indicator:"dashed"})}),we.createElement(ur,{dataKey:"oks",type:"natural",fill:"url(#fillOks)",stroke:"var(--color-oks)",stackId:"a"}),we.createElement(ur,{dataKey:"redirs",type:"natural",fill:"url(#fillRedirs)",stroke:"var(--color-redirs)",stackId:"b"}),we.createElement(ur,{dataKey:"errors",type:"natural",fill:"url(#fillErrors)",stroke:"var(--color-errors)",stackId:"c"}),we.createElement(ur,{dataKey:"fails",type:"natural",fill:"url(#fillFails)",stroke:"var(--color-fails)",stackId:"d"}),we.createElement(kb,{content:we.createElement(Gm,null)})))))}var dr=R(G());var o0e={visits:{label:"Visits",color:"hsl(var(--chart-3))"},label:{color:"hsl(var(--foreground))"}};function B8({chartData:e,chartTitle:t,dateRange:r}){return dr.createElement(Ur,null,dr.createElement(Hr,null,dr.createElement(Wr,null,t),dr.createElement(zr,null,Ce(r.from,"dd LLL, y")," -"," ",Ce(r.to,"dd LLL, y"))),dr.createElement(Vr,{className:"flex-1 pb-0"},dr.createElement($r,{config:o0e,className:"mx-auto aspect-square max-h-[250px]"},dr.createElement(Zo,{accessibilityLayer:!0,data:e,layout:"vertical",margin:{right:16}},dr.createElement(pa,{horizontal:!1}),dr.createElement(Ba,{dataKey:"source",type:"category",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:n=>n.slice(0,3),hide:!0}),dr.createElement(qt,{dataKey:"visits",type:"number",hide:!0}),dr.createElement(ma,{cursor:!1,content:dr.createElement(Rn,{className:"w-[200px]",indicator:"line"})}),dr.createElement(sr,{dataKey:"visits",layout:"vertical",fill:"var(--color-visits)",radius:4},dr.createElement(ar,{dataKey:"source",position:"insideLeft",fill:"var(--color-label)",offset:8,fontSize:12}))))),dr.createElement(El,{className:"flex-col items-start gap-2 text-sm mt-2"},dr.createElement("div",{className:"leading-none text-muted-foreground"},"Showing total visits for ",t.toLowerCase())))}var Fe=R(G());var jb=R(G());var X=R(_t()),Ee=R(G());var he=function(){return he=Object.assign||function(t){for(var r,n=1,a=arguments.length;n1&&(l||!u),c=t>1&&(u||!l),d=function(){n&&o(n)},p=function(){a&&o(a)};return(0,X.jsx)(B0e,{displayMonth:e.displayMonth,hideNext:f,hidePrevious:c,nextMonth:a,previousMonth:n,onPreviousClick:d,onNextClick:p})}function j0e(e){var t,r=Qe(),n=r.classNames,a=r.disableNavigation,o=r.styles,i=r.captionLayout,s=r.components,l=(t=s?.CaptionLabel)!==null&&t!==void 0?t:V8,u;return a?u=(0,X.jsx)(l,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?u=(0,X.jsx)(j8,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?u=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(j8,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,X.jsx)(q8,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,X.jsx)(q8,{displayMonth:e.displayMonth,id:e.id})]}),(0,X.jsx)("div",{className:n.caption,style:o.caption,children:u})}function q0e(e){var t=Qe(),r=t.footer,n=t.styles,a=t.classNames.tfoot;return r?(0,X.jsx)("tfoot",{className:a,style:n.tfoot,children:(0,X.jsx)("tr",{children:(0,X.jsx)("td",{colSpan:8,children:r})})}):(0,X.jsx)(X.Fragment,{})}function U0e(e,t,r){for(var n=r?Oa(new Date):wr(new Date,{locale:e,weekStartsOn:t}),a=[],o=0;o<7;o++){var i=Xe(n,o);a.push(i)}return a}function H0e(){var e=Qe(),t=e.classNames,r=e.styles,n=e.showWeekNumber,a=e.locale,o=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=U0e(a,o,i);return(0,X.jsxs)("tr",{style:r.head_row,className:t.head_row,children:[n&&(0,X.jsx)("td",{style:r.head_cell,className:t.head_cell}),u.map(function(f,c){return(0,X.jsx)("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":l(f,{locale:a}),children:s(f,{locale:a})},c)})]})}function W0e(){var e,t=Qe(),r=t.classNames,n=t.styles,a=t.components,o=(e=a?.HeadRow)!==null&&e!==void 0?e:H0e;return(0,X.jsx)("thead",{style:n.head,className:r.head,children:(0,X.jsx)(o,{})})}function z0e(e){var t=Qe(),r=t.locale,n=t.formatters.formatDay;return(0,X.jsx)(X.Fragment,{children:n(e.date,{locale:r})})}var SO=(0,Ee.createContext)(void 0);function V0e(e){if(!th(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return(0,X.jsx)(SO.Provider,{value:t,children:e.children})}return(0,X.jsx)($0e,{initialProps:e.initialProps,children:e.children})}function $0e(e){var t=e.initialProps,r=e.children,n=t.selected,a=t.min,o=t.max,i=function(u,f,c){var d,p;(d=t.onDayClick)===null||d===void 0||d.call(t,u,f,c);var h=!!(f.selected&&a&&n?.length===a);if(!h){var m=!!(!f.selected&&o&&n?.length===o);if(!m){var x=n?W8([],n,!0):[];if(f.selected){var g=x.findIndex(function(v){return Mr(u,v)});x.splice(g,1)}else x.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,x,u,f,c)}}},s={disabled:[]};n&&s.disabled.push(function(u){var f=o&&n.length>o-1,c=n.some(function(d){return Mr(d,u)});return!!(f&&!c)});var l={selected:n,onDayClick:i,modifiers:s};return(0,X.jsx)(SO.Provider,{value:l,children:r})}function CO(){var e=(0,Ee.useContext)(SO);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function G0e(e,t){var r=t||{},n=r.from,a=r.to;return n&&a?Mr(a,e)&&Mr(n,e)?void 0:Mr(a,e)?{from:a,to:void 0}:Mr(n,e)?void 0:_g(n,e)?{from:e,to:a}:{from:n,to:e}:a?_g(e,a)?{from:a,to:e}:{from:e,to:a}:n?TC(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var PO=(0,Ee.createContext)(void 0);function K0e(e){if(!rh(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return(0,X.jsx)(PO.Provider,{value:t,children:e.children})}return(0,X.jsx)(X0e,{initialProps:e.initialProps,children:e.children})}function X0e(e){var t=e.initialProps,r=e.children,n=t.selected,a=n||{},o=a.from,i=a.to,s=t.min,l=t.max,u=function(p,h,m){var x,g;(x=t.onDayClick)===null||x===void 0||x.call(t,p,h,m);var v=G0e(p,n);(g=t.onSelect)===null||g===void 0||g.call(t,v,p,h,m)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(f.range_start=[o],i?(f.range_end=[i],Mr(o,i)||(f.range_middle=[{after:o,before:i}])):f.range_end=[o]):i&&(f.range_start=[i],f.range_end=[i]),s&&(o&&!i&&f.disabled.push({after:Dg(o,s-1),before:Xe(o,s-1)}),o&&i&&f.disabled.push({after:o,before:Xe(o,s-1)}),!o&&i&&f.disabled.push({after:Dg(i,s-1),before:Xe(i,s-1)})),l){if(o&&!i&&(f.disabled.push({before:Xe(o,-l+1)}),f.disabled.push({after:Xe(o,l-1)})),o&&i){var c=Xn(i,o)+1,d=l-c;f.disabled.push({before:Dg(o,d)}),f.disabled.push({after:Xe(i,d)})}!o&&i&&(f.disabled.push({before:Xe(i,-l+1)}),f.disabled.push({after:Xe(i,l-1)}))}return(0,X.jsx)(PO.Provider,{value:{selected:n,onDayClick:u,modifiers:f},children:r})}function IO(){var e=(0,Ee.useContext)(PO);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Nb(e){return Array.isArray(e)?W8([],e,!0):e!==void 0?[e]:[]}function Y0e(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],a=r[1];t[n]=Nb(a)}),t}var ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(ja||(ja={}));var J0e=ja.Selected,ni=ja.Disabled,Q0e=ja.Hidden,Z0e=ja.Today,yO=ja.RangeEnd,xO=ja.RangeMiddle,bO=ja.RangeStart,eSe=ja.Outside;function tSe(e,t,r){var n,a=(n={},n[J0e]=Nb(e.selected),n[ni]=Nb(e.disabled),n[Q0e]=Nb(e.hidden),n[Z0e]=[e.today],n[yO]=[],n[xO]=[],n[bO]=[],n[eSe]=[],n);return e.fromDate&&a[ni].push({before:e.fromDate}),e.toDate&&a[ni].push({after:e.toDate}),th(e)?a[ni]=a[ni].concat(t.modifiers[ni]):rh(e)&&(a[ni]=a[ni].concat(r.modifiers[ni]),a[bO]=r.modifiers[bO],a[xO]=r.modifiers[xO],a[yO]=r.modifiers[yO]),a}var K8=(0,Ee.createContext)(void 0);function rSe(e){var t=Qe(),r=CO(),n=IO(),a=tSe(t,r,n),o=Y0e(t.modifiers),i=he(he({},a),o);return(0,X.jsx)(K8.Provider,{value:i,children:e.children})}function X8(){var e=(0,Ee.useContext)(K8);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function nSe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function aSe(e){return!!(e&&typeof e=="object"&&"from"in e)}function oSe(e){return!!(e&&typeof e=="object"&&"after"in e)}function iSe(e){return!!(e&&typeof e=="object"&&"before"in e)}function sSe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function lSe(e,t){var r,n=t.from,a=t.to;if(n&&a){var o=Xn(a,n)<0;o&&(r=[a,n],n=r[0],a=r[1]);var i=Xn(e,n)>=0&&Xn(a,e)>=0;return i}return a?Mr(a,e):n?Mr(n,e):!1}function uSe(e){return $d(e)}function cSe(e){return Array.isArray(e)&&e.every($d)}function fSe(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(uSe(r))return Mr(e,r);if(cSe(r))return r.includes(e);if(aSe(r))return lSe(e,r);if(sSe(r))return r.dayOfWeek.includes(e.getDay());if(nSe(r)){var n=Xn(r.before,e),a=Xn(r.after,e),o=n>0,i=a<0,s=_g(r.before,r.after);return s?i&&o:o||i}return oSe(r)?Xn(e,r.after)>0:iSe(r)?Xn(r.before,e)>0:typeof r=="function"?r(e):!1})}function LO(e,t,r){var n=Object.keys(t).reduce(function(o,i){var s=t[i];return fSe(e,s)&&o.push(i),o},[]),a={};return n.forEach(function(o){return a[o]=!0}),r&&!Mg(e,r)&&(a.outside=!0),a}function dSe(e,t){for(var r=Sr(e[0]),n=Ag(e[e.length-1]),a,o,i=r;i<=n;){var s=LO(i,t),l=!s.disabled&&!s.hidden;if(!l){i=Xe(i,1);continue}if(s.selected)return i;s.today&&!o&&(o=i),a||(a=i),i=Xe(i,1)}return o||a}var pSe=365;function Y8(e,t){var r=t.moveBy,n=t.direction,a=t.context,o=t.modifiers,i=t.retry,s=i===void 0?{count:0,lastFocused:e}:i,l=a.weekStartsOn,u=a.fromDate,f=a.toDate,c=a.locale,d={day:Xe,week:Lg,month:xn,year:HD,startOfWeek:function(x){return a.ISOWeek?Oa(x):wr(x,{locale:c,weekStartsOn:l})},endOfWeek:function(x){return a.ISOWeek?kC(x):Gd(x,{locale:c,weekStartsOn:l})}},p=d[r](e,n==="after"?1:-1);n==="before"&&u?p=WD([u,p]):n==="after"&&f&&(p=zD([f,p]));var h=!0;if(o){var m=LO(p,o);h=!m.disabled&&!m.hidden}return h?p:s.count>pSe?s.lastFocused:Y8(p,{moveBy:r,direction:n,context:a,modifiers:o,retry:he(he({},s),{count:s.count+1})})}var J8=(0,Ee.createContext)(void 0);function mSe(e){var t=nh(),r=X8(),n=(0,Ee.useState)(),a=n[0],o=n[1],i=(0,Ee.useState)(),s=i[0],l=i[1],u=dSe(t.displayMonths,r),f=a??(s&&t.isDateDisplayed(s))?s:u,c=function(){l(a),o(void 0)},d=function(x){o(x)},p=Qe(),h=function(x,g){if(a){var v=Y8(a,{moveBy:x,direction:g,context:p,modifiers:r});Mr(a,v)||(t.goToDate(v,a),d(v))}},m={focusedDay:a,focusTarget:f,blur:c,focus:d,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}};return(0,X.jsx)(J8.Provider,{value:m,children:e.children})}function AO(){var e=(0,Ee.useContext)(J8);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function hSe(e,t){var r=X8(),n=LO(e,r,t);return n}var OO=(0,Ee.createContext)(void 0);function vSe(e){if(!Bb(e.initialProps)){var t={selected:void 0};return(0,X.jsx)(OO.Provider,{value:t,children:e.children})}return(0,X.jsx)(gSe,{initialProps:e.initialProps,children:e.children})}function gSe(e){var t=e.initialProps,r=e.children,n=function(o,i,s){var l,u,f;if((l=t.onDayClick)===null||l===void 0||l.call(t,o,i,s),i.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,o,i,s);return}(f=t.onSelect)===null||f===void 0||f.call(t,o,o,i,s)},a={selected:t.selected,onDayClick:n};return(0,X.jsx)(OO.Provider,{value:a,children:r})}function Q8(){var e=(0,Ee.useContext)(OO);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function ySe(e,t){var r=Qe(),n=Q8(),a=CO(),o=IO(),i=AO(),s=i.focusDayAfter,l=i.focusDayBefore,u=i.focusWeekAfter,f=i.focusWeekBefore,c=i.blur,d=i.focus,p=i.focusMonthBefore,h=i.focusMonthAfter,m=i.focusYearBefore,x=i.focusYearAfter,g=i.focusStartOfWeek,v=i.focusEndOfWeek,w=function(C){var L,O,E,k;Bb(r)?(L=n.onDayClick)===null||L===void 0||L.call(n,e,t,C):th(r)?(O=a.onDayClick)===null||O===void 0||O.call(a,e,t,C):rh(r)?(E=o.onDayClick)===null||E===void 0||E.call(o,e,t,C):(k=r.onDayClick)===null||k===void 0||k.call(r,e,t,C)},b=function(C){var L;d(e),(L=r.onDayFocus)===null||L===void 0||L.call(r,e,t,C)},y=function(C){var L;c(),(L=r.onDayBlur)===null||L===void 0||L.call(r,e,t,C)},S=function(C){var L;(L=r.onDayMouseEnter)===null||L===void 0||L.call(r,e,t,C)},P=function(C){var L;(L=r.onDayMouseLeave)===null||L===void 0||L.call(r,e,t,C)},A=function(C){var L;(L=r.onDayPointerEnter)===null||L===void 0||L.call(r,e,t,C)},_=function(C){var L;(L=r.onDayPointerLeave)===null||L===void 0||L.call(r,e,t,C)},T=function(C){var L;(L=r.onDayTouchCancel)===null||L===void 0||L.call(r,e,t,C)},D=function(C){var L;(L=r.onDayTouchEnd)===null||L===void 0||L.call(r,e,t,C)},N=function(C){var L;(L=r.onDayTouchMove)===null||L===void 0||L.call(r,e,t,C)},j=function(C){var L;(L=r.onDayTouchStart)===null||L===void 0||L.call(r,e,t,C)},B=function(C){var L;(L=r.onDayKeyUp)===null||L===void 0||L.call(r,e,t,C)},H=function(C){var L;switch(C.key){case"ArrowLeft":C.preventDefault(),C.stopPropagation(),r.dir==="rtl"?s():l();break;case"ArrowRight":C.preventDefault(),C.stopPropagation(),r.dir==="rtl"?l():s();break;case"ArrowDown":C.preventDefault(),C.stopPropagation(),u();break;case"ArrowUp":C.preventDefault(),C.stopPropagation(),f();break;case"PageUp":C.preventDefault(),C.stopPropagation(),C.shiftKey?m():p();break;case"PageDown":C.preventDefault(),C.stopPropagation(),C.shiftKey?x():h();break;case"Home":C.preventDefault(),C.stopPropagation(),g();break;case"End":C.preventDefault(),C.stopPropagation(),v();break}(L=r.onDayKeyDown)===null||L===void 0||L.call(r,e,t,C)},I={onClick:w,onFocus:b,onBlur:y,onKeyDown:H,onKeyUp:B,onMouseEnter:S,onMouseLeave:P,onPointerEnter:A,onPointerLeave:_,onTouchCancel:T,onTouchEnd:D,onTouchMove:N,onTouchStart:j};return I}function xSe(){var e=Qe(),t=Q8(),r=CO(),n=IO(),a=Bb(e)?t.selected:th(e)?r.selected:rh(e)?n.selected:void 0;return a}function bSe(e){return Object.values(ja).includes(e)}function wSe(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var a=e.modifiersClassNames[n];if(a)r.push(a);else if(bSe(n)){var o=e.classNames["day_".concat(n)];o&&r.push(o)}}),r}function SSe(e,t){var r=he({},e.styles.day);return Object.keys(t).forEach(function(n){var a;r=he(he({},r),(a=e.modifiersStyles)===null||a===void 0?void 0:a[n])}),r}function CSe(e,t,r){var n,a,o,i=Qe(),s=AO(),l=hSe(e,t),u=ySe(e,l),f=xSe(),c=!!(i.onDayClick||i.mode!=="default");(0,Ee.useEffect)(function(){var S;l.outside||s.focusedDay&&c&&Mr(s.focusedDay,e)&&((S=r.current)===null||S===void 0||S.focus())},[s.focusedDay,e,r,c,l.outside]);var d=wSe(i,l).join(" "),p=SSe(i,l),h=!!(l.outside&&!i.showOutsideDays||l.hidden),m=(o=(a=i.components)===null||a===void 0?void 0:a.DayContent)!==null&&o!==void 0?o:z0e,x=(0,X.jsx)(m,{date:e,displayMonth:t,activeModifiers:l}),g={style:p,className:d,children:x,role:"gridcell"},v=s.focusTarget&&Mr(s.focusTarget,e)&&!l.outside,w=s.focusedDay&&Mr(s.focusedDay,e),b=he(he(he({},g),(n={disabled:l.disabled,role:"gridcell"},n["aria-selected"]=l.selected,n.tabIndex=w||v?0:-1,n)),u),y={isButton:c,isHidden:h,activeModifiers:l,selectedDays:f,buttonProps:b,divProps:g};return y}function PSe(e){var t=(0,Ee.useRef)(null),r=CSe(e.date,e.displayMonth,t);return r.isHidden?(0,X.jsx)("div",{role:"gridcell"}):r.isButton?(0,X.jsx)(Fb,he({name:"day",ref:t},r.buttonProps)):(0,X.jsx)("div",he({},r.divProps))}function ISe(e){var t=e.number,r=e.dates,n=Qe(),a=n.onWeekNumberClick,o=n.styles,i=n.classNames,s=n.locale,l=n.labels.labelWeekNumber,u=n.formatters.formatWeekNumber,f=u(Number(t),{locale:s});if(!a)return(0,X.jsx)("span",{className:i.weeknumber,style:o.weeknumber,children:f});var c=l(Number(t),{locale:s}),d=function(p){a(t,r,p)};return(0,X.jsx)(Fb,{name:"week-number","aria-label":c,className:i.weeknumber,style:o.weeknumber,onClick:d,children:f})}function LSe(e){var t,r,n=Qe(),a=n.styles,o=n.classNames,i=n.showWeekNumber,s=n.components,l=(t=s?.Day)!==null&&t!==void 0?t:PSe,u=(r=s?.WeekNumber)!==null&&r!==void 0?r:ISe,f;return i&&(f=(0,X.jsx)("td",{className:o.cell,style:a.cell,children:(0,X.jsx)(u,{number:e.weekNumber,dates:e.dates})})),(0,X.jsxs)("tr",{className:o.row,style:a.row,children:[f,e.dates.map(function(c){return(0,X.jsx)("td",{className:o.cell,style:a.cell,role:"presentation",children:(0,X.jsx)(l,{displayMonth:e.displayMonth,date:c})},cN(c))})]})}function U8(e,t,r){for(var n=r?.ISOWeek?kC(t):Gd(t,r),a=r?.ISOWeek?Oa(e):wr(e,r),o=Xn(n,a),i=[],s=0;s<=o;s++)i.push(Xe(a,s));var l=i.reduce(function(u,f){var c=r?.ISOWeek?Eg(f):Rg(f,r),d=u.find(function(p){return p.weekNumber===c});return d?(d.dates.push(f),u):(u.push({weekNumber:c,dates:[f]}),u)},[]);return l}function ASe(e,t){var r=U8(Sr(e),Ag(e),t);if(t?.useFixedWeeks){var n=dN(e,t);if(n<6){var a=r[r.length-1],o=a.dates[a.dates.length-1],i=Lg(o,6-n),s=U8(Lg(o,1),i,t);r.push.apply(r,s)}}return r}function OSe(e){var t,r,n,a=Qe(),o=a.locale,i=a.classNames,s=a.styles,l=a.hideHead,u=a.fixedWeeks,f=a.components,c=a.weekStartsOn,d=a.firstWeekContainsDate,p=a.ISOWeek,h=ASe(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:o,weekStartsOn:c,firstWeekContainsDate:d}),m=(t=f?.Head)!==null&&t!==void 0?t:W0e,x=(r=f?.Row)!==null&&r!==void 0?r:LSe,g=(n=f?.Footer)!==null&&n!==void 0?n:q0e;return(0,X.jsxs)("table",{id:e.id,className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&(0,X.jsx)(m,{}),(0,X.jsx)("tbody",{className:i.tbody,style:s.tbody,children:h.map(function(v){return(0,X.jsx)(x,{displayMonth:e.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),(0,X.jsx)(g,{displayMonth:e.displayMonth})]})}function kSe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var ESe=kSe()?Ee.useLayoutEffect:Ee.useEffect,wO=!1,TSe=0;function H8(){return"react-day-picker-".concat(++TSe)}function RSe(e){var t,r=e??(wO?H8():null),n=(0,Ee.useState)(r),a=n[0],o=n[1];return ESe(function(){a===null&&o(H8())},[]),(0,Ee.useEffect)(function(){wO===!1&&(wO=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function _Se(e){var t,r,n=Qe(),a=n.dir,o=n.classNames,i=n.styles,s=n.components,l=nh().displayMonths,u=RSe(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),f=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,c=[o.month],d=i.month,p=e.displayIndex===0,h=e.displayIndex===l.length-1,m=!p&&!h;a==="rtl"&&(t=[p,h],h=t[0],p=t[1]),p&&(c.push(o.caption_start),d=he(he({},d),i.caption_start)),h&&(c.push(o.caption_end),d=he(he({},d),i.caption_end)),m&&(c.push(o.caption_between),d=he(he({},d),i.caption_between));var x=(r=s?.Caption)!==null&&r!==void 0?r:j0e;return(0,X.jsxs)("div",{className:c.join(" "),style:d,children:[(0,X.jsx)(x,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,X.jsx)(OSe,{id:f,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function MSe(e){var t=Qe(),r=t.classNames,n=t.styles;return(0,X.jsx)("div",{className:r.months,style:n.months,children:e.children})}function DSe(e){var t,r,n=e.initialProps,a=Qe(),o=AO(),i=nh(),s=(0,Ee.useState)(!1),l=s[0],u=s[1];(0,Ee.useEffect)(function(){a.initialFocus&&o.focusTarget&&(l||(o.focus(o.focusTarget),u(!0)))},[a.initialFocus,l,o.focus,o.focusTarget,o]);var f=[a.classNames.root,a.className];a.numberOfMonths>1&&f.push(a.classNames.multiple_months),a.showWeekNumber&&f.push(a.classNames.with_weeknumber);var c=he(he({},a.styles.root),a.style),d=Object.keys(n).filter(function(h){return h.startsWith("data-")}).reduce(function(h,m){var x;return he(he({},h),(x={},x[m]=n[m],x))},{}),p=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:MSe;return(0,X.jsx)("div",he({className:f.join(" "),style:c,dir:a.dir,id:a.id,nonce:n.nonce,title:n.title,lang:n.lang},d,{children:(0,X.jsx)(p,{children:i.displayMonths.map(function(h,m){return(0,X.jsx)(_Se,{displayIndex:m,displayMonth:h},m)})})}))}function NSe(e){var t=e.children,r=i0e(e,["children"]);return(0,X.jsx)(I0e,{initialProps:r,children:(0,X.jsx)(D0e,{children:(0,X.jsx)(vSe,{initialProps:r,children:(0,X.jsx)(V0e,{initialProps:r,children:(0,X.jsx)(K0e,{initialProps:r,children:(0,X.jsx)(rSe,{children:(0,X.jsx)(mSe,{children:t})})})})})})})}function Z8(e){return(0,X.jsx)(NSe,he({},e,{children:(0,X.jsx)(DSe,{initialProps:e})}))}function kO(a){var o=a,{className:e,classNames:t,showOutsideDays:r=!0}=o,n=Ie(o,["className","classNames","showOutsideDays"]);return jb.createElement(Z8,fe({showOutsideDays:r,className:ve("p-3",e),classNames:fe({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ve(Th({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ve(Th({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},t),components:{IconLeft:s=>{var i=Ie(s,[]);return jb.createElement(Rf,{className:"h-4 w-4"})},IconRight:s=>{var i=Ie(s,[]);return jb.createElement(ms,{className:"h-4 w-4"})}}},n))}kO.displayName="Calendar";var oh=R(G());var ft=R(G(),1);var Rt=R(_t(),1),EO="Popover",[eG,m$e]=Xr(EO,[No]),ah=No(),[FSe,is]=eG(EO),tG=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=ah(t),l=ft.useRef(null),[u,f]=ft.useState(!1),[c=!1,d]=So({prop:n,defaultProp:a,onChange:o});return(0,Rt.jsx)(js,{...s,children:(0,Rt.jsx)(FSe,{scope:t,contentId:tn(),triggerRef:l,open:c,onOpenChange:d,onOpenToggle:ft.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:u,onCustomAnchorAdd:ft.useCallback(()=>f(!0),[]),onCustomAnchorRemove:ft.useCallback(()=>f(!1),[]),modal:i,children:r})})};tG.displayName=EO;var rG="PopoverAnchor",BSe=ft.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=is(rG,r),o=ah(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return ft.useEffect(()=>(i(),()=>s()),[i,s]),(0,Rt.jsx)(qs,{...o,...n,ref:t})});BSe.displayName=rG;var nG="PopoverTrigger",aG=ft.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=is(nG,r),o=ah(r),i=Le(t,a.triggerRef),s=(0,Rt.jsx)(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":uG(a.open),...n,ref:i,onClick:le(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:(0,Rt.jsx)(qs,{asChild:!0,...o,children:s})});aG.displayName=nG;var TO="PopoverPortal",[jSe,qSe]=eG(TO,{forceMount:void 0}),oG=e=>{let{__scopePopover:t,forceMount:r,children:n,container:a}=e,o=is(TO,t);return(0,Rt.jsx)(jSe,{scope:t,forceMount:r,children:(0,Rt.jsx)(Fo,{present:r||o.open,children:(0,Rt.jsx)(Us,{asChild:!0,container:a,children:n})})})};oG.displayName=TO;var mf="PopoverContent",iG=ft.forwardRef((e,t)=>{let r=qSe(mf,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,o=is(mf,e.__scopePopover);return(0,Rt.jsx)(Fo,{present:n||o.open,children:o.modal?(0,Rt.jsx)(USe,{...a,ref:t}):(0,Rt.jsx)(HSe,{...a,ref:t})})});iG.displayName=mf;var USe=ft.forwardRef((e,t)=>{let r=is(mf,e.__scopePopover),n=ft.useRef(null),a=Le(t,n),o=ft.useRef(!1);return ft.useEffect(()=>{let i=n.current;if(i)return Au(i)},[]),(0,Rt.jsx)(Vs,{as:Kr,allowPinchZoom:!0,children:(0,Rt.jsx)(sG,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,i=>{i.preventDefault(),o.current||r.triggerRef.current?.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:le(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),HSe=ft.forwardRef((e,t)=>{let r=is(mf,e.__scopePopover),n=ft.useRef(!1),a=ft.useRef(!1);return(0,Rt.jsx)(sG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let i=o.target;r.triggerRef.current?.contains(i)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),sG=ft.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,...c}=e,d=is(mf,r),p=ah(r);return bu(),(0,Rt.jsx)(Rs,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,Rt.jsx)(Ts,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:(0,Rt.jsx)(Pu,{"data-state":uG(d.open),role:"dialog",id:d.contentId,...p,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),lG="PopoverClose",WSe=ft.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=is(lG,r);return(0,Rt.jsx)(xe.button,{type:"button",...n,ref:t,onClick:le(e.onClick,()=>a.onOpenChange(!1))})});WSe.displayName=lG;var zSe="PopoverArrow",VSe=ft.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=ah(r);return(0,Rt.jsx)(Iu,{...a,...n,ref:t})});VSe.displayName=zSe;function uG(e){return e?"open":"closed"}var cG=tG;var fG=aG,dG=oG,RO=iG;var pG=cG,mG=fG,_O=oh.forwardRef((o,a)=>{var i=o,{className:e,align:t="center",sideOffset:r=4}=i,n=Ie(i,["className","align","sideOffset"]);return oh.createElement(dG,null,oh.createElement(RO,fe({ref:a,align:t,sideOffset:r,className:ve("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},n)))});_O.displayName=RO.displayName;var Jt=R(G()),GSe=R(_t());function NO(){return NO=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var tCe=function(t,r,n){n===void 0&&(n=!1);var a=r.alt,o=r.meta,i=r.mod,s=r.shift,l=r.ctrl,u=r.keys,f=t.key,c=t.code,d=t.ctrlKey,p=t.metaKey,h=t.shiftKey,m=t.altKey,x=ss(c),g=f.toLowerCase();if(!(u!=null&&u.includes(x))&&!(u!=null&&u.includes(g))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(x))return!1;if(!n){if(a===!m&&g!=="alt"||s===!h&&g!=="shift")return!1;if(i){if(!p&&!d)return!1}else if(o===!p&&g!=="meta"&&g!=="os"||l===!d&&g!=="ctrl"&&g!=="control")return!1}return u&&u.length===1&&(u.includes(g)||u.includes(x))?!0:u?YSe(u):!u},rCe=(0,Jt.createContext)(void 0),nCe=function(){return(0,Jt.useContext)(rCe)};function bG(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&bG(e[n],t[n])},!0):e===t}var aCe=(0,Jt.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),oCe=function(){return(0,Jt.useContext)(aCe)};function iCe(e){var t=(0,Jt.useRef)(void 0);return bG(t.current,e)||(t.current=e),t.current}var hG=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},sCe=typeof window<"u"?Jt.useLayoutEffect:Jt.useEffect;function ha(e,t,r,n){var a=(0,Jt.useRef)(null),o=(0,Jt.useRef)(!1),i=r instanceof Array?n instanceof Array?void 0:n:r,s=FO(e)?e.join(i?.splitKey):e,l=r instanceof Array?r:n instanceof Array?n:void 0,u=(0,Jt.useCallback)(t,l??[]),f=(0,Jt.useRef)(u);l?f.current=u:f.current=t;var c=iCe(i),d=oCe(),p=d.enabledScopes,h=nCe();return sCe(function(){if(!(c?.enabled===!1||!eCe(p,c?.scopes))){var m=function(b,y){var S;if(y===void 0&&(y=!1),!(ZSe(b)&&!xG(b,c?.enableOnFormTags))){if(a.current!==null){var P=a.current.getRootNode();if((P instanceof Document||P instanceof ShadowRoot)&&P.activeElement!==a.current&&!a.current.contains(P.activeElement)){hG(b);return}}(S=b.target)!=null&&S.isContentEditable&&!(c!=null&&c.enableOnContentEditable)||MO(s,c?.splitKey).forEach(function(A){var _,T=DO(A,c?.combinationKey);if(tCe(b,T,c?.ignoreModifiers)||(_=T.keys)!=null&&_.includes("*")){if(c!=null&&c.ignoreEventWhen!=null&&c.ignoreEventWhen(b)||y&&o.current)return;if(JSe(b,T,c?.preventDefault),!QSe(b,T,c?.enabled)){hG(b);return}f.current(b,T),y||(o.current=!0)}})}},x=function(b){b.key!==void 0&&(gG(ss(b.code)),(c?.keydown===void 0&&c?.keyup!==!0||c!=null&&c.keydown)&&m(b))},g=function(b){b.key!==void 0&&(yG(ss(b.code)),o.current=!1,c!=null&&c.keyup&&m(b,!0))},v=a.current||i?.document||document;return v.addEventListener("keyup",g),v.addEventListener("keydown",x),h&&MO(s,c?.splitKey).forEach(function(w){return h.addHotkey(DO(w,c?.combinationKey,c?.description))}),function(){v.removeEventListener("keyup",g),v.removeEventListener("keydown",x),h&&MO(s,c?.splitKey).forEach(function(w){return h.removeHotkey(DO(w,c?.combinationKey,c?.description))})}}},[s,c,p]),a}var lCe=e=>{let t=new Date,r,n;switch(e){case"today":r=n=t;break;case"yesterday":n=t,r=Xe(t,-1);break;case"last_week":n=t,r=Xe(t,-7);break;case"last_30_days":n=t,r=Xe(t,-30);break;case"last_90_days":n=t,r=Xe(t,-90);break;case"last_12_month":n=t,r=Xe(t,-365);break;case"previous_week":n=Xe(t,-7),r=Xe(t,-14);break;case"previous_month":n=new Date(t.getFullYear(),t.getMonth(),0),r=new Date(t.getFullYear(),t.getMonth()-1,1);break;case"previous_quarter":let a=Math.floor(t.getMonth()/3);n=new Date(t.getFullYear(),a*3,0),r=new Date(t.getFullYear(),(a-1)*3,1);break;case"previous_year":n=new Date(t.getFullYear()-1,11,31),r=new Date(t.getFullYear()-1,0,1);break;case"all_time":r=new Date(0),n=t;break;default:r=n=t}return{from:r,to:n}};function wG({dateRange:e,pushEvent:t}){let[r,n]=Fe.useState({from:e.from,to:e.to}),a=o=>{let{from:i,to:s}=lCe(o);n({from:i,to:s}),t("set_date",{value:{from:Ce(i,"yyyy-MM-dd 00:00:00"),to:Ce(s,"yyyy-MM-dd 23:59:59")}})};return ha("t",()=>a("today"),[]),ha("ctrl+t",()=>a("yesterday"),[]),ha("w",()=>a("last_week"),[]),ha("m",()=>a("last_30_days"),[]),ha("q",()=>a("last_90_days"),[]),ha("y",()=>a("last_12_month"),[]),ha("ctrl+w",()=>a("previous_week"),[]),ha("ctrl+m",()=>a("previous_month"),[]),ha("ctrl+q",()=>a("previous_quarter"),[]),ha("ctrl+y",()=>a("previous_year"),[]),ha("a",()=>a("all_time"),[]),Fe.createElement("div",{className:ve("grid gap-2")},Fe.createElement(pG,null,Fe.createElement(mG,{asChild:!0},Fe.createElement(jf,{id:"date",variant:"outline",className:ve("w-[276px] justify-start text-left font-normal",!r&&"text-muted-foreground")},Fe.createElement(Tf,{className:"mr-2 h-4 w-4"}),r!=null&&r.from?r.to?Fe.createElement(Fe.Fragment,null,Ce(r.from,"dd LLL, y")," -"," ",Ce(r.to,"dd LLL, y")):Ce(r.from,"dd LLL, y"):Fe.createElement("span",null,"Pick a date"))),Fe.createElement(_O,{className:"w-auto p-0",align:"end"},Fe.createElement(rs,{onValueChange:o=>{a(o)}},Fe.createElement(ti,null,Fe.createElement(ns,{placeholder:"Select"})),Fe.createElement(ri,{position:"popper"},Fe.createElement(gt,{value:"today"},"Today"),Fe.createElement(gt,{value:"yesterday"},"Yesterday"),Fe.createElement(gt,{value:"last_week"},"Last week"),Fe.createElement(Ym,{className:"my-2"}),Fe.createElement(gt,{value:"last_30_days"},"Last 30 days"),Fe.createElement(gt,{value:"last_90_days"},"Last 90 days"),Fe.createElement(gt,{value:"last_12_month"},"Last 12 month"),Fe.createElement(Ym,{className:"my-2"}),Fe.createElement(gt,{value:"previous_month"},"Previous month"),Fe.createElement(gt,{value:"previous_quarter"},"Previous quarter"),Fe.createElement(Ym,{className:"my-2"}),Fe.createElement(gt,{value:"all_time"},"All time"))),Fe.createElement(kO,{initialFocus:!0,mode:"range",defaultMonth:r==null?void 0:r.from,selected:r,onSelect:o=>{if(n(o),o!=null&&o.from&&(o!=null&&o.to)){let i=Ce(o.from,"yyyy-MM-dd 00:00:00"),s=Ce(o.to,"yyyy-MM-dd 23:59:59");t("set_date",{value:{from:i,to:s}})}},numberOfMonths:1}))))}var _n=R(G());var uCe={hits:{label:"Hits",color:"hsl(var(--chart-1))"}};function SG({statData:e,statUnit:t,statTitle:r,chartData:n,dateRange:a}){return _n.createElement(Ur,null,_n.createElement(Hr,{className:"p-4 pb-0"},_n.createElement(Wr,null,r),_n.createElement(zr,null,Ce(a.from,"dd LLL, y")," -"," ",Ce(a.to,"dd LLL, y"))),_n.createElement(Vr,{className:"flex flex-row items-baseline gap-4 p-4 pt-0"},_n.createElement("div",{className:"flex items-baseline gap-1 text-xl font-bold tabular-nums leading-none"},t==="time"?e<6e4?`${(e/1e3).toFixed(2)}s`:`${(e/6e4).toFixed(2)}m`:kh(e,2),_n.createElement("span",{className:"text-sm font-normal text-muted-foreground"},t,"/period")),_n.createElement($r,{config:uCe,className:"ml-auto w-[72px]"},_n.createElement(Zo,{accessibilityLayer:!0,margin:{left:0,right:0,top:0,bottom:0},data:n},_n.createElement(sr,{dataKey:"hits",fill:"var(--color-hits)",radius:2,fillOpacity:.2,activeIndex:n.length-1,activeBar:_n.createElement(Yo,{fillOpacity:.8})}),_n.createElement(qt,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:4,hide:!0})))))}var At=R(G());var cCe={views:{label:"Total requests"},hits:{label:"Total requests",color:"hsl(var(--chart-1))"}};function CG({chartData:e,dateRange:t,pushEvent:r}){let{interval:n,setInterval:a}=pf(),o=i=>{a(i),r("set_interval",{value:{interval:i}})};return At.createElement(Ur,null,At.createElement(Hr,{className:"flex items-center gap-2 py-5 space-y-0 border-b sm:flex-row"},At.createElement("div",{className:"grid flex-1 gap-1 text-center sm:text-left"},At.createElement(Wr,null,"Total requests"),At.createElement(zr,null,"Showing total requests for ",Ce(t.from,"dd LLL, y")," -"," ",Ce(t.to,"dd LLL, y"))),At.createElement(rs,{value:n,onValueChange:o},At.createElement(ti,{className:"w-[160px] rounded-lg sm:ml-auto","aria-label":"Select a value"},At.createElement(ns,{placeholder:"Interval"})),At.createElement(ri,{className:"rounded-xl"},At.createElement(gt,{value:"hour",className:"rounded-lg"},"Per hour"),At.createElement(gt,{value:"day",className:"rounded-lg"},"Per day"),At.createElement(gt,{value:"month",className:"rounded-lg"},"Per month")))),At.createElement(Vr,{className:"px-2 sm:p-6"},At.createElement($r,{config:cCe,className:"aspect-auto h-[250px] w-full"},At.createElement(Zo,{accessibilityLayer:!0,data:e,margin:{left:12,right:12}},At.createElement(pa,{vertical:!1}),At.createElement(qt,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32,tickFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short"},n!=="month"&&{day:"numeric"}),n==="month"&&{year:"numeric"}))}),At.createElement(ma,{content:At.createElement(Rn,{className:"w-[170px]",nameKey:"views",labelFormatter:i=>new Date(i).toLocaleDateString("en-US",fe(fe({month:"short",year:"numeric"},n!=="month"&&{day:"numeric"}),n==="hour"&&{hour:"numeric"}))})}),At.createElement(sr,{dataKey:"hits",fill:"var(--color-hits)"})))))}var PG={ThemeToggle:BD,VisitsChart:M8,ResChart:D8,DeviceChart:N8,StatusChart:F8,PopularChart:B8,DateRangePicker:wG,SingleStat:SG,RequestsChart:CG};var AG=R(G()),OG=R(LG());function fCe(e,t){let r=e.getAttribute(t);return r?JSON.parse(r):{}}function dCe(e){return{...fCe(e.el,"data-props"),pushEvent:e.pushEvent.bind(e),pushEventTo:e.pushEventTo.bind(e),handleEvent:e.handleEvent.bind(e),upload:e.upload.bind(e),uploadTo:e.uploadTo.bind(e)}}function jO(e){return{ReactHook:{_render(){this._root.render(AG.default.createElement(this._Component,dCe(this)))},mounted(){let r=this.el.getAttribute("data-name");if(!r)throw new Error("Component name must be provided");this._Component=e[r],this._root=OG.default.createRoot(this.el),this._render()},updated(){this._root&&this._render()},destroyed(){this._root&&window.addEventListener("phx:page-loading-stop",()=>this._root.unmount(),{once:!0})}}}}var pCe=fe({},jO(PG)),mCe=document.querySelector("meta[name='csrf-token']").getAttribute("content"),kG=new Ek("/live",$O,{longPollFallbackMs:2500,params:{_csrf_token:mCe},hooks:pCe});qb.default.config({barColors:{0:"#29d"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>qb.default.show(300));window.addEventListener("phx:page-loading-stop",e=>qb.default.hide());kG.connect();window.liveSocket=kG;var hCe=()=>typeof localStorage!="undefined"&&localStorage.getItem("theme")?localStorage.getItem("theme"):window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",vCe=hCe()==="dark";document.documentElement.classList[vCe?"add":"remove"]("dark");typeof localStorage!="undefined"&&new MutationObserver(()=>{let t=document.documentElement.classList.contains("dark");localStorage.setItem("theme",t?"dark":"light")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});})(); +/*! Bundled license information: + +topbar/topbar.min.js: + (** + * @license MIT + * topbar 3.0.0 + * http://buunguyen.github.io/topbar + * Copyright (c) 2024 Buu Nguyen + *) + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react-jsx-runtime.production.min.js: + (** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +scheduler/cjs/scheduler.production.min.js: + (** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-dom/cjs/react-dom.production.min.js: + (** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-is/cjs/react-is.production.min.js: + (** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +decimal.js-light/decimal.js: + (*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE *) + +lucide-react/dist/esm/shared/src/utils.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/defaultAttributes.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/Icon.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/createLucideIcon.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/calendar.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/check.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-down.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-left.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-right.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/chevron-up.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/circle.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/moon.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/icons/sun.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) + +lucide-react/dist/esm/lucide-react.js: + (** + * @license lucide-react v0.428.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + *) +*/ diff --git a/test/phoenix_analytics_test.exs b/test/phoenix_analytics_test.exs new file mode 100644 index 0000000..70a3d08 --- /dev/null +++ b/test/phoenix_analytics_test.exs @@ -0,0 +1,31 @@ +defmodule PhoenixAnalyticsTest do + use ExUnit.Case + doctest PhoenixAnalytics + + Code.require_file("./priv/repo/seed_data.exs") + + setup do + query = PhoenixAnalytics.Queries.Table.create_requests() + + case PhoenixAnalytics.Repo.execute_unsafe(query) do + {:ok, _} -> :ok + {:error, reason} -> reason + end + end + + test "batcher: insert one" do + alias PhoenixAnalytics.Services.Batcher + + request_log = SeedData.generate_request_data() + + {_, params} = PhoenixAnalytics.Queries.Insert.insert_one(request_log) + + result = + case Batcher.send_batch([params]) do + :ok -> :ok + {:error, reason} -> reason + end + + assert :ok === result + end +end diff --git a/test/test_helper.exs b/test/test_helper.exs new file mode 100644 index 0000000..869559e --- /dev/null +++ b/test/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start() diff --git a/test/vegeta/vegeta.sh b/test/vegeta/vegeta.sh new file mode 100755 index 0000000..824ad61 --- /dev/null +++ b/test/vegeta/vegeta.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Create a timestamped folder +FOLDER=$(date +"%Y-%m-%d-%H-%M-%S") +mkdir -p "$FOLDER" + +# Change to the new folder +cd "$FOLDER" + +# Run Vegeta attack and save results +echo "GET http://localhost:4000/" | vegeta attack -duration=30s -rate=50 -output=results.bin + +# Generate text report +vegeta report -type=text results.bin > report.txt + +# Generate JSON report +vegeta report -type=json results.bin > report.json + +# Generate histogram +vegeta report -type=hist[0,100ms,200ms,300ms] results.bin > histogram.txt + +# Generate plot +vegeta plot -title="Load Test Results" results.bin > plot.html + +# Display text report +cat report.txt + +echo "Reports and visualizations have been saved in the folder: $FOLDER"