@mysten-incubation/devstack 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dashboard-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dashboard-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
- package/dashboard-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dashboard-ui/assets/index-Bmi1UtAg.js +1356 -0
- package/dashboard-ui/assets/index-D5EShVt4.js +3 -0
- package/dashboard-ui/assets/index-Deml9drg.css +1 -0
- package/dashboard-ui/index.html +13 -0
- package/dist/api/define-capabilities.d.mts +14 -3
- package/dist/api/define-capabilities.mjs +18 -1
- package/dist/api/define-capabilities.mjs.map +1 -1
- package/dist/api/define-devstack.d.mts +1 -1
- package/dist/api/define-devstack.mjs +6 -26
- package/dist/api/define-devstack.mjs.map +1 -1
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/define-plugin.mjs +2 -0
- package/dist/api/inference-network.d.mts +132 -0
- package/dist/api/inference-network.mjs +105 -16
- package/dist/api/inference-network.mjs.map +1 -1
- package/dist/api/plugin-errors.d.mts +7 -0
- package/dist/api/run-stack.d.mts +20 -9
- package/dist/api/run-stack.mjs +56 -29
- package/dist/api/run-stack.mjs.map +1 -1
- package/dist/build-integrations/playwright/config.d.mts +6 -4
- package/dist/build-integrations/playwright/config.mjs +5 -3
- package/dist/build-integrations/playwright/config.mjs.map +1 -1
- package/dist/build-integrations/playwright/errors.d.mts +1 -1
- package/dist/build-integrations/playwright/global-setup.d.mts +43 -17
- package/dist/build-integrations/playwright/global-setup.mjs +250 -13
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
- package/dist/build-integrations/playwright/index.d.mts +5 -3
- package/dist/build-integrations/playwright/index.mjs +4 -2
- package/dist/build-integrations/playwright/stack-context.d.mts +0 -1
- package/dist/build-integrations/playwright/stack-context.mjs +24 -63
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
- package/dist/build-integrations/playwright/wallet-context.d.mts +7 -10
- package/dist/build-integrations/playwright/wallet-context.mjs +8 -13
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/cold-start-url.d.mts +5 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +4 -3
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
- package/dist/build-integrations/runtime/conventional-routes.d.mts +51 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs +92 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +38 -30
- package/dist/build-integrations/runtime/discover.mjs +73 -70
- package/dist/build-integrations/runtime/discover.mjs.map +1 -1
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
- package/dist/build-integrations/runtime/index.d.mts +7 -2
- package/dist/build-integrations/runtime/index.mjs +9 -2
- package/dist/build-integrations/runtime/manifest-types.d.mts +2 -0
- package/dist/build-integrations/runtime/manifest-types.mjs +3 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.d.mts +29 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs +10 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/read-stack-context.mjs +10 -4
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +48 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs +42 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/wallet-paths.mjs +2 -0
- package/dist/build-integrations/vite/index.d.mts +51 -0
- package/dist/build-integrations/vite/index.mjs +73 -0
- package/dist/build-integrations/vite/index.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +4 -3
- package/dist/build-integrations/vitest/env.mjs +6 -4
- package/dist/build-integrations/vitest/env.mjs.map +1 -1
- package/dist/build-integrations/vitest/errors.d.mts +25 -4
- package/dist/build-integrations/vitest/errors.mjs +15 -2
- package/dist/build-integrations/vitest/errors.mjs.map +1 -1
- package/dist/build-integrations/vitest/index.d.mts +2 -2
- package/dist/build-integrations/vitest/index.mjs +3 -3
- package/dist/build-integrations/vitest/setup.d.mts +4 -2
- package/dist/build-integrations/vitest/setup.mjs +2 -2
- package/dist/build-integrations/vitest/setup.mjs.map +1 -1
- package/dist/build-integrations/vitest/stack-context.d.mts +0 -1
- package/dist/build-integrations/vitest/stack-context.mjs +33 -13
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
- package/dist/cli/bail.mjs +23 -0
- package/dist/cli/bail.mjs.map +1 -0
- package/dist/{surfaces/cli/commands → cli}/doctor-probes.mjs +26 -16
- package/dist/cli/doctor-probes.mjs.map +1 -0
- package/dist/cli/main.d.mts +15 -1
- package/dist/cli/main.mjs +166 -482
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/prune-direct.mjs +31 -201
- package/dist/cli/prune-direct.mjs.map +1 -1
- package/dist/cli/snapshot-reader.mjs +14 -11
- package/dist/cli/snapshot-reader.mjs.map +1 -1
- package/dist/cli/up-lifecycle.mjs +4 -1
- package/dist/cli/up-lifecycle.mjs.map +1 -1
- package/dist/cli/wirings/apply.mjs +95 -0
- package/dist/cli/wirings/apply.mjs.map +1 -0
- package/dist/cli/wirings/build-verb-layers.mjs +42 -0
- package/dist/cli/wirings/build-verb-layers.mjs.map +1 -0
- package/dist/cli/wirings/config-loader.mjs +69 -0
- package/dist/cli/wirings/config-loader.mjs.map +1 -0
- package/dist/cli/wirings/engine-command.mjs +30 -0
- package/dist/cli/wirings/engine-command.mjs.map +1 -0
- package/dist/cli/wirings/identity.mjs +72 -0
- package/dist/cli/wirings/identity.mjs.map +1 -0
- package/dist/cli/wirings/provide-file-system.mjs +7 -0
- package/dist/cli/wirings/provide-file-system.mjs.map +1 -0
- package/dist/cli/wirings/snapshot.mjs +177 -0
- package/dist/cli/wirings/snapshot.mjs.map +1 -0
- package/dist/cli/wirings/up.mjs +287 -0
- package/dist/cli/wirings/up.mjs.map +1 -0
- package/dist/cli/wirings/wipe.mjs +40 -0
- package/dist/cli/wirings/wipe.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +0 -2
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +26 -1
- package/dist/contracts/faucet-strategy.d.mts +25 -0
- package/dist/contracts/funding-strategy.d.mts +42 -0
- package/dist/contracts/plugin-expander.mjs +60 -0
- package/dist/contracts/plugin-expander.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +5 -3
- package/dist/contracts/renderer.d.mts +23 -0
- package/dist/contracts/routable.d.mts +14 -1
- package/dist/contracts/snapshotable.d.mts +25 -3
- package/dist/contracts/wallet-protocol.d.mts +52 -0
- package/dist/contracts/wallet-protocol.mjs +52 -0
- package/dist/contracts/wallet-protocol.mjs.map +1 -0
- package/dist/index.d.mts +26 -25
- package/dist/index.mjs +20 -13
- package/dist/{runtime → orchestrators}/built-in-plugin-layers.mjs +10 -5
- package/dist/orchestrators/built-in-plugin-layers.mjs.map +1 -0
- package/dist/orchestrators/codegen/bindings.d.mts +1 -2
- package/dist/orchestrators/codegen/bindings.mjs +52 -186
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
- package/dist/orchestrators/codegen/emit.mjs +19 -1
- package/dist/orchestrators/codegen/emit.mjs.map +1 -1
- package/dist/orchestrators/codegen/errors.mjs +8 -3
- package/dist/orchestrators/codegen/errors.mjs.map +1 -1
- package/dist/orchestrators/codegen/format.mjs +47 -39
- package/dist/orchestrators/codegen/format.mjs.map +1 -1
- package/dist/orchestrators/codegen/gitignore.mjs +3 -1
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
- package/dist/orchestrators/codegen/output-location.mjs +40 -0
- package/dist/orchestrators/codegen/output-location.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -1
- package/dist/orchestrators/codegen/paths.mjs +40 -14
- package/dist/orchestrators/codegen/paths.mjs.map +1 -1
- package/dist/orchestrators/codegen/permissions.mjs +3 -1
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
- package/dist/orchestrators/codegen/service.mjs +157 -105
- package/dist/orchestrators/codegen/service.mjs.map +1 -1
- package/dist/orchestrators/lifecycle-prune/errors.mjs +31 -0
- package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs +350 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +26 -27
- package/dist/orchestrators/router/cleanup.mjs.map +1 -1
- package/dist/orchestrators/router/entrypoints.mjs +2 -2
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
- package/dist/orchestrators/router/file-provider.mjs +14 -5
- package/dist/orchestrators/router/file-provider.mjs.map +1 -1
- package/dist/orchestrators/router/hostname.mjs +19 -55
- package/dist/orchestrators/router/hostname.mjs.map +1 -1
- package/dist/orchestrators/router/index.mjs +11 -0
- package/dist/orchestrators/router/profile.mjs +2 -2
- package/dist/orchestrators/router/sentinels.mjs +26 -0
- package/dist/orchestrators/router/sentinels.mjs.map +1 -0
- package/dist/orchestrators/router/service.mjs +40 -37
- package/dist/orchestrators/router/service.mjs.map +1 -1
- package/dist/orchestrators/router/traefik-container.mjs +27 -16
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
- package/dist/{substrate/runtime → orchestrators}/run.mjs +26 -21
- package/dist/orchestrators/run.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +1 -1
- package/dist/orchestrators/runtime-composition.mjs +123 -39
- package/dist/orchestrators/runtime-composition.mjs.map +1 -1
- package/dist/orchestrators/snapshot/capture-command.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture-command.mjs +25 -0
- package/dist/orchestrators/snapshot/capture-command.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +42 -28
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
- package/dist/orchestrators/snapshot/descriptor.mjs +35 -10
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
- package/dist/orchestrators/snapshot/identity-guard.mjs +1 -1
- package/dist/orchestrators/snapshot/index.mjs +13 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -1
- package/dist/orchestrators/snapshot/integrity.mjs +73 -17
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
- package/dist/orchestrators/snapshot/pending-marker.d.mts +1 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs +99 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs.map +1 -0
- package/dist/orchestrators/snapshot/phase-error.mjs +23 -0
- package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +20 -55
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
- package/dist/orchestrators/snapshot/recover-pending.d.mts +1 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs +223 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +118 -84
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
- package/dist/orchestrators/snapshot/service.mjs +53 -56
- package/dist/orchestrators/snapshot/service.mjs.map +1 -1
- package/dist/orchestrators/snapshot/state-document.d.mts +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +47 -7
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -1
- package/dist/orchestrators/snapshot/wipe.mjs +67 -10
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
- package/dist/plugins/account/codegen.mjs +9 -8
- package/dist/plugins/account/codegen.mjs.map +1 -1
- package/dist/plugins/account/errors.d.mts +33 -6
- package/dist/plugins/account/errors.mjs.map +1 -1
- package/dist/plugins/account/funding.d.mts +29 -19
- package/dist/plugins/account/funding.mjs +84 -66
- package/dist/plugins/account/funding.mjs.map +1 -1
- package/dist/plugins/account/index.d.mts +2 -4
- package/dist/plugins/account/index.mjs +64 -31
- package/dist/plugins/account/index.mjs.map +1 -1
- package/dist/plugins/account/keypair.mjs +6 -9
- package/dist/plugins/account/keypair.mjs.map +1 -1
- package/dist/plugins/account/lease.mjs +1 -0
- package/dist/plugins/account/lease.mjs.map +1 -1
- package/dist/plugins/account/registry.d.mts +14 -1
- package/dist/plugins/account/registry.mjs +18 -18
- package/dist/plugins/account/registry.mjs.map +1 -1
- package/dist/plugins/account/service.d.mts +23 -4
- package/dist/plugins/account/service.mjs +83 -45
- package/dist/plugins/account/service.mjs.map +1 -1
- package/dist/plugins/account/snapshot.mjs +2 -5
- package/dist/plugins/account/snapshot.mjs.map +1 -1
- package/dist/plugins/account/spans.mjs +16 -0
- package/dist/plugins/account/spans.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +6 -8
- package/dist/plugins/account/variants/keystore.mjs.map +1 -1
- package/dist/plugins/action/build-context.d.mts +3 -2
- package/dist/plugins/action/errors.d.mts +16 -12
- package/dist/plugins/action/errors.mjs.map +1 -1
- package/dist/plugins/action/execute.mjs +65 -103
- package/dist/plugins/action/execute.mjs.map +1 -1
- package/dist/plugins/action/index.d.mts +0 -2
- package/dist/plugins/action/index.mjs +17 -13
- package/dist/plugins/action/index.mjs.map +1 -1
- package/dist/plugins/action/service.mjs +38 -35
- package/dist/plugins/action/service.mjs.map +1 -1
- package/dist/plugins/action/spans.mjs +11 -0
- package/dist/plugins/action/spans.mjs.map +1 -0
- package/dist/plugins/coin/codegen.mjs +9 -8
- package/dist/plugins/coin/codegen.mjs.map +1 -1
- package/dist/plugins/coin/discovery.mjs +8 -4
- package/dist/plugins/coin/discovery.mjs.map +1 -1
- package/dist/plugins/coin/index.d.mts +11 -29
- package/dist/plugins/coin/index.mjs +56 -27
- package/dist/plugins/coin/index.mjs.map +1 -1
- package/dist/plugins/coin/metadata.mjs +8 -15
- package/dist/plugins/coin/metadata.mjs.map +1 -1
- package/dist/plugins/coin/mint.d.mts +30 -11
- package/dist/plugins/coin/mint.mjs +78 -74
- package/dist/plugins/coin/mint.mjs.map +1 -1
- package/dist/plugins/coin/registry.mjs +4 -7
- package/dist/plugins/coin/registry.mjs.map +1 -1
- package/dist/plugins/coin/service.d.mts +39 -1
- package/dist/plugins/coin/service.mjs +11 -4
- package/dist/plugins/coin/service.mjs.map +1 -1
- package/dist/plugins/coin/spans.mjs +20 -0
- package/dist/plugins/coin/spans.mjs.map +1 -0
- package/dist/plugins/dashboard/domain.mjs +402 -0
- package/dist/plugins/dashboard/domain.mjs.map +1 -0
- package/dist/plugins/dashboard/index.d.mts +29 -0
- package/dist/plugins/dashboard/index.mjs +91 -0
- package/dist/plugins/dashboard/index.mjs.map +1 -0
- package/dist/plugins/dashboard/origin-policy.mjs +36 -0
- package/dist/plugins/dashboard/origin-policy.mjs.map +1 -0
- package/dist/plugins/dashboard/routable.mjs +27 -0
- package/dist/plugins/dashboard/routable.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/builder.mjs +21 -0
- package/dist/plugins/dashboard/schema/builder.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/enums.mjs +72 -0
- package/dist/plugins/dashboard/schema/enums.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/root.mjs +351 -0
- package/dist/plugins/dashboard/schema/root.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/types.mjs +508 -0
- package/dist/plugins/dashboard/schema/types.mjs.map +1 -0
- package/dist/plugins/dashboard/schema.mjs +11 -0
- package/dist/plugins/dashboard/schema.mjs.map +1 -0
- package/dist/plugins/dashboard/server.mjs +166 -0
- package/dist/plugins/dashboard/server.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +53 -115
- package/dist/plugins/deepbook/deploy.mjs.map +1 -1
- package/dist/plugins/deepbook/errors.mjs +1 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -1
- package/dist/plugins/deepbook/faucet-strategy.mjs +47 -34
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/deepbook/hash.mjs +9 -0
- package/dist/plugins/deepbook/hash.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +1 -10
- package/dist/plugins/deepbook/index.mjs +25 -22
- package/dist/plugins/deepbook/index.mjs.map +1 -1
- package/dist/plugins/deepbook/pyth/index.mjs +26 -55
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
- package/dist/plugins/deepbook/snapshot.mjs +17 -29
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
- package/dist/plugins/deepbook/spans.mjs +18 -0
- package/dist/plugins/deepbook/spans.mjs.map +1 -0
- package/dist/plugins/deepbook/type-strings.mjs +65 -0
- package/dist/plugins/deepbook/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +2 -3
- package/dist/plugins/deepbook/types.mjs.map +1 -1
- package/dist/plugins/faucet/dispatcher.d.mts +21 -2
- package/dist/plugins/faucet/dispatcher.mjs +1 -2
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
- package/dist/plugins/faucet/errors.d.mts +11 -24
- package/dist/plugins/faucet/errors.mjs.map +1 -1
- package/dist/plugins/faucet/http.mjs +33 -14
- package/dist/plugins/faucet/http.mjs.map +1 -1
- package/dist/plugins/faucet/index.d.mts +15 -5
- package/dist/plugins/faucet/index.mjs +3 -0
- package/dist/plugins/faucet/index.mjs.map +1 -1
- package/dist/plugins/faucet/spans.mjs +12 -0
- package/dist/plugins/faucet/spans.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +1 -1
- package/dist/plugins/host-service/index.mjs +34 -8
- package/dist/plugins/host-service/index.mjs.map +1 -1
- package/dist/plugins/host-service/routable.mjs +2 -1
- package/dist/plugins/host-service/routable.mjs.map +1 -1
- package/dist/plugins/host-service/service.d.mts +21 -0
- package/dist/plugins/host-service/service.mjs +136 -81
- package/dist/plugins/host-service/service.mjs.map +1 -1
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs +23 -0
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -0
- package/dist/plugins/internal/codegen-helpers.mjs +18 -0
- package/dist/plugins/internal/codegen-helpers.mjs.map +1 -0
- package/dist/plugins/internal/funding-failure-error.mjs +32 -0
- package/dist/plugins/internal/funding-failure-error.mjs.map +1 -0
- package/dist/plugins/package/build.mjs +1 -1
- package/dist/plugins/package/build.mjs.map +1 -1
- package/dist/plugins/package/codegen.mjs +26 -0
- package/dist/plugins/package/codegen.mjs.map +1 -1
- package/dist/plugins/package/errors.d.mts +16 -6
- package/dist/plugins/package/errors.mjs.map +1 -1
- package/dist/plugins/package/index.d.mts +0 -4
- package/dist/plugins/package/index.mjs +27 -21
- package/dist/plugins/package/index.mjs.map +1 -1
- package/dist/plugins/package/mode-known.mjs +26 -12
- package/dist/plugins/package/mode-known.mjs.map +1 -1
- package/dist/plugins/package/mode-local.mjs +47 -41
- package/dist/plugins/package/mode-local.mjs.map +1 -1
- package/dist/plugins/package/publish-executor.mjs +55 -114
- package/dist/plugins/package/publish-executor.mjs.map +1 -1
- package/dist/plugins/package/registry.mjs +2 -1
- package/dist/plugins/package/registry.mjs.map +1 -1
- package/dist/plugins/package/service.mjs.map +1 -1
- package/dist/plugins/package/spans.mjs +14 -0
- package/dist/plugins/package/spans.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +19 -12
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -1
- package/dist/plugins/postgres/errors.d.mts +5 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -1
- package/dist/plugins/postgres/index.mjs +10 -17
- package/dist/plugins/postgres/index.mjs.map +1 -1
- package/dist/plugins/postgres/service.mjs +58 -24
- package/dist/plugins/postgres/service.mjs.map +1 -1
- package/dist/plugins/postgres/snapshot.mjs.map +1 -1
- package/dist/plugins/postgres/spans.mjs +11 -0
- package/dist/plugins/postgres/spans.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +4 -4
- package/dist/plugins/router-entrypoints.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +15 -13
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +15 -19
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
- package/dist/plugins/seal/codegen.d.mts +2 -3
- package/dist/plugins/seal/codegen.mjs.map +1 -1
- package/dist/plugins/seal/config-render.mjs +35 -8
- package/dist/plugins/seal/config-render.mjs.map +1 -1
- package/dist/plugins/seal/deploy.mjs +31 -39
- package/dist/plugins/seal/deploy.mjs.map +1 -1
- package/dist/plugins/seal/errors.d.mts +1 -3
- package/dist/plugins/seal/errors.mjs +7 -1
- package/dist/plugins/seal/errors.mjs.map +1 -1
- package/dist/plugins/seal/index.d.mts +1 -6
- package/dist/plugins/seal/index.mjs +40 -14
- package/dist/plugins/seal/index.mjs.map +1 -1
- package/dist/plugins/seal/key-manager.d.mts +1 -9
- package/dist/plugins/seal/key-manager.mjs +2 -18
- package/dist/plugins/seal/key-manager.mjs.map +1 -1
- package/dist/plugins/seal/key-server.mjs +37 -36
- package/dist/plugins/seal/key-server.mjs.map +1 -1
- package/dist/plugins/seal/keygen.mjs +16 -17
- package/dist/plugins/seal/keygen.mjs.map +1 -1
- package/dist/plugins/seal/mode/fork-known.mjs +36 -14
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
- package/dist/plugins/seal/mode/live.d.mts +6 -4
- package/dist/plugins/seal/mode/live.mjs +14 -21
- package/dist/plugins/seal/mode/live.mjs.map +1 -1
- package/dist/plugins/seal/mode/local-keygen.mjs +57 -21
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
- package/dist/plugins/seal/registry-publish.mjs +1 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -1
- package/dist/plugins/seal/routable.mjs.map +1 -1
- package/dist/plugins/seal/service.mjs.map +1 -1
- package/dist/plugins/seal/spans.mjs +18 -0
- package/dist/plugins/seal/spans.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +17 -23
- package/dist/plugins/sui/auto-tick.mjs.map +1 -1
- package/dist/plugins/sui/chain-build-container.mjs +18 -0
- package/dist/plugins/sui/chain-build-container.mjs.map +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +5 -5
- package/dist/plugins/sui/chain-probe.mjs +28 -58
- package/dist/plugins/sui/chain-probe.mjs.map +1 -1
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -1
- package/dist/plugins/sui/errors.d.mts +2 -29
- package/dist/plugins/sui/errors.mjs +1 -3
- package/dist/plugins/sui/errors.mjs.map +1 -1
- package/dist/plugins/sui/fork-faucet-strategy.d.mts +1 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs +55 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.d.mts +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +170 -2
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
- package/dist/plugins/sui/fork-transaction.d.mts +2 -0
- package/dist/plugins/sui/fork-transaction.mjs +92 -28
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
- package/dist/plugins/sui/index.d.mts +33 -70
- package/dist/plugins/sui/index.mjs +58 -35
- package/dist/plugins/sui/index.mjs.map +1 -1
- package/dist/plugins/{faucet/strategies/sui-local.mjs → sui/local-faucet-strategy.mjs} +10 -7
- package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +7 -13
- package/dist/plugins/sui/mode/external.mjs.map +1 -1
- package/dist/plugins/sui/mode/fork.mjs +136 -59
- package/dist/plugins/sui/mode/fork.mjs.map +1 -1
- package/dist/plugins/sui/mode/live.mjs +10 -16
- package/dist/plugins/sui/mode/live.mjs.map +1 -1
- package/dist/plugins/sui/mode/local.mjs +37 -36
- package/dist/plugins/sui/mode/local.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared-boot.mjs +38 -115
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared.d.mts +1 -5
- package/dist/plugins/sui/mode/shared.mjs.map +1 -1
- package/dist/plugins/sui/mode/spec.d.mts +18 -0
- package/dist/plugins/sui/move-summary-runner.mjs +207 -0
- package/dist/plugins/sui/move-summary-runner.mjs.map +1 -0
- package/dist/plugins/sui/network-resolver.d.mts +4 -3
- package/dist/plugins/sui/service.mjs.map +1 -1
- package/dist/plugins/sui/snapshot.mjs +3 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -1
- package/dist/plugins/sui/spans.mjs +17 -0
- package/dist/plugins/sui/spans.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +0 -1
- package/dist/plugins/wallet/codegen.mjs +8 -9
- package/dist/plugins/wallet/codegen.mjs.map +1 -1
- package/dist/plugins/wallet/index.d.mts +6 -8
- package/dist/plugins/wallet/index.mjs +46 -35
- package/dist/plugins/wallet/index.mjs.map +1 -1
- package/dist/plugins/wallet/origin-policy.mjs +12 -28
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
- package/dist/plugins/wallet/pairing.mjs +6 -4
- package/dist/plugins/wallet/pairing.mjs.map +1 -1
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +5 -44
- package/dist/plugins/wallet/protocol.mjs.map +1 -1
- package/dist/plugins/wallet/routable.mjs +2 -8
- package/dist/plugins/wallet/routable.mjs.map +1 -1
- package/dist/plugins/wallet/server.mjs +36 -44
- package/dist/plugins/wallet/server.mjs.map +1 -1
- package/dist/plugins/wallet/service.d.mts +1 -5
- package/dist/plugins/wallet/service.mjs +22 -18
- package/dist/plugins/wallet/service.mjs.map +1 -1
- package/dist/plugins/wallet/spans.mjs +22 -0
- package/dist/plugins/wallet/spans.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +33 -8
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/walrus/codegen.d.mts +3 -3
- package/dist/plugins/walrus/codegen.mjs.map +1 -1
- package/dist/plugins/walrus/deploy-paths.mjs +21 -5
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
- package/dist/plugins/walrus/deploy.mjs +67 -69
- package/dist/plugins/walrus/deploy.mjs.map +1 -1
- package/dist/plugins/walrus/errors.mjs +1 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -1
- package/dist/plugins/walrus/faucet-strategy.mjs +12 -7
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/walrus/index.d.mts +2 -13
- package/dist/plugins/walrus/index.mjs +18 -23
- package/dist/plugins/walrus/index.mjs.map +1 -1
- package/dist/plugins/walrus/mode/known-deploy.mjs +7 -5
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
- package/dist/plugins/walrus/mode/local-cluster.mjs +26 -7
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
- package/dist/plugins/walrus/routable.mjs +7 -23
- package/dist/plugins/walrus/routable.mjs.map +1 -1
- package/dist/plugins/walrus/service.mjs.map +1 -1
- package/dist/plugins/walrus/spans.mjs +18 -0
- package/dist/plugins/walrus/spans.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +6 -2
- package/dist/plugins/walrus/storage-nodes.mjs +15 -8
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
- package/dist/plugins/walrus/wal-swap.mjs +58 -15
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
- package/dist/primitives/artifact-publisher.d.mts +1 -1
- package/dist/primitives/artifact-publisher.mjs +15 -0
- package/dist/primitives/artifact-publisher.mjs.map +1 -0
- package/dist/runtime/docker/client.mjs +17 -4
- package/dist/runtime/docker/client.mjs.map +1 -1
- package/dist/runtime/docker/container.mjs +219 -132
- package/dist/runtime/docker/container.mjs.map +1 -1
- package/dist/runtime/docker/errors.mjs +0 -6
- package/dist/runtime/docker/errors.mjs.map +1 -1
- package/dist/runtime/docker/exec.mjs +21 -18
- package/dist/runtime/docker/exec.mjs.map +1 -1
- package/dist/runtime/docker/image.mjs +36 -13
- package/dist/runtime/docker/image.mjs.map +1 -1
- package/dist/runtime/docker/index.mjs +14 -0
- package/dist/runtime/docker/inspect-and-decode.mjs +51 -0
- package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -0
- package/dist/runtime/docker/inventory.mjs +14 -11
- package/dist/runtime/docker/inventory.mjs.map +1 -1
- package/dist/runtime/docker/labels.mjs +38 -5
- package/dist/runtime/docker/labels.mjs.map +1 -1
- package/dist/runtime/docker/logs.d.mts +1 -1
- package/dist/runtime/docker/logs.mjs.map +1 -1
- package/dist/runtime/docker/network.mjs +83 -47
- package/dist/runtime/docker/network.mjs.map +1 -1
- package/dist/runtime/docker/render-run-args.mjs +82 -0
- package/dist/runtime/docker/render-run-args.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +1 -1
- package/dist/runtime/docker/service.mjs +12 -7
- package/dist/runtime/docker/service.mjs.map +1 -1
- package/dist/runtime/docker/sweep.mjs +118 -43
- package/dist/runtime/docker/sweep.mjs.map +1 -1
- package/dist/runtime/docker/volume.mjs +2 -0
- package/dist/runtime/docker/volume.mjs.map +1 -1
- package/dist/runtime/docker/wrap.mjs +30 -1
- package/dist/runtime/docker/wrap.mjs.map +1 -1
- package/dist/substrate/cross-process.mjs +14 -8
- package/dist/substrate/cross-process.mjs.map +1 -1
- package/dist/substrate/event-time.mjs +33 -0
- package/dist/substrate/event-time.mjs.map +1 -0
- package/dist/substrate/events.d.mts +28 -8
- package/dist/substrate/identity.d.mts +2 -1
- package/dist/substrate/manifest.d.mts +68 -5
- package/dist/substrate/manifest.mjs +34 -5
- package/dist/substrate/manifest.mjs.map +1 -1
- package/dist/substrate/network.d.mts +3 -5
- package/dist/substrate/options.d.mts +0 -2
- package/dist/substrate/plugin.d.mts +13 -0
- package/dist/substrate/plugin.mjs +4 -2
- package/dist/substrate/plugin.mjs.map +1 -1
- package/dist/substrate/projection.d.mts +35 -3
- package/dist/substrate/runtime/artifact-publisher/index.mjs +19 -9
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -1
- package/dist/substrate/runtime/atomic-write.mjs +97 -32
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
- package/dist/substrate/runtime/cache/index.mjs +3 -0
- package/dist/substrate/runtime/cache/schema.mjs +2 -2
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
- package/dist/substrate/runtime/cache/service.mjs +9 -7
- package/dist/substrate/runtime/cache/service.mjs.map +1 -1
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -1
- package/dist/substrate/runtime/capability-sinks/index.mjs +3 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +1 -1
- package/dist/substrate/runtime/capability-sinks/service.d.mts +61 -2
- package/dist/substrate/runtime/capability-sinks/service.mjs +21 -26
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -1
- package/dist/substrate/runtime/config-validation.d.mts +1 -13
- package/dist/substrate/runtime/config-validation.mjs +2 -91
- package/dist/substrate/runtime/config-validation.mjs.map +1 -1
- package/dist/substrate/runtime/container-runtime.d.mts +1 -0
- package/dist/substrate/runtime/container-runtime.mjs +2 -0
- package/dist/substrate/runtime/control-plane/domain.mjs +101 -0
- package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -0
- package/dist/substrate/runtime/control-plane/service.mjs +7 -0
- package/dist/substrate/runtime/control-plane/service.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +46 -19
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +30 -12
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/index.mjs +5 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +11 -2
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +1 -1
- package/dist/substrate/runtime/cross-process/index.mjs +11 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs +34 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +52 -10
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/lock.mjs +23 -0
- package/dist/substrate/runtime/cross-process/lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +64 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +97 -83
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/self-pid.mjs +8 -0
- package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +24 -28
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +41 -20
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
- package/dist/substrate/runtime/current-plugin.mjs +2 -2
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
- package/dist/substrate/runtime/errors.mjs +12 -6
- package/dist/substrate/runtime/errors.mjs.map +1 -1
- package/dist/substrate/runtime/format-unknown-error.mjs +30 -0
- package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs +10 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -0
- package/dist/substrate/runtime/host-gateway.mjs +20 -0
- package/dist/substrate/runtime/host-gateway.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +61 -50
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
- package/dist/substrate/runtime/http-probe.d.mts +1 -1
- package/dist/substrate/runtime/index.mjs +14 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -1
- package/dist/substrate/runtime/lease-broker/index.mjs +2 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +1 -64
- package/dist/substrate/runtime/lease-broker/service.mjs +1 -1
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +22 -3
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/index.mjs +9 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +20 -3
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs +5 -5
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +1 -1
- package/dist/substrate/runtime/managed-container.d.mts +19 -1
- package/dist/substrate/runtime/managed-container.mjs +20 -1
- package/dist/substrate/runtime/managed-container.mjs.map +1 -1
- package/dist/substrate/runtime/manifest/index.mjs +3 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +15 -11
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
- package/dist/substrate/runtime/mode-errors.mjs +20 -0
- package/dist/substrate/runtime/mode-errors.mjs.map +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +9 -13
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
- package/dist/substrate/runtime/observability/formatter-registry.mjs +19 -36
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -1
- package/dist/substrate/runtime/observability/ignore-with-log.d.mts +1 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs +17 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +1 -1
- package/dist/substrate/runtime/observability/index.mjs +13 -0
- package/dist/substrate/runtime/observability/log-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/log-store.mjs +175 -0
- package/dist/substrate/runtime/observability/log-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/logger.d.mts +2 -1
- package/dist/substrate/runtime/observability/logger.mjs +5 -9
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
- package/dist/substrate/runtime/observability/output-truncate.mjs +35 -0
- package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +9 -12
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
- package/dist/substrate/runtime/observability/redaction.d.mts +2 -13
- package/dist/substrate/runtime/observability/redaction.mjs +8 -14
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
- package/dist/substrate/runtime/observability/span-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/span-store.mjs +110 -0
- package/dist/substrate/runtime/observability/span-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +14 -14
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -1
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +1 -1
- package/dist/substrate/runtime/passthrough-or-wrap.mjs +33 -0
- package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +1 -1
- package/dist/substrate/runtime/paths.mjs +4 -3
- package/dist/substrate/runtime/paths.mjs.map +1 -1
- package/dist/substrate/runtime/phase-preserving-produce.mjs +40 -0
- package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.mjs +3 -0
- package/dist/substrate/runtime/port-broker/service.mjs +170 -126
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/probes.d.mts +7 -5
- package/dist/substrate/runtime/probes.mjs +3 -1
- package/dist/substrate/runtime/probes.mjs.map +1 -1
- package/dist/substrate/runtime/projection/index.mjs +4 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +1 -2
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
- package/dist/substrate/runtime/projection/persisted.mjs +33 -15
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -1
- package/dist/substrate/runtime/projection/state-ref.mjs +26 -2
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
- package/dist/substrate/runtime/projection/update.mjs +88 -24
- package/dist/substrate/runtime/projection/update.mjs.map +1 -1
- package/dist/substrate/runtime/random-suffix.mjs +11 -0
- package/dist/substrate/runtime/random-suffix.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +59 -1
- package/dist/substrate/runtime/retry-policy.mjs +66 -1
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
- package/dist/substrate/runtime/routed-url.d.mts +1 -0
- package/dist/substrate/runtime/routed-url.mjs +79 -0
- package/dist/substrate/runtime/routed-url.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +1 -1
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-http-server.mjs +2 -3
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-multimap/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs +52 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +2 -2
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -1
- package/dist/substrate/runtime/stage-and-swap/index.mjs +72 -4
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/index.d.mts +1 -0
- package/dist/substrate/runtime/state-store/index.mjs +3 -0
- package/dist/substrate/runtime/state-store/schema.d.mts +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +19 -14
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/service.d.mts +1 -0
- package/dist/substrate/runtime/state-store/service.mjs +145 -0
- package/dist/substrate/runtime/state-store/service.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs +33 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/index.mjs +4 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +19 -33
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
- package/dist/substrate/runtime/subnet-broker.mjs +60 -0
- package/dist/substrate/runtime/subnet-broker.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +21 -1
- package/dist/substrate/runtime/sui-execute/index.mjs +84 -20
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -1
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.d.mts +1 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs +32 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +1 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs +32 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +93 -19
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/acquire-node.mjs +181 -0
- package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs +144 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs +68 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +151 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/errors.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/errors.mjs +9 -0
- package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/index.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/index.mjs +3 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs +51 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs +250 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/state.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/state.mjs +22 -0
- package/dist/substrate/runtime/supervisor/state.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs +57 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/types.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs +133 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -0
- package/dist/substrate/runtime/typed-env.mjs +8 -0
- package/dist/substrate/runtime/typed-env.mjs.map +1 -0
- package/dist/substrate/state-store.d.mts +1 -0
- package/dist/substrate/versioned-doc-schema.mjs +17 -0
- package/dist/substrate/versioned-doc-schema.mjs.map +1 -0
- package/dist/substrate/versioned-doc-sync.mjs +94 -0
- package/dist/substrate/versioned-doc-sync.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -1
- package/dist/surfaces/cli/commands/index.mjs +9 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs +13 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +3 -2
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune.mjs +34 -17
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
- package/dist/surfaces/cli/commands/status.mjs +2 -2
- package/dist/surfaces/cli/commands/status.mjs.map +1 -1
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +5 -3
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
- package/dist/surfaces/cli/commands/wipe.mjs +38 -4
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
- package/dist/surfaces/cli/errors.mjs +1 -1
- package/dist/surfaces/cli/errors.mjs.map +1 -1
- package/dist/surfaces/cli/flags.mjs +0 -1
- package/dist/surfaces/cli/flags.mjs.map +1 -1
- package/dist/surfaces/cli/index.mjs +98 -18
- package/dist/surfaces/cli/index.mjs.map +1 -1
- package/dist/surfaces/cli/output.mjs +1 -0
- package/dist/surfaces/cli/output.mjs.map +1 -1
- package/dist/surfaces/cli/sysexits.mjs +2 -1
- package/dist/surfaces/cli/sysexits.mjs.map +1 -1
- package/dist/surfaces/tui/app.mjs +25 -3
- package/dist/surfaces/tui/app.mjs.map +1 -1
- package/dist/surfaces/tui/display-derivation.mjs +23 -74
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
- package/dist/surfaces/tui/event-log.mjs +35 -23
- package/dist/surfaces/tui/event-log.mjs.map +1 -1
- package/dist/surfaces/tui/input.mjs +5 -1
- package/dist/surfaces/tui/input.mjs.map +1 -1
- package/dist/surfaces/tui/plain-renderer.mjs +70 -34
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
- package/package.json +24 -4
- package/dist/contracts/liveness-classifier.d.mts +0 -19
- package/dist/contracts/network-resolver.d.mts +0 -15
- package/dist/contracts/network-resolver.mjs +0 -7
- package/dist/contracts/network-resolver.mjs.map +0 -1
- package/dist/orchestrators/codegen/extras.mjs +0 -16
- package/dist/orchestrators/codegen/extras.mjs.map +0 -1
- package/dist/plugins/deepbook/routable.mjs +0 -21
- package/dist/plugins/deepbook/routable.mjs.map +0 -1
- package/dist/plugins/faucet/service.d.mts +0 -20
- package/dist/plugins/faucet/strategies/sui-local.d.mts +0 -23
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +0 -1
- package/dist/plugins/sui/seed-objects.d.mts +0 -18
- package/dist/plugins/sui/seed-objects.mjs +0 -25
- package/dist/plugins/sui/seed-objects.mjs.map +0 -1
- package/dist/runtime/built-in-plugin-layers.mjs.map +0 -1
- package/dist/substrate/runtime/context-helpers.mjs +0 -32
- package/dist/substrate/runtime/context-helpers.mjs.map +0 -1
- package/dist/substrate/runtime/run.mjs.map +0 -1
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +0 -30
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +0 -1
- package/dist/substrate/runtime/supervisor.d.mts +0 -1
- package/dist/substrate/runtime/supervisor.mjs +0 -831
- package/dist/substrate/runtime/supervisor.mjs.map +0 -1
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +0 -1
- /package/dist/{substrate/runtime/strategy-registry/faucet-capability-for.d.mts → plugins/faucet/http.d.mts} +0 -0
|
@@ -0,0 +1,1356 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var yd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pv={exports:{}},kc={};var rE;function yz(){if(rE)return kc;rE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return kc.Fragment=t,kc.jsx=n,kc.jsxs=n,kc}var aE;function vz(){return aE||(aE=1,pv.exports=yz()),pv.exports}var p=vz(),mv={exports:{}},Ce={};var iE;function gz(){if(iE)return Ce;iE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function S(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function O(U,Y,ae){this.props=U,this.context=Y,this.refs=x,this.updater=ae||T}O.prototype.isReactComponent={},O.prototype.setState=function(U,Y){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,Y,"setState")},O.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function E(){}E.prototype=O.prototype;function N(U,Y,ae){this.props=U,this.context=Y,this.refs=x,this.updater=ae||T}var k=N.prototype=new E;k.constructor=N,w(k,O.prototype),k.isPureReactComponent=!0;var A=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function q(U,Y,ae){var he=ae.ref;return{$$typeof:e,type:U,key:Y,ref:he!==void 0?he:null,props:ae}}function G(U,Y){return q(U.type,Y,U.props)}function L(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function P(U){var Y={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(ae){return Y[ae]})}var H=/\/+/g;function F(U,Y){return typeof U=="object"&&U!==null&&U.key!=null?P(""+U.key):Y.toString(36)}function K(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(_,_):(U.status="pending",U.then(function(Y){U.status==="pending"&&(U.status="fulfilled",U.value=Y)},function(Y){U.status==="pending"&&(U.status="rejected",U.reason=Y)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function B(U,Y,ae,he,Se){var Ae=typeof U;(Ae==="undefined"||Ae==="boolean")&&(U=null);var ze=!1;if(U===null)ze=!0;else switch(Ae){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(U.$$typeof){case e:case t:ze=!0;break;case y:return ze=U._init,B(ze(U._payload),Y,ae,he,Se)}}if(ze)return Se=Se(U),ze=he===""?"."+F(U,0):he,A(Se)?(ae="",ze!=null&&(ae=ze.replace(H,"$&/")+"/"),B(Se,Y,ae,"",function(Ne){return Ne})):Se!=null&&(L(Se)&&(Se=G(Se,ae+(Se.key==null||U&&U.key===Se.key?"":(""+Se.key).replace(H,"$&/")+"/")+ze)),Y.push(Se)),1;ze=0;var nt=he===""?".":he+":";if(A(U))for(var de=0;de<U.length;de++)he=U[de],Ae=nt+F(he,de),ze+=B(he,Y,ae,Ae,Se);else if(de=S(U),typeof de=="function")for(U=de.call(U),de=0;!(he=U.next()).done;)he=he.value,Ae=nt+F(he,de++),ze+=B(he,Y,ae,Ae,Se);else if(Ae==="object"){if(typeof U.then=="function")return B(K(U),Y,ae,he,Se);throw Y=String(U),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ze}function D(U,Y,ae){if(U==null)return U;var he=[],Se=0;return B(U,he,"","",function(Ae){return Y.call(ae,Ae,Se++)}),he}function Q(U){if(U._status===-1){var Y=U._result;Y=Y(),Y.then(function(ae){(U._status===0||U._status===-1)&&(U._status=1,U._result=ae)},function(ae){(U._status===0||U._status===-1)&&(U._status=2,U._result=ae)}),U._status===-1&&(U._status=0,U._result=Y)}if(U._status===1)return U._result.default;throw U._result}var se=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},ce={map:D,forEach:function(U,Y,ae){D(U,function(){Y.apply(this,arguments)},ae)},count:function(U){var Y=0;return D(U,function(){Y++}),Y},toArray:function(U){return D(U,function(Y){return Y})||[]},only:function(U){if(!L(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Ce.Activity=m,Ce.Children=ce,Ce.Component=O,Ce.Fragment=n,Ce.Profiler=i,Ce.PureComponent=N,Ce.StrictMode=r,Ce.Suspense=f,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(U){return C.H.useMemoCache(U)}},Ce.cache=function(U){return function(){return U.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(U,Y,ae){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var he=w({},U.props),Se=U.key;if(Y!=null)for(Ae in Y.key!==void 0&&(Se=""+Y.key),Y)!I.call(Y,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&Y.ref===void 0||(he[Ae]=Y[Ae]);var Ae=arguments.length-2;if(Ae===1)he.children=ae;else if(1<Ae){for(var ze=Array(Ae),nt=0;nt<Ae;nt++)ze[nt]=arguments[nt+2];he.children=ze}return q(U.type,Se,he)},Ce.createContext=function(U){return U={$$typeof:l,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:o,_context:U},U},Ce.createElement=function(U,Y,ae){var he,Se={},Ae=null;if(Y!=null)for(he in Y.key!==void 0&&(Ae=""+Y.key),Y)I.call(Y,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Se[he]=Y[he]);var ze=arguments.length-2;if(ze===1)Se.children=ae;else if(1<ze){for(var nt=Array(ze),de=0;de<ze;de++)nt[de]=arguments[de+2];Se.children=nt}if(U&&U.defaultProps)for(he in ze=U.defaultProps,ze)Se[he]===void 0&&(Se[he]=ze[he]);return q(U,Ae,Se)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(U){return{$$typeof:u,render:U}},Ce.isValidElement=L,Ce.lazy=function(U){return{$$typeof:y,_payload:{_status:-1,_result:U},_init:Q}},Ce.memo=function(U,Y){return{$$typeof:h,type:U,compare:Y===void 0?null:Y}},Ce.startTransition=function(U){var Y=C.T,ae={};C.T=ae;try{var he=U(),Se=C.S;Se!==null&&Se(ae,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(_,se)}catch(Ae){se(Ae)}finally{Y!==null&&ae.types!==null&&(Y.types=ae.types),C.T=Y}},Ce.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},Ce.use=function(U){return C.H.use(U)},Ce.useActionState=function(U,Y,ae){return C.H.useActionState(U,Y,ae)},Ce.useCallback=function(U,Y){return C.H.useCallback(U,Y)},Ce.useContext=function(U){return C.H.useContext(U)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(U,Y){return C.H.useDeferredValue(U,Y)},Ce.useEffect=function(U,Y){return C.H.useEffect(U,Y)},Ce.useEffectEvent=function(U){return C.H.useEffectEvent(U)},Ce.useId=function(){return C.H.useId()},Ce.useImperativeHandle=function(U,Y,ae){return C.H.useImperativeHandle(U,Y,ae)},Ce.useInsertionEffect=function(U,Y){return C.H.useInsertionEffect(U,Y)},Ce.useLayoutEffect=function(U,Y){return C.H.useLayoutEffect(U,Y)},Ce.useMemo=function(U,Y){return C.H.useMemo(U,Y)},Ce.useOptimistic=function(U,Y){return C.H.useOptimistic(U,Y)},Ce.useReducer=function(U,Y,ae){return C.H.useReducer(U,Y,ae)},Ce.useRef=function(U){return C.H.useRef(U)},Ce.useState=function(U){return C.H.useState(U)},Ce.useSyncExternalStore=function(U,Y,ae){return C.H.useSyncExternalStore(U,Y,ae)},Ce.useTransition=function(){return C.H.useTransition()},Ce.version="19.2.5",Ce}var sE;function NS(){return sE||(sE=1,mv.exports=gz()),mv.exports}var z=NS();const W=Tt(z);var yv={exports:{}},Cc={},vv={exports:{}},gv={};var oE;function bz(){return oE||(oE=1,(function(e){function t(B,D){var Q=B.length;B.push(D);e:for(;0<Q;){var se=Q-1>>>1,ce=B[se];if(0<i(ce,D))B[se]=D,B[Q]=ce,Q=se;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var D=B[0],Q=B.pop();if(Q!==D){B[0]=Q;e:for(var se=0,ce=B.length,U=ce>>>1;se<U;){var Y=2*(se+1)-1,ae=B[Y],he=Y+1,Se=B[he];if(0>i(ae,Q))he<ce&&0>i(Se,ae)?(B[se]=Se,B[he]=Q,se=he):(B[se]=ae,B[Y]=Q,se=Y);else if(he<ce&&0>i(Se,Q))B[se]=Se,B[he]=Q,se=he;else break e}}return D}function i(B,D){var Q=B.sortIndex-D.sortIndex;return Q!==0?Q:B.id-D.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],y=1,m=null,g=3,S=!1,T=!1,w=!1,x=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function k(B){for(var D=n(h);D!==null;){if(D.callback===null)r(h);else if(D.startTime<=B)r(h),D.sortIndex=D.expirationTime,t(f,D);else break;D=n(h)}}function A(B){if(w=!1,k(B),!T)if(n(f)!==null)T=!0,_||(_=!0,P());else{var D=n(h);D!==null&&K(A,D.startTime-B)}}var _=!1,C=-1,I=5,q=-1;function G(){return x?!0:!(e.unstable_now()-q<I)}function L(){if(x=!1,_){var B=e.unstable_now();q=B;var D=!0;try{e:{T=!1,w&&(w=!1,E(C),C=-1),S=!0;var Q=g;try{t:{for(k(B),m=n(f);m!==null&&!(m.expirationTime>B&&G());){var se=m.callback;if(typeof se=="function"){m.callback=null,g=m.priorityLevel;var ce=se(m.expirationTime<=B);if(B=e.unstable_now(),typeof ce=="function"){m.callback=ce,k(B),D=!0;break t}m===n(f)&&r(f),k(B)}else r(f);m=n(f)}if(m!==null)D=!0;else{var U=n(h);U!==null&&K(A,U.startTime-B),D=!1}}break e}finally{m=null,g=Q,S=!1}D=void 0}}finally{D?P():_=!1}}}var P;if(typeof N=="function")P=function(){N(L)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,F=H.port2;H.port1.onmessage=L,P=function(){F.postMessage(null)}}else P=function(){O(L,0)};function K(B,D){C=O(function(){B(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var D=3;break;default:D=g}var Q=g;g=D;try{return B()}finally{g=Q}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(B,D){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Q=g;g=B;try{return D()}finally{g=Q}},e.unstable_scheduleCallback=function(B,D,Q){var se=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?se+Q:se):Q=se,B){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=Q+ce,B={id:y++,callback:D,priorityLevel:B,startTime:Q,expirationTime:ce,sortIndex:-1},Q>se?(B.sortIndex=Q,t(h,B),n(f)===null&&B===n(h)&&(w?(E(C),C=-1):w=!0,K(A,Q-se))):(B.sortIndex=ce,t(f,B),T||S||(T=!0,_||(_=!0,P()))),B},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(B){var D=g;return function(){var Q=g;g=D;try{return B.apply(this,arguments)}finally{g=Q}}}})(gv)),gv}var lE;function xz(){return lE||(lE=1,vv.exports=bz()),vv.exports}var bv={exports:{}},On={};var cE;function Sz(){if(cE)return On;cE=1;var e=NS();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,h,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:y}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return On.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,On.createPortal=function(f,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,y)},On.flushSync=function(f){var h=l.T,y=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=y,r.d.f()}},On.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},On.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},On.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var y=h.as,m=u(y,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:S}):y==="script"&&r.d.X(f,{crossOrigin:m,integrity:g,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},On.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=u(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},On.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,m=u(y,h.crossOrigin);r.d.L(f,y,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},On.preloadModule=function(f,h){if(typeof f=="string")if(h){var y=u(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},On.requestFormReset=function(f){r.d.r(f)},On.unstable_batchedUpdates=function(f,h){return f(h)},On.useFormState=function(f,h,y){return l.H.useFormState(f,h,y)},On.useFormStatus=function(){return l.H.useHostTransitionStatus()},On.version="19.2.5",On}var uE;function wz(){if(uE)return bv.exports;uE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bv.exports=Sz(),bv.exports}var fE;function Tz(){if(fE)return Cc;fE=1;var e=xz(),t=NS(),n=wz();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,c=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(c=s.return),a=s.return;while(a)}return s.tag===3?c:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function u(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var c=a,d=s;;){var v=c.return;if(v===null)break;var b=v.alternate;if(b===null){if(d=v.return,d!==null){c=d;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===c)return f(v),a;if(b===d)return f(v),s;b=b.sibling}throw Error(r(188))}if(c.return!==d.return)c=v,d=b;else{for(var j=!1,M=v.child;M;){if(M===c){j=!0,c=v,d=b;break}if(M===d){j=!0,d=v,c=b;break}M=M.sibling}if(!j){for(M=b.child;M;){if(M===c){j=!0,c=b,d=v;break}if(M===d){j=!0,d=b,c=v;break}M=M.sibling}if(!j)throw Error(r(189))}}if(c.alternate!==d)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?a:s}function y(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=y(a),s!==null)return s;a=a.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),N=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function P(a){return a===null||typeof a!="object"?null:(a=L&&a[L]||a["@@iterator"],typeof a=="function"?a:null)}var H=Symbol.for("react.client.reference");function F(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===H?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case x:return"StrictMode";case A:return"Suspense";case _:return"SuspenseList";case q:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case T:return"Portal";case N:return a.displayName||"Context";case E:return(a._context.displayName||"Context")+".Consumer";case k:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case C:return s=a.displayName||null,s!==null?s:F(a.type)||"Memo";case I:s=a._payload,a=a._init;try{return F(a(s))}catch{}}return null}var K=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function U(a){return{current:a}}function Y(a){0>ce||(a.current=se[ce],se[ce]=null,ce--)}function ae(a,s){ce++,se[ce]=a.current,a.current=s}var he=U(null),Se=U(null),Ae=U(null),ze=U(null);function nt(a,s){switch(ae(Ae,s),ae(Se,a),ae(he,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?AA(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=AA(s),a=EA(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Y(he),ae(he,a)}function de(){Y(he),Y(Se),Y(Ae)}function Ne(a){a.memoizedState!==null&&ae(ze,a);var s=he.current,c=EA(s,a.type);s!==c&&(ae(Se,a),ae(he,c))}function ke(a){Se.current===a&&(Y(he),Y(Se)),ze.current===a&&(Y(ze),Ac._currentValue=Q)}var ue,Ot;function Re(a){if(ue===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",Ot=-1<c.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ue+a+Ot}var Dt=!1;function Rt(a,s){if(!a||Dt)return"";Dt=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(te){var ee=te}Reflect.construct(a,[],oe)}else{try{oe.call()}catch(te){ee=te}a.call(oe.prototype)}}else{try{throw Error()}catch(te){ee=te}(oe=a())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(te){if(te&&ee&&typeof te.stack=="string")return[te.stack,ee.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),j=b[0],M=b[1];if(j&&M){var $=j.split(`
|
|
4
|
+
`),Z=M.split(`
|
|
5
|
+
`);for(v=d=0;d<$.length&&!$[d].includes("DetermineComponentFrameRoot");)d++;for(;v<Z.length&&!Z[v].includes("DetermineComponentFrameRoot");)v++;if(d===$.length||v===Z.length)for(d=$.length-1,v=Z.length-1;1<=d&&0<=v&&$[d]!==Z[v];)v--;for(;1<=d&&0<=v;d--,v--)if($[d]!==Z[v]){if(d!==1||v!==1)do if(d--,v--,0>v||$[d]!==Z[v]){var ne=`
|
|
6
|
+
`+$[d].replace(" at new "," at ");return a.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",a.displayName)),ne}while(1<=d&&0<=v);break}}}finally{Dt=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?Re(c):""}function wn(a,s){switch(a.tag){case 26:case 27:case 5:return Re(a.type);case 16:return Re("Lazy");case 13:return a.child!==s&&s!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Rt(a.type,!1);case 11:return Rt(a.type.render,!1);case 1:return Rt(a.type,!0);case 31:return Re("Activity");default:return""}}function Lr(a){try{var s="",c=null;do s+=wn(a,c),c=a,a=a.return;while(a);return s}catch(d){return`
|
|
7
|
+
Error generating stack: `+d.message+`
|
|
8
|
+
`+d.stack}}var ta=Object.prototype.hasOwnProperty,si=e.unstable_scheduleCallback,zr=e.unstable_cancelCallback,ba=e.unstable_shouldYield,Bl=e.unstable_requestPaint,Tn=e.unstable_now,Qu=e.unstable_getCurrentPriorityLevel,aT=e.unstable_ImmediatePriority,iT=e.unstable_UserBlockingPriority,Ju=e.unstable_NormalPriority,QU=e.unstable_LowPriority,sT=e.unstable_IdlePriority,JU=e.log,ZU=e.unstable_setDisableYieldValue,Ul=null,er=null;function oi(a){if(typeof JU=="function"&&ZU(a),er&&typeof er.setStrictMode=="function")try{er.setStrictMode(Ul,a)}catch{}}var tr=Math.clz32?Math.clz32:nL,eL=Math.log,tL=Math.LN2;function nL(a){return a>>>=0,a===0?32:31-(eL(a)/tL|0)|0}var Zu=256,ef=262144,tf=4194304;function Qi(a){var s=a&42;if(s!==0)return s;switch(a&-a){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function nf(a,s,c){var d=a.pendingLanes;if(d===0)return 0;var v=0,b=a.suspendedLanes,j=a.pingedLanes;a=a.warmLanes;var M=d&134217727;return M!==0?(d=M&~b,d!==0?v=Qi(d):(j&=M,j!==0?v=Qi(j):c||(c=M&~a,c!==0&&(v=Qi(c))))):(M=d&~b,M!==0?v=Qi(M):j!==0?v=Qi(j):c||(c=d&~a,c!==0&&(v=Qi(c)))),v===0?0:s!==0&&s!==v&&(s&b)===0&&(b=v&-v,c=s&-s,b>=c||b===32&&(c&4194048)!==0)?s:v}function Ll(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function rL(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oT(){var a=tf;return tf<<=1,(tf&62914560)===0&&(tf=4194304),a}function nm(a){for(var s=[],c=0;31>c;c++)s.push(a);return s}function zl(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function aL(a,s,c,d,v,b){var j=a.pendingLanes;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=c,a.entangledLanes&=c,a.errorRecoveryDisabledLanes&=c,a.shellSuspendCounter=0;var M=a.entanglements,$=a.expirationTimes,Z=a.hiddenUpdates;for(c=j&~c;0<c;){var ne=31-tr(c),oe=1<<ne;M[ne]=0,$[ne]=-1;var ee=Z[ne];if(ee!==null)for(Z[ne]=null,ne=0;ne<ee.length;ne++){var te=ee[ne];te!==null&&(te.lane&=-536870913)}c&=~oe}d!==0&&lT(a,d,0),b!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=b&~(j&~s))}function lT(a,s,c){a.pendingLanes|=s,a.suspendedLanes&=~s;var d=31-tr(s);a.entangledLanes|=s,a.entanglements[d]=a.entanglements[d]|1073741824|c&261930}function cT(a,s){var c=a.entangledLanes|=s;for(a=a.entanglements;c;){var d=31-tr(c),v=1<<d;v&s|a[d]&s&&(a[d]|=s),c&=~v}}function uT(a,s){var c=s&-s;return c=(c&42)!==0?1:rm(c),(c&(a.suspendedLanes|s))!==0?0:c}function rm(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function am(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function fT(){var a=D.p;return a!==0?a:(a=window.event,a===void 0?32:KA(a.type))}function dT(a,s){var c=D.p;try{return D.p=a,s()}finally{D.p=c}}var li=Math.random().toString(36).slice(2),hn="__reactFiber$"+li,Un="__reactProps$"+li,Hs="__reactContainer$"+li,im="__reactEvents$"+li,iL="__reactListeners$"+li,sL="__reactHandles$"+li,hT="__reactResources$"+li,$l="__reactMarker$"+li;function sm(a){delete a[hn],delete a[Un],delete a[im],delete a[iL],delete a[sL]}function Ws(a){var s=a[hn];if(s)return s;for(var c=a.parentNode;c;){if(s=c[Hs]||c[hn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(a=RA(a);a!==null;){if(c=a[hn])return c;a=RA(a)}return s}a=c,c=a.parentNode}return null}function Ys(a){if(a=a[hn]||a[Hs]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function ql(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function Xs(a){var s=a[hT];return s||(s=a[hT]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function sn(a){a[$l]=!0}var pT=new Set,mT={};function Ji(a,s){Ks(a,s),Ks(a+"Capture",s)}function Ks(a,s){for(mT[a]=s,a=0;a<s.length;a++)pT.add(s[a])}var oL=RegExp("^[: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]*$"),yT={},vT={};function lL(a){return ta.call(vT,a)?!0:ta.call(yT,a)?!1:oL.test(a)?vT[a]=!0:(yT[a]=!0,!1)}function rf(a,s,c){if(lL(s))if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+c)}}function af(a,s,c){if(c===null)a.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+c)}}function xa(a,s,c,d){if(d===null)a.removeAttribute(c);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttributeNS(s,c,""+d)}}function yr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function gT(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function cL(a,s,c){var d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var v=d.get,b=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(j){c=""+j,b.call(this,j)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return c},setValue:function(j){c=""+j},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function om(a){if(!a._valueTracker){var s=gT(a)?"checked":"value";a._valueTracker=cL(a,s,""+a[s])}}function bT(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var c=s.getValue(),d="";return a&&(d=gT(a)?a.checked?"true":"false":a.value),a=d,a!==c?(s.setValue(a),!0):!1}function sf(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var uL=/[\n"\\]/g;function vr(a){return a.replace(uL,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lm(a,s,c,d,v,b,j,M){a.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?a.type=j:a.removeAttribute("type"),s!=null?j==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+yr(s)):a.value!==""+yr(s)&&(a.value=""+yr(s)):j!=="submit"&&j!=="reset"||a.removeAttribute("value"),s!=null?cm(a,j,yr(s)):c!=null?cm(a,j,yr(c)):d!=null&&a.removeAttribute("value"),v==null&&b!=null&&(a.defaultChecked=!!b),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?a.name=""+yr(M):a.removeAttribute("name")}function xT(a,s,c,d,v,b,j,M){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||s!=null)){om(a);return}c=c!=null?""+yr(c):"",s=s!=null?""+yr(s):c,M||s===a.value||(a.value=s),a.defaultValue=s}d=d??v,d=typeof d!="function"&&typeof d!="symbol"&&!!d,a.checked=M?a.checked:!!d,a.defaultChecked=!!d,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.name=j),om(a)}function cm(a,s,c){s==="number"&&sf(a.ownerDocument)===a||a.defaultValue===""+c||(a.defaultValue=""+c)}function Qs(a,s,c,d){if(a=a.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<a.length;c++)v=s.hasOwnProperty("$"+a[c].value),a[c].selected!==v&&(a[c].selected=v),v&&d&&(a[c].defaultSelected=!0)}else{for(c=""+yr(c),s=null,v=0;v<a.length;v++){if(a[v].value===c){a[v].selected=!0,d&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function ST(a,s,c){if(s!=null&&(s=""+yr(s),s!==a.value&&(a.value=s),c==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=c!=null?""+yr(c):""}function wT(a,s,c,d){if(s==null){if(d!=null){if(c!=null)throw Error(r(92));if(K(d)){if(1<d.length)throw Error(r(93));d=d[0]}c=d}c==null&&(c=""),s=c}c=yr(s),a.defaultValue=c,d=a.textContent,d===c&&d!==""&&d!==null&&(a.value=d),om(a)}function Js(a,s){if(s){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=s;return}}a.textContent=s}var fL=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function TT(a,s,c){var d=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?d?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":d?a.setProperty(s,c):typeof c!="number"||c===0||fL.has(s)?s==="float"?a.cssFloat=c:a[s]=(""+c).trim():a[s]=c+"px"}function OT(a,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,c!=null){for(var d in c)!c.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="");for(var v in s)d=s[v],s.hasOwnProperty(v)&&c[v]!==d&&TT(a,v,d)}else for(var b in s)s.hasOwnProperty(b)&&TT(a,b,s[b])}function um(a){if(a.indexOf("-")===-1)return!1;switch(a){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 dL=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hL=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function of(a){return hL.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Sa(){}var fm=null;function dm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Zs=null,eo=null;function jT(a){var s=Ys(a);if(s&&(a=s.stateNode)){var c=a[Un]||null;e:switch(a=s.stateNode,s.type){case"input":if(lm(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=a;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+vr(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var d=c[s];if(d!==a&&d.form===a.form){var v=d[Un]||null;if(!v)throw Error(r(90));lm(d,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)d=c[s],d.form===a.form&&bT(d)}break e;case"textarea":ST(a,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Qs(a,!!c.multiple,s,!1)}}}var hm=!1;function AT(a,s,c){if(hm)return a(s,c);hm=!0;try{var d=a(s);return d}finally{if(hm=!1,(Zs!==null||eo!==null)&&(Yf(),Zs&&(s=Zs,a=eo,eo=Zs=null,jT(s),a)))for(s=0;s<a.length;s++)jT(a[s])}}function Vl(a,s){var c=a.stateNode;if(c===null)return null;var d=c[Un]||null;if(d===null)return null;c=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!d;break e;default:a=!1}if(a)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var wa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pm=!1;if(wa)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){pm=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{pm=!1}var ci=null,mm=null,lf=null;function ET(){if(lf)return lf;var a,s=mm,c=s.length,d,v="value"in ci?ci.value:ci.textContent,b=v.length;for(a=0;a<c&&s[a]===v[a];a++);var j=c-a;for(d=1;d<=j&&s[c-d]===v[b-d];d++);return lf=v.slice(a,1<d?1-d:void 0)}function cf(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function uf(){return!0}function _T(){return!1}function Ln(a){function s(c,d,v,b,j){this._reactName=c,this._targetInst=v,this.type=d,this.nativeEvent=b,this.target=j,this.currentTarget=null;for(var M in a)a.hasOwnProperty(M)&&(c=a[M],this[M]=c?c(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?uf:_T,this.isPropagationStopped=_T,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=uf)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=uf)},persist:function(){},isPersistent:uf}),s}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ff=Ln(Zi),Gl=m({},Zi,{view:0,detail:0}),pL=Ln(Gl),ym,vm,Hl,df=m({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Hl&&(Hl&&a.type==="mousemove"?(ym=a.screenX-Hl.screenX,vm=a.screenY-Hl.screenY):vm=ym=0,Hl=a),ym)},movementY:function(a){return"movementY"in a?a.movementY:vm}}),NT=Ln(df),mL=m({},df,{dataTransfer:0}),yL=Ln(mL),vL=m({},Gl,{relatedTarget:0}),gm=Ln(vL),gL=m({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),bL=Ln(gL),xL=m({},Zi,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),SL=Ln(xL),wL=m({},Zi,{data:0}),kT=Ln(wL),TL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OL={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AL(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=jL[a])?!!s[a]:!1}function bm(){return AL}var EL=m({},Gl,{key:function(a){if(a.key){var s=TL[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=cf(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?OL[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(a){return a.type==="keypress"?cf(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?cf(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),_L=Ln(EL),NL=m({},df,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),CT=Ln(NL),kL=m({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),CL=Ln(kL),ML=m({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),DL=Ln(ML),RL=m({},df,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),IL=Ln(RL),PL=m({},Zi,{newState:0,oldState:0}),BL=Ln(PL),UL=[9,13,27,32],xm=wa&&"CompositionEvent"in window,Wl=null;wa&&"documentMode"in document&&(Wl=document.documentMode);var LL=wa&&"TextEvent"in window&&!Wl,MT=wa&&(!xm||Wl&&8<Wl&&11>=Wl),DT=" ",RT=!1;function IT(a,s){switch(a){case"keyup":return UL.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PT(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var to=!1;function zL(a,s){switch(a){case"compositionend":return PT(s);case"keypress":return s.which!==32?null:(RT=!0,DT);case"textInput":return a=s.data,a===DT&&RT?null:a;default:return null}}function $L(a,s){if(to)return a==="compositionend"||!xm&&IT(a,s)?(a=ET(),lf=mm=ci=null,to=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return MT&&s.locale!=="ko"?null:s.data;default:return null}}var qL={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function BT(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!qL[a.type]:s==="textarea"}function UT(a,s,c,d){Zs?eo?eo.push(d):eo=[d]:Zs=d,s=td(s,"onChange"),0<s.length&&(c=new ff("onChange","change",null,c,d),a.push({event:c,listeners:s}))}var Yl=null,Xl=null;function VL(a){xA(a,0)}function hf(a){var s=ql(a);if(bT(s))return a}function LT(a,s){if(a==="change")return s}var zT=!1;if(wa){var Sm;if(wa){var wm="oninput"in document;if(!wm){var $T=document.createElement("div");$T.setAttribute("oninput","return;"),wm=typeof $T.oninput=="function"}Sm=wm}else Sm=!1;zT=Sm&&(!document.documentMode||9<document.documentMode)}function qT(){Yl&&(Yl.detachEvent("onpropertychange",VT),Xl=Yl=null)}function VT(a){if(a.propertyName==="value"&&hf(Xl)){var s=[];UT(s,Xl,a,dm(a)),AT(VL,s)}}function FL(a,s,c){a==="focusin"?(qT(),Yl=s,Xl=c,Yl.attachEvent("onpropertychange",VT)):a==="focusout"&&qT()}function GL(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return hf(Xl)}function HL(a,s){if(a==="click")return hf(s)}function WL(a,s){if(a==="input"||a==="change")return hf(s)}function YL(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var nr=typeof Object.is=="function"?Object.is:YL;function Kl(a,s){if(nr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var c=Object.keys(a),d=Object.keys(s);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var v=c[d];if(!ta.call(s,v)||!nr(a[v],s[v]))return!1}return!0}function FT(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function GT(a,s){var c=FT(a);a=0;for(var d;c;){if(c.nodeType===3){if(d=a+c.textContent.length,a<=s&&d>=s)return{node:c,offset:s-a};a=d}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=FT(c)}}function HT(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?HT(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function WT(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=sf(a.document);s instanceof a.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)a=s.contentWindow;else break;s=sf(a.document)}return s}function Tm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var XL=wa&&"documentMode"in document&&11>=document.documentMode,no=null,Om=null,Ql=null,jm=!1;function YT(a,s,c){var d=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;jm||no==null||no!==sf(d)||(d=no,"selectionStart"in d&&Tm(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ql&&Kl(Ql,d)||(Ql=d,d=td(Om,"onSelect"),0<d.length&&(s=new ff("onSelect","select",null,s,c),a.push({event:s,listeners:d}),s.target=no)))}function es(a,s){var c={};return c[a.toLowerCase()]=s.toLowerCase(),c["Webkit"+a]="webkit"+s,c["Moz"+a]="moz"+s,c}var ro={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},Am={},XT={};wa&&(XT=document.createElement("div").style,"AnimationEvent"in window||(delete ro.animationend.animation,delete ro.animationiteration.animation,delete ro.animationstart.animation),"TransitionEvent"in window||delete ro.transitionend.transition);function ts(a){if(Am[a])return Am[a];if(!ro[a])return a;var s=ro[a],c;for(c in s)if(s.hasOwnProperty(c)&&c in XT)return Am[a]=s[c];return a}var KT=ts("animationend"),QT=ts("animationiteration"),JT=ts("animationstart"),KL=ts("transitionrun"),QL=ts("transitionstart"),JL=ts("transitioncancel"),ZT=ts("transitionend"),eO=new Map,Em="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Em.push("scrollEnd");function $r(a,s){eO.set(a,s),Ji(s,[a])}var pf=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},gr=[],ao=0,_m=0;function mf(){for(var a=ao,s=_m=ao=0;s<a;){var c=gr[s];gr[s++]=null;var d=gr[s];gr[s++]=null;var v=gr[s];gr[s++]=null;var b=gr[s];if(gr[s++]=null,d!==null&&v!==null){var j=d.pending;j===null?v.next=v:(v.next=j.next,j.next=v),d.pending=v}b!==0&&tO(c,v,b)}}function yf(a,s,c,d){gr[ao++]=a,gr[ao++]=s,gr[ao++]=c,gr[ao++]=d,_m|=d,a.lanes|=d,a=a.alternate,a!==null&&(a.lanes|=d)}function Nm(a,s,c,d){return yf(a,s,c,d),vf(a)}function ns(a,s){return yf(a,null,null,s),vf(a)}function tO(a,s,c){a.lanes|=c;var d=a.alternate;d!==null&&(d.lanes|=c);for(var v=!1,b=a.return;b!==null;)b.childLanes|=c,d=b.alternate,d!==null&&(d.childLanes|=c),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(v=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,v&&s!==null&&(v=31-tr(c),a=b.hiddenUpdates,d=a[v],d===null?a[v]=[s]:d.push(s),s.lane=c|536870912),b):null}function vf(a){if(50<bc)throw bc=0,Uy=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var io={};function ZL(a,s,c,d){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(a,s,c,d){return new ZL(a,s,c,d)}function km(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ta(a,s){var c=a.alternate;return c===null?(c=rr(a.tag,s,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=s,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&65011712,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,s=a.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c.refCleanup=a.refCleanup,c}function nO(a,s){a.flags&=65011714;var c=a.alternate;return c===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,s=c.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function gf(a,s,c,d,v,b){var j=0;if(d=a,typeof a=="function")km(a)&&(j=1);else if(typeof a=="string")j=az(a,c,he.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case q:return a=rr(31,c,s,v),a.elementType=q,a.lanes=b,a;case w:return rs(c.children,v,b,s);case x:j=8,v|=24;break;case O:return a=rr(12,c,s,v|2),a.elementType=O,a.lanes=b,a;case A:return a=rr(13,c,s,v),a.elementType=A,a.lanes=b,a;case _:return a=rr(19,c,s,v),a.elementType=_,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:j=10;break e;case E:j=9;break e;case k:j=11;break e;case C:j=14;break e;case I:j=16,d=null;break e}j=29,c=Error(r(130,a===null?"null":typeof a,"")),d=null}return s=rr(j,c,s,v),s.elementType=a,s.type=d,s.lanes=b,s}function rs(a,s,c,d){return a=rr(7,a,d,s),a.lanes=c,a}function Cm(a,s,c){return a=rr(6,a,null,s),a.lanes=c,a}function rO(a){var s=rr(18,null,null,0);return s.stateNode=a,s}function Mm(a,s,c){return s=rr(4,a.children!==null?a.children:[],a.key,s),s.lanes=c,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var aO=new WeakMap;function br(a,s){if(typeof a=="object"&&a!==null){var c=aO.get(a);return c!==void 0?c:(s={value:a,source:s,stack:Lr(s)},aO.set(a,s),s)}return{value:a,source:s,stack:Lr(s)}}var so=[],oo=0,bf=null,Jl=0,xr=[],Sr=0,ui=null,na=1,ra="";function Oa(a,s){so[oo++]=Jl,so[oo++]=bf,bf=a,Jl=s}function iO(a,s,c){xr[Sr++]=na,xr[Sr++]=ra,xr[Sr++]=ui,ui=a;var d=na;a=ra;var v=32-tr(d)-1;d&=~(1<<v),c+=1;var b=32-tr(s)+v;if(30<b){var j=v-v%5;b=(d&(1<<j)-1).toString(32),d>>=j,v-=j,na=1<<32-tr(s)+v|c<<v|d,ra=b+a}else na=1<<b|c<<v|d,ra=a}function Dm(a){a.return!==null&&(Oa(a,1),iO(a,1,0))}function Rm(a){for(;a===bf;)bf=so[--oo],so[oo]=null,Jl=so[--oo],so[oo]=null;for(;a===ui;)ui=xr[--Sr],xr[Sr]=null,ra=xr[--Sr],xr[Sr]=null,na=xr[--Sr],xr[Sr]=null}function sO(a,s){xr[Sr++]=na,xr[Sr++]=ra,xr[Sr++]=ui,na=s.id,ra=s.overflow,ui=a}var pn=null,jt=null,We=!1,fi=null,wr=!1,Im=Error(r(519));function di(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zl(br(s,a)),Im}function oO(a){var s=a.stateNode,c=a.type,d=a.memoizedProps;switch(s[hn]=a,s[Un]=d,c){case"dialog":qe("cancel",s),qe("close",s);break;case"iframe":case"object":case"embed":qe("load",s);break;case"video":case"audio":for(c=0;c<Sc.length;c++)qe(Sc[c],s);break;case"source":qe("error",s);break;case"img":case"image":case"link":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"input":qe("invalid",s),xT(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":qe("invalid",s);break;case"textarea":qe("invalid",s),wT(s,d.value,d.defaultValue,d.children)}c=d.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||d.suppressHydrationWarning===!0||OA(s.textContent,c)?(d.popover!=null&&(qe("beforetoggle",s),qe("toggle",s)),d.onScroll!=null&&qe("scroll",s),d.onScrollEnd!=null&&qe("scrollend",s),d.onClick!=null&&(s.onclick=Sa),s=!0):s=!1,s||di(a,!0)}function lO(a){for(pn=a.return;pn;)switch(pn.tag){case 5:case 31:case 13:wr=!1;return;case 27:case 3:wr=!0;return;default:pn=pn.return}}function lo(a){if(a!==pn)return!1;if(!We)return lO(a),We=!0,!1;var s=a.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=a.type,c=!(c!=="form"&&c!=="button")||Zy(a.type,a.memoizedProps)),c=!c),c&&jt&&di(a),lO(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));jt=DA(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));jt=DA(a)}else s===27?(s=jt,Ai(a.type)?(a=av,av=null,jt=a):jt=s):jt=pn?Or(a.stateNode.nextSibling):null;return!0}function as(){jt=pn=null,We=!1}function Pm(){var a=fi;return a!==null&&(Vn===null?Vn=a:Vn.push.apply(Vn,a),fi=null),a}function Zl(a){fi===null?fi=[a]:fi.push(a)}var Bm=U(null),is=null,ja=null;function hi(a,s,c){ae(Bm,s._currentValue),s._currentValue=c}function Aa(a){a._currentValue=Bm.current,Y(Bm)}function Um(a,s,c){for(;a!==null;){var d=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),a===c)break;a=a.return}}function Lm(a,s,c,d){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var b=v.dependencies;if(b!==null){var j=v.child;b=b.firstContext;e:for(;b!==null;){var M=b;b=v;for(var $=0;$<s.length;$++)if(M.context===s[$]){b.lanes|=c,M=b.alternate,M!==null&&(M.lanes|=c),Um(b.return,c,a),d||(j=null);break e}b=M.next}}else if(v.tag===18){if(j=v.return,j===null)throw Error(r(341));j.lanes|=c,b=j.alternate,b!==null&&(b.lanes|=c),Um(j,c,a),j=null}else j=v.child;if(j!==null)j.return=v;else for(j=v;j!==null;){if(j===a){j=null;break}if(v=j.sibling,v!==null){v.return=j.return,j=v;break}j=j.return}v=j}}function co(a,s,c,d){a=null;for(var v=s,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var j=v.alternate;if(j===null)throw Error(r(387));if(j=j.memoizedProps,j!==null){var M=v.type;nr(v.pendingProps.value,j.value)||(a!==null?a.push(M):a=[M])}}else if(v===ze.current){if(j=v.alternate,j===null)throw Error(r(387));j.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(Ac):a=[Ac])}v=v.return}a!==null&&Lm(s,a,c,d),s.flags|=262144}function xf(a){for(a=a.firstContext;a!==null;){if(!nr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ss(a){is=a,ja=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function mn(a){return cO(is,a)}function Sf(a,s){return is===null&&ss(a),cO(a,s)}function cO(a,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},ja===null){if(a===null)throw Error(r(308));ja=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ja=ja.next=s;return c}var e6=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(c,d){a.push(d)}};this.abort=function(){s.aborted=!0,a.forEach(function(c){return c()})}},t6=e.unstable_scheduleCallback,n6=e.unstable_NormalPriority,Ft={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zm(){return{controller:new e6,data:new Map,refCount:0}}function ec(a){a.refCount--,a.refCount===0&&t6(n6,function(){a.controller.abort()})}var tc=null,$m=0,uo=0,fo=null;function r6(a,s){if(tc===null){var c=tc=[];$m=0,uo=Fy(),fo={status:"pending",value:void 0,then:function(d){c.push(d)}}}return $m++,s.then(uO,uO),s}function uO(){if(--$m===0&&tc!==null){fo!==null&&(fo.status="fulfilled");var a=tc;tc=null,uo=0,fo=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function a6(a,s){var c=[],d={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return a.then(function(){d.status="fulfilled",d.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(d.status="rejected",d.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),d}var fO=B.S;B.S=function(a,s){Yj=Tn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&r6(a,s),fO!==null&&fO(a,s)};var os=U(null);function qm(){var a=os.current;return a!==null?a:yt.pooledCache}function wf(a,s){s===null?ae(os,os.current):ae(os,s.pool)}function dO(){var a=qm();return a===null?null:{parent:Ft._currentValue,pool:a}}var ho=Error(r(460)),Vm=Error(r(474)),Tf=Error(r(542)),Of={then:function(){}};function hO(a){return a=a.status,a==="fulfilled"||a==="rejected"}function pO(a,s,c){switch(c=a[c],c===void 0?a.push(s):c!==s&&(s.then(Sa,Sa),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,yO(a),a;default:if(typeof s.status=="string")s.then(Sa,Sa);else{if(a=yt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(d){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=d}},function(d){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,yO(a),a}throw cs=s,ho}}function ls(a){try{var s=a._init;return s(a._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(cs=c,ho):c}}var cs=null;function mO(){if(cs===null)throw Error(r(459));var a=cs;return cs=null,a}function yO(a){if(a===ho||a===Tf)throw Error(r(483))}var po=null,nc=0;function jf(a){var s=nc;return nc+=1,po===null&&(po=[]),pO(po,a,s)}function rc(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Af(a,s){throw s.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function vO(a){function s(X,V){if(a){var J=X.deletions;J===null?(X.deletions=[V],X.flags|=16):J.push(V)}}function c(X,V){if(!a)return null;for(;V!==null;)s(X,V),V=V.sibling;return null}function d(X){for(var V=new Map;X!==null;)X.key!==null?V.set(X.key,X):V.set(X.index,X),X=X.sibling;return V}function v(X,V){return X=Ta(X,V),X.index=0,X.sibling=null,X}function b(X,V,J){return X.index=J,a?(J=X.alternate,J!==null?(J=J.index,J<V?(X.flags|=67108866,V):J):(X.flags|=67108866,V)):(X.flags|=1048576,V)}function j(X){return a&&X.alternate===null&&(X.flags|=67108866),X}function M(X,V,J,ie){return V===null||V.tag!==6?(V=Cm(J,X.mode,ie),V.return=X,V):(V=v(V,J),V.return=X,V)}function $(X,V,J,ie){var je=J.type;return je===w?ne(X,V,J.props.children,ie,J.key):V!==null&&(V.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===I&&ls(je)===V.type)?(V=v(V,J.props),rc(V,J),V.return=X,V):(V=gf(J.type,J.key,J.props,null,X.mode,ie),rc(V,J),V.return=X,V)}function Z(X,V,J,ie){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=Mm(J,X.mode,ie),V.return=X,V):(V=v(V,J.children||[]),V.return=X,V)}function ne(X,V,J,ie,je){return V===null||V.tag!==7?(V=rs(J,X.mode,ie,je),V.return=X,V):(V=v(V,J),V.return=X,V)}function oe(X,V,J){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Cm(""+V,X.mode,J),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return J=gf(V.type,V.key,V.props,null,X.mode,J),rc(J,V),J.return=X,J;case T:return V=Mm(V,X.mode,J),V.return=X,V;case I:return V=ls(V),oe(X,V,J)}if(K(V)||P(V))return V=rs(V,X.mode,J,null),V.return=X,V;if(typeof V.then=="function")return oe(X,jf(V),J);if(V.$$typeof===N)return oe(X,Sf(X,V),J);Af(X,V)}return null}function ee(X,V,J,ie){var je=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return je!==null?null:M(X,V,""+J,ie);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case S:return J.key===je?$(X,V,J,ie):null;case T:return J.key===je?Z(X,V,J,ie):null;case I:return J=ls(J),ee(X,V,J,ie)}if(K(J)||P(J))return je!==null?null:ne(X,V,J,ie,null);if(typeof J.then=="function")return ee(X,V,jf(J),ie);if(J.$$typeof===N)return ee(X,V,Sf(X,J),ie);Af(X,J)}return null}function te(X,V,J,ie,je){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return X=X.get(J)||null,M(V,X,""+ie,je);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case S:return X=X.get(ie.key===null?J:ie.key)||null,$(V,X,ie,je);case T:return X=X.get(ie.key===null?J:ie.key)||null,Z(V,X,ie,je);case I:return ie=ls(ie),te(X,V,J,ie,je)}if(K(ie)||P(ie))return X=X.get(J)||null,ne(V,X,ie,je,null);if(typeof ie.then=="function")return te(X,V,J,jf(ie),je);if(ie.$$typeof===N)return te(X,V,J,Sf(V,ie),je);Af(V,ie)}return null}function be(X,V,J,ie){for(var je=null,Ke=null,Te=V,Ie=V=0,Fe=null;Te!==null&&Ie<J.length;Ie++){Te.index>Ie?(Fe=Te,Te=null):Fe=Te.sibling;var Qe=ee(X,Te,J[Ie],ie);if(Qe===null){Te===null&&(Te=Fe);break}a&&Te&&Qe.alternate===null&&s(X,Te),V=b(Qe,V,Ie),Ke===null?je=Qe:Ke.sibling=Qe,Ke=Qe,Te=Fe}if(Ie===J.length)return c(X,Te),We&&Oa(X,Ie),je;if(Te===null){for(;Ie<J.length;Ie++)Te=oe(X,J[Ie],ie),Te!==null&&(V=b(Te,V,Ie),Ke===null?je=Te:Ke.sibling=Te,Ke=Te);return We&&Oa(X,Ie),je}for(Te=d(Te);Ie<J.length;Ie++)Fe=te(Te,X,Ie,J[Ie],ie),Fe!==null&&(a&&Fe.alternate!==null&&Te.delete(Fe.key===null?Ie:Fe.key),V=b(Fe,V,Ie),Ke===null?je=Fe:Ke.sibling=Fe,Ke=Fe);return a&&Te.forEach(function(Ci){return s(X,Ci)}),We&&Oa(X,Ie),je}function Ee(X,V,J,ie){if(J==null)throw Error(r(151));for(var je=null,Ke=null,Te=V,Ie=V=0,Fe=null,Qe=J.next();Te!==null&&!Qe.done;Ie++,Qe=J.next()){Te.index>Ie?(Fe=Te,Te=null):Fe=Te.sibling;var Ci=ee(X,Te,Qe.value,ie);if(Ci===null){Te===null&&(Te=Fe);break}a&&Te&&Ci.alternate===null&&s(X,Te),V=b(Ci,V,Ie),Ke===null?je=Ci:Ke.sibling=Ci,Ke=Ci,Te=Fe}if(Qe.done)return c(X,Te),We&&Oa(X,Ie),je;if(Te===null){for(;!Qe.done;Ie++,Qe=J.next())Qe=oe(X,Qe.value,ie),Qe!==null&&(V=b(Qe,V,Ie),Ke===null?je=Qe:Ke.sibling=Qe,Ke=Qe);return We&&Oa(X,Ie),je}for(Te=d(Te);!Qe.done;Ie++,Qe=J.next())Qe=te(Te,X,Ie,Qe.value,ie),Qe!==null&&(a&&Qe.alternate!==null&&Te.delete(Qe.key===null?Ie:Qe.key),V=b(Qe,V,Ie),Ke===null?je=Qe:Ke.sibling=Qe,Ke=Qe);return a&&Te.forEach(function(mz){return s(X,mz)}),We&&Oa(X,Ie),je}function ft(X,V,J,ie){if(typeof J=="object"&&J!==null&&J.type===w&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case S:e:{for(var je=J.key;V!==null;){if(V.key===je){if(je=J.type,je===w){if(V.tag===7){c(X,V.sibling),ie=v(V,J.props.children),ie.return=X,X=ie;break e}}else if(V.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===I&&ls(je)===V.type){c(X,V.sibling),ie=v(V,J.props),rc(ie,J),ie.return=X,X=ie;break e}c(X,V);break}else s(X,V);V=V.sibling}J.type===w?(ie=rs(J.props.children,X.mode,ie,J.key),ie.return=X,X=ie):(ie=gf(J.type,J.key,J.props,null,X.mode,ie),rc(ie,J),ie.return=X,X=ie)}return j(X);case T:e:{for(je=J.key;V!==null;){if(V.key===je)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){c(X,V.sibling),ie=v(V,J.children||[]),ie.return=X,X=ie;break e}else{c(X,V);break}else s(X,V);V=V.sibling}ie=Mm(J,X.mode,ie),ie.return=X,X=ie}return j(X);case I:return J=ls(J),ft(X,V,J,ie)}if(K(J))return be(X,V,J,ie);if(P(J)){if(je=P(J),typeof je!="function")throw Error(r(150));return J=je.call(J),Ee(X,V,J,ie)}if(typeof J.then=="function")return ft(X,V,jf(J),ie);if(J.$$typeof===N)return ft(X,V,Sf(X,J),ie);Af(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,V!==null&&V.tag===6?(c(X,V.sibling),ie=v(V,J),ie.return=X,X=ie):(c(X,V),ie=Cm(J,X.mode,ie),ie.return=X,X=ie),j(X)):c(X,V)}return function(X,V,J,ie){try{nc=0;var je=ft(X,V,J,ie);return po=null,je}catch(Te){if(Te===ho||Te===Tf)throw Te;var Ke=rr(29,Te,null,X.mode);return Ke.lanes=ie,Ke.return=X,Ke}}}var us=vO(!0),gO=vO(!1),pi=!1;function Fm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gm(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function mi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function yi(a,s,c){var d=a.updateQueue;if(d===null)return null;if(d=d.shared,(et&2)!==0){var v=d.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),d.pending=s,s=vf(a),tO(a,null,c),s}return yf(a,d,s,c),vf(a)}function ac(a,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var d=s.lanes;d&=a.pendingLanes,c|=d,s.lanes=c,cT(a,c)}}function Hm(a,s){var c=a.updateQueue,d=a.alternate;if(d!==null&&(d=d.updateQueue,c===d)){var v=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var j={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};b===null?v=b=j:b=b.next=j,c=c.next}while(c!==null);b===null?v=b=s:b=b.next=s}else v=b=s;c={baseState:d.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=s:a.next=s,c.lastBaseUpdate=s}var Wm=!1;function ic(){if(Wm){var a=fo;if(a!==null)throw a}}function sc(a,s,c,d){Wm=!1;var v=a.updateQueue;pi=!1;var b=v.firstBaseUpdate,j=v.lastBaseUpdate,M=v.shared.pending;if(M!==null){v.shared.pending=null;var $=M,Z=$.next;$.next=null,j===null?b=Z:j.next=Z,j=$;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,M=ne.lastBaseUpdate,M!==j&&(M===null?ne.firstBaseUpdate=Z:M.next=Z,ne.lastBaseUpdate=$))}if(b!==null){var oe=v.baseState;j=0,ne=Z=$=null,M=b;do{var ee=M.lane&-536870913,te=ee!==M.lane;if(te?(Ve&ee)===ee:(d&ee)===ee){ee!==0&&ee===uo&&(Wm=!0),ne!==null&&(ne=ne.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var be=a,Ee=M;ee=s;var ft=c;switch(Ee.tag){case 1:if(be=Ee.payload,typeof be=="function"){oe=be.call(ft,oe,ee);break e}oe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ee.payload,ee=typeof be=="function"?be.call(ft,oe,ee):be,ee==null)break e;oe=m({},oe,ee);break e;case 2:pi=!0}}ee=M.callback,ee!==null&&(a.flags|=64,te&&(a.flags|=8192),te=v.callbacks,te===null?v.callbacks=[ee]:te.push(ee))}else te={lane:ee,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ne===null?(Z=ne=te,$=oe):ne=ne.next=te,j|=ee;if(M=M.next,M===null){if(M=v.shared.pending,M===null)break;te=M,M=te.next,te.next=null,v.lastBaseUpdate=te,v.shared.pending=null}}while(!0);ne===null&&($=oe),v.baseState=$,v.firstBaseUpdate=Z,v.lastBaseUpdate=ne,b===null&&(v.shared.lanes=0),Si|=j,a.lanes=j,a.memoizedState=oe}}function bO(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function xO(a,s){var c=a.callbacks;if(c!==null)for(a.callbacks=null,a=0;a<c.length;a++)bO(c[a],s)}var mo=U(null),Ef=U(0);function SO(a,s){a=Ia,ae(Ef,a),ae(mo,s),Ia=a|s.baseLanes}function Ym(){ae(Ef,Ia),ae(mo,mo.current)}function Xm(){Ia=Ef.current,Y(mo),Y(Ef)}var ar=U(null),Tr=null;function vi(a){var s=a.alternate;ae(zt,zt.current&1),ae(ar,a),Tr===null&&(s===null||mo.current!==null||s.memoizedState!==null)&&(Tr=a)}function Km(a){ae(zt,zt.current),ae(ar,a),Tr===null&&(Tr=a)}function wO(a){a.tag===22?(ae(zt,zt.current),ae(ar,a),Tr===null&&(Tr=a)):gi()}function gi(){ae(zt,zt.current),ae(ar,ar.current)}function ir(a){Y(ar),Tr===a&&(Tr=null),Y(zt)}var zt=U(0);function _f(a){for(var s=a;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||nv(c)||rv(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ea=0,De=null,ct=null,Gt=null,Nf=!1,yo=!1,fs=!1,kf=0,oc=0,vo=null,i6=0;function It(){throw Error(r(321))}function Qm(a,s){if(s===null)return!1;for(var c=0;c<s.length&&c<a.length;c++)if(!nr(a[c],s[c]))return!1;return!0}function Jm(a,s,c,d,v,b){return Ea=b,De=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=a===null||a.memoizedState===null?ij:hy,fs=!1,b=c(d,v),fs=!1,yo&&(b=OO(s,c,d,v)),TO(a),b}function TO(a){B.H=uc;var s=ct!==null&&ct.next!==null;if(Ea=0,Gt=ct=De=null,Nf=!1,oc=0,vo=null,s)throw Error(r(300));a===null||Ht||(a=a.dependencies,a!==null&&xf(a)&&(Ht=!0))}function OO(a,s,c,d){De=a;var v=0;do{if(yo&&(vo=null),oc=0,yo=!1,25<=v)throw Error(r(301));if(v+=1,Gt=ct=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=sj,b=s(c,d)}while(yo);return b}function s6(){var a=B.H,s=a.useState()[0];return s=typeof s.then=="function"?lc(s):s,a=a.useState()[0],(ct!==null?ct.memoizedState:null)!==a&&(De.flags|=1024),s}function Zm(){var a=kf!==0;return kf=0,a}function ey(a,s,c){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~c}function ty(a){if(Nf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Nf=!1}Ea=0,Gt=ct=De=null,yo=!1,oc=kf=0,vo=null}function Dn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?De.memoizedState=Gt=a:Gt=Gt.next=a,Gt}function $t(){if(ct===null){var a=De.alternate;a=a!==null?a.memoizedState:null}else a=ct.next;var s=Gt===null?De.memoizedState:Gt.next;if(s!==null)Gt=s,ct=a;else{if(a===null)throw De.alternate===null?Error(r(467)):Error(r(310));ct=a,a={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},Gt===null?De.memoizedState=Gt=a:Gt=Gt.next=a}return Gt}function Cf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lc(a){var s=oc;return oc+=1,vo===null&&(vo=[]),a=pO(vo,a,s),s=De,(Gt===null?s.memoizedState:Gt.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?ij:hy),a}function Mf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return lc(a);if(a.$$typeof===N)return mn(a)}throw Error(r(438,String(a)))}function ny(a){var s=null,c=De.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var d=De.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Cf(),De.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(a),d=0;d<a;d++)c[d]=G;return s.index++,c}function _a(a,s){return typeof s=="function"?s(a):s}function Df(a){var s=$t();return ry(s,ct,a)}function ry(a,s,c){var d=a.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=c;var v=a.baseQueue,b=d.pending;if(b!==null){if(v!==null){var j=v.next;v.next=b.next,b.next=j}s.baseQueue=v=b,d.pending=null}if(b=a.baseState,v===null)a.memoizedState=b;else{s=v.next;var M=j=null,$=null,Z=s,ne=!1;do{var oe=Z.lane&-536870913;if(oe!==Z.lane?(Ve&oe)===oe:(Ea&oe)===oe){var ee=Z.revertLane;if(ee===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),oe===uo&&(ne=!0);else if((Ea&ee)===ee){Z=Z.next,ee===uo&&(ne=!0);continue}else oe={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},$===null?(M=$=oe,j=b):$=$.next=oe,De.lanes|=ee,Si|=ee;oe=Z.action,fs&&c(b,oe),b=Z.hasEagerState?Z.eagerState:c(b,oe)}else ee={lane:oe,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},$===null?(M=$=ee,j=b):$=$.next=ee,De.lanes|=oe,Si|=oe;Z=Z.next}while(Z!==null&&Z!==s);if($===null?j=b:$.next=M,!nr(b,a.memoizedState)&&(Ht=!0,ne&&(c=fo,c!==null)))throw c;a.memoizedState=b,a.baseState=j,a.baseQueue=$,d.lastRenderedState=b}return v===null&&(d.lanes=0),[a.memoizedState,d.dispatch]}function ay(a){var s=$t(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var d=c.dispatch,v=c.pending,b=s.memoizedState;if(v!==null){c.pending=null;var j=v=v.next;do b=a(b,j.action),j=j.next;while(j!==v);nr(b,s.memoizedState)||(Ht=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,d]}function jO(a,s,c){var d=De,v=$t(),b=We;if(b){if(c===void 0)throw Error(r(407));c=c()}else c=s();var j=!nr((ct||v).memoizedState,c);if(j&&(v.memoizedState=c,Ht=!0),v=v.queue,oy(_O.bind(null,d,v,a),[a]),v.getSnapshot!==s||j||Gt!==null&&Gt.memoizedState.tag&1){if(d.flags|=2048,go(9,{destroy:void 0},EO.bind(null,d,v,c,s),null),yt===null)throw Error(r(349));b||(Ea&127)!==0||AO(d,s,c)}return c}function AO(a,s,c){a.flags|=16384,a={getSnapshot:s,value:c},s=De.updateQueue,s===null?(s=Cf(),De.updateQueue=s,s.stores=[a]):(c=s.stores,c===null?s.stores=[a]:c.push(a))}function EO(a,s,c,d){s.value=c,s.getSnapshot=d,NO(s)&&kO(a)}function _O(a,s,c){return c(function(){NO(s)&&kO(a)})}function NO(a){var s=a.getSnapshot;a=a.value;try{var c=s();return!nr(a,c)}catch{return!0}}function kO(a){var s=ns(a,2);s!==null&&Fn(s,a,2)}function iy(a){var s=Dn();if(typeof a=="function"){var c=a;if(a=c(),fs){oi(!0);try{c()}finally{oi(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:a},s}function CO(a,s,c,d){return a.baseState=c,ry(a,ct,typeof d=="function"?d:_a)}function o6(a,s,c,d,v){if(Pf(a))throw Error(r(485));if(a=s.action,a!==null){var b={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){b.listeners.push(j)}};B.T!==null?c(!0):b.isTransition=!1,d(b),c=s.pending,c===null?(b.next=s.pending=b,MO(s,b)):(b.next=c.next,s.pending=c.next=b)}}function MO(a,s){var c=s.action,d=s.payload,v=a.state;if(s.isTransition){var b=B.T,j={};B.T=j;try{var M=c(v,d),$=B.S;$!==null&&$(j,M),DO(a,s,M)}catch(Z){sy(a,s,Z)}finally{b!==null&&j.types!==null&&(b.types=j.types),B.T=b}}else try{b=c(v,d),DO(a,s,b)}catch(Z){sy(a,s,Z)}}function DO(a,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(d){RO(a,s,d)},function(d){return sy(a,s,d)}):RO(a,s,c)}function RO(a,s,c){s.status="fulfilled",s.value=c,IO(s),a.state=c,s=a.pending,s!==null&&(c=s.next,c===s?a.pending=null:(c=c.next,s.next=c,MO(a,c)))}function sy(a,s,c){var d=a.pending;if(a.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=c,IO(s),s=s.next;while(s!==d)}a.action=null}function IO(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function PO(a,s){return s}function BO(a,s){if(We){var c=yt.formState;if(c!==null){e:{var d=De;if(We){if(jt){t:{for(var v=jt,b=wr;v.nodeType!==8;){if(!b){v=null;break t}if(v=Or(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){jt=Or(v.nextSibling),d=v.data==="F!";break e}}di(d)}d=!1}d&&(s=c[0])}}return c=Dn(),c.memoizedState=c.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:PO,lastRenderedState:s},c.queue=d,c=nj.bind(null,De,d),d.dispatch=c,d=iy(!1),b=dy.bind(null,De,!1,d.queue),d=Dn(),v={state:s,dispatch:null,action:a,pending:null},d.queue=v,c=o6.bind(null,De,v,b,c),v.dispatch=c,d.memoizedState=a,[s,c,!1]}function UO(a){var s=$t();return LO(s,ct,a)}function LO(a,s,c){if(s=ry(a,s,PO)[0],a=Df(_a)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=lc(s)}catch(j){throw j===ho?Tf:j}else d=s;s=$t();var v=s.queue,b=v.dispatch;return c!==s.memoizedState&&(De.flags|=2048,go(9,{destroy:void 0},l6.bind(null,v,c),null)),[d,b,a]}function l6(a,s){a.action=s}function zO(a){var s=$t(),c=ct;if(c!==null)return LO(s,c,a);$t(),s=s.memoizedState,c=$t();var d=c.queue.dispatch;return c.memoizedState=a,[s,d,!1]}function go(a,s,c,d){return a={tag:a,create:c,deps:d,inst:s,next:null},s=De.updateQueue,s===null&&(s=Cf(),De.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,s.lastEffect=a),a}function $O(){return $t().memoizedState}function Rf(a,s,c,d){var v=Dn();De.flags|=a,v.memoizedState=go(1|s,{destroy:void 0},c,d===void 0?null:d)}function If(a,s,c,d){var v=$t();d=d===void 0?null:d;var b=v.memoizedState.inst;ct!==null&&d!==null&&Qm(d,ct.memoizedState.deps)?v.memoizedState=go(s,b,c,d):(De.flags|=a,v.memoizedState=go(1|s,b,c,d))}function qO(a,s){Rf(8390656,8,a,s)}function oy(a,s){If(2048,8,a,s)}function c6(a){De.flags|=4;var s=De.updateQueue;if(s===null)s=Cf(),De.updateQueue=s,s.events=[a];else{var c=s.events;c===null?s.events=[a]:c.push(a)}}function VO(a){var s=$t().memoizedState;return c6({ref:s,nextImpl:a}),function(){if((et&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function FO(a,s){return If(4,2,a,s)}function GO(a,s){return If(4,4,a,s)}function HO(a,s){if(typeof s=="function"){a=a();var c=s(a);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function WO(a,s,c){c=c!=null?c.concat([a]):null,If(4,4,HO.bind(null,s,a),c)}function ly(){}function YO(a,s){var c=$t();s=s===void 0?null:s;var d=c.memoizedState;return s!==null&&Qm(s,d[1])?d[0]:(c.memoizedState=[a,s],a)}function XO(a,s){var c=$t();s=s===void 0?null:s;var d=c.memoizedState;if(s!==null&&Qm(s,d[1]))return d[0];if(d=a(),fs){oi(!0);try{a()}finally{oi(!1)}}return c.memoizedState=[d,s],d}function cy(a,s,c){return c===void 0||(Ea&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=s:(a.memoizedState=c,a=Kj(),De.lanes|=a,Si|=a,c)}function KO(a,s,c,d){return nr(c,s)?c:mo.current!==null?(a=cy(a,c,d),nr(a,s)||(Ht=!0),a):(Ea&42)===0||(Ea&1073741824)!==0&&(Ve&261930)===0?(Ht=!0,a.memoizedState=c):(a=Kj(),De.lanes|=a,Si|=a,s)}function QO(a,s,c,d,v){var b=D.p;D.p=b!==0&&8>b?b:8;var j=B.T,M={};B.T=M,dy(a,!1,s,c);try{var $=v(),Z=B.S;if(Z!==null&&Z(M,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ne=a6($,d);cc(a,s,ne,lr(a))}else cc(a,s,d,lr(a))}catch(oe){cc(a,s,{then:function(){},status:"rejected",reason:oe},lr())}finally{D.p=b,j!==null&&M.types!==null&&(j.types=M.types),B.T=j}}function u6(){}function uy(a,s,c,d){if(a.tag!==5)throw Error(r(476));var v=JO(a).queue;QO(a,v,s,Q,c===null?u6:function(){return ZO(a),c(d)})}function JO(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:Q},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:c},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function ZO(a){var s=JO(a);s.next===null&&(s=a.alternate.memoizedState),cc(a,s.next.queue,{},lr())}function fy(){return mn(Ac)}function ej(){return $t().memoizedState}function tj(){return $t().memoizedState}function f6(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var c=lr();a=mi(c);var d=yi(s,a,c);d!==null&&(Fn(d,s,c),ac(d,s,c)),s={cache:zm()},a.payload=s;return}s=s.return}}function d6(a,s,c){var d=lr();c={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Pf(a)?rj(s,c):(c=Nm(a,s,c,d),c!==null&&(Fn(c,a,d),aj(c,s,d)))}function nj(a,s,c){var d=lr();cc(a,s,c,d)}function cc(a,s,c,d){var v={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Pf(a))rj(s,v);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var j=s.lastRenderedState,M=b(j,c);if(v.hasEagerState=!0,v.eagerState=M,nr(M,j))return yf(a,s,v,0),yt===null&&mf(),!1}catch{}if(c=Nm(a,s,v,d),c!==null)return Fn(c,a,d),aj(c,s,d),!0}return!1}function dy(a,s,c,d){if(d={lane:2,revertLane:Fy(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Pf(a)){if(s)throw Error(r(479))}else s=Nm(a,c,d,2),s!==null&&Fn(s,a,2)}function Pf(a){var s=a.alternate;return a===De||s!==null&&s===De}function rj(a,s){yo=Nf=!0;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}function aj(a,s,c){if((c&4194048)!==0){var d=s.lanes;d&=a.pendingLanes,c|=d,s.lanes=c,cT(a,c)}}var uc={readContext:mn,use:Mf,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};uc.useEffectEvent=It;var ij={readContext:mn,use:Mf,useCallback:function(a,s){return Dn().memoizedState=[a,s===void 0?null:s],a},useContext:mn,useEffect:qO,useImperativeHandle:function(a,s,c){c=c!=null?c.concat([a]):null,Rf(4194308,4,HO.bind(null,s,a),c)},useLayoutEffect:function(a,s){return Rf(4194308,4,a,s)},useInsertionEffect:function(a,s){Rf(4,2,a,s)},useMemo:function(a,s){var c=Dn();s=s===void 0?null:s;var d=a();if(fs){oi(!0);try{a()}finally{oi(!1)}}return c.memoizedState=[d,s],d},useReducer:function(a,s,c){var d=Dn();if(c!==void 0){var v=c(s);if(fs){oi(!0);try{c(s)}finally{oi(!1)}}}else v=s;return d.memoizedState=d.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},d.queue=a,a=a.dispatch=d6.bind(null,De,a),[d.memoizedState,a]},useRef:function(a){var s=Dn();return a={current:a},s.memoizedState=a},useState:function(a){a=iy(a);var s=a.queue,c=nj.bind(null,De,s);return s.dispatch=c,[a.memoizedState,c]},useDebugValue:ly,useDeferredValue:function(a,s){var c=Dn();return cy(c,a,s)},useTransition:function(){var a=iy(!1);return a=QO.bind(null,De,a.queue,!0,!1),Dn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,c){var d=De,v=Dn();if(We){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),yt===null)throw Error(r(349));(Ve&127)!==0||AO(d,s,c)}v.memoizedState=c;var b={value:c,getSnapshot:s};return v.queue=b,qO(_O.bind(null,d,b,a),[a]),d.flags|=2048,go(9,{destroy:void 0},EO.bind(null,d,b,c,s),null),c},useId:function(){var a=Dn(),s=yt.identifierPrefix;if(We){var c=ra,d=na;c=(d&~(1<<32-tr(d)-1)).toString(32)+c,s="_"+s+"R_"+c,c=kf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=i6++,s="_"+s+"r_"+c.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:fy,useFormState:BO,useActionState:BO,useOptimistic:function(a){var s=Dn();s.memoizedState=s.baseState=a;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=dy.bind(null,De,!0,c),c.dispatch=s,[a,s]},useMemoCache:ny,useCacheRefresh:function(){return Dn().memoizedState=f6.bind(null,De)},useEffectEvent:function(a){var s=Dn(),c={impl:a};return s.memoizedState=c,function(){if((et&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},hy={readContext:mn,use:Mf,useCallback:YO,useContext:mn,useEffect:oy,useImperativeHandle:WO,useInsertionEffect:FO,useLayoutEffect:GO,useMemo:XO,useReducer:Df,useRef:$O,useState:function(){return Df(_a)},useDebugValue:ly,useDeferredValue:function(a,s){var c=$t();return KO(c,ct.memoizedState,a,s)},useTransition:function(){var a=Df(_a)[0],s=$t().memoizedState;return[typeof a=="boolean"?a:lc(a),s]},useSyncExternalStore:jO,useId:ej,useHostTransitionStatus:fy,useFormState:UO,useActionState:UO,useOptimistic:function(a,s){var c=$t();return CO(c,ct,a,s)},useMemoCache:ny,useCacheRefresh:tj};hy.useEffectEvent=VO;var sj={readContext:mn,use:Mf,useCallback:YO,useContext:mn,useEffect:oy,useImperativeHandle:WO,useInsertionEffect:FO,useLayoutEffect:GO,useMemo:XO,useReducer:ay,useRef:$O,useState:function(){return ay(_a)},useDebugValue:ly,useDeferredValue:function(a,s){var c=$t();return ct===null?cy(c,a,s):KO(c,ct.memoizedState,a,s)},useTransition:function(){var a=ay(_a)[0],s=$t().memoizedState;return[typeof a=="boolean"?a:lc(a),s]},useSyncExternalStore:jO,useId:ej,useHostTransitionStatus:fy,useFormState:zO,useActionState:zO,useOptimistic:function(a,s){var c=$t();return ct!==null?CO(c,ct,a,s):(c.baseState=a,[a,c.queue.dispatch])},useMemoCache:ny,useCacheRefresh:tj};sj.useEffectEvent=VO;function py(a,s,c,d){s=a.memoizedState,c=c(d,s),c=c==null?s:m({},s,c),a.memoizedState=c,a.lanes===0&&(a.updateQueue.baseState=c)}var my={enqueueSetState:function(a,s,c){a=a._reactInternals;var d=lr(),v=mi(d);v.payload=s,c!=null&&(v.callback=c),s=yi(a,v,d),s!==null&&(Fn(s,a,d),ac(s,a,d))},enqueueReplaceState:function(a,s,c){a=a._reactInternals;var d=lr(),v=mi(d);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=yi(a,v,d),s!==null&&(Fn(s,a,d),ac(s,a,d))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var c=lr(),d=mi(c);d.tag=2,s!=null&&(d.callback=s),s=yi(a,d,c),s!==null&&(Fn(s,a,c),ac(s,a,c))}};function oj(a,s,c,d,v,b,j){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,b,j):s.prototype&&s.prototype.isPureReactComponent?!Kl(c,d)||!Kl(v,b):!0}function lj(a,s,c,d){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,d),s.state!==a&&my.enqueueReplaceState(s,s.state,null)}function ds(a,s){var c=s;if("ref"in s){c={};for(var d in s)d!=="ref"&&(c[d]=s[d])}if(a=a.defaultProps){c===s&&(c=m({},c));for(var v in a)c[v]===void 0&&(c[v]=a[v])}return c}function cj(a){pf(a)}function uj(a){console.error(a)}function fj(a){pf(a)}function Bf(a,s){try{var c=a.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function dj(a,s,c){try{var d=a.onCaughtError;d(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function yy(a,s,c){return c=mi(c),c.tag=3,c.payload={element:null},c.callback=function(){Bf(a,s)},c}function hj(a){return a=mi(a),a.tag=3,a}function pj(a,s,c,d){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var b=d.value;a.payload=function(){return v(b)},a.callback=function(){dj(s,c,d)}}var j=c.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(a.callback=function(){dj(s,c,d),typeof v!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var M=d.stack;this.componentDidCatch(d.value,{componentStack:M!==null?M:""})})}function h6(a,s,c,d,v){if(c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=c.alternate,s!==null&&co(s,c,v,!0),c=ar.current,c!==null){switch(c.tag){case 31:case 13:return Tr===null?Xf():c.alternate===null&&Pt===0&&(Pt=3),c.flags&=-257,c.flags|=65536,c.lanes=v,d===Of?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([d]):s.add(d),$y(a,d,v)),!1;case 22:return c.flags|=65536,d===Of?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([d]):c.add(d)),$y(a,d,v)),!1}throw Error(r(435,c.tag))}return $y(a,d,v),Xf(),!1}if(We)return s=ar.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,d!==Im&&(a=Error(r(422),{cause:d}),Zl(br(a,c)))):(d!==Im&&(s=Error(r(423),{cause:d}),Zl(br(s,c))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,d=br(d,c),v=yy(a.stateNode,d,v),Hm(a,v),Pt!==4&&(Pt=2)),!1;var b=Error(r(520),{cause:d});if(b=br(b,c),gc===null?gc=[b]:gc.push(b),Pt!==4&&(Pt=2),s===null)return!0;d=br(d,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,a=v&-v,c.lanes|=a,a=yy(c.stateNode,d,a),Hm(c,a),!1;case 1:if(s=c.type,b=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wi===null||!wi.has(b))))return c.flags|=65536,v&=-v,c.lanes|=v,v=hj(v),pj(v,a,c,d),Hm(c,v),!1}c=c.return}while(c!==null);return!1}var vy=Error(r(461)),Ht=!1;function yn(a,s,c,d){s.child=a===null?gO(s,null,c,d):us(s,a.child,c,d)}function mj(a,s,c,d,v){c=c.render;var b=s.ref;if("ref"in d){var j={};for(var M in d)M!=="ref"&&(j[M]=d[M])}else j=d;return ss(s),d=Jm(a,s,c,j,b,v),M=Zm(),a!==null&&!Ht?(ey(a,s,v),Na(a,s,v)):(We&&M&&Dm(s),s.flags|=1,yn(a,s,d,v),s.child)}function yj(a,s,c,d,v){if(a===null){var b=c.type;return typeof b=="function"&&!km(b)&&b.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=b,vj(a,s,b,d,v)):(a=gf(c.type,null,d,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(b=a.child,!jy(a,v)){var j=b.memoizedProps;if(c=c.compare,c=c!==null?c:Kl,c(j,d)&&a.ref===s.ref)return Na(a,s,v)}return s.flags|=1,a=Ta(b,d),a.ref=s.ref,a.return=s,s.child=a}function vj(a,s,c,d,v){if(a!==null){var b=a.memoizedProps;if(Kl(b,d)&&a.ref===s.ref)if(Ht=!1,s.pendingProps=d=b,jy(a,v))(a.flags&131072)!==0&&(Ht=!0);else return s.lanes=a.lanes,Na(a,s,v)}return gy(a,s,c,d,v)}function gj(a,s,c,d){var v=d.children,b=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(b=b!==null?b.baseLanes|c:c,a!==null){for(d=s.child=a.child,v=0;d!==null;)v=v|d.lanes|d.childLanes,d=d.sibling;d=v&~b}else d=0,s.child=null;return bj(a,s,b,c,d)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&wf(s,b!==null?b.cachePool:null),b!==null?SO(s,b):Ym(),wO(s);else return d=s.lanes=536870912,bj(a,s,b!==null?b.baseLanes|c:c,c,d)}else b!==null?(wf(s,b.cachePool),SO(s,b),gi(),s.memoizedState=null):(a!==null&&wf(s,null),Ym(),gi());return yn(a,s,v,c),s.child}function fc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function bj(a,s,c,d,v){var b=qm();return b=b===null?null:{parent:Ft._currentValue,pool:b},s.memoizedState={baseLanes:c,cachePool:b},a!==null&&wf(s,null),Ym(),wO(s),a!==null&&co(a,s,d,!0),s.childLanes=v,null}function Uf(a,s){return s=zf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function xj(a,s,c){return us(s,a.child,null,c),a=Uf(s,s.pendingProps),a.flags|=2,ir(s),s.memoizedState=null,a}function p6(a,s,c){var d=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(We){if(d.mode==="hidden")return a=Uf(s,d),s.lanes=536870912,fc(null,a);if(Km(s),(a=jt)?(a=MA(a,wr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ui!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},c=rO(a),c.return=s,s.child=c,pn=s,jt=null)):a=null,a===null)throw di(s);return s.lanes=536870912,null}return Uf(s,d)}var b=a.memoizedState;if(b!==null){var j=b.dehydrated;if(Km(s),v)if(s.flags&256)s.flags&=-257,s=xj(a,s,c);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Ht||co(a,s,c,!1),v=(c&a.childLanes)!==0,Ht||v){if(d=yt,d!==null&&(j=uT(d,c),j!==0&&j!==b.retryLane))throw b.retryLane=j,ns(a,j),Fn(d,a,j),vy;Xf(),s=xj(a,s,c)}else a=b.treeContext,jt=Or(j.nextSibling),pn=s,We=!0,fi=null,wr=!1,a!==null&&sO(s,a),s=Uf(s,d),s.flags|=4096;return s}return a=Ta(a.child,{mode:d.mode,children:d.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Lf(a,s){var c=s.ref;if(c===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(a===null||a.ref!==c)&&(s.flags|=4194816)}}function gy(a,s,c,d,v){return ss(s),c=Jm(a,s,c,d,void 0,v),d=Zm(),a!==null&&!Ht?(ey(a,s,v),Na(a,s,v)):(We&&d&&Dm(s),s.flags|=1,yn(a,s,c,v),s.child)}function Sj(a,s,c,d,v,b){return ss(s),s.updateQueue=null,c=OO(s,d,c,v),TO(a),d=Zm(),a!==null&&!Ht?(ey(a,s,b),Na(a,s,b)):(We&&d&&Dm(s),s.flags|=1,yn(a,s,c,b),s.child)}function wj(a,s,c,d,v){if(ss(s),s.stateNode===null){var b=io,j=c.contextType;typeof j=="object"&&j!==null&&(b=mn(j)),b=new c(d,b),s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=my,s.stateNode=b,b._reactInternals=s,b=s.stateNode,b.props=d,b.state=s.memoizedState,b.refs={},Fm(s),j=c.contextType,b.context=typeof j=="object"&&j!==null?mn(j):io,b.state=s.memoizedState,j=c.getDerivedStateFromProps,typeof j=="function"&&(py(s,c,j,d),b.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(j=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),j!==b.state&&my.enqueueReplaceState(b,b.state,null),sc(s,d,b,v),ic(),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(a===null){b=s.stateNode;var M=s.memoizedProps,$=ds(c,M);b.props=$;var Z=b.context,ne=c.contextType;j=io,typeof ne=="object"&&ne!==null&&(j=mn(ne));var oe=c.getDerivedStateFromProps;ne=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function",M=s.pendingProps!==M,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(M||Z!==j)&&lj(s,b,d,j),pi=!1;var ee=s.memoizedState;b.state=ee,sc(s,d,b,v),ic(),Z=s.memoizedState,M||ee!==Z||pi?(typeof oe=="function"&&(py(s,c,oe,d),Z=s.memoizedState),($=pi||oj(s,c,$,d,ee,Z,j))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=Z),b.props=d,b.state=Z,b.context=j,d=$):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{b=s.stateNode,Gm(a,s),j=s.memoizedProps,ne=ds(c,j),b.props=ne,oe=s.pendingProps,ee=b.context,Z=c.contextType,$=io,typeof Z=="object"&&Z!==null&&($=mn(Z)),M=c.getDerivedStateFromProps,(Z=typeof M=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(j!==oe||ee!==$)&&lj(s,b,d,$),pi=!1,ee=s.memoizedState,b.state=ee,sc(s,d,b,v),ic();var te=s.memoizedState;j!==oe||ee!==te||pi||a!==null&&a.dependencies!==null&&xf(a.dependencies)?(typeof M=="function"&&(py(s,c,M,d),te=s.memoizedState),(ne=pi||oj(s,c,ne,d,ee,te,$)||a!==null&&a.dependencies!==null&&xf(a.dependencies))?(Z||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,te,$),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,te,$)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||j===a.memoizedProps&&ee===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||j===a.memoizedProps&&ee===a.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=te),b.props=d,b.state=te,b.context=$,d=ne):(typeof b.componentDidUpdate!="function"||j===a.memoizedProps&&ee===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||j===a.memoizedProps&&ee===a.memoizedState||(s.flags|=1024),d=!1)}return b=d,Lf(a,s),d=(s.flags&128)!==0,b||d?(b=s.stateNode,c=d&&typeof c.getDerivedStateFromError!="function"?null:b.render(),s.flags|=1,a!==null&&d?(s.child=us(s,a.child,null,v),s.child=us(s,null,c,v)):yn(a,s,c,v),s.memoizedState=b.state,a=s.child):a=Na(a,s,v),a}function Tj(a,s,c,d){return as(),s.flags|=256,yn(a,s,c,d),s.child}var by={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xy(a){return{baseLanes:a,cachePool:dO()}}function Sy(a,s,c){return a=a!==null?a.childLanes&~c:0,s&&(a|=or),a}function Oj(a,s,c){var d=s.pendingProps,v=!1,b=(s.flags&128)!==0,j;if((j=b)||(j=a!==null&&a.memoizedState===null?!1:(zt.current&2)!==0),j&&(v=!0,s.flags&=-129),j=(s.flags&32)!==0,s.flags&=-33,a===null){if(We){if(v?vi(s):gi(),(a=jt)?(a=MA(a,wr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ui!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},c=rO(a),c.return=s,s.child=c,pn=s,jt=null)):a=null,a===null)throw di(s);return rv(a)?s.lanes=32:s.lanes=536870912,null}var M=d.children;return d=d.fallback,v?(gi(),v=s.mode,M=zf({mode:"hidden",children:M},v),d=rs(d,v,c,null),M.return=s,d.return=s,M.sibling=d,s.child=M,d=s.child,d.memoizedState=xy(c),d.childLanes=Sy(a,j,c),s.memoizedState=by,fc(null,d)):(vi(s),wy(s,M))}var $=a.memoizedState;if($!==null&&(M=$.dehydrated,M!==null)){if(b)s.flags&256?(vi(s),s.flags&=-257,s=Ty(a,s,c)):s.memoizedState!==null?(gi(),s.child=a.child,s.flags|=128,s=null):(gi(),M=d.fallback,v=s.mode,d=zf({mode:"visible",children:d.children},v),M=rs(M,v,c,null),M.flags|=2,d.return=s,M.return=s,d.sibling=M,s.child=d,us(s,a.child,null,c),d=s.child,d.memoizedState=xy(c),d.childLanes=Sy(a,j,c),s.memoizedState=by,s=fc(null,d));else if(vi(s),rv(M)){if(j=M.nextSibling&&M.nextSibling.dataset,j)var Z=j.dgst;j=Z,d=Error(r(419)),d.stack="",d.digest=j,Zl({value:d,source:null,stack:null}),s=Ty(a,s,c)}else if(Ht||co(a,s,c,!1),j=(c&a.childLanes)!==0,Ht||j){if(j=yt,j!==null&&(d=uT(j,c),d!==0&&d!==$.retryLane))throw $.retryLane=d,ns(a,d),Fn(j,a,d),vy;nv(M)||Xf(),s=Ty(a,s,c)}else nv(M)?(s.flags|=192,s.child=a.child,s=null):(a=$.treeContext,jt=Or(M.nextSibling),pn=s,We=!0,fi=null,wr=!1,a!==null&&sO(s,a),s=wy(s,d.children),s.flags|=4096);return s}return v?(gi(),M=d.fallback,v=s.mode,$=a.child,Z=$.sibling,d=Ta($,{mode:"hidden",children:d.children}),d.subtreeFlags=$.subtreeFlags&65011712,Z!==null?M=Ta(Z,M):(M=rs(M,v,c,null),M.flags|=2),M.return=s,d.return=s,d.sibling=M,s.child=d,fc(null,d),d=s.child,M=a.child.memoizedState,M===null?M=xy(c):(v=M.cachePool,v!==null?($=Ft._currentValue,v=v.parent!==$?{parent:$,pool:$}:v):v=dO(),M={baseLanes:M.baseLanes|c,cachePool:v}),d.memoizedState=M,d.childLanes=Sy(a,j,c),s.memoizedState=by,fc(a.child,d)):(vi(s),c=a.child,a=c.sibling,c=Ta(c,{mode:"visible",children:d.children}),c.return=s,c.sibling=null,a!==null&&(j=s.deletions,j===null?(s.deletions=[a],s.flags|=16):j.push(a)),s.child=c,s.memoizedState=null,c)}function wy(a,s){return s=zf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function zf(a,s){return a=rr(22,a,null,s),a.lanes=0,a}function Ty(a,s,c){return us(s,a.child,null,c),a=wy(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function jj(a,s,c){a.lanes|=s;var d=a.alternate;d!==null&&(d.lanes|=s),Um(a.return,s,c)}function Oy(a,s,c,d,v,b){var j=a.memoizedState;j===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:v,treeForkCount:b}:(j.isBackwards=s,j.rendering=null,j.renderingStartTime=0,j.last=d,j.tail=c,j.tailMode=v,j.treeForkCount=b)}function Aj(a,s,c){var d=s.pendingProps,v=d.revealOrder,b=d.tail;d=d.children;var j=zt.current,M=(j&2)!==0;if(M?(j=j&1|2,s.flags|=128):j&=1,ae(zt,j),yn(a,s,d,c),d=We?Jl:0,!M&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&jj(a,c,s);else if(a.tag===19)jj(a,c,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(c=s.child,v=null;c!==null;)a=c.alternate,a!==null&&_f(a)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Oy(s,!1,v,c,b,d);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&_f(a)===null){s.child=v;break}a=v.sibling,v.sibling=c,c=v,v=a}Oy(s,!0,c,null,b,d);break;case"together":Oy(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function Na(a,s,c){if(a!==null&&(s.dependencies=a.dependencies),Si|=s.lanes,(c&s.childLanes)===0)if(a!==null){if(co(a,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,c=Ta(a,a.pendingProps),s.child=c,c.return=s;a.sibling!==null;)a=a.sibling,c=c.sibling=Ta(a,a.pendingProps),c.return=s;c.sibling=null}return s.child}function jy(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&xf(a)))}function m6(a,s,c){switch(s.tag){case 3:nt(s,s.stateNode.containerInfo),hi(s,Ft,a.memoizedState.cache),as();break;case 27:case 5:Ne(s);break;case 4:nt(s,s.stateNode.containerInfo);break;case 10:hi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Km(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(vi(s),s.flags|=128,null):(c&s.child.childLanes)!==0?Oj(a,s,c):(vi(s),a=Na(a,s,c),a!==null?a.sibling:null);vi(s);break;case 19:var v=(a.flags&128)!==0;if(d=(c&s.childLanes)!==0,d||(co(a,s,c,!1),d=(c&s.childLanes)!==0),v){if(d)return Aj(a,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),ae(zt,zt.current),d)break;return null;case 22:return s.lanes=0,gj(a,s,c,s.pendingProps);case 24:hi(s,Ft,a.memoizedState.cache)}return Na(a,s,c)}function Ej(a,s,c){if(a!==null)if(a.memoizedProps!==s.pendingProps)Ht=!0;else{if(!jy(a,c)&&(s.flags&128)===0)return Ht=!1,m6(a,s,c);Ht=(a.flags&131072)!==0}else Ht=!1,We&&(s.flags&1048576)!==0&&iO(s,Jl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(a=ls(s.elementType),s.type=a,typeof a=="function")km(a)?(d=ds(a,d),s.tag=1,s=wj(null,s,a,d,c)):(s.tag=0,s=gy(null,s,a,d,c));else{if(a!=null){var v=a.$$typeof;if(v===k){s.tag=11,s=mj(null,s,a,d,c);break e}else if(v===C){s.tag=14,s=yj(null,s,a,d,c);break e}}throw s=F(a)||a,Error(r(306,s,""))}}return s;case 0:return gy(a,s,s.type,s.pendingProps,c);case 1:return d=s.type,v=ds(d,s.pendingProps),wj(a,s,d,v,c);case 3:e:{if(nt(s,s.stateNode.containerInfo),a===null)throw Error(r(387));d=s.pendingProps;var b=s.memoizedState;v=b.element,Gm(a,s),sc(s,d,null,c);var j=s.memoizedState;if(d=j.cache,hi(s,Ft,d),d!==b.cache&&Lm(s,[Ft],c,!0),ic(),d=j.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:j.cache},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){s=Tj(a,s,d,c);break e}else if(d!==v){v=br(Error(r(424)),s),Zl(v),s=Tj(a,s,d,c);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,jt=Or(a.firstChild),pn=s,We=!0,fi=null,wr=!0,c=gO(s,null,d,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(as(),d===v){s=Na(a,s,c);break e}yn(a,s,d,c)}s=s.child}return s;case 26:return Lf(a,s),a===null?(c=UA(s.type,null,s.pendingProps,null))?s.memoizedState=c:We||(c=s.type,a=s.pendingProps,d=nd(Ae.current).createElement(c),d[hn]=s,d[Un]=a,vn(d,c,a),sn(d),s.stateNode=d):s.memoizedState=UA(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return Ne(s),a===null&&We&&(d=s.stateNode=IA(s.type,s.pendingProps,Ae.current),pn=s,wr=!0,v=jt,Ai(s.type)?(av=v,jt=Or(d.firstChild)):jt=v),yn(a,s,s.pendingProps.children,c),Lf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&We&&((v=d=jt)&&(d=G6(d,s.type,s.pendingProps,wr),d!==null?(s.stateNode=d,pn=s,jt=Or(d.firstChild),wr=!1,v=!0):v=!1),v||di(s)),Ne(s),v=s.type,b=s.pendingProps,j=a!==null?a.memoizedProps:null,d=b.children,Zy(v,b)?d=null:j!==null&&Zy(v,j)&&(s.flags|=32),s.memoizedState!==null&&(v=Jm(a,s,s6,null,null,c),Ac._currentValue=v),Lf(a,s),yn(a,s,d,c),s.child;case 6:return a===null&&We&&((a=c=jt)&&(c=H6(c,s.pendingProps,wr),c!==null?(s.stateNode=c,pn=s,jt=null,a=!0):a=!1),a||di(s)),null;case 13:return Oj(a,s,c);case 4:return nt(s,s.stateNode.containerInfo),d=s.pendingProps,a===null?s.child=us(s,null,d,c):yn(a,s,d,c),s.child;case 11:return mj(a,s,s.type,s.pendingProps,c);case 7:return yn(a,s,s.pendingProps,c),s.child;case 8:return yn(a,s,s.pendingProps.children,c),s.child;case 12:return yn(a,s,s.pendingProps.children,c),s.child;case 10:return d=s.pendingProps,hi(s,s.type,d.value),yn(a,s,d.children,c),s.child;case 9:return v=s.type._context,d=s.pendingProps.children,ss(s),v=mn(v),d=d(v),s.flags|=1,yn(a,s,d,c),s.child;case 14:return yj(a,s,s.type,s.pendingProps,c);case 15:return vj(a,s,s.type,s.pendingProps,c);case 19:return Aj(a,s,c);case 31:return p6(a,s,c);case 22:return gj(a,s,c,s.pendingProps);case 24:return ss(s),d=mn(Ft),a===null?(v=qm(),v===null&&(v=yt,b=zm(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=c),v=b),s.memoizedState={parent:d,cache:v},Fm(s),hi(s,Ft,v)):((a.lanes&c)!==0&&(Gm(a,s),sc(s,null,null,c),ic()),v=a.memoizedState,b=s.memoizedState,v.parent!==d?(v={parent:d,cache:d},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),hi(s,Ft,d)):(d=b.cache,hi(s,Ft,d),d!==v.cache&&Lm(s,[Ft],c,!0))),yn(a,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function ka(a){a.flags|=4}function Ay(a,s,c,d,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(eA())a.flags|=8192;else throw cs=Of,Vm}else a.flags&=-16777217}function _j(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!VA(s))if(eA())a.flags|=8192;else throw cs=Of,Vm}function $f(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?oT():536870912,a.lanes|=s,wo|=s)}function dc(a,s){if(!We)switch(a.tailMode){case"hidden":s=a.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?a.tail=null:c.sibling=null;break;case"collapsed":c=a.tail;for(var d=null;c!==null;)c.alternate!==null&&(d=c),c=c.sibling;d===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:d.sibling=null}}function At(a){var s=a.alternate!==null&&a.alternate.child===a.child,c=0,d=0;if(s)for(var v=a.child;v!==null;)c|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)c|=v.lanes|v.childLanes,d|=v.subtreeFlags,d|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=d,a.childLanes=c,s}function y6(a,s,c){var d=s.pendingProps;switch(Rm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return c=s.stateNode,d=null,a!==null&&(d=a.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Aa(Ft),de(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(a===null||a.child===null)&&(lo(s)?ka(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Pm())),At(s),null;case 26:var v=s.type,b=s.memoizedState;return a===null?(ka(s),b!==null?(At(s),_j(s,b)):(At(s),Ay(s,v,null,d,c))):b?b!==a.memoizedState?(ka(s),At(s),_j(s,b)):(At(s),s.flags&=-16777217):(a=a.memoizedProps,a!==d&&ka(s),At(s),Ay(s,v,a,d,c)),null;case 27:if(ke(s),c=Ae.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&ka(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return At(s),null}a=he.current,lo(s)?oO(s):(a=IA(v,d,c),s.stateNode=a,ka(s))}return At(s),null;case 5:if(ke(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&ka(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(b=he.current,lo(s))oO(s);else{var j=nd(Ae.current);switch(b){case 1:b=j.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=j.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=j.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=j.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=j.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?j.createElement("select",{is:d.is}):j.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?j.createElement(v,{is:d.is}):j.createElement(v)}}b[hn]=s,b[Un]=d;e:for(j=s.child;j!==null;){if(j.tag===5||j.tag===6)b.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===s)break e;for(;j.sibling===null;){if(j.return===null||j.return===s)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}s.stateNode=b;e:switch(vn(b,v,d),v){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&ka(s)}}return At(s),Ay(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,c),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==d&&ka(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(r(166));if(a=Ae.current,lo(s)){if(a=s.stateNode,c=s.memoizedProps,d=null,v=pn,v!==null)switch(v.tag){case 27:case 5:d=v.memoizedProps}a[hn]=s,a=!!(a.nodeValue===c||d!==null&&d.suppressHydrationWarning===!0||OA(a.nodeValue,c)),a||di(s,!0)}else a=nd(a).createTextNode(d),a[hn]=s,s.stateNode=a}return At(s),null;case 31:if(c=s.memoizedState,a===null||a.memoizedState!==null){if(d=lo(s),c!==null){if(a===null){if(!d)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[hn]=s}else as(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),a=!1}else c=Pm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=c),a=!0;if(!a)return s.flags&256?(ir(s),s):(ir(s),null);if((s.flags&128)!==0)throw Error(r(558))}return At(s),null;case 13:if(d=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=lo(s),d!==null&&d.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[hn]=s}else as(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),v=!1}else v=Pm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(ir(s),s):(ir(s),null)}return ir(s),(s.flags&128)!==0?(s.lanes=c,s):(c=d!==null,a=a!==null&&a.memoizedState!==null,c&&(d=s.child,v=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(v=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==v&&(d.flags|=2048)),c!==a&&c&&(s.child.flags|=8192),$f(s,s.updateQueue),At(s),null);case 4:return de(),a===null&&Yy(s.stateNode.containerInfo),At(s),null;case 10:return Aa(s.type),At(s),null;case 19:if(Y(zt),d=s.memoizedState,d===null)return At(s),null;if(v=(s.flags&128)!==0,b=d.rendering,b===null)if(v)dc(d,!1);else{if(Pt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(b=_f(a),b!==null){for(s.flags|=128,dc(d,!1),a=b.updateQueue,s.updateQueue=a,$f(s,a),s.subtreeFlags=0,a=c,c=s.child;c!==null;)nO(c,a),c=c.sibling;return ae(zt,zt.current&1|2),We&&Oa(s,d.treeForkCount),s.child}a=a.sibling}d.tail!==null&&Tn()>Hf&&(s.flags|=128,v=!0,dc(d,!1),s.lanes=4194304)}else{if(!v)if(a=_f(b),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,$f(s,a),dc(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!We)return At(s),null}else 2*Tn()-d.renderingStartTime>Hf&&c!==536870912&&(s.flags|=128,v=!0,dc(d,!1),s.lanes=4194304);d.isBackwards?(b.sibling=s.child,s.child=b):(a=d.last,a!==null?a.sibling=b:s.child=b,d.last=b)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=Tn(),a.sibling=null,c=zt.current,ae(zt,v?c&1|2:c&1),We&&Oa(s,d.treeForkCount),a):(At(s),null);case 22:case 23:return ir(s),Xm(),d=s.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(c&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),c=s.updateQueue,c!==null&&$f(s,c.retryQueue),c=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048),a!==null&&Y(os),null;case 24:return c=null,a!==null&&(c=a.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Aa(Ft),At(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function v6(a,s){switch(Rm(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Aa(Ft),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ke(s),null;case 31:if(s.memoizedState!==null){if(ir(s),s.alternate===null)throw Error(r(340));as()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(ir(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));as()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return Y(zt),null;case 4:return de(),null;case 10:return Aa(s.type),null;case 22:case 23:return ir(s),Xm(),a!==null&&Y(os),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Aa(Ft),null;case 25:return null;default:return null}}function Nj(a,s){switch(Rm(s),s.tag){case 3:Aa(Ft),de();break;case 26:case 27:case 5:ke(s);break;case 4:de();break;case 31:s.memoizedState!==null&&ir(s);break;case 13:ir(s);break;case 19:Y(zt);break;case 10:Aa(s.type);break;case 22:case 23:ir(s),Xm(),a!==null&&Y(os);break;case 24:Aa(Ft)}}function hc(a,s){try{var c=s.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var v=d.next;c=v;do{if((c.tag&a)===a){d=void 0;var b=c.create,j=c.inst;d=b(),j.destroy=d}c=c.next}while(c!==v)}}catch(M){ot(s,s.return,M)}}function bi(a,s,c){try{var d=s.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var b=v.next;d=b;do{if((d.tag&a)===a){var j=d.inst,M=j.destroy;if(M!==void 0){j.destroy=void 0,v=s;var $=c,Z=M;try{Z()}catch(ne){ot(v,$,ne)}}}d=d.next}while(d!==b)}}catch(ne){ot(s,s.return,ne)}}function kj(a){var s=a.updateQueue;if(s!==null){var c=a.stateNode;try{xO(s,c)}catch(d){ot(a,a.return,d)}}}function Cj(a,s,c){c.props=ds(a.type,a.memoizedProps),c.state=a.memoizedState;try{c.componentWillUnmount()}catch(d){ot(a,s,d)}}function pc(a,s){try{var c=a.ref;if(c!==null){switch(a.tag){case 26:case 27:case 5:var d=a.stateNode;break;case 30:d=a.stateNode;break;default:d=a.stateNode}typeof c=="function"?a.refCleanup=c(d):c.current=d}}catch(v){ot(a,s,v)}}function aa(a,s){var c=a.ref,d=a.refCleanup;if(c!==null)if(typeof d=="function")try{d()}catch(v){ot(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){ot(a,s,v)}else c.current=null}function Mj(a){var s=a.type,c=a.memoizedProps,d=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&d.focus();break e;case"img":c.src?d.src=c.src:c.srcSet&&(d.srcset=c.srcSet)}}catch(v){ot(a,a.return,v)}}function Ey(a,s,c){try{var d=a.stateNode;L6(d,a.type,c,s),d[Un]=s}catch(v){ot(a,a.return,v)}}function Dj(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ai(a.type)||a.tag===4}function _y(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Dj(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ai(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ny(a,s,c){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(a,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(a),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Sa));else if(d!==4&&(d===27&&Ai(a.type)&&(c=a.stateNode,s=null),a=a.child,a!==null))for(Ny(a,s,c),a=a.sibling;a!==null;)Ny(a,s,c),a=a.sibling}function qf(a,s,c){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?c.insertBefore(a,s):c.appendChild(a);else if(d!==4&&(d===27&&Ai(a.type)&&(c=a.stateNode),a=a.child,a!==null))for(qf(a,s,c),a=a.sibling;a!==null;)qf(a,s,c),a=a.sibling}function Rj(a){var s=a.stateNode,c=a.memoizedProps;try{for(var d=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);vn(s,d,c),s[hn]=a,s[Un]=c}catch(b){ot(a,a.return,b)}}var Ca=!1,Wt=!1,ky=!1,Ij=typeof WeakSet=="function"?WeakSet:Set,on=null;function g6(a,s){if(a=a.containerInfo,Qy=cd,a=WT(a),Tm(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&d.rangeCount!==0){c=d.anchorNode;var v=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var j=0,M=-1,$=-1,Z=0,ne=0,oe=a,ee=null;t:for(;;){for(var te;oe!==c||v!==0&&oe.nodeType!==3||(M=j+v),oe!==b||d!==0&&oe.nodeType!==3||($=j+d),oe.nodeType===3&&(j+=oe.nodeValue.length),(te=oe.firstChild)!==null;)ee=oe,oe=te;for(;;){if(oe===a)break t;if(ee===c&&++Z===v&&(M=j),ee===b&&++ne===d&&($=j),(te=oe.nextSibling)!==null)break;oe=ee,ee=oe.parentNode}oe=te}c=M===-1||$===-1?null:{start:M,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(Jy={focusedElem:a,selectionRange:c},cd=!1,on=s;on!==null;)if(s=on,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,on=a;else for(;on!==null;){switch(s=on,b=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(c=0;c<a.length;c++)v=a[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,c=s,v=b.memoizedProps,b=b.memoizedState,d=c.stateNode;try{var be=ds(c.type,v);a=d.getSnapshotBeforeUpdate(be,b),d.__reactInternalSnapshotBeforeUpdate=a}catch(Ee){ot(c,c.return,Ee)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,c=a.nodeType,c===9)tv(a);else if(c===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":tv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,on=a;break}on=s.return}}function Pj(a,s,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:Da(a,c),d&4&&hc(5,c);break;case 1:if(Da(a,c),d&4)if(a=c.stateNode,s===null)try{a.componentDidMount()}catch(j){ot(c,c.return,j)}else{var v=ds(c.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(j){ot(c,c.return,j)}}d&64&&kj(c),d&512&&pc(c,c.return);break;case 3:if(Da(a,c),d&64&&(a=c.updateQueue,a!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{xO(a,s)}catch(j){ot(c,c.return,j)}}break;case 27:s===null&&d&4&&Rj(c);case 26:case 5:Da(a,c),s===null&&d&4&&Mj(c),d&512&&pc(c,c.return);break;case 12:Da(a,c);break;case 31:Da(a,c),d&4&&Lj(a,c);break;case 13:Da(a,c),d&4&&zj(a,c),d&64&&(a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(c=E6.bind(null,c),W6(a,c))));break;case 22:if(d=c.memoizedState!==null||Ca,!d){s=s!==null&&s.memoizedState!==null||Wt,v=Ca;var b=Wt;Ca=d,(Wt=s)&&!b?Ra(a,c,(c.subtreeFlags&8772)!==0):Da(a,c),Ca=v,Wt=b}break;case 30:break;default:Da(a,c)}}function Bj(a){var s=a.alternate;s!==null&&(a.alternate=null,Bj(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&sm(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var kt=null,zn=!1;function Ma(a,s,c){for(c=c.child;c!==null;)Uj(a,s,c),c=c.sibling}function Uj(a,s,c){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(Ul,c)}catch{}switch(c.tag){case 26:Wt||aa(c,s),Ma(a,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Wt||aa(c,s);var d=kt,v=zn;Ai(c.type)&&(kt=c.stateNode,zn=!1),Ma(a,s,c),Tc(c.stateNode),kt=d,zn=v;break;case 5:Wt||aa(c,s);case 6:if(d=kt,v=zn,kt=null,Ma(a,s,c),kt=d,zn=v,kt!==null)if(zn)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(c.stateNode)}catch(b){ot(c,s,b)}else try{kt.removeChild(c.stateNode)}catch(b){ot(c,s,b)}break;case 18:kt!==null&&(zn?(a=kt,kA(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,c.stateNode),ko(a)):kA(kt,c.stateNode));break;case 4:d=kt,v=zn,kt=c.stateNode.containerInfo,zn=!0,Ma(a,s,c),kt=d,zn=v;break;case 0:case 11:case 14:case 15:bi(2,c,s),Wt||bi(4,c,s),Ma(a,s,c);break;case 1:Wt||(aa(c,s),d=c.stateNode,typeof d.componentWillUnmount=="function"&&Cj(c,s,d)),Ma(a,s,c);break;case 21:Ma(a,s,c);break;case 22:Wt=(d=Wt)||c.memoizedState!==null,Ma(a,s,c),Wt=d;break;default:Ma(a,s,c)}}function Lj(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{ko(a)}catch(c){ot(s,s.return,c)}}}function zj(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{ko(a)}catch(c){ot(s,s.return,c)}}function b6(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new Ij),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new Ij),s;default:throw Error(r(435,a.tag))}}function Vf(a,s){var c=b6(a);s.forEach(function(d){if(!c.has(d)){c.add(d);var v=_6.bind(null,a,d);d.then(v,v)}})}function $n(a,s){var c=s.deletions;if(c!==null)for(var d=0;d<c.length;d++){var v=c[d],b=a,j=s,M=j;e:for(;M!==null;){switch(M.tag){case 27:if(Ai(M.type)){kt=M.stateNode,zn=!1;break e}break;case 5:kt=M.stateNode,zn=!1;break e;case 3:case 4:kt=M.stateNode.containerInfo,zn=!0;break e}M=M.return}if(kt===null)throw Error(r(160));Uj(b,j,v),kt=null,zn=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)$j(s,a),s=s.sibling}var qr=null;function $j(a,s){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:$n(s,a),qn(a),d&4&&(bi(3,a,a.return),hc(3,a),bi(5,a,a.return));break;case 1:$n(s,a),qn(a),d&512&&(Wt||c===null||aa(c,c.return)),d&64&&Ca&&(a=a.updateQueue,a!==null&&(d=a.callbacks,d!==null&&(c=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=c===null?d:c.concat(d))));break;case 26:var v=qr;if($n(s,a),qn(a),d&512&&(Wt||c===null||aa(c,c.return)),d&4){var b=c!==null?c.memoizedState:null;if(d=a.memoizedState,c===null)if(d===null)if(a.stateNode===null){e:{d=a.type,c=a.memoizedProps,v=v.ownerDocument||v;t:switch(d){case"title":b=v.getElementsByTagName("title")[0],(!b||b[$l]||b[hn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(d),v.head.insertBefore(b,v.querySelector("head > title"))),vn(b,d,c),b[hn]=a,sn(b),d=b;break e;case"link":var j=$A("link","href",v).get(d+(c.href||""));if(j){for(var M=0;M<j.length;M++)if(b=j[M],b.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&b.getAttribute("rel")===(c.rel==null?null:c.rel)&&b.getAttribute("title")===(c.title==null?null:c.title)&&b.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){j.splice(M,1);break t}}b=v.createElement(d),vn(b,d,c),v.head.appendChild(b);break;case"meta":if(j=$A("meta","content",v).get(d+(c.content||""))){for(M=0;M<j.length;M++)if(b=j[M],b.getAttribute("content")===(c.content==null?null:""+c.content)&&b.getAttribute("name")===(c.name==null?null:c.name)&&b.getAttribute("property")===(c.property==null?null:c.property)&&b.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&b.getAttribute("charset")===(c.charSet==null?null:c.charSet)){j.splice(M,1);break t}}b=v.createElement(d),vn(b,d,c),v.head.appendChild(b);break;default:throw Error(r(468,d))}b[hn]=a,sn(b),d=b}a.stateNode=d}else qA(v,a.type,a.stateNode);else a.stateNode=zA(v,d,a.memoizedProps);else b!==d?(b===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,d===null?qA(v,a.type,a.stateNode):zA(v,d,a.memoizedProps)):d===null&&a.stateNode!==null&&Ey(a,a.memoizedProps,c.memoizedProps)}break;case 27:$n(s,a),qn(a),d&512&&(Wt||c===null||aa(c,c.return)),c!==null&&d&4&&Ey(a,a.memoizedProps,c.memoizedProps);break;case 5:if($n(s,a),qn(a),d&512&&(Wt||c===null||aa(c,c.return)),a.flags&32){v=a.stateNode;try{Js(v,"")}catch(be){ot(a,a.return,be)}}d&4&&a.stateNode!=null&&(v=a.memoizedProps,Ey(a,v,c!==null?c.memoizedProps:v)),d&1024&&(ky=!0);break;case 6:if($n(s,a),qn(a),d&4){if(a.stateNode===null)throw Error(r(162));d=a.memoizedProps,c=a.stateNode;try{c.nodeValue=d}catch(be){ot(a,a.return,be)}}break;case 3:if(id=null,v=qr,qr=rd(s.containerInfo),$n(s,a),qr=v,qn(a),d&4&&c!==null&&c.memoizedState.isDehydrated)try{ko(s.containerInfo)}catch(be){ot(a,a.return,be)}ky&&(ky=!1,qj(a));break;case 4:d=qr,qr=rd(a.stateNode.containerInfo),$n(s,a),qn(a),qr=d;break;case 12:$n(s,a),qn(a);break;case 31:$n(s,a),qn(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Vf(a,d)));break;case 13:$n(s,a),qn(a),a.child.flags&8192&&a.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Gf=Tn()),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Vf(a,d)));break;case 22:v=a.memoizedState!==null;var $=c!==null&&c.memoizedState!==null,Z=Ca,ne=Wt;if(Ca=Z||v,Wt=ne||$,$n(s,a),Wt=ne,Ca=Z,qn(a),d&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||$||Ca||Wt||hs(a)),c=null,s=a;;){if(s.tag===5||s.tag===26){if(c===null){$=c=s;try{if(b=$.stateNode,v)j=b.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{M=$.stateNode;var oe=$.memoizedProps.style,ee=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;M.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(be){ot($,$.return,be)}}}else if(s.tag===6){if(c===null){$=s;try{$.stateNode.nodeValue=v?"":$.memoizedProps}catch(be){ot($,$.return,be)}}}else if(s.tag===18){if(c===null){$=s;try{var te=$.stateNode;v?CA(te,!0):CA($.stateNode,!1)}catch(be){ot($,$.return,be)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=a.updateQueue,d!==null&&(c=d.retryQueue,c!==null&&(d.retryQueue=null,Vf(a,c))));break;case 19:$n(s,a),qn(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Vf(a,d)));break;case 30:break;case 21:break;default:$n(s,a),qn(a)}}function qn(a){var s=a.flags;if(s&2){try{for(var c,d=a.return;d!==null;){if(Dj(d)){c=d;break}d=d.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,b=_y(a);qf(a,b,v);break;case 5:var j=c.stateNode;c.flags&32&&(Js(j,""),c.flags&=-33);var M=_y(a);qf(a,M,j);break;case 3:case 4:var $=c.stateNode.containerInfo,Z=_y(a);Ny(a,Z,$);break;default:throw Error(r(161))}}catch(ne){ot(a,a.return,ne)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function qj(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;qj(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Da(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Pj(a,s.alternate,s),s=s.sibling}function hs(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:bi(4,s,s.return),hs(s);break;case 1:aa(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Cj(s,s.return,c),hs(s);break;case 27:Tc(s.stateNode);case 26:case 5:aa(s,s.return),hs(s);break;case 22:s.memoizedState===null&&hs(s);break;case 30:hs(s);break;default:hs(s)}a=a.sibling}}function Ra(a,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,v=a,b=s,j=b.flags;switch(b.tag){case 0:case 11:case 15:Ra(v,b,c),hc(4,b);break;case 1:if(Ra(v,b,c),d=b,v=d.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Z){ot(d,d.return,Z)}if(d=b,v=d.updateQueue,v!==null){var M=d.stateNode;try{var $=v.shared.hiddenCallbacks;if($!==null)for(v.shared.hiddenCallbacks=null,v=0;v<$.length;v++)bO($[v],M)}catch(Z){ot(d,d.return,Z)}}c&&j&64&&kj(b),pc(b,b.return);break;case 27:Rj(b);case 26:case 5:Ra(v,b,c),c&&d===null&&j&4&&Mj(b),pc(b,b.return);break;case 12:Ra(v,b,c);break;case 31:Ra(v,b,c),c&&j&4&&Lj(v,b);break;case 13:Ra(v,b,c),c&&j&4&&zj(v,b);break;case 22:b.memoizedState===null&&Ra(v,b,c),pc(b,b.return);break;case 30:break;default:Ra(v,b,c)}s=s.sibling}}function Cy(a,s){var c=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==c&&(a!=null&&a.refCount++,c!=null&&ec(c))}function My(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&ec(a))}function Vr(a,s,c,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Vj(a,s,c,d),s=s.sibling}function Vj(a,s,c,d){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Vr(a,s,c,d),v&2048&&hc(9,s);break;case 1:Vr(a,s,c,d);break;case 3:Vr(a,s,c,d),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&ec(a)));break;case 12:if(v&2048){Vr(a,s,c,d),a=s.stateNode;try{var b=s.memoizedProps,j=b.id,M=b.onPostCommit;typeof M=="function"&&M(j,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){ot(s,s.return,$)}}else Vr(a,s,c,d);break;case 31:Vr(a,s,c,d);break;case 13:Vr(a,s,c,d);break;case 23:break;case 22:b=s.stateNode,j=s.alternate,s.memoizedState!==null?b._visibility&2?Vr(a,s,c,d):mc(a,s):b._visibility&2?Vr(a,s,c,d):(b._visibility|=2,bo(a,s,c,d,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Cy(j,s);break;case 24:Vr(a,s,c,d),v&2048&&My(s.alternate,s);break;default:Vr(a,s,c,d)}}function bo(a,s,c,d,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var b=a,j=s,M=c,$=d,Z=j.flags;switch(j.tag){case 0:case 11:case 15:bo(b,j,M,$,v),hc(8,j);break;case 23:break;case 22:var ne=j.stateNode;j.memoizedState!==null?ne._visibility&2?bo(b,j,M,$,v):mc(b,j):(ne._visibility|=2,bo(b,j,M,$,v)),v&&Z&2048&&Cy(j.alternate,j);break;case 24:bo(b,j,M,$,v),v&&Z&2048&&My(j.alternate,j);break;default:bo(b,j,M,$,v)}s=s.sibling}}function mc(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=a,d=s,v=d.flags;switch(d.tag){case 22:mc(c,d),v&2048&&Cy(d.alternate,d);break;case 24:mc(c,d),v&2048&&My(d.alternate,d);break;default:mc(c,d)}s=s.sibling}}var yc=8192;function xo(a,s,c){if(a.subtreeFlags&yc)for(a=a.child;a!==null;)Fj(a,s,c),a=a.sibling}function Fj(a,s,c){switch(a.tag){case 26:xo(a,s,c),a.flags&yc&&a.memoizedState!==null&&iz(c,qr,a.memoizedState,a.memoizedProps);break;case 5:xo(a,s,c);break;case 3:case 4:var d=qr;qr=rd(a.stateNode.containerInfo),xo(a,s,c),qr=d;break;case 22:a.memoizedState===null&&(d=a.alternate,d!==null&&d.memoizedState!==null?(d=yc,yc=16777216,xo(a,s,c),yc=d):xo(a,s,c));break;default:xo(a,s,c)}}function Gj(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function vc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var d=s[c];on=d,Wj(d,a)}Gj(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Hj(a),a=a.sibling}function Hj(a){switch(a.tag){case 0:case 11:case 15:vc(a),a.flags&2048&&bi(9,a,a.return);break;case 3:vc(a);break;case 12:vc(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Ff(a)):vc(a);break;default:vc(a)}}function Ff(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var d=s[c];on=d,Wj(d,a)}Gj(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:bi(8,s,s.return),Ff(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Ff(s));break;default:Ff(s)}a=a.sibling}}function Wj(a,s){for(;on!==null;){var c=on;switch(c.tag){case 0:case 11:case 15:bi(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var d=c.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:ec(c.memoizedState.cache)}if(d=c.child,d!==null)d.return=c,on=d;else e:for(c=a;on!==null;){d=on;var v=d.sibling,b=d.return;if(Bj(d),d===c){on=null;break e}if(v!==null){v.return=b,on=v;break e}on=b}}}var x6={getCacheForType:function(a){var s=mn(Ft),c=s.data.get(a);return c===void 0&&(c=a(),s.data.set(a,c)),c},cacheSignal:function(){return mn(Ft).controller.signal}},S6=typeof WeakMap=="function"?WeakMap:Map,et=0,yt=null,$e=null,Ve=0,st=0,sr=null,xi=!1,So=!1,Dy=!1,Ia=0,Pt=0,Si=0,ps=0,Ry=0,or=0,wo=0,gc=null,Vn=null,Iy=!1,Gf=0,Yj=0,Hf=1/0,Wf=null,wi=null,Jt=0,Ti=null,To=null,Pa=0,Py=0,By=null,Xj=null,bc=0,Uy=null;function lr(){return(et&2)!==0&&Ve!==0?Ve&-Ve:B.T!==null?Fy():fT()}function Kj(){if(or===0)if((Ve&536870912)===0||We){var a=ef;ef<<=1,(ef&3932160)===0&&(ef=262144),or=a}else or=536870912;return a=ar.current,a!==null&&(a.flags|=32),or}function Fn(a,s,c){(a===yt&&(st===2||st===9)||a.cancelPendingCommit!==null)&&(Oo(a,0),Oi(a,Ve,or,!1)),zl(a,c),((et&2)===0||a!==yt)&&(a===yt&&((et&2)===0&&(ps|=c),Pt===4&&Oi(a,Ve,or,!1)),ia(a))}function Qj(a,s,c){if((et&6)!==0)throw Error(r(327));var d=!c&&(s&127)===0&&(s&a.expiredLanes)===0||Ll(a,s),v=d?O6(a,s):zy(a,s,!0),b=d;do{if(v===0){So&&!d&&Oi(a,s,0,!1);break}else{if(c=a.current.alternate,b&&!w6(c)){v=zy(a,s,!1),b=!1;continue}if(v===2){if(b=s,a.errorRecoveryDisabledLanes&b)var j=0;else j=a.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){s=j;e:{var M=a;v=gc;var $=M.current.memoizedState.isDehydrated;if($&&(Oo(M,j).flags|=256),j=zy(M,j,!1),j!==2){if(Dy&&!$){M.errorRecoveryDisabledLanes|=b,ps|=b,v=4;break e}b=Vn,Vn=v,b!==null&&(Vn===null?Vn=b:Vn.push.apply(Vn,b))}v=j}if(b=!1,v!==2)continue}}if(v===1){Oo(a,0),Oi(a,s,0,!0);break}e:{switch(d=a,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Oi(d,s,or,!xi);break e;case 2:Vn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Gf+300-Tn(),10<v)){if(Oi(d,s,or,!xi),nf(d,0,!0)!==0)break e;Pa=s,d.timeoutHandle=_A(Jj.bind(null,d,c,Vn,Wf,Iy,s,or,ps,wo,xi,b,"Throttled",-0,0),v);break e}Jj(d,c,Vn,Wf,Iy,s,or,ps,wo,xi,b,null,-0,0)}}break}while(!0);ia(a)}function Jj(a,s,c,d,v,b,j,M,$,Z,ne,oe,ee,te){if(a.timeoutHandle=-1,oe=s.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},Fj(s,b,oe);var be=(b&62914560)===b?Gf-Tn():(b&4194048)===b?Yj-Tn():0;if(be=sz(oe,be),be!==null){Pa=b,a.cancelPendingCommit=be(sA.bind(null,a,s,b,c,d,v,j,M,$,ne,oe,null,ee,te)),Oi(a,b,j,!Z);return}}sA(a,s,b,c,d,v,j,M,$)}function w6(a){for(var s=a;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var d=0;d<c.length;d++){var v=c[d],b=v.getSnapshot;v=v.value;try{if(!nr(b(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Oi(a,s,c,d){s&=~Ry,s&=~ps,a.suspendedLanes|=s,a.pingedLanes&=~s,d&&(a.warmLanes|=s),d=a.expirationTimes;for(var v=s;0<v;){var b=31-tr(v),j=1<<b;d[b]=-1,v&=~j}c!==0&&lT(a,c,s)}function Yf(){return(et&6)===0?(xc(0),!1):!0}function Ly(){if($e!==null){if(st===0)var a=$e.return;else a=$e,ja=is=null,ty(a),po=null,nc=0,a=$e;for(;a!==null;)Nj(a.alternate,a),a=a.return;$e=null}}function Oo(a,s){var c=a.timeoutHandle;c!==-1&&(a.timeoutHandle=-1,q6(c)),c=a.cancelPendingCommit,c!==null&&(a.cancelPendingCommit=null,c()),Pa=0,Ly(),yt=a,$e=c=Ta(a.current,null),Ve=s,st=0,sr=null,xi=!1,So=Ll(a,s),Dy=!1,wo=or=Ry=ps=Si=Pt=0,Vn=gc=null,Iy=!1,(s&8)!==0&&(s|=s&32);var d=a.entangledLanes;if(d!==0)for(a=a.entanglements,d&=s;0<d;){var v=31-tr(d),b=1<<v;s|=a[v],d&=~b}return Ia=s,mf(),c}function Zj(a,s){De=null,B.H=uc,s===ho||s===Tf?(s=mO(),st=3):s===Vm?(s=mO(),st=4):st=s===vy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,sr=s,$e===null&&(Pt=1,Bf(a,br(s,a.current)))}function eA(){var a=ar.current;return a===null?!0:(Ve&4194048)===Ve?Tr===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===Tr:!1}function tA(){var a=B.H;return B.H=uc,a===null?uc:a}function nA(){var a=B.A;return B.A=x6,a}function Xf(){Pt=4,xi||(Ve&4194048)!==Ve&&ar.current!==null||(So=!0),(Si&134217727)===0&&(ps&134217727)===0||yt===null||Oi(yt,Ve,or,!1)}function zy(a,s,c){var d=et;et|=2;var v=tA(),b=nA();(yt!==a||Ve!==s)&&(Wf=null,Oo(a,s)),s=!1;var j=Pt;e:do try{if(st!==0&&$e!==null){var M=$e,$=sr;switch(st){case 8:Ly(),j=6;break e;case 3:case 2:case 9:case 6:ar.current===null&&(s=!0);var Z=st;if(st=0,sr=null,jo(a,M,$,Z),c&&So){j=0;break e}break;default:Z=st,st=0,sr=null,jo(a,M,$,Z)}}T6(),j=Pt;break}catch(ne){Zj(a,ne)}while(!0);return s&&a.shellSuspendCounter++,ja=is=null,et=d,B.H=v,B.A=b,$e===null&&(yt=null,Ve=0,mf()),j}function T6(){for(;$e!==null;)rA($e)}function O6(a,s){var c=et;et|=2;var d=tA(),v=nA();yt!==a||Ve!==s?(Wf=null,Hf=Tn()+500,Oo(a,s)):So=Ll(a,s);e:do try{if(st!==0&&$e!==null){s=$e;var b=sr;t:switch(st){case 1:st=0,sr=null,jo(a,s,b,1);break;case 2:case 9:if(hO(b)){st=0,sr=null,aA(s);break}s=function(){st!==2&&st!==9||yt!==a||(st=7),ia(a)},b.then(s,s);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:hO(b)?(st=0,sr=null,aA(s)):(st=0,sr=null,jo(a,s,b,7));break;case 5:var j=null;switch($e.tag){case 26:j=$e.memoizedState;case 5:case 27:var M=$e;if(j?VA(j):M.stateNode.complete){st=0,sr=null;var $=M.sibling;if($!==null)$e=$;else{var Z=M.return;Z!==null?($e=Z,Kf(Z)):$e=null}break t}}st=0,sr=null,jo(a,s,b,5);break;case 6:st=0,sr=null,jo(a,s,b,6);break;case 8:Ly(),Pt=6;break e;default:throw Error(r(462))}}j6();break}catch(ne){Zj(a,ne)}while(!0);return ja=is=null,B.H=d,B.A=v,et=c,$e!==null?0:(yt=null,Ve=0,mf(),Pt)}function j6(){for(;$e!==null&&!ba();)rA($e)}function rA(a){var s=Ej(a.alternate,a,Ia);a.memoizedProps=a.pendingProps,s===null?Kf(a):$e=s}function aA(a){var s=a,c=s.alternate;switch(s.tag){case 15:case 0:s=Sj(c,s,s.pendingProps,s.type,void 0,Ve);break;case 11:s=Sj(c,s,s.pendingProps,s.type.render,s.ref,Ve);break;case 5:ty(s);default:Nj(c,s),s=$e=nO(s,Ia),s=Ej(c,s,Ia)}a.memoizedProps=a.pendingProps,s===null?Kf(a):$e=s}function jo(a,s,c,d){ja=is=null,ty(s),po=null,nc=0;var v=s.return;try{if(h6(a,v,s,c,Ve)){Pt=1,Bf(a,br(c,a.current)),$e=null;return}}catch(b){if(v!==null)throw $e=v,b;Pt=1,Bf(a,br(c,a.current)),$e=null;return}s.flags&32768?(We||d===1?a=!0:So||(Ve&536870912)!==0?a=!1:(xi=a=!0,(d===2||d===9||d===3||d===6)&&(d=ar.current,d!==null&&d.tag===13&&(d.flags|=16384))),iA(s,a)):Kf(s)}function Kf(a){var s=a;do{if((s.flags&32768)!==0){iA(s,xi);return}a=s.return;var c=y6(s.alternate,s,Ia);if(c!==null){$e=c;return}if(s=s.sibling,s!==null){$e=s;return}$e=s=a}while(s!==null);Pt===0&&(Pt=5)}function iA(a,s){do{var c=v6(a.alternate,a);if(c!==null){c.flags&=32767,$e=c;return}if(c=a.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(a=a.sibling,a!==null)){$e=a;return}$e=a=c}while(a!==null);Pt=6,$e=null}function sA(a,s,c,d,v,b,j,M,$){a.cancelPendingCommit=null;do Qf();while(Jt!==0);if((et&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(b=s.lanes|s.childLanes,b|=_m,aL(a,c,b,j,M,$),a===yt&&($e=yt=null,Ve=0),To=s,Ti=a,Pa=c,Py=b,By=v,Xj=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,N6(Ju,function(){return fA(),null})):(a.callbackNode=null,a.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=B.T,B.T=null,v=D.p,D.p=2,j=et,et|=4;try{g6(a,s,c)}finally{et=j,D.p=v,B.T=d}}Jt=1,oA(),lA(),cA()}}function oA(){if(Jt===1){Jt=0;var a=Ti,s=To,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var d=D.p;D.p=2;var v=et;et|=4;try{$j(s,a);var b=Jy,j=WT(a.containerInfo),M=b.focusedElem,$=b.selectionRange;if(j!==M&&M&&M.ownerDocument&&HT(M.ownerDocument.documentElement,M)){if($!==null&&Tm(M)){var Z=$.start,ne=$.end;if(ne===void 0&&(ne=Z),"selectionStart"in M)M.selectionStart=Z,M.selectionEnd=Math.min(ne,M.value.length);else{var oe=M.ownerDocument||document,ee=oe&&oe.defaultView||window;if(ee.getSelection){var te=ee.getSelection(),be=M.textContent.length,Ee=Math.min($.start,be),ft=$.end===void 0?Ee:Math.min($.end,be);!te.extend&&Ee>ft&&(j=ft,ft=Ee,Ee=j);var X=GT(M,Ee),V=GT(M,ft);if(X&&V&&(te.rangeCount!==1||te.anchorNode!==X.node||te.anchorOffset!==X.offset||te.focusNode!==V.node||te.focusOffset!==V.offset)){var J=oe.createRange();J.setStart(X.node,X.offset),te.removeAllRanges(),Ee>ft?(te.addRange(J),te.extend(V.node,V.offset)):(J.setEnd(V.node,V.offset),te.addRange(J))}}}}for(oe=[],te=M;te=te.parentNode;)te.nodeType===1&&oe.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<oe.length;M++){var ie=oe[M];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}cd=!!Qy,Jy=Qy=null}finally{et=v,D.p=d,B.T=c}}a.current=s,Jt=2}}function lA(){if(Jt===2){Jt=0;var a=Ti,s=To,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var d=D.p;D.p=2;var v=et;et|=4;try{Pj(a,s.alternate,s)}finally{et=v,D.p=d,B.T=c}}Jt=3}}function cA(){if(Jt===4||Jt===3){Jt=0,Bl();var a=Ti,s=To,c=Pa,d=Xj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Jt=5:(Jt=0,To=Ti=null,uA(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(wi=null),am(c),s=s.stateNode,er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(Ul,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=B.T,v=D.p,D.p=2,B.T=null;try{for(var b=a.onRecoverableError,j=0;j<d.length;j++){var M=d[j];b(M.value,{componentStack:M.stack})}}finally{B.T=s,D.p=v}}(Pa&3)!==0&&Qf(),ia(a),v=a.pendingLanes,(c&261930)!==0&&(v&42)!==0?a===Uy?bc++:(bc=0,Uy=a):bc=0,xc(0)}}function uA(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,ec(s)))}function Qf(){return oA(),lA(),cA(),fA()}function fA(){if(Jt!==5)return!1;var a=Ti,s=Py;Py=0;var c=am(Pa),d=B.T,v=D.p;try{D.p=32>c?32:c,B.T=null,c=By,By=null;var b=Ti,j=Pa;if(Jt=0,To=Ti=null,Pa=0,(et&6)!==0)throw Error(r(331));var M=et;if(et|=4,Hj(b.current),Vj(b,b.current,j,c),et=M,xc(0,!1),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(Ul,b)}catch{}return!0}finally{D.p=v,B.T=d,uA(a,s)}}function dA(a,s,c){s=br(c,s),s=yy(a.stateNode,s,2),a=yi(a,s,2),a!==null&&(zl(a,2),ia(a))}function ot(a,s,c){if(a.tag===3)dA(a,a,c);else for(;s!==null;){if(s.tag===3){dA(s,a,c);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(wi===null||!wi.has(d))){a=br(c,a),c=hj(2),d=yi(s,c,2),d!==null&&(pj(c,d,s,a),zl(d,2),ia(d));break}}s=s.return}}function $y(a,s,c){var d=a.pingCache;if(d===null){d=a.pingCache=new S6;var v=new Set;d.set(s,v)}else v=d.get(s),v===void 0&&(v=new Set,d.set(s,v));v.has(c)||(Dy=!0,v.add(c),a=A6.bind(null,a,s,c),s.then(a,a))}function A6(a,s,c){var d=a.pingCache;d!==null&&d.delete(s),a.pingedLanes|=a.suspendedLanes&c,a.warmLanes&=~c,yt===a&&(Ve&c)===c&&(Pt===4||Pt===3&&(Ve&62914560)===Ve&&300>Tn()-Gf?(et&2)===0&&Oo(a,0):Ry|=c,wo===Ve&&(wo=0)),ia(a)}function hA(a,s){s===0&&(s=oT()),a=ns(a,s),a!==null&&(zl(a,s),ia(a))}function E6(a){var s=a.memoizedState,c=0;s!==null&&(c=s.retryLane),hA(a,c)}function _6(a,s){var c=0;switch(a.tag){case 31:case 13:var d=a.stateNode,v=a.memoizedState;v!==null&&(c=v.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(s),hA(a,c)}function N6(a,s){return si(a,s)}var Jf=null,Ao=null,qy=!1,Zf=!1,Vy=!1,ji=0;function ia(a){a!==Ao&&a.next===null&&(Ao===null?Jf=Ao=a:Ao=Ao.next=a),Zf=!0,qy||(qy=!0,C6())}function xc(a,s){if(!Vy&&Zf){Vy=!0;do for(var c=!1,d=Jf;d!==null;){if(a!==0){var v=d.pendingLanes;if(v===0)var b=0;else{var j=d.suspendedLanes,M=d.pingedLanes;b=(1<<31-tr(42|a)+1)-1,b&=v&~(j&~M),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(c=!0,vA(d,b))}else b=Ve,b=nf(d,d===yt?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Ll(d,b)||(c=!0,vA(d,b));d=d.next}while(c);Vy=!1}}function k6(){pA()}function pA(){Zf=qy=!1;var a=0;ji!==0&&$6()&&(a=ji);for(var s=Tn(),c=null,d=Jf;d!==null;){var v=d.next,b=mA(d,s);b===0?(d.next=null,c===null?Jf=v:c.next=v,v===null&&(Ao=c)):(c=d,(a!==0||(b&3)!==0)&&(Zf=!0)),d=v}Jt!==0&&Jt!==5||xc(a),ji!==0&&(ji=0)}function mA(a,s){for(var c=a.suspendedLanes,d=a.pingedLanes,v=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var j=31-tr(b),M=1<<j,$=v[j];$===-1?((M&c)===0||(M&d)!==0)&&(v[j]=rL(M,s)):$<=s&&(a.expiredLanes|=M),b&=~M}if(s=yt,c=Ve,c=nf(a,a===s?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d=a.callbackNode,c===0||a===s&&(st===2||st===9)||a.cancelPendingCommit!==null)return d!==null&&d!==null&&zr(d),a.callbackNode=null,a.callbackPriority=0;if((c&3)===0||Ll(a,c)){if(s=c&-c,s===a.callbackPriority)return s;switch(d!==null&&zr(d),am(c)){case 2:case 8:c=iT;break;case 32:c=Ju;break;case 268435456:c=sT;break;default:c=Ju}return d=yA.bind(null,a),c=si(c,d),a.callbackPriority=s,a.callbackNode=c,s}return d!==null&&d!==null&&zr(d),a.callbackPriority=2,a.callbackNode=null,2}function yA(a,s){if(Jt!==0&&Jt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var c=a.callbackNode;if(Qf()&&a.callbackNode!==c)return null;var d=Ve;return d=nf(a,a===yt?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d===0?null:(Qj(a,d,s),mA(a,Tn()),a.callbackNode!=null&&a.callbackNode===c?yA.bind(null,a):null)}function vA(a,s){if(Qf())return null;Qj(a,s,!0)}function C6(){V6(function(){(et&6)!==0?si(aT,k6):pA()})}function Fy(){if(ji===0){var a=uo;a===0&&(a=Zu,Zu<<=1,(Zu&261888)===0&&(Zu=256)),ji=a}return ji}function gA(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:of(""+a)}function bA(a,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,a.id&&c.setAttribute("form",a.id),s.parentNode.insertBefore(c,s),a=new FormData(a),c.parentNode.removeChild(c),a}function M6(a,s,c,d,v){if(s==="submit"&&c&&c.stateNode===v){var b=gA((v[Un]||null).action),j=d.submitter;j&&(s=(s=j[Un]||null)?gA(s.formAction):j.getAttribute("formAction"),s!==null&&(b=s,j=null));var M=new ff("action","action",null,d,v);a.push({event:M,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ji!==0){var $=j?bA(v,j):new FormData(v);uy(c,{pending:!0,data:$,method:v.method,action:b},null,$)}}else typeof b=="function"&&(M.preventDefault(),$=j?bA(v,j):new FormData(v),uy(c,{pending:!0,data:$,method:v.method,action:b},b,$))},currentTarget:v}]})}}for(var Gy=0;Gy<Em.length;Gy++){var Hy=Em[Gy],D6=Hy.toLowerCase(),R6=Hy[0].toUpperCase()+Hy.slice(1);$r(D6,"on"+R6)}$r(KT,"onAnimationEnd"),$r(QT,"onAnimationIteration"),$r(JT,"onAnimationStart"),$r("dblclick","onDoubleClick"),$r("focusin","onFocus"),$r("focusout","onBlur"),$r(KL,"onTransitionRun"),$r(QL,"onTransitionStart"),$r(JL,"onTransitionCancel"),$r(ZT,"onTransitionEnd"),Ks("onMouseEnter",["mouseout","mouseover"]),Ks("onMouseLeave",["mouseout","mouseover"]),Ks("onPointerEnter",["pointerout","pointerover"]),Ks("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),I6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sc));function xA(a,s){s=(s&4)!==0;for(var c=0;c<a.length;c++){var d=a[c],v=d.event;d=d.listeners;e:{var b=void 0;if(s)for(var j=d.length-1;0<=j;j--){var M=d[j],$=M.instance,Z=M.currentTarget;if(M=M.listener,$!==b&&v.isPropagationStopped())break e;b=M,v.currentTarget=Z;try{b(v)}catch(ne){pf(ne)}v.currentTarget=null,b=$}else for(j=0;j<d.length;j++){if(M=d[j],$=M.instance,Z=M.currentTarget,M=M.listener,$!==b&&v.isPropagationStopped())break e;b=M,v.currentTarget=Z;try{b(v)}catch(ne){pf(ne)}v.currentTarget=null,b=$}}}}function qe(a,s){var c=s[im];c===void 0&&(c=s[im]=new Set);var d=a+"__bubble";c.has(d)||(SA(s,a,2,!1),c.add(d))}function Wy(a,s,c){var d=0;s&&(d|=4),SA(c,a,d,s)}var ed="_reactListening"+Math.random().toString(36).slice(2);function Yy(a){if(!a[ed]){a[ed]=!0,pT.forEach(function(c){c!=="selectionchange"&&(I6.has(c)||Wy(c,!1,a),Wy(c,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[ed]||(s[ed]=!0,Wy("selectionchange",!1,s))}}function SA(a,s,c,d){switch(KA(s)){case 2:var v=cz;break;case 8:v=uz;break;default:v=cv}c=v.bind(null,s,c,a),v=void 0,!pm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),d?v!==void 0?a.addEventListener(s,c,{capture:!0,passive:v}):a.addEventListener(s,c,!0):v!==void 0?a.addEventListener(s,c,{passive:v}):a.addEventListener(s,c,!1)}function Xy(a,s,c,d,v){var b=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var j=d.tag;if(j===3||j===4){var M=d.stateNode.containerInfo;if(M===v)break;if(j===4)for(j=d.return;j!==null;){var $=j.tag;if(($===3||$===4)&&j.stateNode.containerInfo===v)return;j=j.return}for(;M!==null;){if(j=Ws(M),j===null)return;if($=j.tag,$===5||$===6||$===26||$===27){d=b=j;continue e}M=M.parentNode}}d=d.return}AT(function(){var Z=b,ne=dm(c),oe=[];e:{var ee=eO.get(a);if(ee!==void 0){var te=ff,be=a;switch(a){case"keypress":if(cf(c)===0)break e;case"keydown":case"keyup":te=_L;break;case"focusin":be="focus",te=gm;break;case"focusout":be="blur",te=gm;break;case"beforeblur":case"afterblur":te=gm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=NT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=yL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=CL;break;case KT:case QT:case JT:te=bL;break;case ZT:te=DL;break;case"scroll":case"scrollend":te=pL;break;case"wheel":te=IL;break;case"copy":case"cut":case"paste":te=SL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=CT;break;case"toggle":case"beforetoggle":te=BL}var Ee=(s&4)!==0,ft=!Ee&&(a==="scroll"||a==="scrollend"),X=Ee?ee!==null?ee+"Capture":null:ee;Ee=[];for(var V=Z,J;V!==null;){var ie=V;if(J=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||J===null||X===null||(ie=Vl(V,X),ie!=null&&Ee.push(wc(V,ie,J))),ft)break;V=V.return}0<Ee.length&&(ee=new te(ee,be,null,c,ne),oe.push({event:ee,listeners:Ee}))}}if((s&7)===0){e:{if(ee=a==="mouseover"||a==="pointerover",te=a==="mouseout"||a==="pointerout",ee&&c!==fm&&(be=c.relatedTarget||c.fromElement)&&(Ws(be)||be[Hs]))break e;if((te||ee)&&(ee=ne.window===ne?ne:(ee=ne.ownerDocument)?ee.defaultView||ee.parentWindow:window,te?(be=c.relatedTarget||c.toElement,te=Z,be=be?Ws(be):null,be!==null&&(ft=o(be),Ee=be.tag,be!==ft||Ee!==5&&Ee!==27&&Ee!==6)&&(be=null)):(te=null,be=Z),te!==be)){if(Ee=NT,ie="onMouseLeave",X="onMouseEnter",V="mouse",(a==="pointerout"||a==="pointerover")&&(Ee=CT,ie="onPointerLeave",X="onPointerEnter",V="pointer"),ft=te==null?ee:ql(te),J=be==null?ee:ql(be),ee=new Ee(ie,V+"leave",te,c,ne),ee.target=ft,ee.relatedTarget=J,ie=null,Ws(ne)===Z&&(Ee=new Ee(X,V+"enter",be,c,ne),Ee.target=J,Ee.relatedTarget=ft,ie=Ee),ft=ie,te&&be)t:{for(Ee=P6,X=te,V=be,J=0,ie=X;ie;ie=Ee(ie))J++;ie=0;for(var je=V;je;je=Ee(je))ie++;for(;0<J-ie;)X=Ee(X),J--;for(;0<ie-J;)V=Ee(V),ie--;for(;J--;){if(X===V||V!==null&&X===V.alternate){Ee=X;break t}X=Ee(X),V=Ee(V)}Ee=null}else Ee=null;te!==null&&wA(oe,ee,te,Ee,!1),be!==null&&ft!==null&&wA(oe,ft,be,Ee,!0)}}e:{if(ee=Z?ql(Z):window,te=ee.nodeName&&ee.nodeName.toLowerCase(),te==="select"||te==="input"&&ee.type==="file")var Ke=LT;else if(BT(ee))if(zT)Ke=WL;else{Ke=GL;var Te=FL}else te=ee.nodeName,!te||te.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?Z&&um(Z.elementType)&&(Ke=LT):Ke=HL;if(Ke&&(Ke=Ke(a,Z))){UT(oe,Ke,c,ne);break e}Te&&Te(a,ee,Z),a==="focusout"&&Z&&ee.type==="number"&&Z.memoizedProps.value!=null&&cm(ee,"number",ee.value)}switch(Te=Z?ql(Z):window,a){case"focusin":(BT(Te)||Te.contentEditable==="true")&&(no=Te,Om=Z,Ql=null);break;case"focusout":Ql=Om=no=null;break;case"mousedown":jm=!0;break;case"contextmenu":case"mouseup":case"dragend":jm=!1,YT(oe,c,ne);break;case"selectionchange":if(XL)break;case"keydown":case"keyup":YT(oe,c,ne)}var Ie;if(xm)e:{switch(a){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else to?IT(a,c)&&(Fe="onCompositionEnd"):a==="keydown"&&c.keyCode===229&&(Fe="onCompositionStart");Fe&&(MT&&c.locale!=="ko"&&(to||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&to&&(Ie=ET()):(ci=ne,mm="value"in ci?ci.value:ci.textContent,to=!0)),Te=td(Z,Fe),0<Te.length&&(Fe=new kT(Fe,a,null,c,ne),oe.push({event:Fe,listeners:Te}),Ie?Fe.data=Ie:(Ie=PT(c),Ie!==null&&(Fe.data=Ie)))),(Ie=LL?zL(a,c):$L(a,c))&&(Fe=td(Z,"onBeforeInput"),0<Fe.length&&(Te=new kT("onBeforeInput","beforeinput",null,c,ne),oe.push({event:Te,listeners:Fe}),Te.data=Ie)),M6(oe,a,Z,c,ne)}xA(oe,s)})}function wc(a,s,c){return{instance:a,listener:s,currentTarget:c}}function td(a,s){for(var c=s+"Capture",d=[];a!==null;){var v=a,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Vl(a,c),v!=null&&d.unshift(wc(a,v,b)),v=Vl(a,s),v!=null&&d.push(wc(a,v,b))),a.tag===3)return d;a=a.return}return[]}function P6(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function wA(a,s,c,d,v){for(var b=s._reactName,j=[];c!==null&&c!==d;){var M=c,$=M.alternate,Z=M.stateNode;if(M=M.tag,$!==null&&$===d)break;M!==5&&M!==26&&M!==27||Z===null||($=Z,v?(Z=Vl(c,b),Z!=null&&j.unshift(wc(c,Z,$))):v||(Z=Vl(c,b),Z!=null&&j.push(wc(c,Z,$)))),c=c.return}j.length!==0&&a.push({event:s,listeners:j})}var B6=/\r\n?/g,U6=/\u0000|\uFFFD/g;function TA(a){return(typeof a=="string"?a:""+a).replace(B6,`
|
|
9
|
+
`).replace(U6,"")}function OA(a,s){return s=TA(s),TA(a)===s}function ut(a,s,c,d,v,b){switch(c){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||Js(a,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&Js(a,""+d);break;case"className":af(a,"class",d);break;case"tabIndex":af(a,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":af(a,c,d);break;case"style":OT(a,d,b);break;case"data":if(s!=="object"){af(a,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||c!=="href")){a.removeAttribute(c);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(c);break}d=of(""+d),a.setAttribute(c,d);break;case"action":case"formAction":if(typeof d=="function"){a.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(s!=="input"&&ut(a,s,"name",v.name,v,null),ut(a,s,"formEncType",v.formEncType,v,null),ut(a,s,"formMethod",v.formMethod,v,null),ut(a,s,"formTarget",v.formTarget,v,null)):(ut(a,s,"encType",v.encType,v,null),ut(a,s,"method",v.method,v,null),ut(a,s,"target",v.target,v,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(c);break}d=of(""+d),a.setAttribute(c,d);break;case"onClick":d!=null&&(a.onclick=Sa);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(c=d.__html,c!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"multiple":a.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":a.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){a.removeAttribute("xlink:href");break}c=of(""+d),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,""+d):a.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,""):a.removeAttribute(c);break;case"capture":case"download":d===!0?a.setAttribute(c,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,d):a.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?a.setAttribute(c,d):a.removeAttribute(c);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?a.removeAttribute(c):a.setAttribute(c,d);break;case"popover":qe("beforetoggle",a),qe("toggle",a),rf(a,"popover",d);break;case"xlinkActuate":xa(a,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":xa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":xa(a,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":xa(a,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":xa(a,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":xa(a,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":xa(a,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":xa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":xa(a,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":rf(a,"is",d);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=dL.get(c)||c,rf(a,c,d))}}function Ky(a,s,c,d,v,b){switch(c){case"style":OT(a,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(c=d.__html,c!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"children":typeof d=="string"?Js(a,d):(typeof d=="number"||typeof d=="bigint")&&Js(a,""+d);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"onClick":d!=null&&(a.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mT.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),b=a[Un]||null,b=b!=null?b[c]:null,typeof b=="function"&&a.removeEventListener(s,b,v),typeof d=="function")){typeof b!="function"&&b!==null&&(c in a?a[c]=null:a.hasAttribute(c)&&a.removeAttribute(c)),a.addEventListener(s,d,v);break e}c in a?a[c]=d:d===!0?a.setAttribute(c,""):rf(a,c,d)}}}function vn(a,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var d=!1,v=!1,b;for(b in c)if(c.hasOwnProperty(b)){var j=c[b];if(j!=null)switch(b){case"src":d=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ut(a,s,b,j,c,null)}}v&&ut(a,s,"srcSet",c.srcSet,c,null),d&&ut(a,s,"src",c.src,c,null);return;case"input":qe("invalid",a);var M=b=j=v=null,$=null,Z=null;for(d in c)if(c.hasOwnProperty(d)){var ne=c[d];if(ne!=null)switch(d){case"name":v=ne;break;case"type":j=ne;break;case"checked":$=ne;break;case"defaultChecked":Z=ne;break;case"value":b=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ut(a,s,d,ne,c,null)}}xT(a,b,M,$,Z,j,v,!1);return;case"select":qe("invalid",a),d=j=b=null;for(v in c)if(c.hasOwnProperty(v)&&(M=c[v],M!=null))switch(v){case"value":b=M;break;case"defaultValue":j=M;break;case"multiple":d=M;default:ut(a,s,v,M,c,null)}s=b,c=j,a.multiple=!!d,s!=null?Qs(a,!!d,s,!1):c!=null&&Qs(a,!!d,c,!0);return;case"textarea":qe("invalid",a),b=v=d=null;for(j in c)if(c.hasOwnProperty(j)&&(M=c[j],M!=null))switch(j){case"value":d=M;break;case"defaultValue":v=M;break;case"children":b=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:ut(a,s,j,M,c,null)}wT(a,d,v,b);return;case"option":for($ in c)c.hasOwnProperty($)&&(d=c[$],d!=null)&&($==="selected"?a.selected=d&&typeof d!="function"&&typeof d!="symbol":ut(a,s,$,d,c,null));return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(d=0;d<Sc.length;d++)qe(Sc[d],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in c)if(c.hasOwnProperty(Z)&&(d=c[Z],d!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ut(a,s,Z,d,c,null)}return;default:if(um(s)){for(ne in c)c.hasOwnProperty(ne)&&(d=c[ne],d!==void 0&&Ky(a,s,ne,d,c,void 0));return}}for(M in c)c.hasOwnProperty(M)&&(d=c[M],d!=null&&ut(a,s,M,d,c,null))}function L6(a,s,c,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,j=null,M=null,$=null,Z=null,ne=null;for(te in c){var oe=c[te];if(c.hasOwnProperty(te)&&oe!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":$=oe;default:d.hasOwnProperty(te)||ut(a,s,te,null,d,oe)}}for(var ee in d){var te=d[ee];if(oe=c[ee],d.hasOwnProperty(ee)&&(te!=null||oe!=null))switch(ee){case"type":b=te;break;case"name":v=te;break;case"checked":Z=te;break;case"defaultChecked":ne=te;break;case"value":j=te;break;case"defaultValue":M=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,s));break;default:te!==oe&&ut(a,s,ee,te,d,oe)}}lm(a,j,M,$,Z,ne,b,v);return;case"select":te=j=M=ee=null;for(b in c)if($=c[b],c.hasOwnProperty(b)&&$!=null)switch(b){case"value":break;case"multiple":te=$;default:d.hasOwnProperty(b)||ut(a,s,b,null,d,$)}for(v in d)if(b=d[v],$=c[v],d.hasOwnProperty(v)&&(b!=null||$!=null))switch(v){case"value":ee=b;break;case"defaultValue":M=b;break;case"multiple":j=b;default:b!==$&&ut(a,s,v,b,d,$)}s=M,c=j,d=te,ee!=null?Qs(a,!!c,ee,!1):!!d!=!!c&&(s!=null?Qs(a,!!c,s,!0):Qs(a,!!c,c?[]:"",!1));return;case"textarea":te=ee=null;for(M in c)if(v=c[M],c.hasOwnProperty(M)&&v!=null&&!d.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:ut(a,s,M,null,d,v)}for(j in d)if(v=d[j],b=c[j],d.hasOwnProperty(j)&&(v!=null||b!=null))switch(j){case"value":ee=v;break;case"defaultValue":te=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&ut(a,s,j,v,d,b)}ST(a,ee,te);return;case"option":for(var be in c)ee=c[be],c.hasOwnProperty(be)&&ee!=null&&!d.hasOwnProperty(be)&&(be==="selected"?a.selected=!1:ut(a,s,be,null,d,ee));for($ in d)ee=d[$],te=c[$],d.hasOwnProperty($)&&ee!==te&&(ee!=null||te!=null)&&($==="selected"?a.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":ut(a,s,$,ee,d,te));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ee in c)ee=c[Ee],c.hasOwnProperty(Ee)&&ee!=null&&!d.hasOwnProperty(Ee)&&ut(a,s,Ee,null,d,ee);for(Z in d)if(ee=d[Z],te=c[Z],d.hasOwnProperty(Z)&&ee!==te&&(ee!=null||te!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,s));break;default:ut(a,s,Z,ee,d,te)}return;default:if(um(s)){for(var ft in c)ee=c[ft],c.hasOwnProperty(ft)&&ee!==void 0&&!d.hasOwnProperty(ft)&&Ky(a,s,ft,void 0,d,ee);for(ne in d)ee=d[ne],te=c[ne],!d.hasOwnProperty(ne)||ee===te||ee===void 0&&te===void 0||Ky(a,s,ne,ee,d,te);return}}for(var X in c)ee=c[X],c.hasOwnProperty(X)&&ee!=null&&!d.hasOwnProperty(X)&&ut(a,s,X,null,d,ee);for(oe in d)ee=d[oe],te=c[oe],!d.hasOwnProperty(oe)||ee===te||ee==null&&te==null||ut(a,s,oe,ee,d,te)}function jA(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z6(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,c=performance.getEntriesByType("resource"),d=0;d<c.length;d++){var v=c[d],b=v.transferSize,j=v.initiatorType,M=v.duration;if(b&&M&&jA(j)){for(j=0,M=v.responseEnd,d+=1;d<c.length;d++){var $=c[d],Z=$.startTime;if(Z>M)break;var ne=$.transferSize,oe=$.initiatorType;ne&&jA(oe)&&($=$.responseEnd,j+=ne*($<M?1:(M-Z)/($-Z)))}if(--d,s+=8*(b+j)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Qy=null,Jy=null;function nd(a){return a.nodeType===9?a:a.ownerDocument}function AA(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function EA(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Zy(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ev=null;function $6(){var a=window.event;return a&&a.type==="popstate"?a===ev?!1:(ev=a,!0):(ev=null,!1)}var _A=typeof setTimeout=="function"?setTimeout:void 0,q6=typeof clearTimeout=="function"?clearTimeout:void 0,NA=typeof Promise=="function"?Promise:void 0,V6=typeof queueMicrotask=="function"?queueMicrotask:typeof NA<"u"?function(a){return NA.resolve(null).then(a).catch(F6)}:_A;function F6(a){setTimeout(function(){throw a})}function Ai(a){return a==="head"}function kA(a,s){var c=s,d=0;do{var v=c.nextSibling;if(a.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(d===0){a.removeChild(v),ko(s);return}d--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")d++;else if(c==="html")Tc(a.ownerDocument.documentElement);else if(c==="head"){c=a.ownerDocument.head,Tc(c);for(var b=c.firstChild;b;){var j=b.nextSibling,M=b.nodeName;b[$l]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&b.rel.toLowerCase()==="stylesheet"||c.removeChild(b),b=j}}else c==="body"&&Tc(a.ownerDocument.body);c=v}while(c);ko(s)}function CA(a,s){var c=a;a=0;do{var d=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),d&&d.nodeType===8)if(c=d.data,c==="/$"){if(a===0)break;a--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||a++;c=d}while(c)}function tv(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":tv(c),sm(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}a.removeChild(c)}}function G6(a,s,c,d){for(;a.nodeType===1;){var v=c;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(d){if(!a[$l])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Or(a.nextSibling),a===null)break}return null}function H6(a,s,c){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!c||(a=Or(a.nextSibling),a===null))return null;return a}function MA(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Or(a.nextSibling),a===null))return null;return a}function nv(a){return a.data==="$?"||a.data==="$~"}function rv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function W6(a,s){var c=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||c.readyState!=="loading")s();else{var d=function(){s(),c.removeEventListener("DOMContentLoaded",d)};c.addEventListener("DOMContentLoaded",d),a._reactRetry=d}}function Or(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var av=null;function DA(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var c=a.data;if(c==="/$"||c==="/&"){if(s===0)return Or(a.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}a=a.nextSibling}return null}function RA(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var c=a.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return a;s--}else c!=="/$"&&c!=="/&"||s++}a=a.previousSibling}return null}function IA(a,s,c){switch(s=nd(c),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Tc(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);sm(a)}var jr=new Map,PA=new Set;function rd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ba=D.d;D.d={f:Y6,r:X6,D:K6,C:Q6,L:J6,m:Z6,X:tz,S:ez,M:nz};function Y6(){var a=Ba.f(),s=Yf();return a||s}function X6(a){var s=Ys(a);s!==null&&s.tag===5&&s.type==="form"?ZO(s):Ba.r(a)}var Eo=typeof document>"u"?null:document;function BA(a,s,c){var d=Eo;if(d&&typeof s=="string"&&s){var v=vr(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),PA.has(v)||(PA.add(v),a={rel:a,crossOrigin:c,href:s},d.querySelector(v)===null&&(s=d.createElement("link"),vn(s,"link",a),sn(s),d.head.appendChild(s)))}}function K6(a){Ba.D(a),BA("dns-prefetch",a,null)}function Q6(a,s){Ba.C(a,s),BA("preconnect",a,s)}function J6(a,s,c){Ba.L(a,s,c);var d=Eo;if(d&&a&&s){var v='link[rel="preload"][as="'+vr(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+vr(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+vr(c.imageSizes)+'"]')):v+='[href="'+vr(a)+'"]';var b=v;switch(s){case"style":b=_o(a);break;case"script":b=No(a)}jr.has(b)||(a=m({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:a,as:s},c),jr.set(b,a),d.querySelector(v)!==null||s==="style"&&d.querySelector(Oc(b))||s==="script"&&d.querySelector(jc(b))||(s=d.createElement("link"),vn(s,"link",a),sn(s),d.head.appendChild(s)))}}function Z6(a,s){Ba.m(a,s);var c=Eo;if(c&&a){var d=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+vr(d)+'"][href="'+vr(a)+'"]',b=v;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=No(a)}if(!jr.has(b)&&(a=m({rel:"modulepreload",href:a},s),jr.set(b,a),c.querySelector(v)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(jc(b)))return}d=c.createElement("link"),vn(d,"link",a),sn(d),c.head.appendChild(d)}}}function ez(a,s,c){Ba.S(a,s,c);var d=Eo;if(d&&a){var v=Xs(d).hoistableStyles,b=_o(a);s=s||"default";var j=v.get(b);if(!j){var M={loading:0,preload:null};if(j=d.querySelector(Oc(b)))M.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":s},c),(c=jr.get(b))&&iv(a,c);var $=j=d.createElement("link");sn($),vn($,"link",a),$._p=new Promise(function(Z,ne){$.onload=Z,$.onerror=ne}),$.addEventListener("load",function(){M.loading|=1}),$.addEventListener("error",function(){M.loading|=2}),M.loading|=4,ad(j,s,d)}j={type:"stylesheet",instance:j,count:1,state:M},v.set(b,j)}}}function tz(a,s){Ba.X(a,s);var c=Eo;if(c&&a){var d=Xs(c).hoistableScripts,v=No(a),b=d.get(v);b||(b=c.querySelector(jc(v)),b||(a=m({src:a,async:!0},s),(s=jr.get(v))&&sv(a,s),b=c.createElement("script"),sn(b),vn(b,"link",a),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(v,b))}}function nz(a,s){Ba.M(a,s);var c=Eo;if(c&&a){var d=Xs(c).hoistableScripts,v=No(a),b=d.get(v);b||(b=c.querySelector(jc(v)),b||(a=m({src:a,async:!0,type:"module"},s),(s=jr.get(v))&&sv(a,s),b=c.createElement("script"),sn(b),vn(b,"link",a),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(v,b))}}function UA(a,s,c,d){var v=(v=Ae.current)?rd(v):null;if(!v)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=_o(c.href),c=Xs(v).hoistableStyles,d=c.get(s),d||(d={type:"style",instance:null,count:0,state:null},c.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){a=_o(c.href);var b=Xs(v).hoistableStyles,j=b.get(a);if(j||(v=v.ownerDocument||v,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,j),(b=v.querySelector(Oc(a)))&&!b._p&&(j.instance=b,j.state.loading=5),jr.has(a)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},jr.set(a,c),b||rz(v,a,c,j.state))),s&&d===null)throw Error(r(528,""));return j}if(s&&d!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=No(c),c=Xs(v).hoistableScripts,d=c.get(s),d||(d={type:"script",instance:null,count:0,state:null},c.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function _o(a){return'href="'+vr(a)+'"'}function Oc(a){return'link[rel="stylesheet"]['+a+"]"}function LA(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function rz(a,s,c,d){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=a.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),vn(s,"link",c),sn(s),a.head.appendChild(s))}function No(a){return'[src="'+vr(a)+'"]'}function jc(a){return"script[async]"+a}function zA(a,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var d=a.querySelector('style[data-href~="'+vr(c.href)+'"]');if(d)return s.instance=d,sn(d),d;var v=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return d=(a.ownerDocument||a).createElement("style"),sn(d),vn(d,"style",v),ad(d,c.precedence,a),s.instance=d;case"stylesheet":v=_o(c.href);var b=a.querySelector(Oc(v));if(b)return s.state.loading|=4,s.instance=b,sn(b),b;d=LA(c),(v=jr.get(v))&&iv(d,v),b=(a.ownerDocument||a).createElement("link"),sn(b);var j=b;return j._p=new Promise(function(M,$){j.onload=M,j.onerror=$}),vn(b,"link",d),s.state.loading|=4,ad(b,c.precedence,a),s.instance=b;case"script":return b=No(c.src),(v=a.querySelector(jc(b)))?(s.instance=v,sn(v),v):(d=c,(v=jr.get(b))&&(d=m({},c),sv(d,v)),a=a.ownerDocument||a,v=a.createElement("script"),sn(v),vn(v,"link",d),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,ad(d,c.precedence,a));return s.instance}function ad(a,s,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=d.length?d[d.length-1]:null,b=v,j=0;j<d.length;j++){var M=d[j];if(M.dataset.precedence===s)b=M;else if(b!==v)break}b?b.parentNode.insertBefore(a,b.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(a,s.firstChild))}function iv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function sv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var id=null;function $A(a,s,c){if(id===null){var d=new Map,v=id=new Map;v.set(c,d)}else v=id,d=v.get(c),d||(d=new Map,v.set(c,d));if(d.has(a))return d;for(d.set(a,null),c=c.getElementsByTagName(a),v=0;v<c.length;v++){var b=c[v];if(!(b[$l]||b[hn]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var j=b.getAttribute(s)||"";j=a+j;var M=d.get(j);M?M.push(b):d.set(j,[b])}}return d}function qA(a,s,c){a=a.ownerDocument||a,a.head.insertBefore(c,s==="title"?a.querySelector("head > title"):null)}function az(a,s,c){if(c===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function VA(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function iz(a,s,c,d){if(c.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=_o(d.href),b=s.querySelector(Oc(v));if(b){s=b._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=sd.bind(a),s.then(a,a)),c.state.loading|=4,c.instance=b,sn(b);return}b=s.ownerDocument||s,d=LA(d),(v=jr.get(v))&&iv(d,v),b=b.createElement("link"),sn(b);var j=b;j._p=new Promise(function(M,$){j.onload=M,j.onerror=$}),vn(b,"link",d),c.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(a.count++,c=sd.bind(a),s.addEventListener("load",c),s.addEventListener("error",c))}}var ov=0;function sz(a,s){return a.stylesheets&&a.count===0&&ld(a,a.stylesheets),0<a.count||0<a.imgCount?function(c){var d=setTimeout(function(){if(a.stylesheets&&ld(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+s);0<a.imgBytes&&ov===0&&(ov=62500*z6());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&ld(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>ov?50:800)+s);return a.unsuspend=c,function(){a.unsuspend=null,clearTimeout(d),clearTimeout(v)}}:null}function sd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ld(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var od=null;function ld(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,od=new Map,s.forEach(oz,a),od=null,sd.call(a))}function oz(a,s){if(!(s.state.loading&4)){var c=od.get(a);if(c)var d=c.get(null);else{c=new Map,od.set(a,c);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var j=v[b];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(c.set(j.dataset.precedence,j),d=j)}d&&c.set(null,d)}v=s.instance,j=v.getAttribute("data-precedence"),b=c.get(j)||d,b===d&&c.set(null,v),c.set(j,v),this.count++,d=sd.bind(this),v.addEventListener("load",d),v.addEventListener("error",d),b?b.parentNode.insertBefore(v,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var Ac={$$typeof:N,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function lz(a,s,c,d,v,b,j,M,$){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nm(0),this.hiddenUpdates=nm(null),this.identifierPrefix=d,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function FA(a,s,c,d,v,b,j,M,$,Z,ne,oe){return a=new lz(a,s,c,j,$,Z,ne,oe,M),s=1,b===!0&&(s|=24),b=rr(3,null,null,s),a.current=b,b.stateNode=a,s=zm(),s.refCount++,a.pooledCache=s,s.refCount++,b.memoizedState={element:d,isDehydrated:c,cache:s},Fm(b),a}function GA(a){return a?(a=io,a):io}function HA(a,s,c,d,v,b){v=GA(v),d.context===null?d.context=v:d.pendingContext=v,d=mi(s),d.payload={element:c},b=b===void 0?null:b,b!==null&&(d.callback=b),c=yi(a,d,s),c!==null&&(Fn(c,a,s),ac(c,a,s))}function WA(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var c=a.retryLane;a.retryLane=c!==0&&c<s?c:s}}function lv(a,s){WA(a,s),(a=a.alternate)&&WA(a,s)}function YA(a){if(a.tag===13||a.tag===31){var s=ns(a,67108864);s!==null&&Fn(s,a,67108864),lv(a,67108864)}}function XA(a){if(a.tag===13||a.tag===31){var s=lr();s=rm(s);var c=ns(a,s);c!==null&&Fn(c,a,s),lv(a,s)}}var cd=!0;function cz(a,s,c,d){var v=B.T;B.T=null;var b=D.p;try{D.p=2,cv(a,s,c,d)}finally{D.p=b,B.T=v}}function uz(a,s,c,d){var v=B.T;B.T=null;var b=D.p;try{D.p=8,cv(a,s,c,d)}finally{D.p=b,B.T=v}}function cv(a,s,c,d){if(cd){var v=uv(d);if(v===null)Xy(a,s,d,ud,c),QA(a,d);else if(dz(v,a,s,c,d))d.stopPropagation();else if(QA(a,d),s&4&&-1<fz.indexOf(a)){for(;v!==null;){var b=Ys(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var j=Qi(b.pendingLanes);if(j!==0){var M=b;for(M.pendingLanes|=2,M.entangledLanes|=2;j;){var $=1<<31-tr(j);M.entanglements[1]|=$,j&=~$}ia(b),(et&6)===0&&(Hf=Tn()+500,xc(0))}}break;case 31:case 13:M=ns(b,2),M!==null&&Fn(M,b,2),Yf(),lv(b,2)}if(b=uv(d),b===null&&Xy(a,s,d,ud,c),b===v)break;v=b}v!==null&&d.stopPropagation()}else Xy(a,s,d,null,c)}}function uv(a){return a=dm(a),fv(a)}var ud=null;function fv(a){if(ud=null,a=Ws(a),a!==null){var s=o(a);if(s===null)a=null;else{var c=s.tag;if(c===13){if(a=l(s),a!==null)return a;a=null}else if(c===31){if(a=u(s),a!==null)return a;a=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return ud=a,null}function KA(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qu()){case aT:return 2;case iT:return 8;case Ju:case QU:return 32;case sT:return 268435456;default:return 32}default:return 32}}var dv=!1,Ei=null,_i=null,Ni=null,Ec=new Map,_c=new Map,ki=[],fz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function QA(a,s){switch(a){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":Ec.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_c.delete(s.pointerId)}}function Nc(a,s,c,d,v,b){return a===null||a.nativeEvent!==b?(a={blockedOn:s,domEventName:c,eventSystemFlags:d,nativeEvent:b,targetContainers:[v]},s!==null&&(s=Ys(s),s!==null&&YA(s)),a):(a.eventSystemFlags|=d,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function dz(a,s,c,d,v){switch(s){case"focusin":return Ei=Nc(Ei,a,s,c,d,v),!0;case"dragenter":return _i=Nc(_i,a,s,c,d,v),!0;case"mouseover":return Ni=Nc(Ni,a,s,c,d,v),!0;case"pointerover":var b=v.pointerId;return Ec.set(b,Nc(Ec.get(b)||null,a,s,c,d,v)),!0;case"gotpointercapture":return b=v.pointerId,_c.set(b,Nc(_c.get(b)||null,a,s,c,d,v)),!0}return!1}function JA(a){var s=Ws(a.target);if(s!==null){var c=o(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){a.blockedOn=s,dT(a.priority,function(){XA(c)});return}}else if(s===31){if(s=u(c),s!==null){a.blockedOn=s,dT(a.priority,function(){XA(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}a.blockedOn=null}function fd(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var c=uv(a.nativeEvent);if(c===null){c=a.nativeEvent;var d=new c.constructor(c.type,c);fm=d,c.target.dispatchEvent(d),fm=null}else return s=Ys(c),s!==null&&YA(s),a.blockedOn=c,!1;s.shift()}return!0}function ZA(a,s,c){fd(a)&&c.delete(s)}function hz(){dv=!1,Ei!==null&&fd(Ei)&&(Ei=null),_i!==null&&fd(_i)&&(_i=null),Ni!==null&&fd(Ni)&&(Ni=null),Ec.forEach(ZA),_c.forEach(ZA)}function dd(a,s){a.blockedOn===s&&(a.blockedOn=null,dv||(dv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hz)))}var hd=null;function eE(a){hd!==a&&(hd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hd===a&&(hd=null);for(var s=0;s<a.length;s+=3){var c=a[s],d=a[s+1],v=a[s+2];if(typeof d!="function"){if(fv(d||c)===null)continue;break}var b=Ys(c);b!==null&&(a.splice(s,3),s-=3,uy(b,{pending:!0,data:v,method:c.method,action:d},d,v))}}))}function ko(a){function s($){return dd($,a)}Ei!==null&&dd(Ei,a),_i!==null&&dd(_i,a),Ni!==null&&dd(Ni,a),Ec.forEach(s),_c.forEach(s);for(var c=0;c<ki.length;c++){var d=ki[c];d.blockedOn===a&&(d.blockedOn=null)}for(;0<ki.length&&(c=ki[0],c.blockedOn===null);)JA(c),c.blockedOn===null&&ki.shift();if(c=(a.ownerDocument||a).$$reactFormReplay,c!=null)for(d=0;d<c.length;d+=3){var v=c[d],b=c[d+1],j=v[Un]||null;if(typeof b=="function")j||eE(c);else if(j){var M=null;if(b&&b.hasAttribute("formAction")){if(v=b,j=b[Un]||null)M=j.formAction;else if(fv(v)!==null)continue}else M=j.action;typeof M=="function"?c[d+1]=M:(c.splice(d,3),d-=3),eE(c)}}}function tE(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(j){return v=j})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),d||setTimeout(c,20)}function c(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){d=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function hv(a){this._internalRoot=a}pd.prototype.render=hv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,d=lr();HA(c,d,a,s,null,null)},pd.prototype.unmount=hv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;HA(a.current,2,null,a,null,null),Yf(),s[Hs]=null}};function pd(a){this._internalRoot=a}pd.prototype.unstable_scheduleHydration=function(a){if(a){var s=fT();a={blockedOn:null,target:a,priority:s};for(var c=0;c<ki.length&&s!==0&&s<ki[c].priority;c++);ki.splice(c,0,a),c===0&&JA(a)}};var nE=t.version;if(nE!=="19.2.5")throw Error(r(527,nE,"19.2.5"));D.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?y(a):null,a=a===null?null:a.stateNode,a};var pz={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var md=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!md.isDisabled&&md.supportsFiber)try{Ul=md.inject(pz),er=md}catch{}}return Cc.createRoot=function(a,s){if(!i(a))throw Error(r(299));var c=!1,d="",v=cj,b=uj,j=fj;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError)),s=FA(a,1,!1,null,null,c,d,null,v,b,j,tE),a[Hs]=s.current,Yy(a),new hv(s)},Cc.hydrateRoot=function(a,s,c){if(!i(a))throw Error(r(299));var d=!1,v="",b=cj,j=uj,M=fj,$=null;return c!=null&&(c.unstable_strictMode===!0&&(d=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(j=c.onCaughtError),c.onRecoverableError!==void 0&&(M=c.onRecoverableError),c.formState!==void 0&&($=c.formState)),s=FA(a,1,!0,s,c??null,d,v,$,b,j,M,tE),s.context=GA(null),c=s.current,d=lr(),d=rm(d),v=mi(d),v.callback=null,yi(c,v,d),c=d,s.current.lanes=c,zl(s,c),ia(s),a[Hs]=s.current,Yy(a),new pd(s)},Cc.version="19.2.5",Cc}var dE;function Oz(){if(dE)return yv.exports;dE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yv.exports=Tz(),yv.exports}var jz=Oz(),zu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Az=class extends zu{#t;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},kS=new Az,Ez={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_z=class{#t=Ez;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},xs=new _z;function Nz(e){setTimeout(e,0)}var kz=typeof window>"u"||"Deno"in globalThis;function Hn(){}function Cz(e,t){return typeof e=="function"?e(t):e}function Lx(e){return typeof e=="number"&&e>=0&&e!==1/0}function mR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qi(e,t){return typeof e=="function"?e(t):e}function dr(e,t){return typeof e=="function"?e(t):e}function hE(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==CS(l,t.options))return!1}else if(!eu(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function pE(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Zc(t.options.mutationKey)!==Zc(o))return!1}else if(!eu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function CS(e,t){return(t?.queryKeyHashFn||Zc)(e)}function Zc(e){return JSON.stringify(e,(t,n)=>$x(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>eu(e[n],t[n])):!1}var Mz=Object.prototype.hasOwnProperty;function yR(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=mE(e)&&mE(t);if(!r&&!($x(e)&&$x(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,f=r?new Array(u):{};let h=0;for(let y=0;y<u;y++){const m=r?y:l[y],g=e[m],S=t[m];if(g===S){f[m]=g,(r?y<o:Mz.call(e,m))&&h++;continue}if(g===null||S===null||typeof g!="object"||typeof S!="object"){f[m]=S;continue}const T=yR(g,S,n+1);f[m]=T,T===g&&h++}return o===u&&h===o?e:f}function zx(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function mE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $x(e){if(!yE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!yE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function yE(e){return Object.prototype.toString.call(e)==="[object Object]"}function Dz(e){return new Promise(t=>{xs.setTimeout(t,e)})}function qx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yR(e,t):t}function Rz(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Iz(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var MS=Symbol();function vR(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===MS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gR(e,t){return typeof e=="function"?e(...t):!!e}function Pz(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var tu=(()=>{let e=()=>kz;return{isServer(){return e()},setIsServer(t){e=t}}})();function Vx(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Bz=Nz;function Uz(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=Bz;const o=u=>{t?e.push(u):i(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(f=>{n(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||l()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var bn=Uz(),Lz=class extends zu{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},qd=new Lz;function zz(e){return Math.min(1e3*2**e,3e4)}function bR(e){return(e??"online")==="online"?qd.isOnline():!0}var Fx=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function xR(e){let t=!1,n=0,r;const i=Vx(),o=()=>i.status!=="pending",l=w=>{if(!o()){const x=new Fx(w);g(x),e.onCancel?.(x)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>kS.isFocused()&&(e.networkMode==="always"||qd.isOnline())&&e.canRun(),y=()=>bR(e.networkMode)&&e.canRun(),m=w=>{o()||(r?.(),i.resolve(w))},g=w=>{o()||(r?.(),i.reject(w))},S=()=>new Promise(w=>{r=x=>{(o()||h())&&w(x)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),T=()=>{if(o())return;let w;const x=n===0?e.initialPromise:void 0;try{w=x??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(m).catch(O=>{if(o())return;const E=e.retry??(tu.isServer()?0:3),N=e.retryDelay??zz,k=typeof N=="function"?N(n,O):N,A=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,O);if(t||!A){g(O);return}n++,e.onFail?.(n,O),Dz(k).then(()=>h()?void 0:S()).then(()=>{t?g(O):T()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:u,continueRetry:f,canStart:y,start:()=>(y()?T():S().then(T),i)}}var SR=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lx(this.gcTime)&&(this.#t=xs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tu.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(xs.clearTimeout(this.#t),this.#t=void 0)}};function $z(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let y=!1;const m=T=>{Pz(T,()=>t.signal,()=>y=!0)},g=vR(t.options,t.fetchOptions),S=async(T,w,x)=>{if(y)return Promise.reject(t.signal.reason);if(w==null&&T.pages.length)return Promise.resolve(T);const E=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:x?"backward":"forward",meta:t.options.meta};return m(_),_})(),N=await g(E),{maxPages:k}=t.options,A=x?Iz:Rz;return{pages:A(T.pages,N,k),pageParams:A(T.pageParams,w,k)}};if(i&&o.length){const T=i==="backward",w=T?qz:vE,x={pages:o,pageParams:l},O=w(r,x);u=await S(x,O,T)}else{const T=e??o.length;do{const w=f===0?l[0]??r.initialPageParam:vE(r,u);if(f>0&&w==null)break;u=await S(u,w),f++}while(f<T)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function vE(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qz(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Vz=class extends SR{#t;#e;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=bE(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=bE(this.options);t.data!==void 0&&(this.setState(gE(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=qx(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Hn).catch(Hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>dr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===MS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>qi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!mR(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const f=vR(this.options,t),y=(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(f,y,this):f(y)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(f),f})();(this.#t==="infinite"?$z(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#a=xR({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof Fx&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,h)=>{this.#l({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#a.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#r.config.onSuccess?.(f,this),this.#r.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof Fx){if(f.silent)return this.#a.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#l({type:"error",error:f}),this.#r.config.onError?.(f,this),this.#r.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...wR(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...gE(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),bn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function wR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Fz=class extends zu{constructor(e,t){super(),this.options=t,this.#t=e,this.#s=null,this.#o=Vx(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#p;#f;#d;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),xE(this.#e,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gx(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gx(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dr(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!zx(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&SE(this.#e,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#e!==n||dr(this.options.enabled,this.#e)!==dr(t.enabled,this.#e)||qi(this.options.staleTime,this.#e)!==qi(t.staleTime,this.#e))&&this.#y();const i=this.#v();r&&(this.#e!==n||dr(this.options.enabled,this.#e)!==dr(t.enabled,this.#e)||i!==this.#u)&&this.#g(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return Hz(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#e.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Hn)),t}#y(){this.#x();const e=qi(this.options.staleTime,this.#e);if(tu.isServer()||this.#r.isStale||!Lx(e))return;const n=mR(this.#r.dataUpdatedAt,e)+1;this.#f=xs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#g(e){this.#S(),this.#u=e,!(tu.isServer()||dr(this.options.enabled,this.#e)===!1||!Lx(this.#u)||this.#u===0)&&(this.#d=xs.setInterval(()=>{(this.options.refetchIntervalInBackground||kS.isFocused())&&this.#h()},this.#u))}#b(){this.#y(),this.#g(this.#v())}#x(){this.#f!==void 0&&(xs.clearTimeout(this.#f),this.#f=void 0)}#S(){this.#d!==void 0&&(xs.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const n=this.#e,r=this.options,i=this.#r,o=this.#i,l=this.#a,f=e!==n?e.state:this.#n,{state:h}=e;let y={...h},m=!1,g;if(t._optimisticResults){const I=this.hasListeners(),q=!I&&xE(e,t),G=I&&SE(e,n,t,r);(q||G)&&(y={...y,...wR(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:S,errorUpdatedAt:T,status:w}=y;g=y.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&w==="pending"){let I;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(I=i.data,x=!0):I=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,I!==void 0&&(w="success",g=qx(i?.data,I,t),m=!0)}if(t.select&&g!==void 0&&!x)if(i&&g===o?.data&&t.select===this.#c)g=this.#l;else try{this.#c=t.select,g=t.select(g),g=qx(i?.data,g,t),this.#l=g,this.#s=null}catch(I){this.#s=I}this.#s&&(S=this.#s,g=this.#l,T=Date.now(),w="error");const O=y.fetchStatus==="fetching",E=w==="pending",N=w==="error",k=E&&O,A=g!==void 0,C={status:w,fetchStatus:y.fetchStatus,isPending:E,isSuccess:w==="success",isError:N,isInitialLoading:k,isLoading:k,data:g,dataUpdatedAt:y.dataUpdatedAt,error:S,errorUpdatedAt:T,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!E,isLoadingError:N&&!A,isPaused:y.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:N&&A,isStale:DS(e,t),refetch:this.refetch,promise:this.#o,isEnabled:dr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=C.data!==void 0,q=C.status==="error"&&!I,G=H=>{q?H.reject(C.error):I&&H.resolve(C.data)},L=()=>{const H=this.#o=C.promise=Vx();G(H)},P=this.#o;switch(P.status){case"pending":e.queryHash===n.queryHash&&G(P);break;case"fulfilled":(q||C.data!==P.value)&&L();break;case"rejected":(!q||C.error!==P.reason)&&L();break}}return C}updateResult(){const e=this.#r,t=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#a=this.options,this.#i.data!==void 0&&(this.#p=this.#e),zx(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const o=new Set(i??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(l=>{const u=l;return this.#r[u]!==e[u]&&o.has(u)})};this.#T({listeners:n()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#T(e){bn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Gz(e,t){return dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&dr(t.retryOnMount,e)===!1)}function xE(e,t){return Gz(e,t)||e.state.data!==void 0&&Gx(e,t,t.refetchOnMount)}function Gx(e,t,n){if(dr(t.enabled,e)!==!1&&qi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&DS(e,t)}return!1}function SE(e,t,n,r){return(e!==t||dr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&DS(e,n)}function DS(e,t){return dr(t.enabled,e)!==!1&&e.isStaleByTime(qi(t.staleTime,e))}function Hz(e,t){return!zx(e.getCurrentResult(),t)}var Wz=class extends SR{#t;#e;#n;#r;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Yz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=xR({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#i({type:"failed",failureCount:o,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#i({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,variables:e,isPaused:i})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#i({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),bn.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Yz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xz=class extends zu{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new Wz({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=vd(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=vd(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=vd(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=vd(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bn.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>pE(t,n))}findAll(e={}){return this.getAll().filter(t=>pE(e,t))}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return bn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Hn))))}};function vd(e){return e.options.scope?.id}var Kz=class extends zu{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,i=t.queryHash??CS(r,t);let o=this.get(i);return o||(o=new Vz({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>hE(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>hE(e,n)):t}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Qz=class{#t;#e;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#t=e.queryCache||new Kz,this.#e=e.mutationCache||new Xz,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=kS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=qd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#t.get(r.queryHash)?.state.data,l=Cz(t,o);if(l!==void 0)return this.#t.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return bn.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=bn.batch(()=>this.#t.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Hn).catch(Hn)}invalidateQueries(e,t={}){return bn.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=bn.batch(()=>this.#t.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Hn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Hn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(qi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Hn).catch(Hn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Hn).catch(Hn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return qd.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Zc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{eu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Zc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{eu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=CS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===MS&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},TR=z.createContext(void 0),RS=e=>{const t=z.useContext(TR);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jz=({client:e,children:t})=>(z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(TR.Provider,{value:e,children:t})),OR=z.createContext(!1),Zz=()=>z.useContext(OR);OR.Provider;function e4(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var t4=z.createContext(e4()),n4=()=>z.useContext(t4),r4=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?gR(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},a4=e=>{z.useEffect(()=>{e.clearReset()},[e])},i4=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||gR(n,[e.error,r])),s4=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,l4=(e,t)=>e?.suspense&&t.isPending,wE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function c4(e,t,n){const r=Zz(),i=n4(),o=RS(),l=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const u=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",s4(l),r4(l,i,u),a4(i);const f=!o.getQueryCache().get(l.queryHash),[h]=z.useState(()=>new t(o,l)),y=h.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(z.useSyncExternalStore(z.useCallback(g=>{const S=m?h.subscribe(bn.batchCalls(g)):Hn;return h.updateResult(),S},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),z.useEffect(()=>{h.setOptions(l)},[l,h]),l4(l,y))throw wE(l,h,i);if(i4({result:y,errorResetBoundary:i,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw y.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(l,y),l.experimental_prefetchInRender&&!tu.isServer()&&o4(y,r)&&(f?wE(l,h,i):u?.promise)?.catch(Hn).finally(()=>{h.updateResult()}),l.notifyOnChangeProps?y:h.trackResult(y)}function lt(e,t){return c4(e,Fz)}const u4={name:"overview"},f4=/[^A-Za-z0-9:/.\-_~]/g,d4=e=>e.replace(f4,t=>encodeURIComponent(t)),TE=e=>{const t=e.replace(/^#\/?/,"");if(!t)return u4;const n=t.indexOf("/");if(n===-1)return{name:decodeURIComponent(t)};const r=decodeURIComponent(t.slice(0,n)),i=decodeURIComponent(t.slice(n+1));return i?{name:r,param:i}:{name:r}},h4=(e,t)=>{const n=`#/${encodeURIComponent(e)}`;return t?`${n}/${d4(t)}`:n},Ct=(e,t)=>{const n=h4(e,t);location.hash!==n&&(location.hash=n)},jR=()=>{const[e,t]=z.useState(()=>TE(location.hash));return z.useEffect(()=>{const n=()=>t(TE(location.hash));return window.addEventListener("hashchange",n),n(),()=>window.removeEventListener("hashchange",n)},[]),e},gd={kind:"home",id:""},p4=["tx","object","package","address"],m4=e=>{if(!e)return gd;const t=e.indexOf("/");if(t===-1)return gd;const n=e.slice(0,t),r=e.slice(t+1);return r&&p4.includes(n)?{kind:n,id:r}:gd},y4=()=>Ct("explorer"),Ko=e=>Ct("explorer",`tx/${e}`),Qo=e=>Ct("explorer",`object/${e}`),AR=e=>Ct("explorer",`package/${e}`),Fo=e=>Ct("explorer",`address/${e}`);function v4(e,t){if(!!!e)throw new Error(t)}const ER={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},g4=new Set(Object.keys(ER));function OE(e){const t=e?.kind;return typeof t=="string"&&g4.has(t)}var jE;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(jE||(jE={}));var Hx;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(Hx||(Hx={}));function AE(e){return e===9||e===32}function b4(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(S=>S.length===0||AE(S.charCodeAt(0))),l=n.endsWith('\\"""'),u=e.endsWith('"')&&!l,f=e.endsWith("\\"),h=u||f,y=!i||e.length>70||h||o||l;let m="";const g=i&&AE(e.charCodeAt(0));return(y&&!g||o)&&(m+=`
|
|
10
|
+
`),m+=n,(y||h)&&(m+=`
|
|
11
|
+
`),'"""'+m+'"""'}const x4=10,_R=2;function S4(e){return fp(e,[])}function fp(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return w4(e,t);default:return String(e)}}function w4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(T4(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:fp(r,n)}else if(Array.isArray(e))return j4(e,n);return O4(e,n)}function T4(e){return typeof e.toJSON=="function"}function O4(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>_R?"["+A4(e)+"]":"{ "+n.map(([i,o])=>i+": "+fp(o,t)).join(", ")+" }"}function j4(e,t){if(e.length===0)return"[]";if(t.length>_R)return"[Array]";const n=Math.min(x4,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(fp(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function A4(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function E4(e){return`"${e.replace(_4,N4)}"`}const _4=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function N4(e){return k4[e.charCodeAt(0)]}const k4=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],C4=Object.freeze({});function M4(e,t,n=ER){const r=new Map;for(const O of Object.values(Hx))r.set(O,D4(t,O));let i,o=Array.isArray(e),l=[e],u=-1,f=[],h=e,y,m;const g=[],S=[];do{u++;const O=u===l.length,E=O&&f.length!==0;if(O){if(y=S.length===0?void 0:g[g.length-1],h=m,m=S.pop(),E)if(o){h=h.slice();let k=0;for(const[A,_]of f){const C=A-k;_===null?(h.splice(C,1),k++):h[C]=_}}else{h={...h};for(const[k,A]of f)h[k]=A}u=i.index,l=i.keys,f=i.edits,o=i.inArray,i=i.prev}else if(m){if(y=o?u:l[u],h=m[y],h==null)continue;g.push(y)}let N;if(!Array.isArray(h)){var T,w;OE(h)||v4(!1,`Invalid AST Node: ${S4(h)}.`);const k=O?(T=r.get(h.kind))===null||T===void 0?void 0:T.leave:(w=r.get(h.kind))===null||w===void 0?void 0:w.enter;if(N=k?.call(t,h,y,m,g,S),N===C4)break;if(N===!1){if(!O){g.pop();continue}}else if(N!==void 0&&(f.push([y,N]),!O))if(OE(N))h=N;else{g.pop();continue}}if(N===void 0&&E&&f.push([y,h]),O)g.pop();else{var x;i={inArray:o,index:u,keys:l,edits:f,prev:i},o=Array.isArray(h),l=o?h:(x=n[h.kind])!==null&&x!==void 0?x:[],u=-1,f=[],m&&S.push(m),m=h}}while(i!==void 0);return f.length!==0?f[f.length-1][1]:e}function D4(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function IS(e){return M4(e,I4)}const R4=80,I4={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ve(e.definitions,`
|
|
12
|
+
|
|
13
|
+
`)},OperationDefinition:{leave(e){const t=xv(e.variableDefinitions)?Me(`(
|
|
14
|
+
`,ve(e.variableDefinitions,`
|
|
15
|
+
`),`
|
|
16
|
+
)`):Me("(",ve(e.variableDefinitions,", "),")"),n=Me("",e.description,`
|
|
17
|
+
`)+ve([e.operation,ve([e.name,t]),ve(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>Me("",i,`
|
|
18
|
+
`)+e+": "+t+Me(" = ",n)+Me(" ",ve(r," "))},SelectionSet:{leave:({selections:e})=>Fr(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=Me("",e,": ")+t;let l=o+Me("(",ve(n,", "),")");return l.length>R4&&(l=o+Me(`(
|
|
19
|
+
`,Ud(ve(n,`
|
|
20
|
+
`)),`
|
|
21
|
+
)`)),ve([l,ve(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Me(" ",ve(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ve(["...",Me("on ",e),ve(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:o})=>Me("",o,`
|
|
22
|
+
`)+`fragment ${e}${Me("(",ve(n,", "),")")} on ${t} ${Me("",ve(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?b4(e):E4(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ve(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ve(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Me("(",ve(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Me("",e,`
|
|
23
|
+
`)+ve(["schema",ve(t," "),Fr(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Me("",e,`
|
|
24
|
+
`)+ve(["scalar",t,ve(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Me("",e,`
|
|
25
|
+
`)+ve(["type",t,Me("implements ",ve(n," & ")),ve(r," "),Fr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Me("",e,`
|
|
26
|
+
`)+t+(xv(n)?Me(`(
|
|
27
|
+
`,Ud(ve(n,`
|
|
28
|
+
`)),`
|
|
29
|
+
)`):Me("(",ve(n,", "),")"))+": "+r+Me(" ",ve(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Me("",e,`
|
|
30
|
+
`)+ve([t+": "+n,Me("= ",r),ve(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Me("",e,`
|
|
31
|
+
`)+ve(["interface",t,Me("implements ",ve(n," & ")),ve(r," "),Fr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Me("",e,`
|
|
32
|
+
`)+ve(["union",t,ve(n," "),Me("= ",ve(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Me("",e,`
|
|
33
|
+
`)+ve(["enum",t,ve(n," "),Fr(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Me("",e,`
|
|
34
|
+
`)+ve([t,ve(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Me("",e,`
|
|
35
|
+
`)+ve(["input",t,ve(n," "),Fr(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Me("",e,`
|
|
36
|
+
`)+"directive @"+t+(xv(n)?Me(`(
|
|
37
|
+
`,Ud(ve(n,`
|
|
38
|
+
`)),`
|
|
39
|
+
)`):Me("(",ve(n,", "),")"))+(r?" repeatable":"")+" on "+ve(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ve(["extend schema",ve(e," "),Fr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ve(["extend scalar",e,ve(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ve(["extend type",e,Me("implements ",ve(t," & ")),ve(n," "),Fr(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ve(["extend interface",e,Me("implements ",ve(t," & ")),ve(n," "),Fr(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ve(["extend union",e,ve(t," "),Me("= ",ve(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ve(["extend enum",e,ve(t," "),Fr(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ve(["extend input",e,ve(t," "),Fr(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>ve([e,Me(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>ve([e,Me(".",t),Me("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>ve(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>ve(["@",e,Me("(",t,":)")])}};function ve(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Fr(e){return Me(`{
|
|
40
|
+
`,Ud(ve(e,`
|
|
41
|
+
`)),`
|
|
42
|
+
}`)}function Me(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Ud(e){return Me(" ",e.replace(/\n/g,`
|
|
43
|
+
`))}function xv(e){var t;return(t=e?.some(n=>n.includes(`
|
|
44
|
+
`)))!==null&&t!==void 0?t:!1}var bd={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class P4 extends Error{constructor(t,n,r,i,o,l,u){super(t),this.name="GraphQLError",this.message=t,o&&(this.path=o),n&&(this.nodes=Array.isArray(n)?n:[n]),r&&(this.source=r),i&&(this.positions=i),l&&(this.originalError=l);var f=u;if(!f&&l){var h=l.extensions;h&&typeof h=="object"&&(f=h)}this.extensions=f||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var we,fe;function Rn(e){return new P4(`Syntax Error: Unexpected token at ${fe} in ${e}`)}function EE(e){if(e.lastIndex=fe,e.test(we))return we.slice(fe,fe=e.lastIndex)}var xd=/ +(?=[^\s])/y;function B4(e){for(var t=e.split(`
|
|
45
|
+
`),n="",r=0,i=0,o=t.length-1,l=0;l<t.length;l++)xd.lastIndex=0,xd.test(t[l])&&(l&&(!r||xd.lastIndex<r)&&(r=xd.lastIndex),i=i||l,o=l);for(var u=i;u<=o;u++)u!==i&&(n+=`
|
|
46
|
+
`),n+=t[u].slice(r).replace(/\\"""/g,'"""');return n}function Ye(){for(var e=0|we.charCodeAt(fe++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|we.charCodeAt(fe++))if(e===35)for(;(e=0|we.charCodeAt(fe++))&&e!==10&&e!==13;);fe--}function PS(){for(var e=fe,t=0|we.charCodeAt(fe++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|we.charCodeAt(fe++));if(e===fe-1)throw Rn("Name");var n=we.slice(e,--fe);return Ye(),n}function Wn(){return{kind:"Name",value:PS()}}var U4=/(?:"""|(?:[\s\S]*?[^\\])""")/y,L4=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function Jo(e){var t;switch(we.charCodeAt(fe)){case 91:fe++,Ye();for(var n=[];we.charCodeAt(fe)!==93;)n.push(Jo(e));return fe++,Ye(),{kind:"ListValue",values:n};case 123:fe++,Ye();for(var r=[];we.charCodeAt(fe)!==125;){var i=Wn();if(we.charCodeAt(fe++)!==58)throw Rn("ObjectField");Ye(),r.push({kind:"ObjectField",name:i,value:Jo(e)})}return fe++,Ye(),{kind:"ObjectValue",fields:r};case 36:if(e)throw Rn("Variable");return fe++,{kind:"Variable",name:Wn()};case 34:if(we.charCodeAt(fe+1)===34&&we.charCodeAt(fe+2)===34){if(fe+=3,(t=EE(U4))==null)throw Rn("StringValue");return Ye(),{kind:"StringValue",value:B4(t.slice(0,-3)),block:!0}}else{var o=fe,l;fe++;var u=!1;for(l=0|we.charCodeAt(fe++);l===92&&(fe++,u=!0)||l!==10&&l!==13&&l!==34&&l;l=0|we.charCodeAt(fe++));if(l!==34)throw Rn("StringValue");return t=we.slice(o,fe),Ye(),{kind:"StringValue",value:u?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var f=fe++,h;(h=0|we.charCodeAt(fe++))>=48&&h<=57;);var y=we.slice(f,--fe);if((h=we.charCodeAt(fe))===46||h===69||h===101){if((t=EE(L4))==null)throw Rn("FloatValue");return Ye(),{kind:"FloatValue",value:y+t}}else return Ye(),{kind:"IntValue",value:y};case 110:if(we.charCodeAt(fe+1)===117&&we.charCodeAt(fe+2)===108&&we.charCodeAt(fe+3)===108)return fe+=4,Ye(),{kind:"NullValue"};break;case 116:if(we.charCodeAt(fe+1)===114&&we.charCodeAt(fe+2)===117&&we.charCodeAt(fe+3)===101)return fe+=4,Ye(),{kind:"BooleanValue",value:!0};break;case 102:if(we.charCodeAt(fe+1)===97&&we.charCodeAt(fe+2)===108&&we.charCodeAt(fe+3)===115&&we.charCodeAt(fe+4)===101)return fe+=5,Ye(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:PS()}}function NR(e){if(we.charCodeAt(fe)===40){var t=[];fe++,Ye();do{var n=Wn();if(we.charCodeAt(fe++)!==58)throw Rn("Argument");Ye(),t.push({kind:"Argument",name:n,value:Jo(e)})}while(we.charCodeAt(fe)!==41);return fe++,Ye(),t}}function Pi(e){if(we.charCodeAt(fe)===64){var t=[];do fe++,t.push({kind:"Directive",name:Wn(),arguments:NR(e)});while(we.charCodeAt(fe)===64);return t}}function z4(){for(var e=0;we.charCodeAt(fe)===91;)e++,fe++,Ye();var t={kind:"NamedType",name:Wn()};do if(we.charCodeAt(fe)===33&&(fe++,Ye(),t={kind:"NonNullType",type:t}),e){if(we.charCodeAt(fe++)!==93)throw Rn("NamedType");Ye(),t={kind:"ListType",type:t}}while(e--);return t}function Vd(){if(we.charCodeAt(fe++)!==123)throw Rn("SelectionSet");return Ye(),Fd()}function Fd(){var e=[];do if(we.charCodeAt(fe)===46){if(we.charCodeAt(++fe)!==46||we.charCodeAt(++fe)!==46)throw Rn("SelectionSet");switch(fe++,Ye(),we.charCodeAt(fe)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:Pi(!1),selectionSet:Vd()});break;case 111:we.charCodeAt(fe+1)===110?(fe+=2,Ye(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:Wn()},directives:Pi(!1),selectionSet:Vd()})):e.push({kind:"FragmentSpread",name:Wn(),directives:Pi(!1)});break;case 123:fe++,Ye(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:Fd()});break;default:e.push({kind:"FragmentSpread",name:Wn(),directives:Pi(!1)})}}else{var t=Wn(),n=void 0;we.charCodeAt(fe)===58&&(fe++,Ye(),n=t,t=Wn());var r=NR(!1),i=Pi(!1),o=void 0;we.charCodeAt(fe)===123&&(fe++,Ye(),o=Fd()),e.push({kind:"Field",alias:n,name:t,arguments:r,directives:i,selectionSet:o})}while(we.charCodeAt(fe)!==125);return fe++,Ye(),{kind:"SelectionSet",selections:e}}function $4(){if(Ye(),we.charCodeAt(fe)===40){var e=[];fe++,Ye();do{var t=void 0;if(we.charCodeAt(fe)===34&&(t=Jo(!0)),we.charCodeAt(fe++)!==36)throw Rn("Variable");var n=Wn();if(we.charCodeAt(fe++)!==58)throw Rn("VariableDefinition");Ye();var r=z4(),i=void 0;we.charCodeAt(fe)===61&&(fe++,Ye(),i=Jo(!0)),Ye();var o={kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:r,defaultValue:i,directives:Pi(!0)};t&&(o.description=t),e.push(o)}while(we.charCodeAt(fe)!==41);return fe++,Ye(),e}}function q4(e){var t=Wn();if(we.charCodeAt(fe++)!==111||we.charCodeAt(fe++)!==110)throw Rn("FragmentDefinition");Ye();var n={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:Wn()},directives:Pi(!1),selectionSet:Vd()};return e&&(n.description=e),n}function V4(){var e=[];do{var t=void 0;if(we.charCodeAt(fe)===34&&(t=Jo(!0)),we.charCodeAt(fe)===123){if(t)throw Rn("Document");fe++,Ye(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Fd()})}else{var n=PS();switch(n){case"fragment":e.push(q4(t));break;case"query":case"mutation":case"subscription":var r,i=void 0;(r=we.charCodeAt(fe))!==40&&r!==64&&r!==123&&(i=Wn());var o={kind:"OperationDefinition",operation:n,name:i,variableDefinitions:$4(),directives:Pi(!1),selectionSet:Vd()};t&&(o.description=t),e.push(o);break;default:throw Rn("Document")}}}while(fe<we.length);return e}function F4(e,t){if(we=e.body?e.body:e,fe=0,Ye(),!t)return{kind:"Document",definitions:V4(),loc:{start:0,end:we.length,startToken:void 0,endToken:void 0,source:{body:we,name:"graphql.web",locationOffset:{line:1,column:1}}}}}var _E=0,Sv=new Set;function BS(){function e(t,n){var r=F4(t).definitions,i=new Set;for(var o of n||[])for(var l of o.definitions)l.kind===bd.FRAGMENT_DEFINITION&&!i.has(l)&&(r.push(l),i.add(l));var u;(u=r[0].kind===bd.FRAGMENT_DEFINITION)&&r[0].directives&&(r[0].directives=r[0].directives.filter((h=>h.name.value!=="_unmask")));var f;return{kind:bd.DOCUMENT,definitions:r,get loc(){if(!f&&u){var h=t+(function(m){try{_E++;var g="";for(var S of m)if(!Sv.has(S)){Sv.add(S);var{loc:T}=S;T&&(g+=T.source.body)}return g}finally{--_E==0&&Sv.clear()}})(n||[]);return{start:0,end:h.length,source:{body:h,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return f},set loc(h){f=h}}}return e.scalar=function(n,r){return r},e.persisted=function(n,r){return{kind:bd.DOCUMENT,definitions:r?r.definitions:[],documentId:n}},e}function G4(...e){return e.length===2?e[1]:e[0]}BS();const xt=BS(),Nt=async(e,t,n)=>{const r=await fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:IS(t),variables:n})});if(!r.ok)throw new Error(`HTTP ${r.status}`);const i=await r.json();if(i.errors?.length)throw new Error(i.errors.map(o=>o.message).join("; "));if(i.data===void 0)throw new Error("empty GraphQL response");return i.data},US=xt(`
|
|
47
|
+
fragment StackStateFields on StackState {
|
|
48
|
+
identity {
|
|
49
|
+
app
|
|
50
|
+
stack
|
|
51
|
+
network
|
|
52
|
+
}
|
|
53
|
+
cycle {
|
|
54
|
+
id
|
|
55
|
+
startedAt
|
|
56
|
+
phase
|
|
57
|
+
}
|
|
58
|
+
services {
|
|
59
|
+
key
|
|
60
|
+
role
|
|
61
|
+
status
|
|
62
|
+
section
|
|
63
|
+
endpointSection
|
|
64
|
+
phase
|
|
65
|
+
selectiveRestartHighlight
|
|
66
|
+
logTail {
|
|
67
|
+
lines
|
|
68
|
+
level
|
|
69
|
+
truncated
|
|
70
|
+
}
|
|
71
|
+
endpoints {
|
|
72
|
+
endpointKey
|
|
73
|
+
pluginKey
|
|
74
|
+
name
|
|
75
|
+
url
|
|
76
|
+
displayUrl
|
|
77
|
+
wireProtocol
|
|
78
|
+
registeredAt
|
|
79
|
+
}
|
|
80
|
+
lastError {
|
|
81
|
+
at
|
|
82
|
+
pluginKey
|
|
83
|
+
tag
|
|
84
|
+
summary
|
|
85
|
+
chain
|
|
86
|
+
severity
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
endpoints {
|
|
90
|
+
endpointKey
|
|
91
|
+
pluginKey
|
|
92
|
+
name
|
|
93
|
+
url
|
|
94
|
+
displayUrl
|
|
95
|
+
wireProtocol
|
|
96
|
+
registeredAt
|
|
97
|
+
}
|
|
98
|
+
accounts {
|
|
99
|
+
key
|
|
100
|
+
rowKey
|
|
101
|
+
name
|
|
102
|
+
address
|
|
103
|
+
scheme
|
|
104
|
+
source
|
|
105
|
+
walletVisible
|
|
106
|
+
updatedAt
|
|
107
|
+
funding {
|
|
108
|
+
status
|
|
109
|
+
balanceMist
|
|
110
|
+
requestedMist
|
|
111
|
+
entries {
|
|
112
|
+
coin
|
|
113
|
+
fullCoinType
|
|
114
|
+
amount
|
|
115
|
+
status
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
packages {
|
|
120
|
+
key
|
|
121
|
+
rowKey
|
|
122
|
+
name
|
|
123
|
+
kind
|
|
124
|
+
packageId
|
|
125
|
+
upgradeCapId
|
|
126
|
+
mvrPlaceholder
|
|
127
|
+
sourcePath
|
|
128
|
+
updatedAt
|
|
129
|
+
}
|
|
130
|
+
errors {
|
|
131
|
+
at
|
|
132
|
+
pluginKey
|
|
133
|
+
tag
|
|
134
|
+
summary
|
|
135
|
+
chain
|
|
136
|
+
severity
|
|
137
|
+
}
|
|
138
|
+
stackBuild {
|
|
139
|
+
pluginKey
|
|
140
|
+
phase
|
|
141
|
+
progress
|
|
142
|
+
startedAt
|
|
143
|
+
}
|
|
144
|
+
lastEvent {
|
|
145
|
+
seq
|
|
146
|
+
at
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`),H4=xt(`
|
|
150
|
+
query State {
|
|
151
|
+
state {
|
|
152
|
+
...StackStateFields
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`,[US]),W4=xt(`
|
|
156
|
+
subscription StateStream {
|
|
157
|
+
state {
|
|
158
|
+
...StackStateFields
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
`,[US]),Y4=e=>({key:e.key,role:e.role,status:e.status,phase:e.phase,lastError:e.lastError,logTail:e.logTail,endpoints:e.endpoints.map(t=>t.endpointKey),selectiveRestartHighlight:e.selectiveRestartHighlight,section:e.section,endpointSection:e.endpointSection}),X4=e=>({...e,funding:{...e.funding,entries:e.funding.entries.map(t=>({...t,status:t.status}))}}),kR=e=>({identity:e.identity,cycle:{...e.cycle,phase:e.cycle.phase},rows:e.services.map(Y4),endpoints:e.endpoints,accounts:e.accounts.map(X4),packages:e.packages,errors:e.errors,lastEvent:e.lastEvent,stackBuild:e.stackBuild}),K4=async e=>{const{state:t}=await Nt(e,H4);return kR(G4(US,t))},Q4=(e,t)=>{const n=new AbortController;return J4(e,n.signal,t),()=>n.abort()},J4=async(e,t,n)=>{try{const r=await fetch(e,{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream"},body:JSON.stringify({query:IS(W4)}),signal:t});if(!r.ok||!r.body)throw new Error(`HTTP ${r.status}`);const i=r.body.getReader(),o=new TextDecoder;let l="";for(;;){const{value:u,done:f}=await i.read();if(f)break;l+=o.decode(u,{stream:!0});let h;for(;(h=l.indexOf(`
|
|
162
|
+
|
|
163
|
+
`))!==-1;){const y=l.slice(0,h);l=l.slice(h+2);const m=y.split(`
|
|
164
|
+
`).filter(S=>S.startsWith("data:")).map(S=>S.slice(5).trim()).join(`
|
|
165
|
+
`);if(!m)continue;const g=JSON.parse(m);if(g.errors?.length)throw new Error(g.errors.map(S=>S.message).join("; "));g.data?.state&&n.onState(kR(g.data.state))}}throw new Error("subscription stream ended")}catch(r){if(t.aborted)return;n.onError(r instanceof Error?r.message:String(r))}},Z4=xt(`
|
|
166
|
+
mutation Restart {
|
|
167
|
+
restart {
|
|
168
|
+
ok
|
|
169
|
+
command
|
|
170
|
+
message
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`),e$=xt(`
|
|
174
|
+
mutation RestartPlugin($pluginKey: String!) {
|
|
175
|
+
restartPlugin(input: { pluginKey: $pluginKey }) {
|
|
176
|
+
ok
|
|
177
|
+
command
|
|
178
|
+
message
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
`),t$=xt(`
|
|
182
|
+
mutation CaptureSnapshot($name: String) {
|
|
183
|
+
captureSnapshot(input: { name: $name }) {
|
|
184
|
+
ok
|
|
185
|
+
command
|
|
186
|
+
message
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
`),n$=xt(`
|
|
190
|
+
mutation Codegen {
|
|
191
|
+
codegen {
|
|
192
|
+
ok
|
|
193
|
+
command
|
|
194
|
+
message
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
`),r$=xt(`
|
|
198
|
+
mutation Apply($pluginKey: String) {
|
|
199
|
+
apply(input: { pluginKey: $pluginKey }) {
|
|
200
|
+
ok
|
|
201
|
+
command
|
|
202
|
+
message
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
`),CR=e=>Nt(e,Z4).then(t=>t.restart),Us=(e,t)=>Nt(e,e$,{pluginKey:t}).then(n=>n.restartPlugin),MR=(e,t)=>Nt(e,t$,{name:t??null}).then(n=>n.captureSnapshot),DR=e=>Nt(e,n$).then(t=>t.codegen),RR=(e,t)=>Nt(e,r$,{pluginKey:t??null}).then(n=>n.apply),a$=xt(`
|
|
206
|
+
mutation Wipe {
|
|
207
|
+
wipe {
|
|
208
|
+
ok
|
|
209
|
+
command
|
|
210
|
+
message
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
`),i$=xt(`
|
|
214
|
+
mutation Prune {
|
|
215
|
+
prune {
|
|
216
|
+
ok
|
|
217
|
+
command
|
|
218
|
+
message
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`),s$=xt(`
|
|
222
|
+
mutation Shutdown {
|
|
223
|
+
shutdown {
|
|
224
|
+
ok
|
|
225
|
+
command
|
|
226
|
+
message
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
`),o$=xt(`
|
|
230
|
+
mutation AdvanceClock($toMillis: Float!) {
|
|
231
|
+
advanceClock(input: { toMillis: $toMillis }) {
|
|
232
|
+
ok
|
|
233
|
+
command
|
|
234
|
+
message
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
`),l$=xt(`
|
|
238
|
+
mutation RestoreSnapshot($id: String!) {
|
|
239
|
+
restoreSnapshot(input: { id: $id }) {
|
|
240
|
+
ok
|
|
241
|
+
detail
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
`),c$=xt(`
|
|
245
|
+
mutation DeleteSnapshot($id: String!) {
|
|
246
|
+
deleteSnapshot(input: { id: $id }) {
|
|
247
|
+
ok
|
|
248
|
+
detail
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
`),u$=xt(`
|
|
252
|
+
mutation Mint($coinType: String!, $recipient: String!, $amountBaseUnits: String!) {
|
|
253
|
+
mint(input: { coinType: $coinType, recipient: $recipient, amountBaseUnits: $amountBaseUnits }) {
|
|
254
|
+
ok
|
|
255
|
+
detail
|
|
256
|
+
digest
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
`),f$=xt(`
|
|
260
|
+
mutation Fund($recipient: String!, $coinType: String, $amountBaseUnits: String) {
|
|
261
|
+
fund(input: { recipient: $recipient, coinType: $coinType, amountBaseUnits: $amountBaseUnits }) {
|
|
262
|
+
ok
|
|
263
|
+
detail
|
|
264
|
+
digest
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
`),d$=e=>Nt(e,a$).then(t=>t.wipe),h$=e=>Nt(e,i$).then(t=>t.prune),p$=e=>Nt(e,s$).then(t=>t.shutdown),m$=(e,t)=>Nt(e,o$,{toMillis:t}).then(n=>n.advanceClock),y$=(e,t)=>Nt(e,l$,{id:t}).then(n=>n.restoreSnapshot),v$=(e,t)=>Nt(e,c$,{id:t}).then(n=>n.deleteSnapshot),g$=(e,t)=>Nt(e,u$,t).then(n=>n.mint),b$=(e,t)=>Nt(e,f$,{recipient:t.recipient,coinType:t.coinType??null,amountBaseUnits:t.amountBaseUnits??null}).then(n=>n.fund),x$=e=>({sinceMillis:e.sinceMillis,search:e.search,limit:e.limit,services:e.services?[...e.services]:void 0,levels:e.levels?[...e.levels]:void 0}),S$=e=>({sinceMillis:e.sinceMillis,search:e.search,limit:e.limit,services:e.services?[...e.services]:void 0,statuses:e.statuses?[...e.statuses]:void 0}),IR=e=>{try{const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}},w$=xt(`
|
|
268
|
+
query Logs($filter: LogFilter) {
|
|
269
|
+
logs(filter: $filter) {
|
|
270
|
+
seq
|
|
271
|
+
timestampMillis
|
|
272
|
+
level
|
|
273
|
+
service
|
|
274
|
+
message
|
|
275
|
+
fieldsJson
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
`),T$=xt(`
|
|
279
|
+
query LogServices {
|
|
280
|
+
logServices
|
|
281
|
+
}
|
|
282
|
+
`),O$=xt(`
|
|
283
|
+
query Spans($filter: SpanFilter) {
|
|
284
|
+
spans(filter: $filter) {
|
|
285
|
+
traceId
|
|
286
|
+
spanId
|
|
287
|
+
parentId
|
|
288
|
+
name
|
|
289
|
+
service
|
|
290
|
+
startMillis
|
|
291
|
+
durationMillis
|
|
292
|
+
status
|
|
293
|
+
attributesJson
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`),j$=xt(`
|
|
297
|
+
query SpanServices {
|
|
298
|
+
spanServices
|
|
299
|
+
}
|
|
300
|
+
`),A$=async(e,t)=>{const{logs:n}=await Nt(e,w$,{filter:t?x$(t):null});return n.map(r=>({seq:r.seq,timestampMillis:r.timestampMillis,level:r.level,service:r.service,message:r.message,fields:IR(r.fieldsJson)}))},E$=e=>Nt(e,T$).then(t=>t.logServices),_$=async(e,t)=>{const{spans:n}=await Nt(e,O$,{filter:t?S$(t):null});return n.map(r=>({traceId:r.traceId,spanId:r.spanId,parentId:r.parentId,name:r.name,service:r.service,startMillis:r.startMillis,durationMillis:r.durationMillis,status:r.status,attributes:IR(r.attributesJson)}))},N$=e=>Nt(e,j$).then(t=>t.spanServices),k$=xt(`
|
|
301
|
+
query Snapshots {
|
|
302
|
+
snapshots {
|
|
303
|
+
id
|
|
304
|
+
label
|
|
305
|
+
app
|
|
306
|
+
stack
|
|
307
|
+
network
|
|
308
|
+
createdAt
|
|
309
|
+
containerCount
|
|
310
|
+
subtreeCount
|
|
311
|
+
participants
|
|
312
|
+
corrupt
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
`),C$=xt(`
|
|
316
|
+
query Mode {
|
|
317
|
+
mode
|
|
318
|
+
}
|
|
319
|
+
`),M$=xt(`
|
|
320
|
+
query DeepbookInfo {
|
|
321
|
+
deepbookInfo {
|
|
322
|
+
pluginKey
|
|
323
|
+
name
|
|
324
|
+
chain
|
|
325
|
+
mode
|
|
326
|
+
packageId
|
|
327
|
+
registryId
|
|
328
|
+
adminCapId
|
|
329
|
+
deepTreasuryId
|
|
330
|
+
indexerUrl
|
|
331
|
+
serverUrl
|
|
332
|
+
marketMakerRunning
|
|
333
|
+
pools {
|
|
334
|
+
poolId
|
|
335
|
+
name
|
|
336
|
+
baseCoinType
|
|
337
|
+
quoteCoinType
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
`),D$=xt(`
|
|
342
|
+
query SealInfo {
|
|
343
|
+
sealInfo {
|
|
344
|
+
pluginKey
|
|
345
|
+
objectId
|
|
346
|
+
mode
|
|
347
|
+
threshold
|
|
348
|
+
keyServerUrl
|
|
349
|
+
keyServers {
|
|
350
|
+
objectId
|
|
351
|
+
weight
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
`),R$=xt(`
|
|
356
|
+
query CoinCaps {
|
|
357
|
+
coinCaps {
|
|
358
|
+
pluginKey
|
|
359
|
+
source
|
|
360
|
+
symbol
|
|
361
|
+
decimals
|
|
362
|
+
fullCoinType
|
|
363
|
+
packageId
|
|
364
|
+
treasuryCapId
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
`),I$=xt(`
|
|
368
|
+
query FundableCoins {
|
|
369
|
+
fundableCoins {
|
|
370
|
+
symbol
|
|
371
|
+
coinType
|
|
372
|
+
honorsAmount
|
|
373
|
+
requiresAccountSigner
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
`),P$=xt(`
|
|
377
|
+
query PostgresStats {
|
|
378
|
+
postgresStats {
|
|
379
|
+
pluginKey
|
|
380
|
+
available
|
|
381
|
+
database
|
|
382
|
+
plainUrl
|
|
383
|
+
databaseBytes
|
|
384
|
+
connectionCount
|
|
385
|
+
detail
|
|
386
|
+
tables {
|
|
387
|
+
schema
|
|
388
|
+
name
|
|
389
|
+
rowEstimate
|
|
390
|
+
totalBytes
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
`),B$=e=>Nt(e,k$).then(t=>t.snapshots),PR=e=>Nt(e,C$).then(t=>t.mode),U$=e=>Nt(e,M$).then(t=>t.deepbookInfo),L$=e=>Nt(e,D$).then(t=>t.sealInfo),z$=e=>Nt(e,R$).then(t=>t.coinCaps),$$=e=>Nt(e,I$).then(t=>t.fundableCoins),q$=e=>Nt(e,P$).then(t=>t.postgresStats),NE=["service","package","account","action","app","other"],He=(e,t=6,n=4)=>!e||e.length<=t+n+1?e:`${e.slice(0,t)}…${e.slice(-n)}`,kE=1000000000n,Ld=e=>{if(e==null)return"—";let t;try{t=typeof e=="bigint"?e:BigInt(e)}catch{return String(e)}const n=t/kE,r=t%kE;if(r===0n)return`${n.toString()}`;const i=r.toString().padStart(9,"0").slice(0,4).replace(/0+$/,"");return i?`${n.toString()}.${i}`:n.toString()},Gd=e=>{const t=String(e),n=t.startsWith("-"),i=(n?t.slice(1):t).replace(/\B(?=(\d{3})+(?!\d))/g,",");return n?`-${i}`:i},fn=(e,t=Date.now())=>{const n=Math.max(0,t-e),r=Math.floor(n/1e3);if(r<2)return"now";if(r<60)return`${r}s`;const i=Math.floor(r/60);if(i<60)return`${i}m`;const o=Math.floor(i/60);return o<24?`${o}h`:`${Math.floor(o/24)}d`},BR=e=>new Date(e).toLocaleTimeString(),LS=e=>{const t=e.replace(/[-_]+/g," ").trim();return t?t.charAt(0).toUpperCase()+t.slice(1):e},V$=e=>/^0x[0-9a-fA-F]{1,64}$/.test(e),nu=e=>(e.displayUrl??e.url).replace(/^https?:\/\//,""),F$=(e,t)=>(BigInt(Math.trunc(e))*10n**BigInt(t)).toString(),zS=e=>{if(!Number.isFinite(e)||e<=0)return"0 B";const t=["B","KB","MB","GB","TB"];let n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=100||r===0?Math.round(n).toString():n.toFixed(1)} ${t[r]}`},G$={pending:{token:"white",glyph:"○",label:"Pending",pulse:!1},acquiring:{token:"cyan",glyph:"◌",label:"Acquiring",pulse:!0},ready:{token:"green",glyph:"●",label:"Ready",pulse:!1},failed:{token:"red",glyph:"✕",label:"Failed",pulse:!1},stopping:{token:"yellow",glyph:"◐",label:"Stopping",pulse:!0},stopped:{token:"dim",glyph:"◌",label:"Stopped",pulse:!1},done:{token:"green",glyph:"✓",label:"Done",pulse:!1}},dp=e=>G$[e],H$={service:"Services",package:"Packages",account:"Accounts",action:"Actions",app:"App",other:"Other"},W$={service:"cyan",package:"blue",account:"magenta",action:"yellow",app:"green",other:"white"},UR=e=>H$[e],$S=e=>W$[e],qS=e=>{let t=0,n=0,r=0,i=0;for(const l of e)l.status==="ready"||l.status==="done"?t+=1:l.status==="failed"?r+=1:l.status==="acquiring"||l.status==="stopping"?n+=1:l.status==="pending"&&(i+=1);const o=e.length===0?"empty":r>0?"blocked":n>0||i>0?"active":"ready";return{total:e.length,ready:t,active:n,failed:r,waiting:i,health:o}},Y$=e=>{switch(e){case"ready":return"green";case"active":return"yellow";case"blocked":return"red";case"empty":return"dim"}},LR=e=>{switch(e){case"funded":return{label:"funded",token:"green"};case"pending":return{label:"pending",token:"cyan"};case"skipped":return{label:"skipped",token:"dim"};case"failed":return{label:"failed",token:"red"};case"unknown":return{label:"unknown",token:"dim"}}},En=e=>{const t=e.replace(/#\d+$/,""),n=t.split(/[:/]/).pop()??t;return LS(n)},X$=e=>{const n=e.replace(/#\d+$/,"").match(/^([^:/]+)[:/]/);return n?n[1]:null},K$=/^(rpc|faucet|graphql)$/i,Q$=(e,t)=>{const n=new Set(e.endpoints);return t.filter(r=>n.has(r.endpointKey)||r.pluginKey===e.key)},zR=(e,t)=>Q$(e,t).filter(n=>!K$.test(n.name)),$R=e=>{if(!e)return"";const t=e.chain[0],n=e.tag?`${e.tag}: ${e.summary}`:e.summary,r=t&&t!==e.summary?`${n} — ${t}`:n;return r.length>160?`${r.slice(0,159)}…`:r},qR=e=>e.status==="failed"?$R(e.lastError)||"Failed":e.phase??"",J$={coins:"coin"},Z$=e=>J$[e]??e,VR=(e,t)=>{const n=Z$(t),r=e.find(i=>i.key===n);return r||(e.find(i=>i.key.startsWith(n)&&/^[:.#\-]/.test(i.key.slice(n.length)))??null)},e5=(e,t)=>VR(e,t)!==null,t5=(e,t)=>t.filter(n=>e5(e,n)),FR=e=>{const t=new Map;for(const n of e){const r=t.get(n.section)??[];r.push(n),t.set(n.section,r)}return[...t.entries()].sort(([n],[r])=>(NE.indexOf(n)+1||99)-(NE.indexOf(r)+1||99)).map(([n,r])=>({section:n,label:UR(n),rows:r}))},n5=1500,r5=200;let a5=1;const CE=e=>`${e.at}:${e.tag}`,i5=(e,t,n)=>{const r=[],i=(f,h,y,m,g)=>{r.push({id:a5++,at:g,kind:f,section:y,pluginKey:m,text:h})},o=new Map(e.rows.map(f=>[f.key,f]));for(const f of t.rows){const h=o.get(f.key);h&&h.status!==f.status&&i("status",`${En(f.key)} ${h.status} → ${f.status}`,f.section,f.key,f.lastError?.at??n)}const l=new Set(e.endpoints.map(f=>f.endpointKey));for(const f of t.endpoints)l.has(f.endpointKey)||i("endpoint",`${f.name} ${f.displayUrl??f.url}`,"other",f.pluginKey,f.registeredAt||n);const u=new Set(e.errors.map(CE));for(const f of t.errors)u.has(CE(f))||i("error",f.summary,"other",f.pluginKey,f.at||n);return t.cycle.id!==e.cycle.id?i("cycle",`cycle ${t.cycle.id} ${t.cycle.phase}`,"other",null,t.cycle.startedAt||n):t.cycle.phase!==e.cycle.phase&&i("phase",`phase ${t.cycle.phase}`,"other",null,n),r},s5=(e,t)=>{const n=n5,[r,i]=z.useState(null),[o,l]=z.useState("connecting"),[u,f]=z.useState(null),[h,y]=z.useState(null),[m,g]=z.useState([]),S=z.useRef(null),T=z.useRef(!0),w=z.useCallback((O,E)=>{const N=S.current;if(N){const k=i5(N,O,E);k.length>0&&g(A=>[...k.reverse(),...A].slice(0,r5))}S.current=O,i(O),y(E),l("live"),f(null)},[]),x=z.useCallback(async()=>{try{const O=await K4(e);if(!T.current)return;w(O,Date.now())}catch(O){if(!T.current)return;l("error"),f(O instanceof Error?O.message:String(O))}},[e,w]);return z.useEffect(()=>{T.current=!0,S.current=null,i(null),g([]),l("connecting"),f(null),y(null);let O=null;const E=()=>{O===null&&(x(),O=setInterval(()=>{x()},n))},N=Q4(e,{onState:k=>{T.current&&w(k,Date.now())},onError:()=>{T.current&&E()}});return x(),()=>{T.current=!1,N(),O!==null&&clearInterval(O)}},[e,x,n,w]),{projection:r,connection:o,error:u,updatedAt:h,activity:m,refresh:x}},o5="modulepreload",l5=function(e){return"/"+e},ME={},c5=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=l?.nonce||l?.getAttribute("nonce");i=f(n.map(h=>{if(h=l5(h),h in ME)return;ME[h]=!0;const y=h.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const g=document.createElement("link");if(g.rel=y?"stylesheet":o5,y||(g.as="script"),g.crossOrigin="",g.href=h,u&&g.setAttribute("nonce",u),document.head.appendChild(g),y)return new Promise((S,T)=>{g.addEventListener("load",S),g.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},u5=e=>e.find(t=>t.name.toLowerCase()==="rpc")?.url??null,DE=new Map,Jn=async e=>{const t=DE.get(e);if(t)return t;const{SuiGrpcClient:n}=await c5(async()=>{const{SuiGrpcClient:i}=await import("./index-D5EShVt4.js");return{SuiGrpcClient:i}},[]),r=new n({baseUrl:e,network:"localnet"});return DE.set(e,r),r},f5="0x2::sui::SUI",Xt=e=>e==null?0:Number(e),GR=e=>e?Number(e.seconds??0n)*1e3+Math.floor((e.nanos??0)/1e6):null,d5=e=>e?.success?"success":"failure",h5=e=>{if(!e)return{kind:"Unknown",address:null};switch(e.$kind){case"AddressOwner":return{kind:"AddressOwner",address:e.AddressOwner};case"ObjectOwner":return{kind:"ObjectOwner",address:e.ObjectOwner};case"ConsensusAddressOwner":return{kind:"ConsensusAddressOwner",address:e.ConsensusAddressOwner.owner};case"Shared":return{kind:"Shared",address:null};case"Immutable":return{kind:"Immutable",address:null};default:return{kind:"Unknown",address:null}}},p5=e=>{const t=e?.gasUsed;return{computation:Xt(t?.computationCost),storage:Xt(t?.storageCost),rebate:Xt(t?.storageRebate),budget:0,price:0}},m5=e=>(e??[]).map(t=>({owner:t.address,coin:t.coinType,amount:Xt(t.amount)})),y5={Created:"created",Deleted:"deleted",None:"mutated",Unknown:"mutated"},v5=(e,t)=>(e?.changedObjects??[]).map(n=>({kind:y5[n.idOperation]??"mutated",id:n.objectId,type:t?.[n.objectId]??""})),g5=e=>(e??[]).map(t=>({type:t.eventType,fields:t.json})),b5=e=>{const t=e.transaction;if(!t)return[];const n=t.commands;return n?n.map((r,i)=>r.$kind??`command ${i}`):[]},x5=e=>e.transaction?.kind?.$kind??"ProgrammableTransaction",S5=e=>e.transaction?.sender??null,w5=async e=>{const t=await Jn(e),{response:n}=await t.ledgerService.getServiceInfo({}),r=n.checkpointHeight??0n;let i=null;try{const{response:o}=await t.ledgerService.getCheckpoint({checkpointId:{oneofKind:"sequenceNumber",sequenceNumber:r},readMask:{paths:["summary.total_network_transactions"]}}),l=o.checkpoint?.summary?.totalNetworkTransactions;i=l===void 0?null:Xt(l)}catch{i=null}return{chainId:n.chainId??null,chain:n.chain??null,epoch:Xt(n.epoch),checkpoint:Xt(n.checkpointHeight),timestampMs:GR(n.timestamp),lowestAvailableCheckpoint:n.lowestAvailableCheckpoint===void 0?null:Xt(n.lowestAvailableCheckpoint),totalTransactions:i}},T5=async e=>{const t=await Jn(e),{referenceGasPrice:n}=await t.core.getReferenceGasPrice();return Xt(n)},O5=async e=>{const t=await Jn(e),{systemState:n}=await t.core.getCurrentSystemState();return{epoch:Xt(n.epoch),protocolVersion:Xt(n.protocolVersion),referenceGasPrice:Xt(n.referenceGasPrice),epochStartMs:Xt(n.epochStartTimestampMs),epochDurationMs:n.parameters?.epochDurationMs?Xt(n.parameters.epochDurationMs):null}},j5=async(e,t=25)=>{const n=await Jn(e),{response:r}=await n.ledgerService.getServiceInfo({}),i=r.checkpointHeight??0n,o=[],l={paths:["sequence_number","transactions.digest","transactions.timestamp","transactions.transaction.kind","transactions.transaction.sender","transactions.effects.status","transactions.effects.gas_used"]};for(let u=i;u>=0n&&o.length<t;u-=1n){const{response:f}=await n.ledgerService.getCheckpoint({checkpointId:{oneofKind:"sequenceNumber",sequenceNumber:u},readMask:l}),h=f.checkpoint;if(!h)continue;const y=Xt(h.sequenceNumber);for(const m of[...h.transactions].reverse()){if(o.length>=t)break;o.push({digest:m.digest??"",sender:m.transaction?.sender??null,kind:m.transaction?.kind?.data?.oneofKind??"transaction",gas:Xt(m.effects?.gasUsed?.computationCost)+Xt(m.effects?.gasUsed?.storageCost)-Xt(m.effects?.gasUsed?.storageRebate),status:m.effects?.status?.success?"success":"failure",checkpoint:y,timestampMs:GR(m.timestamp)})}if(u===0n)break}return o},A5=async(e,t)=>{const r=await(await Jn(e)).core.getTransaction({digest:t,include:{effects:!0,events:!0,balanceChanges:!0,objectTypes:!0,transaction:!0}}),i=r.$kind==="Transaction"?r.Transaction:r.FailedTransaction,o=m5(i.balanceChanges),l=v5(i.effects,i.objectTypes);return{digest:i.digest,status:d5(i.status),kind:x5(i),sender:S5(i),checkpoint:i.effects?Xt(i.effects.version):null,timestampMs:null,effects:{gas:p5(i.effects),balanceChanges:o,objectChanges:l},events:g5(i.events),commands:b5(i),balanceChanges:o,objectChanges:l}},E5=async(e,t)=>{const n=await Jn(e),[{object:r},i]=await Promise.all([n.core.getObject({objectId:t,include:{json:!0,previousTransaction:!0}}),HR(e,t).catch(()=>[])]);return{id:r.objectId,version:r.version,digest:r.digest,type:r.type,owner:h5(r.owner),previousTx:r.previousTransaction??null,fields:r.json??null,dynamicFields:i}},_5=async(e,t)=>{const n=await Jn(e);try{return await n.movePackageService.getPackage({packageId:t}),"package"}catch{}try{const{object:r}=await n.core.getObject({objectId:t});return r.type==="package"?"package":"object"}catch{return"address"}},N5=async(e,t,n=50)=>{const r=await Jn(e),{objects:i}=await r.core.listOwnedObjects({owner:t,limit:n});return i.map(o=>({id:o.objectId,version:o.version,digest:o.digest,type:o.type}))},HR=async(e,t,n=50)=>{const r=await Jn(e),{dynamicFields:i}=await r.core.listDynamicFields({parentId:t,limit:n});return i.map(o=>({id:o.$kind==="DynamicObject"?o.childId:o.fieldId,name:o.name.type,type:o.valueType,isObject:o.$kind==="DynamicObject"}))},k5=async(e,t)=>{const n=await Jn(e),{response:r}=await n.movePackageService.getPackage({packageId:t}),i=r.package,o=(i?.modules??[]).map(l=>({name:l.name??"",functions:(l.functions??[]).map(u=>({name:u.name??"",visibility:u.visibility===2?"public":u.visibility===3?"friend":u.visibility===1?"private":"unknown",isEntry:u.isEntry??!1,params:u.parameters?.length??0}))}));return{id:i?.storageId??t,version:i?.version===void 0?null:Xt(i.version).toString(),modules:o}},C5=async(e,t)=>{const n=await Jn(e),{coinMetadata:r}=await n.core.getCoinMetadata({coinType:t});return r?{coinType:t,name:r.name,symbol:r.symbol,description:r.description,decimals:r.decimals,iconUrl:r.iconUrl,metadataId:r.id}:null},M5=async(e,t)=>{const n=await Jn(e),{object:r}=await n.core.getObject({objectId:t,include:{json:!0}}),i=r.json;if(!i)return null;const o=i.total_supply;if(!o)return null;const u=(o.fields??o).value;return u==null?null:String(u)},D5=async(e,t)=>{const n=await Jn(e),{balances:r}=await n.core.listBalances({owner:t});return r.map(i=>({coinType:i.coinType,balance:i.balance}))},R5=async(e,t)=>{const n=await Jn(e),{balance:r}=await n.core.getBalance({owner:t,coinType:f5});return r.balance},Qa=2e3,Wx=1e4,$u=3e4,mr=e=>e.rpcUrl!==null,VS=e=>lt({queryKey:["chain",e.network,"head"],queryFn:()=>w5(e.rpcUrl),enabled:mr(e),staleTime:Qa,refetchInterval:Qa}),I5=e=>lt({queryKey:["chain",e.network,"epoch"],queryFn:()=>O5(e.rpcUrl),enabled:mr(e),staleTime:Wx,refetchInterval:Wx}),P5=e=>lt({queryKey:["chain",e.network,"gasPrice"],queryFn:()=>T5(e.rpcUrl),enabled:mr(e),staleTime:Wx}),B5=(e,t=25)=>lt({queryKey:["chain",e.network,"latestTx",t],queryFn:()=>j5(e.rpcUrl,t),enabled:mr(e),staleTime:Qa,refetchInterval:Qa*2}),U5=(e,t)=>lt({queryKey:["chain",e.network,"tx",t],queryFn:()=>A5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:$u}),WR=(e,t)=>lt({queryKey:["chain",e.network,"object",t],queryFn:()=>E5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:$u}),YR=(e,t)=>lt({queryKey:["chain",e.network,"ownedObjects",t],queryFn:()=>N5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:Qa}),L5=(e,t)=>lt({queryKey:["chain",e.network,"dynamicFields",t],queryFn:()=>HR(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:$u}),z5=(e,t)=>lt({queryKey:["chain",e.network,"package",t],queryFn:()=>k5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:$u}),$5=(e,t)=>lt({queryKey:["chain",e.network,"coinMeta",t],queryFn:()=>C5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:$u}),q5=(e,t)=>lt({queryKey:["chain",e.network,"totalSupply",t],queryFn:()=>M5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:Qa,refetchInterval:Qa*4}),XR=(e,t)=>lt({queryKey:["chain",e.network,"balances",t],queryFn:()=>D5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:Qa}),KR=(e,t)=>XR(e,t),QR=(e,t)=>lt({queryKey:["chain",e.network,"suiBalance",t],queryFn:()=>R5(e.rpcUrl,t),enabled:mr(e)&&t!==null,staleTime:Qa}),Al=1e4,V5=(e,t)=>lt({queryKey:["domain",t,e,"mode"],queryFn:()=>PR(e),staleTime:Al}),F5=(e,t)=>lt({queryKey:["domain",t,e,"deepbook"],queryFn:()=>U$(e),staleTime:Al}),G5=(e,t)=>lt({queryKey:["domain",t,e,"seal"],queryFn:()=>L$(e),staleTime:Al}),H5=(e,t)=>lt({queryKey:["domain",t,e,"coinCaps"],queryFn:()=>z$(e),staleTime:Al}),W5=(e,t)=>lt({queryKey:["domain",t,e,"postgresStats"],queryFn:()=>q$(e),staleTime:Al}),Y5=(e,t)=>lt({queryKey:["domain",t,e,"fundableCoins"],queryFn:()=>$$(e),staleTime:Al}),RE=e=>{const[t,n]=z.useState([]),r=z.useRef(null);return z.useEffect(()=>{r.current=null,n([])},[e]),[t,o=>{!Number.isFinite(o)||r.current===o||(r.current=o,n(l=>[...l,o].slice(-24)))}]},JR=(e,t,n,r)=>{const i=z.useRef(null),[o,l]=z.useState(null),[u,f]=z.useState(!1);return z.useEffect(()=>{i.current=null,l(null),f(!1)},[e]),z.useEffect(()=>{if(t===null)return;const h=r??Date.now(),y=i.current;if(y&&h>y.t){const m=h-y.t;let g=null;if(n!==null&&y.tx!==null){const S=(n-y.tx)*1e3/m;Number.isFinite(S)&&S>=0&&(g=S,f(!0))}if(g===null){const S=(t-y.cp)*1e3/m;Number.isFinite(S)&&S>=0&&(g=S)}g!==null&&l(g)}i.current={cp:t,tx:n,t:h}},[t,n,r]),{rate:o,isTps:u}},mt=({token:e,pulse:t,className:n=""})=>p.jsx("span",{className:`dot dot-${e} ${t?"dot-pulse":""} ${n}`.trimEnd()}),X5={success:"green",error:"red",info:"cyan"};function K5({toasts:e,onDismiss:t}){return p.jsx("div",{className:"toast-wrap",role:"status","aria-live":"polite",children:e.map(n=>p.jsxs("button",{type:"button",className:"toast",onClick:()=>t(n.id),children:[p.jsx(mt,{token:X5[n.kind]}),p.jsx("span",{className:"grow",style:{textAlign:"left",color:"var(--tx-hi)"},children:n.message})]},n.id))})}const Q5=4e3;let J5=1;const ZR=z.createContext(null),Z5=({children:e})=>{const[t,n]=z.useState([]),r=z.useRef(new Map),i=z.useCallback(u=>{const f=r.current.get(u);f!==void 0&&(clearTimeout(f),r.current.delete(u)),n(h=>h.filter(y=>y.id!==u))},[]),o=z.useCallback((u,f)=>{const h=J5++;n(m=>[...m,{id:h,kind:u,message:f}]);const y=setTimeout(()=>i(h),Q5);r.current.set(h,y)},[i]);z.useEffect(()=>{const u=r.current;return()=>{for(const f of u.values())clearTimeout(f);u.clear()}},[]);const l=z.useMemo(()=>({toast:o,success:u=>o("success",u),error:u=>o("error",u),info:u=>o("info",u)}),[o]);return p.jsxs(ZR.Provider,{value:l,children:[e,p.jsx(K5,{toasts:t,onDismiss:i})]})},Br=()=>{const e=z.useContext(ZR);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},e8=()=>{const[e,t]=z.useState(!1),n=z.useCallback(r=>{try{navigator.clipboard.writeText(r)}catch{}t(!0),setTimeout(()=>t(!1),1100)},[]);return[e,n]},IE={grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",layers:"M12 2 2 7l10 5 10-5zM2 17l10 5 10-5M2 12l10 5 10-5",terminal:"M4 17l6-6-6-6M12 19h8",activity:"M22 12h-4l-3 9L9 3l-3 9H2",wallet:"M19 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0 0 4h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7M16 13h.01",drop:"M12 2.7s6 5.5 6 10.3a6 6 0 0 1-12 0C6 8.2 12 2.7 12 2.7z",compass:"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM16.2 7.8 14 14l-6.2 2.2L10 10z",puzzle:"M4 7h3a2 2 0 1 0 4 0h3v3a2 2 0 1 1 0 4v3h-3a2 2 0 1 0-4 0H4v-3a2 2 0 1 1 0-4z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",cog:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-2.7 1.1V21a2 2 0 1 1-4 0v-.1A1.6 1.6 0 0 0 7 19.4a1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0-1.1-2.7H1a2 2 0 1 1 0-4h.1A1.6 1.6 0 0 0 2.6 7a1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H7a1.6 1.6 0 0 0 1-1.5V1a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 2.7 1.1l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V7a1.6 1.6 0 0 0 1.5 1H23a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z",copy:"M9 9h10v10a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2zM5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1",check:"M20 6 9 17l-5-5",ext:"M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",refresh:"M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5",camera:"M14.5 4h-5L8 6H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-4zM12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",power:"M18.4 6.6a9 9 0 1 1-12.8 0M12 2v10",trash:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",chevR:"M9 18l6-6-6-6",chevD:"M6 9l6 6 6-6",chevL:"M15 18l-6-6 6-6",x:"M18 6 6 18M6 6l12 12",play:"M5 3l14 9-14 9z",pause:"M6 4h4v16H6zM14 4h4v16h-4z",alert:"M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",filter:"M22 3H2l8 9.5V19l4 2v-8.5z",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",cmd:"M15 6a3 3 0 1 1 3 3h-3zm0 0v12m0-12H9m6 12a3 3 0 1 0 3-3h-3zm-6-6a3 3 0 1 1-3-3v3zm0 0v6m0 0a3 3 0 1 0-3 3v-3zm0 0h6",plug:"M9 2v6M15 2v6M6 8h12v3a6 6 0 0 1-12 0zM12 17v5",database:"M12 8c5 0 8-1.3 8-3s-3-3-8-3-8 1.3-8 3 3 3 8 3zM4 5v6c0 1.7 3 3 8 3s8-1.3 8-3V5M4 11v6c0 1.7 3 3 8 3s8-1.3 8-3v-6",box:"M21 8 12 3 3 8m18 0v8l-9 5-9-5V8m18 0-9 5m0 0L3 8m9 5v8",coins:"M9 14a6 6 0 1 0 0-12 6 6 0 0 0 0 12zM15 10a6 6 0 1 1-6 9.7",arrowR:"M5 12h14M13 5l7 7-7 7",dot:"M12 12h.01",clock:"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2",hash:"M4 9h16M4 15h16M10 3 8 21M16 3l-2 18",zap:"M13 2 3 14h9l-1 8 10-12h-9z"},xe=({name:e,size:t=16,className:n="",style:r})=>{const i=IE[e]??IE.dot;return p.jsx("svg",{className:"ic "+n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",style:r,children:i.split("M").filter(Boolean).map((o,l)=>p.jsx("path",{d:"M"+o},l))})},t8=e=>e==="dim"?"var(--tx-dim)":`var(--c-${e})`,hp=({status:e,sm:t})=>{const{token:n,label:r,pulse:i}=dp(e);return p.jsxs("span",{className:"badge",style:{borderColor:`color-mix(in oklab, var(--c-${n}) 32%, var(--line-strong))`},children:[p.jsx("span",{className:`dot dot-${n} ${i?"dot-pulse":""}`}),p.jsx("span",{style:{color:t8(n),fontWeight:560,fontSize:t?11:11.5},children:r})]})},bt=({text:e,display:t,icon:n,mono:r=!0})=>{const[i,o]=e8(),l=u=>{u.stopPropagation(),o(e)};return p.jsxs("span",{className:"chip",onClick:l,title:e,style:r?void 0:{fontFamily:"var(--font-ui)"},children:[n&&p.jsx(xe,{name:n,size:13}),p.jsx("span",{className:"trunc",children:t||e}),p.jsx(xe,{name:i?"check":"copy",size:12,className:"copy-ic",style:i?{opacity:1,color:"var(--c-green)"}:void 0})]})},Hd=({address:e,name:t,impersonate:n})=>p.jsxs("span",{className:"row",style:{gap:6},children:[t&&p.jsx("span",{style:{color:"var(--c-magenta)",fontWeight:540,fontSize:12.5},children:t}),p.jsx(bt,{text:e??"—",display:e?He(e):"—"}),n&&p.jsx("span",{className:"badge",style:{height:18,fontSize:10,color:"var(--c-yellow)"},children:"impersonated"})]}),pp=({endpoint:e})=>p.jsxs("a",{className:"chip",href:e.url,onClick:t=>t.preventDefault(),title:e.url,style:{color:"var(--c-cyan)",borderColor:"var(--line)"},children:[p.jsx(mt,{token:"cyan"}),p.jsx("span",{className:"trunc",style:{fontSize:11.5},children:e.name}),p.jsx(xe,{name:"ext",size:12,className:"copy-ic",style:{opacity:.6}})]}),Zo=({mist:e,symbol:t="SUI",decimals:n=9})=>{const r=n8(e,n);return p.jsxs("span",{className:"mono tnum",style:{fontSize:13},children:[r," ",p.jsx("span",{style:{color:"var(--tx-lo)",fontSize:11.5},children:t})]})},n8=(e,t)=>{if(e===null)return Ld(null);let n;try{n=typeof e=="bigint"?e:BigInt(typeof e=="number"?Math.trunc(e):e)}catch{return String(e)}if(t===9)return Ld(n);const r=t<9?n*10n**BigInt(9-t):n/10n**BigInt(t-9);return Ld(r)},ht=({label:e,value:t,sub:n,token:r,live:i,icon:o})=>p.jsxs("div",{className:"panel panel-pad fade-up",style:{position:"relative",overflow:"hidden",minWidth:0},children:[i&&p.jsx("div",{className:"live-sweep",style:{position:"absolute",inset:0,opacity:.5,pointerEvents:"none"}}),p.jsxs("div",{className:"row between",style:{marginBottom:10},children:[p.jsx("span",{className:"eyebrow",children:e}),o&&p.jsx(xe,{name:o,size:15,style:{color:r?`var(--c-${r})`:"var(--tx-lo)"}})]}),p.jsxs("div",{className:"row",style:{gap:8,alignItems:"baseline"},children:[p.jsx("span",{className:"tnum",style:{fontSize:26,fontWeight:600,letterSpacing:"-.02em",color:r?`var(--c-${r})`:"var(--tx-hi)"},children:t}),n&&p.jsx("span",{style:{color:"var(--tx-lo)",fontSize:12.5},children:n})]})]}),Je=({title:e,count:t,right:n})=>p.jsxs("div",{className:"row between",style:{marginBottom:12},children:[p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx("h3",{style:{fontSize:14.5},children:e}),t!=null&&p.jsx("span",{className:"badge",style:{height:19,fontSize:11,color:"var(--tx-mid)"},children:t})]}),n]}),Ge=({icon:e="box",title:t,hint:n})=>p.jsxs("div",{className:"col",style:{alignItems:"center",justifyContent:"center",padding:"48px 20px",textAlign:"center",color:"var(--tx-lo)"},children:[p.jsx("div",{style:{width:46,height:46,borderRadius:12,display:"grid",placeItems:"center",background:"var(--bg-elev)",border:"1px solid var(--line)",marginBottom:14},children:p.jsx(xe,{name:e,size:20})}),p.jsx("div",{style:{color:"var(--tx-mid)",fontWeight:540,marginBottom:4},children:t}),n&&p.jsx("div",{style:{fontSize:12.5,maxWidth:320},children:n})]}),r8={error:"red",warn:"yellow",info:"cyan",debug:"white"},a8=({level:e})=>{const t=r8[e];return p.jsx("span",{className:"mono",style:{fontSize:10.5,fontWeight:600,letterSpacing:".06em",textTransform:"uppercase",color:`var(--c-${t})`,minWidth:38,display:"inline-block"},children:e})},Vt=({children:e,className:t="",style:n})=>p.jsx("span",{className:`badge ${t}`.trimEnd(),style:n,children:e}),i8={default:"",primary:"btn-primary",danger:"btn-danger",ghost:"btn-ghost"},un=({variant:e="default",sm:t,icon:n,className:r="",children:i,...o})=>{const l=["btn",i8[e],t?"btn-sm":"",r].filter(Boolean).join(" ");return p.jsxs("button",{className:l,...o,children:[n&&p.jsx(xe,{name:n,className:"ic"}),i]})},Ms=({icon:e,label:t,className:n="",...r})=>p.jsx("button",{className:`iconbtn ${n}`.trimEnd(),"aria-label":t,title:t,...r,children:p.jsx(xe,{name:e,className:"ic"})}),PE=({label:e,hint:t,children:n})=>p.jsxs("div",{className:"col",style:{gap:6},children:[e&&p.jsx("span",{className:"eyebrow",children:e}),n,t&&p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-lo)"},children:t})]}),Wd=({className:e="",...t})=>p.jsx("input",{className:`field ${e}`.trimEnd(),...t}),eI=({className:e="",children:t,...n})=>p.jsx("select",{className:`field ${e}`.trimEnd(),...n,children:t}),tI=({value:e,onChange:t,className:n="",...r})=>p.jsx("input",{type:"number",className:`field mono ${n}`.trimEnd(),value:e,onChange:i=>t?.(+i.target.value),...r}),nI=({options:e,value:t,onChange:n})=>p.jsx("div",{className:"segmented",children:e.map(r=>p.jsx("button",{type:"button",className:`seg ${r.value===t?"seg-on":""}`.trimEnd(),onClick:()=>n(r.value),children:r.label},r.value))}),wv=({open:e,title:t,body:n,danger:r,confirmLabel:i="Confirm",onConfirm:o,onCancel:l})=>e?p.jsx("div",{className:"overlay",onClick:l,children:p.jsxs("div",{className:"panel",onClick:u=>u.stopPropagation(),style:{width:420,padding:22,animation:"popIn .2s ease both"},children:[p.jsxs("div",{className:"row",style:{gap:11,marginBottom:10},children:[r&&p.jsx("div",{style:{width:32,height:32,borderRadius:8,display:"grid",placeItems:"center",background:"color-mix(in oklab, var(--c-red) 14%, transparent)",color:"var(--c-red)",flex:"none"},children:p.jsx(xe,{name:"alert",size:18})}),p.jsx("h3",{style:{fontSize:16},children:t})]}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,lineHeight:1.55,margin:"0 0 18px"},children:n}),p.jsxs("div",{className:"row",style:{gap:9,justifyContent:"flex-end"},children:[p.jsx("button",{className:"btn",onClick:l,children:"Cancel"}),p.jsx("button",{className:r?"btn btn-danger":"btn btn-primary",onClick:o,children:i})]})]})}):null,Oe=({children:e,pad:t,header:n,className:r="",style:i})=>p.jsxs("div",{className:`panel ${r}`.trimEnd(),style:{overflow:n&&!t?"hidden":void 0,...i},children:[n&&p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px",paddingBottom:t?0:14},children:n}),t?p.jsx("div",{className:"panel-pad",style:n?{paddingTop:0}:void 0,children:e}):e]}),Nn=({columns:e,rows:t,rowKey:n,onRowClick:r,activeKey:i,empty:o,className:l=""})=>{const[u,f]=z.useState(null),h=z.useMemo(()=>{if(!u)return t;const m=e.find(S=>S.key===u.key);if(!m?.sortVal)return t;const g=m.sortVal;return[...t].sort((S,T)=>{const w=g(S),x=g(T),O=typeof w=="number"&&typeof x=="number"?w-x:String(w).localeCompare(String(x));return u.dir==="asc"?O:-O})},[t,u,e]),y=m=>{m.sortVal&&f(g=>g?.key!==m.key?{key:m.key,dir:"asc"}:g.dir==="asc"?{key:m.key,dir:"desc"}:null)};return p.jsxs("table",{className:`tbl ${l}`.trimEnd(),children:[p.jsx("thead",{children:p.jsx("tr",{children:e.map(m=>{const g=u?.key===m.key,S=!!m.sortVal,T={width:m.width,textAlign:m.align??"left",cursor:S?"pointer":"default"};return p.jsx("th",{style:T,onClick:()=>y(m),children:p.jsxs("span",{className:"row",style:{gap:5,justifyContent:m.align==="right"?"flex-end":"flex-start"},children:[m.header,S&&p.jsx(xe,{name:"chevD",size:11,style:{opacity:g?.9:.3,transform:g&&u?.dir==="asc"?"rotate(180deg)":"none"}})]})},m.key)})})}),p.jsx("tbody",{children:h.length===0?p.jsx("tr",{children:p.jsx("td",{colSpan:e.length,style:{padding:0},children:o??p.jsx(Ge,{title:"No rows"})})}):h.map(m=>{const g=n(m),S=`${r?"clickable":""} ${g===i?"bg-accent-soft":""}`.trim();return p.jsx("tr",{className:S,onClick:r?()=>r(m):void 0,children:e.map(T=>p.jsx("td",{style:{textAlign:T.align??"left"},children:T.render(m)},T.key))},g)})})]})},BE=({children:e,className:t=""})=>p.jsx("div",{className:`col [&>*+*]:border-t [&>*+*]:border-line-faint ${t}`.trimEnd(),children:e}),ms=({label:e,children:t})=>p.jsxs("div",{className:"row between",style:{padding:"9px 0",gap:12},children:[p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:e}),p.jsx("span",{style:{textAlign:"right",minWidth:0},children:t})]}),rI=({value:e,token:t})=>{const n=`${Math.max(0,Math.min(1,e))*100}%`;return p.jsx("div",{className:"meter",children:p.jsx("span",{style:{width:n,background:t?`var(--c-${t})`:"var(--accent)"}})})},s8=({title:e,defaultOpen:t=!1,children:n})=>{const[r,i]=z.useState(t);return p.jsxs("div",{className:"panel",style:{overflow:"hidden"},children:[p.jsx("button",{type:"button",className:"row between",onClick:()=>i(o=>!o),style:{width:"100%",padding:"12px 16px",background:"transparent",border:"none",cursor:"pointer",gap:10},children:p.jsxs("span",{className:"row",style:{gap:9},children:[p.jsx(xe,{name:r?"chevD":"chevR",size:15,style:{color:"var(--tx-lo)"}}),p.jsx("span",{style:{fontWeight:540,fontSize:13.5,color:"var(--tx-hi)"},children:e})]})}),r&&p.jsx("div",{className:"panel-pad fade-up",style:{paddingTop:0,borderTop:"1px solid var(--line-faint)"},children:p.jsx("div",{style:{paddingTop:14},children:n})})]})},o8=12,l8=/^0x[0-9a-f]{6,}/i,c8=e=>typeof e=="string"?l8.test(e)?"magenta":"green":typeof e=="number"?"blue":typeof e=="boolean"?"yellow":"dim",u8=e=>e===null?"null":e===void 0?"undefined":typeof e=="string"?`"${e}"`:String(e),aI=({data:e,name:t,depth:n,autoExpandDepth:r})=>{const[i,o]=z.useState(n<r);if(!(n<o8&&typeof e=="object"&&e!==null)){const h=c8(e);return p.jsxs("div",{className:"row",style:{gap:7,padding:"1.5px 0",paddingLeft:n*15},children:[t!=null&&p.jsxs("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:[t,":"]}),p.jsx("span",{className:"mono trunc",style:{fontSize:12,color:`var(--c-${h})`,maxWidth:360},children:u8(e)})]})}const u=Array.isArray(e)?e.map((h,y)=>[String(y),h]):Object.entries(e),f=Array.isArray(e)?`[${u.length}]`:`{${u.length}}`;return p.jsxs("div",{children:[p.jsxs("div",{className:"row",style:{gap:6,padding:"1.5px 0",paddingLeft:n*15,cursor:"pointer"},onClick:()=>o(h=>!h),children:[p.jsx(xe,{name:i?"chevD":"chevR",size:13,style:{color:"var(--tx-dim)",flex:"none"}}),t!=null&&p.jsxs("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:[t,":"]}),p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--tx-lo)"},children:f})]}),i&&u.map(([h,y])=>p.jsx(aI,{name:h,data:y,depth:n+1,autoExpandDepth:r},h))]})},iI=({data:e,defaultExpanded:t=2})=>p.jsx(aI,{data:e,depth:0,autoExpandDepth:t}),sI=({error:e})=>{const t=$R(e),n=e.chain.length>0;return p.jsxs("div",{className:"panel panel-pad",style:{borderColor:"color-mix(in oklab, var(--c-red) 36%, var(--line))",background:"color-mix(in oklab, var(--c-red) 7%, var(--bg-panel))"},children:[p.jsxs("div",{className:"row",style:{gap:8,marginBottom:6},children:[p.jsx(xe,{name:"alert",size:15,style:{color:"var(--c-red)",flex:"none"}}),e.tag&&p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--c-red)",fontWeight:600},children:e.tag})]}),p.jsx("div",{style:{fontSize:13,color:"var(--tx-hi)",marginBottom:n?10:0},children:t}),n&&p.jsx(s8,{title:"Cause chain",children:p.jsx("div",{className:"col",style:{gap:4},children:e.chain.map((r,i)=>p.jsxs("div",{className:"mono",style:{fontSize:12,color:"var(--tx-mid)"},children:["↳ ",r]},i))})})]})},f8=({funding:e})=>{const{label:t,token:n}=LR(e.status),r=e.status==="funded"?`✓ ${t}`:t;return p.jsxs("span",{className:"row",style:{gap:6},children:[p.jsx(mt,{token:n,pulse:e.status==="pending"}),p.jsx("span",{style:{fontSize:12,color:`var(--c-${n})`},children:r})]})},UE={info:{tok:"cyan",icon:"dot"},warn:{tok:"yellow",icon:"alert"},success:{tok:"green",icon:"check"},danger:{tok:"red",icon:"alert"},neutral:{tok:"white",icon:"dot"}},Cn=({tone:e="info",title:t,children:n,action:r,onClose:i,className:o=""})=>{const l=UE[e]??UE.info;return p.jsxs("div",{className:`flex items-start gap-[11px] rounded-[9px] px-[14px] py-[11px] ${o}`.trimEnd(),style:{background:`color-mix(in oklab, var(--c-${l.tok}) 7%, var(--bg-panel))`,border:`1px solid color-mix(in oklab, var(--c-${l.tok}) 34%, var(--line))`},children:[l.icon==="dot"?p.jsx("span",{className:`dot dot-${l.tok} mt-[5px] shrink-0`}):p.jsx(xe,{name:l.icon,size:16,style:{color:`var(--c-${l.tok})`,marginTop:1,flex:"none"}}),p.jsxs("div",{className:"flex-1 min-w-0",children:[t&&p.jsx("div",{className:"text-[13px] font-medium text-hi",children:t}),n&&p.jsx("div",{className:"text-[12.5px] text-mid mt-[2px] leading-[1.5]",children:n})]}),r,i&&p.jsx("button",{className:"iconbtn shrink-0",style:{width:24,height:24},onClick:i,children:p.jsx(xe,{name:"x",size:14})})]})},ru=({label:e,icon:t,options:n,selected:r,onToggle:i,align:o="left"})=>{const[l,u]=z.useState(!1),f=z.useRef(null);z.useEffect(()=>{const m=g=>{f.current&&!f.current.contains(g.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const h=n.map(m=>typeof m=="string"?{value:m,label:m}:m),y=r.length;return p.jsxs("div",{ref:f,className:"relative",children:[p.jsxs("button",{className:"btn btn-sm",onClick:()=>u(m=>!m),style:y?{borderColor:"var(--accent-line)",color:"var(--tx-hi)"}:void 0,children:[t&&p.jsx(xe,{name:t,size:13}),e,y>0&&p.jsx("span",{className:"badge",style:{height:16,fontSize:10,padding:"0 6px",color:"var(--accent)"},children:y}),p.jsx(xe,{name:"chevD",size:12})]}),l&&p.jsx("div",{className:"panel absolute z-30 min-w-[180px] p-[6px] max-h-[320px] overflow-y-auto",style:{top:"calc(100% + 6px)",[o]:0,boxShadow:"var(--sh-pop)"},children:h.map(m=>{const g=r.includes(m.value);return p.jsxs("button",{className:"flex items-center justify-between w-full px-[8px] py-[6px] rounded-[6px] bg-transparent border-none text-[12.5px] cursor-pointer gap-[8px] hover:bg-hover",onClick:()=>i(m.value),children:[p.jsxs("span",{className:"flex items-center gap-[7px]",children:["token"in m&&m.token&&p.jsx("span",{className:`dot dot-${m.token}`}),p.jsx("span",{style:{color:g?"var(--tx-hi)":"var(--tx-mid)"},children:m.label})]}),g&&p.jsx(xe,{name:"check",size:13,style:{color:"var(--accent)"}})]},m.value)})})]})},d8={SUI:{g:"◎",tok:"cyan"},USDC:{g:"$",tok:"green"},DEEP:{g:"◆",tok:"blue"},WAL:{g:"▲",tok:"magenta"},NS:{g:"✦",tok:"yellow"}},el=({symbol:e,size:t=22})=>{const n=d8[e]??{g:(e||"?")[0],tok:"white"};return p.jsx("span",{className:"inline-grid place-items-center rounded-full font-mono shrink-0",style:{width:t,height:t,fontSize:t*.5,background:`color-mix(in oklab, var(--c-${n.tok}) 16%, transparent)`,color:`var(--c-${n.tok})`,border:`1px solid color-mix(in oklab, var(--c-${n.tok}) 30%, transparent)`},children:n.g})};function h8(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t}const FS=({address:e="",size:t=28,className:n=""})=>{const r=h8(e),i=r%360,o=(i+40)%360,l=[];for(let f=0;f<5;f++)for(let h=0;h<3;h++)(r>>f*3+h&1)===1&&(l.push([h,f]),h<2&&l.push([4-h,f]));const u=`hsl(${i} 70% 65%)`;return p.jsx("span",{className:`inline-block rounded-[6px] overflow-hidden shrink-0 ${n}`.trimEnd(),style:{width:t,height:t},children:p.jsxs("svg",{viewBox:"0 0 5 5",width:t,height:t,children:[p.jsx("rect",{width:"5",height:"5",fill:`hsl(${o} 30% 18%)`}),l.map(([f,h],y)=>p.jsx("rect",{x:f,y:h,width:"1.02",height:"1.02",fill:u},y))]})})};function oI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=oI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=oI(e))&&(r&&(r+=" "),r+=t);return r}var Tv,LE;function Zn(){if(LE)return Tv;LE=1;var e=Array.isArray;return Tv=e,Tv}var Ov,zE;function lI(){if(zE)return Ov;zE=1;var e=typeof yd=="object"&&yd&&yd.Object===Object&&yd;return Ov=e,Ov}var jv,$E;function va(){if($E)return jv;$E=1;var e=lI(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return jv=n,jv}var Av,qE;function qu(){if(qE)return Av;qE=1;var e=va(),t=e.Symbol;return Av=t,Av}var Ev,VE;function p8(){if(VE)return Ev;VE=1;var e=qu(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=n.call(l,i),f=l[i];try{l[i]=void 0;var h=!0}catch{}var y=r.call(l);return h&&(u?l[i]=f:delete l[i]),y}return Ev=o,Ev}var _v,FE;function m8(){if(FE)return _v;FE=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return _v=n,_v}var Nv,GE;function ri(){if(GE)return Nv;GE=1;var e=qu(),t=p8(),n=m8(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?i:r:o&&o in Object(u)?t(u):n(u)}return Nv=l,Nv}var kv,HE;function ai(){if(HE)return kv;HE=1;function e(t){return t!=null&&typeof t=="object"}return kv=e,kv}var Cv,WE;function El(){if(WE)return Cv;WE=1;var e=ri(),t=ai(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Cv=r,Cv}var Mv,YE;function GS(){if(YE)return Mv;YE=1;var e=Zn(),t=El(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return Mv=i,Mv}var Dv,XE;function Gi(){if(XE)return Dv;XE=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Dv=e,Dv}var Rv,KE;function HS(){if(KE)return Rv;KE=1;var e=ri(),t=Gi(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var f=e(u);return f==r||f==i||f==n||f==o}return Rv=l,Rv}var Iv,QE;function y8(){if(QE)return Iv;QE=1;var e=va(),t=e["__core-js_shared__"];return Iv=t,Iv}var Pv,JE;function v8(){if(JE)return Pv;JE=1;var e=y8(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Pv=n,Pv}var Bv,ZE;function cI(){if(ZE)return Bv;ZE=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Bv=n,Bv}var Uv,e_;function g8(){if(e_)return Uv;e_=1;var e=HS(),t=v8(),n=Gi(),r=cI(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,f=l.toString,h=u.hasOwnProperty,y=RegExp("^"+f.call(h).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var S=e(g)?y:o;return S.test(r(g))}return Uv=m,Uv}var Lv,t_;function b8(){if(t_)return Lv;t_=1;function e(t,n){return t?.[n]}return Lv=e,Lv}var zv,n_;function Ls(){if(n_)return zv;n_=1;var e=g8(),t=b8();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return zv=n,zv}var $v,r_;function mp(){if(r_)return $v;r_=1;var e=Ls(),t=e(Object,"create");return $v=t,$v}var qv,a_;function x8(){if(a_)return qv;a_=1;var e=mp();function t(){this.__data__=e?e(null):{},this.size=0}return qv=t,qv}var Vv,i_;function S8(){if(i_)return Vv;i_=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Vv=e,Vv}var Fv,s_;function w8(){if(s_)return Fv;s_=1;var e=mp(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return r.call(l,o)?l[o]:void 0}return Fv=i,Fv}var Gv,o_;function T8(){if(o_)return Gv;o_=1;var e=mp(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Gv=r,Gv}var Hv,l_;function O8(){if(l_)return Hv;l_=1;var e=mp(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return Hv=n,Hv}var Wv,c_;function j8(){if(c_)return Wv;c_=1;var e=x8(),t=S8(),n=w8(),r=T8(),i=O8();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Wv=o,Wv}var Yv,u_;function A8(){if(u_)return Yv;u_=1;function e(){this.__data__=[],this.size=0}return Yv=e,Yv}var Xv,f_;function WS(){if(f_)return Xv;f_=1;function e(t,n){return t===n||t!==t&&n!==n}return Xv=e,Xv}var Kv,d_;function yp(){if(d_)return Kv;d_=1;var e=WS();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Kv=t,Kv}var Qv,h_;function E8(){if(h_)return Qv;h_=1;var e=yp(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,l=e(o,i);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():n.call(o,l,1),--this.size,!0}return Qv=r,Qv}var Jv,p_;function _8(){if(p_)return Jv;p_=1;var e=yp();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Jv=t,Jv}var Zv,m_;function N8(){if(m_)return Zv;m_=1;var e=yp();function t(n){return e(this.__data__,n)>-1}return Zv=t,Zv}var eg,y_;function k8(){if(y_)return eg;y_=1;var e=yp();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return eg=t,eg}var tg,v_;function vp(){if(v_)return tg;v_=1;var e=A8(),t=E8(),n=_8(),r=N8(),i=k8();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,tg=o,tg}var ng,g_;function YS(){if(g_)return ng;g_=1;var e=Ls(),t=va(),n=e(t,"Map");return ng=n,ng}var rg,b_;function C8(){if(b_)return rg;b_=1;var e=j8(),t=vp(),n=YS();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return rg=r,rg}var ag,x_;function M8(){if(x_)return ag;x_=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return ag=e,ag}var ig,S_;function gp(){if(S_)return ig;S_=1;var e=M8();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return ig=t,ig}var sg,w_;function D8(){if(w_)return sg;w_=1;var e=gp();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return sg=t,sg}var og,T_;function R8(){if(T_)return og;T_=1;var e=gp();function t(n){return e(this,n).get(n)}return og=t,og}var lg,O_;function I8(){if(O_)return lg;O_=1;var e=gp();function t(n){return e(this,n).has(n)}return lg=t,lg}var cg,j_;function P8(){if(j_)return cg;j_=1;var e=gp();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return cg=t,cg}var ug,A_;function XS(){if(A_)return ug;A_=1;var e=C8(),t=D8(),n=R8(),r=I8(),i=P8();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var h=l[u];this.set(h[0],h[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,ug=o,ug}var fg,E_;function uI(){if(E_)return fg;E_=1;var e=XS(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var l=arguments,u=i?i.apply(this,l):l[0],f=o.cache;if(f.has(u))return f.get(u);var h=r.apply(this,l);return o.cache=f.set(u,h)||f,h};return o.cache=new(n.Cache||e),o}return n.Cache=e,fg=n,fg}var dg,__;function B8(){if(__)return dg;__=1;var e=uI(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return dg=n,dg}var hg,N_;function U8(){if(N_)return hg;N_=1;var e=B8(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,u,f,h){o.push(f?h.replace(n,"$1"):u||l)}),o});return hg=r,hg}var pg,k_;function KS(){if(k_)return pg;k_=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return pg=e,pg}var mg,C_;function L8(){if(C_)return mg;C_=1;var e=qu(),t=KS(),n=Zn(),r=El(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function l(u){if(typeof u=="string")return u;if(n(u))return t(u,l)+"";if(r(u))return o?o.call(u):"";var f=u+"";return f=="0"&&1/u==-1/0?"-0":f}return mg=l,mg}var yg,M_;function fI(){if(M_)return yg;M_=1;var e=L8();function t(n){return n==null?"":e(n)}return yg=t,yg}var vg,D_;function dI(){if(D_)return vg;D_=1;var e=Zn(),t=GS(),n=U8(),r=fI();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return vg=i,vg}var gg,R_;function bp(){if(R_)return gg;R_=1;var e=El();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return gg=t,gg}var bg,I_;function QS(){if(I_)return bg;I_=1;var e=dI(),t=bp();function n(r,i){i=e(i,r);for(var o=0,l=i.length;r!=null&&o<l;)r=r[t(i[o++])];return o&&o==l?r:void 0}return bg=n,bg}var xg,P_;function hI(){if(P_)return xg;P_=1;var e=QS();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return xg=t,xg}var z8=hI();const Rr=Tt(z8);var Sg,B_;function $8(){if(B_)return Sg;B_=1;function e(t){return t==null}return Sg=e,Sg}var q8=$8();const Le=Tt(q8);var wg,U_;function V8(){if(U_)return wg;U_=1;var e=ri(),t=Zn(),n=ai(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return wg=i,wg}var F8=V8();const Ds=Tt(F8);var G8=HS();const Ue=Tt(G8);var H8=Gi();const _l=Tt(H8);var Tg={exports:{}},rt={};var L_;function W8(){if(L_)return rt;L_=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function w(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case e:switch(x=x.type,x){case n:case i:case r:case h:case y:return x;default:switch(x=x&&x.$$typeof,x){case u:case l:case f:case g:case m:case o:return x;default:return O}}case t:return O}}}return rt.ContextConsumer=l,rt.ContextProvider=o,rt.Element=e,rt.ForwardRef=f,rt.Fragment=n,rt.Lazy=g,rt.Memo=m,rt.Portal=t,rt.Profiler=i,rt.StrictMode=r,rt.Suspense=h,rt.SuspenseList=y,rt.isAsyncMode=function(){return!1},rt.isConcurrentMode=function(){return!1},rt.isContextConsumer=function(x){return w(x)===l},rt.isContextProvider=function(x){return w(x)===o},rt.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},rt.isForwardRef=function(x){return w(x)===f},rt.isFragment=function(x){return w(x)===n},rt.isLazy=function(x){return w(x)===g},rt.isMemo=function(x){return w(x)===m},rt.isPortal=function(x){return w(x)===t},rt.isProfiler=function(x){return w(x)===i},rt.isStrictMode=function(x){return w(x)===r},rt.isSuspense=function(x){return w(x)===h},rt.isSuspenseList=function(x){return w(x)===y},rt.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===i||x===r||x===h||x===y||x===S||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===m||x.$$typeof===o||x.$$typeof===l||x.$$typeof===f||x.$$typeof===T||x.getModuleId!==void 0)},rt.typeOf=w,rt}var z_;function Y8(){return z_||(z_=1,Tg.exports=W8()),Tg.exports}var X8=Y8(),Og,$_;function pI(){if($_)return Og;$_=1;var e=ri(),t=ai(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return Og=r,Og}var jg,q_;function K8(){if(q_)return jg;q_=1;var e=pI();function t(n){return e(n)&&n!=+n}return jg=t,jg}var Q8=K8();const Nl=Tt(Q8);var J8=pI();const Z8=Tt(J8);var Qr=function(t){return t===0?0:t>0?1:-1},Ss=function(t){return Ds(t)&&t.indexOf("%")===t.length-1},pe=function(t){return Z8(t)&&!Nl(t)},eq=function(t){return Le(t)},nn=function(t){return pe(t)||Ds(t)},tq=0,kl=function(t){var n=++tq;return"".concat(t||"").concat(n)},Rs=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&!Ds(t))return r;var o;if(Ss(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Nl(o)&&(o=r),i&&o>n&&(o=n),o},Bo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},nq=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},xn=function(t,n){return pe(t)&&pe(n)?function(r){return t+r*(n-t)}:function(){return n}};function Yd(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Rr(r,t))===n})}var rq=function(t,n){return pe(t)&&pe(n)?t-n:Ds(t)&&Ds(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Go(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Yx(e){"@babel/helpers - typeof";return Yx=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},Yx(e)}var aq=["viewBox","children"],iq=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],V_=["points","pathLength"],Ag={svg:aq,polygon:V_,polyline:V_},JS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Xd=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(z.isValidElement(t)&&(r=t.props),!_l(r))return null;var i={};return Object.keys(r).forEach(function(o){JS.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},sq=function(t,n,r){return function(i){return t(n,r,i),null}},Kd=function(t,n,r){if(!_l(t)||Yx(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];JS.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=sq(l,n,r))}),i},oq=["children"],lq=["children"];function F_(e,t){if(e==null)return{};var n=cq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Xx(e){"@babel/helpers - typeof";return Xx=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},Xx(e)}var G_={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Ya=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},H_=null,Eg=null,ZS=function e(t){if(t===H_&&Array.isArray(Eg))return Eg;var n=[];return z.Children.forEach(t,function(r){Le(r)||(X8.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Eg=n,H_=t,n};function Ir(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ya(i)}):r=[Ya(t)],ZS(e).forEach(function(i){var o=Rr(i,"type.displayName")||Rr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function fr(e,t){var n=Ir(e,t);return n&&n[0]}var W_=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!pe(r)||r<=0||!pe(i)||i<=0)},uq=["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"],fq=function(t){return t&&t.type&&Ds(t.type)&&uq.indexOf(t.type)>=0},mI=function(t){return t&&Xx(t)==="object"&&"clipDot"in t},dq=function(t,n,r,i){var o,l=(o=Ag?.[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Ue(t)&&(i&&l.includes(n)||iq.includes(n))||r&&JS.includes(n)},Be=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(z.isValidElement(t)&&(i=t.props),!_l(i))return null;var o={};return Object.keys(i).forEach(function(l){var u;dq((u=i)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=i[l])}),o},Kx=function e(t,n){if(t===n)return!0;var r=z.Children.count(t);if(r!==z.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Y_(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],l=n[i];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!Y_(o,l))return!1}return!0},Y_=function(t,n){if(Le(t)&&Le(n))return!0;if(!Le(t)&&!Le(n)){var r=t.props||{},i=r.children,o=F_(r,oq),l=n.props||{},u=l.children,f=F_(l,lq);return i&&u?Go(o,f)&&Kx(i,u):!i&&!u?Go(o,f):!1}return!1},X_=function(t,n){var r=[],i={};return ZS(t).forEach(function(o,l){if(fq(o))r.push(o);else if(o){var u=Ya(o.type),f=n[u]||{},h=f.handler,y=f.once;if(h&&(!y||!i[u])){var m=h(o,u,l);r.push(m),i[u]=!0}}}),r},hq=function(t){var n=t&&t.type;return n&&G_[n]?G_[n]:null},pq=function(t,n){return ZS(n).indexOf(t)},mq=["children","width","height","viewBox","className","style","title","desc"];function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qx.apply(this,arguments)}function yq(e,t){if(e==null)return{};var n=vq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Jx(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,l=e.style,u=e.title,f=e.desc,h=yq(e,mq),y=i||{width:n,height:r,x:0,y:0},m=Xe("recharts-surface",o);return W.createElement("svg",Qx({},Be(h,!0,"svg"),{className:m,width:n,height:r,style:l,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height)}),W.createElement("title",null,u),W.createElement("desc",null,f),t)}var gq=["children","className"];function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zx.apply(this,arguments)}function bq(e,t){if(e==null)return{};var n=xq(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wt=W.forwardRef(function(e,t){var n=e.children,r=e.className,i=bq(e,gq),o=Xe("recharts-layer",r);return W.createElement("g",Zx({className:o},Be(i,!0),{ref:t}),n)}),As=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},_g,K_;function Sq(){if(K_)return _g;K_=1;function e(t,n,r){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++i<o;)l[i]=t[i+n];return l}return _g=e,_g}var Ng,Q_;function wq(){if(Q_)return Ng;Q_=1;var e=Sq();function t(n,r,i){var o=n.length;return i=i===void 0?o:i,!r&&i>=o?n:e(n,r,i)}return Ng=t,Ng}var kg,J_;function yI(){if(J_)return kg;J_=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+i+o+"]");function f(h){return u.test(h)}return kg=f,kg}var Cg,Z_;function Tq(){if(Z_)return Cg;Z_=1;function e(t){return t.split("")}return Cg=e,Cg}var Mg,eN;function Oq(){if(eN)return Mg;eN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",u="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+u+"|"+f+")",y="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",T=h+"?",w="["+o+"]?",x="(?:"+S+"(?:"+[y,m,g].join("|")+")"+w+T+")*",O=w+T+x,E="(?:"+[y+u+"?",u,m,g,l].join("|")+")",N=RegExp(f+"(?="+f+")|"+E+O,"g");function k(A){return A.match(N)||[]}return Mg=k,Mg}var Dg,tN;function jq(){if(tN)return Dg;tN=1;var e=Tq(),t=yI(),n=Oq();function r(i){return t(i)?n(i):e(i)}return Dg=r,Dg}var Rg,nN;function Aq(){if(nN)return Rg;nN=1;var e=wq(),t=yI(),n=jq(),r=fI();function i(o){return function(l){l=r(l);var u=t(l)?n(l):void 0,f=u?u[0]:l.charAt(0),h=u?e(u,1).join(""):l.slice(1);return f[o]()+h}}return Rg=i,Rg}var Ig,rN;function Eq(){if(rN)return Ig;rN=1;var e=Aq(),t=e("toUpperCase");return Ig=t,Ig}var _q=Eq();const xp=Tt(_q);function St(e){return function(){return e}}const vI=Math.cos,Qd=Math.sin,Zr=Math.sqrt,Jd=Math.PI,Sp=2*Jd,e1=Math.PI,t1=2*e1,vs=1e-6,Nq=t1-vs;function gI(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function kq(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gI;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Cq{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gI:kq(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,f=r-t,h=i-n,y=l-t,m=u-n,g=y*y+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>vs)if(!(Math.abs(m*f-h*y)>vs)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let S=r-l,T=i-u,w=f*f+h*h,x=S*S+T*T,O=Math.sqrt(w),E=Math.sqrt(g),N=o*Math.tan((e1-Math.acos((w+g-x)/(2*O*E)))/2),k=N/E,A=N/O;Math.abs(k-1)>vs&&this._append`L${t+k*y},${n+k*m}`,this._append`A${o},${o},0,0,${+(m*S>y*T)},${this._x1=t+A*f},${this._y1=n+A*h}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),f=r*Math.sin(i),h=t+u,y=n+f,m=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${h},${y}`:(Math.abs(this._x1-h)>vs||Math.abs(this._y1-y)>vs)&&this._append`L${h},${y}`,r&&(g<0&&(g=g%t1+t1),g>Nq?this._append`A${r},${r},0,1,${m},${t-u},${n-f}A${r},${r},0,1,${m},${this._x1=h},${this._y1=y}`:g>vs&&this._append`A${r},${r},0,${+(g>=e1)},${m},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function ew(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Cq(t)}function tw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bI(e){this._context=e}bI.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 wp(e){return new bI(e)}function xI(e){return e[0]}function SI(e){return e[1]}function wI(e,t){var n=St(!0),r=null,i=wp,o=null,l=ew(u);e=typeof e=="function"?e:e===void 0?xI:St(e),t=typeof t=="function"?t:t===void 0?SI:St(t);function u(f){var h,y=(f=tw(f)).length,m,g=!1,S;for(r==null&&(o=i(S=l())),h=0;h<=y;++h)!(h<y&&n(m=f[h],h,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,h,f),+t(m,h,f));if(S)return o=null,S+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:St(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:St(+f),u):t},u.defined=function(f){return arguments.length?(n=typeof f=="function"?f:St(!!f),u):n},u.curve=function(f){return arguments.length?(i=f,r!=null&&(o=i(r)),u):i},u.context=function(f){return arguments.length?(f==null?r=o=null:o=i(r=f),u):r},u}function Sd(e,t,n){var r=null,i=St(!0),o=null,l=wp,u=null,f=ew(h);e=typeof e=="function"?e:e===void 0?xI:St(+e),t=typeof t=="function"?t:St(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?SI:St(+n);function h(m){var g,S,T,w=(m=tw(m)).length,x,O=!1,E,N=new Array(w),k=new Array(w);for(o==null&&(u=l(E=f())),g=0;g<=w;++g){if(!(g<w&&i(x=m[g],g,m))===O)if(O=!O)S=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),T=g-1;T>=S;--T)u.point(N[T],k[T]);u.lineEnd(),u.areaEnd()}O&&(N[g]=+e(x,g,m),k[g]=+t(x,g,m),u.point(r?+r(x,g,m):N[g],n?+n(x,g,m):k[g]))}if(E)return u=null,E+""||null}function y(){return wI().defined(i).curve(l).context(o)}return h.x=function(m){return arguments.length?(e=typeof m=="function"?m:St(+m),r=null,h):e},h.x0=function(m){return arguments.length?(e=typeof m=="function"?m:St(+m),h):e},h.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:St(+m),h):r},h.y=function(m){return arguments.length?(t=typeof m=="function"?m:St(+m),n=null,h):t},h.y0=function(m){return arguments.length?(t=typeof m=="function"?m:St(+m),h):t},h.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:St(+m),h):n},h.lineX0=h.lineY0=function(){return y().x(e).y(t)},h.lineY1=function(){return y().x(e).y(n)},h.lineX1=function(){return y().x(r).y(t)},h.defined=function(m){return arguments.length?(i=typeof m=="function"?m:St(!!m),h):i},h.curve=function(m){return arguments.length?(l=m,o!=null&&(u=l(o)),h):l},h.context=function(m){return arguments.length?(m==null?o=u=null:u=l(o=m),h):o},h}class TI{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Mq(e){return new TI(e,!0)}function Dq(e){return new TI(e,!1)}const nw={draw(e,t){const n=Zr(t/Jd);e.moveTo(n,0),e.arc(0,0,n,0,Sp)}},Rq={draw(e,t){const n=Zr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},OI=Zr(1/3),Iq=OI*2,Pq={draw(e,t){const n=Zr(t/Iq),r=n*OI;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Bq={draw(e,t){const n=Zr(t),r=-n/2;e.rect(r,r,n,n)}},Uq=.8908130915292852,jI=Qd(Jd/10)/Qd(7*Jd/10),Lq=Qd(Sp/10)*jI,zq=-vI(Sp/10)*jI,$q={draw(e,t){const n=Zr(t*Uq),r=Lq*n,i=zq*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Sp*o/5,u=vI(l),f=Qd(l);e.lineTo(f*n,-u*n),e.lineTo(u*r-f*i,f*r+u*i)}e.closePath()}},Pg=Zr(3),qq={draw(e,t){const n=-Zr(t/(Pg*3));e.moveTo(0,n*2),e.lineTo(-Pg*n,-n),e.lineTo(Pg*n,-n),e.closePath()}},Ar=-.5,Er=Zr(3)/2,n1=1/Zr(12),Vq=(n1/2+1)*3,Fq={draw(e,t){const n=Zr(t/Vq),r=n/2,i=n*n1,o=r,l=n*n1+n,u=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,f),e.lineTo(Ar*r-Er*i,Er*r+Ar*i),e.lineTo(Ar*o-Er*l,Er*o+Ar*l),e.lineTo(Ar*u-Er*f,Er*u+Ar*f),e.lineTo(Ar*r+Er*i,Ar*i-Er*r),e.lineTo(Ar*o+Er*l,Ar*l-Er*o),e.lineTo(Ar*u+Er*f,Ar*f-Er*u),e.closePath()}};function Gq(e,t){let n=null,r=ew(i);e=typeof e=="function"?e:St(e||nw),t=typeof t=="function"?t:St(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:St(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:St(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Zd(){}function eh(e,t,n){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+n)/6)}function AI(e){this._context=e}AI.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:eh(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:eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hq(e){return new AI(e)}function EI(e){this._context=e}EI.prototype={areaStart:Zd,areaEnd:Zd,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:eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wq(e){return new EI(e)}function _I(e){this._context=e}_I.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:eh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yq(e){return new _I(e)}function NI(e){this._context=e}NI.prototype={areaStart:Zd,areaEnd:Zd,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 Xq(e){return new NI(e)}function aN(e){return e<0?-1:1}function iN(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),u=(o*i+l*r)/(r+i);return(aN(o)+aN(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function sN(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bg(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,l-u*n,o,l)}function th(e){this._context=e}th.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:Bg(this,this._t0,sN(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 n=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,Bg(this,sN(this,n=iN(this,e,t)),n);break;default:Bg(this,this._t0,n=iN(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kI(e){this._context=new CI(e)}(kI.prototype=Object.create(th.prototype)).point=function(e,t){th.prototype.point.call(this,t,e)};function CI(e){this._context=e}CI.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,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function Kq(e){return new th(e)}function Qq(e){return new kI(e)}function MI(e){this._context=e}MI.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=oN(e),i=oN(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function oN(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Jq(e){return new MI(e)}function Tp(e,t){this._context=e,this._t=t}Tp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Zq(e){return new Tp(e,.5)}function eV(e){return new Tp(e,0)}function tV(e){return new Tp(e,1)}function tl(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,u=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function r1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function nV(e,t){return e[t]}function rV(e){const t=[];return t.key=e,t}function aV(){var e=St([]),t=r1,n=tl,r=nV;function i(o){var l=Array.from(e.apply(this,arguments),rV),u,f=l.length,h=-1,y;for(const m of o)for(u=0,++h;u<f;++u)(l[u][h]=[0,+r(m,l[u].key,h,o)]).data=m;for(u=0,y=tw(t(l));u<f;++u)l[y[u]].index=u;return n(l,y),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:St(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:St(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?r1:typeof o=="function"?o:St(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??tl,i):n},i}function iV(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}tl(e,t)}}function sV(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,u=0;l<i;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}tl(e,t)}}function oV(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var u=0,f=0,h=0;u<l;++u){for(var y=e[t[u]],m=y[r][1]||0,g=y[r-1][1]||0,S=(m-g)/2,T=0;T<u;++T){var w=e[t[T]],x=w[r][1]||0,O=w[r-1][1]||0;S+=x-O}f+=m,h+=S*m}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,tl(e,t)}}function au(e){"@babel/helpers - typeof";return au=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},au(e)}var lV=["type","size","sizeType"];function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a1.apply(this,arguments)}function lN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lN(Object(n),!0).forEach(function(r){cV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cV(e,t,n){return t=uV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uV(e){var t=fV(e,"string");return au(t)=="symbol"?t:t+""}function fV(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dV(e,t){if(e==null)return{};var n=hV(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var DI={symbolCircle:nw,symbolCross:Rq,symbolDiamond:Pq,symbolSquare:Bq,symbolStar:$q,symbolTriangle:qq,symbolWye:Fq},pV=Math.PI/180,mV=function(t){var n="symbol".concat(xp(t));return DI[n]||nw},yV=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*pV;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},vV=function(t,n){DI["symbol".concat(xp(t))]=n},rw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,l=t.sizeType,u=l===void 0?"area":l,f=dV(t,lV),h=cN(cN({},f),{},{type:r,size:o,sizeType:u}),y=function(){var x=mV(r),O=Gq().type(x).size(yV(o,u,r));return O()},m=h.className,g=h.cx,S=h.cy,T=Be(h,!0);return g===+g&&S===+S&&o===+o?W.createElement("path",a1({},T,{className:Xe("recharts-symbols",m),transform:"translate(".concat(g,", ").concat(S,")"),d:y()})):null};rw.registerSymbol=vV;function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i1.apply(this,arguments)}function uN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uN(Object(n),!0).forEach(function(r){iu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,II(r.key),r)}}function SV(e,t,n){return t&&xV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wV(e,t,n){return t=nh(t),TV(e,RI()?Reflect.construct(t,n||[],nh(e).constructor):t.apply(e,n))}function TV(e,t){if(t&&(nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OV(e)}function OV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RI=function(){return!!e})()}function nh(e){return nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nh(e)}function jV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s1(e,t)}function s1(e,t){return s1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},s1(e,t)}function iu(e,t,n){return t=II(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function II(e){var t=AV(e,"string");return nl(t)=="symbol"?t:t+""}function AV(e,t){if(nl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _r=32,aw=(function(e){function t(){return bV(this,t),wV(this,t,arguments)}return jV(t,e),SV(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=_r/2,l=_r/6,u=_r/3,f=r.inactive?i:r.color;if(r.type==="plainline")return W.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:_r,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return W.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(u,`
|
|
395
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
|
|
396
|
+
H`).concat(_r,"M").concat(2*u,",").concat(o,`
|
|
397
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return W.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(_r/8,"h").concat(_r,"v").concat(_r*3/4,"h").concat(-_r,"z"),className:"recharts-legend-icon"});if(W.isValidElement(r.legendIcon)){var h=gV({},r);return delete h.legendIcon,W.cloneElement(r.legendIcon,h)}return W.createElement(rw,{fill:f,cx:o,cy:o,size:_r,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,l=i.iconSize,u=i.layout,f=i.formatter,h=i.inactiveColor,y={x:0,y:0,width:_r,height:_r},m={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(S,T){var w=S.formatter||f,x=Xe(iu(iu({"recharts-legend-item":!0},"legend-item-".concat(T),!0),"inactive",S.inactive));if(S.type==="none")return null;var O=Ue(S.value)?null:S.value;As(!Ue(S.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var E=S.inactive?h:S.color;return W.createElement("li",i1({className:x,style:m,key:"legend-item-".concat(T)},Kd(r.props,S,T)),W.createElement(Jx,{width:l,height:l,viewBox:y,style:g},r.renderIcon(S)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},w?w(O,S,T):O))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,l=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(z.PureComponent);iu(aw,"displayName","Legend");iu(aw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Ug,fN;function EV(){if(fN)return Ug;fN=1;var e=vp();function t(){this.__data__=new e,this.size=0}return Ug=t,Ug}var Lg,dN;function _V(){if(dN)return Lg;dN=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Lg=e,Lg}var zg,hN;function NV(){if(hN)return zg;hN=1;function e(t){return this.__data__.get(t)}return zg=e,zg}var $g,pN;function kV(){if(pN)return $g;pN=1;function e(t){return this.__data__.has(t)}return $g=e,$g}var qg,mN;function CV(){if(mN)return qg;mN=1;var e=vp(),t=YS(),n=XS(),r=200;function i(o,l){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(f)}return u.set(o,l),this.size=u.size,this}return qg=i,qg}var Vg,yN;function PI(){if(yN)return Vg;yN=1;var e=vp(),t=EV(),n=_V(),r=NV(),i=kV(),o=CV();function l(u){var f=this.__data__=new e(u);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=o,Vg=l,Vg}var Fg,vN;function MV(){if(vN)return Fg;vN=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Fg=t,Fg}var Gg,gN;function DV(){if(gN)return Gg;gN=1;function e(t){return this.__data__.has(t)}return Gg=e,Gg}var Hg,bN;function BI(){if(bN)return Hg;bN=1;var e=XS(),t=MV(),n=DV();function r(i){var o=-1,l=i==null?0:i.length;for(this.__data__=new e;++o<l;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Hg=r,Hg}var Wg,xN;function UI(){if(xN)return Wg;xN=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Wg=e,Wg}var Yg,SN;function LI(){if(SN)return Yg;SN=1;function e(t,n){return t.has(n)}return Yg=e,Yg}var Xg,wN;function zI(){if(wN)return Xg;wN=1;var e=BI(),t=UI(),n=LI(),r=1,i=2;function o(l,u,f,h,y,m){var g=f&r,S=l.length,T=u.length;if(S!=T&&!(g&&T>S))return!1;var w=m.get(l),x=m.get(u);if(w&&x)return w==u&&x==l;var O=-1,E=!0,N=f&i?new e:void 0;for(m.set(l,u),m.set(u,l);++O<S;){var k=l[O],A=u[O];if(h)var _=g?h(A,k,O,u,l,m):h(k,A,O,l,u,m);if(_!==void 0){if(_)continue;E=!1;break}if(N){if(!t(u,function(C,I){if(!n(N,I)&&(k===C||y(k,C,f,h,m)))return N.push(I)})){E=!1;break}}else if(!(k===A||y(k,A,f,h,m))){E=!1;break}}return m.delete(l),m.delete(u),E}return Xg=o,Xg}var Kg,TN;function RV(){if(TN)return Kg;TN=1;var e=va(),t=e.Uint8Array;return Kg=t,Kg}var Qg,ON;function IV(){if(ON)return Qg;ON=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Qg=e,Qg}var Jg,jN;function iw(){if(jN)return Jg;jN=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Jg=e,Jg}var Zg,AN;function PV(){if(AN)return Zg;AN=1;var e=qu(),t=RV(),n=WS(),r=zI(),i=IV(),o=iw(),l=1,u=2,f="[object Boolean]",h="[object Date]",y="[object Error]",m="[object Map]",g="[object Number]",S="[object RegExp]",T="[object Set]",w="[object String]",x="[object Symbol]",O="[object ArrayBuffer]",E="[object DataView]",N=e?e.prototype:void 0,k=N?N.valueOf:void 0;function A(_,C,I,q,G,L,P){switch(I){case E:if(_.byteLength!=C.byteLength||_.byteOffset!=C.byteOffset)return!1;_=_.buffer,C=C.buffer;case O:return!(_.byteLength!=C.byteLength||!L(new t(_),new t(C)));case f:case h:case g:return n(+_,+C);case y:return _.name==C.name&&_.message==C.message;case S:case w:return _==C+"";case m:var H=i;case T:var F=q&l;if(H||(H=o),_.size!=C.size&&!F)return!1;var K=P.get(_);if(K)return K==C;q|=u,P.set(_,C);var B=r(H(_),H(C),q,G,L,P);return P.delete(_),B;case x:if(k)return k.call(_)==k.call(C)}return!1}return Zg=A,Zg}var eb,EN;function $I(){if(EN)return eb;EN=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return eb=e,eb}var tb,_N;function BV(){if(_N)return tb;_N=1;var e=$I(),t=Zn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return tb=n,tb}var nb,NN;function UV(){if(NN)return nb;NN=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,l=[];++r<i;){var u=t[r];n(u,r,t)&&(l[o++]=u)}return l}return nb=e,nb}var rb,kN;function LV(){if(kN)return rb;kN=1;function e(){return[]}return rb=e,rb}var ab,CN;function zV(){if(CN)return ab;CN=1;var e=UV(),t=LV(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(u){return r.call(l,u)}))}:t;return ab=o,ab}var ib,MN;function $V(){if(MN)return ib;MN=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return ib=e,ib}var sb,DN;function qV(){if(DN)return sb;DN=1;var e=ri(),t=ai(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return sb=r,sb}var ob,RN;function sw(){if(RN)return ob;RN=1;var e=qV(),t=ai(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!i.call(l,"callee")};return ob=o,ob}var $c={exports:{}},lb,IN;function VV(){if(IN)return lb;IN=1;function e(){return!1}return lb=e,lb}$c.exports;var PN;function qI(){return PN||(PN=1,(function(e,t){var n=va(),r=VV(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?n.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||r;e.exports=h})($c,$c.exports)),$c.exports}var cb,BN;function ow(){if(BN)return cb;BN=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return cb=n,cb}var ub,UN;function lw(){if(UN)return ub;UN=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ub=t,ub}var fb,LN;function FV(){if(LN)return fb;LN=1;var e=ri(),t=lw(),n=ai(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",h="[object Map]",y="[object Number]",m="[object Object]",g="[object RegExp]",S="[object Set]",T="[object String]",w="[object WeakMap]",x="[object ArrayBuffer]",O="[object DataView]",E="[object Float32Array]",N="[object Float64Array]",k="[object Int8Array]",A="[object Int16Array]",_="[object Int32Array]",C="[object Uint8Array]",I="[object Uint8ClampedArray]",q="[object Uint16Array]",G="[object Uint32Array]",L={};L[E]=L[N]=L[k]=L[A]=L[_]=L[C]=L[I]=L[q]=L[G]=!0,L[r]=L[i]=L[x]=L[o]=L[O]=L[l]=L[u]=L[f]=L[h]=L[y]=L[m]=L[g]=L[S]=L[T]=L[w]=!1;function P(H){return n(H)&&t(H.length)&&!!L[e(H)]}return fb=P,fb}var db,zN;function VI(){if(zN)return db;zN=1;function e(t){return function(n){return t(n)}}return db=e,db}var qc={exports:{}};qc.exports;var $N;function GV(){return $N||($N=1,(function(e,t){var n=lI(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,l=o&&n.process,u=(function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(qc,qc.exports)),qc.exports}var hb,qN;function FI(){if(qN)return hb;qN=1;var e=FV(),t=VI(),n=GV(),r=n&&n.isTypedArray,i=r?t(r):e;return hb=i,hb}var pb,VN;function HV(){if(VN)return pb;VN=1;var e=$V(),t=sw(),n=Zn(),r=qI(),i=ow(),o=FI(),l=Object.prototype,u=l.hasOwnProperty;function f(h,y){var m=n(h),g=!m&&t(h),S=!m&&!g&&r(h),T=!m&&!g&&!S&&o(h),w=m||g||S||T,x=w?e(h.length,String):[],O=x.length;for(var E in h)(y||u.call(h,E))&&!(w&&(E=="length"||S&&(E=="offset"||E=="parent")||T&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,O)))&&x.push(E);return x}return pb=f,pb}var mb,FN;function WV(){if(FN)return mb;FN=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return mb=t,mb}var yb,GN;function GI(){if(GN)return yb;GN=1;function e(t,n){return function(r){return t(n(r))}}return yb=e,yb}var vb,HN;function YV(){if(HN)return vb;HN=1;var e=GI(),t=e(Object.keys,Object);return vb=t,vb}var gb,WN;function XV(){if(WN)return gb;WN=1;var e=WV(),t=YV(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&l.push(u);return l}return gb=i,gb}var bb,YN;function Vu(){if(YN)return bb;YN=1;var e=HS(),t=lw();function n(r){return r!=null&&t(r.length)&&!e(r)}return bb=n,bb}var xb,XN;function Op(){if(XN)return xb;XN=1;var e=HV(),t=XV(),n=Vu();function r(i){return n(i)?e(i):t(i)}return xb=r,xb}var Sb,KN;function KV(){if(KN)return Sb;KN=1;var e=BV(),t=zV(),n=Op();function r(i){return e(i,n,t)}return Sb=r,Sb}var wb,QN;function QV(){if(QN)return wb;QN=1;var e=KV(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,u,f,h,y){var m=u&t,g=e(o),S=g.length,T=e(l),w=T.length;if(S!=w&&!m)return!1;for(var x=S;x--;){var O=g[x];if(!(m?O in l:r.call(l,O)))return!1}var E=y.get(o),N=y.get(l);if(E&&N)return E==l&&N==o;var k=!0;y.set(o,l),y.set(l,o);for(var A=m;++x<S;){O=g[x];var _=o[O],C=l[O];if(f)var I=m?f(C,_,O,l,o,y):f(_,C,O,o,l,y);if(!(I===void 0?_===C||h(_,C,u,f,y):I)){k=!1;break}A||(A=O=="constructor")}if(k&&!A){var q=o.constructor,G=l.constructor;q!=G&&"constructor"in o&&"constructor"in l&&!(typeof q=="function"&&q instanceof q&&typeof G=="function"&&G instanceof G)&&(k=!1)}return y.delete(o),y.delete(l),k}return wb=i,wb}var Tb,JN;function JV(){if(JN)return Tb;JN=1;var e=Ls(),t=va(),n=e(t,"DataView");return Tb=n,Tb}var Ob,ZN;function ZV(){if(ZN)return Ob;ZN=1;var e=Ls(),t=va(),n=e(t,"Promise");return Ob=n,Ob}var jb,e2;function HI(){if(e2)return jb;e2=1;var e=Ls(),t=va(),n=e(t,"Set");return jb=n,jb}var Ab,t2;function e9(){if(t2)return Ab;t2=1;var e=Ls(),t=va(),n=e(t,"WeakMap");return Ab=n,Ab}var Eb,n2;function t9(){if(n2)return Eb;n2=1;var e=JV(),t=YS(),n=ZV(),r=HI(),i=e9(),o=ri(),l=cI(),u="[object Map]",f="[object Object]",h="[object Promise]",y="[object Set]",m="[object WeakMap]",g="[object DataView]",S=l(e),T=l(t),w=l(n),x=l(r),O=l(i),E=o;return(e&&E(new e(new ArrayBuffer(1)))!=g||t&&E(new t)!=u||n&&E(n.resolve())!=h||r&&E(new r)!=y||i&&E(new i)!=m)&&(E=function(N){var k=o(N),A=k==f?N.constructor:void 0,_=A?l(A):"";if(_)switch(_){case S:return g;case T:return u;case w:return h;case x:return y;case O:return m}return k}),Eb=E,Eb}var _b,r2;function n9(){if(r2)return _b;r2=1;var e=PI(),t=zI(),n=PV(),r=QV(),i=t9(),o=Zn(),l=qI(),u=FI(),f=1,h="[object Arguments]",y="[object Array]",m="[object Object]",g=Object.prototype,S=g.hasOwnProperty;function T(w,x,O,E,N,k){var A=o(w),_=o(x),C=A?y:i(w),I=_?y:i(x);C=C==h?m:C,I=I==h?m:I;var q=C==m,G=I==m,L=C==I;if(L&&l(w)){if(!l(x))return!1;A=!0,q=!1}if(L&&!q)return k||(k=new e),A||u(w)?t(w,x,O,E,N,k):n(w,x,C,O,E,N,k);if(!(O&f)){var P=q&&S.call(w,"__wrapped__"),H=G&&S.call(x,"__wrapped__");if(P||H){var F=P?w.value():w,K=H?x.value():x;return k||(k=new e),N(F,K,O,E,k)}}return L?(k||(k=new e),r(w,x,O,E,N,k)):!1}return _b=T,_b}var Nb,a2;function cw(){if(a2)return Nb;a2=1;var e=n9(),t=ai();function n(r,i,o,l,u){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,l,n,u)}return Nb=n,Nb}var kb,i2;function r9(){if(i2)return kb;i2=1;var e=PI(),t=cw(),n=1,r=2;function i(o,l,u,f){var h=u.length,y=h,m=!f;if(o==null)return!y;for(o=Object(o);h--;){var g=u[h];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++h<y;){g=u[h];var S=g[0],T=o[S],w=g[1];if(m&&g[2]){if(T===void 0&&!(S in o))return!1}else{var x=new e;if(f)var O=f(T,w,S,o,l,x);if(!(O===void 0?t(w,T,n|r,f,x):O))return!1}}return!0}return kb=i,kb}var Cb,s2;function WI(){if(s2)return Cb;s2=1;var e=Gi();function t(n){return n===n&&!e(n)}return Cb=t,Cb}var Mb,o2;function a9(){if(o2)return Mb;o2=1;var e=WI(),t=Op();function n(r){for(var i=t(r),o=i.length;o--;){var l=i[o],u=r[l];i[o]=[l,u,e(u)]}return i}return Mb=n,Mb}var Db,l2;function YI(){if(l2)return Db;l2=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Db=e,Db}var Rb,c2;function i9(){if(c2)return Rb;c2=1;var e=r9(),t=a9(),n=YI();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===i||e(l,i,o)}}return Rb=r,Rb}var Ib,u2;function s9(){if(u2)return Ib;u2=1;function e(t,n){return t!=null&&n in Object(t)}return Ib=e,Ib}var Pb,f2;function o9(){if(f2)return Pb;f2=1;var e=dI(),t=sw(),n=Zn(),r=ow(),i=lw(),o=bp();function l(u,f,h){f=e(f,u);for(var y=-1,m=f.length,g=!1;++y<m;){var S=o(f[y]);if(!(g=u!=null&&h(u,S)))break;u=u[S]}return g||++y!=m?g:(m=u==null?0:u.length,!!m&&i(m)&&r(S,m)&&(n(u)||t(u)))}return Pb=l,Pb}var Bb,d2;function l9(){if(d2)return Bb;d2=1;var e=s9(),t=o9();function n(r,i){return r!=null&&t(r,i,e)}return Bb=n,Bb}var Ub,h2;function c9(){if(h2)return Ub;h2=1;var e=cw(),t=hI(),n=l9(),r=GS(),i=WI(),o=YI(),l=bp(),u=1,f=2;function h(y,m){return r(y)&&i(m)?o(l(y),m):function(g){var S=t(g,y);return S===void 0&&S===m?n(g,y):e(m,S,u|f)}}return Ub=h,Ub}var Lb,p2;function Cl(){if(p2)return Lb;p2=1;function e(t){return t}return Lb=e,Lb}var zb,m2;function u9(){if(m2)return zb;m2=1;function e(t){return function(n){return n?.[t]}}return zb=e,zb}var $b,y2;function f9(){if(y2)return $b;y2=1;var e=QS();function t(n){return function(r){return e(r,n)}}return $b=t,$b}var qb,v2;function d9(){if(v2)return qb;v2=1;var e=u9(),t=f9(),n=GS(),r=bp();function i(o){return n(o)?e(r(o)):t(o)}return qb=i,qb}var Vb,g2;function Hi(){if(g2)return Vb;g2=1;var e=i9(),t=c9(),n=Cl(),r=Zn(),i=d9();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return Vb=o,Vb}var Fb,b2;function XI(){if(b2)return Fb;b2=1;function e(t,n,r,i){for(var o=t.length,l=r+(i?1:-1);i?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return Fb=e,Fb}var Gb,x2;function h9(){if(x2)return Gb;x2=1;function e(t){return t!==t}return Gb=e,Gb}var Hb,S2;function p9(){if(S2)return Hb;S2=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Hb=e,Hb}var Wb,w2;function m9(){if(w2)return Wb;w2=1;var e=XI(),t=h9(),n=p9();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return Wb=r,Wb}var Yb,T2;function y9(){if(T2)return Yb;T2=1;var e=m9();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Yb=t,Yb}var Xb,O2;function v9(){if(O2)return Xb;O2=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return Xb=e,Xb}var Kb,j2;function g9(){if(j2)return Kb;j2=1;function e(){}return Kb=e,Kb}var Qb,A2;function b9(){if(A2)return Qb;A2=1;var e=HI(),t=g9(),n=iw(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Qb=i,Qb}var Jb,E2;function x9(){if(E2)return Jb;E2=1;var e=BI(),t=y9(),n=v9(),r=LI(),i=b9(),o=iw(),l=200;function u(f,h,y){var m=-1,g=t,S=f.length,T=!0,w=[],x=w;if(y)T=!1,g=n;else if(S>=l){var O=h?null:i(f);if(O)return o(O);T=!1,g=r,x=new e}else x=h?[]:w;e:for(;++m<S;){var E=f[m],N=h?h(E):E;if(E=y||E!==0?E:0,T&&N===N){for(var k=x.length;k--;)if(x[k]===N)continue e;h&&x.push(N),w.push(E)}else g(x,N,y)||(x!==w&&x.push(N),w.push(E))}return w}return Jb=u,Jb}var Zb,_2;function S9(){if(_2)return Zb;_2=1;var e=Hi(),t=x9();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Zb=n,Zb}var w9=S9();const N2=Tt(w9);function KI(e,t,n){return t===!0?N2(e,n):Ue(t)?N2(e,t):e}function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}var T9=["ref"];function k2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ua(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k2(Object(n),!0).forEach(function(r){jp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JI(r.key),r)}}function j9(e,t,n){return t&&C2(e.prototype,t),n&&C2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A9(e,t,n){return t=rh(t),E9(e,QI()?Reflect.construct(t,n||[],rh(e).constructor):t.apply(e,n))}function E9(e,t){if(t&&(rl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _9(e)}function _9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QI=function(){return!!e})()}function rh(e){return rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rh(e)}function N9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o1(e,t)}function o1(e,t){return o1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},o1(e,t)}function jp(e,t,n){return t=JI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JI(e){var t=k9(e,"string");return rl(t)=="symbol"?t:t+""}function k9(e,t){if(rl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function C9(e,t){if(e==null)return{};var n=M9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function M9(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function D9(e){return e.value}function R9(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=C9(t,T9);return W.createElement(aw,n)}var M2=1,Ho=(function(e){function t(){var n;O9(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=A9(this,t,[].concat(i)),jp(n,"lastBoundingBox",{width:-1,height:-1}),n}return N9(t,e),j9(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>M2||Math.abs(i.height-this.lastBoundingBox.height)>M2)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ua({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,l=i.align,u=i.verticalAlign,f=i.margin,h=i.chartWidth,y=i.chartHeight,m,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var S=this.getBBoxSnapshot();m={left:((h||0)-S.width)/2}}else m=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var T=this.getBBoxSnapshot();g={top:((y||0)-T.height)/2}}else g=u==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Ua(Ua({},m),g)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,l=i.width,u=i.height,f=i.wrapperStyle,h=i.payloadUniqBy,y=i.payload,m=Ua(Ua({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(f)),f);return W.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(S){r.wrapperNode=S}},R9(o,Ua(Ua({},this.props),{},{payload:KI(y,h,D9)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Ua(Ua({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&pe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(z.PureComponent);jp(Ho,"displayName","Legend");jp(Ho,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var e0,D2;function I9(){if(D2)return e0;D2=1;var e=qu(),t=sw(),n=Zn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return e0=i,e0}var t0,R2;function ZI(){if(R2)return t0;R2=1;var e=$I(),t=I9();function n(r,i,o,l,u){var f=-1,h=r.length;for(o||(o=t),u||(u=[]);++f<h;){var y=r[f];i>0&&o(y)?i>1?n(y,i-1,o,l,u):e(u,y):l||(u[u.length]=y)}return u}return t0=n,t0}var n0,I2;function P9(){if(I2)return n0;I2=1;function e(t){return function(n,r,i){for(var o=-1,l=Object(n),u=i(n),f=u.length;f--;){var h=u[t?f:++o];if(r(l[h],h,l)===!1)break}return n}}return n0=e,n0}var r0,P2;function B9(){if(P2)return r0;P2=1;var e=P9(),t=e();return r0=t,r0}var a0,B2;function eP(){if(B2)return a0;B2=1;var e=B9(),t=Op();function n(r,i){return r&&e(r,i,t)}return a0=n,a0}var i0,U2;function U9(){if(U2)return i0;U2=1;var e=Vu();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var l=i.length,u=r?l:-1,f=Object(i);(r?u--:++u<l)&&o(f[u],u,f)!==!1;);return i}}return i0=t,i0}var s0,L2;function uw(){if(L2)return s0;L2=1;var e=eP(),t=U9(),n=t(e);return s0=n,s0}var o0,z2;function tP(){if(z2)return o0;z2=1;var e=uw(),t=Vu();function n(r,i){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,f,h){l[++o]=i(u,f,h)}),l}return o0=n,o0}var l0,$2;function L9(){if($2)return l0;$2=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return l0=e,l0}var c0,q2;function z9(){if(q2)return c0;q2=1;var e=El();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,l=n===n,u=e(n),f=r!==void 0,h=r===null,y=r===r,m=e(r);if(!h&&!m&&!u&&n>r||u&&f&&y&&!h&&!m||o&&f&&y||!i&&y||!l)return 1;if(!o&&!u&&!m&&n<r||m&&i&&l&&!o&&!u||h&&i&&l||!f&&l||!y)return-1}return 0}return c0=t,c0}var u0,V2;function $9(){if(V2)return u0;V2=1;var e=z9();function t(n,r,i){for(var o=-1,l=n.criteria,u=r.criteria,f=l.length,h=i.length;++o<f;){var y=e(l[o],u[o]);if(y){if(o>=h)return y;var m=i[o];return y*(m=="desc"?-1:1)}}return n.index-r.index}return u0=t,u0}var f0,F2;function q9(){if(F2)return f0;F2=1;var e=KS(),t=QS(),n=Hi(),r=tP(),i=L9(),o=VI(),l=$9(),u=Cl(),f=Zn();function h(y,m,g){m.length?m=e(m,function(w){return f(w)?function(x){return t(x,w.length===1?w[0]:w)}:w}):m=[u];var S=-1;m=e(m,o(n));var T=r(y,function(w,x,O){var E=e(m,function(N){return N(w)});return{criteria:E,index:++S,value:w}});return i(T,function(w,x){return l(w,x,g)})}return f0=h,f0}var d0,G2;function V9(){if(G2)return d0;G2=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return d0=e,d0}var h0,H2;function F9(){if(H2)return h0;H2=1;var e=V9(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,u=-1,f=t(l.length-i,0),h=Array(f);++u<f;)h[u]=l[i+u];u=-1;for(var y=Array(i+1);++u<i;)y[u]=l[u];return y[i]=o(h),e(r,this,y)}}return h0=n,h0}var p0,W2;function G9(){if(W2)return p0;W2=1;function e(t){return function(){return t}}return p0=e,p0}var m0,Y2;function nP(){if(Y2)return m0;Y2=1;var e=Ls(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return m0=t,m0}var y0,X2;function H9(){if(X2)return y0;X2=1;var e=G9(),t=nP(),n=Cl(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return y0=r,y0}var v0,K2;function W9(){if(K2)return v0;K2=1;var e=800,t=16,n=Date.now;function r(i){var o=0,l=0;return function(){var u=n(),f=t-(u-l);if(l=u,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return v0=r,v0}var g0,Q2;function Y9(){if(Q2)return g0;Q2=1;var e=H9(),t=W9(),n=t(e);return g0=n,g0}var b0,J2;function X9(){if(J2)return b0;J2=1;var e=Cl(),t=F9(),n=Y9();function r(i,o){return n(t(i,o,e),i+"")}return b0=r,b0}var x0,Z2;function Ap(){if(Z2)return x0;Z2=1;var e=WS(),t=Vu(),n=ow(),r=Gi();function i(o,l,u){if(!r(u))return!1;var f=typeof l;return(f=="number"?t(u)&&n(l,u.length):f=="string"&&l in u)?e(u[l],o):!1}return x0=i,x0}var S0,ek;function K9(){if(ek)return S0;ek=1;var e=ZI(),t=q9(),n=X9(),r=Ap(),i=n(function(o,l){if(o==null)return[];var u=l.length;return u>1&&r(o,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return S0=i,S0}var Q9=K9();const fw=Tt(Q9);function su(e){"@babel/helpers - typeof";return su=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},su(e)}function l1(){return l1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l1.apply(this,arguments)}function J9(e,t){return nF(e)||tF(e,t)||eF(e,t)||Z9()}function Z9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
398
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eF(e,t){if(e){if(typeof e=="string")return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}function tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function nF(e){if(Array.isArray(e))return e}function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function w0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nk(Object(n),!0).forEach(function(r){rF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rF(e,t,n){return t=aF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aF(e){var t=iF(e,"string");return su(t)=="symbol"?t:t+""}function iF(e,t){if(su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sF(e){return Array.isArray(e)&&nn(e[0])&&nn(e[1])?e.join(" ~ "):e}var oF=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,l=t.itemStyle,u=l===void 0?{}:l,f=t.labelStyle,h=f===void 0?{}:f,y=t.payload,m=t.formatter,g=t.itemSorter,S=t.wrapperClassName,T=t.labelClassName,w=t.label,x=t.labelFormatter,O=t.accessibilityLayer,E=O===void 0?!1:O,N=function(){if(y&&y.length){var P={padding:0,margin:0},H=(g?fw(y,g):y).map(function(F,K){if(F.type==="none")return null;var B=w0({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},u),D=F.formatter||m||sF,Q=F.value,se=F.name,ce=Q,U=se;if(D&&ce!=null&&U!=null){var Y=D(Q,se,F,K,y);if(Array.isArray(Y)){var ae=J9(Y,2);ce=ae[0],U=ae[1]}else ce=Y}return W.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:B},nn(U)?W.createElement("span",{className:"recharts-tooltip-item-name"},U):null,nn(U)?W.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,W.createElement("span",{className:"recharts-tooltip-item-value"},ce),W.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return W.createElement("ul",{className:"recharts-tooltip-item-list",style:P},H)}return null},k=w0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),A=w0({margin:0},h),_=!Le(w),C=_?w:"",I=Xe("recharts-default-tooltip",S),q=Xe("recharts-tooltip-label",T);_&&x&&y!==void 0&&y!==null&&(C=x(w,y));var G=E?{role:"status","aria-live":"assertive"}:{};return W.createElement("div",l1({className:I,style:k},G),W.createElement("p",{className:q,style:A},W.isValidElement(C)?C:"".concat(C)),N())};function ou(e){"@babel/helpers - typeof";return ou=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},ou(e)}function wd(e,t,n){return t=lF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lF(e){var t=cF(e,"string");return ou(t)=="symbol"?t:t+""}function cF(e,t){if(ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mc="recharts-tooltip-wrapper",uF={visibility:"hidden"};function fF(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Xe(Mc,wd(wd(wd(wd({},"".concat(Mc,"-right"),pe(n)&&t&&pe(t.x)&&n>=t.x),"".concat(Mc,"-left"),pe(n)&&t&&pe(t.x)&&n<t.x),"".concat(Mc,"-bottom"),pe(r)&&t&&pe(t.y)&&r>=t.y),"".concat(Mc,"-top"),pe(r)&&t&&pe(t.y)&&r<t.y))}function rk(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&pe(o[r]))return o[r];var y=n[r]-u-i,m=n[r]+i;if(t[r])return l[r]?y:m;if(l[r]){var g=y,S=f[r];return g<S?Math.max(m,f[r]):Math.max(y,f[r])}var T=m+u,w=f[r]+h;return T>w?Math.max(y,f[r]):Math.max(m,f[r])}function dF(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function hF(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox,h,y,m;return l.height>0&&l.width>0&&n?(y=rk({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),m=rk({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=dF({translateX:y,translateY:m,useTranslate3d:u})):h=uF,{cssProperties:h,cssClasses:fF({translateX:y,translateY:m,coordinate:n})}}function al(e){"@babel/helpers - typeof";return al=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},al(e)}function ak(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ak(Object(n),!0).forEach(function(r){u1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ak(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aP(r.key),r)}}function yF(e,t,n){return t&&mF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vF(e,t,n){return t=ah(t),gF(e,rP()?Reflect.construct(t,n||[],ah(e).constructor):t.apply(e,n))}function gF(e,t){if(t&&(al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bF(e)}function bF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rP=function(){return!!e})()}function ah(e){return ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ah(e)}function xF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c1(e,t)}function c1(e,t){return c1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},c1(e,t)}function u1(e,t,n){return t=aP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aP(e){var t=SF(e,"string");return al(t)=="symbol"?t:t+""}function SF(e,t){if(al(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(al(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sk=1,wF=(function(e){function t(){var n;pF(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=vF(this,t,[].concat(i)),u1(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),u1(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,f,h,y;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&u!==void 0?u:0,y:(h=(y=n.props.coordinate)===null||y===void 0?void 0:y.y)!==null&&h!==void 0?h:0}})}}),n}return xF(t,e),yF(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>sk||Math.abs(r.height-this.state.lastBoundingBox.height)>sk)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,h=i.children,y=i.coordinate,m=i.hasPayload,g=i.isAnimationActive,S=i.offset,T=i.position,w=i.reverseDirection,x=i.useTranslate3d,O=i.viewBox,E=i.wrapperStyle,N=hF({allowEscapeViewBox:l,coordinate:y,offsetTopLeft:S,position:T,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:O}),k=N.cssClasses,A=N.cssProperties,_=ik(ik({transition:g&&o?"transform ".concat(u,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&m?"visible":"hidden",position:"absolute",top:0,left:0},E);return W.createElement("div",{tabIndex:-1,className:k,style:_,ref:function(I){r.wrapperNode=I}},h)}}])})(z.PureComponent),TF=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},zs={isSsr:TF()};function il(e){"@babel/helpers - typeof";return il=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},il(e)}function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ok(Object(n),!0).forEach(function(r){dw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ok(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sP(r.key),r)}}function AF(e,t,n){return t&&jF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EF(e,t,n){return t=ih(t),_F(e,iP()?Reflect.construct(t,n||[],ih(e).constructor):t.apply(e,n))}function _F(e,t){if(t&&(il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NF(e)}function NF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iP=function(){return!!e})()}function ih(e){return ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ih(e)}function kF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f1(e,t)}function f1(e,t){return f1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},f1(e,t)}function dw(e,t,n){return t=sP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sP(e){var t=CF(e,"string");return il(t)=="symbol"?t:t+""}function CF(e,t){if(il(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(il(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MF(e){return e.dataKey}function DF(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(oF,t)}var Fa=(function(e){function t(){return OF(this,t),EF(this,t,arguments)}return kF(t,e),AF(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,h=i.content,y=i.coordinate,m=i.filterNull,g=i.isAnimationActive,S=i.offset,T=i.payload,w=i.payloadUniqBy,x=i.position,O=i.reverseDirection,E=i.useTranslate3d,N=i.viewBox,k=i.wrapperStyle,A=T??[];m&&A.length&&(A=KI(T.filter(function(C){return C.value!=null&&(C.hide!==!0||r.props.includeHidden)}),w,MF));var _=A.length>0;return W.createElement(wF,{allowEscapeViewBox:l,animationDuration:u,animationEasing:f,isAnimationActive:g,active:o,coordinate:y,hasPayload:_,offset:S,position:x,reverseDirection:O,useTranslate3d:E,viewBox:N,wrapperStyle:k},DF(h,lk(lk({},this.props),{},{payload:A})))}}])})(z.PureComponent);dw(Fa,"displayName","Tooltip");dw(Fa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!zs.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 T0,ck;function RF(){if(ck)return T0;ck=1;var e=va(),t=function(){return e.Date.now()};return T0=t,T0}var O0,uk;function IF(){if(uk)return O0;uk=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return O0=t,O0}var j0,fk;function PF(){if(fk)return j0;fk=1;var e=IF(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return j0=n,j0}var A0,dk;function oP(){if(dk)return A0;dk=1;var e=PF(),t=Gi(),n=El(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var y=typeof h.valueOf=="function"?h.valueOf():h;h=t(y)?y+"":y}if(typeof h!="string")return h===0?h:+h;h=e(h);var m=o.test(h);return m||l.test(h)?u(h.slice(2),m?2:8):i.test(h)?r:+h}return A0=f,A0}var E0,hk;function BF(){if(hk)return E0;hk=1;var e=Gi(),t=RF(),n=oP(),r="Expected a function",i=Math.max,o=Math.min;function l(u,f,h){var y,m,g,S,T,w,x=0,O=!1,E=!1,N=!0;if(typeof u!="function")throw new TypeError(r);f=n(f)||0,e(h)&&(O=!!h.leading,E="maxWait"in h,g=E?i(n(h.maxWait)||0,f):g,N="trailing"in h?!!h.trailing:N);function k(H){var F=y,K=m;return y=m=void 0,x=H,S=u.apply(K,F),S}function A(H){return x=H,T=setTimeout(I,f),O?k(H):S}function _(H){var F=H-w,K=H-x,B=f-F;return E?o(B,g-K):B}function C(H){var F=H-w,K=H-x;return w===void 0||F>=f||F<0||E&&K>=g}function I(){var H=t();if(C(H))return q(H);T=setTimeout(I,_(H))}function q(H){return T=void 0,N&&y?k(H):(y=m=void 0,S)}function G(){T!==void 0&&clearTimeout(T),x=0,y=w=m=T=void 0}function L(){return T===void 0?S:q(t())}function P(){var H=t(),F=C(H);if(y=arguments,m=this,w=H,F){if(T===void 0)return A(w);if(E)return clearTimeout(T),T=setTimeout(I,f),k(w)}return T===void 0&&(T=setTimeout(I,f)),S}return P.cancel=G,P.flush=L,P}return E0=l,E0}var _0,pk;function UF(){if(pk)return _0;pk=1;var e=BF(),t=Gi(),n="Expected a function";function r(i,o,l){var u=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,f="trailing"in l?!!l.trailing:f),e(i,o,{leading:u,maxWait:o,trailing:f})}return _0=r,_0}var LF=UF();const lP=Tt(LF);function lu(e){"@babel/helpers - typeof";return lu=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},lu(e)}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Td(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mk(Object(n),!0).forEach(function(r){zF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zF(e,t,n){return t=$F(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $F(e){var t=qF(e,"string");return lu(t)=="symbol"?t:t+""}function qF(e,t){if(lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VF(e,t){return WF(e)||HF(e,t)||GF(e,t)||FF()}function FF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
399
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GF(e,t){if(e){if(typeof e=="string")return yk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yk(e,t)}}function yk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function WF(e){if(Array.isArray(e))return e}var YF=z.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,u=e.height,f=u===void 0?"100%":u,h=e.minWidth,y=h===void 0?0:h,m=e.minHeight,g=e.maxHeight,S=e.children,T=e.debounce,w=T===void 0?0:T,x=e.id,O=e.className,E=e.onResize,N=e.style,k=N===void 0?{}:N,A=z.useRef(null),_=z.useRef();_.current=E,z.useImperativeHandle(t,function(){return Object.defineProperty(A.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),A.current},configurable:!0})});var C=z.useState({containerWidth:i.width,containerHeight:i.height}),I=VF(C,2),q=I[0],G=I[1],L=z.useCallback(function(H,F){G(function(K){var B=Math.round(H),D=Math.round(F);return K.containerWidth===B&&K.containerHeight===D?K:{containerWidth:B,containerHeight:D}})},[]);z.useEffect(function(){var H=function(se){var ce,U=se[0].contentRect,Y=U.width,ae=U.height;L(Y,ae),(ce=_.current)===null||ce===void 0||ce.call(_,Y,ae)};w>0&&(H=lP(H,w,{trailing:!0,leading:!1}));var F=new ResizeObserver(H),K=A.current.getBoundingClientRect(),B=K.width,D=K.height;return L(B,D),F.observe(A.current),function(){F.disconnect()}},[L,w]);var P=z.useMemo(function(){var H=q.containerWidth,F=q.containerHeight;if(H<0||F<0)return null;As(Ss(l)||Ss(f),`The width(%s) and height(%s) are both fixed numbers,
|
|
400
|
+
maybe you don't need to use a ResponsiveContainer.`,l,f),As(!n||n>0,"The aspect(%s) must be greater than zero.",n);var K=Ss(l)?H:l,B=Ss(f)?F:f;n&&n>0&&(K?B=K/n:B&&(K=B*n),g&&B>g&&(B=g)),As(K>0||B>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
401
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
402
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
403
|
+
height and width.`,K,B,l,f,y,m,n);var D=!Array.isArray(S)&&Ya(S.type).endsWith("Chart");return W.Children.map(S,function(Q){return W.isValidElement(Q)?z.cloneElement(Q,Td({width:K,height:B},D?{style:Td({height:"100%",width:"100%",maxHeight:B,maxWidth:K},Q.props.style)}:{})):Q})},[n,S,f,g,m,y,q,l]);return W.createElement("div",{id:x?"".concat(x):void 0,className:Xe("recharts-responsive-container",O),style:Td(Td({},k),{},{width:l,height:f,minWidth:y,minHeight:m,maxHeight:g}),ref:A},P)}),cP=function(t){return null};cP.displayName="Cell";function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function d1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(n),!0).forEach(function(r){XF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XF(e,t,n){return t=KF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KF(e){var t=QF(e,"string");return cu(t)=="symbol"?t:t+""}function QF(e,t){if(cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Co={widthCache:{},cacheCount:0},JF=2e3,ZF={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gk="recharts_measurement_span";function eG(e){var t=d1({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Gc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||zs.isSsr)return{width:0,height:0};var r=eG(n),i=JSON.stringify({text:t,copyStyle:r});if(Co.widthCache[i])return Co.widthCache[i];try{var o=document.getElementById(gk);o||(o=document.createElement("span"),o.setAttribute("id",gk),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=d1(d1({},ZF),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),f={width:u.width,height:u.height};return Co.widthCache[i]=f,++Co.cacheCount>JF&&(Co.cacheCount=0,Co.widthCache={}),f}catch{return{width:0,height:0}}},tG=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function uu(e){"@babel/helpers - typeof";return uu=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},uu(e)}function sh(e,t){return iG(e)||aG(e,t)||rG(e,t)||nG()}function nG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
404
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rG(e,t){if(e){if(typeof e=="string")return bk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bk(e,t)}}function bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function iG(e){if(Array.isArray(e))return e}function sG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lG(r.key),r)}}function oG(e,t,n){return t&&xk(e.prototype,t),n&&xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lG(e){var t=cG(e,"string");return uu(t)=="symbol"?t:t+""}function cG(e,t){if(uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Sk=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wk=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uG=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,fG=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,uP={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},dG=Object.keys(uP),zo="NaN";function hG(e,t){return e*uP[t]}var Od=(function(){function e(t,n){sG(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!uG.test(n)&&(this.num=NaN,this.unit=""),dG.includes(n)&&(this.num=hG(t,n),this.unit="px")}return oG(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=fG.exec(n))!==null&&r!==void 0?r:[],o=sh(i,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function fP(e){if(e.includes(zo))return zo;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=Sk.exec(t))!==null&&n!==void 0?n:[],i=sh(r,4),o=i[1],l=i[2],u=i[3],f=Od.parse(o??""),h=Od.parse(u??""),y=l==="*"?f.multiply(h):f.divide(h);if(y.isNaN())return zo;t=t.replace(Sk,y.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,g=(m=wk.exec(t))!==null&&m!==void 0?m:[],S=sh(g,4),T=S[1],w=S[2],x=S[3],O=Od.parse(T??""),E=Od.parse(x??""),N=w==="+"?O.add(E):O.subtract(E);if(N.isNaN())return zo;t=t.replace(wk,N.toString())}return t}var Tk=/\(([^()]*)\)/;function pG(e){for(var t=e;t.includes("(");){var n=Tk.exec(t),r=sh(n,2),i=r[1];t=t.replace(Tk,fP(i))}return t}function mG(e){var t=e.replace(/\s+/g,"");return t=pG(t),t=fP(t),t}function yG(e){try{return mG(e)}catch{return zo}}function N0(e){var t=yG(e.slice(5,-1));return t===zo?"":t}var vG=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],gG=["dx","dy","angle","className","breakAll"];function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h1.apply(this,arguments)}function Ok(e,t){if(e==null)return{};var n=bG(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jk(e,t){return TG(e)||wG(e,t)||SG(e,t)||xG()}function xG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
405
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SG(e,t){if(e){if(typeof e=="string")return Ak(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ak(e,t)}}function Ak(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function TG(e){if(Array.isArray(e))return e}var dP=/[ \f\n\r\t\v\u2028\u2029]+/,hP=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Le(n)||(r?o=n.toString().split(""):o=n.toString().split(dP));var l=o.map(function(f){return{word:f,width:Gc(f,i).width}}),u=r?0:Gc(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},OG=function(t,n,r,i,o){var l=t.maxLines,u=t.children,f=t.style,h=t.breakAll,y=pe(l),m=u,g=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(B,D){var Q=D.word,se=D.width,ce=B[B.length-1];if(ce&&(i==null||o||ce.width+se+r<Number(i)))ce.words.push(Q),ce.width+=se+r;else{var U={words:[Q],width:se};B.push(U)}return B},[])},S=g(n),T=function(K){return K.reduce(function(B,D){return B.width>D.width?B:D})};if(!y)return S;for(var w="…",x=function(K){var B=m.slice(0,K),D=hP({breakAll:h,style:f,children:B+w}).wordsWithComputedWidth,Q=g(D),se=Q.length>l||T(Q).width>Number(i);return[se,Q]},O=0,E=m.length-1,N=0,k;O<=E&&N<=m.length-1;){var A=Math.floor((O+E)/2),_=A-1,C=x(_),I=jk(C,2),q=I[0],G=I[1],L=x(A),P=jk(L,1),H=P[0];if(!q&&!H&&(O=A+1),q&&H&&(E=A-1),!q&&H){k=G;break}N++}return k||S},Ek=function(t){var n=Le(t)?[]:t.toString().split(dP);return[{words:n}]},jG=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!zs.isSsr){var f,h,y=hP({breakAll:l,children:i,style:o});if(y){var m=y.wordsWithComputedWidth,g=y.spaceWidth;f=m,h=g}else return Ek(i);return OG({breakAll:l,children:i,maxLines:u,style:o},f,h,n,r)}return Ek(i)},_k="#808080",oh=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.lineHeight,u=l===void 0?"1em":l,f=t.capHeight,h=f===void 0?"0.71em":f,y=t.scaleToFit,m=y===void 0?!1:y,g=t.textAnchor,S=g===void 0?"start":g,T=t.verticalAnchor,w=T===void 0?"end":T,x=t.fill,O=x===void 0?_k:x,E=Ok(t,vG),N=z.useMemo(function(){return jG({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:m,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,m,E.style,E.width]),k=E.dx,A=E.dy,_=E.angle,C=E.className,I=E.breakAll,q=Ok(E,gG);if(!nn(r)||!nn(o))return null;var G=r+(pe(k)?k:0),L=o+(pe(A)?A:0),P;switch(w){case"start":P=N0("calc(".concat(h,")"));break;case"middle":P=N0("calc(".concat((N.length-1)/2," * -").concat(u," + (").concat(h," / 2))"));break;default:P=N0("calc(".concat(N.length-1," * -").concat(u,")"));break}var H=[];if(m){var F=N[0].width,K=E.width;H.push("scale(".concat((pe(K)?K/F:1)/F,")"))}return _&&H.push("rotate(".concat(_,", ").concat(G,", ").concat(L,")")),H.length&&(q.transform=H.join(" ")),W.createElement("text",h1({},Be(q,!0),{x:G,y:L,className:Xe("recharts-text",C),textAnchor:S,fill:O.includes("url")?_k:O}),N.map(function(B,D){var Q=B.words.join(I?"":" ");return W.createElement("tspan",{x:G,dy:D===0?P:u,key:"".concat(Q,"-").concat(D)},Q)}))};function Vi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function AG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hw(e){let t,n,r;e.length!==2?(t=Vi,n=(u,f)=>Vi(e(u),f),r=(u,f)=>e(u)-f):(t=e===Vi||e===AG?e:EG,n=e,r=e);function i(u,f,h=0,y=u.length){if(h<y){if(t(f,f)!==0)return y;do{const m=h+y>>>1;n(u[m],f)<0?h=m+1:y=m}while(h<y)}return h}function o(u,f,h=0,y=u.length){if(h<y){if(t(f,f)!==0)return y;do{const m=h+y>>>1;n(u[m],f)<=0?h=m+1:y=m}while(h<y)}return h}function l(u,f,h=0,y=u.length){const m=i(u,f,h,y-1);return m>h&&r(u[m-1],f)>-r(u[m],f)?m-1:m}return{left:i,center:l,right:o}}function EG(){return 0}function pP(e){return e===null?NaN:+e}function*_G(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const NG=hw(Vi),Fu=NG.right;hw(pP).center;class Nk extends Map{constructor(t,n=MG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(kk(this,t))}has(t){return super.has(kk(this,t))}set(t,n){return super.set(kG(this,t),n)}delete(t){return super.delete(CG(this,t))}}function kk({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function kG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function CG({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function MG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function DG(e=Vi){if(e===Vi)return mP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function mP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const RG=Math.sqrt(50),IG=Math.sqrt(10),PG=Math.sqrt(2);function lh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=RG?10:o>=IG?5:o>=PG?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/l,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=n&&n<2?lh(e,t,n*2):[u,f,h]}function p1(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?lh(t,e,n):lh(e,t,n);if(!(o>=i))return[];const u=o-i+1,f=new Array(u);if(r)if(l<0)for(let h=0;h<u;++h)f[h]=(o-h)/-l;else for(let h=0;h<u;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<u;++h)f[h]=(i+h)/-l;else for(let h=0;h<u;++h)f[h]=(i+h)*l;return f}function m1(e,t,n){return t=+t,e=+e,n=+n,lh(e,t,n)[2]}function y1(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?m1(t,e,n):m1(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Ck(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Mk(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function yP(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?mP:DG(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,y=Math.log(f),m=.5*Math.exp(2*y/3),g=.5*Math.sqrt(y*m*(f-m)/f)*(h-f/2<0?-1:1),S=Math.max(n,Math.floor(t-h*m/f+g)),T=Math.min(r,Math.floor(t+(f-h)*m/f+g));yP(e,t,S,T,i)}const o=e[t];let l=n,u=r;for(Dc(e,n,t),i(e[r],o)>0&&Dc(e,n,r);l<u;){for(Dc(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?Dc(e,n,u):(++u,Dc(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Dc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function BG(e,t,n){if(e=Float64Array.from(_G(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Mk(e);if(t>=1)return Ck(e);var r,i=(r-1)*t,o=Math.floor(i),l=Ck(yP(e,o).subarray(0,o+1)),u=Mk(e.subarray(o+1));return l+(u-l)*(i-o)}}function UG(e,t,n=pP){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function LG(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Ur(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ii(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const v1=Symbol("implicit");function pw(){var e=new Nk,t=[],n=[],r=v1;function i(o){let l=e.get(o);if(l===void 0){if(r!==v1)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Nk;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return pw(t,n).unknown(r)},Ur.apply(i,arguments),i}function fu(){var e=pw().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,f=0,h=0,y=.5;delete e.unknown;function m(){var g=t().length,S=i<r,T=S?i:r,w=S?r:i;o=(w-T)/Math.max(1,g-f+h*2),u&&(o=Math.floor(o)),T+=(w-T-o*(g-f))*y,l=o*(1-f),u&&(T=Math.round(T),l=Math.round(l));var x=LG(g).map(function(O){return T+o*O});return n(S?x.reverse():x)}return e.domain=function(g){return arguments.length?(t(g),m()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,m()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,u=!0,m()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(u=!!g,m()):u},e.padding=function(g){return arguments.length?(f=Math.min(1,h=+g),m()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),m()):f},e.paddingOuter=function(g){return arguments.length?(h=+g,m()):h},e.align=function(g){return arguments.length?(y=Math.max(0,Math.min(1,g)),m()):y},e.copy=function(){return fu(t(),[r,i]).round(u).paddingInner(f).paddingOuter(h).align(y)},Ur.apply(m(),arguments)}function vP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vP(t())},e}function Hc(){return vP(fu.apply(null,arguments).paddingInner(1))}function mw(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gP(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gu(){}var du=.7,ch=1/du,Wo="\\s*([+-]?\\d+)\\s*",hu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zG=/^#([0-9a-f]{3,8})$/,$G=new RegExp(`^rgb\\(${Wo},${Wo},${Wo}\\)$`),qG=new RegExp(`^rgb\\(${fa},${fa},${fa}\\)$`),VG=new RegExp(`^rgba\\(${Wo},${Wo},${Wo},${hu}\\)$`),FG=new RegExp(`^rgba\\(${fa},${fa},${fa},${hu}\\)$`),GG=new RegExp(`^hsl\\(${hu},${fa},${fa}\\)$`),HG=new RegExp(`^hsla\\(${hu},${fa},${fa},${hu}\\)$`),Dk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mw(Gu,pu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Rk,formatHex:Rk,formatHex8:WG,formatHsl:YG,formatRgb:Ik,toString:Ik});function Rk(){return this.rgb().formatHex()}function WG(){return this.rgb().formatHex8()}function YG(){return bP(this).formatHsl()}function Ik(){return this.rgb().formatRgb()}function pu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zG.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Pk(t):n===3?new Yn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?jd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?jd(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=$G.exec(e))?new Yn(t[1],t[2],t[3],1):(t=qG.exec(e))?new Yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VG.exec(e))?jd(t[1],t[2],t[3],t[4]):(t=FG.exec(e))?jd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GG.exec(e))?Lk(t[1],t[2]/100,t[3]/100,1):(t=HG.exec(e))?Lk(t[1],t[2]/100,t[3]/100,t[4]):Dk.hasOwnProperty(e)?Pk(Dk[e]):e==="transparent"?new Yn(NaN,NaN,NaN,0):null}function Pk(e){return new Yn(e>>16&255,e>>8&255,e&255,1)}function jd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yn(e,t,n,r)}function XG(e){return e instanceof Gu||(e=pu(e)),e?(e=e.rgb(),new Yn(e.r,e.g,e.b,e.opacity)):new Yn}function g1(e,t,n,r){return arguments.length===1?XG(e):new Yn(e,t,n,r??1)}function Yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}mw(Yn,g1,gP(Gu,{brighter(e){return e=e==null?ch:Math.pow(ch,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?du:Math.pow(du,e),new Yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yn(Es(this.r),Es(this.g),Es(this.b),uh(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:Bk,formatHex:Bk,formatHex8:KG,formatRgb:Uk,toString:Uk}));function Bk(){return`#${ws(this.r)}${ws(this.g)}${ws(this.b)}`}function KG(){return`#${ws(this.r)}${ws(this.g)}${ws(this.b)}${ws((isNaN(this.opacity)?1:this.opacity)*255)}`}function Uk(){const e=uh(this.opacity);return`${e===1?"rgb(":"rgba("}${Es(this.r)}, ${Es(this.g)}, ${Es(this.b)}${e===1?")":`, ${e})`}`}function uh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Es(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ws(e){return e=Es(e),(e<16?"0":"")+e.toString(16)}function Lk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Yr(e,t,n,r)}function bP(e){if(e instanceof Yr)return new Yr(e.h,e.s,e.l,e.opacity);if(e instanceof Gu||(e=pu(e)),!e)return new Yr;if(e instanceof Yr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-i,f=(o+i)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=f<.5?o+i:2-o-i,l*=60):u=f>0&&f<1?0:l,new Yr(l,u,f,e.opacity)}function QG(e,t,n,r){return arguments.length===1?bP(e):new Yr(e,t,n,r??1)}function Yr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}mw(Yr,QG,gP(Gu,{brighter(e){return e=e==null?ch:Math.pow(ch,e),new Yr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?du:Math.pow(du,e),new Yr(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yn(k0(e>=240?e-240:e+120,i,r),k0(e,i,r),k0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Yr(zk(this.h),Ad(this.s),Ad(this.l),uh(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(){const e=uh(this.opacity);return`${e===1?"hsl(":"hsla("}${zk(this.h)}, ${Ad(this.s)*100}%, ${Ad(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zk(e){return e=(e||0)%360,e<0?e+360:e}function Ad(e){return Math.max(0,Math.min(1,e||0))}function k0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const yw=e=>()=>e;function JG(e,t){return function(n){return e+n*t}}function ZG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function e7(e){return(e=+e)==1?xP:function(t,n){return n-t?ZG(t,n,e):yw(isNaN(t)?n:t)}}function xP(e,t){var n=t-e;return n?JG(e,n):yw(isNaN(e)?t:e)}const $k=(function e(t){var n=e7(t);function r(i,o){var l=n((i=g1(i)).r,(o=g1(o)).r),u=n(i.g,o.g),f=n(i.b,o.b),h=xP(i.opacity,o.opacity);return function(y){return i.r=l(y),i.g=u(y),i.b=f(y),i.opacity=h(y),i+""}}return r.gamma=e,r})(1);function t7(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function n7(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function r7(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=Ml(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=i[l](u);return o}}function a7(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function i7(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ml(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var b1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,C0=new RegExp(b1.source,"g");function s7(e){return function(){return e}}function o7(e){return function(t){return e(t)+""}}function l7(e,t){var n=b1.lastIndex=C0.lastIndex=0,r,i,o,l=-1,u=[],f=[];for(e=e+"",t=t+"";(r=b1.exec(e))&&(i=C0.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,f.push({i:l,x:fh(r,i)})),n=C0.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?f[0]?o7(f[0].x):s7(t):(t=f.length,function(h){for(var y=0,m;y<t;++y)u[(m=f[y]).i]=m.x(h);return u.join("")})}function Ml(e,t){var n=typeof t,r;return t==null||n==="boolean"?yw(t):(n==="number"?fh:n==="string"?(r=pu(t))?(t=r,$k):l7:t instanceof pu?$k:t instanceof Date?a7:n7(t)?t7:Array.isArray(t)?r7:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?i7:fh)(e,t)}function vw(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function c7(e,t){t===void 0&&(t=e,e=Ml);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function u7(e){return function(){return e}}function dh(e){return+e}var qk=[0,1];function In(e){return e}function x1(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:u7(isNaN(t)?NaN:.5)}function f7(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function d7(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=x1(i,r),o=n(l,o)):(r=x1(r,i),o=n(o,l)),function(u){return o(r(u))}}function h7(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=x1(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var f=Fu(e,u,1,r)-1;return o[f](i[f](u))}}function Hu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ep(){var e=qk,t=qk,n=Ml,r,i,o,l=In,u,f,h;function y(){var g=Math.min(e.length,t.length);return l!==In&&(l=f7(e[0],e[g-1])),u=g>2?h7:d7,f=h=null,m}function m(g){return g==null||isNaN(g=+g)?o:(f||(f=u(e.map(r),t,n)))(r(l(g)))}return m.invert=function(g){return l(i((h||(h=u(t,e.map(r),fh)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,dh),y()):e.slice()},m.range=function(g){return arguments.length?(t=Array.from(g),y()):t.slice()},m.rangeRound=function(g){return t=Array.from(g),n=vw,y()},m.clamp=function(g){return arguments.length?(l=g?!0:In,y()):l!==In},m.interpolate=function(g){return arguments.length?(n=g,y()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,S){return r=g,i=S,y()}}function gw(){return Ep()(In,In)}function p7(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hh(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function sl(e){return e=hh(Math.abs(e)),e?e[1]:NaN}function m7(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>r&&(u=Math.max(1,r-f)),o.push(n.substring(i-=u,i+u)),!((f+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function y7(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var v7=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mu(e){if(!(t=v7.exec(e)))throw new Error("invalid format: "+e);var t;return new bw({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]})}mu.prototype=bw.prototype;function bw(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+""}bw.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 g7(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var ph;function b7(e,t){var n=hh(e,t);if(!n)return ph=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(ph=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+hh(e,Math.max(0,t+o-1))[0]}function Vk(e,t){var n=hh(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Fk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:p7,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)=>Vk(e*100,t),r:Vk,s:b7,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gk(e){return e}var Hk=Array.prototype.map,Wk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function x7(e){var t=e.grouping===void 0||e.thousands===void 0?Gk:m7(Hk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Gk:y7(Hk.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(m,g){m=mu(m);var S=m.fill,T=m.align,w=m.sign,x=m.symbol,O=m.zero,E=m.width,N=m.comma,k=m.precision,A=m.trim,_=m.type;_==="n"?(N=!0,_="g"):Fk[_]||(k===void 0&&(k=12),A=!0,_="g"),(O||S==="0"&&T==="=")&&(O=!0,S="0",T="=");var C=(g&&g.prefix!==void 0?g.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),I=(x==="$"?r:/[%p]/.test(_)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),q=Fk[_],G=/[defgprs%]/.test(_);k=k===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function L(P){var H=C,F=I,K,B,D;if(_==="c")F=q(P)+F,P="";else{P=+P;var Q=P<0||1/P<0;if(P=isNaN(P)?f:q(Math.abs(P),k),A&&(P=g7(P)),Q&&+P==0&&w!=="+"&&(Q=!1),H=(Q?w==="("?w:u:w==="-"||w==="("?"":w)+H,F=(_==="s"&&!isNaN(P)&&ph!==void 0?Wk[8+ph/3]:"")+F+(Q&&w==="("?")":""),G){for(K=-1,B=P.length;++K<B;)if(D=P.charCodeAt(K),48>D||D>57){F=(D===46?i+P.slice(K+1):P.slice(K))+F,P=P.slice(0,K);break}}}N&&!O&&(P=t(P,1/0));var se=H.length+P.length+F.length,ce=se<E?new Array(E-se+1).join(S):"";switch(N&&O&&(P=t(ce+P,ce.length?E-F.length:1/0),ce=""),T){case"<":P=H+P+F+ce;break;case"=":P=H+ce+P+F;break;case"^":P=ce.slice(0,se=ce.length>>1)+H+P+F+ce.slice(se);break;default:P=ce+H+P+F;break}return o(P)}return L.toString=function(){return m+""},L}function y(m,g){var S=Math.max(-8,Math.min(8,Math.floor(sl(g)/3)))*3,T=Math.pow(10,-S),w=h((m=mu(m),m.type="f",m),{suffix:Wk[8+S/3]});return function(x){return w(T*x)}}return{format:h,formatPrefix:y}}var Ed,xw,SP;S7({thousands:",",grouping:[3],currency:["$",""]});function S7(e){return Ed=x7(e),xw=Ed.format,SP=Ed.formatPrefix,Ed}function w7(e){return Math.max(0,-sl(Math.abs(e)))}function T7(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(sl(t)/3)))*3-sl(Math.abs(e)))}function O7(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,sl(t)-sl(e))+1}function wP(e,t,n,r){var i=y1(e,t,n),o;switch(r=mu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=T7(i,l))&&(r.precision=o),SP(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=O7(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=w7(i))&&(r.precision=o-(r.type==="%")*2);break}}return xw(r)}function Wi(e){var t=e.domain;return e.ticks=function(n){var r=t();return p1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return wP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],u=r[o],f,h,y=10;for(u<l&&(h=l,l=u,u=h,h=i,i=o,o=h);y-- >0;){if(h=m1(l,u,n),h===f)return r[i]=l,r[o]=u,t(r);if(h>0)l=Math.floor(l/h)*h,u=Math.ceil(u/h)*h;else if(h<0)l=Math.ceil(l*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function mh(){var e=gw();return e.copy=function(){return Hu(e,mh())},Ur.apply(e,arguments),Wi(e)}function TP(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,dh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return TP(e).unknown(t)},e=arguments.length?Array.from(e,dh):[0,1],Wi(n)}function OP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Yk(e){return Math.log(e)}function Xk(e){return Math.exp(e)}function j7(e){return-Math.log(-e)}function A7(e){return-Math.exp(-e)}function E7(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _7(e){return e===10?E7:e===Math.E?Math.exp:t=>Math.pow(e,t)}function N7(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 Kk(e){return(t,n)=>-e(-t,n)}function Sw(e){const t=e(Yk,Xk),n=t.domain;let r=10,i,o;function l(){return i=N7(r),o=_7(r),n()[0]<0?(i=Kk(i),o=Kk(o),e(j7,A7)):e(Yk,Xk),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const f=n();let h=f[0],y=f[f.length-1];const m=y<h;m&&([h,y]=[y,h]);let g=i(h),S=i(y),T,w;const x=u==null?10:+u;let O=[];if(!(r%1)&&S-g<x){if(g=Math.floor(g),S=Math.ceil(S),h>0){for(;g<=S;++g)for(T=1;T<r;++T)if(w=g<0?T/o(-g):T*o(g),!(w<h)){if(w>y)break;O.push(w)}}else for(;g<=S;++g)for(T=r-1;T>=1;--T)if(w=g>0?T/o(-g):T*o(g),!(w<h)){if(w>y)break;O.push(w)}O.length*2<x&&(O=p1(h,y,x))}else O=p1(g,S,Math.min(S-g,x)).map(o);return m?O.reverse():O},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=mu(f)).precision==null&&(f.trim=!0),f=xw(f)),u===1/0)return f;const h=Math.max(1,r*u/t.ticks().length);return y=>{let m=y/o(Math.round(i(y)));return m*r<r-.5&&(m*=r),m<=h?f(y):""}},t.nice=()=>n(OP(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function jP(){const e=Sw(Ep()).domain([1,10]);return e.copy=()=>Hu(e,jP()).base(e.base()),Ur.apply(e,arguments),e}function Qk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Jk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ww(e){var t=1,n=e(Qk(t),Jk(t));return n.constant=function(r){return arguments.length?e(Qk(t=+r),Jk(t)):t},Wi(n)}function AP(){var e=ww(Ep());return e.copy=function(){return Hu(e,AP()).constant(e.constant())},Ur.apply(e,arguments)}function Zk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function k7(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function C7(e){return e<0?-e*e:e*e}function Tw(e){var t=e(In,In),n=1;function r(){return n===1?e(In,In):n===.5?e(k7,C7):e(Zk(n),Zk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wi(t)}function Ow(){var e=Tw(Ep());return e.copy=function(){return Hu(e,Ow()).exponent(e.exponent())},Ur.apply(e,arguments),e}function M7(){return Ow.apply(null,arguments).exponent(.5)}function eC(e){return Math.sign(e)*e*e}function D7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function EP(){var e=gw(),t=[0,1],n=!1,r;function i(o){var l=D7(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(eC(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,dh)).map(eC)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return EP(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ur.apply(i,arguments),Wi(i)}function _P(){var e=[],t=[],n=[],r;function i(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=UG(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Fu(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Vi),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return _P().domain(e).range(t).unknown(r)},Ur.apply(o,arguments)}function NP(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[Fu(r,f,0,n)]:o}function u(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},l.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,u()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return NP().domain([e,t]).range(i).unknown(o)},Ur.apply(Wi(l),arguments)}function kP(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Fu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return kP().domain(e).range(t).unknown(n)},Ur.apply(i,arguments)}const M0=new Date,D0=new Date;function an(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,u)=>{const f=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<l);return f},i.filter=o=>an(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(M0.setTime(+o),D0.setTime(+l),e(M0),e(D0),Math.floor(n(M0,D0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const yh=an(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?an(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yh);yh.range;const Ha=1e3,Mr=Ha*60,Wa=Mr*60,Ja=Wa*24,jw=Ja*7,tC=Ja*30,R0=Ja*365,Ts=an(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getUTCSeconds());Ts.range;const Aw=an(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ha)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getMinutes());Aw.range;const Ew=an(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mr)},(e,t)=>(t-e)/Mr,e=>e.getUTCMinutes());Ew.range;const _w=an(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ha-e.getMinutes()*Mr)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getHours());_w.range;const Nw=an(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wa)},(e,t)=>(t-e)/Wa,e=>e.getUTCHours());Nw.range;const Wu=an(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mr)/Ja,e=>e.getDate()-1);Wu.range;const _p=an(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ja,e=>e.getUTCDate()-1);_p.range;const CP=an(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ja,e=>Math.floor(e/Ja));CP.range;function $s(e){return an(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Mr)/jw)}const Np=$s(0),vh=$s(1),R7=$s(2),I7=$s(3),ol=$s(4),P7=$s(5),B7=$s(6);Np.range;vh.range;R7.range;I7.range;ol.range;P7.range;B7.range;function qs(e){return an(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/jw)}const kp=qs(0),gh=qs(1),U7=qs(2),L7=qs(3),ll=qs(4),z7=qs(5),$7=qs(6);kp.range;gh.range;U7.range;L7.range;ll.range;z7.range;$7.range;const kw=an(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());kw.range;const Cw=an(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());Cw.range;const Za=an(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());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:an(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Za.range;const ei=an(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());ei.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:an(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ei.range;function MP(e,t,n,r,i,o){const l=[[Ts,1,Ha],[Ts,5,5*Ha],[Ts,15,15*Ha],[Ts,30,30*Ha],[o,1,Mr],[o,5,5*Mr],[o,15,15*Mr],[o,30,30*Mr],[i,1,Wa],[i,3,3*Wa],[i,6,6*Wa],[i,12,12*Wa],[r,1,Ja],[r,2,2*Ja],[n,1,jw],[t,1,tC],[t,3,3*tC],[e,1,R0]];function u(h,y,m){const g=y<h;g&&([h,y]=[y,h]);const S=m&&typeof m.range=="function"?m:f(h,y,m),T=S?S.range(h,+y+1):[];return g?T.reverse():T}function f(h,y,m){const g=Math.abs(y-h)/m,S=hw(([,,x])=>x).right(l,g);if(S===l.length)return e.every(y1(h/R0,y/R0,m));if(S===0)return yh.every(Math.max(y1(h,y,m),1));const[T,w]=l[g/l[S-1][2]<l[S][2]/g?S-1:S];return T.every(w)}return[u,f]}const[q7,V7]=MP(ei,Cw,kp,CP,Nw,Ew),[F7,G7]=MP(Za,kw,Np,Wu,_w,Aw);function I0(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function P0(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Rc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function H7(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,f=e.shortMonths,h=Ic(i),y=Pc(i),m=Ic(o),g=Pc(o),S=Ic(l),T=Pc(l),w=Ic(u),x=Pc(u),O=Ic(f),E=Pc(f),N={a:D,A:Q,b:se,B:ce,c:null,d:oC,e:oC,f:mH,g:jH,G:EH,H:dH,I:hH,j:pH,L:DP,m:yH,M:vH,p:U,q:Y,Q:uC,s:fC,S:gH,u:bH,U:xH,V:SH,w:wH,W:TH,x:null,X:null,y:OH,Y:AH,Z:_H,"%":cC},k={a:ae,A:he,b:Se,B:Ae,c:null,d:lC,e:lC,f:MH,g:qH,G:FH,H:NH,I:kH,j:CH,L:IP,m:DH,M:RH,p:ze,q:nt,Q:uC,s:fC,S:IH,u:PH,U:BH,V:UH,w:LH,W:zH,x:null,X:null,y:$H,Y:VH,Z:GH,"%":cC},A={a:G,A:L,b:P,B:H,c:F,d:iC,e:iC,f:lH,g:aC,G:rC,H:sC,I:sC,j:aH,L:oH,m:rH,M:iH,p:q,q:nH,Q:uH,s:fH,S:sH,u:Q7,U:J7,V:Z7,w:K7,W:eH,x:K,X:B,y:aC,Y:rC,Z:tH,"%":cH};N.x=_(n,N),N.X=_(r,N),N.c=_(t,N),k.x=_(n,k),k.X=_(r,k),k.c=_(t,k);function _(de,Ne){return function(ke){var ue=[],Ot=-1,Re=0,Dt=de.length,Rt,wn,Lr;for(ke instanceof Date||(ke=new Date(+ke));++Ot<Dt;)de.charCodeAt(Ot)===37&&(ue.push(de.slice(Re,Ot)),(wn=nC[Rt=de.charAt(++Ot)])!=null?Rt=de.charAt(++Ot):wn=Rt==="e"?" ":"0",(Lr=Ne[Rt])&&(Rt=Lr(ke,wn)),ue.push(Rt),Re=Ot+1);return ue.push(de.slice(Re,Ot)),ue.join("")}}function C(de,Ne){return function(ke){var ue=Rc(1900,void 0,1),Ot=I(ue,de,ke+="",0),Re,Dt;if(Ot!=ke.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(Ne&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Re=P0(Rc(ue.y,0,1)),Dt=Re.getUTCDay(),Re=Dt>4||Dt===0?gh.ceil(Re):gh(Re),Re=_p.offset(Re,(ue.V-1)*7),ue.y=Re.getUTCFullYear(),ue.m=Re.getUTCMonth(),ue.d=Re.getUTCDate()+(ue.w+6)%7):(Re=I0(Rc(ue.y,0,1)),Dt=Re.getDay(),Re=Dt>4||Dt===0?vh.ceil(Re):vh(Re),Re=Wu.offset(Re,(ue.V-1)*7),ue.y=Re.getFullYear(),ue.m=Re.getMonth(),ue.d=Re.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),Dt="Z"in ue?P0(Rc(ue.y,0,1)).getUTCDay():I0(Rc(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(Dt+5)%7:ue.w+ue.U*7-(Dt+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,P0(ue)):I0(ue)}}function I(de,Ne,ke,ue){for(var Ot=0,Re=Ne.length,Dt=ke.length,Rt,wn;Ot<Re;){if(ue>=Dt)return-1;if(Rt=Ne.charCodeAt(Ot++),Rt===37){if(Rt=Ne.charAt(Ot++),wn=A[Rt in nC?Ne.charAt(Ot++):Rt],!wn||(ue=wn(de,ke,ue))<0)return-1}else if(Rt!=ke.charCodeAt(ue++))return-1}return ue}function q(de,Ne,ke){var ue=h.exec(Ne.slice(ke));return ue?(de.p=y.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function G(de,Ne,ke){var ue=S.exec(Ne.slice(ke));return ue?(de.w=T.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function L(de,Ne,ke){var ue=m.exec(Ne.slice(ke));return ue?(de.w=g.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function P(de,Ne,ke){var ue=O.exec(Ne.slice(ke));return ue?(de.m=E.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function H(de,Ne,ke){var ue=w.exec(Ne.slice(ke));return ue?(de.m=x.get(ue[0].toLowerCase()),ke+ue[0].length):-1}function F(de,Ne,ke){return I(de,t,Ne,ke)}function K(de,Ne,ke){return I(de,n,Ne,ke)}function B(de,Ne,ke){return I(de,r,Ne,ke)}function D(de){return l[de.getDay()]}function Q(de){return o[de.getDay()]}function se(de){return f[de.getMonth()]}function ce(de){return u[de.getMonth()]}function U(de){return i[+(de.getHours()>=12)]}function Y(de){return 1+~~(de.getMonth()/3)}function ae(de){return l[de.getUTCDay()]}function he(de){return o[de.getUTCDay()]}function Se(de){return f[de.getUTCMonth()]}function Ae(de){return u[de.getUTCMonth()]}function ze(de){return i[+(de.getUTCHours()>=12)]}function nt(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Ne=_(de+="",N);return Ne.toString=function(){return de},Ne},parse:function(de){var Ne=C(de+="",!1);return Ne.toString=function(){return de},Ne},utcFormat:function(de){var Ne=_(de+="",k);return Ne.toString=function(){return de},Ne},utcParse:function(de){var Ne=C(de+="",!0);return Ne.toString=function(){return de},Ne}}}var nC={"-":"",_:" ",0:"0"},dn=/^\s*\d+/,W7=/^%/,Y7=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function X7(e){return e.replace(Y7,"\\$&")}function Ic(e){return new RegExp("^(?:"+e.map(X7).join("|")+")","i")}function Pc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function K7(e,t,n){var r=dn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Q7(e,t,n){var r=dn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function J7(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Z7(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eH(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function rC(e,t,n){var r=dn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function aC(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tH(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nH(e,t,n){var r=dn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function rH(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function iC(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function aH(e,t,n){var r=dn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sC(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function iH(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sH(e,t,n){var r=dn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function oH(e,t,n){var r=dn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lH(e,t,n){var r=dn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cH(e,t,n){var r=W7.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uH(e,t,n){var r=dn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fH(e,t,n){var r=dn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function oC(e,t){return Ze(e.getDate(),t,2)}function dH(e,t){return Ze(e.getHours(),t,2)}function hH(e,t){return Ze(e.getHours()%12||12,t,2)}function pH(e,t){return Ze(1+Wu.count(Za(e),e),t,3)}function DP(e,t){return Ze(e.getMilliseconds(),t,3)}function mH(e,t){return DP(e,t)+"000"}function yH(e,t){return Ze(e.getMonth()+1,t,2)}function vH(e,t){return Ze(e.getMinutes(),t,2)}function gH(e,t){return Ze(e.getSeconds(),t,2)}function bH(e){var t=e.getDay();return t===0?7:t}function xH(e,t){return Ze(Np.count(Za(e)-1,e),t,2)}function RP(e){var t=e.getDay();return t>=4||t===0?ol(e):ol.ceil(e)}function SH(e,t){return e=RP(e),Ze(ol.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function wH(e){return e.getDay()}function TH(e,t){return Ze(vh.count(Za(e)-1,e),t,2)}function OH(e,t){return Ze(e.getFullYear()%100,t,2)}function jH(e,t){return e=RP(e),Ze(e.getFullYear()%100,t,2)}function AH(e,t){return Ze(e.getFullYear()%1e4,t,4)}function EH(e,t){var n=e.getDay();return e=n>=4||n===0?ol(e):ol.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function _H(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function lC(e,t){return Ze(e.getUTCDate(),t,2)}function NH(e,t){return Ze(e.getUTCHours(),t,2)}function kH(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function CH(e,t){return Ze(1+_p.count(ei(e),e),t,3)}function IP(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function MH(e,t){return IP(e,t)+"000"}function DH(e,t){return Ze(e.getUTCMonth()+1,t,2)}function RH(e,t){return Ze(e.getUTCMinutes(),t,2)}function IH(e,t){return Ze(e.getUTCSeconds(),t,2)}function PH(e){var t=e.getUTCDay();return t===0?7:t}function BH(e,t){return Ze(kp.count(ei(e)-1,e),t,2)}function PP(e){var t=e.getUTCDay();return t>=4||t===0?ll(e):ll.ceil(e)}function UH(e,t){return e=PP(e),Ze(ll.count(ei(e),e)+(ei(e).getUTCDay()===4),t,2)}function LH(e){return e.getUTCDay()}function zH(e,t){return Ze(gh.count(ei(e)-1,e),t,2)}function $H(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function qH(e,t){return e=PP(e),Ze(e.getUTCFullYear()%100,t,2)}function VH(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function FH(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ll(e):ll.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function GH(){return"+0000"}function cC(){return"%"}function uC(e){return+e}function fC(e){return Math.floor(+e/1e3)}var Mo,BP,UP;HH({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 HH(e){return Mo=H7(e),BP=Mo.format,Mo.parse,UP=Mo.utcFormat,Mo.utcParse,Mo}function WH(e){return new Date(e)}function YH(e){return e instanceof Date?+e:+new Date(+e)}function Mw(e,t,n,r,i,o,l,u,f,h){var y=gw(),m=y.invert,g=y.domain,S=h(".%L"),T=h(":%S"),w=h("%I:%M"),x=h("%I %p"),O=h("%a %d"),E=h("%b %d"),N=h("%B"),k=h("%Y");function A(_){return(f(_)<_?S:u(_)<_?T:l(_)<_?w:o(_)<_?x:r(_)<_?i(_)<_?O:E:n(_)<_?N:k)(_)}return y.invert=function(_){return new Date(m(_))},y.domain=function(_){return arguments.length?g(Array.from(_,YH)):g().map(WH)},y.ticks=function(_){var C=g();return e(C[0],C[C.length-1],_??10)},y.tickFormat=function(_,C){return C==null?A:h(C)},y.nice=function(_){var C=g();return(!_||typeof _.range!="function")&&(_=t(C[0],C[C.length-1],_??10)),_?g(OP(C,_)):y},y.copy=function(){return Hu(y,Mw(e,t,n,r,i,o,l,u,f,h))},y}function XH(){return Ur.apply(Mw(F7,G7,Za,kw,Np,Wu,_w,Aw,Ts,BP).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function KH(){return Ur.apply(Mw(q7,V7,ei,Cw,kp,_p,Nw,Ew,Ts,UP).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Cp(){var e=0,t=1,n,r,i,o,l=In,u=!1,f;function h(m){return m==null||isNaN(m=+m)?f:l(i===0?.5:(m=(o(m)-n)*i,u?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t]=m,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(m){return arguments.length?(u=!!m,h):u},h.interpolator=function(m){return arguments.length?(l=m,h):l};function y(m){return function(g){var S,T;return arguments.length?([S,T]=g,l=m(S,T),h):[l(0),l(1)]}}return h.range=y(Ml),h.rangeRound=y(vw),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return o=m,n=m(e),r=m(t),i=n===r?0:1/(r-n),h}}function Yi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function LP(){var e=Wi(Cp()(In));return e.copy=function(){return Yi(e,LP())},ii.apply(e,arguments)}function zP(){var e=Sw(Cp()).domain([1,10]);return e.copy=function(){return Yi(e,zP()).base(e.base())},ii.apply(e,arguments)}function $P(){var e=ww(Cp());return e.copy=function(){return Yi(e,$P()).constant(e.constant())},ii.apply(e,arguments)}function Dw(){var e=Tw(Cp());return e.copy=function(){return Yi(e,Dw()).exponent(e.exponent())},ii.apply(e,arguments)}function QH(){return Dw.apply(null,arguments).exponent(.5)}function qP(){var e=[],t=In;function n(r){if(r!=null&&!isNaN(r=+r))return t((Fu(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Vi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>BG(e,o/r))},n.copy=function(){return qP(t).domain(e)},ii.apply(n,arguments)}function Mp(){var e=0,t=.5,n=1,r=1,i,o,l,u,f,h=In,y,m=!1,g;function S(w){return isNaN(w=+w)?g:(w=.5+((w=+y(w))-o)*(r*w<r*o?u:f),h(m?Math.max(0,Math.min(1,w)):w))}S.domain=function(w){return arguments.length?([e,t,n]=w,i=y(e=+e),o=y(t=+t),l=y(n=+n),u=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,S):[e,t,n]},S.clamp=function(w){return arguments.length?(m=!!w,S):m},S.interpolator=function(w){return arguments.length?(h=w,S):h};function T(w){return function(x){var O,E,N;return arguments.length?([O,E,N]=x,h=c7(w,[O,E,N]),S):[h(0),h(.5),h(1)]}}return S.range=T(Ml),S.rangeRound=T(vw),S.unknown=function(w){return arguments.length?(g=w,S):g},function(w){return y=w,i=w(e),o=w(t),l=w(n),u=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,S}}function VP(){var e=Wi(Mp()(In));return e.copy=function(){return Yi(e,VP())},ii.apply(e,arguments)}function FP(){var e=Sw(Mp()).domain([.1,1,10]);return e.copy=function(){return Yi(e,FP()).base(e.base())},ii.apply(e,arguments)}function GP(){var e=ww(Mp());return e.copy=function(){return Yi(e,GP()).constant(e.constant())},ii.apply(e,arguments)}function Rw(){var e=Tw(Mp());return e.copy=function(){return Yi(e,Rw()).exponent(e.exponent())},ii.apply(e,arguments)}function JH(){return Rw.apply(null,arguments).exponent(.5)}const dC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fu,scaleDiverging:VP,scaleDivergingLog:FP,scaleDivergingPow:Rw,scaleDivergingSqrt:JH,scaleDivergingSymlog:GP,scaleIdentity:TP,scaleImplicit:v1,scaleLinear:mh,scaleLog:jP,scaleOrdinal:pw,scalePoint:Hc,scalePow:Ow,scaleQuantile:_P,scaleQuantize:NP,scaleRadial:EP,scaleSequential:LP,scaleSequentialLog:zP,scaleSequentialPow:Dw,scaleSequentialQuantile:qP,scaleSequentialSqrt:QH,scaleSequentialSymlog:$P,scaleSqrt:M7,scaleSymlog:AP,scaleThreshold:kP,scaleTime:XH,scaleUtc:KH,tickFormat:wP},Symbol.toStringTag,{value:"Module"}));var B0,hC;function HP(){if(hC)return B0;hC=1;var e=El();function t(n,r,i){for(var o=-1,l=n.length;++o<l;){var u=n[o],f=r(u);if(f!=null&&(h===void 0?f===f&&!e(f):i(f,h)))var h=f,y=u}return y}return B0=t,B0}var U0,pC;function ZH(){if(pC)return U0;pC=1;function e(t,n){return t>n}return U0=e,U0}var L0,mC;function eW(){if(mC)return L0;mC=1;var e=HP(),t=ZH(),n=Cl();function r(i){return i&&i.length?e(i,n,t):void 0}return L0=r,L0}var tW=eW();const Bi=Tt(tW);var z0,yC;function nW(){if(yC)return z0;yC=1;function e(t,n){return t<n}return z0=e,z0}var $0,vC;function rW(){if(vC)return $0;vC=1;var e=HP(),t=nW(),n=Cl();function r(i){return i&&i.length?e(i,n,t):void 0}return $0=r,$0}var aW=rW();const Dp=Tt(aW);var q0,gC;function iW(){if(gC)return q0;gC=1;var e=KS(),t=Hi(),n=tP(),r=Zn();function i(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return q0=i,q0}var V0,bC;function sW(){if(bC)return V0;bC=1;var e=ZI(),t=iW();function n(r,i){return e(t(r,i),1)}return V0=n,V0}var oW=sW();const lW=Tt(oW);var F0,xC;function cW(){if(xC)return F0;xC=1;var e=cw();function t(n,r){return e(n,r)}return F0=t,F0}var uW=cW();const cl=Tt(uW);var Dl=1e9,fW={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Pw,Mt=!0,Pr="[DecimalError] ",_s=Pr+"Invalid argument: ",Iw=Pr+"Exponent out of range: ",Rl=Math.floor,gs=Math.pow,dW=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,hr,ln=1e7,_t=7,WP=9007199254740991,bh=Rl(WP/_t),ge={};ge.absoluteValue=ge.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ge.comparedTo=ge.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ge.decimalPlaces=ge.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*_t;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ge.dividedBy=ge.div=function(e){return Xa(this,new this.constructor(e))};ge.dividedToIntegerBy=ge.idiv=function(e){var t=this,n=t.constructor;return gt(Xa(t,new n(e),0,1),n.precision)};ge.equals=ge.eq=function(e){return!this.cmp(e)};ge.exponent=function(){return Qt(this)};ge.greaterThan=ge.gt=function(e){return this.cmp(e)>0};ge.greaterThanOrEqualTo=ge.gte=function(e){return this.cmp(e)>=0};ge.isInteger=ge.isint=function(){return this.e>this.d.length-2};ge.isNegative=ge.isneg=function(){return this.s<0};ge.isPositive=ge.ispos=function(){return this.s>0};ge.isZero=function(){return this.s===0};ge.lessThan=ge.lt=function(e){return this.cmp(e)<0};ge.lessThanOrEqualTo=ge.lte=function(e){return this.cmp(e)<1};ge.logarithm=ge.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(hr))throw Error(Pr+"NaN");if(n.s<1)throw Error(Pr+(n.s?"NaN":"-Infinity"));return n.eq(hr)?new r(0):(Mt=!1,t=Xa(yu(n,o),yu(e,o),o),Mt=!0,gt(t,i))};ge.minus=ge.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KP(t,e):YP(t,(e.s=-e.s,e))};ge.modulo=ge.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Pr+"NaN");return n.s?(Mt=!1,t=Xa(n,e,0,1).times(e),Mt=!0,n.minus(t)):gt(new r(n),i)};ge.naturalExponential=ge.exp=function(){return XP(this)};ge.naturalLogarithm=ge.ln=function(){return yu(this)};ge.negated=ge.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ge.plus=ge.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?YP(t,e):KP(t,(e.s=-e.s,e))};ge.precision=ge.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_s+e);if(t=Qt(i)+1,r=i.d.length-1,n=r*_t+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ge.squareRoot=ge.sqrt=function(){var e,t,n,r,i,o,l,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(Pr+"NaN")}for(e=Qt(u),Mt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=oa(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Rl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(o=r,r=o.plus(Xa(u,o,l+2)).times(.5),oa(o.d).slice(0,l)===(t=oa(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(gt(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return Mt=!0,gt(r,n)};ge.times=ge.mul=function(e){var t,n,r,i,o,l,u,f,h,y=this,m=y.constructor,g=y.d,S=(e=new m(e)).d;if(!y.s||!e.s)return new m(0);for(e.s*=y.s,n=y.e+e.e,f=g.length,h=S.length,f<h&&(o=g,g=S,S=o,l=f,f=h,h=l),o=[],l=f+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)u=o[i]+S[r]*g[i-r-1]+t,o[i--]=u%ln|0,t=u/ln|0;o[i]=(o[i]+t)%ln|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Mt?gt(e,m.precision):e};ge.toDecimalPlaces=ge.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ma(e,0,Dl),t===void 0?t=r.rounding:ma(t,0,8),gt(n,e+Qt(n)+1,t))};ge.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Is(r,!0):(ma(e,0,Dl),t===void 0?t=i.rounding:ma(t,0,8),r=gt(new i(r),e+1,t),n=Is(r,!0,e+1)),n};ge.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Is(i):(ma(e,0,Dl),t===void 0?t=o.rounding:ma(t,0,8),r=gt(new o(i),e+Qt(i)+1,t),n=Is(r.abs(),!1,e+Qt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ge.toInteger=ge.toint=function(){var e=this,t=e.constructor;return gt(new t(e),Qt(e)+1,t.rounding)};ge.toNumber=function(){return+this};ge.toPower=ge.pow=function(e){var t,n,r,i,o,l,u=this,f=u.constructor,h=12,y=+(e=new f(e));if(!e.s)return new f(hr);if(u=new f(u),!u.s){if(e.s<1)throw Error(Pr+"Infinity");return u}if(u.eq(hr))return u;if(r=f.precision,e.eq(hr))return gt(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=y<0?-y:y)<=WP){for(i=new f(hr),t=Math.ceil(r/_t+4),Mt=!1;n%2&&(i=i.times(u),wC(i.d,t)),n=Rl(n/2),n!==0;)u=u.times(u),wC(u.d,t);return Mt=!0,e.s<0?new f(hr).div(i):gt(i,r)}}else if(o<0)throw Error(Pr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Mt=!1,i=e.times(yu(u,r+h)),Mt=!0,i=XP(i),i.s=o,i};ge.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Qt(i),r=Is(i,n<=o.toExpNeg||n>=o.toExpPos)):(ma(e,1,Dl),t===void 0?t=o.rounding:ma(t,0,8),i=gt(new o(i),e,t),n=Qt(i),r=Is(i,e<=n||n<=o.toExpNeg,e)),r};ge.toSignificantDigits=ge.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ma(e,1,Dl),t===void 0?t=r.rounding:ma(t,0,8)),gt(new r(n),e,t)};ge.toString=ge.valueOf=ge.val=ge.toJSON=ge[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Qt(e),n=e.constructor;return Is(e,t<=n.toExpNeg||t>=n.toExpPos)};function YP(e,t){var n,r,i,o,l,u,f,h,y=e.constructor,m=y.precision;if(!e.s||!t.s)return t.s||(t=new y(e)),Mt?gt(t,m):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(r=f,o=-o,u=h.length):(r=h,i=l,u=f.length),l=Math.ceil(m/_t),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,r=h,h=f,f=r),n=0;o;)n=(f[--o]=f[o]+h[o]+n)/ln|0,f[o]%=ln;for(n&&(f.unshift(n),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,Mt?gt(t,m):t}function ma(e,t,n){if(e!==~~e||e<t||e>n)throw Error(_s+e)}function oa(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=_t-r.length,n&&(o+=Ii(n)),o+=r;l=e[t],r=l+"",n=_t-r.length,n&&(o+=Ii(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Xa=(function(){function e(r,i){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*i+l,r[u]=o%ln|0,l=o/ln|0;return l&&r.unshift(l),r}function t(r,i,o,l){var u,f;if(o!=l)f=o>l?1:-1;else for(u=f=0;u<o;u++)if(r[u]!=i[u]){f=r[u]>i[u]?1:-1;break}return f}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*ln+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var u,f,h,y,m,g,S,T,w,x,O,E,N,k,A,_,C,I,q=r.constructor,G=r.s==i.s?1:-1,L=r.d,P=i.d;if(!r.s)return new q(r);if(!i.s)throw Error(Pr+"Division by zero");for(f=r.e-i.e,C=P.length,A=L.length,S=new q(G),T=S.d=[],h=0;P[h]==(L[h]||0);)++h;if(P[h]>(L[h]||0)&&--f,o==null?E=o=q.precision:l?E=o+(Qt(r)-Qt(i))+1:E=o,E<0)return new q(0);if(E=E/_t+2|0,h=0,C==1)for(y=0,P=P[0],E++;(h<A||y)&&E--;h++)N=y*ln+(L[h]||0),T[h]=N/P|0,y=N%P|0;else{for(y=ln/(P[0]+1)|0,y>1&&(P=e(P,y),L=e(L,y),C=P.length,A=L.length),k=C,w=L.slice(0,C),x=w.length;x<C;)w[x++]=0;I=P.slice(),I.unshift(0),_=P[0],P[1]>=ln/2&&++_;do y=0,u=t(P,w,C,x),u<0?(O=w[0],C!=x&&(O=O*ln+(w[1]||0)),y=O/_|0,y>1?(y>=ln&&(y=ln-1),m=e(P,y),g=m.length,x=w.length,u=t(m,w,g,x),u==1&&(y--,n(m,C<g?I:P,g))):(y==0&&(u=y=1),m=P.slice()),g=m.length,g<x&&m.unshift(0),n(w,m,x),u==-1&&(x=w.length,u=t(P,w,C,x),u<1&&(y++,n(w,C<x?I:P,x))),x=w.length):u===0&&(y++,w=[0]),T[h++]=y,u&&w[0]?w[x++]=L[k]||0:(w=[L[k]],x=1);while((k++<A||w[0]!==void 0)&&E--)}return T[0]||T.shift(),S.e=f,gt(S,l?o+Qt(S)+1:o)}})();function XP(e,t){var n,r,i,o,l,u,f=0,h=0,y=e.constructor,m=y.precision;if(Qt(e)>16)throw Error(Iw+Qt(e));if(!e.s)return new y(hr);for(Mt=!1,u=m,l=new y(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(r=Math.log(gs(2,h))/Math.LN10*2+5|0,u+=r,n=i=o=new y(hr),y.precision=u;;){if(i=gt(i.times(e),u),n=n.times(++f),l=o.plus(Xa(i,n,u)),oa(l.d).slice(0,u)===oa(o.d).slice(0,u)){for(;h--;)o=gt(o.times(o),u);return y.precision=m,t==null?(Mt=!0,gt(o,m)):o}o=l}}function Qt(e){for(var t=e.e*_t,n=e.d[0];n>=10;n/=10)t++;return t}function G0(e,t,n){if(t>e.LN10.sd())throw Mt=!0,n&&(e.precision=n),Error(Pr+"LN10 precision limit exceeded");return gt(new e(e.LN10),t)}function Ii(e){for(var t="";e--;)t+="0";return t}function yu(e,t){var n,r,i,o,l,u,f,h,y,m=1,g=10,S=e,T=S.d,w=S.constructor,x=w.precision;if(S.s<1)throw Error(Pr+(S.s?"NaN":"-Infinity"));if(S.eq(hr))return new w(0);if(t==null?(Mt=!1,h=x):h=t,S.eq(10))return t==null&&(Mt=!0),G0(w,h);if(h+=g,w.precision=h,n=oa(T),r=n.charAt(0),o=Qt(S),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)S=S.times(e),n=oa(S.d),r=n.charAt(0),m++;o=Qt(S),r>1?(S=new w("0."+n),o++):S=new w(r+"."+n.slice(1))}else return f=G0(w,h+2,x).times(o+""),S=yu(new w(r+"."+n.slice(1)),h-g).plus(f),w.precision=x,t==null?(Mt=!0,gt(S,x)):S;for(u=l=S=Xa(S.minus(hr),S.plus(hr),h),y=gt(S.times(S),h),i=3;;){if(l=gt(l.times(y),h),f=u.plus(Xa(l,new w(i),h)),oa(f.d).slice(0,h)===oa(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus(G0(w,h+2,x).times(o+""))),u=Xa(u,new w(m),h),w.precision=x,t==null?(Mt=!0,gt(u,x)):u;u=f,i+=2}}function SC(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Rl(n/_t),e.d=[],r=(n+1)%_t,n<0&&(r+=_t),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=_t;r<i;)e.d.push(+t.slice(r,r+=_t));t=t.slice(r),r=_t-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Mt&&(e.e>bh||e.e<-bh))throw Error(Iw+n)}else e.s=0,e.e=0,e.d=[0];return e}function gt(e,t,n){var r,i,o,l,u,f,h,y,m=e.d;for(l=1,o=m[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=_t,i=t,h=m[y=0];else{if(y=Math.ceil((r+1)/_t),o=m.length,y>=o)return e;for(h=o=m[y],l=1;o>=10;o/=10)l++;r%=_t,i=r-_t+l}if(n!==void 0&&(o=gs(10,l-i-1),u=h/o%10|0,f=t<0||m[y+1]!==void 0||h%o,f=n<4?(u||f)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||f||n==6&&(r>0?i>0?h/gs(10,l-i):0:m[y-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return f?(o=Qt(e),m.length=1,t=t-o-1,m[0]=gs(10,(_t-t%_t)%_t),e.e=Rl(-t/_t)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=y,o=1,y--):(m.length=y+1,o=gs(10,_t-r),m[y]=i>0?(h/gs(10,l-i)%gs(10,i)|0)*o:0),f)for(;;)if(y==0){(m[0]+=o)==ln&&(m[0]=1,++e.e);break}else{if(m[y]+=o,m[y]!=ln)break;m[y--]=0,o=1}for(r=m.length;m[--r]===0;)m.pop();if(Mt&&(e.e>bh||e.e<-bh))throw Error(Iw+Qt(e));return e}function KP(e,t){var n,r,i,o,l,u,f,h,y,m,g=e.constructor,S=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Mt?gt(t,S):t;if(f=e.d,m=t.d,r=t.e,h=e.e,f=f.slice(),l=h-r,l){for(y=l<0,y?(n=f,l=-l,u=m.length):(n=m,r=h,u=f.length),i=Math.max(Math.ceil(S/_t),u)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,u=m.length,y=i<u,y&&(u=i),i=0;i<u;i++)if(f[i]!=m[i]){y=f[i]<m[i];break}l=0}for(y&&(n=f,f=m,m=n,t.s=-t.s),u=f.length,i=m.length-u;i>0;--i)f[u++]=0;for(i=m.length;i>l;){if(f[--i]<m[i]){for(o=i;o&&f[--o]===0;)f[o]=ln-1;--f[o],f[i]+=ln}f[i]-=m[i]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,Mt?gt(t,S):t):new g(0)}function Is(e,t,n){var r,i=Qt(e),o=oa(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ii(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ii(-i-1)+o,n&&(r=n-l)>0&&(o+=Ii(r))):i>=l?(o+=Ii(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Ii(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Ii(r))),e.s<0?"-"+o:o}function wC(e,t){if(e.length>t)return e.length=t,!0}function QP(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(_s+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return SC(l,o.toString())}else if(typeof o!="string")throw Error(_s+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,dW.test(o))SC(l,o);else throw Error(_s+o)}if(i.prototype=ge,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=QP,i.config=i.set=hW,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function hW(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,n,r,i=["precision",1,Dl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Rl(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(_s+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(_s+n+": "+r);return this}var Pw=QP(fW);hr=new Pw(1);const dt=Pw;function pW(e){return gW(e)||vW(e)||yW(e)||mW()}function mW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
406
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yW(e,t){if(e){if(typeof e=="string")return S1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S1(e,t)}}function vW(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function gW(e){if(Array.isArray(e))return S1(e)}function S1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bW=function(t){return t},JP={},ZP=function(t){return t===JP},TC=function(t){return function n(){return arguments.length===0||arguments.length===1&&ZP(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},xW=function e(t,n){return t===1?n:TC(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.filter(function(u){return u!==JP}).length;return l>=t?n.apply(void 0,i):e(t-l,TC(function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];var y=i.map(function(m){return ZP(m)?f.shift():m});return n.apply(void 0,pW(y).concat(f))}))})},Rp=function(t){return xW(t.length,t)},w1=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},SW=Rp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),wW=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return bW;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce(function(u,f){return f(u)},o.apply(void 0,arguments))}},T1=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},e3=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n&&o.every(function(u,f){return u===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function TW(e){var t;return e===0?t=1:t=Math.floor(new dt(e).abs().log(10).toNumber())+1,t}function OW(e,t,n){for(var r=new dt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var jW=Rp(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),AW=Rp(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),EW=Rp(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Ip={rangeStep:OW,getDigitCount:TW,interpolateNumber:jW,uninterpolateNumber:AW,uninterpolateTruncation:EW};function O1(e){return kW(e)||NW(e)||t3(e)||_W()}function _W(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
407
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NW(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function kW(e){if(Array.isArray(e))return j1(e)}function vu(e,t){return DW(e)||MW(e,t)||t3(e,t)||CW()}function CW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
408
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t3(e,t){if(e){if(typeof e=="string")return j1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j1(e,t)}}function j1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MW(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw o}}return n}}function DW(e){if(Array.isArray(e))return e}function n3(e){var t=vu(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function r3(e,t,n){if(e.lte(0))return new dt(0);var r=Ip.getDigitCount(e.toNumber()),i=new dt(10).pow(r),o=e.div(i),l=r!==1?.05:.1,u=new dt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=u.mul(i);return t?f:new dt(Math.ceil(f))}function RW(e,t,n){var r=1,i=new dt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new dt(10).pow(Ip.getDigitCount(e)-1),i=new dt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new dt(Math.floor(e)))}else e===0?i=new dt(Math.floor((t-1)/2)):n||(i=new dt(Math.floor(e)));var l=Math.floor((t-1)/2),u=wW(SW(function(f){return i.add(new dt(f-l).mul(r)).toNumber()}),w1);return u(0,t)}function a3(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new dt(0),tickMin:new dt(0),tickMax:new dt(0)};var o=r3(new dt(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new dt(0):(l=new dt(e).add(t).div(2),l=l.sub(new dt(l).mod(o)));var u=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new dt(t).sub(l).div(o).toNumber()),h=u+f+1;return h>n?a3(e,t,n,r,i+1):(h<n&&(f=t>0?f+(n-h):f,u=t>0?u:u+(n-h)),{step:o,tickMin:l.sub(new dt(u).mul(o)),tickMax:l.add(new dt(f).mul(o))})}function IW(e){var t=vu(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),u=n3([n,r]),f=vu(u,2),h=f[0],y=f[1];if(h===-1/0||y===1/0){var m=y===1/0?[h].concat(O1(w1(0,i-1).map(function(){return 1/0}))):[].concat(O1(w1(0,i-1).map(function(){return-1/0})),[y]);return n>r?T1(m):m}if(h===y)return RW(h,i,o);var g=a3(h,y,l,o),S=g.step,T=g.tickMin,w=g.tickMax,x=Ip.rangeStep(T,w.add(new dt(.1).mul(S)),S);return n>r?T1(x):x}function PW(e,t){var n=vu(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=n3([r,i]),u=vu(l,2),f=u[0],h=u[1];if(f===-1/0||h===1/0)return[r,i];if(f===h)return[f];var y=Math.max(t,2),m=r3(new dt(h).sub(f).div(y-1),o,0),g=[].concat(O1(Ip.rangeStep(new dt(f),new dt(h).sub(new dt(.99).mul(m)),m)),[h]);return r>i?T1(g):g}var BW=e3(IW),UW=e3(PW),LW="Invariant failed";function Ps(e,t){throw new Error(LW)}var zW=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xh.apply(this,arguments)}function $W(e,t){return GW(e)||FW(e,t)||VW(e,t)||qW()}function qW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
409
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VW(e,t){if(e){if(typeof e=="string")return OC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OC(e,t)}}function OC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function GW(e){if(Array.isArray(e))return e}function HW(e,t){if(e==null)return{};var n=WW(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WW(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function YW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o3(r.key),r)}}function KW(e,t,n){return t&&XW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QW(e,t,n){return t=Sh(t),JW(e,i3()?Reflect.construct(t,n||[],Sh(e).constructor):t.apply(e,n))}function JW(e,t){if(t&&(ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZW(e)}function ZW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i3=function(){return!!e})()}function Sh(e){return Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sh(e)}function eY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A1(e,t)}function A1(e,t){return A1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},A1(e,t)}function s3(e,t,n){return t=o3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o3(e){var t=tY(e,"string");return ul(t)=="symbol"?t:t+""}function tY(e,t){if(ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yu=(function(e){function t(){return YW(this,t),QW(this,t,arguments)}return eY(t,e),KW(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,l=r.width,u=r.dataKey,f=r.data,h=r.dataPointFormatter,y=r.xAxis,m=r.yAxis,g=HW(r,zW),S=Be(g,!1);this.props.direction==="x"&&y.type!=="number"&&Ps();var T=f.map(function(w){var x=h(w,u),O=x.x,E=x.y,N=x.value,k=x.errorVal;if(!k)return null;var A=[],_,C;if(Array.isArray(k)){var I=$W(k,2);_=I[0],C=I[1]}else _=C=k;if(o==="vertical"){var q=y.scale,G=E+i,L=G+l,P=G-l,H=q(N-_),F=q(N+C);A.push({x1:F,y1:L,x2:F,y2:P}),A.push({x1:H,y1:G,x2:F,y2:G}),A.push({x1:H,y1:L,x2:H,y2:P})}else if(o==="horizontal"){var K=m.scale,B=O+i,D=B-l,Q=B+l,se=K(N-_),ce=K(N+C);A.push({x1:D,y1:ce,x2:Q,y2:ce}),A.push({x1:B,y1:se,x2:B,y2:ce}),A.push({x1:D,y1:se,x2:Q,y2:se})}return W.createElement(wt,xh({className:"recharts-errorBar",key:"bar-".concat(A.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},S),A.map(function(U){return W.createElement("line",xh({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return W.createElement(wt,{className:"recharts-errorBars"},T)}}])})(W.Component);s3(Yu,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});s3(Yu,"displayName","ErrorBar");function gu(e){"@babel/helpers - typeof";return gu=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},gu(e)}function jC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jC(Object(n),!0).forEach(function(r){nY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nY(e,t,n){return t=rY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rY(e){var t=aY(e,"string");return gu(t)=="symbol"?t:t+""}function aY(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l3=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=fr(n,Ho);if(!l)return null;var u=Ho.defaultProps,f=u!==void 0?ys(ys({},u),l.props):{},h;return l.props&&l.props.payload?h=l.props&&l.props.payload:o==="children"?h=(r||[]).reduce(function(y,m){var g=m.item,S=m.props,T=S.sectors||S.data||[];return y.concat(T.map(function(w){return{type:l.props.iconType||g.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):h=(r||[]).map(function(y){var m=y.item,g=m.type.defaultProps,S=g!==void 0?ys(ys({},g),m.props):{},T=S.dataKey,w=S.name,x=S.legendType,O=S.hide;return{inactive:O,dataKey:T,type:f.iconType||x||"square",color:Bw(m),value:w||T,payload:S}}),ys(ys(ys({},f),Ho.getWithHeight(l,i)),{},{payload:h,item:l})};function bu(e){"@babel/helpers - typeof";return bu=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},bu(e)}function AC(e){return lY(e)||oY(e)||sY(e)||iY()}function iY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
410
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sY(e,t){if(e){if(typeof e=="string")return E1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E1(e,t)}}function oY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lY(e){if(Array.isArray(e))return E1(e)}function E1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function EC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(n),!0).forEach(function(r){Yo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yo(e,t,n){return t=cY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cY(e){var t=uY(e,"string");return bu(t)=="symbol"?t:t+""}function uY(e,t){if(bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bn(e,t,n){return Le(e)||Le(t)?n:nn(t)?Rr(e,t,n):Ue(t)?t(e):n}function Wc(e,t,n,r){var i=lW(e,function(u){return Bn(u,t)});if(n==="number"){var o=i.filter(function(u){return pe(u)||parseFloat(u)});return o.length?[Dp(o),Bi(o)]:[1/0,-1/0]}var l=r?i.filter(function(u){return!Le(u)}):i;return l.map(function(u){return nn(u)||u instanceof Date?u:""})}var fY=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,h=0;h<u;h++){var y=h>0?i[h-1].coordinate:i[u-1].coordinate,m=i[h].coordinate,g=h>=u-1?i[0].coordinate:i[h+1].coordinate,S=void 0;if(Qr(m-y)!==Qr(g-m)){var T=[];if(Qr(g-m)===Qr(f[1]-f[0])){S=g;var w=m+f[1]-f[0];T[0]=Math.min(w,(w+y)/2),T[1]=Math.max(w,(w+y)/2)}else{S=y;var x=g+f[1]-f[0];T[0]=Math.min(m,(x+m)/2),T[1]=Math.max(m,(x+m)/2)}var O=[Math.min(m,(S+m)/2),Math.max(m,(S+m)/2)];if(t>O[0]&&t<=O[1]||t>=T[0]&&t<=T[1]){l=i[h].index;break}}else{var E=Math.min(y,g),N=Math.max(y,g);if(t>(E+m)/2&&t<=(N+m)/2){l=i[h].index;break}}}else for(var k=0;k<u;k++)if(k===0&&t<=(r[k].coordinate+r[k+1].coordinate)/2||k>0&&k<u-1&&t>(r[k].coordinate+r[k-1].coordinate)/2&&t<=(r[k].coordinate+r[k+1].coordinate)/2||k===u-1&&t>(r[k].coordinate+r[k-1].coordinate)/2){l=r[k].index;break}return l},Bw=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Bt(Bt({},t.type.defaultProps),t.props):t.props,l=o.stroke,u=o.fill,f;switch(i){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:u;break;default:f=u;break}return f},dY=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var l={},u=Object.keys(o),f=0,h=u.length;f<h;f++)for(var y=o[u[f]].stackGroups,m=Object.keys(y),g=0,S=m.length;g<S;g++){var T=y[m[g]],w=T.items,x=T.cateAxisId,O=w.filter(function(C){return Ya(C.type).indexOf("Bar")>=0});if(O&&O.length){var E=O[0].type.defaultProps,N=E!==void 0?Bt(Bt({},E),O[0].props):O[0].props,k=N.barSize,A=N[x];l[A]||(l[A]=[]);var _=Le(k)?n:k;l[A].push({item:O[0],stackList:O.slice(1),barSize:Le(_)?void 0:Rs(_,r,0)})}}return l},hY=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,f=l.length;if(f<1)return null;var h=Rs(n,i,0,!0),y,m=[];if(l[0].barSize===+l[0].barSize){var g=!1,S=i/f,T=l.reduce(function(k,A){return k+A.barSize||0},0);T+=(f-1)*h,T>=i&&(T-=(f-1)*h,h=0),T>=i&&S>0&&(g=!0,S*=.9,T=f*S);var w=(i-T)/2>>0,x={offset:w-h,size:0};y=l.reduce(function(k,A){var _={item:A.item,position:{offset:x.offset+x.size+h,size:g?S:A.barSize}},C=[].concat(AC(k),[_]);return x=C[C.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(I){C.push({item:I,position:x})}),C},m)}else{var O=Rs(r,i,0,!0);i-2*O-(f-1)*h<=0&&(h=0);var E=(i-2*O-(f-1)*h)/f;E>1&&(E>>=0);var N=u===+u?Math.min(E,u):E;y=l.reduce(function(k,A,_){var C=[].concat(AC(k),[{item:A.item,position:{offset:O+(E+h)*_+(E-N)/2,size:N}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(I){C.push({item:I,position:C[C.length-1].position})}),C},m)}return y},pY=function(t,n,r,i){var o=r.children,l=r.width,u=r.margin,f=l-(u.left||0)-(u.right||0),h=l3({children:o,legendWidth:f});if(h){var y=i||{},m=y.width,g=y.height,S=h.align,T=h.verticalAlign,w=h.layout;if((w==="vertical"||w==="horizontal"&&T==="middle")&&S!=="center"&&pe(t[S]))return Bt(Bt({},t),{},Yo({},S,t[S]+(m||0)));if((w==="horizontal"||w==="vertical"&&S==="center")&&T!=="middle"&&pe(t[T]))return Bt(Bt({},t),{},Yo({},T,t[T]+(g||0)))}return t},mY=function(t,n,r){return Le(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},c3=function(t,n,r,i,o){var l=n.props.children,u=Ir(l,Yu).filter(function(h){return mY(i,o,h.props.direction)});if(u&&u.length){var f=u.map(function(h){return h.props.dataKey});return t.reduce(function(h,y){var m=Bn(y,r);if(Le(m))return h;var g=Array.isArray(m)?[Dp(m),Bi(m)]:[m,m],S=f.reduce(function(T,w){var x=Bn(y,w,0),O=g[0]-Math.abs(Array.isArray(x)?x[0]:x),E=g[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(O,T[0]),Math.max(E,T[1])]},[1/0,-1/0]);return[Math.min(S[0],h[0]),Math.max(S[1],h[1])]},[1/0,-1/0])}return null},yY=function(t,n,r,i,o){var l=n.map(function(u){return c3(t,u,r,o,i)}).filter(function(u){return!Le(u)});return l&&l.length?l.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]):null},u3=function(t,n,r,i,o){var l=n.map(function(f){var h=f.props.dataKey;return r==="number"&&h&&c3(t,f,h,i)||Wc(t,h,r,o)});if(r==="number")return l.reduce(function(f,h){return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);var u={};return l.reduce(function(f,h){for(var y=0,m=h.length;y<m;y++)u[h[y]]||(u[h[y]]=!0,f.push(h[y]));return f},[])},f3=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Os=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,l=t.type,u=t.range,f=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,h=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/f:0;if(h=t.axisType==="angleAxis"&&u?.length>=2?Qr(u[0]-u[1])*2*h:h,n&&(t.ticks||t.niceTicks)){var y=(t.ticks||t.niceTicks).map(function(m){var g=o?o.indexOf(m):m;return{coordinate:i(g)+h,value:m,offset:h}});return y.filter(function(m){return!Nl(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,g){return{coordinate:i(m)+h,value:m,index:g,offset:h}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(m){return{coordinate:i(m)+h,value:m,offset:h}}):i.domain().map(function(m,g){return{coordinate:i(m)+h,value:o?o[m]:m,index:g,offset:h}})},H0=new WeakMap,_d=function(t,n){if(typeof n!="function")return t;H0.has(t)||H0.set(t,new WeakMap);var r=H0.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},vY=function(t,n,r){var i=t.scale,o=t.type,l=t.layout,u=t.axisType;if(i==="auto")return l==="radial"&&u==="radiusAxis"?{scale:fu(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:mh(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Hc(),realScaleType:"point"}:o==="category"?{scale:fu(),realScaleType:"band"}:{scale:mh(),realScaleType:"linear"};if(Ds(i)){var f="scale".concat(xp(i));return{scale:(dC[f]||Hc)(),realScaleType:dC[f]?f:"point"}}return Ue(i)?{scale:i}:{scale:Hc(),realScaleType:"point"}},_C=1e-4,gY=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-_C,l=Math.max(i[0],i[1])+_C,u=t(n[0]),f=t(n[r-1]);(u<o||u>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},bY=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},xY=function(t,n){if(!n||n.length!==2||!pe(n[0])||!pe(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!pe(t[0])||t[0]<r)&&(o[0]=r),(!pe(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},SY=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0,u=0;u<n;++u){var f=Nl(t[u][r][1])?t[u][r][0]:t[u][r][1];f>=0?(t[u][r][0]=o,t[u][r][1]=o+f,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+f,l=t[u][r][1])}},wY=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0;l<n;++l){var u=Nl(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},TY={sign:SY,expand:iV,none:tl,silhouette:sV,wiggle:oV,positive:wY},OY=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=TY[r],l=aV().keys(i).value(function(u,f){return+Bn(u,f,0)}).order(r1).offset(o);return l(t)},jY=function(t,n,r,i,o,l){if(!t)return null;var u=l?n.reverse():n,f={},h=u.reduce(function(m,g){var S,T=(S=g.type)!==null&&S!==void 0&&S.defaultProps?Bt(Bt({},g.type.defaultProps),g.props):g.props,w=T.stackId,x=T.hide;if(x)return m;var O=T[r],E=m[O]||{hasStack:!1,stackGroups:{}};if(nn(w)){var N=E.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};N.items.push(g),E.hasStack=!0,E.stackGroups[w]=N}else E.stackGroups[kl("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return Bt(Bt({},m),{},Yo({},O,E))},f),y={};return Object.keys(h).reduce(function(m,g){var S=h[g];if(S.hasStack){var T={};S.stackGroups=Object.keys(S.stackGroups).reduce(function(w,x){var O=S.stackGroups[x];return Bt(Bt({},w),{},Yo({},x,{numericAxisId:r,cateAxisId:i,items:O.items,stackedData:OY(t,O.items,o)}))},T)}return Bt(Bt({},m),{},Yo({},g,S))},y)},AY=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var h=t.domain();if(!h.length)return null;var y=BW(h,o,u);return t.domain([Dp(y),Bi(y)]),{niceTicks:y}}if(o&&i==="number"){var m=t.domain(),g=UW(m,o,u);return{niceTicks:g}}return null};function wh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Le(i[t.dataKey])){var u=Yd(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Bn(i,Le(l)?t.dataKey:l);return Le(f)?null:t.scale(f)}var NC=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var f=Bn(l,n.dataKey,n.domain[u]);return Le(f)?null:n.scale(f)-o/2+i},EY=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},_Y=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Bt(Bt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(nn(o)){var l=n[o];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},NY=function(t){return t.reduce(function(n,r){return[Dp(r.concat([n[0]]).filter(pe)),Bi(r.concat([n[1]]).filter(pe))]},[1/0,-1/0])},d3=function(t,n,r){return Object.keys(t).reduce(function(i,o){var l=t[o],u=l.stackedData,f=u.reduce(function(h,y){var m=NY(y.slice(n,r+1));return[Math.min(h[0],m[0]),Math.max(h[1],m[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},kC=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,CC=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_1=function(t,n,r){if(Ue(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(pe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(kC.test(t[0])){var o=+kC.exec(t[0])[1];i[0]=n[0]-o}else Ue(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(pe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(CC.test(t[1])){var l=+CC.exec(t[1])[1];i[1]=n[1]+l}else Ue(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Th=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=fw(n,function(m){return m.coordinate}),l=1/0,u=1,f=o.length;u<f;u++){var h=o[u],y=o[u-1];l=Math.min((h.coordinate||0)-(y.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},MC=function(t,n,r){return!t||!t.length||cl(t,Rr(r,"type.defaultProps.domain"))?n:t},h3=function(t,n){var r=t.type.defaultProps?Bt(Bt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,l=r.unit,u=r.formatter,f=r.tooltipType,h=r.chartType,y=r.hide;return Bt(Bt({},Be(t,!1)),{},{dataKey:i,unit:l,formatter:u,name:o||i,color:Bw(t),value:Bn(n,i),type:f,payload:n,chartType:h,hide:y})};function xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function DC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DC(Object(n),!0).forEach(function(r){kY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kY(e,t,n){return t=CY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CY(e){var t=MY(e,"string");return xu(t)=="symbol"?t:t+""}function MY(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oh=Math.PI/180,DY=function(t){return t*180/Math.PI},Sn=function(t,n,r,i){return{x:t+Math.cos(-Oh*i)*r,y:n+Math.sin(-Oh*i)*r}},RY=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-l,2))},IY=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,u=RY({x:r,y:i},{x:o,y:l});if(u<=0)return{radius:u};var f=(r-o)/u,h=Math.acos(f);return i>l&&(h=2*Math.PI-h),{radius:u,angle:DY(h),angleInRadian:h}},PY=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return{startAngle:n-l*360,endAngle:r-l*360}},BY=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),l=Math.floor(i/360),u=Math.min(o,l);return t+u*360},IC=function(t,n){var r=t.x,i=t.y,o=IY({x:r,y:i},n),l=o.radius,u=o.angle,f=n.innerRadius,h=n.outerRadius;if(l<f||l>h)return!1;if(l===0)return!0;var y=PY(n),m=y.startAngle,g=y.endAngle,S=u,T;if(m<=g){for(;S>g;)S-=360;for(;S<m;)S+=360;T=S>=m&&S<=g}else{for(;S>m;)S-=360;for(;S<g;)S+=360;T=S>=g&&S<=m}return T?RC(RC({},n),{},{radius:l,angle:BY(S,n)}):null};function Su(e){"@babel/helpers - typeof";return Su=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},Su(e)}var UY=["offset"];function LY(e){return VY(e)||qY(e)||$Y(e)||zY()}function zY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
411
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Y(e,t){if(e){if(typeof e=="string")return N1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(e,t)}}function qY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VY(e){if(Array.isArray(e))return N1(e)}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FY(e,t){if(e==null)return{};var n=GY(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PC(Object(n),!0).forEach(function(r){HY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HY(e,t,n){return t=WY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WY(e){var t=YY(e,"string");return Su(t)=="symbol"?t:t+""}function YY(e,t){if(Su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wu.apply(this,arguments)}var XY=function(t){var n=t.value,r=t.formatter,i=Le(t.children)?n:t.children;return Ue(r)?r(i):i},KY=function(t,n){var r=Qr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},QY=function(t,n,r){var i=t.position,o=t.viewBox,l=t.offset,u=t.className,f=o,h=f.cx,y=f.cy,m=f.innerRadius,g=f.outerRadius,S=f.startAngle,T=f.endAngle,w=f.clockWise,x=(m+g)/2,O=KY(S,T),E=O>=0?1:-1,N,k;i==="insideStart"?(N=S+E*l,k=w):i==="insideEnd"?(N=T-E*l,k=!w):i==="end"&&(N=T+E*l,k=w),k=O<=0?k:!k;var A=Sn(h,y,x,N),_=Sn(h,y,x,N+(k?1:-1)*359),C="M".concat(A.x,",").concat(A.y,`
|
|
412
|
+
A`).concat(x,",").concat(x,",0,1,").concat(k?0:1,`,
|
|
413
|
+
`).concat(_.x,",").concat(_.y),I=Le(t.id)?kl("recharts-radial-line-"):t.id;return W.createElement("text",wu({},r,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",u)}),W.createElement("defs",null,W.createElement("path",{id:I,d:C})),W.createElement("textPath",{xlinkHref:"#".concat(I)},n))},JY=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,l=o.cx,u=o.cy,f=o.innerRadius,h=o.outerRadius,y=o.startAngle,m=o.endAngle,g=(y+m)/2;if(i==="outside"){var S=Sn(l,u,h+r,g),T=S.x,w=S.y;return{x:T,y:w,textAnchor:T>=l?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"end"};var x=(f+h)/2,O=Sn(l,u,x,g),E=O.x,N=O.y;return{x:E,y:N,textAnchor:"middle",verticalAnchor:"middle"}},ZY=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,l=n,u=l.x,f=l.y,h=l.width,y=l.height,m=y>=0?1:-1,g=m*i,S=m>0?"end":"start",T=m>0?"start":"end",w=h>=0?1:-1,x=w*i,O=w>0?"end":"start",E=w>0?"start":"end";if(o==="top"){var N={x:u+h/2,y:f-m*i,textAnchor:"middle",verticalAnchor:S};return tn(tn({},N),r?{height:Math.max(f-r.y,0),width:h}:{})}if(o==="bottom"){var k={x:u+h/2,y:f+y+g,textAnchor:"middle",verticalAnchor:T};return tn(tn({},k),r?{height:Math.max(r.y+r.height-(f+y),0),width:h}:{})}if(o==="left"){var A={x:u-x,y:f+y/2,textAnchor:O,verticalAnchor:"middle"};return tn(tn({},A),r?{width:Math.max(A.x-r.x,0),height:y}:{})}if(o==="right"){var _={x:u+h+x,y:f+y/2,textAnchor:E,verticalAnchor:"middle"};return tn(tn({},_),r?{width:Math.max(r.x+r.width-_.x,0),height:y}:{})}var C=r?{width:h,height:y}:{};return o==="insideLeft"?tn({x:u+x,y:f+y/2,textAnchor:E,verticalAnchor:"middle"},C):o==="insideRight"?tn({x:u+h-x,y:f+y/2,textAnchor:O,verticalAnchor:"middle"},C):o==="insideTop"?tn({x:u+h/2,y:f+g,textAnchor:"middle",verticalAnchor:T},C):o==="insideBottom"?tn({x:u+h/2,y:f+y-g,textAnchor:"middle",verticalAnchor:S},C):o==="insideTopLeft"?tn({x:u+x,y:f+g,textAnchor:E,verticalAnchor:T},C):o==="insideTopRight"?tn({x:u+h-x,y:f+g,textAnchor:O,verticalAnchor:T},C):o==="insideBottomLeft"?tn({x:u+x,y:f+y-g,textAnchor:E,verticalAnchor:S},C):o==="insideBottomRight"?tn({x:u+h-x,y:f+y-g,textAnchor:O,verticalAnchor:S},C):_l(o)&&(pe(o.x)||Ss(o.x))&&(pe(o.y)||Ss(o.y))?tn({x:u+Rs(o.x,h),y:f+Rs(o.y,y),textAnchor:"end",verticalAnchor:"end"},C):tn({x:u+h/2,y:f+y/2,textAnchor:"middle",verticalAnchor:"middle"},C)},eX=function(t){return"cx"in t&&pe(t.cx)};function An(e){var t=e.offset,n=t===void 0?5:t,r=FY(e,UY),i=tn({offset:n},r),o=i.viewBox,l=i.position,u=i.value,f=i.children,h=i.content,y=i.className,m=y===void 0?"":y,g=i.textBreakAll;if(!o||Le(u)&&Le(f)&&!z.isValidElement(h)&&!Ue(h))return null;if(z.isValidElement(h))return z.cloneElement(h,i);var S;if(Ue(h)){if(S=z.createElement(h,i),z.isValidElement(S))return S}else S=XY(i);var T=eX(o),w=Be(i,!0);if(T&&(l==="insideStart"||l==="insideEnd"||l==="end"))return QY(i,S,w);var x=T?JY(i):ZY(i);return W.createElement(oh,wu({className:Xe("recharts-label",m)},w,x,{breakAll:g}),S)}An.displayName="Label";var p3=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,l=t.endAngle,u=t.r,f=t.radius,h=t.innerRadius,y=t.outerRadius,m=t.x,g=t.y,S=t.top,T=t.left,w=t.width,x=t.height,O=t.clockWise,E=t.labelViewBox;if(E)return E;if(pe(w)&&pe(x)){if(pe(m)&&pe(g))return{x:m,y:g,width:w,height:x};if(pe(S)&&pe(T))return{x:S,y:T,width:w,height:x}}return pe(m)&&pe(g)?{x:m,y:g,width:0,height:0}:pe(n)&&pe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:l||i||0,innerRadius:h||0,outerRadius:y||f||u||0,clockWise:O}:t.viewBox?t.viewBox:{}},tX=function(t,n){return t?t===!0?W.createElement(An,{key:"label-implicit",viewBox:n}):nn(t)?W.createElement(An,{key:"label-implicit",viewBox:n,value:t}):z.isValidElement(t)?t.type===An?z.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(An,{key:"label-implicit",content:t,viewBox:n}):Ue(t)?W.createElement(An,{key:"label-implicit",content:t,viewBox:n}):_l(t)?W.createElement(An,wu({viewBox:n},t,{key:"label-implicit"})):null:null},nX=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=p3(t),l=Ir(i,An).map(function(f,h){return z.cloneElement(f,{viewBox:n||o,key:"label-".concat(h)})});if(!r)return l;var u=tX(t.label,n||o);return[u].concat(LY(l))};An.parseViewBox=p3;An.renderCallByParent=nX;var W0,BC;function rX(){if(BC)return W0;BC=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return W0=e,W0}var aX=rX();const iX=Tt(aX);function Tu(e){"@babel/helpers - typeof";return Tu=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},Tu(e)}var sX=["valueAccessor"],oX=["data","dataKey","clockWise","id","textBreakAll"];function lX(e){return dX(e)||fX(e)||uX(e)||cX()}function cX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
414
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uX(e,t){if(e){if(typeof e=="string")return k1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k1(e,t)}}function fX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dX(e){if(Array.isArray(e))return k1(e)}function k1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jh.apply(this,arguments)}function UC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function LC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UC(Object(n),!0).forEach(function(r){hX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hX(e,t,n){return t=pX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pX(e){var t=mX(e,"string");return Tu(t)=="symbol"?t:t+""}function mX(e,t){if(Tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zC(e,t){if(e==null)return{};var n=yX(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vX=function(t){return Array.isArray(t.value)?iX(t.value):t.value};function Ka(e){var t=e.valueAccessor,n=t===void 0?vX:t,r=zC(e,sX),i=r.data,o=r.dataKey,l=r.clockWise,u=r.id,f=r.textBreakAll,h=zC(r,oX);return!i||!i.length?null:W.createElement(wt,{className:"recharts-label-list"},i.map(function(y,m){var g=Le(o)?n(y,m):Bn(y&&y.payload,o),S=Le(u)?{}:{id:"".concat(u,"-").concat(m)};return W.createElement(An,jh({},Be(y,!0),h,S,{parentViewBox:y.parentViewBox,value:g,textBreakAll:f,viewBox:An.parseViewBox(Le(l)?y:LC(LC({},y),{},{clockWise:l})),key:"label-".concat(m),index:m}))}))}Ka.displayName="LabelList";function gX(e,t){return e?e===!0?W.createElement(Ka,{key:"labelList-implicit",data:t}):W.isValidElement(e)||Ue(e)?W.createElement(Ka,{key:"labelList-implicit",data:t,content:e}):_l(e)?W.createElement(Ka,jh({data:t},e,{key:"labelList-implicit"})):null:null}function bX(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Ir(r,Ka).map(function(l,u){return z.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=gX(e.label,t);return[o].concat(lX(i))}Ka.renderCallByParent=bX;function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C1.apply(this,arguments)}function $C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$C(Object(n),!0).forEach(function(r){xX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$C(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xX(e,t,n){return t=SX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SX(e){var t=wX(e,"string");return Ou(t)=="symbol"?t:t+""}function wX(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TX=function(t,n){var r=Qr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Nd=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,l=t.sign,u=t.isExternal,f=t.cornerRadius,h=t.cornerIsExternal,y=f*(u?1:-1)+i,m=Math.asin(f/y)/Oh,g=h?o:o+l*m,S=Sn(n,r,y,g),T=Sn(n,r,i,g),w=h?o-l*m:o,x=Sn(n,r,y*Math.cos(m*Oh),w);return{center:S,circleTangency:T,lineTangency:x,theta:m}},m3=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,f=TX(l,u),h=l+f,y=Sn(n,r,o,l),m=Sn(n,r,o,h),g="M ".concat(y.x,",").concat(y.y,`
|
|
415
|
+
A `).concat(o,",").concat(o,`,0,
|
|
416
|
+
`).concat(+(Math.abs(f)>180),",").concat(+(l>h),`,
|
|
417
|
+
`).concat(m.x,",").concat(m.y,`
|
|
418
|
+
`);if(i>0){var S=Sn(n,r,i,l),T=Sn(n,r,i,h);g+="L ".concat(T.x,",").concat(T.y,`
|
|
419
|
+
A `).concat(i,",").concat(i,`,0,
|
|
420
|
+
`).concat(+(Math.abs(f)>180),",").concat(+(l<=h),`,
|
|
421
|
+
`).concat(S.x,",").concat(S.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},OX=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,y=t.endAngle,m=Qr(y-h),g=Nd({cx:n,cy:r,radius:o,angle:h,sign:m,cornerRadius:l,cornerIsExternal:f}),S=g.circleTangency,T=g.lineTangency,w=g.theta,x=Nd({cx:n,cy:r,radius:o,angle:y,sign:-m,cornerRadius:l,cornerIsExternal:f}),O=x.circleTangency,E=x.lineTangency,N=x.theta,k=f?Math.abs(h-y):Math.abs(h-y)-w-N;if(k<0)return u?"M ".concat(T.x,",").concat(T.y,`
|
|
422
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
|
|
423
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
|
|
424
|
+
`):m3({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:y});var A="M ".concat(T.x,",").concat(T.y,`
|
|
425
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(S.x,",").concat(S.y,`
|
|
426
|
+
A`).concat(o,",").concat(o,",0,").concat(+(k>180),",").concat(+(m<0),",").concat(O.x,",").concat(O.y,`
|
|
427
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(E.x,",").concat(E.y,`
|
|
428
|
+
`);if(i>0){var _=Nd({cx:n,cy:r,radius:i,angle:h,sign:m,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),C=_.circleTangency,I=_.lineTangency,q=_.theta,G=Nd({cx:n,cy:r,radius:i,angle:y,sign:-m,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),L=G.circleTangency,P=G.lineTangency,H=G.theta,F=f?Math.abs(h-y):Math.abs(h-y)-q-H;if(F<0&&l===0)return"".concat(A,"L").concat(n,",").concat(r,"Z");A+="L".concat(P.x,",").concat(P.y,`
|
|
429
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(L.x,",").concat(L.y,`
|
|
430
|
+
A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(m>0),",").concat(C.x,",").concat(C.y,`
|
|
431
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(I.x,",").concat(I.y,"Z")}else A+="L".concat(n,",").concat(r,"Z");return A},jX={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},y3=function(t){var n=qC(qC({},jX),t),r=n.cx,i=n.cy,o=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,f=n.forceCornerRadius,h=n.cornerIsExternal,y=n.startAngle,m=n.endAngle,g=n.className;if(l<o||y===m)return null;var S=Xe("recharts-sector",g),T=l-o,w=Rs(u,T,0,!0),x;return w>0&&Math.abs(y-m)<360?x=OX({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(w,T/2),forceCornerRadius:f,cornerIsExternal:h,startAngle:y,endAngle:m}):x=m3({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:y,endAngle:m}),W.createElement("path",C1({},Be(n,!0),{className:S,d:x,role:"img"}))};function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M1.apply(this,arguments)}function VC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VC(Object(n),!0).forEach(function(r){AX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AX(e,t,n){return t=EX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EX(e){var t=_X(e,"string");return ju(t)=="symbol"?t:t+""}function _X(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GC={curveBasisClosed:Wq,curveBasisOpen:Yq,curveBasis:Hq,curveBumpX:Mq,curveBumpY:Dq,curveLinearClosed:Xq,curveLinear:wp,curveMonotoneX:Kq,curveMonotoneY:Qq,curveNatural:Jq,curveStep:Zq,curveStepAfter:tV,curveStepBefore:eV},kd=function(t){return t.x===+t.x&&t.y===+t.y},Bc=function(t){return t.x},Uc=function(t){return t.y},NX=function(t,n){if(Ue(t))return t;var r="curve".concat(xp(t));return(r==="curveMonotone"||r==="curveBump")&&n?GC["".concat(r).concat(n==="vertical"?"Y":"X")]:GC[r]||wp},kX=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,l=t.baseLine,u=t.layout,f=t.connectNulls,h=f===void 0?!1:f,y=NX(r,u),m=h?o.filter(function(w){return kd(w)}):o,g;if(Array.isArray(l)){var S=h?l.filter(function(w){return kd(w)}):l,T=m.map(function(w,x){return FC(FC({},w),{},{base:S[x]})});return u==="vertical"?g=Sd().y(Uc).x1(Bc).x0(function(w){return w.base.x}):g=Sd().x(Bc).y1(Uc).y0(function(w){return w.base.y}),g.defined(kd).curve(y),g(T)}return u==="vertical"&&pe(l)?g=Sd().y(Uc).x1(Bc).x0(l):pe(l)?g=Sd().x(Bc).y1(Uc).y0(l):g=wI().x(Bc).y(Uc),g.defined(kd).curve(y),g(m)},Xo=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var l=r&&r.length?kX(t):i;return z.createElement("path",M1({},Be(t,!1),Xd(t),{className:Xe("recharts-curve",n),d:l,ref:o}))},Y0={exports:{}},X0,HC;function CX(){if(HC)return X0;HC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return X0=e,X0}var K0,WC;function MX(){if(WC)return K0;WC=1;var e=CX();function t(){}function n(){}return n.resetWarningCache=t,K0=function(){function r(l,u,f,h,y,m){if(m!==e){var g=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 g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},K0}var YC;function DX(){return YC||(YC=1,Y0.exports=MX()()),Y0.exports}var RX=DX();const at=Tt(RX),{getOwnPropertyNames:IX,getOwnPropertySymbols:PX}=Object,{hasOwnProperty:BX}=Object.prototype;function Q0(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Cd(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,l=o.get(n),u=o.get(r);if(l&&u)return l===r&&u===n;o.set(n,r),o.set(r,n);const f=e(n,r,i);return o.delete(n),o.delete(r),f}}function UX(e){return e?.[Symbol.toStringTag]}function XC(e){return IX(e).concat(PX(e))}const LX=Object.hasOwn||((e,t)=>BX.call(e,t));function Vs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const zX="__v",$X="__o",qX="_owner",{getOwnPropertyDescriptor:KC,keys:QC}=Object;function VX(e,t){return e.byteLength===t.byteLength&&Ah(new Uint8Array(e),new Uint8Array(t))}function FX(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function GX(e,t){return e.byteLength===t.byteLength&&Ah(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function HX(e,t){return Vs(e.getTime(),t.getTime())}function WX(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function YX(e,t){return e===t}function JC(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let l,u,f=0;for(;(l=o.next())&&!l.done;){const h=t.entries();let y=!1,m=0;for(;(u=h.next())&&!u.done;){if(i[m]){m++;continue}const g=l.value,S=u.value;if(n.equals(g[0],S[0],f,m,e,t,n)&&n.equals(g[1],S[1],g[0],S[0],e,t,n)){y=i[m]=!0;break}m++}if(!y)return!1;f++}return!0}const XX=Vs;function KX(e,t,n){const r=QC(e);let i=r.length;if(QC(t).length!==i)return!1;for(;i-- >0;)if(!v3(e,t,n,r[i]))return!1;return!0}function Lc(e,t,n){const r=XC(e);let i=r.length;if(XC(t).length!==i)return!1;let o,l,u;for(;i-- >0;)if(o=r[i],!v3(e,t,n,o)||(l=KC(e,o),u=KC(t,o),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function QX(e,t){return Vs(e.valueOf(),t.valueOf())}function JX(e,t){return e.source===t.source&&e.flags===t.flags}function ZC(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let l,u;for(;(l=o.next())&&!l.done;){const f=t.values();let h=!1,y=0;for(;(u=f.next())&&!u.done;){if(!i[y]&&n.equals(l.value,u.value,l.value,u.value,e,t,n)){h=i[y]=!0;break}y++}if(!h)return!1}return!0}function Ah(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function ZX(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function v3(e,t,n,r){return(r===qX||r===$X||r===zX)&&(e.$$typeof||t.$$typeof)?!0:LX(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const eK="[object ArrayBuffer]",tK="[object Arguments]",nK="[object Boolean]",rK="[object DataView]",aK="[object Date]",iK="[object Error]",sK="[object Map]",oK="[object Number]",lK="[object Object]",cK="[object RegExp]",uK="[object Set]",fK="[object String]",dK={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},hK="[object URL]",pK=Object.prototype.toString;function mK({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:h,areRegExpsEqual:y,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:S,unknownTagComparators:T}){return function(x,O,E){if(x===O)return!0;if(x==null||O==null)return!1;const N=typeof x;if(N!==typeof O)return!1;if(N!=="object")return N==="number"?u(x,O,E):N==="function"?o(x,O,E):!1;const k=x.constructor;if(k!==O.constructor)return!1;if(k===Object)return f(x,O,E);if(Array.isArray(x))return t(x,O,E);if(k===Date)return r(x,O,E);if(k===RegExp)return y(x,O,E);if(k===Map)return l(x,O,E);if(k===Set)return m(x,O,E);const A=pK.call(x);if(A===aK)return r(x,O,E);if(A===cK)return y(x,O,E);if(A===sK)return l(x,O,E);if(A===uK)return m(x,O,E);if(A===lK)return typeof x.then!="function"&&typeof O.then!="function"&&f(x,O,E);if(A===hK)return S(x,O,E);if(A===iK)return i(x,O,E);if(A===tK)return f(x,O,E);if(dK[A])return g(x,O,E);if(A===eK)return e(x,O,E);if(A===rK)return n(x,O,E);if(A===nK||A===oK||A===fK)return h(x,O,E);if(T){let _=T[A];if(!_){const C=UX(x);C&&(_=T[C])}if(_)return _(x,O,E)}return!1}}function yK({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:VX,areArraysEqual:n?Lc:FX,areDataViewsEqual:GX,areDatesEqual:HX,areErrorsEqual:WX,areFunctionsEqual:YX,areMapsEqual:n?Q0(JC,Lc):JC,areNumbersEqual:XX,areObjectsEqual:n?Lc:KX,arePrimitiveWrappersEqual:QX,areRegExpsEqual:JX,areSetsEqual:n?Q0(ZC,Lc):ZC,areTypedArraysEqual:n?Q0(Ah,Lc):Ah,areUrlsEqual:ZX,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Cd(r.areArraysEqual),o=Cd(r.areMapsEqual),l=Cd(r.areObjectsEqual),u=Cd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return r}function vK(e){return function(t,n,r,i,o,l,u){return e(t,n,u)}}function gK({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(u,f){const{cache:h=e?new WeakMap:void 0,meta:y}=n();return t(u,f,{cache:h,equals:r,meta:y,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,f){return t(u,f,o)}}const bK=Xi();Xi({strict:!0});Xi({circular:!0});Xi({circular:!0,strict:!0});Xi({createInternalComparator:()=>Vs});Xi({strict:!0,createInternalComparator:()=>Vs});Xi({circular:!0,createInternalComparator:()=>Vs});Xi({circular:!0,createInternalComparator:()=>Vs,strict:!0});function Xi(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=yK(e),l=mK(o),u=n?n(l):vK(l);return gK({circular:t,comparator:l,createState:r,equals:u,strict:i})}function xK(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function eM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):xK(i)};requestAnimationFrame(r)}function D1(e){"@babel/helpers - typeof";return D1=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},D1(e)}function SK(e){return jK(e)||OK(e)||TK(e)||wK()}function wK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
432
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TK(e,t){if(e){if(typeof e=="string")return tM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tM(e,t)}}function tM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jK(e){if(Array.isArray(e))return e}function AK(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,u=SK(l),f=u[0],h=u.slice(1);if(typeof f=="number"){eM(i.bind(null,h),f);return}i(f),eM(i.bind(null,h));return}D1(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Au(e){"@babel/helpers - typeof";return Au=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},Au(e)}function nM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(n),!0).forEach(function(r){g3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g3(e,t,n){return t=EK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EK(e){var t=_K(e,"string");return Au(t)==="symbol"?t:String(t)}function _K(e,t){if(Au(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NK=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},kK=function(t){return t},CK=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Yc=function(t,n){return Object.keys(n).reduce(function(r,i){return rM(rM({},r),{},g3({},i,t(i,n[i])))},{})},aM=function(t,n,r){return t.map(function(i){return"".concat(CK(i)," ").concat(n,"ms ").concat(r)}).join(",")};function MK(e,t){return IK(e)||RK(e,t)||b3(e,t)||DK()}function DK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
433
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function IK(e){if(Array.isArray(e))return e}function PK(e){return LK(e)||UK(e)||b3(e)||BK()}function BK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
434
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b3(e,t){if(e){if(typeof e=="string")return R1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R1(e,t)}}function UK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LK(e){if(Array.isArray(e))return R1(e)}function R1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Eh=1e-4,x3=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},S3=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},iM=function(t,n){return function(r){var i=x3(t,n);return S3(i,r)}},zK=function(t,n){return function(r){var i=x3(t,n),o=[].concat(PK(i.map(function(l,u){return l*u}).slice(1)),[0]);return S3(o,r)}},sM=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],l=n[2],u=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,l=1,u=1;break;case"ease":i=.25,o=.1,l=.25,u=1;break;case"ease-in":i=.42,o=0,l=1,u=1;break;case"ease-out":i=.42,o=0,l=.58,u=1;break;case"ease-in-out":i=0,o=0,l=.58,u=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var h=f[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),y=MK(h,4);i=y[0],o=y[1],l=y[2],u=y[3]}}}var m=iM(i,l),g=iM(o,u),S=zK(i,l),T=function(O){return O>1?1:O<0?0:O},w=function(O){for(var E=O>1?1:O,N=E,k=0;k<8;++k){var A=m(N)-E,_=S(N);if(Math.abs(A-E)<Eh||_<Eh)return g(N);N=T(N-A/_)}return g(N)};return w.isStepper=!1,w},$K=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,l=t.dt,u=l===void 0?17:l,f=function(y,m,g){var S=-(y-m)*r,T=g*o,w=g+(S-T)*u/1e3,x=g*u/1e3+y;return Math.abs(x-m)<Eh&&Math.abs(w)<Eh?[m,0]:[x,w]};return f.isStepper=!0,f.dt=u,f},qK=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return sM(i);case"spring":return $K();default:if(i.split("(")[0]==="cubic-bezier")return sM(i)}return typeof i=="function"?i:null};function Eu(e){"@babel/helpers - typeof";return Eu=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},Eu(e)}function oM(e){return GK(e)||FK(e)||w3(e)||VK()}function VK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
435
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GK(e){if(Array.isArray(e))return P1(e)}function lM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lM(Object(n),!0).forEach(function(r){I1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I1(e,t,n){return t=HK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HK(e){var t=WK(e,"string");return Eu(t)==="symbol"?t:String(t)}function WK(e,t){if(Eu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YK(e,t){return QK(e)||KK(e,t)||w3(e,t)||XK()}function XK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
436
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w3(e,t){if(e){if(typeof e=="string")return P1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P1(e,t)}}function P1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function QK(e){if(Array.isArray(e))return e}var _h=function(t,n,r){return t+(n-t)*r},B1=function(t){var n=t.from,r=t.to;return n!==r},JK=function e(t,n,r){var i=Yc(function(o,l){if(B1(l)){var u=t(l.from,l.to,l.velocity),f=YK(u,2),h=f[0],y=f[1];return gn(gn({},l),{},{from:h,velocity:y})}return l},n);return r<1?Yc(function(o,l){return B1(l)?gn(gn({},l),{},{velocity:_h(l.velocity,i[o].velocity,r),from:_h(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const ZK=(function(e,t,n,r,i){var o=NK(e,t),l=o.reduce(function(x,O){return gn(gn({},x),{},I1({},O,[e[O],t[O]]))},{}),u=o.reduce(function(x,O){return gn(gn({},x),{},I1({},O,{from:e[O],velocity:0,to:t[O]}))},{}),f=-1,h,y,m=function(){return null},g=function(){return Yc(function(O,E){return E.from},u)},S=function(){return!Object.values(u).filter(B1).length},T=function(O){h||(h=O);var E=O-h,N=E/n.dt;u=JK(n,u,N),i(gn(gn(gn({},e),t),g())),h=O,S()||(f=requestAnimationFrame(m))},w=function(O){y||(y=O);var E=(O-y)/r,N=Yc(function(A,_){return _h.apply(void 0,oM(_).concat([n(E)]))},l);if(i(gn(gn(gn({},e),t),N)),E<1)f=requestAnimationFrame(m);else{var k=Yc(function(A,_){return _h.apply(void 0,oM(_).concat([n(1)]))},l);i(gn(gn(gn({},e),t),k))}};return m=n.isStepper?T:w,function(){return requestAnimationFrame(m),function(){cancelAnimationFrame(f)}}});function fl(e){"@babel/helpers - typeof";return fl=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},fl(e)}var eQ=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function tQ(e,t){if(e==null)return{};var n=nQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function J0(e){return sQ(e)||iQ(e)||aQ(e)||rQ()}function rQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
437
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aQ(e,t){if(e){if(typeof e=="string")return U1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U1(e,t)}}function iQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sQ(e){if(Array.isArray(e))return U1(e)}function U1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cM(Object(n),!0).forEach(function(r){Vc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vc(e,t,n){return t=T3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T3(r.key),r)}}function cQ(e,t,n){return t&&lQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T3(e){var t=uQ(e,"string");return fl(t)==="symbol"?t:String(t)}function uQ(e,t){if(fl(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fl(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L1(e,t)}function L1(e,t){return L1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},L1(e,t)}function dQ(e){var t=hQ();return function(){var r=Nh(e),i;if(t){var o=Nh(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return z1(this,i)}}function z1(e,t){if(t&&(fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $1(e)}function $1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hQ(){if(typeof Reflect>"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 Nh(e){return Nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nh(e)}var ya=(function(e){fQ(n,e);var t=dQ(n);function n(r,i){var o;oQ(this,n),o=t.call(this,r,i);var l=o.props,u=l.isActive,f=l.attributeName,h=l.from,y=l.to,m=l.steps,g=l.children,S=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind($1(o)),o.changeStyle=o.changeStyle.bind($1(o)),!u||S<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:y}),z1(o);if(m&&m.length)o.state={style:m[0].style};else if(h){if(typeof g=="function")return o.state={style:h},z1(o);o.state={style:f?Vc({},f,h):h}}else o.state={style:{}};return o}return cQ(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,l=i.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isActive,u=o.canBegin,f=o.attributeName,h=o.shouldReAnimate,y=o.to,m=o.from,g=this.state.style;if(u){if(!l){var S={style:f?Vc({},f,y):y};this.state&&g&&(f&&g[f]!==y||!f&&g!==y)&&this.setState(S);return}if(!(bK(i.to,y)&&i.canBegin&&i.isActive)){var T=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=T||h?m:i.to;if(this.state&&g){var x={style:f?Vc({},f,w):w};(f&&g[f]!==w||!f&&g!==w)&&this.setState(x)}this.runAnimation(Gr(Gr({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,l=i.from,u=i.to,f=i.duration,h=i.easing,y=i.begin,m=i.onAnimationEnd,g=i.onAnimationStart,S=ZK(l,u,qK(h),f,this.changeStyle),T=function(){o.stopJSAnimation=S()};this.manager.start([g,y,T,f,m])}},{key:"runStepAnimation",value:function(i){var o=this,l=i.steps,u=i.begin,f=i.onAnimationStart,h=l[0],y=h.style,m=h.duration,g=m===void 0?0:m,S=function(w,x,O){if(O===0)return w;var E=x.duration,N=x.easing,k=N===void 0?"ease":N,A=x.style,_=x.properties,C=x.onAnimationEnd,I=O>0?l[O-1]:x,q=_||Object.keys(A);if(typeof k=="function"||k==="spring")return[].concat(J0(w),[o.runJSAnimation.bind(o,{from:I.style,to:A,duration:E,easing:k}),E]);var G=aM(q,E,k),L=Gr(Gr(Gr({},I.style),A),{},{transition:G});return[].concat(J0(w),[L,E,C]).filter(kK)};return this.manager.start([f].concat(J0(l.reduce(S,[y,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=AK());var o=i.begin,l=i.duration,u=i.attributeName,f=i.to,h=i.easing,y=i.onAnimationStart,m=i.onAnimationEnd,g=i.steps,S=i.children,T=this.manager;if(this.unSubscribe=T.subscribe(this.handleStyleChange),typeof h=="function"||typeof S=="function"||h==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var w=u?Vc({},u,f):f,x=aM(Object.keys(w),l,h);T.start([y,o,Gr(Gr({},w),{},{transition:x}),l,m])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var l=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=tQ(i,eQ),h=z.Children.count(o),y=this.state.style;if(typeof o=="function")return o(y);if(!u||h===0||l<=0)return o;var m=function(S){var T=S.props,w=T.style,x=w===void 0?{}:w,O=T.className,E=z.cloneElement(S,Gr(Gr({},f),{},{style:Gr(Gr({},x),y),className:O}));return E};return h===1?m(z.Children.only(o)):W.createElement("div",null,z.Children.map(o,function(g){return m(g)}))}}]),n})(z.PureComponent);ya.displayName="Animate";ya.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ya.propTypes={from:at.oneOfType([at.object,at.string]),to:at.oneOfType([at.object,at.string]),attributeName:at.string,duration:at.number,begin:at.number,easing:at.oneOfType([at.string,at.func]),steps:at.arrayOf(at.shape({duration:at.number.isRequired,style:at.object.isRequired,easing:at.oneOfType([at.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),at.func]),properties:at.arrayOf("string"),onAnimationEnd:at.func})),children:at.oneOfType([at.node,at.func]),isActive:at.bool,canBegin:at.bool,onAnimationEnd:at.func,shouldReAnimate:at.bool,onAnimationStart:at.func,onAnimationReStart:at.func};function _u(e){"@babel/helpers - typeof";return _u=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},_u(e)}function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kh.apply(this,arguments)}function pQ(e,t){return gQ(e)||vQ(e,t)||yQ(e,t)||mQ()}function mQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
438
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yQ(e,t){if(e){if(typeof e=="string")return uM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uM(e,t)}}function uM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function gQ(e){if(Array.isArray(e))return e}function fM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fM(Object(n),!0).forEach(function(r){bQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bQ(e,t,n){return t=xQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xQ(e){var t=SQ(e,"string");return _u(t)=="symbol"?t:t+""}function SQ(e,t){if(_u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hM=function(t,n,r,i,o){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),u=i>=0?1:-1,f=r>=0?1:-1,h=i>=0&&r>=0||i<0&&r<0?1:0,y;if(l>0&&o instanceof Array){for(var m=[0,0,0,0],g=0,S=4;g<S;g++)m[g]=o[g]>l?l:o[g];y="M".concat(t,",").concat(n+u*m[0]),m[0]>0&&(y+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(h,",").concat(t+f*m[0],",").concat(n)),y+="L ".concat(t+r-f*m[1],",").concat(n),m[1]>0&&(y+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(h,`,
|
|
439
|
+
`).concat(t+r,",").concat(n+u*m[1])),y+="L ".concat(t+r,",").concat(n+i-u*m[2]),m[2]>0&&(y+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(h,`,
|
|
440
|
+
`).concat(t+r-f*m[2],",").concat(n+i)),y+="L ".concat(t+f*m[3],",").concat(n+i),m[3]>0&&(y+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(h,`,
|
|
441
|
+
`).concat(t,",").concat(n+i-u*m[3])),y+="Z"}else if(l>0&&o===+o&&o>0){var T=Math.min(l,o);y="M ".concat(t,",").concat(n+u*T,`
|
|
442
|
+
A `).concat(T,",").concat(T,",0,0,").concat(h,",").concat(t+f*T,",").concat(n,`
|
|
443
|
+
L `).concat(t+r-f*T,",").concat(n,`
|
|
444
|
+
A `).concat(T,",").concat(T,",0,0,").concat(h,",").concat(t+r,",").concat(n+u*T,`
|
|
445
|
+
L `).concat(t+r,",").concat(n+i-u*T,`
|
|
446
|
+
A `).concat(T,",").concat(T,",0,0,").concat(h,",").concat(t+r-f*T,",").concat(n+i,`
|
|
447
|
+
L `).concat(t+f*T,",").concat(n+i,`
|
|
448
|
+
A `).concat(T,",").concat(T,",0,0,").concat(h,",").concat(t,",").concat(n+i-u*T," Z")}else y="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return y},wQ=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,l=n.y,u=n.width,f=n.height;if(Math.abs(u)>0&&Math.abs(f)>0){var h=Math.min(o,o+u),y=Math.max(o,o+u),m=Math.min(l,l+f),g=Math.max(l,l+f);return r>=h&&r<=y&&i>=m&&i<=g}return!1},TQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Uw=function(t){var n=dM(dM({},TQ),t),r=z.useRef(),i=z.useState(-1),o=pQ(i,2),l=o[0],u=o[1];z.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&u(k)}catch{}},[]);var f=n.x,h=n.y,y=n.width,m=n.height,g=n.radius,S=n.className,T=n.animationEasing,w=n.animationDuration,x=n.animationBegin,O=n.isAnimationActive,E=n.isUpdateAnimationActive;if(f!==+f||h!==+h||y!==+y||m!==+m||y===0||m===0)return null;var N=Xe("recharts-rectangle",S);return E?W.createElement(ya,{canBegin:l>0,from:{width:y,height:m,x:f,y:h},to:{width:y,height:m,x:f,y:h},duration:w,animationEasing:T,isActive:E},function(k){var A=k.width,_=k.height,C=k.x,I=k.y;return W.createElement(ya,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:w,isActive:O,easing:T},W.createElement("path",kh({},Be(n,!0),{className:N,d:hM(C,I,A,_,g),ref:r})))}):W.createElement("path",kh({},Be(n,!0),{className:N,d:hM(f,h,y,m,g)}))};function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q1.apply(this,arguments)}var Pp=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,l=Xe("recharts-dot",o);return n===+n&&r===+r&&i===+i?z.createElement("circle",q1({},Be(t,!1),Xd(t),{className:l,cx:n,cy:r,r:i})):null};function Nu(e){"@babel/helpers - typeof";return Nu=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},Nu(e)}var OQ=["x","y","top","left","width","height","className"];function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V1.apply(this,arguments)}function pM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pM(Object(n),!0).forEach(function(r){AQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AQ(e,t,n){return t=EQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EQ(e){var t=_Q(e,"string");return Nu(t)=="symbol"?t:t+""}function _Q(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NQ(e,t){if(e==null)return{};var n=kQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var CQ=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},MQ=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.top,u=l===void 0?0:l,f=t.left,h=f===void 0?0:f,y=t.width,m=y===void 0?0:y,g=t.height,S=g===void 0?0:g,T=t.className,w=NQ(t,OQ),x=jQ({x:r,y:o,top:u,left:h,width:m,height:S},w);return!pe(r)||!pe(o)||!pe(m)||!pe(S)||!pe(u)||!pe(h)?null:W.createElement("path",V1({},Be(x,!0),{className:Xe("recharts-cross",T),d:CQ(r,o,m,S,u,h)}))},Z0,mM;function DQ(){if(mM)return Z0;mM=1;var e=GI(),t=e(Object.getPrototypeOf,Object);return Z0=t,Z0}var ex,yM;function RQ(){if(yM)return ex;yM=1;var e=ri(),t=DQ(),n=ai(),r="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,f=l.call(Object);function h(y){if(!n(y)||e(y)!=r)return!1;var m=t(y);if(m===null)return!0;var g=u.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return ex=h,ex}var IQ=RQ();const PQ=Tt(IQ);var tx,vM;function BQ(){if(vM)return tx;vM=1;var e=ri(),t=ai(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return tx=r,tx}var UQ=BQ();const LQ=Tt(UQ);function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ch.apply(this,arguments)}function zQ(e,t){return FQ(e)||VQ(e,t)||qQ(e,t)||$Q()}function $Q(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
449
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qQ(e,t){if(e){if(typeof e=="string")return gM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gM(e,t)}}function gM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VQ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function FQ(e){if(Array.isArray(e))return e}function bM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bM(Object(n),!0).forEach(function(r){GQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GQ(e,t,n){return t=HQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HQ(e){var t=WQ(e,"string");return ku(t)=="symbol"?t:t+""}function WQ(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SM=function(t,n,r,i,o){var l=r-i,u;return u="M ".concat(t,",").concat(n),u+="L ".concat(t+r,",").concat(n),u+="L ".concat(t+r-l/2,",").concat(n+o),u+="L ".concat(t+r-l/2-i,",").concat(n+o),u+="L ".concat(t,",").concat(n," Z"),u},YQ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},XQ=function(t){var n=xM(xM({},YQ),t),r=z.useRef(),i=z.useState(-1),o=zQ(i,2),l=o[0],u=o[1];z.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&u(N)}catch{}},[]);var f=n.x,h=n.y,y=n.upperWidth,m=n.lowerWidth,g=n.height,S=n.className,T=n.animationEasing,w=n.animationDuration,x=n.animationBegin,O=n.isUpdateAnimationActive;if(f!==+f||h!==+h||y!==+y||m!==+m||g!==+g||y===0&&m===0||g===0)return null;var E=Xe("recharts-trapezoid",S);return O?W.createElement(ya,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:h},to:{upperWidth:y,lowerWidth:m,height:g,x:f,y:h},duration:w,animationEasing:T,isActive:O},function(N){var k=N.upperWidth,A=N.lowerWidth,_=N.height,C=N.x,I=N.y;return W.createElement(ya,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:w,easing:T},W.createElement("path",Ch({},Be(n,!0),{className:E,d:SM(C,I,k,A,_),ref:r})))}):W.createElement("g",null,W.createElement("path",Ch({},Be(n,!0),{className:E,d:SM(f,h,y,m,g)})))},KQ=["option","shapeType","propTransformer","activeClassName","isActive"];function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}function QQ(e,t){if(e==null)return{};var n=JQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wM(Object(n),!0).forEach(function(r){ZQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZQ(e,t,n){return t=eJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eJ(e){var t=tJ(e,"string");return Cu(t)=="symbol"?t:t+""}function tJ(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nJ(e,t){return Mh(Mh({},t),e)}function rJ(e,t){return e==="symbols"}function TM(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return W.createElement(Uw,n);case"trapezoid":return W.createElement(XQ,n);case"sector":return W.createElement(y3,n);case"symbols":if(rJ(t))return W.createElement(rw,n);break;default:return null}}function aJ(e){return z.isValidElement(e)?e.props:e}function iJ(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?nJ:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,f=QQ(e,KQ),h;if(z.isValidElement(t))h=z.cloneElement(t,Mh(Mh({},f),aJ(t)));else if(Ue(t))h=t(f);else if(PQ(t)&&!LQ(t)){var y=i(t,f);h=W.createElement(TM,{shapeType:n,elementProps:y})}else{var m=f;h=W.createElement(TM,{shapeType:n,elementProps:m})}return u?W.createElement(wt,{className:l},h):h}function Bp(e,t){return t!=null&&"trapezoids"in e.props}function Up(e,t){return t!=null&&"sectors"in e.props}function Mu(e,t){return t!=null&&"points"in e.props}function sJ(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function oJ(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function lJ(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function cJ(e,t){var n;return Bp(e,t)?n=sJ:Up(e,t)?n=oJ:Mu(e,t)&&(n=lJ),n}function uJ(e,t){var n;return Bp(e,t)?n="trapezoids":Up(e,t)?n="sectors":Mu(e,t)&&(n="points"),n}function fJ(e,t){if(Bp(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Up(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Mu(e,t)?t.payload:{}}function dJ(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=uJ(n,t),o=fJ(n,t),l=r.filter(function(f,h){var y=cl(o,f),m=n.props[i].filter(function(T){var w=cJ(n,t);return w(T,t)}),g=n.props[i].indexOf(m[m.length-1]),S=h===g;return y&&S}),u=r.indexOf(l[l.length-1]);return u}var nx,OM;function hJ(){if(OM)return nx;OM=1;var e=Math.ceil,t=Math.max;function n(r,i,o,l){for(var u=-1,f=t(e((i-r)/(o||1)),0),h=Array(f);f--;)h[l?f:++u]=r,r+=o;return h}return nx=n,nx}var rx,jM;function O3(){if(jM)return rx;jM=1;var e=oP(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return rx=r,rx}var ax,AM;function pJ(){if(AM)return ax;AM=1;var e=hJ(),t=Ap(),n=O3();function r(i){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),u=u===void 0?o<l?1:-1:n(u),e(o,l,u,i)}}return ax=r,ax}var ix,EM;function mJ(){if(EM)return ix;EM=1;var e=pJ(),t=e();return ix=t,ix}var yJ=mJ();const Dh=Tt(yJ);function Du(e){"@babel/helpers - typeof";return Du=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},Du(e)}function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(n),!0).forEach(function(r){j3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j3(e,t,n){return t=vJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vJ(e){var t=gJ(e,"string");return Du(t)=="symbol"?t:t+""}function gJ(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bJ=["Webkit","Moz","O","ms"],xJ=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=bJ.reduce(function(o,l){return NM(NM({},o),{},j3({},l+r,n))},{});return i[t]=n,i};function dl(e){"@babel/helpers - typeof";return dl=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},dl(e)}function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rh.apply(this,arguments)}function kM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E3(r.key),r)}}function wJ(e,t,n){return t&&CM(e.prototype,t),n&&CM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TJ(e,t,n){return t=Ih(t),OJ(e,A3()?Reflect.construct(t,n||[],Ih(e).constructor):t.apply(e,n))}function OJ(e,t){if(t&&(dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jJ(e)}function jJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A3=function(){return!!e})()}function Ih(e){return Ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ih(e)}function AJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F1(e,t)}function F1(e,t){return F1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},F1(e,t)}function ur(e,t,n){return t=E3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E3(e){var t=EJ(e,"string");return dl(t)=="symbol"?t:t+""}function EJ(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _J=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,h=Hc().domain(Dh(0,f)).range([o,o+l-u]),y=h.domain().map(function(m){return h(m)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:h(r),endX:h(i),scale:h,scaleValues:y}},MM=function(t){return t.changedTouches&&!!t.changedTouches.length},hl=(function(e){function t(n){var r;return SJ(this,t),r=TJ(this,t,[n]),ur(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),ur(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),ur(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,l=i.onDragEnd,u=i.startIndex;l?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),ur(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ur(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ur(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ur(r,"handleSlideDragStart",function(i){var o=MM(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return AJ(t,e),wJ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,l=this.state.scaleValues,u=this.props,f=u.gap,h=u.data,y=h.length-1,m=Math.min(i,o),g=Math.max(i,o),S=t.getIndexInRange(l,m),T=t.getIndexInRange(l,g);return{startIndex:S-S%f,endIndex:T===y?y:T-T%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,u=i.dataKey,f=Bn(o[r],u,r);return Ue(l)?l(f,r):f}},{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(r){var i=this.state,o=i.slideMoveStartX,l=i.startX,u=i.endX,f=this.props,h=f.x,y=f.width,m=f.travellerWidth,g=f.startIndex,S=f.endIndex,T=f.onChange,w=r.pageX-o;w>0?w=Math.min(w,h+y-m-u,h+y-m-l):w<0&&(w=Math.max(w,h-l,h-u));var x=this.getIndex({startX:l+w,endX:u+w});(x.startIndex!==g||x.endIndex!==S)&&T&&T(x),this.setState({startX:l+w,endX:u+w,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=MM(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,l=i.movingTravellerId,u=i.endX,f=i.startX,h=this.state[l],y=this.props,m=y.x,g=y.width,S=y.travellerWidth,T=y.onChange,w=y.gap,x=y.data,O={startX:this.state.startX,endX:this.state.endX},E=r.pageX-o;E>0?E=Math.min(E,m+g-S-h):E<0&&(E=Math.max(E,m-h)),O[l]=h+E;var N=this.getIndex(O),k=N.startIndex,A=N.endIndex,_=function(){var I=x.length-1;return l==="startX"&&(u>f?k%w===0:A%w===0)||u<f&&A===I||l==="endX"&&(u>f?A%w===0:k%w===0)||u>f&&A===I};this.setState(ur(ur({},l,h+E),"brushMoveStartX",r.pageX),function(){T&&_()&&T(N)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,l=this.state,u=l.scaleValues,f=l.startX,h=l.endX,y=this.state[i],m=u.indexOf(y);if(m!==-1){var g=m+r;if(!(g===-1||g>=u.length)){var S=u[g];i==="startX"&&S>=h||i==="endX"&&S<=f||this.setState(ur({},i,S),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.fill,h=r.stroke;return W.createElement("rect",{stroke:h,fill:f,x:i,y:o,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.data,h=r.children,y=r.padding,m=z.Children.only(h);return m?W.cloneElement(m,{x:i,y:o,width:l,height:u,margin:y,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,l,u=this,f=this.props,h=f.y,y=f.travellerWidth,m=f.height,g=f.traveller,S=f.ariaLabel,T=f.data,w=f.startIndex,x=f.endIndex,O=Math.max(r,this.props.x),E=sx(sx({},Be(this.props,!1)),{},{x:O,y:h,width:y,height:m}),N=S||"Min value: ".concat((o=T[w])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=T[x])===null||l===void 0?void 0:l.name);return W.createElement(wt,{tabIndex:0,role:"slider","aria-label":N,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),u.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,E))}},{key:"renderSlide",value:function(r,i){var o=this.props,l=o.y,u=o.height,f=o.stroke,h=o.travellerWidth,y=Math.min(r,i)+h,m=Math.max(Math.abs(i-r)-h,0);return W.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:y,y:l,width:m,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,l=r.y,u=r.height,f=r.travellerWidth,h=r.stroke,y=this.state,m=y.startX,g=y.endX,S=5,T={pointerEvents:"none",fill:h};return W.createElement(wt,{className:"recharts-brush-texts"},W.createElement(oh,Rh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,g)-S,y:l+u/2},T),this.getTextOfTick(i)),W.createElement(oh,Rh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,g)+f+S,y:l+u/2},T),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,l=r.children,u=r.x,f=r.y,h=r.width,y=r.height,m=r.alwaysShowText,g=this.state,S=g.startX,T=g.endX,w=g.isTextActive,x=g.isSlideMoving,O=g.isTravellerMoving,E=g.isTravellerFocused;if(!i||!i.length||!pe(u)||!pe(f)||!pe(h)||!pe(y)||h<=0||y<=0)return null;var N=Xe("recharts-brush",o),k=W.Children.count(l)===1,A=xJ("userSelect","none");return W.createElement(wt,{className:N,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),k&&this.renderPanorama(),this.renderSlide(S,T),this.renderTravellerLayer(S,"startX"),this.renderTravellerLayer(T,"endX"),(w||x||O||E||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,l=r.width,u=r.height,f=r.stroke,h=Math.floor(o+u/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:i,y:o,width:l,height:u,fill:f,stroke:"none"}),W.createElement("line",{x1:i+1,y1:h,x2:i+l-1,y2:h,fill:"none",stroke:"#fff"}),W.createElement("line",{x1:i+1,y1:h+2,x2:i+l-1,y2:h+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return W.isValidElement(r)?o=W.cloneElement(r,i):Ue(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,l=r.width,u=r.x,f=r.travellerWidth,h=r.updateId,y=r.startIndex,m=r.endIndex;if(o!==i.prevData||h!==i.prevUpdateId)return sx({prevData:o,prevTravellerWidth:f,prevUpdateId:h,prevX:u,prevWidth:l},o&&o.length?_J({data:o,width:l,x:u,travellerWidth:f,startIndex:y,endIndex:m}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||u!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([u,u+l-f]);var g=i.scale.domain().map(function(S){return i.scale(S)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:h,prevX:u,prevWidth:l,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,l=0,u=o-1;u-l>1;){var f=Math.floor((l+u)/2);r[f]>i?u=f:l=f}return i>=r[u]?u:l}}])})(z.PureComponent);ur(hl,"displayName","Brush");ur(hl,"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 ox,DM;function NJ(){if(DM)return ox;DM=1;var e=uw();function t(n,r){var i;return e(n,function(o,l,u){return i=r(o,l,u),!i}),!!i}return ox=t,ox}var lx,RM;function kJ(){if(RM)return lx;RM=1;var e=UI(),t=Hi(),n=NJ(),r=Zn(),i=Ap();function o(l,u,f){var h=r(l)?e:n;return f&&i(l,u,f)&&(u=void 0),h(l,t(u,3))}return lx=o,lx}var CJ=kJ();const MJ=Tt(CJ);var da=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},cx,IM;function DJ(){if(IM)return cx;IM=1;var e=nP();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return cx=t,cx}var ux,PM;function RJ(){if(PM)return ux;PM=1;var e=DJ(),t=eP(),n=Hi();function r(i,o){var l={};return o=n(o,3),t(i,function(u,f,h){e(l,f,o(u,f,h))}),l}return ux=r,ux}var IJ=RJ();const PJ=Tt(IJ);var fx,BM;function BJ(){if(BM)return fx;BM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return fx=e,fx}var dx,UM;function UJ(){if(UM)return dx;UM=1;var e=uw();function t(n,r){var i=!0;return e(n,function(o,l,u){return i=!!r(o,l,u),i}),i}return dx=t,dx}var hx,LM;function LJ(){if(LM)return hx;LM=1;var e=BJ(),t=UJ(),n=Hi(),r=Zn(),i=Ap();function o(l,u,f){var h=r(l)?e:t;return f&&i(l,u,f)&&(u=void 0),h(l,n(u,3))}return hx=o,hx}var zJ=LJ();const $J=Tt(zJ);var qJ=["x","y"];function Ru(e){"@babel/helpers - typeof";return Ru=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},Ru(e)}function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G1.apply(this,arguments)}function zM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zM(Object(n),!0).forEach(function(r){VJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VJ(e,t,n){return t=FJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FJ(e){var t=GJ(e,"string");return Ru(t)=="symbol"?t:t+""}function GJ(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HJ(e,t){if(e==null)return{};var n=WJ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function YJ(e,t){var n=e.x,r=e.y,i=HJ(e,qJ),o="".concat(n),l=parseInt(o,10),u="".concat(r),f=parseInt(u,10),h="".concat(t.height||i.height),y=parseInt(h,10),m="".concat(t.width||i.width),g=parseInt(m,10);return zc(zc(zc(zc(zc({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:y,width:g,name:t.name,radius:t.radius})}function $M(e){return W.createElement(iJ,G1({shapeType:"rectangle",propTransformer:YJ,activeClassName:"recharts-active-bar"},e))}var XJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=pe(r)||eq(r);return o?t(r,i):(o||Ps(),n)}},KJ=["value","background"],_3;function pl(e){"@babel/helpers - typeof";return pl=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},pl(e)}function QJ(e,t){if(e==null)return{};var n=JJ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ph.apply(this,arguments)}function qM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(r){Ui(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k3(r.key),r)}}function eZ(e,t,n){return t&&VM(e.prototype,t),n&&VM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tZ(e,t,n){return t=Bh(t),nZ(e,N3()?Reflect.construct(t,n||[],Bh(e).constructor):t.apply(e,n))}function nZ(e,t){if(t&&(pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rZ(e)}function rZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N3=function(){return!!e})()}function Bh(e){return Bh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bh(e)}function aZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H1(e,t)}function H1(e,t){return H1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},H1(e,t)}function Ui(e,t,n){return t=k3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k3(e){var t=iZ(e,"string");return pl(t)=="symbol"?t:t+""}function iZ(e,t){if(pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xu=(function(e){function t(){var n;ZJ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=tZ(this,t,[].concat(i)),Ui(n,"state",{isAnimationFinished:!1}),Ui(n,"id",kl("recharts-bar-")),Ui(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Ui(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return aZ(t,e),eZ(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,l=o.shape,u=o.dataKey,f=o.activeIndex,h=o.activeBar,y=Be(this.props,!1);return r&&r.map(function(m,g){var S=g===f,T=S?h:l,w=Yt(Yt(Yt({},y),m),{},{isActive:S,option:T,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return W.createElement(wt,Ph({className:"recharts-bar-rectangle"},Kd(i.props,m,g),{key:"rectangle-".concat(m?.x,"-").concat(m?.y,"-").concat(m?.value,"-").concat(g)}),W.createElement($M,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,l=i.layout,u=i.isAnimationActive,f=i.animationBegin,h=i.animationDuration,y=i.animationEasing,m=i.animationId,g=this.state.prevData;return W.createElement(ya,{begin:f,duration:h,isActive:u,easing:y,from:{t:0},to:{t:1},key:"bar-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var T=S.t,w=o.map(function(x,O){var E=g&&g[O];if(E){var N=xn(E.x,x.x),k=xn(E.y,x.y),A=xn(E.width,x.width),_=xn(E.height,x.height);return Yt(Yt({},x),{},{x:N(T),y:k(T),width:A(T),height:_(T)})}if(l==="horizontal"){var C=xn(0,x.height),I=C(T);return Yt(Yt({},x),{},{y:x.y+x.height-I,height:I})}var q=xn(0,x.width),G=q(T);return Yt(Yt({},x),{},{width:G})});return W.createElement(wt,null,r.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&i&&i.length&&(!l||!cl(l,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,l=i.dataKey,u=i.activeIndex,f=Be(this.props.background,!1);return o.map(function(h,y){h.value;var m=h.background,g=QJ(h,KJ);if(!m)return null;var S=Yt(Yt(Yt(Yt(Yt({},g),{},{fill:"#eee"},m),f),Kd(r.props,h,y)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:y,className:"recharts-bar-background-rectangle"});return W.createElement($M,Ph({key:"background-bar-".concat(y),option:r.props.background,isActive:y===u},S))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,u=o.xAxis,f=o.yAxis,h=o.layout,y=o.children,m=Ir(y,Yu);if(!m)return null;var g=h==="vertical"?l[0].height/2:l[0].width/2,S=function(x,O){var E=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:E,errorVal:Bn(x,O)}},T={clipPath:r?"url(#clipPath-".concat(i,")"):null};return W.createElement(wt,T,m.map(function(w){return W.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:l,xAxis:u,yAxis:f,layout:h,offset:g,dataPointFormatter:S})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,l=r.className,u=r.xAxis,f=r.yAxis,h=r.left,y=r.top,m=r.width,g=r.height,S=r.isAnimationActive,T=r.background,w=r.id;if(i||!o||!o.length)return null;var x=this.state.isAnimationFinished,O=Xe("recharts-bar",l),E=u&&u.allowDataOverflow,N=f&&f.allowDataOverflow,k=E||N,A=Le(w)?this.id:w;return W.createElement(wt,{className:O},E||N?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(A)},W.createElement("rect",{x:E?h:h-m/2,y:N?y:y-g/2,width:E?m:m*2,height:N?g:g*2}))):null,W.createElement(wt,{className:"recharts-bar-rectangles",clipPath:k?"url(#clipPath-".concat(A,")"):null},T?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(k,A),(!S||x)&&Ka.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(z.PureComponent);_3=Xu;Ui(Xu,"displayName","Bar");Ui(Xu,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!zs.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ui(Xu,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,l=e.yAxis,u=e.xAxisTicks,f=e.yAxisTicks,h=e.stackedData,y=e.dataStartIndex,m=e.displayedData,g=e.offset,S=bY(r,n);if(!S)return null;var T=t.layout,w=n.type.defaultProps,x=w!==void 0?Yt(Yt({},w),n.props):n.props,O=x.dataKey,E=x.children,N=x.minPointSize,k=T==="horizontal"?l:o,A=h?k.scale.domain():null,_=EY({numericAxis:k}),C=Ir(E,cP),I=m.map(function(q,G){var L,P,H,F,K,B;h?L=xY(h[y+G],A):(L=Bn(q,O),Array.isArray(L)||(L=[_,L]));var D=XJ(N,_3.defaultProps.minPointSize)(L[1],G);if(T==="horizontal"){var Q,se=[l.scale(L[0]),l.scale(L[1])],ce=se[0],U=se[1];P=NC({axis:o,ticks:u,bandSize:i,offset:S.offset,entry:q,index:G}),H=(Q=U??ce)!==null&&Q!==void 0?Q:void 0,F=S.size;var Y=ce-U;if(K=Number.isNaN(Y)?0:Y,B={x:P,y:l.y,width:F,height:l.height},Math.abs(D)>0&&Math.abs(K)<Math.abs(D)){var ae=Qr(K||D)*(Math.abs(D)-Math.abs(K));H-=ae,K+=ae}}else{var he=[o.scale(L[0]),o.scale(L[1])],Se=he[0],Ae=he[1];if(P=Se,H=NC({axis:l,ticks:f,bandSize:i,offset:S.offset,entry:q,index:G}),F=Ae-Se,K=S.size,B={x:o.x,y:H,width:o.width,height:K},Math.abs(D)>0&&Math.abs(F)<Math.abs(D)){var ze=Qr(F||D)*(Math.abs(D)-Math.abs(F));F+=ze}}return Yt(Yt(Yt({},q),{},{x:P,y:H,width:F,height:K,value:h?L:L[1],payload:q,background:B},C&&C[G]&&C[G].props),{},{tooltipPayload:[h3(n,q)],tooltipPosition:{x:P+F/2,y:H+K/2}})});return Yt({data:I,layout:T},g)});function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function sZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C3(r.key),r)}}function oZ(e,t,n){return t&&FM(e.prototype,t),n&&FM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function GM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(n),!0).forEach(function(r){Lp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lp(e,t,n){return t=C3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C3(e){var t=lZ(e,"string");return Iu(t)=="symbol"?t:t+""}function lZ(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M3=function(t,n,r,i,o){var l=t.width,u=t.height,f=t.layout,h=t.children,y=Object.keys(n),m={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:u-r.bottom,bottomMirror:u-r.bottom},g=!!fr(h,Xu);return y.reduce(function(S,T){var w=n[T],x=w.orientation,O=w.domain,E=w.padding,N=E===void 0?{}:E,k=w.mirror,A=w.reversed,_="".concat(x).concat(k?"Mirror":""),C,I,q,G,L;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var P=O[1]-O[0],H=1/0,F=w.categoricalDomain.sort(rq);if(F.forEach(function(he,Se){Se>0&&(H=Math.min((he||0)-(F[Se-1]||0),H))}),Number.isFinite(H)){var K=H/P,B=w.layout==="vertical"?r.height:r.width;if(w.padding==="gap"&&(C=K*B/2),w.padding==="no-gap"){var D=Rs(t.barCategoryGap,K*B),Q=K*B/2;C=Q-D-(Q-D)/B*D}}}i==="xAxis"?I=[r.left+(N.left||0)+(C||0),r.left+r.width-(N.right||0)-(C||0)]:i==="yAxis"?I=f==="horizontal"?[r.top+r.height-(N.bottom||0),r.top+(N.top||0)]:[r.top+(N.top||0)+(C||0),r.top+r.height-(N.bottom||0)-(C||0)]:I=w.range,A&&(I=[I[1],I[0]]);var se=vY(w,o,g),ce=se.scale,U=se.realScaleType;ce.domain(O).range(I),gY(ce);var Y=AY(ce,Hr(Hr({},w),{},{realScaleType:U}));i==="xAxis"?(L=x==="top"&&!k||x==="bottom"&&k,q=r.left,G=m[_]-L*w.height):i==="yAxis"&&(L=x==="left"&&!k||x==="right"&&k,q=m[_]-L*w.width,G=r.top);var ae=Hr(Hr(Hr({},w),Y),{},{realScaleType:U,x:q,y:G,scale:ce,width:i==="xAxis"?r.width:w.width,height:i==="yAxis"?r.height:w.height});return ae.bandSize=Th(ae,Y),!w.hide&&i==="xAxis"?m[_]+=(L?-1:1)*ae.height:w.hide||(m[_]+=(L?-1:1)*ae.width),Hr(Hr({},S),{},Lp({},T,ae))},{})},D3=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(i,l),width:Math.abs(o-r),height:Math.abs(l-i)}},cZ=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return D3({x:n,y:r},{x:i,y:o})},R3=(function(){function e(t){sZ(this,e),this.scale=t}return oZ(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(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Lp(R3,"EPS",1e-4);var Lw=function(t){var n=Object.keys(t).reduce(function(r,i){return Hr(Hr({},r),{},Lp({},i,R3.create(t[i])))},{});return Hr(Hr({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,u=o.position;return PJ(i,function(f,h){return n[h].apply(f,{bandAware:l,position:u})})},isInRange:function(i){return $J(i,function(o,l){return n[l].isInRange(o)})}})};function uZ(e){return(e%180+180)%180}var fZ=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=uZ(i),l=o*Math.PI/180,u=Math.atan(r/n),f=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},px,HM;function dZ(){if(HM)return px;HM=1;var e=Hi(),t=Vu(),n=Op();function r(i){return function(o,l,u){var f=Object(o);if(!t(o)){var h=e(l,3);o=n(o),l=function(m){return h(f[m],m,f)}}var y=i(o,l,u);return y>-1?f[h?o[y]:y]:void 0}}return px=r,px}var mx,WM;function hZ(){if(WM)return mx;WM=1;var e=O3();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return mx=t,mx}var yx,YM;function pZ(){if(YM)return yx;YM=1;var e=XI(),t=Hi(),n=hZ(),r=Math.max;function i(o,l,u){var f=o==null?0:o.length;if(!f)return-1;var h=u==null?0:n(u);return h<0&&(h=r(f+h,0)),e(o,t(l,3),h)}return yx=i,yx}var vx,XM;function mZ(){if(XM)return vx;XM=1;var e=dZ(),t=pZ(),n=e(t);return vx=n,vx}mZ();var yZ=uI();const vZ=Tt(yZ);var gZ=vZ(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),I3=z.createContext(void 0),P3=z.createContext(void 0),B3=z.createContext(void 0),bZ=z.createContext({}),U3=z.createContext(void 0),L3=z.createContext(0),z3=z.createContext(0),KM=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,f=t.width,h=t.height,y=gZ(o);return W.createElement(I3.Provider,{value:r},W.createElement(P3.Provider,{value:i},W.createElement(bZ.Provider,{value:o},W.createElement(B3.Provider,{value:y},W.createElement(U3.Provider,{value:l},W.createElement(L3.Provider,{value:h},W.createElement(z3.Provider,{value:f},u)))))))},xZ=function(){return z.useContext(U3)},$3=function(t){var n=z.useContext(I3);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},q3=function(t){var n=z.useContext(P3);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},SZ=function(){var t=z.useContext(B3);return t},V3=function(){return z.useContext(z3)},F3=function(){return z.useContext(L3)};function ml(e){"@babel/helpers - typeof";return ml=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},ml(e)}function wZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H3(r.key),r)}}function OZ(e,t,n){return t&&TZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jZ(e,t,n){return t=Uh(t),AZ(e,G3()?Reflect.construct(t,n||[],Uh(e).constructor):t.apply(e,n))}function AZ(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EZ(e)}function EZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G3=function(){return!!e})()}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uh(e)}function _Z(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W1(e,t)}function W1(e,t){return W1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},W1(e,t)}function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function JM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(n),!0).forEach(function(r){zw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zw(e,t,n){return t=H3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H3(e){var t=NZ(e,"string");return ml(t)=="symbol"?t:t+""}function NZ(e,t){if(ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kZ(e,t){return RZ(e)||DZ(e,t)||MZ(e,t)||CZ()}function CZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
450
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MZ(e,t){if(e){if(typeof e=="string")return ZM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZM(e,t)}}function ZM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function RZ(e){if(Array.isArray(e))return e}function Y1(){return Y1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y1.apply(this,arguments)}var IZ=function(t,n){var r;return W.isValidElement(t)?r=W.cloneElement(t,n):Ue(t)?r=t(n):r=W.createElement("line",Y1({},n,{className:"recharts-reference-line-line"})),r},PZ=function(t,n,r,i,o,l,u,f,h){var y=o.x,m=o.y,g=o.width,S=o.height;if(r){var T=h.y,w=t.y.apply(T,{position:l});if(da(h,"discard")&&!t.y.isInRange(w))return null;var x=[{x:y+g,y:w},{x:y,y:w}];return f==="left"?x.reverse():x}if(n){var O=h.x,E=t.x.apply(O,{position:l});if(da(h,"discard")&&!t.x.isInRange(E))return null;var N=[{x:E,y:m+S},{x:E,y:m}];return u==="top"?N.reverse():N}if(i){var k=h.segment,A=k.map(function(_){return t.apply(_,{position:l})});return da(h,"discard")&&MJ(A,function(_){return!t.isInRange(_)})?null:A}return null};function BZ(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,f=e.alwaysShow,h=xZ(),y=$3(i),m=q3(o),g=SZ();if(!h||!g)return null;As(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var S=Lw({x:y.scale,y:m.scale}),T=nn(t),w=nn(n),x=r&&r.length===2,O=PZ(S,T,w,x,g,e.position,y.orientation,m.orientation,e);if(!O)return null;var E=kZ(O,2),N=E[0],k=N.x,A=N.y,_=E[1],C=_.x,I=_.y,q=da(e,"hidden")?"url(#".concat(h,")"):void 0,G=JM(JM({clipPath:q},Be(e,!0)),{},{x1:k,y1:A,x2:C,y2:I});return W.createElement(wt,{className:Xe("recharts-reference-line",u)},IZ(l,G),An.renderCallByParent(e,cZ({x1:k,y1:A,x2:C,y2:I})))}var $w=(function(e){function t(){return wZ(this,t),jZ(this,t,arguments)}return _Z(t,e),OZ(t,[{key:"render",value:function(){return W.createElement(BZ,this.props)}}])})(W.Component);zw($w,"displayName","ReferenceLine");zw($w,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function X1(){return X1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X1.apply(this,arguments)}function yl(e){"@babel/helpers - typeof";return yl=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},yl(e)}function eD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eD(Object(n),!0).forEach(function(r){zp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y3(r.key),r)}}function zZ(e,t,n){return t&&LZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Z(e,t,n){return t=Lh(t),qZ(e,W3()?Reflect.construct(t,n||[],Lh(e).constructor):t.apply(e,n))}function qZ(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VZ(e)}function VZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W3=function(){return!!e})()}function Lh(e){return Lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lh(e)}function FZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K1(e,t)}function K1(e,t){return K1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},K1(e,t)}function zp(e,t,n){return t=Y3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y3(e){var t=GZ(e,"string");return yl(t)=="symbol"?t:t+""}function GZ(e,t){if(yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HZ=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=Lw({x:i.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return da(t,"discard")&&!l.isInRange(u)?null:u},$p=(function(e){function t(){return UZ(this,t),$Z(this,t,arguments)}return FZ(t,e),zZ(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,l=r.r,u=r.alwaysShow,f=r.clipPathId,h=nn(i),y=nn(o);if(As(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!h||!y)return null;var m=HZ(this.props);if(!m)return null;var g=m.x,S=m.y,T=this.props,w=T.shape,x=T.className,O=da(this.props,"hidden")?"url(#".concat(f,")"):void 0,E=tD(tD({clipPath:O},Be(this.props,!0)),{},{cx:g,cy:S});return W.createElement(wt,{className:Xe("recharts-reference-dot",x)},t.renderDot(w,E),An.renderCallByParent(this.props,{x:g-l,y:S-l,width:2*l,height:2*l}))}}])})(W.Component);zp($p,"displayName","ReferenceDot");zp($p,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});zp($p,"renderDot",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Ue(e)?n=e(t):n=W.createElement(Pp,X1({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Q1(){return Q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q1.apply(this,arguments)}function vl(e){"@babel/helpers - typeof";return vl=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},vl(e)}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nD(Object(n),!0).forEach(function(r){qp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K3(r.key),r)}}function XZ(e,t,n){return t&&YZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KZ(e,t,n){return t=zh(t),QZ(e,X3()?Reflect.construct(t,n||[],zh(e).constructor):t.apply(e,n))}function QZ(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JZ(e)}function JZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X3=function(){return!!e})()}function zh(e){return zh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zh(e)}function ZZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J1(e,t)}function J1(e,t){return J1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},J1(e,t)}function qp(e,t,n){return t=K3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K3(e){var t=eee(e,"string");return vl(t)=="symbol"?t:t+""}function eee(e,t){if(vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tee=function(t,n,r,i,o){var l=o.x1,u=o.x2,f=o.y1,h=o.y2,y=o.xAxis,m=o.yAxis;if(!y||!m)return null;var g=Lw({x:y.scale,y:m.scale}),S={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},T={x:n?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(h,{position:"end"}):g.y.rangeMax};return da(o,"discard")&&(!g.isInRange(S)||!g.isInRange(T))?null:D3(S,T)},Vp=(function(e){function t(){return WZ(this,t),KZ(this,t,arguments)}return ZZ(t,e),XZ(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,l=r.y1,u=r.y2,f=r.className,h=r.alwaysShow,y=r.clipPathId;As(h===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=nn(i),g=nn(o),S=nn(l),T=nn(u),w=this.props.shape;if(!m&&!g&&!S&&!T&&!w)return null;var x=tee(m,g,S,T,this.props);if(!x&&!w)return null;var O=da(this.props,"hidden")?"url(#".concat(y,")"):void 0;return W.createElement(wt,{className:Xe("recharts-reference-area",f)},t.renderRect(w,rD(rD({clipPath:O},Be(this.props,!0)),x)),An.renderCallByParent(this.props,x))}}])})(W.Component);qp(Vp,"displayName","ReferenceArea");qp(Vp,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});qp(Vp,"renderRect",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Ue(e)?n=e(t):n=W.createElement(Uw,Q1({},t,{className:"recharts-reference-area-rect"})),n});function Q3(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function nee(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return fZ(r,n)}function ree(e,t,n){var r=n==="width",i=e.x,o=e.y,l=e.width,u=e.height;return t===1?{start:r?i:o,end:r?i+l:o+u}:{start:r?i+l:o+u,end:r?i:o}}function $h(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function aee(e,t){return Q3(e,t+1)}function iee(e,t,n,r,i){for(var o=(r||[]).slice(),l=t.start,u=t.end,f=0,h=1,y=l,m=function(){var T=r?.[f];if(T===void 0)return{v:Q3(r,h)};var w=f,x,O=function(){return x===void 0&&(x=n(T,w)),x},E=T.coordinate,N=f===0||$h(e,E,O,y,u);N||(f=0,y=l,h+=1),N&&(y=E+e*(O()/2+i),f+=h)},g;h<=o.length;)if(g=m(),g)return g.v;return[]}function Pu(e){"@babel/helpers - typeof";return Pu=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},Pu(e)}function aD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aD(Object(n),!0).forEach(function(r){see(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function see(e,t,n){return t=oee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oee(e){var t=lee(e,"string");return Pu(t)=="symbol"?t:t+""}function lee(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cee(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,u=t.start,f=t.end,h=function(g){var S=o[g],T,w=function(){return T===void 0&&(T=n(S,g)),T};if(g===l-1){var x=e*(S.coordinate+e*w()/2-f);o[g]=S=jn(jn({},S),{},{tickCoord:x>0?S.coordinate-x*e:S.coordinate})}else o[g]=S=jn(jn({},S),{},{tickCoord:S.coordinate});var O=$h(e,S.tickCoord,w,u,f);O&&(f=S.tickCoord-e*(w()/2+i),o[g]=jn(jn({},S),{},{isShow:!0}))},y=l-1;y>=0;y--)h(y);return o}function uee(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,f=t.start,h=t.end;if(o){var y=r[u-1],m=n(y,u-1),g=e*(y.coordinate+e*m/2-h);l[u-1]=y=jn(jn({},y),{},{tickCoord:g>0?y.coordinate-g*e:y.coordinate});var S=$h(e,y.tickCoord,function(){return m},f,h);S&&(h=y.tickCoord-e*(m/2+i),l[u-1]=jn(jn({},y),{},{isShow:!0}))}for(var T=o?u-1:u,w=function(E){var N=l[E],k,A=function(){return k===void 0&&(k=n(N,E)),k};if(E===0){var _=e*(N.coordinate-e*A()/2-f);l[E]=N=jn(jn({},N),{},{tickCoord:_<0?N.coordinate-_*e:N.coordinate})}else l[E]=N=jn(jn({},N),{},{tickCoord:N.coordinate});var C=$h(e,N.tickCoord,A,f,h);C&&(f=N.tickCoord+e*(A()/2+i),l[E]=jn(jn({},N),{},{isShow:!0}))},x=0;x<T;x++)w(x);return l}function fee(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,l=e.minTickGap,u=e.orientation,f=e.interval,h=e.tickFormatter,y=e.unit,m=e.angle;if(!i||!i.length||!r)return[];if(pe(f)||zs.isSsr)return aee(i,typeof f=="number"&&pe(f)?f:0);var g=[],S=u==="top"||u==="bottom"?"width":"height",T=y&&S==="width"?Gc(y,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(N,k){var A=Ue(h)?h(N.value,k):N.value;return S==="width"?nee(Gc(A,{fontSize:t,letterSpacing:n}),T,m):Gc(A,{fontSize:t,letterSpacing:n})[S]},x=i.length>=2?Qr(i[1].coordinate-i[0].coordinate):1,O=ree(o,x,S);return f==="equidistantPreserveStart"?iee(x,O,w,i,l):(f==="preserveStart"||f==="preserveStartEnd"?g=uee(x,O,w,i,l,f==="preserveStartEnd"):g=cee(x,O,w,i,l),g.filter(function(E){return E.isShow}))}var dee=["viewBox"],hee=["viewBox"],pee=["ticks"];function gl(e){"@babel/helpers - typeof";return gl=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},gl(e)}function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}function iD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iD(Object(n),!0).forEach(function(r){qw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gx(e,t){if(e==null)return{};var n=mee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z3(r.key),r)}}function vee(e,t,n){return t&&sD(e.prototype,t),n&&sD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gee(e,t,n){return t=qh(t),bee(e,J3()?Reflect.construct(t,n||[],qh(e).constructor):t.apply(e,n))}function bee(e,t){if(t&&(gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xee(e)}function xee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J3=function(){return!!e})()}function qh(e){return qh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qh(e)}function See(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z1(e,t)}function Z1(e,t){return Z1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Z1(e,t)}function qw(e,t,n){return t=Z3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z3(e){var t=wee(e,"string");return gl(t)=="symbol"?t:t+""}function wee(e,t){if(gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fp=(function(e){function t(n){var r;return yee(this,t),r=gee(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return See(t,e),vee(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=gx(r,dee),u=this.props,f=u.viewBox,h=gx(u,hee);return!Go(o,f)||!Go(l,h)||!Go(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,l=i.y,u=i.width,f=i.height,h=i.orientation,y=i.tickSize,m=i.mirror,g=i.tickMargin,S,T,w,x,O,E,N=m?-1:1,k=r.tickSize||y,A=pe(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":S=T=r.coordinate,x=l+ +!m*f,w=x-N*k,E=w-N*g,O=A;break;case"left":w=x=r.coordinate,T=o+ +!m*u,S=T-N*k,O=S-N*g,E=A;break;case"right":w=x=r.coordinate,T=o+ +m*u,S=T+N*k,O=S+N*g,E=A;break;default:S=T=r.coordinate,x=l+ +m*f,w=x+N*k,E=w+N*g,O=A;break}return{line:{x1:S,y1:w,x2:T,y2:x},tick:{x:O,y:E}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l;switch(i){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l="end";switch(i){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,u=r.height,f=r.orientation,h=r.mirror,y=r.axisLine,m=Zt(Zt(Zt({},Be(this.props,!1)),Be(y,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!h||f==="bottom"&&h);m=Zt(Zt({},m),{},{x1:i,y1:o+g*u,x2:i+l,y2:o+g*u})}else{var S=+(f==="left"&&!h||f==="right"&&h);m=Zt(Zt({},m),{},{x1:i+S*l,y1:o,x2:i+S*l,y2:o+u})}return W.createElement("line",$o({},m,{className:Xe("recharts-cartesian-axis-line",Rr(y,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var l=this,u=this.props,f=u.tickLine,h=u.stroke,y=u.tick,m=u.tickFormatter,g=u.unit,S=fee(Zt(Zt({},this.props),{},{ticks:r}),i,o),T=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),x=Be(this.props,!1),O=Be(y,!1),E=Zt(Zt({},x),{},{fill:"none"},Be(f,!1)),N=S.map(function(k,A){var _=l.getTickLineCoord(k),C=_.line,I=_.tick,q=Zt(Zt(Zt(Zt({textAnchor:T,verticalAnchor:w},x),{},{stroke:"none",fill:h},O),I),{},{index:A,payload:k,visibleTicksCount:S.length,tickFormatter:m});return W.createElement(wt,$o({className:"recharts-cartesian-axis-tick",key:"tick-".concat(k.value,"-").concat(k.coordinate,"-").concat(k.tickCoord)},Kd(l.props,k,A)),f&&W.createElement("line",$o({},E,C,{className:Xe("recharts-cartesian-axis-tick-line",Rr(f,"className"))})),y&&t.renderTickItem(y,q,"".concat(Ue(m)?m(k.value,A):k.value).concat(g||"")))});return W.createElement("g",{className:"recharts-cartesian-axis-ticks"},N)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,l=i.width,u=i.height,f=i.ticksGenerator,h=i.className,y=i.hide;if(y)return null;var m=this.props,g=m.ticks,S=gx(m,pee),T=g;return Ue(f)&&(T=g&&g.length>0?f(this.props):f(S)),l<=0||u<=0||!T||!T.length?null:W.createElement(wt,{className:Xe("recharts-cartesian-axis",h),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(T,this.state.fontSize,this.state.letterSpacing),An.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var l,u=Xe(i.className,"recharts-cartesian-axis-tick-value");return W.isValidElement(r)?l=W.cloneElement(r,Zt(Zt({},i),{},{className:u})):Ue(r)?l=r(Zt(Zt({},i),{},{className:u})):l=W.createElement(oh,$o({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(z.Component);qw(Fp,"displayName","CartesianAxis");qw(Fp,"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 Tee=["type","layout","connectNulls","ref"],Oee=["key"];function bl(e){"@babel/helpers - typeof";return bl=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},bl(e)}function oD(e,t){if(e==null)return{};var n=jee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xc.apply(this,arguments)}function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lD(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Do(e){return Nee(e)||_ee(e)||Eee(e)||Aee()}function Aee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
451
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eee(e,t){if(e){if(typeof e=="string")return eS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eS(e,t)}}function _ee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nee(e){if(Array.isArray(e))return eS(e)}function eS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tB(r.key),r)}}function Cee(e,t,n){return t&&cD(e.prototype,t),n&&cD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mee(e,t,n){return t=Vh(t),Dee(e,eB()?Reflect.construct(t,n||[],Vh(e).constructor):t.apply(e,n))}function Dee(e,t){if(t&&(bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ree(e)}function Ree(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eB=function(){return!!e})()}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vh(e)}function Iee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}function tS(e,t){return tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tS(e,t)}function Wr(e,t,n){return t=tB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tB(e){var t=Pee(e,"string");return bl(t)=="symbol"?t:t+""}function Pee(e,t){if(bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ku=(function(e){function t(){var n;kee(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Mee(this,t,[].concat(i)),Wr(n,"state",{isAnimationFinished:!0,totalLength:0}),Wr(n,"generateSimpleStrokeDasharray",function(l,u){return"".concat(u,"px ").concat(l-u,"px")}),Wr(n,"getStrokeDasharray",function(l,u,f){var h=f.reduce(function(O,E){return O+E});if(!h)return n.generateSimpleStrokeDasharray(u,l);for(var y=Math.floor(l/h),m=l%h,g=u-l,S=[],T=0,w=0;T<f.length;w+=f[T],++T)if(w+f[T]>m){S=[].concat(Do(f.slice(0,T)),[m-w]);break}var x=S.length%2===0?[0,g]:[g];return[].concat(Do(t.repeat(f,y)),Do(S),x).map(function(O){return"".concat(O,"px")}).join(", ")}),Wr(n,"id",kl("recharts-line-")),Wr(n,"pathRef",function(l){n.mainCurve=l}),Wr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Wr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Iee(t,e),Cee(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.points,u=o.xAxis,f=o.yAxis,h=o.layout,y=o.children,m=Ir(y,Yu);if(!m)return null;var g=function(w,x){return{x:w.x,y:w.y,value:w.value,errorVal:Bn(w.payload,x)}},S={clipPath:r?"url(#clipPath-".concat(i,")"):null};return W.createElement(wt,S,m.map(function(T){return W.cloneElement(T,{key:"bar-".concat(T.props.dataKey),data:l,xAxis:u,yAxis:f,layout:h,dataPointFormatter:g})}))}},{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.dot,h=u.points,y=u.dataKey,m=Be(this.props,!1),g=Be(f,!0),S=h.map(function(w,x){var O=cr(cr(cr({key:"dot-".concat(x),r:3},m),g),{},{index:x,cx:w.x,cy:w.y,value:w.value,dataKey:y,payload:w.payload,points:h});return t.renderDotItem(f,O)}),T={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return W.createElement(wt,Xc({className:"recharts-line-dots",key:"dots"},T),S)}},{key:"renderCurveStatically",value:function(r,i,o,l){var u=this.props,f=u.type,h=u.layout,y=u.connectNulls;u.ref;var m=oD(u,Tee),g=cr(cr(cr({},Be(m,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},l),{},{type:f,layout:h,connectNulls:y});return W.createElement(Xo,Xc({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,f=l.strokeDasharray,h=l.isAnimationActive,y=l.animationBegin,m=l.animationDuration,g=l.animationEasing,S=l.animationId,T=l.animateNewValues,w=l.width,x=l.height,O=this.state,E=O.prevPoints,N=O.totalLength;return W.createElement(ya,{begin:y,duration:m,isActive:h,easing:g,from:{t:0},to:{t:1},key:"line-".concat(S),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(k){var A=k.t;if(E){var _=E.length/u.length,C=u.map(function(P,H){var F=Math.floor(H*_);if(E[F]){var K=E[F],B=xn(K.x,P.x),D=xn(K.y,P.y);return cr(cr({},P),{},{x:B(A),y:D(A)})}if(T){var Q=xn(w*2,P.x),se=xn(x/2,P.y);return cr(cr({},P),{},{x:Q(A),y:se(A)})}return cr(cr({},P),{},{x:P.x,y:P.y})});return o.renderCurveStatically(C,r,i)}var I=xn(0,N),q=I(A),G;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(P){return parseFloat(P)});G=o.getStrokeDasharray(q,N,L)}else G=o.generateSimpleStrokeDasharray(N,q);return o.renderCurveStatically(u,r,i,{strokeDasharray:G})})}},{key:"renderCurve",value:function(r,i){var o=this.props,l=o.points,u=o.isAnimationActive,f=this.state,h=f.prevPoints,y=f.totalLength;return u&&l&&l.length&&(!h&&y>0||!cl(h,l))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(l,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,l=i.dot,u=i.points,f=i.className,h=i.xAxis,y=i.yAxis,m=i.top,g=i.left,S=i.width,T=i.height,w=i.isAnimationActive,x=i.id;if(o||!u||!u.length)return null;var O=this.state.isAnimationFinished,E=u.length===1,N=Xe("recharts-line",f),k=h&&h.allowDataOverflow,A=y&&y.allowDataOverflow,_=k||A,C=Le(x)?this.id:x,I=(r=Be(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},q=I.r,G=q===void 0?3:q,L=I.strokeWidth,P=L===void 0?2:L,H=mI(l)?l:{},F=H.clipDot,K=F===void 0?!0:F,B=G*2+P;return W.createElement(wt,{className:N},k||A?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(C)},W.createElement("rect",{x:k?g:g-S/2,y:A?m:m-T/2,width:k?S:S*2,height:A?T:T*2})),!K&&W.createElement("clipPath",{id:"clipPath-dots-".concat(C)},W.createElement("rect",{x:g-B/2,y:m-B/2,width:S+B,height:T+B}))):null,!E&&this.renderCurve(_,C),this.renderErrorBar(_,C),(E||l)&&this.renderDots(_,K,C),(!w||O)&&Ka.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Do(r),[0]):r,l=[],u=0;u<i;++u)l=[].concat(Do(l),Do(o));return l}},{key:"renderDotItem",value:function(r,i){var o;if(W.isValidElement(r))o=W.cloneElement(r,i);else if(Ue(r))o=r(i);else{var l=i.key,u=oD(i,Oee),f=Xe("recharts-line-dot",typeof r!="boolean"?r.className:"");o=W.createElement(Pp,Xc({key:l},u,{className:f}))}return o}}])})(z.PureComponent);Wr(Ku,"displayName","Line");Wr(Ku,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!zs.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Wr(Ku,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,l=e.dataKey,u=e.bandSize,f=e.displayedData,h=e.offset,y=t.layout,m=f.map(function(g,S){var T=Bn(g,l);return y==="horizontal"?{x:wh({axis:n,ticks:i,bandSize:u,entry:g,index:S}),y:Le(T)?null:r.scale(T),value:T,payload:g}:{x:Le(T)?null:n.scale(T),y:wh({axis:r,ticks:o,bandSize:u,entry:g,index:S}),value:T,payload:g}});return cr({points:m,layout:y},h)});var Bee=["layout","type","stroke","connectNulls","isRange","ref"],Uee=["key"],nB;function xl(e){"@babel/helpers - typeof";return xl=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},xl(e)}function rB(e,t){if(e==null)return{};var n=Lee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},js.apply(this,arguments)}function uD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uD(Object(n),!0).forEach(function(r){la(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iB(r.key),r)}}function $ee(e,t,n){return t&&fD(e.prototype,t),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qee(e,t,n){return t=Fh(t),Vee(e,aB()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function Vee(e,t){if(t&&(xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fee(e)}function Fee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aB=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function Gee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nS(e,t)}function nS(e,t){return nS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nS(e,t)}function la(e,t,n){return t=iB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iB(e){var t=Hee(e,"string");return xl(t)=="symbol"?t:t+""}function Hee(e,t){if(xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ki=(function(e){function t(){var n;zee(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=qee(this,t,[].concat(i)),la(n,"state",{isAnimationFinished:!0}),la(n,"id",kl("recharts-area-")),la(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ue(l)&&l()}),la(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ue(l)&&l()}),n}return Gee(t,e),$ee(t,[{key:"renderDots",value:function(r,i,o){var l=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(l&&!u)return null;var f=this.props,h=f.dot,y=f.points,m=f.dataKey,g=Be(this.props,!1),S=Be(h,!0),T=y.map(function(x,O){var E=Ri(Ri(Ri({key:"dot-".concat(O),r:3},g),S),{},{index:O,cx:x.x,cy:x.y,dataKey:m,value:x.value,payload:x.payload,points:y});return t.renderDotItem(h,E)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return W.createElement(wt,js({className:"recharts-area-dots"},w),T)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,o=i.baseLine,l=i.points,u=i.strokeWidth,f=l[0].x,h=l[l.length-1].x,y=r*Math.abs(f-h),m=Bi(l.map(function(g){return g.y||0}));return pe(o)&&typeof o=="number"?m=Math.max(o,m):o&&Array.isArray(o)&&o.length&&(m=Math.max(Bi(o.map(function(g){return g.y||0})),m)),pe(m)?W.createElement("rect",{x:f<h?f:f-y,y:0,width:y,height:Math.floor(m+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,o=i.baseLine,l=i.points,u=i.strokeWidth,f=l[0].y,h=l[l.length-1].y,y=r*Math.abs(f-h),m=Bi(l.map(function(g){return g.x||0}));return pe(o)&&typeof o=="number"?m=Math.max(o,m):o&&Array.isArray(o)&&o.length&&(m=Math.max(Bi(o.map(function(g){return g.x||0})),m)),pe(m)?W.createElement("rect",{x:0,y:f<h?f:f-y,width:m+(u?parseInt("".concat(u),10):1),height:Math.floor(y)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,o,l){var u=this.props,f=u.layout,h=u.type,y=u.stroke,m=u.connectNulls,g=u.isRange;u.ref;var S=rB(u,Bee);return W.createElement(wt,{clipPath:o?"url(#clipPath-".concat(l,")"):null},W.createElement(Xo,js({},Be(S,!0),{points:r,connectNulls:m,type:h,baseLine:i,layout:f,stroke:"none",className:"recharts-area-area"})),y!=="none"&&W.createElement(Xo,js({},Be(this.props,!1),{className:"recharts-area-curve",layout:f,type:h,connectNulls:m,fill:"none",points:r})),y!=="none"&&g&&W.createElement(Xo,js({},Be(this.props,!1),{className:"recharts-area-curve",layout:f,type:h,connectNulls:m,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var o=this,l=this.props,u=l.points,f=l.baseLine,h=l.isAnimationActive,y=l.animationBegin,m=l.animationDuration,g=l.animationEasing,S=l.animationId,T=this.state,w=T.prevPoints,x=T.prevBaseLine;return W.createElement(ya,{begin:y,duration:m,isActive:h,easing:g,from:{t:0},to:{t:1},key:"area-".concat(S),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(w){var N=w.length/u.length,k=u.map(function(I,q){var G=Math.floor(q*N);if(w[G]){var L=w[G],P=xn(L.x,I.x),H=xn(L.y,I.y);return Ri(Ri({},I),{},{x:P(E),y:H(E)})}return I}),A;if(pe(f)&&typeof f=="number"){var _=xn(x,f);A=_(E)}else if(Le(f)||Nl(f)){var C=xn(x,0);A=C(E)}else A=f.map(function(I,q){var G=Math.floor(q*N);if(x[G]){var L=x[G],P=xn(L.x,I.x),H=xn(L.y,I.y);return Ri(Ri({},I),{},{x:P(E),y:H(E)})}return I});return o.renderAreaStatically(k,A,r,i)}return W.createElement(wt,null,W.createElement("defs",null,W.createElement("clipPath",{id:"animationClipPath-".concat(i)},o.renderClipRect(E))),W.createElement(wt,{clipPath:"url(#animationClipPath-".concat(i,")")},o.renderAreaStatically(u,f,r,i)))})}},{key:"renderArea",value:function(r,i){var o=this.props,l=o.points,u=o.baseLine,f=o.isAnimationActive,h=this.state,y=h.prevPoints,m=h.prevBaseLine,g=h.totalLength;return f&&l&&l.length&&(!y&&g>0||!cl(y,l)||!cl(m,u))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(l,u,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,l=i.dot,u=i.points,f=i.className,h=i.top,y=i.left,m=i.xAxis,g=i.yAxis,S=i.width,T=i.height,w=i.isAnimationActive,x=i.id;if(o||!u||!u.length)return null;var O=this.state.isAnimationFinished,E=u.length===1,N=Xe("recharts-area",f),k=m&&m.allowDataOverflow,A=g&&g.allowDataOverflow,_=k||A,C=Le(x)?this.id:x,I=(r=Be(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},q=I.r,G=q===void 0?3:q,L=I.strokeWidth,P=L===void 0?2:L,H=mI(l)?l:{},F=H.clipDot,K=F===void 0?!0:F,B=G*2+P;return W.createElement(wt,{className:N},k||A?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(C)},W.createElement("rect",{x:k?y:y-S/2,y:A?h:h-T/2,width:k?S:S*2,height:A?T:T*2})),!K&&W.createElement("clipPath",{id:"clipPath-dots-".concat(C)},W.createElement("rect",{x:y-B/2,y:h-B/2,width:S+B,height:T+B}))):null,E?null:this.renderArea(_,C),(l||E)&&this.renderDots(_,K,C),(!w||O)&&Ka.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(z.PureComponent);nB=Ki;la(Ki,"displayName","Area");la(Ki,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!zs.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});la(Ki,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,l=t.props.baseValue,u=l??o;if(pe(u)&&typeof u=="number")return u;var f=i==="horizontal"?r:n,h=f.scale.domain();if(f.type==="number"){var y=Math.max(h[0],h[1]),m=Math.min(h[0],h[1]);return u==="dataMin"?m:u==="dataMax"||y<0?y:Math.max(Math.min(h[0],h[1]),0)}return u==="dataMin"?h[0]:u==="dataMax"?h[1]:h[0]});la(Ki,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.bandSize,f=e.dataKey,h=e.stackedData,y=e.dataStartIndex,m=e.displayedData,g=e.offset,S=t.layout,T=h&&h.length,w=nB.getBaseValue(t,n,r,i),x=S==="horizontal",O=!1,E=m.map(function(k,A){var _;T?_=h[y+A]:(_=Bn(k,f),Array.isArray(_)?O=!0:_=[w,_]);var C=_[1]==null||T&&Bn(k,f)==null;return x?{x:wh({axis:r,ticks:o,bandSize:u,entry:k,index:A}),y:C?null:i.scale(_[1]),value:_,payload:k}:{x:C?null:r.scale(_[1]),y:wh({axis:i,ticks:l,bandSize:u,entry:k,index:A}),value:_,payload:k}}),N;return T||O?N=E.map(function(k){var A=Array.isArray(k.value)?k.value[0]:null;return x?{x:k.x,y:A!=null&&k.y!=null?i.scale(A):null}:{x:A!=null?r.scale(A):null,y:k.y}}):N=x?i.scale(w):r.scale(w),Ri({points:E,baseLine:N,layout:S,isRange:O},g)});la(Ki,"renderDotItem",function(e,t){var n;if(W.isValidElement(e))n=W.cloneElement(e,t);else if(Ue(e))n=e(t);else{var r=Xe("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=rB(t,Uee);n=W.createElement(Pp,js({},o,{key:i,className:r}))}return n});function Sl(e){"@babel/helpers - typeof";return Sl=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},Sl(e)}function Wee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lB(r.key),r)}}function Xee(e,t,n){return t&&Yee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kee(e,t,n){return t=Gh(t),Qee(e,sB()?Reflect.construct(t,n||[],Gh(e).constructor):t.apply(e,n))}function Qee(e,t){if(t&&(Sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jee(e)}function Jee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sB=function(){return!!e})()}function Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gh(e)}function Zee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rS(e,t)}function rS(e,t){return rS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rS(e,t)}function oB(e,t,n){return t=lB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lB(e){var t=ete(e,"string");return Sl(t)=="symbol"?t:t+""}function ete(e,t){if(Sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aS(){return aS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aS.apply(this,arguments)}function tte(e){var t=e.xAxisId,n=V3(),r=F3(),i=$3(t);return i==null?null:z.createElement(Fp,aS({},i,{className:Xe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Os(l,!0)}}))}var Gp=(function(e){function t(){return Wee(this,t),Kee(this,t,arguments)}return Zee(t,e),Xee(t,[{key:"render",value:function(){return z.createElement(tte,this.props)}}])})(z.Component);oB(Gp,"displayName","XAxis");oB(Gp,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function wl(e){"@babel/helpers - typeof";return wl=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},wl(e)}function nte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rte(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fB(r.key),r)}}function ate(e,t,n){return t&&rte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ite(e,t,n){return t=Hh(t),ste(e,cB()?Reflect.construct(t,n||[],Hh(e).constructor):t.apply(e,n))}function ste(e,t){if(t&&(wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ote(e)}function ote(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cB=function(){return!!e})()}function Hh(e){return Hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hh(e)}function lte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iS(e,t)}function iS(e,t){return iS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iS(e,t)}function uB(e,t,n){return t=fB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fB(e){var t=cte(e,"string");return wl(t)=="symbol"?t:t+""}function cte(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sS.apply(this,arguments)}var ute=function(t){var n=t.yAxisId,r=V3(),i=F3(),o=q3(n);return o==null?null:z.createElement(Fp,sS({},o,{className:Xe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(u){return Os(u,!0)}}))},Hp=(function(e){function t(){return nte(this,t),ite(this,t,arguments)}return lte(t,e),ate(t,[{key:"render",value:function(){return z.createElement(ute,this.props)}}])})(z.Component);uB(Hp,"displayName","YAxis");uB(Hp,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function dD(e){return pte(e)||hte(e)||dte(e)||fte()}function fte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
452
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dte(e,t){if(e){if(typeof e=="string")return oS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oS(e,t)}}function hte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pte(e){if(Array.isArray(e))return oS(e)}function oS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lS=function(t,n,r,i,o){var l=Ir(t,$w),u=Ir(t,$p),f=[].concat(dD(l),dD(u)),h=Ir(t,Vp),y="".concat(i,"Id"),m=i[0],g=n;if(f.length&&(g=f.reduce(function(w,x){if(x.props[y]===r&&da(x.props,"extendDomain")&&pe(x.props[m])){var O=x.props[m];return[Math.min(w[0],O),Math.max(w[1],O)]}return w},g)),h.length){var S="".concat(m,"1"),T="".concat(m,"2");g=h.reduce(function(w,x){if(x.props[y]===r&&da(x.props,"extendDomain")&&pe(x.props[S])&&pe(x.props[T])){var O=x.props[S],E=x.props[T];return[Math.min(w[0],O,E),Math.max(w[1],O,E)]}return w},g)}return o&&o.length&&(g=o.reduce(function(w,x){return pe(x)?[Math.min(w[0],x),Math.max(w[1],x)]:w},g)),g},bx={exports:{}},hD;function mte(){return hD||(hD=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,y){this.fn=f,this.context=h,this.once=y||!1}function o(f,h,y,m,g){if(typeof y!="function")throw new TypeError("The listener must be a function");var S=new i(y,m||f,g),T=n?n+h:h;return f._events[T]?f._events[T].fn?f._events[T]=[f._events[T],S]:f._events[T].push(S):(f._events[T]=S,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],y,m;if(this._eventsCount===0)return h;for(m in y=this._events)t.call(y,m)&&h.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(y)):h},u.prototype.listeners=function(h){var y=n?n+h:h,m=this._events[y];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,S=m.length,T=new Array(S);g<S;g++)T[g]=m[g].fn;return T},u.prototype.listenerCount=function(h){var y=n?n+h:h,m=this._events[y];return m?m.fn?1:m.length:0},u.prototype.emit=function(h,y,m,g,S,T){var w=n?n+h:h;if(!this._events[w])return!1;var x=this._events[w],O=arguments.length,E,N;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),O){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,y),!0;case 3:return x.fn.call(x.context,y,m),!0;case 4:return x.fn.call(x.context,y,m,g),!0;case 5:return x.fn.call(x.context,y,m,g,S),!0;case 6:return x.fn.call(x.context,y,m,g,S,T),!0}for(N=1,E=new Array(O-1);N<O;N++)E[N-1]=arguments[N];x.fn.apply(x.context,E)}else{var k=x.length,A;for(N=0;N<k;N++)switch(x[N].once&&this.removeListener(h,x[N].fn,void 0,!0),O){case 1:x[N].fn.call(x[N].context);break;case 2:x[N].fn.call(x[N].context,y);break;case 3:x[N].fn.call(x[N].context,y,m);break;case 4:x[N].fn.call(x[N].context,y,m,g);break;default:if(!E)for(A=1,E=new Array(O-1);A<O;A++)E[A-1]=arguments[A];x[N].fn.apply(x[N].context,E)}}return!0},u.prototype.on=function(h,y,m){return o(this,h,y,m,!1)},u.prototype.once=function(h,y,m){return o(this,h,y,m,!0)},u.prototype.removeListener=function(h,y,m,g){var S=n?n+h:h;if(!this._events[S])return this;if(!y)return l(this,S),this;var T=this._events[S];if(T.fn)T.fn===y&&(!g||T.once)&&(!m||T.context===m)&&l(this,S);else{for(var w=0,x=[],O=T.length;w<O;w++)(T[w].fn!==y||g&&!T[w].once||m&&T[w].context!==m)&&x.push(T[w]);x.length?this._events[S]=x.length===1?x[0]:x:l(this,S)}return this},u.prototype.removeAllListeners=function(h){var y;return h?(y=n?n+h:h,this._events[y]&&l(this,y)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(bx)),bx.exports}var yte=mte();const vte=Tt(yte);var xx=new vte,Sx="recharts.syncMouseEvents";function Bu(e){"@babel/helpers - typeof";return Bu=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},Bu(e)}function gte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bte(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dB(r.key),r)}}function xte(e,t,n){return t&&bte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wx(e,t,n){return t=dB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dB(e){var t=Ste(e,"string");return Bu(t)=="symbol"?t:t+""}function Ste(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wte=(function(){function e(){gte(this,e),wx(this,"activeIndex",0),wx(this,"coordinateList",[]),wx(this,"layout","horizontal")}return xte(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,l=n.container,u=l===void 0?null:l,f=n.layout,h=f===void 0?null:f,y=n.offset,m=y===void 0?null:y,g=n.mouseHandlerCallback,S=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=u??this.container,this.layout=h??this.layout,this.offset=m??this.offset,this.mouseHandlerCallback=S??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,l=i.y,u=i.height,f=this.coordinateList[this.activeIndex].coordinate,h=((n=window)===null||n===void 0?void 0:n.scrollX)||0,y=((r=window)===null||r===void 0?void 0:r.scrollY)||0,m=o+f+h,g=l+this.offset.top+u/2+y;this.mouseHandlerCallback({pageX:m,pageY:g})}}}])})();function Tte(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&pe(r)&&pe(i))return!0}return!1}function Ote(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function hB(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,l=Sn(t,n,r,i),u=Sn(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function jte(e,t,n){var r,i,o,l;if(e==="horizontal")r=t.x,o=r,i=n.top,l=n.top+n.height;else if(e==="vertical")i=t.y,l=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,f=t.cy,h=t.innerRadius,y=t.outerRadius,m=t.angle,g=Sn(u,f,h,m),S=Sn(u,f,y,m);r=g.x,i=g.y,o=S.x,l=S.y}else return hB(t);return[{x:r,y:i},{x:o,y:l}]}function Uu(e){"@babel/helpers - typeof";return Uu=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},Uu(e)}function pD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Md(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pD(Object(n),!0).forEach(function(r){Ate(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ate(e,t,n){return t=Ete(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ete(e){var t=_te(e,"string");return Uu(t)=="symbol"?t:t+""}function _te(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nte(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,u=e.activePayload,f=e.offset,h=e.activeTooltipIndex,y=e.tooltipAxisBandSize,m=e.layout,g=e.chartName,S=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!S||!o||!l||g!=="ScatterChart"&&i!=="axis")return null;var T,w=Xo;if(g==="ScatterChart")T=l,w=MQ;else if(g==="BarChart")T=Ote(m,l,f,y),w=Uw;else if(m==="radial"){var x=hB(l),O=x.cx,E=x.cy,N=x.radius,k=x.startAngle,A=x.endAngle;T={cx:O,cy:E,startAngle:k,endAngle:A,innerRadius:N,outerRadius:N},w=y3}else T={points:jte(m,l,f)},w=Xo;var _=Md(Md(Md(Md({stroke:"#ccc",pointerEvents:"none"},f),T),Be(S,!1)),{},{payload:u,payloadIndex:h,className:Xe("recharts-tooltip-cursor",S.className)});return z.isValidElement(S)?z.cloneElement(S,_):z.createElement(w,_)}var kte=["item"],Cte=["children","className","width","height","style","compact","title","desc"];function Tl(e){"@babel/helpers - typeof";return Tl=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},Tl(e)}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qo.apply(this,arguments)}function mD(e,t){return Rte(e)||Dte(e,t)||mB(e,t)||Mte()}function Mte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
453
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,u=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(y){h=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return u}}function Rte(e){if(Array.isArray(e))return e}function yD(e,t){if(e==null)return{};var n=Ite(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ite(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Pte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bte(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yB(r.key),r)}}function Ute(e,t,n){return t&&Bte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lte(e,t,n){return t=Wh(t),zte(e,pB()?Reflect.construct(t,n||[],Wh(e).constructor):t.apply(e,n))}function zte(e,t){if(t&&(Tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $te(e)}function $te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pB=function(){return!!e})()}function Wh(e){return Wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wh(e)}function qte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cS(e,t)}function cS(e,t){return cS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cS(e,t)}function Ol(e){return Gte(e)||Fte(e)||mB(e)||Vte()}function Vte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
454
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mB(e,t){if(e){if(typeof e=="string")return uS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uS(e,t)}}function Fte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gte(e){if(Array.isArray(e))return uS(e)}function uS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(n),!0).forEach(function(r){_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _e(e,t,n){return t=yB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yB(e){var t=Hte(e,"string");return Tl(t)=="symbol"?t:t+""}function Hte(e,t){if(Tl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wte={xAxis:["bottom","top"],yAxis:["left","right"]},Yte={width:"100%",height:"100%"},vB={x:0,y:0};function Dd(e){return e}var Xte=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Kte=function(t,n,r,i){var o=n.find(function(y){return y&&y.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,u=i.radius;return re(re(re({},i),Sn(i.cx,i.cy,u,l)),{},{angle:l,radius:u})}var f=o.coordinate,h=i.angle;return re(re(re({},i),Sn(i.cx,i.cy,f,h)),{},{angle:h,radius:f})}return vB},Wp=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,f){var h=f.props.data;return h&&h.length?[].concat(Ol(u),Ol(h)):u},[]);return l.length>0?l:t&&t.length&&pe(i)&&pe(o)?t.slice(i,o+1):[]};function gB(e){return e==="number"?[0,"auto"]:void 0}var fS=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,u=Wp(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(f,h){var y,m=(y=h.props.data)!==null&&y!==void 0?y:n;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var S=m===void 0?u:m;g=Yd(S,l.dataKey,i)}else g=m&&m[r]||u[r];return g?[].concat(Ol(f),[h3(h,g)]):f},[])},gD=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=Xte(o,r),u=t.orderedTooltipTicks,f=t.tooltipAxis,h=t.tooltipTicks,y=fY(l,u,h,f);if(y>=0&&h){var m=h[y]&&h[y].value,g=fS(t,n,y,m),S=Kte(r,u,y,o);return{activeTooltipIndex:y,activeLabel:m,activePayload:g,activeCoordinate:S}}return null},Qte=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,y=t.layout,m=t.children,g=t.stackOffset,S=f3(y,o);return r.reduce(function(T,w){var x,O=w.type.defaultProps!==void 0?re(re({},w.type.defaultProps),w.props):w.props,E=O.type,N=O.dataKey,k=O.allowDataOverflow,A=O.allowDuplicatedCategory,_=O.scale,C=O.ticks,I=O.includeHidden,q=O[l];if(T[q])return T;var G=Wp(t.data,{graphicalItems:i.filter(function(Y){var ae,he=l in Y.props?Y.props[l]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[l];return he===q}),dataStartIndex:f,dataEndIndex:h}),L=G.length,P,H,F;Tte(O.domain,k,E)&&(P=_1(O.domain,null,k),S&&(E==="number"||_!=="auto")&&(F=Wc(G,N,"category")));var K=gB(E);if(!P||P.length===0){var B,D=(B=O.domain)!==null&&B!==void 0?B:K;if(N){if(P=Wc(G,N,E),E==="category"&&S){var Q=nq(P);A&&Q?(H=P,P=Dh(0,L)):A||(P=MC(D,P,w).reduce(function(Y,ae){return Y.indexOf(ae)>=0?Y:[].concat(Ol(Y),[ae])},[]))}else if(E==="category")A?P=P.filter(function(Y){return Y!==""&&!Le(Y)}):P=MC(D,P,w).reduce(function(Y,ae){return Y.indexOf(ae)>=0||ae===""||Le(ae)?Y:[].concat(Ol(Y),[ae])},[]);else if(E==="number"){var se=yY(G,i.filter(function(Y){var ae,he,Se=l in Y.props?Y.props[l]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[l],Ae="hide"in Y.props?Y.props.hide:(he=Y.type.defaultProps)===null||he===void 0?void 0:he.hide;return Se===q&&(I||!Ae)}),N,o,y);se&&(P=se)}S&&(E==="number"||_!=="auto")&&(F=Wc(G,N,"category"))}else S?P=Dh(0,L):u&&u[q]&&u[q].hasStack&&E==="number"?P=g==="expand"?[0,1]:d3(u[q].stackGroups,f,h):P=u3(G,i.filter(function(Y){var ae=l in Y.props?Y.props[l]:Y.type.defaultProps[l],he="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return ae===q&&(I||!he)}),E,y,!0);if(E==="number")P=lS(m,P,q,o,C),D&&(P=_1(D,P,k));else if(E==="category"&&D){var ce=D,U=P.every(function(Y){return ce.indexOf(Y)>=0});U&&(P=ce)}}return re(re({},T),{},_e({},q,re(re({},O),{},{axisType:o,domain:P,categoricalDomain:F,duplicateDomain:H,originalDomain:(x=O.domain)!==null&&x!==void 0?x:K,isCategorical:S,layout:y})))},{})},Jte=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,y=t.layout,m=t.children,g=Wp(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:h}),S=g.length,T=f3(y,o),w=-1;return r.reduce(function(x,O){var E=O.type.defaultProps!==void 0?re(re({},O.type.defaultProps),O.props):O.props,N=E[l],k=gB("number");if(!x[N]){w++;var A;return T?A=Dh(0,S):u&&u[N]&&u[N].hasStack?(A=d3(u[N].stackGroups,f,h),A=lS(m,A,N,o)):(A=_1(k,u3(g,r.filter(function(_){var C,I,q=l in _.props?_.props[l]:(C=_.type.defaultProps)===null||C===void 0?void 0:C[l],G="hide"in _.props?_.props.hide:(I=_.type.defaultProps)===null||I===void 0?void 0:I.hide;return q===N&&!G}),"number",y),i.defaultProps.allowDataOverflow),A=lS(m,A,N,o)),re(re({},x),{},_e({},N,re(re({axisType:o},i.defaultProps),{},{hide:!0,orientation:Rr(Wte,"".concat(o,".").concat(w%2),null),domain:A,originalDomain:k,isCategorical:T,layout:y})))}return x},{})},Zte=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,f=n.dataStartIndex,h=n.dataEndIndex,y=t.children,m="".concat(i,"Id"),g=Ir(y,o),S={};return g&&g.length?S=Qte(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:m,stackGroups:u,dataStartIndex:f,dataEndIndex:h}):l&&l.length&&(S=Jte(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:m,stackGroups:u,dataStartIndex:f,dataEndIndex:h})),S},ene=function(t){var n=Bo(t),r=Os(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:fw(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Th(n,r)}},bD=function(t){var n=t.children,r=t.defaultShowTooltip,i=fr(n,hl),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(l=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},tne=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ya(n&&n.type);return r&&r.indexOf("Bar")>=0})},xD=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"}},nne=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,f=u===void 0?{}:u,h=r.width,y=r.height,m=r.children,g=r.margin||{},S=fr(m,hl),T=fr(m,Ho),w=Object.keys(f).reduce(function(A,_){var C=f[_],I=C.orientation;return!C.mirror&&!C.hide?re(re({},A),{},_e({},I,A[I]+C.width)):A},{left:g.left||0,right:g.right||0}),x=Object.keys(l).reduce(function(A,_){var C=l[_],I=C.orientation;return!C.mirror&&!C.hide?re(re({},A),{},_e({},I,Rr(A,"".concat(I))+C.height)):A},{top:g.top||0,bottom:g.bottom||0}),O=re(re({},x),w),E=O.bottom;S&&(O.bottom+=S.props.height||hl.defaultProps.height),T&&n&&(O=pY(O,i,r,n));var N=h-O.left-O.right,k=y-O.top-O.bottom;return re(re({brushBottom:E},O),{},{width:Math.max(N,0),height:Math.max(k,0)})},rne=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},bB=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,l=t.validateTooltipEventTypes,u=l===void 0?["axis"]:l,f=t.axisComponents,h=t.legendContent,y=t.formatAxisMap,m=t.defaultProps,g=function(O,E){var N=E.graphicalItems,k=E.stackGroups,A=E.offset,_=E.updateId,C=E.dataStartIndex,I=E.dataEndIndex,q=O.barSize,G=O.layout,L=O.barGap,P=O.barCategoryGap,H=O.maxBarSize,F=xD(G),K=F.numericAxisName,B=F.cateAxisName,D=tne(N),Q=[];return N.forEach(function(se,ce){var U=Wp(O.data,{graphicalItems:[se],dataStartIndex:C,dataEndIndex:I}),Y=se.type.defaultProps!==void 0?re(re({},se.type.defaultProps),se.props):se.props,ae=Y.dataKey,he=Y.maxBarSize,Se=Y["".concat(K,"Id")],Ae=Y["".concat(B,"Id")],ze={},nt=f.reduce(function(zr,ba){var Bl=E["".concat(ba.axisType,"Map")],Tn=Y["".concat(ba.axisType,"Id")];Bl&&Bl[Tn]||ba.axisType==="zAxis"||Ps();var Qu=Bl[Tn];return re(re({},zr),{},_e(_e({},ba.axisType,Qu),"".concat(ba.axisType,"Ticks"),Os(Qu)))},ze),de=nt[B],Ne=nt["".concat(B,"Ticks")],ke=k&&k[Se]&&k[Se].hasStack&&_Y(se,k[Se].stackGroups),ue=Ya(se.type).indexOf("Bar")>=0,Ot=Th(de,Ne),Re=[],Dt=D&&dY({barSize:q,stackGroups:k,totalSize:rne(nt,B)});if(ue){var Rt,wn,Lr=Le(he)?H:he,ta=(Rt=(wn=Th(de,Ne,!0))!==null&&wn!==void 0?wn:Lr)!==null&&Rt!==void 0?Rt:0;Re=hY({barGap:L,barCategoryGap:P,bandSize:ta!==Ot?ta:Ot,sizeList:Dt[Ae],maxBarSize:Lr}),ta!==Ot&&(Re=Re.map(function(zr){return re(re({},zr),{},{position:re(re({},zr.position),{},{offset:zr.position.offset-ta/2})})}))}var si=se&&se.type&&se.type.getComposedData;si&&Q.push({props:re(re({},si(re(re({},nt),{},{displayedData:U,props:O,dataKey:ae,item:se,bandSize:Ot,barPosition:Re,offset:A,stackedData:ke,layout:G,dataStartIndex:C,dataEndIndex:I}))),{},_e(_e(_e({key:se.key||"item-".concat(ce)},K,nt[K]),B,nt[B]),"animationId",_)),childIndex:pq(se,O.children),item:se})}),Q},S=function(O,E){var N=O.props,k=O.dataStartIndex,A=O.dataEndIndex,_=O.updateId;if(!W_({props:N}))return null;var C=N.children,I=N.layout,q=N.stackOffset,G=N.data,L=N.reverseStackOrder,P=xD(I),H=P.numericAxisName,F=P.cateAxisName,K=Ir(C,r),B=jY(G,K,"".concat(H,"Id"),"".concat(F,"Id"),q,L),D=f.reduce(function(Y,ae){var he="".concat(ae.axisType,"Map");return re(re({},Y),{},_e({},he,Zte(N,re(re({},ae),{},{graphicalItems:K,stackGroups:ae.axisType===H&&B,dataStartIndex:k,dataEndIndex:A}))))},{}),Q=nne(re(re({},D),{},{props:N,graphicalItems:K}),E?.legendBBox);Object.keys(D).forEach(function(Y){D[Y]=y(N,D[Y],Q,Y.replace("Map",""),n)});var se=D["".concat(F,"Map")],ce=ene(se),U=g(N,re(re({},D),{},{dataStartIndex:k,dataEndIndex:A,updateId:_,graphicalItems:K,stackGroups:B,offset:Q}));return re(re({formattedGraphicalItems:U,graphicalItems:K,offset:Q,stackGroups:B},ce),D)},T=(function(x){function O(E){var N,k,A;return Pte(this,O),A=Lte(this,O,[E]),_e(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_e(A,"accessibilityManager",new wte),_e(A,"handleLegendBBoxUpdate",function(_){if(_){var C=A.state,I=C.dataStartIndex,q=C.dataEndIndex,G=C.updateId;A.setState(re({legendBBox:_},S({props:A.props,dataStartIndex:I,dataEndIndex:q,updateId:G},re(re({},A.state),{},{legendBBox:_}))))}}),_e(A,"handleReceiveSyncEvent",function(_,C,I){if(A.props.syncId===_){if(I===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(C)}}),_e(A,"handleBrushChange",function(_){var C=_.startIndex,I=_.endIndex;if(C!==A.state.dataStartIndex||I!==A.state.dataEndIndex){var q=A.state.updateId;A.setState(function(){return re({dataStartIndex:C,dataEndIndex:I},S({props:A.props,dataStartIndex:C,dataEndIndex:I,updateId:q},A.state))}),A.triggerSyncEvent({dataStartIndex:C,dataEndIndex:I})}}),_e(A,"handleMouseEnter",function(_){var C=A.getMouseInfo(_);if(C){var I=re(re({},C),{},{isTooltipActive:!0});A.setState(I),A.triggerSyncEvent(I);var q=A.props.onMouseEnter;Ue(q)&&q(I,_)}}),_e(A,"triggeredAfterMouseMove",function(_){var C=A.getMouseInfo(_),I=C?re(re({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(I),A.triggerSyncEvent(I);var q=A.props.onMouseMove;Ue(q)&&q(I,_)}),_e(A,"handleItemMouseEnter",function(_){A.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),_e(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),_e(A,"handleMouseMove",function(_){_.persist(),A.throttleTriggeredAfterMouseMove(_)}),_e(A,"handleMouseLeave",function(_){A.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};A.setState(C),A.triggerSyncEvent(C);var I=A.props.onMouseLeave;Ue(I)&&I(C,_)}),_e(A,"handleOuterEvent",function(_){var C=hq(_),I=Rr(A.props,"".concat(C));if(C&&Ue(I)){var q,G;/.*touch.*/i.test(C)?G=A.getMouseInfo(_.changedTouches[0]):G=A.getMouseInfo(_),I((q=G)!==null&&q!==void 0?q:{},_)}}),_e(A,"handleClick",function(_){var C=A.getMouseInfo(_);if(C){var I=re(re({},C),{},{isTooltipActive:!0});A.setState(I),A.triggerSyncEvent(I);var q=A.props.onClick;Ue(q)&&q(I,_)}}),_e(A,"handleMouseDown",function(_){var C=A.props.onMouseDown;if(Ue(C)){var I=A.getMouseInfo(_);C(I,_)}}),_e(A,"handleMouseUp",function(_){var C=A.props.onMouseUp;if(Ue(C)){var I=A.getMouseInfo(_);C(I,_)}}),_e(A,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),_e(A,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&A.handleMouseDown(_.changedTouches[0])}),_e(A,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&A.handleMouseUp(_.changedTouches[0])}),_e(A,"handleDoubleClick",function(_){var C=A.props.onDoubleClick;if(Ue(C)){var I=A.getMouseInfo(_);C(I,_)}}),_e(A,"handleContextMenu",function(_){var C=A.props.onContextMenu;if(Ue(C)){var I=A.getMouseInfo(_);C(I,_)}}),_e(A,"triggerSyncEvent",function(_){A.props.syncId!==void 0&&xx.emit(Sx,A.props.syncId,_,A.eventEmitterSymbol)}),_e(A,"applySyncEvent",function(_){var C=A.props,I=C.layout,q=C.syncMethod,G=A.state.updateId,L=_.dataStartIndex,P=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)A.setState(re({dataStartIndex:L,dataEndIndex:P},S({props:A.props,dataStartIndex:L,dataEndIndex:P,updateId:G},A.state)));else if(_.activeTooltipIndex!==void 0){var H=_.chartX,F=_.chartY,K=_.activeTooltipIndex,B=A.state,D=B.offset,Q=B.tooltipTicks;if(!D)return;if(typeof q=="function")K=q(Q,_);else if(q==="value"){K=-1;for(var se=0;se<Q.length;se++)if(Q[se].value===_.activeLabel){K=se;break}}var ce=re(re({},D),{},{x:D.left,y:D.top}),U=Math.min(H,ce.x+ce.width),Y=Math.min(F,ce.y+ce.height),ae=Q[K]&&Q[K].value,he=fS(A.state,A.props.data,K),Se=Q[K]?{x:I==="horizontal"?Q[K].coordinate:U,y:I==="horizontal"?Y:Q[K].coordinate}:vB;A.setState(re(re({},_),{},{activeLabel:ae,activeCoordinate:Se,activePayload:he,activeTooltipIndex:K}))}else A.setState(_)}),_e(A,"renderCursor",function(_){var C,I=A.state,q=I.isTooltipActive,G=I.activeCoordinate,L=I.activePayload,P=I.offset,H=I.activeTooltipIndex,F=I.tooltipAxisBandSize,K=A.getTooltipEventType(),B=(C=_.props.active)!==null&&C!==void 0?C:q,D=A.props.layout,Q=_.key||"_recharts-cursor";return W.createElement(Nte,{key:Q,activeCoordinate:G,activePayload:L,activeTooltipIndex:H,chartName:n,element:_,isActive:B,layout:D,offset:P,tooltipAxisBandSize:F,tooltipEventType:K})}),_e(A,"renderPolarAxis",function(_,C,I){var q=Rr(_,"type.axisType"),G=Rr(A.state,"".concat(q,"Map")),L=_.type.defaultProps,P=L!==void 0?re(re({},L),_.props):_.props,H=G&&G[P["".concat(q,"Id")]];return z.cloneElement(_,re(re({},H),{},{className:Xe(q,H.className),key:_.key||"".concat(C,"-").concat(I),ticks:Os(H,!0)}))}),_e(A,"renderPolarGrid",function(_){var C=_.props,I=C.radialLines,q=C.polarAngles,G=C.polarRadius,L=A.state,P=L.radiusAxisMap,H=L.angleAxisMap,F=Bo(P),K=Bo(H),B=K.cx,D=K.cy,Q=K.innerRadius,se=K.outerRadius;return z.cloneElement(_,{polarAngles:Array.isArray(q)?q:Os(K,!0).map(function(ce){return ce.coordinate}),polarRadius:Array.isArray(G)?G:Os(F,!0).map(function(ce){return ce.coordinate}),cx:B,cy:D,innerRadius:Q,outerRadius:se,key:_.key||"polar-grid",radialLines:I})}),_e(A,"renderLegend",function(){var _=A.state.formattedGraphicalItems,C=A.props,I=C.children,q=C.width,G=C.height,L=A.props.margin||{},P=q-(L.left||0)-(L.right||0),H=l3({children:I,formattedGraphicalItems:_,legendWidth:P,legendContent:h});if(!H)return null;var F=H.item,K=yD(H,kte);return z.cloneElement(F,re(re({},K),{},{chartWidth:q,chartHeight:G,margin:L,onBBoxUpdate:A.handleLegendBBoxUpdate}))}),_e(A,"renderTooltip",function(){var _,C=A.props,I=C.children,q=C.accessibilityLayer,G=fr(I,Fa);if(!G)return null;var L=A.state,P=L.isTooltipActive,H=L.activeCoordinate,F=L.activePayload,K=L.activeLabel,B=L.offset,D=(_=G.props.active)!==null&&_!==void 0?_:P;return z.cloneElement(G,{viewBox:re(re({},B),{},{x:B.left,y:B.top}),active:D,label:K,payload:D?F:[],coordinate:H,accessibilityLayer:q})}),_e(A,"renderBrush",function(_){var C=A.props,I=C.margin,q=C.data,G=A.state,L=G.offset,P=G.dataStartIndex,H=G.dataEndIndex,F=G.updateId;return z.cloneElement(_,{key:_.key||"_recharts-brush",onChange:_d(A.handleBrushChange,_.props.onChange),data:q,x:pe(_.props.x)?_.props.x:L.left,y:pe(_.props.y)?_.props.y:L.top+L.height+L.brushBottom-(I.bottom||0),width:pe(_.props.width)?_.props.width:L.width,startIndex:P,endIndex:H,updateId:"brush-".concat(F)})}),_e(A,"renderReferenceElement",function(_,C,I){if(!_)return null;var q=A,G=q.clipPathId,L=A.state,P=L.xAxisMap,H=L.yAxisMap,F=L.offset,K=_.type.defaultProps||{},B=_.props,D=B.xAxisId,Q=D===void 0?K.xAxisId:D,se=B.yAxisId,ce=se===void 0?K.yAxisId:se;return z.cloneElement(_,{key:_.key||"".concat(C,"-").concat(I),xAxis:P[Q],yAxis:H[ce],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:G})}),_e(A,"renderActivePoints",function(_){var C=_.item,I=_.activePoint,q=_.basePoint,G=_.childIndex,L=_.isRange,P=[],H=C.props.key,F=C.item.type.defaultProps!==void 0?re(re({},C.item.type.defaultProps),C.item.props):C.item.props,K=F.activeDot,B=F.dataKey,D=re(re({index:G,dataKey:B,cx:I.x,cy:I.y,r:4,fill:Bw(C.item),strokeWidth:2,stroke:"#fff",payload:I.payload,value:I.value},Be(K,!1)),Xd(K));return P.push(O.renderActiveDot(K,D,"".concat(H,"-activePoint-").concat(G))),q?P.push(O.renderActiveDot(K,re(re({},D),{},{cx:q.x,cy:q.y}),"".concat(H,"-basePoint-").concat(G))):L&&P.push(null),P}),_e(A,"renderGraphicChild",function(_,C,I){var q=A.filterFormatItem(_,C,I);if(!q)return null;var G=A.getTooltipEventType(),L=A.state,P=L.isTooltipActive,H=L.tooltipAxis,F=L.activeTooltipIndex,K=L.activeLabel,B=A.props.children,D=fr(B,Fa),Q=q.props,se=Q.points,ce=Q.isRange,U=Q.baseLine,Y=q.item.type.defaultProps!==void 0?re(re({},q.item.type.defaultProps),q.item.props):q.item.props,ae=Y.activeDot,he=Y.hide,Se=Y.activeBar,Ae=Y.activeShape,ze=!!(!he&&P&&D&&(ae||Se||Ae)),nt={};G!=="axis"&&D&&D.props.trigger==="click"?nt={onClick:_d(A.handleItemMouseEnter,_.props.onClick)}:G!=="axis"&&(nt={onMouseLeave:_d(A.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:_d(A.handleItemMouseEnter,_.props.onMouseEnter)});var de=z.cloneElement(_,re(re({},q.props),nt));function Ne(ba){return typeof H.dataKey=="function"?H.dataKey(ba.payload):null}if(ze)if(F>=0){var ke,ue;if(H.dataKey&&!H.allowDuplicatedCategory){var Ot=typeof H.dataKey=="function"?Ne:"payload.".concat(H.dataKey.toString());ke=Yd(se,Ot,K),ue=ce&&U&&Yd(U,Ot,K)}else ke=se?.[F],ue=ce&&U&&U[F];if(Ae||Se){var Re=_.props.activeIndex!==void 0?_.props.activeIndex:F;return[z.cloneElement(_,re(re(re({},q.props),nt),{},{activeIndex:Re})),null,null]}if(!Le(ke))return[de].concat(Ol(A.renderActivePoints({item:q,activePoint:ke,basePoint:ue,childIndex:F,isRange:ce})))}else{var Dt,Rt=(Dt=A.getItemByXY(A.state.activeCoordinate))!==null&&Dt!==void 0?Dt:{graphicalItem:de},wn=Rt.graphicalItem,Lr=wn.item,ta=Lr===void 0?_:Lr,si=wn.childIndex,zr=re(re(re({},q.props),nt),{},{activeIndex:si});return[z.cloneElement(ta,zr),null,null]}return ce?[de,null,null]:[de,null]}),_e(A,"renderCustomized",function(_,C,I){return z.cloneElement(_,re(re({key:"recharts-customized-".concat(I)},A.props),A.state))}),_e(A,"renderMap",{CartesianGrid:{handler:Dd,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Dd},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Dd},YAxis:{handler:Dd},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((N=E.id)!==null&&N!==void 0?N:kl("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=lP(A.triggeredAfterMouseMove,(k=E.throttleDelay)!==null&&k!==void 0?k:1e3/60),A.state={},A}return qte(O,x),Ute(O,[{key:"componentDidMount",value:function(){var N,k;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var N=this.props,k=N.children,A=N.data,_=N.height,C=N.layout,I=fr(k,Fa);if(I){var q=I.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var G=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=fS(this.state,A,q,G),P=this.state.tooltipTicks[q].coordinate,H=(this.state.offset.top+_)/2,F=C==="horizontal",K=F?{x:P,y:H}:{y:P,x:H},B=this.state.formattedGraphicalItems.find(function(Q){var se=Q.item;return se.type.name==="Scatter"});B&&(K=re(re({},K),B.props.points[q].tooltipPosition),L=B.props.points[q].tooltipPayload);var D={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:G,activePayload:L,activeCoordinate:K};this.setState(D),this.renderCursor(I),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(N,k){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==k.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==N.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==N.margin){var A,_;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(N){Kx([fr(N.children,Fa)],[fr(this.props.children,Fa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var N=fr(this.props.children,Fa);if(N&&typeof N.props.shared=="boolean"){var k=N.props.shared?"axis":"item";return u.indexOf(k)>=0?k:o}return o}},{key:"getMouseInfo",value:function(N){if(!this.container)return null;var k=this.container,A=k.getBoundingClientRect(),_=tG(A),C={chartX:Math.round(N.pageX-_.left),chartY:Math.round(N.pageY-_.top)},I=A.width/k.offsetWidth||1,q=this.inRange(C.chartX,C.chartY,I);if(!q)return null;var G=this.state,L=G.xAxisMap,P=G.yAxisMap,H=this.getTooltipEventType(),F=gD(this.state,this.props.data,this.props.layout,q);if(H!=="axis"&&L&&P){var K=Bo(L).scale,B=Bo(P).scale,D=K&&K.invert?K.invert(C.chartX):null,Q=B&&B.invert?B.invert(C.chartY):null;return re(re({},C),{},{xValue:D,yValue:Q},F)}return F?re(re({},C),F):null}},{key:"inRange",value:function(N,k){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,C=N/A,I=k/A;if(_==="horizontal"||_==="vertical"){var q=this.state.offset,G=C>=q.left&&C<=q.left+q.width&&I>=q.top&&I<=q.top+q.height;return G?{x:C,y:I}:null}var L=this.state,P=L.angleAxisMap,H=L.radiusAxisMap;if(P&&H){var F=Bo(P);return IC({x:C,y:I},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var N=this.props.children,k=this.getTooltipEventType(),A=fr(N,Fa),_={};A&&k==="axis"&&(A.props.trigger==="click"?_={onClick:this.handleClick}:_={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=Xd(this.props,this.handleOuterEvent);return re(re({},C),_)}},{key:"addListener",value:function(){xx.on(Sx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){xx.removeListener(Sx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(N,k,A){for(var _=this.state.formattedGraphicalItems,C=0,I=_.length;C<I;C++){var q=_[C];if(q.item===N||q.props.key===N.key||k===Ya(q.item.type)&&A===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var N=this.clipPathId,k=this.state.offset,A=k.left,_=k.top,C=k.height,I=k.width;return W.createElement("defs",null,W.createElement("clipPath",{id:N},W.createElement("rect",{x:A,y:_,height:C,width:I})))}},{key:"getXScales",value:function(){var N=this.state.xAxisMap;return N?Object.entries(N).reduce(function(k,A){var _=mD(A,2),C=_[0],I=_[1];return re(re({},k),{},_e({},C,I.scale))},{}):null}},{key:"getYScales",value:function(){var N=this.state.yAxisMap;return N?Object.entries(N).reduce(function(k,A){var _=mD(A,2),C=_[0],I=_[1];return re(re({},k),{},_e({},C,I.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(N){var k;return(k=this.state.xAxisMap)===null||k===void 0||(k=k[N])===null||k===void 0?void 0:k.scale}},{key:"getYScaleByAxisId",value:function(N){var k;return(k=this.state.yAxisMap)===null||k===void 0||(k=k[N])===null||k===void 0?void 0:k.scale}},{key:"getItemByXY",value:function(N){var k=this.state,A=k.formattedGraphicalItems,_=k.activeItem;if(A&&A.length)for(var C=0,I=A.length;C<I;C++){var q=A[C],G=q.props,L=q.item,P=L.type.defaultProps!==void 0?re(re({},L.type.defaultProps),L.props):L.props,H=Ya(L.type);if(H==="Bar"){var F=(G.data||[]).find(function(Q){return wQ(N,Q)});if(F)return{graphicalItem:q,payload:F}}else if(H==="RadialBar"){var K=(G.data||[]).find(function(Q){return IC(N,Q)});if(K)return{graphicalItem:q,payload:K}}else if(Bp(q,_)||Up(q,_)||Mu(q,_)){var B=dJ({graphicalItem:q,activeTooltipItem:_,itemData:P.data}),D=P.activeIndex===void 0?B:P.activeIndex;return{graphicalItem:re(re({},q),{},{childIndex:D}),payload:Mu(q,_)?P.data[B]:q.props.data[B]}}}return null}},{key:"render",value:function(){var N=this;if(!W_(this))return null;var k=this.props,A=k.children,_=k.className,C=k.width,I=k.height,q=k.style,G=k.compact,L=k.title,P=k.desc,H=yD(k,Cte),F=Be(H,!1);if(G)return W.createElement(KM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(Jx,qo({},F,{width:C,height:I,title:L,desc:P}),this.renderClipPath(),X_(A,this.renderMap)));if(this.props.accessibilityLayer){var K,B;F.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,F.role=(B=this.props.role)!==null&&B!==void 0?B:"application",F.onKeyDown=function(Q){N.accessibilityManager.keyboardEvent(Q)},F.onFocus=function(){N.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return W.createElement(KM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",qo({className:Xe("recharts-wrapper",_),style:re({position:"relative",cursor:"default",width:C,height:I},q)},D,{ref:function(se){N.container=se}}),W.createElement(Jx,qo({},F,{width:C,height:I,title:L,desc:P,style:Yte}),this.renderClipPath(),X_(A,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(z.Component);_e(T,"displayName",n),_e(T,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},m)),_e(T,"getDerivedStateFromProps",function(x,O){var E=x.dataKey,N=x.data,k=x.children,A=x.width,_=x.height,C=x.layout,I=x.stackOffset,q=x.margin,G=O.dataStartIndex,L=O.dataEndIndex;if(O.updateId===void 0){var P=bD(x);return re(re(re({},P),{},{updateId:0},S(re(re({props:x},P),{},{updateId:0}),O)),{},{prevDataKey:E,prevData:N,prevWidth:A,prevHeight:_,prevLayout:C,prevStackOffset:I,prevMargin:q,prevChildren:k})}if(E!==O.prevDataKey||N!==O.prevData||A!==O.prevWidth||_!==O.prevHeight||C!==O.prevLayout||I!==O.prevStackOffset||!Go(q,O.prevMargin)){var H=bD(x),F={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},K=re(re({},gD(O,N,C)),{},{updateId:O.updateId+1}),B=re(re(re({},H),F),K);return re(re(re({},B),S(re({props:x},B),O)),{},{prevDataKey:E,prevData:N,prevWidth:A,prevHeight:_,prevLayout:C,prevStackOffset:I,prevMargin:q,prevChildren:k})}if(!Kx(k,O.prevChildren)){var D,Q,se,ce,U=fr(k,hl),Y=U&&(D=(Q=U.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&D!==void 0?D:G,ae=U&&(se=(ce=U.props)===null||ce===void 0?void 0:ce.endIndex)!==null&&se!==void 0?se:L,he=Y!==G||ae!==L,Se=!Le(N),Ae=Se&&!he?O.updateId:O.updateId+1;return re(re({updateId:Ae},S(re(re({props:x},O),{},{updateId:Ae,dataStartIndex:Y,dataEndIndex:ae}),O)),{},{prevChildren:k,dataStartIndex:Y,dataEndIndex:ae})}return null}),_e(T,"renderActiveDot",function(x,O,E){var N;return z.isValidElement(x)?N=z.cloneElement(x,O):Ue(x)?N=x(O):N=W.createElement(Pp,O),W.createElement(wt,{className:"recharts-active-dot",key:E},N)});var w=z.forwardRef(function(O,E){return W.createElement(T,qo({},O,{ref:E}))});return w.displayName=T.displayName,w},ane=bB({chartName:"LineChart",GraphicalChild:Ku,axisComponents:[{axisType:"xAxis",AxisComp:Gp},{axisType:"yAxis",AxisComp:Hp}],formatAxisMap:M3}),ine=bB({chartName:"AreaChart",GraphicalChild:Ki,axisComponents:[{axisType:"xAxis",AxisComp:Gp},{axisType:"yAxis",AxisComp:Hp}],formatAxisMap:M3});const sne=e=>e.map((t,n)=>typeof t=="number"?{i:n,v:t}:{i:n,v:t.value}),one=({data:e,color:t="var(--viz-1)",width:n=96,height:r=28,type:i="area",className:o=""})=>{const l=z.useId().replace(/:/g,""),u=sne(e);return p.jsx("div",{className:o,style:{width:n,height:r},children:p.jsx(YF,{width:"100%",height:"100%",children:i==="area"?p.jsxs(ine,{data:u,margin:{top:2,right:2,bottom:2,left:2},children:[p.jsx("defs",{children:p.jsxs("linearGradient",{id:`sp${l}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"0%",stopColor:t,stopOpacity:.3}),p.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]})}),p.jsx(Ki,{dataKey:"v",stroke:t,strokeWidth:1.5,fill:`url(#sp${l})`,type:"monotone",isAnimationActive:!1,dot:!1})]}):p.jsx(ane,{data:u,margin:{top:2,right:2,bottom:2,left:2},children:p.jsx(Ku,{dataKey:"v",stroke:t,strokeWidth:1.5,type:"monotone",isAnimationActive:!1,dot:!1})})})})},lne={created:"green",mutated:"yellow",deleted:"red"},cne=({tx:e})=>{const t=e.gas.computation+e.gas.storage-e.gas.rebate,n=[["Computation",e.gas.computation,"cyan"],["Storage",e.gas.storage,"blue"],["Rebate",-e.gas.rebate,"green"],["Budget",e.gas.budget,null],["Price",e.gas.price,null]];return p.jsxs("div",{className:"col",style:{gap:16},children:[p.jsxs("div",{className:"panel panel-pad",children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:12},children:"Gas"}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px,1fr))",gap:14},children:[n.map(([r,i,o])=>p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:r}),p.jsxs("span",{className:"mono tnum",style:{fontSize:14,color:o?`var(--c-${o})`:"var(--tx-hi)"},children:[i<0?"−":"",Math.abs(i).toLocaleString()]})]},r)),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Total"}),p.jsx("span",{className:"mono tnum",style:{fontSize:14,fontWeight:600},children:t.toLocaleString()})]})]})]}),p.jsxs("div",{className:"panel",style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"12px 16px"},children:p.jsx("div",{className:"eyebrow",children:"Balance changes"})}),p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Owner"}),p.jsx("th",{children:"Coin"}),p.jsx("th",{children:"Amount"})]})}),p.jsx("tbody",{children:e.balanceChanges.map((r,i)=>p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx(Hd,{address:r.owner,name:r.name})}),p.jsx("td",{className:"mono",style:{fontSize:12},children:r.coin}),p.jsxs("td",{className:"mono tnum",style:{color:r.amount>=0?"var(--c-green)":"var(--c-red)"},children:[r.amount>=0?"+":"−",Math.abs(r.amount).toLocaleString()]})]},i))})]})]}),p.jsxs("div",{className:"panel",style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"12px 16px"},children:p.jsx("div",{className:"eyebrow",children:"Object changes"})}),p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Change"}),p.jsx("th",{children:"Object"}),p.jsx("th",{children:"Type"})]})}),p.jsx("tbody",{children:e.objectChanges.map((r,i)=>{const o=lne[r.kind]??"cyan";return p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx("span",{className:"badge",style:{height:19,fontSize:10.5,color:`var(--c-${o})`},children:r.kind})}),p.jsx("td",{children:p.jsx(bt,{text:r.id,display:He(r.id,7,4)})}),p.jsx("td",{className:"mono trunc",style:{fontSize:11.5,color:"var(--tx-lo)",maxWidth:240},children:r.type})]},i)})})]})]})]})},une=({items:e})=>p.jsx("div",{className:"row wrap",style:{gap:6},children:e.map((t,n)=>{const r=n===e.length-1,i=r?"var(--tx-hi)":"var(--tx-lo)",o=r?540:500;return p.jsxs("span",{className:"row",style:{gap:6},children:[n>0&&p.jsx(xe,{name:"chevR",size:13,style:{color:"var(--tx-dim)"}}),t.onClick?p.jsx("button",{type:"button",className:"btn-ghost",onClick:t.onClick,style:{background:"transparent",border:"none",padding:0,color:i,fontSize:13,fontWeight:o},children:t.label}):p.jsx("span",{style:{color:i,fontSize:13,fontWeight:o},children:t.label})]},n)})}),Jr=({label:e,children:t,side:n="top"})=>{const[r,i]=z.useState(!1),o=n==="top"?{bottom:"calc(100% + 7px)",left:"50%",transform:"translateX(-50%)"}:{top:"calc(100% + 7px)",left:"50%",transform:"translateX(-50%)"};return p.jsxs("span",{style:{position:"relative",display:"inline-flex"},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[t,r&&p.jsx("span",{style:{position:"absolute",...o,zIndex:300,whiteSpace:"nowrap",padding:"5px 9px",borderRadius:6,background:"var(--bg-elev-2)",border:"1px solid var(--line-strong)",boxShadow:"var(--sh-2)",fontSize:11.5,color:"var(--tx-hi)",pointerEvents:"none",animation:"fadeIn .12s ease both"},children:e})]})},Kc=({w:e="100%",h:t=14,r:n=6,style:r})=>p.jsx("span",{className:"skel",style:{display:"block",width:e,height:t,borderRadius:n,...r}}),Fi=({rows:e=5,cols:t=4})=>p.jsx("div",{className:"col",style:{gap:0},children:Array.from({length:e}).map((n,r)=>p.jsx("div",{className:"row",style:{gap:16,padding:"11px 13px",borderBottom:"1px solid var(--line-faint)"},children:Array.from({length:t}).map((i,o)=>p.jsx(Kc,{w:o===0?150:`${40+(r+o)%3*18}px`},o))},r))}),fne=({value:e,min:t=0,max:n=100,step:r=1,onChange:i,suffix:o,width:l=140})=>p.jsxs("span",{className:"row",style:{gap:10},children:[p.jsx("input",{type:"range",min:t,max:n,step:r,value:e,onChange:u=>i?.(+u.target.value),style:{width:l,accentColor:"var(--accent)"}}),p.jsxs("span",{className:"mono tnum",style:{fontSize:12.5,minWidth:44},children:[e,o?` ${o}`:""]})]}),dne=({checked:e,onChange:t})=>p.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t?.(!e),style:{width:40,height:23,borderRadius:999,border:"1px solid var(--line-strong)",background:e?"var(--accent)":"var(--bg-elev-2)",position:"relative",transition:".16s",cursor:"pointer",padding:0,flex:"none"},children:p.jsx("span",{style:{position:"absolute",top:2,left:e?19:2,width:17,height:17,borderRadius:"50%",background:e?"var(--accent-ink)":"var(--tx-mid)",transition:".16s"}})}),hne={booting:"cyan",running:"green",restarting:"yellow","shutting-down":"red"},xB=e=>hne[e],pne="linear-gradient(180deg, color-mix(in oklab, var(--bg-panel) 70%, var(--bg-base)), var(--bg-base))",mne=({sections:e,route:t,collapsed:n,onToggleCollapsed:r,phase:i,cycleId:o,ready:l,total:u,mode:f,failedCount:h})=>{const y=xB(i),m=i!=="running";return p.jsxs("aside",{className:"col",style:{borderRight:"1px solid var(--line)",background:pne,overflow:"hidden",zIndex:2},children:[p.jsxs("button",{type:"button",className:"row",onClick:r,title:n?"Expand nav":"Collapse nav",style:{gap:11,padding:n?"0":"0 18px",justifyContent:n?"center":"flex-start",height:"var(--header-h)",borderBottom:"1px solid var(--line)",flex:"none",background:"transparent",border:"none",borderRadius:0,cursor:"pointer",textAlign:"left"},children:[p.jsx("div",{style:{width:32,height:32,borderRadius:9,background:"linear-gradient(145deg, var(--accent), color-mix(in oklab, var(--accent) 60%, #000))",color:"var(--accent-ink)",display:"grid",placeItems:"center",flex:"none",fontWeight:700,fontFamily:"var(--font-mono)",fontSize:17,boxShadow:"0 0 0 1px var(--accent-line), 0 6px 18px -6px var(--accent-glow)"},children:"◆"}),!n&&p.jsxs("div",{className:"col",style:{gap:1},children:[p.jsx("span",{style:{fontWeight:620,letterSpacing:"-.02em",lineHeight:1,fontSize:15},children:"devstack"}),p.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--tx-lo)",letterSpacing:".02em"},children:"orchestrator · v0.9.4"})]})]}),p.jsx("nav",{className:"col scroll-y grow",style:{gap:1,padding:n?"12px 10px":"14px 12px"},children:e.map((g,S)=>p.jsxs("div",{className:"col",style:{gap:1},children:[g.label&&(n?S>0&&p.jsx("div",{style:{height:1,background:"var(--line)",margin:"9px 8px"}}):p.jsx("div",{className:"eyebrow",style:{padding:"14px 11px 6px"},children:g.label})),g.items.map(T=>{const w=t===T.id,x=T.id==="services"&&h>0;return p.jsxs("button",{type:"button",className:"nav-item "+(w?"on":""),onClick:()=>T.pluginKey?Ct("plugin",T.pluginKey):Ct(T.id),title:n?T.label:void 0,style:n?{position:"relative",justifyContent:"center",padding:0,width:40,height:40,margin:"0 auto"}:void 0,children:[p.jsx(xe,{name:T.icon,size:17}),!n&&p.jsx("span",{children:T.label}),x&&p.jsx("span",{className:"dot dot-red dot-pulse nav-badge",style:n?{position:"absolute",top:7,right:7,marginLeft:0}:void 0})]},T.id)})]},g.label??`top-${S}`))}),n?p.jsx("div",{className:"col",style:{alignItems:"center",padding:"12px 0",flex:"none"},children:p.jsx("span",{className:`dot dot-${y} ${m?"dot-pulse":""}`,style:{width:9,height:9}})}):p.jsx("div",{style:{padding:12,flex:"none"},children:p.jsxs("div",{className:"panel",style:{padding:"11px 13px",background:"var(--bg-base)"},children:[p.jsxs("div",{className:"row between",style:{marginBottom:9},children:[p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx("span",{className:`dot dot-${y} ${m?"dot-pulse":""}`}),p.jsx("span",{style:{fontSize:12,fontWeight:540},children:LS(i)})]}),p.jsx("span",{className:"badge",style:{height:18,fontSize:9.5,textTransform:"uppercase",letterSpacing:".07em",color:"var(--c-cyan)"},children:f})]}),p.jsxs("div",{className:"row between mono",style:{fontSize:10.5,color:"var(--tx-lo)"},children:[p.jsxs("span",{children:["cycle #",o]}),p.jsxs("span",{children:[l,"/",u," ready"]})]})]})})]})},yne={connecting:{token:"yellow",label:"connecting",pulse:!0},live:{token:"green",label:"live",pulse:!0},error:{token:"red",label:"offline",pulse:!1}},SD=p.jsx("span",{style:{width:1,height:22,background:"var(--line)"}}),vne=({projection:e,mode:t,connection:n,onOpenPalette:r,onToggleTheme:i,theme:o})=>{const l=yne[n];return p.jsxs("header",{className:"row between",style:{height:"var(--header-h)",padding:"0 22px",borderBottom:"1px solid var(--line)",background:"color-mix(in oklab, var(--bg-panel) 50%, transparent)",backdropFilter:"blur(8px)",flex:"none",zIndex:5,gap:16},children:[p.jsx("div",{className:"row",style:{gap:14,minWidth:0},children:e&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx(mt,{token:"green"}),p.jsx("span",{style:{fontWeight:560},children:e.identity.app}),p.jsx("span",{className:"badge",style:{height:20,fontSize:10.5,textTransform:"uppercase",letterSpacing:".06em",color:"var(--c-cyan)"},children:e.identity.network}),t==="fork"&&p.jsx("span",{className:"badge",title:"Forked upstream network — a local node loaded with upstream state",style:{height:20,fontSize:10.5,textTransform:"uppercase",letterSpacing:".06em",color:"var(--c-yellow)",borderColor:"color-mix(in oklab, var(--c-yellow) 32%, var(--line-strong))"},children:"fork"})]}),SD,(()=>{const u=xB(e.cycle.phase),f=qS(e.rows);return p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"badge",style:{height:20,borderColor:`color-mix(in oklab, var(--c-${u}) 32%, var(--line-strong))`},children:[p.jsx(mt,{token:u,pulse:e.cycle.phase!=="running"}),p.jsxs("span",{style:{color:`var(--c-${u})`,fontSize:11},children:["cycle #",e.cycle.id," · ",e.cycle.phase]})]}),p.jsxs("span",{className:"mono trunc",style:{fontSize:11.5,color:"var(--tx-lo)"},children:[f.ready,"/",f.total," ready"]})]})})()]})}),p.jsxs("div",{className:"row",style:{gap:8},children:[p.jsxs("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:r,style:{color:"var(--tx-lo)"},children:[p.jsx(xe,{name:"search",size:14})," Search ",p.jsx("kbd",{children:"⌘K"})]}),SD,p.jsx(Ms,{icon:o==="dark"?"zap":"box",label:o==="dark"?"Light theme":"Dark theme",onClick:i}),p.jsx(Ms,{icon:"terminal",label:"Console (l)",onClick:()=>Ct("activity")}),p.jsxs("span",{className:"badge",style:{height:28,borderColor:`color-mix(in oklab, var(--c-${l.token}) 30%, var(--line-strong))`},title:`Projection stream: ${l.label}`,children:[p.jsx(mt,{token:l.token,pulse:l.pulse}),p.jsx("span",{style:{fontSize:11,color:`var(--c-${l.token})`},children:l.label})]})]})]})},gne=9,bne=({open:e,onClose:t,commands:n})=>{const[r,i]=z.useState(""),[o,l]=z.useState(0),u=z.useRef(null);z.useEffect(()=>{e&&(i(""),l(0),u.current?.focus())},[e]);const f=z.useMemo(()=>{const y=r.trim().toLowerCase();return(y?n.filter(g=>`${g.label} ${g.hint??""}`.toLowerCase().includes(y)):n).slice(0,gne)},[n,r]);if(z.useEffect(()=>{l(y=>f.length===0?0:Math.min(y,f.length-1))},[f.length]),!e)return null;const h=y=>{if(y.key==="ArrowDown")y.preventDefault(),l(m=>f.length===0?0:(m+1)%f.length);else if(y.key==="ArrowUp")y.preventDefault(),l(m=>f.length===0?0:(m-1+f.length)%f.length);else if(y.key==="Enter"){y.preventDefault();const m=f[o];m&&(m.run(),t())}else y.key==="Escape"&&(y.preventDefault(),t())};return p.jsx("div",{className:"overlay",onClick:t,style:{alignItems:"flex-start"},children:p.jsxs("div",{className:"panel palette",onClick:y=>y.stopPropagation(),style:{boxShadow:"var(--sh-pop)",overflow:"hidden"},children:[p.jsxs("div",{className:"row",style:{padding:"0 16px",borderBottom:"1px solid var(--line)",gap:10},children:[p.jsx(xe,{name:"search",size:17,style:{color:"var(--tx-lo)"}}),p.jsx("input",{ref:u,className:"palette-input",value:r,onChange:y=>i(y.target.value),onKeyDown:h,placeholder:"Jump to a page or run a command…",style:{padding:0}}),p.jsx("kbd",{children:"esc"})]}),p.jsx("div",{className:"col scroll-y",style:{padding:8,maxHeight:380},children:f.length===0?p.jsx("div",{style:{padding:24,textAlign:"center",color:"var(--tx-lo)",fontSize:13},children:"No matches"}):f.map((y,m)=>p.jsxs("div",{className:"palette-item "+(m===o?"on":""),onMouseEnter:()=>l(m),onClick:()=>{y.run(),t()},children:[p.jsx(xe,{name:y.icon??"arrowR",size:16,style:{color:"var(--tx-mid)"}}),p.jsx("span",{style:{fontSize:14},children:y.label}),y.hint&&p.jsx("span",{className:"mono trunc",style:{fontSize:11.5,color:"var(--tx-dim)",maxWidth:220},children:y.hint}),p.jsx(xe,{name:"arrowR",size:14,className:"pi-arrow",style:{marginLeft:"auto",opacity:0,color:"var(--accent)"}})]},y.id))})]})})},Vw=[{key:"deepbook",label:"DeepBook",icon:"layers"},{key:"walrus",label:"Walrus",icon:"database"},{key:"seal",label:"Seal",icon:"plug"},{key:"coins",label:"Coins",icon:"coins"},{key:"postgres",label:"Postgres",icon:"database"}],xne=e=>{const t=Vw.find(n=>n.key===e);return{id:`plugin:${e}`,label:t?.label??e,icon:t?.icon??"plug",pluginKey:e}},Sne=[{label:null,items:[{id:"overview",label:"Overview",icon:"grid"},{id:"services",label:"Services",icon:"layers"},{id:"activity",label:"Console",icon:"terminal"}]},{label:"Chain",items:[{id:"accounts",label:"Accounts",icon:"wallet"},{id:"faucet",label:"Faucet",icon:"drop"},{id:"explorer",label:"Explorer",icon:"compass"}]}],wne={label:"Manage",items:[{id:"controls",label:"Controls",icon:"sliders"},{id:"config",label:"Config",icon:"cog"}]},Tne=e=>{const t=t5(e,Vw.map(r=>r.key)),n=t.length>0?[{label:"Plugins",items:t.map(xne)}]:[];return[...Sne,...n,wne]},One=e=>e.flatMap(t=>t.items),jne=7,Ane=6,SB=({projection:e,activity:t,chain:n})=>{const{rows:r,endpoints:i,accounts:o,packages:l,errors:u,cycle:f}=e,h=qS(r),y=o.filter(L=>L.funding.status==="funded").length,m=FR(r),g=r.filter(L=>L.status==="failed"),S=h.failed>0||u.length>0,T=g[0]?.lastError??u[0]??null,w=t.slice(0,jne),x=VS(n),O=x.data?.checkpoint??null,E=x.data?.totalTransactions??null,N=x.data?.timestampMs??null,{rate:k,isTps:A}=JR(n.network,O,E,N),[_,C]=RE(n.network),[I,q]=RE(n.network);z.useEffect(()=>{O!==null&&C(O)},[O]),z.useEffect(()=>{k!==null&&q(Number(k.toFixed(2)))},[k]);const G=n.rpcUrl!==null;return p.jsxs("div",{className:"col",style:{gap:22},children:[p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(168px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Services",value:`${h.ready}/${h.total}`,sub:"ready",token:Y$(h.health),icon:"layers"}),G&&p.jsx(wD,{spark:_.length>1?_:null,sparkType:"line",sparkColor:"var(--c-cyan)",children:p.jsx(ht,{label:"Checkpoint",value:O!==null?O.toLocaleString():"—",sub:x.data?`epoch ${x.data.epoch}`:"connecting…",token:"cyan",icon:"box",live:O!==null})}),G&&p.jsx(wD,{spark:I.length>1?I:null,sparkColor:"var(--c-green)",children:p.jsx(ht,{label:"Throughput",value:k!==null?k.toFixed(2):"—",sub:A?"TPS":"cp / s",token:"green",icon:"activity",live:k!==null})}),p.jsx(ht,{label:"Accounts",value:`${y}/${o.length}`,sub:"funded",token:"magenta",icon:"wallet"}),p.jsx(ht,{label:"Packages",value:l.length,sub:"tracked",token:"blue",icon:"box"}),p.jsx(ht,{label:"Uptime",value:fn(f.startedAt),sub:`cycle #${f.id}`,icon:"clock"})]}),S&&p.jsxs(Oe,{pad:!0,className:"fade-up",style:{borderColor:"color-mix(in oklab, var(--c-red) 34%, var(--line))",background:"color-mix(in oklab, var(--c-red) 6%, var(--bg-panel))"},children:[p.jsxs("div",{className:"row",style:{gap:11},children:[p.jsx(xe,{name:"alert",size:18,style:{color:"var(--c-red)",flex:"none"}}),p.jsxs("div",{className:"grow",children:[p.jsxs("div",{style:{fontWeight:560,marginBottom:2},children:[h.failed," service",h.failed===1?"":"s"," need",h.failed===1?"s":""," attention"]}),p.jsx("div",{className:"trunc",style:{color:"var(--tx-mid)",fontSize:12.5},children:g.map(L=>En(L.key)).join(", ")||"Stack errors"})]}),p.jsx("button",{className:"btn btn-sm",onClick:()=>Ct("services"),children:"Inspect"})]}),T&&p.jsx("div",{style:{marginTop:11},children:p.jsx(sI,{error:T})})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.55fr 1fr",gap:22,alignItems:"start"},children:[p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{paddingBottom:0},children:p.jsx(Je,{title:"Stack status",count:r.length,right:p.jsxs("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("services"),children:["All services ",p.jsx(xe,{name:"arrowR",size:13})]})})}),p.jsx("div",{className:"col",style:{padding:"4px 0 8px"},children:m.map(L=>p.jsxs("div",{children:[p.jsx("div",{className:"eyebrow",style:{padding:"10px 18px 6px"},children:L.label}),L.rows.map(P=>{const H=dp(P.status),F=P.status==="failed",K=qR(P);return p.jsxs("div",{className:"row",onClick:()=>Ct("services",P.key),style:{padding:"8px 18px",gap:12,cursor:"pointer"},onMouseEnter:B=>{B.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:B=>{B.currentTarget.style.background="transparent"},children:[p.jsx(mt,{token:H.token,pulse:H.pulse}),p.jsx("span",{style:{fontWeight:530,minWidth:132},children:En(P.key)}),p.jsx("span",{className:"trunc grow",style:{color:F?"var(--c-red)":"var(--tx-mid)",fontSize:12.5},children:K}),p.jsx("span",{style:{color:`var(--c-${H.token})`,fontSize:12,fontWeight:540},children:H.label})]},P.key)})]},L.section))})]}),p.jsxs("div",{className:"col",style:{gap:22},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Endpoints",count:i.length}),p.jsxs("div",{className:"col",style:{gap:7},children:[i.slice(0,Ane).map(L=>p.jsxs("div",{className:"row between",style:{gap:8},children:[p.jsx(pp,{endpoint:L}),p.jsx(bt,{text:L.url,display:nu(L)})]},L.endpointKey)),i.length===0&&p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No endpoints registered."})]})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Recent activity",right:p.jsxs("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:["Open feed ",p.jsx(xe,{name:"arrowR",size:13})]})}),p.jsxs("div",{className:"col",style:{gap:2},children:[w.map(L=>p.jsxs("div",{className:"row fade-up",style:{gap:9,padding:"5px 0"},children:[p.jsx(mt,{token:$S(L.section)}),p.jsx("span",{className:"trunc grow",style:{fontSize:12.5,color:"var(--tx-mid)"},children:L.text}),p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)"},children:fn(L.at)})]},L.id)),w.length===0&&p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No activity this cycle."})]})]})]})]})]})},wD=({children:e,spark:t,sparkColor:n,sparkType:r="area"})=>p.jsxs("div",{style:{position:"relative",minWidth:0},children:[e,t&&p.jsx("div",{style:{position:"absolute",right:12,bottom:10,pointerEvents:"none",opacity:.85},children:p.jsx(one,{data:t,type:r,color:n,width:84,height:26})})]}),Ene=({projection:e,activity:t,endpoint:n,refresh:r})=>{const{rows:i,endpoints:o}=e,l=FR(i),[u,f]=z.useState(null),h=u?i.find(m=>m.key===u)??null:null,y=[{key:"status",header:"Status",width:130,render:m=>p.jsx(hp,{status:m.status})},{key:"service",header:"Service",render:m=>p.jsxs("div",{className:"col",style:{gap:1},children:[p.jsx("span",{style:{fontWeight:540},children:En(m.key)}),p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)"},children:m.key})]})},{key:"phase",header:"Phase",render:m=>p.jsx("div",{className:"trunc",style:{color:m.status==="failed"?"var(--c-red)":"var(--tx-mid)",fontSize:12.5,maxWidth:260},children:qR(m)})},{key:"role",header:"Role",render:m=>p.jsx(Vt,{style:{height:19,fontSize:11},children:m.role})},{key:"owner",header:"Owner",render:m=>{const g=X$(m.key)??"system";return g==="system"?p.jsx("span",{style:{color:"var(--tx-lo)",fontSize:12},children:"system"}):p.jsx("span",{style:{color:"var(--tx-mid)",fontSize:12},children:g})}},{key:"endpoints",header:"Endpoints",render:m=>{const g=zR(m,o);return p.jsx("div",{className:"row wrap",style:{gap:5},children:g.length?g.map(S=>p.jsx(pp,{endpoint:S},S.endpointKey)):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})})}},{key:"chev",header:"",width:40,render:()=>p.jsx(xe,{name:"chevR",size:15,style:{color:"var(--tx-dim)"}})}];return p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsx("div",{className:"row between wrap",style:{gap:12},children:p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Services & Plugins"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Every resource the supervisor manages, grouped by role. Click a row for lifecycle & controls."})]})}),l.map(m=>p.jsx(Oe,{header:p.jsx("span",{className:"eyebrow",children:m.label}),children:p.jsx(Nn,{columns:y,rows:m.rows,rowKey:g=>g.key,onRowClick:g=>f(g.key)})},m.section)),h&&p.jsx(_ne,{row:h,endpoints:o,activity:t,endpoint:n,refresh:r,onClose:()=>f(null)})]})},_ne=({row:e,endpoints:t,activity:n,endpoint:r,refresh:i,onClose:o})=>{const{error:l,success:u}=Br(),[f,h]=z.useState(!1);z.useEffect(()=>{const x=O=>{O.key==="Escape"&&o()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[o]);const y=z.useCallback(async x=>{if(!f){h(!0);try{const O=await x();O.ok?u(O.message??`${O.command} ok`):l(O.message??`${O.command} failed`),await i()}catch(O){l(O instanceof Error?O.message:String(O))}finally{h(!1)}}},[f,l,u,i]),m=dp(e.status),g=e.status==="failed",S=zR(e,t),T=n.filter(x=>x.pluginKey===e.key).slice(0,8),w=e.logTail.lines;return p.jsx("div",{className:"overlay overlay-right",onClick:o,children:p.jsxs("div",{className:"sheet fade-right",onClick:x=>x.stopPropagation(),children:[p.jsxs("div",{className:"row between",style:{padding:"16px 20px",borderBottom:"1px solid var(--line)"},children:[p.jsxs("div",{className:"row",style:{gap:11},children:[p.jsx(mt,{token:m.token,pulse:m.pulse}),p.jsxs("div",{children:[p.jsx("h3",{style:{fontSize:16},children:En(e.key)}),p.jsxs("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-lo)"},children:[e.key," · ",e.role]})]})]}),p.jsx(Ms,{icon:"x",label:"Close",onClick:o})]}),p.jsxs("div",{className:"scroll-y",style:{padding:20,flex:1,display:"flex",flexDirection:"column",gap:20},children:[p.jsxs("div",{className:"row between",children:[p.jsx(hp,{status:e.status}),p.jsx("span",{className:"trunc",style:{color:g?"var(--c-red)":"var(--tx-mid)",fontSize:12.5},children:e.phase??""})]}),g&&e.lastError&&p.jsx(sI,{error:e.lastError}),S.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:8},children:"Endpoints"}),p.jsx("div",{className:"col",style:{gap:6},children:S.map(x=>p.jsxs("div",{className:"row between",children:[p.jsx(pp,{endpoint:x}),p.jsx(bt,{text:x.url,display:nu(x)})]},x.endpointKey))})]}),p.jsxs("div",{className:"grow",children:[p.jsxs("div",{className:"eyebrow row",style:{marginBottom:8,gap:6},children:["Log tail",p.jsx("span",{className:`dot dot-${e.logTail.level==="error"?"red":"cyan"}`})]}),p.jsxs("div",{className:"logbox mono",children:[w.length?w.map((x,O)=>p.jsx("div",{className:"logline",children:p.jsx("span",{style:{color:"var(--tx-hi)",fontSize:11.5},children:x})},O)):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11.5},children:"No log output."}),e.logTail.truncated&&p.jsx("div",{className:"logline",style:{color:"var(--tx-dim)",fontSize:11,fontStyle:"italic"},children:"… output truncated"})]})]}),p.jsxs("div",{children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:8},children:"Recent events"}),p.jsx("div",{className:"col",style:{gap:4},children:T.length?T.map(x=>p.jsxs("div",{className:"row",style:{gap:8},children:[p.jsx(mt,{token:x.kind==="error"?"red":"cyan"}),p.jsx("span",{className:"trunc grow",style:{fontSize:12.5,color:"var(--tx-mid)"},children:x.text}),p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)"},children:BR(x.at)})]},x.id)):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No events this cycle."})})]})]}),p.jsxs("div",{className:"row",style:{gap:9,padding:"14px 20px",borderTop:"1px solid var(--line)"},children:[p.jsxs("button",{className:"btn grow",disabled:f,onClick:()=>{y(()=>Us(r,e.key))},children:[p.jsx(xe,{name:"refresh",size:14})," Restart"]}),p.jsxs("button",{className:"btn",disabled:f,onClick:()=>{y(()=>RR(r,e.key))},children:[p.jsx(xe,{name:"zap",size:14})," Apply"]}),p.jsx(Ms,{icon:"terminal",label:"Open in console",onClick:()=>Ct("activity")})]})]})})},TD=600,Nne=[{value:"error",label:"error",token:"red"},{value:"warn",label:"warn",token:"yellow"},{value:"info",label:"info",token:"cyan"},{value:"debug",label:"debug",token:"white"}],kne=[{value:"ok",label:"ok",token:"green"},{value:"error",label:"error",token:"red"}],Cne=e=>e==="error"||e==="fatal"?"var(--c-red)":e==="warn"?"var(--c-yellow)":"var(--tx-hi)",OD=e=>e==="error"||e==="fatal",Mne=e=>e==="error"||e==="fatal"?"error":e==="warn"||e==="warning"?"warn":e==="debug"||e==="trace"?"debug":"info",Dne=e=>`${e.service}#${e.seq}`,jD=e=>Object.entries(e).map(([t,n])=>`${t}=${typeof n=="string"?n:JSON.stringify(n)}`).join(" "),Rne=e=>new Date(e).toLocaleTimeString("en",{hour12:!1}),Fw=(e,t)=>e.includes(t)?e.filter(n=>n!==t):[...e,t],AD=1500,Ine=40,Pne=({endpoint:e})=>{const t=Br(),[n,r]=z.useState([]),[i,o]=z.useState([]),[l,u]=z.useState(""),[f,h]=z.useState(!0),[y,m]=z.useState(0),g=z.useRef(null),S=z.useRef(0),T=G=>L=>G(P=>Fw(P,L)),w=lt({queryKey:["logServices",e],queryFn:()=>E$(e),refetchInterval:AD*4}),x=l.trim(),O=lt({queryKey:["logs",e,n,i,x],queryFn:()=>A$(e,{services:n.length?n:void 0,levels:i.length?i:void 0,search:x||void 0,limit:TD}),refetchInterval:AD,placeholderData:G=>G}),E=z.useMemo(()=>[...O.data??[]].sort((P,H)=>P.timestampMillis===H.timestampMillis?P.seq-H.seq:P.timestampMillis-H.timestampMillis).slice(-TD),[O.data]),N=z.useMemo(()=>{const G=x.toLowerCase();return G?E.filter(L=>L.message.toLowerCase().includes(G)||L.service.toLowerCase().includes(G)||En(L.service).toLowerCase().includes(G)):E},[E,x]);z.useEffect(()=>{if(f){const G=g.current;G&&(G.scrollTop=G.scrollHeight),S.current=N.length,m(0)}else m(Math.max(0,N.length-S.current))},[N.length,f]);const k=G=>{const L=G.currentTarget,P=L.scrollHeight-L.scrollTop-L.clientHeight<Ine;!P&&f?h(!1):P&&!f&&(h(!0),S.current=N.length,m(0))},A=()=>{try{const G=N.map(F=>{const K=jD(F.fields);return`${new Date(F.timestampMillis).toISOString()} ${F.level.toUpperCase()} ${F.service} ${F.message}${K?` ${K}`:""}`}).join(`
|
|
455
|
+
`),L=new Blob([G],{type:"text/plain"}),P=URL.createObjectURL(L),H=document.createElement("a");H.href=P,H.download=`devstack-logs-${Date.now()}.log`,H.click(),URL.revokeObjectURL(P),t.success(`Exported ${N.length} log lines`)}catch(G){t.error(G instanceof Error?G.message:"Export failed")}},_=z.useMemo(()=>(w.data??[]).map(G=>({value:G,label:En(G)})),[w.data]),C=z.useMemo(()=>N.filter(G=>OD(G.level)).length,[N]),I=O.isLoading,q=O.isError?O.error instanceof Error?O.error.message:"Failed to load logs":null;return p.jsxs("div",{className:"col",style:{gap:12,height:"100%"},children:[p.jsxs("div",{className:"row wrap",style:{gap:9},children:[p.jsxs("div",{className:"row",style:{gap:8,background:"var(--bg-panel)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"0 10px",height:32,flex:"1 1 240px",maxWidth:380},children:[p.jsx(xe,{name:"search",size:15,style:{color:"var(--tx-lo)"}}),p.jsx("input",{value:l,onChange:G=>u(G.target.value),placeholder:"Search messages…",style:{background:"transparent",border:"none",outline:"none",color:"var(--tx-hi)",fontSize:13,flex:1,fontFamily:"var(--font-mono)"}}),l&&p.jsx("button",{className:"iconbtn",style:{width:22,height:22},onClick:()=>u(""),"aria-label":"Clear search",children:p.jsx(xe,{name:"x",size:13})})]}),p.jsx(ru,{label:"Service",icon:"layers",options:_,selected:n,onToggle:T(r)}),p.jsx(ru,{label:"Level",icon:"filter",options:Nne,selected:i,onToggle:T(o)}),p.jsx("div",{className:"grow"}),C>0&&p.jsxs("span",{className:"row",style:{gap:6,fontSize:12,color:"var(--c-red)"},title:"Error/fatal lines in view — these survive even if their service crashed.",children:[p.jsx(mt,{token:"red"}),C," error",C===1?"":"s"]}),p.jsxs("button",{className:"btn btn-sm",onClick:()=>{h(G=>!G),m(0),S.current=N.length},style:f?{borderColor:"var(--accent-line)",color:"var(--accent)"}:void 0,children:[p.jsx(xe,{name:f?"pause":"play",size:13}),f?"Following":"Paused",!f&&y>0?` · ${y} new`:""]}),p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:A,disabled:N.length===0,title:"Export visible lines",children:p.jsx(xe,{name:"download",size:14})})]}),q&&p.jsxs("div",{className:"row",style:{gap:9,padding:"8px 12px",borderRadius:9,background:"color-mix(in oklab, var(--c-red) 7%, var(--bg-panel))",border:"1px solid color-mix(in oklab, var(--c-red) 34%, var(--line))",fontSize:12.5,color:"var(--tx-mid)"},children:[p.jsx(xe,{name:"alert",size:15,style:{color:"var(--c-red)"}}),"Log query failed: ",q]}),p.jsx("div",{ref:g,className:"panel logbox-full mono scroll-y grow",onScroll:k,children:I?p.jsx("div",{className:"col",style:{gap:8,padding:12},children:Array.from({length:8}).map((G,L)=>p.jsx(Kc,{w:`${50+L*7%45}%`,h:13},L))}):N.length===0?p.jsx(Ge,{icon:"terminal",title:"No log lines",hint:n.length||i.length||x?"No lines match the active filters.":"Services have not emitted any logs yet."}):N.map(G=>{const L=OD(G.level),P=jD(G.fields);return p.jsxs("div",{className:"logline",style:L?{background:"color-mix(in oklab, var(--c-red) 9%, transparent)",borderLeft:"2px solid var(--c-red)",paddingLeft:8}:void 0,children:[p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11},children:Rne(G.timestampMillis)}),p.jsx(a8,{level:Mne(G.level)}),p.jsx("span",{style:{color:"var(--tx-lo)",fontSize:11.5,minWidth:96},title:G.service,children:En(G.service)}),p.jsx("span",{style:{color:Cne(G.level),fontSize:12.5,flex:1,fontWeight:L?560:void 0},children:G.message}),P&&p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11},children:P})]},Dne(G))})})]})},Bne=["service","package","account","action","app","other"],Une=Bne.map(e=>({value:e,label:e==="other"?"other":UR(e).toLowerCase(),token:e==="other"?"white":$S(e)})),Lne=({activity:e})=>{const[t,n]=z.useState([]),[r,i]=z.useState(!1),o=u=>n(f=>Fw(f,u)),l=z.useMemo(()=>t.length===0?e:e.filter(u=>t.includes(u.section)),[e,t]);return p.jsxs("div",{className:"col",style:{gap:12,height:"100%"},children:[p.jsxs("div",{className:"row wrap",style:{gap:9},children:[p.jsx(ru,{label:"Scope",icon:"filter",options:Une,selected:t,onToggle:o}),p.jsx("div",{className:"grow"}),p.jsx("button",{className:"btn btn-sm",onClick:()=>i(u=>!u),style:r?{borderColor:"var(--accent-line)",color:"var(--accent)"}:void 0,children:r?"Raw tags":"Curated"})]}),l.length===0?p.jsx("div",{className:"panel grow",style:{display:"grid",placeItems:"center"},children:p.jsx(Ge,{icon:"activity",title:e.length===0?"No activity yet":"No events in scope",hint:e.length===0?"Status changes, endpoints, and errors appear here as the projection updates.":"Adjust the scope filter to surface more events."})}):p.jsx("div",{className:"panel scroll-y grow",style:{padding:"6px 4px"},children:l.map(u=>{const f=u.section==="other"?"white":$S(u.section),h=u.pluginKey!==null,y=u.pluginKey;return p.jsxs("div",{className:"row fade-up",onClick:h?()=>Ct("services",y??void 0):void 0,style:{gap:9,padding:"6px 10px",borderRadius:7,cursor:h?"pointer":"default"},onMouseEnter:h?m=>{m.currentTarget.style.background="var(--bg-hover)"}:void 0,onMouseLeave:h?m=>{m.currentTarget.style.background="transparent"}:void 0,children:[p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)",minWidth:44},children:fn(u.at)}),p.jsx("span",{style:{width:3,alignSelf:"stretch",borderRadius:3,background:`var(--c-${f})`,margin:"2px 0"}}),p.jsx(mt,{token:f}),p.jsx("span",{className:"mono",style:{fontSize:11.5,color:`var(--c-${f})`,minWidth:64},children:u.kind}),r?p.jsx("span",{className:"mono trunc grow",style:{fontSize:11.5,color:"var(--tx-mid)"},children:`{ plugin: ${JSON.stringify(y)}, scope: ${JSON.stringify(u.section)} }`}):p.jsx("span",{className:"trunc grow",style:{fontSize:12.5,color:"var(--tx-mid)"},children:u.text}),y&&p.jsx(Vt,{style:{height:18,fontSize:10},children:En(y)})]},u.id)})})]})},ED=2e3,zne=400,Tx=e=>e!=="ok"&&e!=="unset",$ne=({endpoint:e})=>{const[t,n]=z.useState([]),[r,i]=z.useState([]),[o,l]=z.useState(""),u=x=>O=>x(E=>Fw(E,O)),f=o.trim(),h=lt({queryKey:["spanServices",e],queryFn:()=>N$(e),refetchInterval:ED*3}),y=lt({queryKey:["spans",e,t,r,f],queryFn:()=>_$(e,{services:t.length?t:void 0,statuses:r.length?r:void 0,search:f||void 0,limit:zne}),refetchInterval:ED,placeholderData:x=>x}),m=z.useMemo(()=>[...y.data??[]].sort((O,E)=>E.startMillis-O.startMillis),[y.data]),g=z.useMemo(()=>Math.max(1,...m.map(x=>x.durationMillis)),[m]),S=z.useMemo(()=>(h.data??[]).map(x=>({value:x,label:En(x)})),[h.data]),T=z.useMemo(()=>[{key:"status-dot",header:"",width:30,render:x=>p.jsx(mt,{token:Tx(x.status)?"red":"green"})},{key:"op",header:"Operation",sortVal:x=>x.name,render:x=>p.jsx("span",{className:"mono",style:{fontSize:12.5,color:"var(--tx-hi)"},title:x.traceId,children:x.name})},{key:"service",header:"Service",sortVal:x=>x.service??"",render:x=>x.service?p.jsx(Vt,{style:{height:19,fontSize:11},children:En(x.service)}):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11.5},children:"—"})},{key:"duration",header:"Duration",width:"40%",sortVal:x=>x.durationMillis,render:x=>{const O=Tx(x.status);return p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx("div",{className:"grow",style:{maxWidth:240},children:p.jsx(rI,{value:x.durationMillis/g,token:O?"red":"blue"})}),p.jsxs("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)",minWidth:56},children:[x.durationMillis.toFixed(1),"ms"]})]})}},{key:"when",header:"When",width:70,align:"right",sortVal:x=>x.startMillis,render:x=>p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-dim)"},children:fn(x.startMillis)})},{key:"status",header:"Status",width:72,sortVal:x=>x.status,render:x=>{const O=Tx(x.status);return p.jsx("span",{style:{fontSize:11.5,fontWeight:540,color:O?"var(--c-red)":"var(--c-green)"},children:O?"error":"ok"})}}],[g]),w=y.isError?y.error instanceof Error?y.error.message:"Failed to load spans":null;return p.jsxs("div",{className:"col",style:{gap:12,height:"100%"},children:[p.jsxs(Cn,{tone:"info",className:"shrink-0",title:p.jsxs("span",{children:["Spans collected by the in-memory"," ",p.jsx("span",{className:"mono",style:{color:"var(--c-blue)"},children:"SpanStore"})," ","tracer"]}),children:["Indexed by ",p.jsx("span",{className:"mono",children:"devstack.plugin / endpoint / op"})," — newest first."]}),p.jsxs("div",{className:"row wrap",style:{gap:9},children:[p.jsxs("div",{className:"row",style:{gap:8,background:"var(--bg-panel)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"0 10px",height:32,flex:"1 1 220px",maxWidth:340},children:[p.jsx(xe,{name:"search",size:15,style:{color:"var(--tx-lo)"}}),p.jsx("input",{value:o,onChange:x=>l(x.target.value),placeholder:"Search operations…",style:{background:"transparent",border:"none",outline:"none",color:"var(--tx-hi)",fontSize:13,flex:1,fontFamily:"var(--font-mono)"}}),o&&p.jsx("button",{className:"iconbtn",style:{width:22,height:22},onClick:()=>l(""),"aria-label":"Clear search",children:p.jsx(xe,{name:"x",size:13})})]}),p.jsx(ru,{label:"Service",icon:"layers",options:S,selected:t,onToggle:u(n)}),p.jsx(ru,{label:"Status",icon:"filter",options:kne,selected:r,onToggle:u(i)})]}),w&&p.jsxs("div",{className:"row",style:{gap:9,padding:"8px 12px",borderRadius:9,background:"color-mix(in oklab, var(--c-red) 7%, var(--bg-panel))",border:"1px solid color-mix(in oklab, var(--c-red) 34%, var(--line))",fontSize:12.5,color:"var(--tx-mid)"},children:[p.jsx(xe,{name:"alert",size:15,style:{color:"var(--c-red)"}}),"Span query failed: ",w]}),p.jsx("div",{className:"panel scroll-y grow",style:{padding:"8px 0"},children:y.isLoading?p.jsx(Fi,{rows:7,cols:5}):p.jsx(Nn,{columns:T,rows:m,rowKey:x=>x.spanId,empty:p.jsxs("div",{style:{padding:"36px 20px",textAlign:"center",color:"var(--tx-lo)"},children:[p.jsx("div",{style:{color:"var(--tx-mid)",fontWeight:540,marginBottom:4},children:"No spans collected"}),p.jsx("div",{style:{fontSize:12.5},children:t.length||r.length||f?"No spans match the active filters.":"Operations appear here as the tracer records them."})]})})})]})},qne=[{value:"logs",label:"Logs"},{value:"events",label:"Events"},{value:"traces",label:"Traces"}],Vne=({endpoint:e,activity:t})=>{const[n,r]=z.useState("logs");return p.jsxs("div",{className:"col",style:{gap:16,height:"100%"},children:[p.jsxs("div",{className:"row between wrap",style:{gap:12},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Console"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Live logs, the engine event stream, and span traces — one place."})]}),p.jsx(nI,{options:qne,value:n,onChange:r})]}),p.jsx("div",{className:"grow",style:{minHeight:0},children:n==="logs"?p.jsx(Pne,{endpoint:e}):n==="events"?p.jsx(Lne,{activity:t}):p.jsx($ne,{endpoint:e})})]})},Fne="0x2::sui::SUI",Gne=e=>(e.split("::").pop()??e).toUpperCase(),Hne=e=>{let t=0n,n=!1;for(const r of e)if(r.funding.balanceMist!==null)try{t+=BigInt(r.funding.balanceMist),n=!0}catch{}return n?Ld(t):"—"},Wne=({projection:e,chain:t})=>{const{accounts:n}=e,[r,i]=z.useState(null),o=r?n.find(f=>f.key===r)??null:null,l=n.filter(f=>["funded","skipped"].includes(f.funding.status)).length,u=[{key:"account",header:"Account",render:f=>p.jsxs("span",{className:"row",style:{gap:8},children:[p.jsx(FS,{address:f.address??f.key,size:18}),p.jsx("span",{style:{color:"var(--c-magenta)",fontWeight:550},children:f.name})]}),sortVal:f=>f.name},{key:"address",header:"Address",render:f=>p.jsx(Hd,{address:f.address})},{key:"scheme",header:"Scheme",render:f=>f.scheme?p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-lo)"},children:f.scheme}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})},{key:"source",header:"Source",render:f=>p.jsx(Vt,{style:{height:19,fontSize:10.5,color:f.source==="impersonate"?"var(--c-yellow)":"var(--tx-mid)"},children:f.source==="impersonate"?"impersonate":f.source??"—"})},{key:"balance",header:"Balance",align:"right",render:f=>p.jsx(Yne,{chain:t,account:f})},{key:"funding",header:"Funding",render:f=>p.jsx(f8,{funding:f.funding})},{key:"wallet",header:"Wallet",render:f=>f.walletVisible?p.jsx(mt,{token:"cyan"}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})}];return p.jsxs("div",{className:"col",style:{gap:16},children:[p.jsxs("div",{className:"row between wrap",style:{gap:12},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Accounts & Wallet"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Configured keypairs with live on-chain balances and funding status."})]}),p.jsx("span",{title:"Dev-wallet connection isn't wired up yet",children:p.jsx(un,{variant:"primary",sm:!0,icon:"wallet",disabled:!0,children:"Connect dev-wallet"})})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(168px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Accounts",value:n.length,token:"magenta",icon:"wallet"}),p.jsx(ht,{label:"Funded",value:`${l}/${n.length}`,sub:"funded",token:"green",icon:"check"}),p.jsx(ht,{label:"Total balance",value:Hne(n),sub:"SUI",token:"cyan",icon:"coins"})]}),n.length===0?p.jsx(Oe,{children:p.jsx(Ge,{icon:"wallet",title:"No accounts configured",hint:"Accounts declared in the stack config appear here once the projection loads."})}):p.jsxs("div",{style:{display:"grid",gridTemplateColumns:o?"1fr 360px":"1fr",gap:18,alignItems:"start"},children:[p.jsx(Oe,{style:{overflow:"hidden"},children:p.jsx(Nn,{columns:u,rows:n,rowKey:f=>f.key,activeKey:r??void 0,onRowClick:f=>i(h=>h===f.key?null:f.key)})}),o&&p.jsx(Xne,{account:o,chain:t,onClose:()=>i(null)})]})]})},Yne=({chain:e,account:t})=>{const r=QR(e,t.address).data??t.funding.balanceMist;return p.jsx(Zo,{mist:r})},Xne=({account:e,chain:t,onClose:n})=>{const r=Br(),i=LR(e.funding.status),o=QR(t,e.address),l=XR(t,e.address),u=o.data??e.funding.balanceMist,f=(l.data??[]).filter(y=>y.coinType!==Fne),h=()=>{r.info("Export guarded — ephemeral keypairs only")};return p.jsxs(Oe,{className:"panel-pad fade-up col",style:{gap:16,position:"sticky",top:0},children:[p.jsxs("div",{className:"row between",children:[p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx(FS,{address:e.address??e.key,size:36}),p.jsxs("div",{children:[p.jsx("div",{style:{fontWeight:560,color:"var(--c-magenta)"},children:e.name}),p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-lo)"},children:e.scheme??"no scheme"})]})]}),p.jsx(Ms,{icon:"x",label:"Close detail",onClick:n})]}),p.jsx(bt,{text:e.address??"—",display:e.address??"—"}),p.jsxs(Oe,{pad:!0,style:{background:"var(--bg-elev)"},children:[p.jsxs("div",{className:"row between",style:{marginBottom:8},children:[p.jsx("span",{className:"eyebrow",children:"Balances"}),p.jsxs("span",{className:"row",style:{gap:6},children:[p.jsx(mt,{token:i.token,pulse:e.funding.status==="pending"}),p.jsx("span",{style:{fontSize:11.5,color:`var(--c-${i.token})`},children:e.funding.status==="funded"?`✓ ${i.label}`:i.label})]})]}),p.jsxs("div",{className:"col",style:{gap:7},children:[p.jsxs("div",{className:"row between",children:[p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(el,{symbol:"SUI",size:18}),p.jsx("span",{className:"mono",style:{fontSize:12},children:"SUI"})]}),p.jsx(Zo,{mist:u})]}),f.map(y=>{const m=Gne(y.coinType);return p.jsxs("div",{className:"row between",children:[p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(el,{symbol:m,size:18}),p.jsx("span",{className:"mono",style:{fontSize:12},children:m})]}),p.jsx(Zo,{mist:y.balance,symbol:m})]},y.coinType)}),l.isLoading&&f.length===0&&p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-dim)"},children:"Loading balances…"}),l.isError&&p.jsx("span",{style:{fontSize:11.5,color:"var(--c-red)"},children:"Couldn't read balances from the node."})]})]}),e.source==="impersonate"&&p.jsxs(Oe,{className:"panel-pad row",style:{gap:8,borderColor:"color-mix(in oklab, var(--c-yellow) 34%, var(--line))",background:"color-mix(in oklab, var(--c-yellow) 7%, transparent)",fontSize:12.5,color:"var(--tx-mid)"},children:[p.jsx(xe,{name:"alert",size:14,style:{color:"var(--c-yellow)",flex:"none"}}),"Impersonated account — no signing key. Reads only."]}),p.jsxs("div",{className:"row",style:{gap:8},children:[p.jsx(un,{variant:"primary",className:"grow",icon:"drop",onClick:()=>Ct("faucet"),children:"Fund"}),p.jsx(un,{disabled:!e.address,onClick:()=>e.address&&Fo(e.address),children:"View on explorer"})]}),p.jsx(un,{variant:"danger",sm:!0,onClick:h,children:"Export keypair"})]})},Ox="__other__",Kne=/^0x[0-9a-fA-F]+$/,Qne=20,Jne=["10","100","1000"];let Zne=1;const ere=({projection:e,chain:t,endpoint:n,refresh:r})=>{const i=Br(),o=RS(),l=Y5(n,t.network),u=z.useMemo(()=>l.data??[],[l.data]),f=z.useMemo(()=>e.accounts.filter(F=>F.address!==null),[e.accounts]),[h,y]=z.useState(()=>f[0]?.key??Ox),[m,g]=z.useState(""),[S,T]=z.useState(null),[w,x]=z.useState("100"),[O,E]=z.useState("idle"),[N,k]=z.useState([]);z.useEffect(()=>{S===null&&u.length>0&&T(u[0].coinType)},[S,u]);const A=u.find(F=>F.coinType===S)??u[0]??null,_=h===Ox||f.length===0,C=_?m.trim():f.find(F=>F.key===h)?.address??"",I=_?He(m.trim()):f.find(F=>F.key===h)?.name??C,q=Kne.test(C),G=!A?.honorsAmount||/^\d+$/.test(w.trim()),L=A!==null&&q&&G&&O!=="requesting",P=async F=>{if(F.preventDefault(),!L||A===null)return;E("requesting");const K=A.honorsAmount?w.trim():void 0;let B;try{B=await b$(n,{recipient:C,coinType:A.coinType,...K!==void 0?{amountBaseUnits:K}:{}})}catch(D){B={ok:!1,detail:`request failed: ${String(D)}`}}k(D=>[{id:Zne++,coin:A.symbol,amount:A.honorsAmount?w.trim():"—",target:I,at:Date.now(),ok:B.ok,detail:B.detail},...D].slice(0,Qne)),B.ok?(i.success(`${A.symbol} → ${I}`),await r(),o.invalidateQueries({queryKey:["chain",t.network,"balances"]}),o.invalidateQueries({queryKey:["chain",t.network,"suiBalance"]})):i.error(B.detail||`${A.symbol} request failed`),E("idle")};if(l.isLoading)return p.jsxs("div",{className:"col",style:{gap:16},children:[p.jsx(jx,{}),p.jsx("div",{className:"panel",children:p.jsx(Ge,{icon:"drop",title:"Loading faucet…",hint:"Resolving fundable coins."})})]});if(u.length===0)return p.jsxs("div",{className:"col",style:{gap:16},children:[p.jsx(jx,{}),p.jsx("div",{className:"panel",children:p.jsx(Ge,{icon:"drop",title:"No fundable coins",hint:"The running stack has no faucet or funding strategy registered, so requests cannot be dispatched."})})]});const H=N.find(F=>!F.ok)??null;return p.jsxs("div",{className:"col",style:{gap:16},children:[p.jsx(jx,{}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0,1fr) minmax(0,1fr)",gap:18,alignItems:"start"},children:[p.jsxs("form",{className:"panel panel-pad col",style:{gap:16},onSubmit:P,children:[p.jsxs("div",{className:"col",style:{gap:7},children:[p.jsx("span",{className:"eyebrow",children:"Target"}),p.jsxs(eI,{value:h,onChange:F=>y(F.target.value),children:[f.map(F=>p.jsxs("option",{value:F.key,children:[F.name," — ",He(F.address??"")]},F.key)),p.jsx("option",{value:Ox,children:"Other address…"})]}),_&&p.jsx(Wd,{className:"mono",value:m,onChange:F=>g(F.target.value),placeholder:"0x… recipient address","aria-invalid":m.length>0&&!q,style:m.length>0&&!q?{borderColor:"color-mix(in oklab, var(--c-red) 50%, var(--line))"}:void 0}),A?.requiresAccountSigner&&_&&p.jsxs("span",{style:{fontSize:11.5,color:"var(--tx-lo)"},children:[A.symbol," funding spends the recipient account's own SUI, so the recipient must be a configured account — pasted addresses will be rejected."]})]}),p.jsxs("div",{className:"col",style:{gap:7},children:[p.jsx("span",{className:"eyebrow",children:"Coin"}),p.jsx("div",{className:"row wrap",style:{gap:8},children:u.map(F=>{const K=F.coinType===A?.coinType;return p.jsxs(un,{type:"button",sm:!0,onClick:()=>T(F.coinType),style:K?{borderColor:"var(--accent)",color:"var(--accent)",background:"var(--accent-soft)"}:void 0,children:[p.jsx(el,{symbol:F.symbol,size:16})," ",F.symbol]},F.coinType)})}),p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-lo)"},children:A===null?null:A.honorsAmount?`${A.symbol} is funded by an on-chain swap from the recipient account's SUI.`:"The Sui faucet dispenses a fixed-amount native SUI grant (amount is not configurable)."})]}),A?.honorsAmount&&p.jsxs("div",{className:"col",style:{gap:7},children:[p.jsx("span",{className:"eyebrow",children:"Amount (base units)"}),p.jsxs("div",{className:"row",style:{gap:8},children:[p.jsx(Wd,{type:"number",className:"mono",value:w,onChange:F=>x(F.target.value),"aria-invalid":!G,style:{width:140,...G?{}:{borderColor:"color-mix(in oklab, var(--c-red) 50%, var(--line))"}}}),p.jsx("div",{className:"row",style:{gap:6},children:Jne.map(F=>p.jsx(un,{type:"button",sm:!0,variant:"ghost",onClick:()=>x(F),children:F},F))})]})]}),H&&O!=="requesting"&&p.jsx(tre,{detail:H.detail,onRetry:P}),p.jsx(un,{type:"submit",variant:"primary",disabled:!L,style:{height:38},children:O==="requesting"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"dot dot-white dot-pulse"})," Requesting…"]}):p.jsxs(p.Fragment,{children:[p.jsx(xe,{name:"drop",size:15})," Request ",A?.symbol??"coin"]})})]}),p.jsxs("div",{className:"panel",style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:"Recent requests",count:N.length})}),N.length===0?p.jsx(Ge,{icon:"clock",title:"No requests yet",hint:"Dispatched faucet requests from this session appear here with their processed outcome."}):p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Coin"}),p.jsx("th",{children:"Amount"}),p.jsx("th",{children:"Target"}),p.jsx("th",{children:"When"}),p.jsx("th",{})]})}),p.jsx("tbody",{children:N.map(F=>p.jsxs("tr",{title:F.detail,children:[p.jsx("td",{className:"mono",children:F.coin}),p.jsx("td",{className:"mono tnum",children:F.amount}),p.jsx("td",{children:p.jsx("span",{style:{color:"var(--c-magenta)",fontSize:12.5},children:F.target})}),p.jsxs("td",{style:{color:"var(--tx-lo)",fontSize:12},children:[fn(F.at)," ago"]}),p.jsx("td",{children:p.jsxs("span",{className:"row",style:{gap:6,alignItems:"center"},children:[p.jsx(mt,{token:F.ok?"green":"red"}),p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:F.ok?"processed":"failed"})]})})]},F.id))})]})]})]})]})},tre=({detail:e,onRetry:t})=>p.jsxs("div",{className:"panel panel-pad col",style:{gap:6,borderColor:"color-mix(in oklab, var(--c-red) 36%, var(--line))",background:"color-mix(in oklab, var(--c-red) 7%, var(--bg-elev))"},children:[p.jsxs("div",{className:"row between",children:[p.jsxs("span",{className:"row",style:{gap:8},children:[p.jsx(xe,{name:"alert",size:14,style:{color:"var(--c-red)"}}),p.jsx("span",{style:{fontWeight:560,fontSize:13,color:"var(--c-red)"},children:"Request failed"})]}),p.jsxs(un,{type:"button",sm:!0,variant:"ghost",onClick:n=>{t(n)},children:[p.jsx(xe,{name:"refresh",size:13})," Retry"]})]}),p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-mid)"},children:e})]}),jx=()=>p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Faucet"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Dispense test coins to any configured account or a pasted address — processed in-process by the stack's funding strategies."})]}),nre=1e4,rre=5e3,are=1500,_D=18e4,ire=[{id:"restart",label:"Restart stack",icon:"refresh",desc:"Cycle all services, keep state",token:"yellow",danger:!0,confirmBody:"Cycle every service in the stack. State is preserved, but in-flight work is interrupted.",run:e=>CR(e)},{id:"apply",label:"Apply",icon:"zap",desc:"Reconcile config → running stack",token:"cyan",run:e=>RR(e)},{id:"codegen",label:"Codegen",icon:"hash",desc:"Regenerate typed bindings",token:"blue",run:e=>DR(e)},{id:"prune",label:"Prune",icon:"filter",desc:"Drop dangling containers & volumes",token:"yellow",danger:!0,confirmBody:"Remove dangling containers and volumes left behind by previous cycles. Running services are untouched.",run:e=>h$(e)},{id:"advance-clock",label:"Advance clock",icon:"clock",desc:"Fast-forward chain time",token:"blue",clock:!0},{id:"wipe",label:"Wipe",icon:"trash",desc:"Destroy all state — genesis reset",token:"red",danger:!0,confirmBody:"Destroy all chain and container state and reset to genesis. Every account, package, and snapshot-less change is lost. This cannot be undone.",run:e=>d$(e)},{id:"shutdown",label:"Shutdown",icon:"power",desc:"Graceful stop of the whole stack",token:"yellow",confirm:!0,confirmBody:"Gracefully stop every service in the stack. No state is lost, but the dashboard will lose its connection once the engine exits.",run:e=>p$(e)}],sre=({projection:e,endpoint:t,refresh:n})=>{const r=Br(),[i,o]=z.useState(null),[l,u]=z.useState(null),[f,h]=z.useState(null),[y,m]=z.useState(null),[g,S]=z.useState(null),[T,w]=z.useState(null),[x,O]=z.useState(null),[E,N]=z.useState(null),A=lt({queryKey:["mode",t],queryFn:()=>PR(t),refetchInterval:nre}).data==="fork",_=lt({queryKey:["snapshots",t],queryFn:()=>B$(t),refetchInterval:x!==null?are:rre}),C=_.data??[],I=async(D,Q,se)=>{o(D);try{const ce=await se();ce.ok?r.success(ce.message??`${Q} complete`):r.error(ce.message??`${Q} failed`),await n(),await _.refetch()}catch(ce){r.error(ce instanceof Error?ce.message:`${Q} failed`)}finally{o(null)}},q=D=>{i||(D.naming?S(`snapshot-${Date.now()}`):D.clock?w(Date.now()):D.danger||D.confirm?u(D):D.run&&I(D.id,D.label,()=>D.run(t)))},G=()=>{const D=f;h(null),D&&I(`restart/${D.key}`,`Restart ${En(D.key)}`,()=>Us(t,D.key))},L=D=>{const Q=D.trim();S(null),!(!Q||x!==null)&&(o("capture"),(async()=>{try{const se=await MR(t,Q);if(!se.ok){r.error(se.message??"Capture snapshot failed"),o(null);return}r.info(`Capturing "${Q}"…`),O({label:Q,startedAt:Date.now(),knownIds:new Set(C.map(ce=>ce.id))})}catch(se){r.error(se instanceof Error?se.message:"Capture snapshot failed"),o(null)}})())},P=D=>{w(null),I("advance-clock","Advance clock",()=>m$(t,D))},H=async()=>{const D=y;if(m(null),!D)return;const{kind:Q,snap:se}=D,ce=se.label||se.id;o(`snapshot/${Q}`),Q==="restore"&&N({label:ce,startedAt:Date.now()});try{const U=Q==="restore"?await y$(t,se.id):await v$(t,se.id);U.ok?r.success(U.detail??`Snapshot "${ce}" ${Q==="restore"?"restored":"deleted"}`):r.error(U.detail??`Snapshot ${Q} failed`),await _.refetch(),Q==="restore"&&await n()}catch(U){r.error(U instanceof Error?U.message:`Snapshot ${Q} failed`)}finally{N(null),o(null)}},F=z.useRef({toast:r,refresh:n});F.current={toast:r,refresh:n},z.useEffect(()=>{if(x===null)return;if(C.find(Q=>!x.knownIds.has(Q.id)&&(Q.label??"")===x.label)){F.current.toast.success(`Snapshot "${x.label}" captured`),O(null),o(null),F.current.refresh();return}Date.now()-x.startedAt>=_D&&(F.current.toast.error(`Capture "${x.label}" did not complete — it may have failed or been interrupted.`),O(null),o(null))},[x,C]),z.useEffect(()=>{if(x===null)return;const D=Math.max(0,x.startedAt+_D-Date.now()),Q=setTimeout(()=>{F.current.toast.error(`Capture "${x.label}" did not complete — it may have failed or been interrupted.`),O(null),o(null)},D);return()=>clearTimeout(Q)},[x]);const[,K]=z.useState(0);z.useEffect(()=>{if(x===null&&E===null)return;const D=setInterval(()=>K(Q=>Q+1),1e3);return()=>clearInterval(D)},[x,E]);const B=[{key:"label",header:"Label",render:D=>p.jsxs("div",{className:"col",style:{gap:2},children:[p.jsxs("span",{style:{fontWeight:530},children:[D.label||"snapshot",D.corrupt&&p.jsx(Vt,{style:{height:16,fontSize:9.5,marginLeft:6,color:"var(--c-red)"},children:"corrupt"})]}),p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)"},children:D.id})]}),sortVal:D=>D.label||D.id},{key:"created",header:"Created",render:D=>p.jsx("span",{style:{color:"var(--tx-mid)",fontSize:12.5},children:D.createdAt?`${fn(D.createdAt)} ago`:"—"}),sortVal:D=>D.createdAt??0},{key:"participants",header:"Participants",align:"right",render:D=>p.jsx("span",{className:"mono tnum",children:D.participants.length}),sortVal:D=>D.participants.length},{key:"containers",header:"Containers",align:"right",render:D=>p.jsx("span",{className:"mono tnum",children:D.containerCount}),sortVal:D=>D.containerCount},{key:"hostTree",header:"Host tree",render:D=>D.subtreeCount>0?p.jsxs("span",{className:"row",style:{gap:6},children:[p.jsx(mt,{token:"green"}),p.jsx("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)"},children:D.subtreeCount})]}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"}),sortVal:D=>D.subtreeCount},{key:"network",header:"Network",render:D=>p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-lo)"},children:D.network})},{key:"actions",header:"",align:"right",render:D=>p.jsxs("div",{className:"row",style:{gap:6,justifyContent:"flex-end"},children:[p.jsx(un,{sm:!0,disabled:i!==null||D.corrupt,onClick:()=>m({kind:"restore",snap:D}),children:"Restore"}),p.jsx(Ms,{icon:"trash",label:`Delete snapshot ${D.label||D.id}`,disabled:i!==null,onClick:()=>m({kind:"delete",snap:D})})]})}];return p.jsxs("div",{className:"col",style:{gap:22},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Controls & Operations"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Engine commands dispatched in-process. The UI waits for the projection to reflect the effect."})]}),p.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(232px, 1fr))",gap:14},children:ire.filter(D=>!D.clock||A).map(D=>{const Q=i===D.id,se=i!==null;return p.jsxs("button",{className:"panel panel-pad",disabled:se,onClick:()=>q(D),style:{textAlign:"left",cursor:se?"not-allowed":"pointer",opacity:se&&!Q?.5:1,transition:".14s",display:"flex",flexDirection:"column",gap:8},children:[p.jsxs("div",{className:"row between",children:[p.jsx("div",{style:{width:34,height:34,borderRadius:9,display:"grid",placeItems:"center",background:`color-mix(in oklab, var(--c-${D.token}) 13%, transparent)`,color:`var(--c-${D.token})`},children:p.jsx(xe,{name:Q?"refresh":D.icon,size:17})}),D.danger?p.jsx(Vt,{style:{height:18,fontSize:10,color:"var(--c-red)"},children:"destructive"}):Q&&p.jsx("span",{className:"dot dot-cyan dot-pulse"})]}),p.jsx("div",{style:{fontWeight:560,fontSize:14},children:D.label}),p.jsx("div",{style:{color:"var(--tx-lo)",fontSize:12.5},children:D.desc})]},D.id)})}),p.jsxs("div",{className:"panel panel-pad",children:[p.jsx(Je,{title:"Selective restart",count:e.rows.length}),e.rows.length===0?p.jsx(Ge,{icon:"layers",title:"No managed rows",hint:"The supervisor isn't managing anything yet."}):p.jsx("div",{className:"row wrap",style:{gap:8},children:e.rows.map(D=>{const Q=dp(D.status);return p.jsxs(un,{sm:!0,disabled:i!==null,onClick:()=>h(D),children:[p.jsx(mt,{token:Q.token,pulse:Q.pulse})," ",En(D.key)]},D.key)})})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsxs("div",{className:"panel-pad",style:{paddingBottom:12},children:[p.jsx(Je,{title:"Snapshots",count:C.length,right:p.jsx(un,{variant:"primary",sm:!0,icon:"camera",disabled:i!==null,onClick:()=>S(`snapshot-${Date.now()}`),children:"Capture"})}),x&&p.jsxs("div",{className:"panel panel-pad fade-up",style:{background:"var(--bg-elev)",marginTop:12},children:[p.jsxs("div",{className:"row between",style:{marginBottom:8},children:[p.jsxs("span",{className:"row",style:{gap:8},children:[p.jsx("span",{className:"dot dot-blue dot-pulse"}),p.jsxs("span",{style:{fontSize:13},children:["Capturing ",p.jsxs("span",{className:"mono",children:['"',x.label,'"']}),"…"]})]}),p.jsx("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)"},children:fn(x.startedAt)})]}),p.jsx(ND,{token:"blue"}),p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-dim)",marginTop:6,display:"block"},children:"Pausing containers, committing layers and saving images — this can take a moment."})]}),E&&p.jsxs("div",{className:"panel panel-pad fade-up",style:{background:"var(--bg-elev)",marginTop:12},children:[p.jsxs("div",{className:"row between",style:{marginBottom:8},children:[p.jsxs("span",{className:"row",style:{gap:8},children:[p.jsx("span",{className:"dot dot-blue dot-pulse"}),p.jsxs("span",{style:{fontSize:13},children:["Restoring ",p.jsxs("span",{className:"mono",children:['"',E.label,'"']}),"…"]})]}),p.jsx("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)"},children:fn(E.startedAt)})]}),p.jsx(ND,{token:"blue"}),p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-dim)",marginTop:6,display:"block"},children:"Rolling the chain and containers back to this checkpoint — the stack is briefly unavailable."})]})]}),C.length===0?p.jsx("div",{className:"panel-pad",style:{paddingTop:0},children:p.jsx(Ge,{icon:"camera",title:"No snapshots yet",hint:"Capture a checkpoint of the whole stack to restore it later."})}):p.jsx(Nn,{columns:B,rows:C,rowKey:D=>D.id})]}),p.jsx(wv,{open:l!==null,danger:l?.danger??!1,title:l?.label??"",body:l?.confirmBody??`Run "${l?.label}"? This affects the running stack.`,confirmLabel:l?.label,onCancel:()=>u(null),onConfirm:()=>{const D=l;u(null),D?.run&&I(D.id,D.label,()=>D.run(t))}}),p.jsx(wv,{open:f!==null,title:f?`Restart ${En(f.key)}?`:"",body:f?`Cycle "${En(f.key)}". State is preserved, but in-flight work on this service is interrupted.`:"",confirmLabel:"Restart",onCancel:()=>h(null),onConfirm:()=>{G()}}),p.jsx(wv,{open:y!==null,danger:!0,title:y?.kind==="restore"?`Restore "${y.snap.label||y.snap.id}"?`:`Delete "${y?.snap.label||y?.snap.id}"?`,body:y?.kind==="restore"?"Replaces the current chain and container state with this snapshot. Unsaved progress is lost.":"Permanently delete this snapshot. This cannot be undone.",confirmLabel:y?.kind==="restore"?"Restore":"Delete",onCancel:()=>m(null),onConfirm:()=>{H()}}),g!==null&&p.jsx("div",{className:"overlay",onClick:()=>S(null),children:p.jsxs("div",{className:"panel",onClick:D=>D.stopPropagation(),style:{width:420,padding:22,animation:"popIn .2s ease both"},children:[p.jsxs("div",{className:"row",style:{gap:11,marginBottom:14},children:[p.jsx("div",{style:{width:32,height:32,borderRadius:8,display:"grid",placeItems:"center",background:"color-mix(in oklab, var(--c-blue) 14%, transparent)",color:"var(--c-blue)",flex:"none"},children:p.jsx(xe,{name:"camera",size:18})}),p.jsxs("div",{children:[p.jsx("h3",{style:{fontSize:16},children:"Capture snapshot"}),p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:"Name this point-in-time checkpoint of the whole stack."})]})]}),p.jsx(Wd,{autoFocus:!0,className:"mono",value:g,onChange:D=>S(D.target.value),onKeyDown:D=>{D.key==="Enter"&&g.trim()&&L(g.trim()),D.key==="Escape"&&S(null)},placeholder:"snapshot-name",style:{width:"100%",marginBottom:18}}),p.jsxs("div",{className:"row",style:{gap:9,justifyContent:"flex-end"},children:[p.jsx(un,{onClick:()=>S(null),children:"Cancel"}),p.jsx(un,{variant:"primary",icon:"camera",disabled:!g.trim(),onClick:()=>L(g.trim()),children:"Capture"})]})]})}),T!==null&&p.jsx("div",{className:"overlay",onClick:()=>w(null),children:p.jsxs("div",{className:"panel",onClick:D=>D.stopPropagation(),style:{width:440,padding:22,animation:"popIn .2s ease both"},children:[p.jsxs("div",{className:"row",style:{gap:11,marginBottom:14},children:[p.jsx("div",{style:{width:32,height:32,borderRadius:8,display:"grid",placeItems:"center",background:"color-mix(in oklab, var(--c-blue) 14%, transparent)",color:"var(--c-blue)",flex:"none"},children:p.jsx(xe,{name:"clock",size:18})}),p.jsxs("div",{children:[p.jsx("h3",{style:{fontSize:16},children:"Advance clock"}),p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:"Fast-forward the forked chain's clock to an absolute epoch-millis timestamp."})]})]}),p.jsxs("div",{className:"col",style:{gap:8,marginBottom:18},children:[p.jsx("span",{className:"eyebrow",children:"Target (epoch ms)"}),p.jsx(tI,{autoFocus:!0,value:T,onChange:D=>w(D),style:{width:"100%"}}),p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-lo)"},children:new Date(T).toISOString()})]}),p.jsxs("div",{className:"row",style:{gap:9,justifyContent:"flex-end"},children:[p.jsx(un,{onClick:()=>w(null),children:"Cancel"}),p.jsx(un,{variant:"primary",icon:"clock",disabled:!Number.isFinite(T)||T<=0,onClick:()=>P(T),children:"Advance"})]})]})})]})},ND=({token:e="blue"})=>p.jsx("div",{className:"meter",children:p.jsx("span",{style:{width:"100%",background:`linear-gradient(90deg, color-mix(in oklab, var(--c-${e}) 55%, transparent), var(--c-${e}), color-mix(in oklab, var(--c-${e}) 55%, transparent))`,backgroundSize:"50% 100%",backgroundRepeat:"no-repeat",animation:"sweep 1.4s linear infinite"}})}),ore=[{key:"name",header:"Name",sortVal:e=>e.name,render:e=>p.jsx("span",{style:{fontWeight:530},children:e.name})},{key:"plugin",header:"Plugin",render:e=>p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-lo)"},children:e.pluginKey})},{key:"protocol",header:"Protocol",render:e=>p.jsx(Vt,{style:{height:18,fontSize:10.5},children:e.wireProtocol})},{key:"url",header:"URL",render:e=>p.jsxs("div",{className:"row",style:{gap:7},children:[p.jsx(pp,{endpoint:e}),p.jsx(bt,{text:e.url,display:nu(e)})]})},{key:"registered",header:"Registered",width:90,sortVal:e=>e.registeredAt,render:e=>p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-dim)"},children:fn(e.registeredAt)})}],lre=[{key:"name",header:"Name",render:e=>p.jsx("span",{style:{fontWeight:530},children:En(e.name)})},{key:"packageId",header:"Package ID",render:e=>p.jsx(Hd,{address:e.packageId})},{key:"kind",header:"Kind",render:e=>p.jsx(Vt,{style:{height:18,fontSize:10.5,color:e.kind==="local"?"var(--c-blue)":"var(--tx-mid)"},children:e.kind})},{key:"upgradeCap",header:"Upgrade cap",render:e=>e.upgradeCapId?p.jsx(Hd,{address:e.upgradeCapId}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})},{key:"source",header:"Source",render:e=>e.sourcePath?p.jsx("span",{className:"mono trunc",title:e.sourcePath,style:{fontSize:11.5,color:"var(--tx-dim)",maxWidth:220,display:"inline-block"},children:He(e.sourcePath,14,18)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})}],cre=({projection:e})=>{const{identity:t,cycle:n,endpoints:r,packages:i,lastEvent:o}=e;return p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Config inspector"}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Resolved identity & registries. Read-only, live-updating."})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Identity"}),p.jsxs(BE,{children:[p.jsx(ms,{label:"app",children:p.jsx(bt,{text:t.app,display:t.app})}),p.jsx(ms,{label:"stack",children:p.jsx(bt,{text:t.stack,display:t.stack})}),p.jsx(ms,{label:"network",children:p.jsx(bt,{text:t.network,display:t.network})})]})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Cycle"}),p.jsxs(BE,{children:[p.jsx(ms,{label:"id",children:p.jsxs("span",{className:"mono",style:{fontSize:12,color:"var(--tx-hi)"},children:["#",n.id]})}),p.jsx(ms,{label:"phase",children:p.jsx(Vt,{style:{height:19,fontSize:11},children:n.phase})}),p.jsx(ms,{label:"started",children:p.jsxs("span",{className:"mono",style:{fontSize:12,color:"var(--tx-hi)"},children:[BR(n.startedAt)," · ",fn(n.startedAt)]})}),p.jsx(ms,{label:"last event",children:p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--tx-hi)"},children:o?`#${o.seq} · ${fn(o.at)}`:"—"})})]})]})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Endpoint registry",count:r.length}),children:p.jsx(Nn,{columns:ore,rows:r,rowKey:l=>l.endpointKey,empty:p.jsx(Ge,{icon:"plug",title:"No endpoints registered"})})}),p.jsx(Oe,{header:p.jsx(Je,{title:"Packages",count:i.length}),children:p.jsx(Nn,{columns:lre,rows:i,rowKey:l=>l.packageId,empty:p.jsx(Ge,{icon:"box",title:"No packages published"})})})]})},ure=/^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i,fre=/^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i,dre=235;function hre(e){return e.length>dre?!1:e.includes("@")?ure.test(e):fre.test(e)}const pre=/^([a-z0-9]+(?:-[a-z0-9]+)*)$/,mre=/^\d+$/,yre=64,vre="/",wB=e=>{const t=e.split(vre);if(t.length<2||t.length>3)return!1;const[n,r,i]=t;return i!==void 0&&!mre.test(i)||!hre(n)?!1:pre.test(r)&&r.length<yre};function Yh(e){let t=BigInt(e);const n=[];let r=0;if(t===0n)return[0];for(;t>0;)n[r]=Number(t&127n),t>>=7n,t>0n&&(n[r]|=128),r+=1;return n}function gre(e){let t=0n,n=0n,r=0;for(;;){if(r>=e.length)throw new Error("ULEB decode error: buffer overflow");const i=e[r];if(r+=1,t+=BigInt(i&127)<<n,(i&128)===0)break;n+=7n}if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("ULEB decode error: value exceeds MAX_SAFE_INTEGER");return{value:Number(t),length:r}}var bre=class{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength)}shift(e){return this.bytePosition+=e,this}read8(){const e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){const e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){const e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){const e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){const e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){const e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){const t=this.bytePosition+this.dataView.byteOffset,n=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),n}readULEB(){const e=this.bytePosition+this.dataView.byteOffset,{value:t,length:n}=gre(new Uint8Array(this.dataView.buffer,e));return this.shift(n),t}readVec(e){const t=this.readULEB(),n=[];for(let r=0;r<t;r++)n.push(e(this,r,t));return n}};function xre(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function TB(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(n=>typeof n=="string"):t.every(n=>Number.isSafeInteger(n)):!1}function dS(e,t){if(typeof t!="string")throw new Error(`${e}: string expected`);return!0}function OB(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function hS(e){if(!Array.isArray(e))throw new Error("array expected")}function jB(e,t){if(!TB(!0,t))throw new Error(`${e}: array of strings expected`)}function Sre(e,t){if(!TB(!1,t))throw new Error(`${e}: array of numbers expected`)}function wre(...e){const t=o=>o,n=(o,l)=>u=>o(l(u)),r=e.map(o=>o.encode).reduceRight(n,t),i=e.map(o=>o.decode).reduce(n,t);return{encode:r,decode:i}}function Tre(e){const t=typeof e=="string"?e.split(""):e,n=t.length;jB("alphabet",t);const r=new Map(t.map((i,o)=>[i,o]));return{encode:i=>(hS(i),i.map(o=>{if(!Number.isSafeInteger(o)||o<0||o>=n)throw new Error(`alphabet.encode: digit index outside alphabet "${o}". Allowed: ${e}`);return t[o]})),decode:i=>(hS(i),i.map(o=>{dS("alphabet.decode",o);const l=r.get(o);if(l===void 0)throw new Error(`Unknown letter: "${o}". Allowed: ${e}`);return l}))}}function Ore(e=""){return dS("join",e),{encode:t=>(jB("join.decode",t),t.join(e)),decode:t=>(dS("join.decode",t),t.split(e))}}function kD(e,t,n){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: invalid to=${n}, base cannot be less than 2`);if(hS(e),!e.length)return[];let r=0;const i=[],o=Array.from(e,u=>{if(OB(u),u<0||u>=t)throw new Error(`invalid integer: ${u}`);return u}),l=o.length;for(;;){let u=0,f=!0;for(let h=r;h<l;h++){const y=o[h],m=t*u,g=m+y;if(!Number.isSafeInteger(g)||m/t!==u||g-y!==m)throw new Error("convertRadix: carry overflow");const S=g/n;u=g%n;const T=Math.floor(S);if(o[h]=T,!Number.isSafeInteger(T)||T*n+u!==g)throw new Error("convertRadix: carry overflow");if(f)T?f=!1:r=h;else continue}if(i.push(u),f)break}for(let u=0;u<e.length-1&&e[u]===0;u++)i.push(0);return i.reverse()}function jre(e){OB(e);const t=2**8;return{encode:n=>{if(!xre(n))throw new Error("radix.encode input should be Uint8Array");return kD(Array.from(n),t,e)},decode:n=>(Sre("radix.decode",n),Uint8Array.from(kD(n,e,t)))}}const Are=e=>wre(jre(58),Tre(e),Ore("")),AB=Are("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Yp=e=>AB.encode(e),pS=e=>AB.decode(e);function Ut(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}const Ax=8192;function Pn(e){if(e.length<Ax)return btoa(String.fromCharCode(...e));let t="";for(var n=0;n<e.length;n+=Ax){const r=e.slice(n,n+Ax);t+=String.fromCharCode(...r)}return btoa(t)}function EB(e){const t=e.startsWith("0x")?e.slice(2):e,n=t.length%2===0?t:`0${t}`,r=n.match(/[0-9a-fA-F]{2}/g)?.map(i=>parseInt(i,16))??[];if(r.length!==n.length/2)throw new Error(`Invalid hex string ${e}`);return Uint8Array.from(r)}function Lu(e){return e.reduce((t,n)=>t+n.toString(16).padStart(2,"0"),"")}function mS(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,(r+1)*t))}var CD=class{constructor(e,t){if(typeof e!="function")throw new TypeError(`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: ${e}.`);this._batchLoadFn=e,this._maxBatchSize=kre(t),this._batchScheduleFn=Cre(t),this._cacheKeyFn=Mre(t),this._cacheMap=Dre(t),this._batch=null,this.name=Rre(t)}load(e){if(e==null)throw new TypeError(`The loader.load() function must be called with a value, but got: ${String(e)}.`);const t=_re(this),n=this._cacheMap;let r;if(n){r=this._cacheKeyFn(e);const o=n.get(r);if(o){const l=t.cacheHits||(t.cacheHits=[]);return new Promise(u=>{l.push(()=>{u(o)})})}}t.keys.push(e);const i=new Promise((o,l)=>{t.callbacks.push({resolve:o,reject:l})});return n&&n.set(r,i),i}loadMany(e){if(!_B(e))throw new TypeError(`The loader.loadMany() function must be called with Array<key>, but got: ${e}.`);const t=[];for(let n=0;n<e.length;n++)t.push(this.load(e[n]).catch(r=>r));return Promise.all(t)}clear(e){const t=this._cacheMap;if(t){const n=this._cacheKeyFn(e);t.delete(n)}return this}clearAll(){const e=this._cacheMap;return e&&e.clear(),this}prime(e,t){const n=this._cacheMap;if(n){const r=this._cacheKeyFn(e);if(n.get(r)===void 0){let i;t instanceof Error?(i=Promise.reject(t),i.catch(()=>{})):i=Promise.resolve(t),n.set(r,i)}}return this}};const Ere=typeof process=="object"&&typeof process.nextTick=="function"?function(e){Ex||(Ex=Promise.resolve()),Ex.then(()=>{process.nextTick(e)})}:typeof setImmediate=="function"?function(e){setImmediate(e)}:function(e){setTimeout(e)};let Ex;function _re(e){const t=e._batch;if(t!==null&&!t.hasDispatched&&t.keys.length<e._maxBatchSize)return t;const n={hasDispatched:!1,keys:[],callbacks:[]};return e._batch=n,e._batchScheduleFn(()=>{Nre(e,n)}),n}function Nre(e,t){if(t.hasDispatched=!0,t.keys.length===0){yS(t);return}let n;try{n=e._batchLoadFn(t.keys)}catch(r){return _x(e,t,new TypeError(`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function errored synchronously: ${String(r)}.`))}if(!n||typeof n.then!="function")return _x(e,t,new TypeError(`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: ${String(n)}.`));Promise.resolve(n).then(r=>{if(!_B(r))throw new TypeError(`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: ${String(r)}.`);if(r.length!==t.keys.length)throw new TypeError(`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.
|
|
456
|
+
|
|
457
|
+
Keys:
|
|
458
|
+
${String(t.keys)}
|
|
459
|
+
|
|
460
|
+
Values:
|
|
461
|
+
${String(r)}`);yS(t);for(let i=0;i<t.callbacks.length;i++){const o=r[i];o instanceof Error?t.callbacks[i].reject(o):t.callbacks[i].resolve(o)}}).catch(r=>{_x(e,t,r)})}function _x(e,t,n){yS(t);for(let r=0;r<t.keys.length;r++)e.clear(t.keys[r]),t.callbacks[r].reject(n)}function yS(e){if(e.cacheHits)for(let t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function kre(e){if(!(!e||e.batch!==!1))return 1;const t=e&&e.maxBatchSize;if(t===void 0)return 1/0;if(typeof t!="number"||t<1)throw new TypeError(`maxBatchSize must be a positive number: ${t}`);return t}function Cre(e){const t=e&&e.batchScheduleFn;if(t===void 0)return Ere;if(typeof t!="function")throw new TypeError(`batchScheduleFn must be a function: ${t}`);return t}function Mre(e){const t=e&&e.cacheKeyFn;if(t===void 0)return n=>n;if(typeof t!="function")throw new TypeError(`cacheKeyFn must be a function: ${t}`);return t}function Dre(e){if(!(!e||e.cache!==!1))return null;const t=e&&e.cacheMap;if(t===void 0)return new Map;if(t!==null){const n=["get","set","delete","clear"].filter(r=>t&&typeof t[r]!="function");if(n.length!==0)throw new TypeError("Custom cacheMap missing methods: "+n.join(", "))}return t}function Rre(e){return e&&e.name?e.name:null}function _B(e){return typeof e=="object"&&e!==null&&"length"in e&&typeof e.length=="number"&&(e.length===0||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}function Ire(e,t){switch(t){case"base58":return Yp(e);case"base64":return Pn(e);case"hex":return Lu(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function NB(e,t=["<",">"]){const[n,r]=t,i=[];let o="",l=0;for(let u=0;u<e.length;u++){const f=e[u];if(f===n&&l++,f===r&&l--,l===0&&f===","){i.push(o.trim()),o="";continue}o+=f}return i.push(o.trim()),i}var Pre=class{constructor({initialSize:e=1024,maxSize:t=1/0,allocateSize:n=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t,this.allocateSize=n,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const t=this.bytePosition+e;if(t>this.size){const n=Math.min(this.maxSize,Math.max(this.size+t,this.size+this.allocateSize));if(t>n)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=n;const r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}writeBytes(e){this.ensureSizeOrGrow(e.length);for(let t=0;t<e.length;t++)this.dataView.setUint8(this.bytePosition+t,e[t]);return this.shift(e.length)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return Nx(BigInt(e),8).forEach(t=>this.write8(t)),this}write128(e){return Nx(BigInt(e),16).forEach(t=>this.write8(t)),this}write256(e){return Nx(BigInt(e),32).forEach(t=>this.write8(t)),this}writeULEB(e){return Yh(e).forEach(t=>this.write8(t)),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach((n,r)=>t(this,n,r,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return Ire(this.toBytes(),e)}};function Nx(e,t){const n=new Uint8Array(t);let r=0;for(;e>0;)n[r]=Number(e%BigInt(256)),e=e/BigInt(256),r+=1;return n}var ea=class kB{#t;#e;constructor(t){this.name=t.name,this.read=t.read,this.serializedSize=t.serializedSize??(()=>null),this.#t=t.write,this.#e=t.serialize??((n,r)=>{const i=new Pre({initialSize:this.serializedSize(n)??void 0,...r});return this.#t(n,i),i.toBytes()}),this.validate=t.validate??(()=>{})}write(t,n){this.validate(t),this.#t(t,n)}serialize(t,n){return this.validate(t),new Ure(this,this.#e(t,n))}parse(t){const n=new bre(t);return this.read(n)}fromHex(t){return this.parse(EB(t))}fromBase58(t){return this.parse(pS(t))}fromBase64(t){return this.parse(Ut(t))}transform({name:t,input:n,output:r,validate:i}){return new kB({name:t??this.name,read:o=>r?r(this.read(o)):this.read(o),write:(o,l)=>this.#t(n?n(o):o,l),serializedSize:o=>this.serializedSize(n?n(o):o),serialize:(o,l)=>this.#e(n?n(o):o,l),validate:o=>{i?.(o),this.validate(n?n(o):o)}})}};const Bre=Symbol.for("@mysten/serialized-bcs");var Ure=class{#t;#e;get[Bre](){return!0}constructor(e,t){this.#t=e,this.#e=t}toBytes(){return this.#e}toHex(){return Lu(this.#e)}toBase64(){return Pn(this.#e)}toBase58(){return Yp(this.#e)}parse(){return this.#t.parse(this.#e)}};function Xh({size:e,...t}){return new ea({...t,serializedSize:()=>e})}function kx({readMethod:e,writeMethod:t,...n}){return Xh({...n,read:r=>r[e](),write:(r,i)=>i[t](r),validate:r=>{if(r<0||r>n.maxValue)throw new TypeError(`Invalid ${n.name} value: ${r}. Expected value in range 0-${n.maxValue}`);n.validate?.(r)}})}function Cx({readMethod:e,writeMethod:t,...n}){return Xh({...n,read:r=>r[e](),write:(r,i)=>i[t](BigInt(r)),validate:r=>{const i=BigInt(r);if(i<0||i>n.maxValue)throw new TypeError(`Invalid ${n.name} value: ${i}. Expected value in range 0-${n.maxValue}`);n.validate?.(i)}})}function Lre({serialize:e,...t}){const n=new ea({...t,serialize:e,write:(r,i)=>{for(const o of n.serialize(r).toBytes())i.write8(o)}});return n}function zre({toBytes:e,fromBytes:t,...n}){return new ea({...n,read:r=>{const i=r.readULEB();return t(r.readBytes(i))},write:(r,i)=>{const o=e(r);i.writeULEB(o.length);for(let l=0;l<o.length;l++)i.write8(o[l])},serialize:r=>{const i=e(r),o=Yh(i.length),l=new Uint8Array(o.length+i.length);return l.set(o,0),l.set(i,o.length),l},validate:r=>{if(typeof r!="string")throw new TypeError(`Invalid ${n.name} value: ${r}. Expected string`);n.validate?.(r)}})}function $re(e){let t=null;function n(){return t||(t=e()),t}return new ea({name:"lazy",read:r=>n().read(r),serializedSize:r=>n().serializedSize(r),write:(r,i)=>n().write(r,i),serialize:(r,i)=>n().serialize(r,i).toBytes()})}var qre=class extends ea{constructor({name:e,fields:t,...n}){const r=Object.entries(t);super({name:e,serializedSize:i=>{let o=0;for(const[l,u]of r){const f=u.serializedSize(i[l]);if(f==null)return null;o+=f}return o},read:i=>{const o={};for(const[l,u]of r)o[l]=u.read(i);return o},write:(i,o)=>{for(const[l,u]of r)u.write(i[l],o)},...n,validate:i=>{if(n?.validate?.(i),typeof i!="object"||i==null)throw new TypeError(`Expected object, found ${typeof i}`)}})}},Vre=class extends ea{constructor({fields:e,...t}){const n=Object.entries(e);super({read:r=>{const i=r.readULEB(),o=n[i];if(!o)throw new TypeError(`Unknown value ${i} for enum ${t.name}`);const[l,u]=o;return{[l]:u?.read(r)??!0,$kind:l}},write:(r,i)=>{const[o,l]=Object.entries(r).filter(([u])=>Object.hasOwn(e,u))[0];for(let u=0;u<n.length;u++){const[f,h]=n[u];if(f===o){i.writeULEB(u),h?.write(l,i);return}}},...t,validate:r=>{if(t?.validate?.(r),typeof r!="object"||r==null)throw new TypeError(`Expected object, found ${typeof r}`);const i=Object.keys(r).filter(l=>r[l]!==void 0&&Object.hasOwn(e,l));if(i.length!==1)throw new TypeError(`Expected object with one key, but found ${i.length} for type ${t.name}}`);const[o]=i;if(!Object.hasOwn(e,o))throw new TypeError(`Invalid enum variant ${o}`)}})}},Fre=class extends ea{constructor({fields:e,name:t,...n}){super({name:t??`(${e.map(r=>r.name).join(", ")})`,serializedSize:r=>{let i=0;for(let o=0;o<e.length;o++){const l=e[o].serializedSize(r[o]);if(l==null)return null;i+=l}return i},read:r=>{const i=[];for(const o of e)i.push(o.read(r));return i},write:(r,i)=>{for(let o=0;o<e.length;o++)e[o].write(r[o],i)},...n,validate:r=>{if(n?.validate?.(r),!Array.isArray(r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}})}};function Gre(e,t,n){return new ea({read:r=>{const i=new Array(e);for(let o=0;o<e;o++)i[o]=t.read(r);return i},write:(r,i)=>{for(const o of r)t.write(o,i)},...n,name:n?.name??`${t.name}[${e}]`,validate:r=>{if(n?.validate?.(r),!r||typeof r!="object"||!("length"in r))throw new TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}})}function Hre(e){return R.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:t=>t==null?{None:!0}:{Some:t},output:t=>t.$kind==="Some"?t.Some:null})}function Wre(e,t){return new ea({read:n=>{const r=n.readULEB(),i=new Array(r);for(let o=0;o<r;o++)i[o]=e.read(n);return i},write:(n,r)=>{r.writeULEB(n.length);for(const i of n)e.write(i,r)},...t,name:t?.name??`vector<${e.name}>`,validate:n=>{if(t?.validate?.(n),!n||typeof n!="object"||!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`)}})}function Yre(e,t){for(let n=0;n<Math.min(e.length,t.length);n++)if(e[n]!==t[n])return e[n]-t[n];return e.length-t.length}function Xre(e,t){return new ea({name:`Map<${e.name}, ${t.name}>`,read:n=>{const r=n.readULEB(),i=new Map;for(let o=0;o<r;o++)i.set(e.read(n),t.read(n));return i},write:(n,r)=>{const i=[...n.entries()].map(([o,l])=>[e.serialize(o).toBytes(),l]);i.sort(([o],[l])=>Yre(o,l)),r.writeULEB(i.length);for(const[o,l]of i)r.writeBytes(o),t.write(l,r)}})}const R={u8(e){return kx({readMethod:"read8",writeMethod:"write8",size:1,maxValue:2**8-1,...e,name:e?.name??"u8"})},u16(e){return kx({readMethod:"read16",writeMethod:"write16",size:2,maxValue:2**16-1,...e,name:e?.name??"u16"})},u32(e){return kx({readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e,name:e?.name??"u32"})},u64(e){return Cx({readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e,name:e?.name??"u64"})},u128(e){return Cx({readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e,name:e?.name??"u128"})},u256(e){return Cx({readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e,name:e?.name??"u256"})},bool(e){return Xh({size:1,read:t=>t.read8()===1,write:(t,n)=>n.write8(t?1:0),...e,name:e?.name??"bool",validate:t=>{if(e?.validate?.(t),typeof t!="boolean")throw new TypeError(`Expected boolean, found ${typeof t}`)}})},uleb128(e){return Lre({read:t=>t.readULEB(),serialize:t=>Uint8Array.from(Yh(t)),...e,name:e?.name??"uleb128"})},bytes(e,t){return Xh({size:e,read:n=>n.readBytes(e),write:(n,r)=>{r.writeBytes(new Uint8Array(n))},...t,name:t?.name??`bytes[${e}]`,validate:n=>{if(t?.validate?.(n),!n||typeof n!="object"||!("length"in n))throw new TypeError(`Expected array, found ${typeof n}`);if(n.length!==e)throw new TypeError(`Expected array of length ${e}, found ${n.length}`)}})},byteVector(e){return new ea({read:t=>{const n=t.readULEB();return t.readBytes(n)},write:(t,n)=>{const r=new Uint8Array(t);n.writeULEB(r.length),n.writeBytes(r)},...e,name:e?.name??"vector<u8>",serializedSize:t=>{const n="length"in t?t.length:null;return n==null?null:Yh(n).length+n},validate:t=>{if(e?.validate?.(t),!t||typeof t!="object"||!("length"in t))throw new TypeError(`Expected array, found ${typeof t}`)}})},string(e){return zre({toBytes:t=>new TextEncoder().encode(t),fromBytes:t=>new TextDecoder().decode(t),...e,name:e?.name??"string"})},fixedArray:Gre,option:Hre,vector:Wre,tuple(e,t){return new Fre({fields:e,...t})},struct(e,t,n){return new qre({name:e,fields:t,...n})},enum(e,t,n){return new Vre({name:e,fields:t,...n})},map:Xre,lazy(e){return $re(e)}},Xp=32;function Kh(e){return Kre(e)&&Qre(e)===Xp}function CB(e){if(e.startsWith("vector<")){if(!e.endsWith(">"))throw new Error(`Invalid type tag: ${e}`);const t=e.slice(7,-1);if(!t)throw new Error(`Invalid type tag: ${e}`);const n=CB(t);return typeof n=="string"?`vector<${n}>`:`vector<${jl(n)}>`}return e.includes("::")?Bs(e):e}function Bs(e){const t=e.split("::");if(t.length<3)throw new Error(`Invalid struct tag: ${e}`);const[n,r]=t;if(!n||!r)throw new Error(`Invalid struct tag: ${e}`);const i=wB(n),o=e.slice(n.length+r.length+4),l=o.includes("<")?o.slice(0,o.indexOf("<")):o;if(!l||o.includes("<")&&!o.endsWith(">"))throw new Error(`Invalid struct tag: ${e}`);const u=o.includes("<")?NB(o.slice(o.indexOf("<")+1,o.lastIndexOf(">"))).map(f=>CB(f.trim())):[];return{address:i?n:Kt(n),module:r,name:l,typeParams:u}}function jl(e){if(typeof e=="string"&&e.startsWith("vector<"))throw new Error("normalizeStructTag does not support vector types. Use normalizeTypeTag instead.");const{address:t,module:n,name:r,typeParams:i}=typeof e=="string"?Bs(e):e;return`${t}::${n}::${r}${i?.length>0?`<${i.map(o=>typeof o=="string"?o:jl(o)).join(",")}>`:""}`}function Kt(e,t=!1){let n=e.toLowerCase();return!t&&n.startsWith("0x")&&(n=n.slice(2)),`0x${n.padStart(Xp*2,"0")}`}function Kre(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2===0}function Qre(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}var Jre=class MB{#t;#e;constructor({prefix:t,cache:n}={}){this.#t=t??[],this.#e=n??new Map}read(t,n){const r=[this.#t,...t].join(":");if(this.#e.has(r))return this.#e.get(r);const i=n();return this.#e.set(r,i),typeof i=="object"&&i!==null&&"then"in i?Promise.resolve(i).then(o=>(this.#e.set(r,o),o)).catch(o=>{throw this.#e.delete(r),o}):i}readSync(t,n){const r=[this.#t,...t].join(":");if(this.#e.has(r))return this.#e.get(r);const i=n();return this.#e.set(r,i),i}clear(t){const n=[...this.#t,...t??[]].join(":");if(!n){this.#e.clear();return}for(const r of this.#e.keys())r.startsWith(n)&&this.#e.delete(r)}scope(t){return new MB({prefix:[...this.#t,...Array.isArray(t)?t:[t]],cache:this.#e})}},DB=class{constructor({network:e,base:t,cache:n=t?.cache??new Jre}){this.network=e,this.base=t??this,this.cache=n}$extend(...e){const t=Object.fromEntries(e.map(r=>[r.name,r.register(this)])),n=new Map;return new Proxy(this,{get(r,i,o){if(typeof i=="string"&&i in t)return t[i];const l=Reflect.get(r,i,o);return typeof l=="function"?i==="$extend"?l.bind(o):(n.has(i)||n.set(i,l.bind(r)),n.get(i)):l}})}};const Zre=/^vector<(.+)>$/,eae=/^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;var Qh=class Uo{static parseFromStr(t,n=!1){if(t==="address")return{address:null};if(t==="bool")return{bool:null};if(t==="u8")return{u8:null};if(t==="u16")return{u16:null};if(t==="u32")return{u32:null};if(t==="u64")return{u64:null};if(t==="u128")return{u128:null};if(t==="u256")return{u256:null};if(t==="signer")return{signer:null};const r=t.match(Zre);if(r)return{vector:Uo.parseFromStr(r[1],n)};const i=t.match(eae);if(i)return{struct:{address:n?Kt(i[1]):i[1],module:i[2],name:i[3],typeParams:i[5]===void 0?[]:Uo.parseStructTypeArgs(i[5],n)}};throw new Error(`Encountered unexpected token when parsing type args for ${t}`)}static parseStructTypeArgs(t,n=!1){return NB(t).map(r=>Uo.parseFromStr(r,n))}static tagToString(t){if("bool"in t)return"bool";if("u8"in t)return"u8";if("u16"in t)return"u16";if("u32"in t)return"u32";if("u64"in t)return"u64";if("u128"in t)return"u128";if("u256"in t)return"u256";if("address"in t)return"address";if("signer"in t)return"signer";if("vector"in t)return`vector<${Uo.tagToString(t.vector)}>`;if("struct"in t){const n=t.struct,r=n.typeParams.map(Uo.tagToString).join(", ");return`${n.address}::${n.module}::${n.name}${r?`<${r}>`:""}`}throw new Error("Invalid TypeTag")}};function tae(e){return R.u64({name:"unsafe_u64",...e}).transform({input:t=>t,output:t=>Number(t)})}function nae(e){return R.enum("Option",{None:null,Some:e})}const it=R.bytes(Xp).transform({validate:e=>{const t=typeof e=="string"?e:Lu(e);if(!t||!Kh(Kt(t)))throw new Error(`Invalid Sui address ${t}`)},input:e=>typeof e=="string"?EB(Kt(e)):e,output:e=>Kt(Lu(e))}),Xn=R.byteVector().transform({name:"ObjectDigest",input:e=>pS(e),output:e=>Yp(new Uint8Array(e)),validate:e=>{if(pS(e).length!==32)throw new Error("ObjectDigest must be 32 bytes")}}),Nr=R.struct("SuiObjectRef",{objectId:it,version:R.u64(),digest:Xn}),RB=R.struct("SharedObjectRef",{objectId:it,initialSharedVersion:R.u64(),mutable:R.bool()}),IB=R.enum("ObjectArg",{ImmOrOwnedObject:Nr,SharedObject:RB,Receiving:Nr}),Li=R.enum("Owner",{AddressOwner:it,ObjectOwner:it,Shared:R.struct("Shared",{initialSharedVersion:R.u64()}),Immutable:null,ConsensusAddressOwner:R.struct("ConsensusAddressOwner",{startVersion:R.u64(),owner:it})}),rae=R.enum("Reservation",{MaxAmountU64:R.u64()}),aae=R.enum("WithdrawalType",{Balance:R.lazy(()=>Il)}),iae=R.enum("WithdrawFrom",{Sender:null,Sponsor:null}),sae=R.struct("FundsWithdrawal",{reservation:rae,typeArg:aae,withdrawFrom:iae}),PB=R.enum("CallArg",{Pure:R.struct("Pure",{bytes:R.byteVector().transform({input:e=>typeof e=="string"?Ut(e):e,output:e=>Pn(new Uint8Array(e))})}),Object:IB,FundsWithdrawal:sae}),Gw=R.enum("TypeTag",{bool:null,u8:null,u64:null,u128:null,address:null,signer:null,vector:R.lazy(()=>Gw),struct:R.lazy(()=>Hw),u16:null,u32:null,u256:null}),Il=Gw.transform({input:e=>typeof e=="string"?Qh.parseFromStr(e,!0):e,output:e=>Qh.tagToString(e)}),sa=R.enum("Argument",{GasCoin:null,Input:R.u16(),Result:R.u16(),NestedResult:R.tuple([R.u16(),R.u16()])}),BB=R.struct("ProgrammableMoveCall",{package:it,module:R.string(),function:R.string(),typeArguments:R.vector(Il),arguments:R.vector(sa)}),UB=R.enum("Command",{MoveCall:BB,TransferObjects:R.struct("TransferObjects",{objects:R.vector(sa),address:sa}),SplitCoins:R.struct("SplitCoins",{coin:sa,amounts:R.vector(sa)}),MergeCoins:R.struct("MergeCoins",{destination:sa,sources:R.vector(sa)}),Publish:R.struct("Publish",{modules:R.vector(R.byteVector().transform({input:e=>typeof e=="string"?Ut(e):e,output:e=>Pn(new Uint8Array(e))})),dependencies:R.vector(it)}),MakeMoveVec:R.struct("MakeMoveVec",{type:nae(Il).transform({input:e=>e===null?{None:!0}:{Some:e},output:e=>e.Some??null}),elements:R.vector(sa)}),Upgrade:R.struct("Upgrade",{modules:R.vector(R.byteVector().transform({input:e=>typeof e=="string"?Ut(e):e,output:e=>Pn(new Uint8Array(e))})),dependencies:R.vector(it),package:it,ticket:sa})}),LB=R.struct("ProgrammableTransaction",{inputs:R.vector(PB),commands:R.vector(UB)}),zB=R.enum("TransactionKind",{ProgrammableTransaction:LB,ChangeEpoch:null,Genesis:null,ConsensusCommitPrologue:null}),oae=R.struct("ValidDuring",{minEpoch:R.option(R.u64()),maxEpoch:R.option(R.u64()),minTimestamp:R.option(R.u64()),maxTimestamp:R.option(R.u64()),chain:Xn,nonce:R.u32()}),$B=R.enum("TransactionExpiration",{None:null,Epoch:tae(),ValidDuring:oae}),Hw=R.struct("StructTag",{address:it,module:R.string(),name:R.string(),typeParams:R.vector(Gw)}),qB=R.struct("GasData",{payment:R.vector(Nr),owner:it,price:R.u64(),budget:R.u64()}),VB=R.struct("TransactionDataV1",{kind:zB,sender:it,gasData:qB,expiration:$B}),FB=R.enum("TransactionData",{V1:VB}),GB=R.enum("IntentScope",{TransactionData:null,TransactionEffects:null,CheckpointSummary:null,PersonalMessage:null}),HB=R.enum("IntentVersion",{V0:null}),WB=R.enum("AppId",{Sui:null}),YB=R.struct("Intent",{scope:GB,version:HB,appId:WB});function XB(e){return R.struct(`IntentMessage<${e.name}>`,{intent:YB,value:e})}const KB=R.enum("CompressedSignature",{ED25519:R.bytes(64),Secp256k1:R.bytes(64),Secp256r1:R.bytes(64),ZkLogin:R.byteVector(),Passkey:R.byteVector()}),QB=R.enum("PublicKey",{ED25519:R.bytes(32),Secp256k1:R.bytes(33),Secp256r1:R.bytes(33),ZkLogin:R.byteVector(),Passkey:R.bytes(33)}),JB=R.struct("MultiSigPkMap",{pubKey:QB,weight:R.u8()}),ZB=R.struct("MultiSigPublicKey",{pk_map:R.vector(JB),threshold:R.u16()}),lae=R.struct("MultiSig",{sigs:R.vector(KB),bitmap:R.u16(),multisig_pk:ZB}),cae=R.byteVector().transform({input:e=>typeof e=="string"?Ut(e):e,output:e=>Pn(new Uint8Array(e))}),eU=R.struct("SenderSignedTransaction",{intentMessage:XB(FB),txSignatures:R.vector(cae)}),uae=R.vector(eU,{name:"SenderSignedData"}),fae=R.struct("PasskeyAuthenticator",{authenticatorData:R.byteVector(),clientDataJson:R.string(),userSignature:R.byteVector()}),tU=R.enum("MoveObjectType",{Other:Hw,GasCoin:null,StakedSui:null,Coin:Il,AccumulatorBalanceWrapper:null}),nU=R.struct("TypeOrigin",{moduleName:R.string(),datatypeName:R.string(),package:it}),rU=R.struct("UpgradeInfo",{upgradedId:it,upgradedVersion:R.u64()}),aU=R.struct("MovePackage",{id:it,version:R.u64(),moduleMap:R.map(R.string(),R.byteVector()),typeOriginTable:R.vector(nU),linkageTable:R.map(it,rU)}),iU=R.struct("MoveObject",{type:tU,hasPublicTransfer:R.bool(),version:R.u64(),contents:R.byteVector()}),sU=R.enum("Data",{Move:iU,Package:aU}),dae=R.struct("ObjectInner",{data:sU,owner:Li,previousTransaction:Xn,storageRebate:R.u64()}),hae=R.enum("PackageUpgradeError",{UnableToFetchPackage:R.struct("UnableToFetchPackage",{packageId:it}),NotAPackage:R.struct("NotAPackage",{objectId:it}),IncompatibleUpgrade:null,DigestDoesNotMatch:R.struct("DigestDoesNotMatch",{digest:R.byteVector()}),UnknownUpgradePolicy:R.struct("UnknownUpgradePolicy",{policy:R.u8()}),PackageIDDoesNotMatch:R.struct("PackageIDDoesNotMatch",{packageId:it,ticketId:it})}),pae=R.struct("ModuleId",{address:it,name:R.string()}),MD=R.struct("MoveLocation",{module:pae,function:R.u16(),instruction:R.u16(),functionName:R.option(R.string())}),mae=R.enum("CommandArgumentError",{TypeMismatch:null,InvalidBCSBytes:null,InvalidUsageOfPureArg:null,InvalidArgumentToPrivateEntryFunction:null,IndexOutOfBounds:R.struct("IndexOutOfBounds",{idx:R.u16()}),SecondaryIndexOutOfBounds:R.struct("SecondaryIndexOutOfBounds",{resultIdx:R.u16(),secondaryIdx:R.u16()}),InvalidResultArity:R.struct("InvalidResultArity",{resultIdx:R.u16()}),InvalidGasCoinUsage:null,InvalidValueUsage:null,InvalidObjectByValue:null,InvalidObjectByMutRef:null,SharedObjectOperationNotAllowed:null,InvalidArgumentArity:null,InvalidTransferObject:null,InvalidMakeMoveVecNonObjectArgument:null,ArgumentWithoutValue:null,CannotMoveBorrowedValue:null,CannotWriteToExtendedReference:null,InvalidReferenceArgument:null}),yae=R.enum("TypeArgumentError",{TypeNotFound:null,ConstraintNotSatisfied:null}),vae=R.enum("ExecutionFailureStatus",{InsufficientGas:null,InvalidGasObject:null,InvariantViolation:null,FeatureNotYetSupported:null,MoveObjectTooBig:R.struct("MoveObjectTooBig",{objectSize:R.u64(),maxObjectSize:R.u64()}),MovePackageTooBig:R.struct("MovePackageTooBig",{objectSize:R.u64(),maxObjectSize:R.u64()}),CircularObjectOwnership:R.struct("CircularObjectOwnership",{object:it}),InsufficientCoinBalance:null,CoinBalanceOverflow:null,PublishErrorNonZeroAddress:null,SuiMoveVerificationError:null,MovePrimitiveRuntimeError:R.option(MD),MoveAbort:R.tuple([MD,R.u64()]),VMVerificationOrDeserializationError:null,VMInvariantViolation:null,FunctionNotFound:null,ArityMismatch:null,TypeArityMismatch:null,NonEntryFunctionInvoked:null,CommandArgumentError:R.struct("CommandArgumentError",{argIdx:R.u16(),kind:mae}),TypeArgumentError:R.struct("TypeArgumentError",{argumentIdx:R.u16(),kind:yae}),UnusedValueWithoutDrop:R.struct("UnusedValueWithoutDrop",{resultIdx:R.u16(),secondaryIdx:R.u16()}),InvalidPublicFunctionReturnType:R.struct("InvalidPublicFunctionReturnType",{idx:R.u16()}),InvalidTransferObject:null,EffectsTooLarge:R.struct("EffectsTooLarge",{currentSize:R.u64(),maxSize:R.u64()}),PublishUpgradeMissingDependency:null,PublishUpgradeDependencyDowngrade:null,PackageUpgradeError:R.struct("PackageUpgradeError",{upgradeError:hae}),WrittenObjectsTooLarge:R.struct("WrittenObjectsTooLarge",{currentSize:R.u64(),maxSize:R.u64()}),CertificateDenied:null,SuiMoveVerificationTimedout:null,SharedObjectOperationNotAllowed:null,InputObjectDeleted:null,ExecutionCancelledDueToSharedObjectCongestion:R.struct("ExecutionCancelledDueToSharedObjectCongestion",{congested_objects:R.vector(it)}),AddressDeniedForCoin:R.struct("AddressDeniedForCoin",{address:it,coinType:R.string()}),CoinTypeGlobalPause:R.struct("CoinTypeGlobalPause",{coinType:R.string()}),ExecutionCancelledDueToRandomnessUnavailable:null,MoveVectorElemTooBig:R.struct("MoveVectorElemTooBig",{valueSize:R.u64(),maxScaledSize:R.u64()}),MoveRawValueTooBig:R.struct("MoveRawValueTooBig",{valueSize:R.u64(),maxScaledSize:R.u64()}),InvalidLinkage:null,InsufficientBalanceForWithdraw:null,NonExclusiveWriteInputObjectModified:R.struct("NonExclusiveWriteInputObjectModified",{id:it})}),Ww=R.enum("ExecutionStatus",{Success:null,Failure:R.struct("Failure",{error:vae,command:R.option(R.u64())})}),oU=R.struct("GasCostSummary",{computationCost:R.u64(),storageCost:R.u64(),storageRebate:R.u64(),nonRefundableStorageFee:R.u64()}),gae=R.struct("TransactionEffectsV1",{status:Ww,executedEpoch:R.u64(),gasUsed:oU,modifiedAtVersions:R.vector(R.tuple([it,R.u64()])),sharedObjects:R.vector(Nr),transactionDigest:Xn,created:R.vector(R.tuple([Nr,Li])),mutated:R.vector(R.tuple([Nr,Li])),unwrapped:R.vector(R.tuple([Nr,Li])),deleted:R.vector(Nr),unwrappedThenDeleted:R.vector(Nr),wrapped:R.vector(Nr),gasObject:R.tuple([Nr,Li]),eventsDigest:R.option(Xn),dependencies:R.vector(Xn)}),Yw=R.tuple([R.u64(),Xn]),bae=R.enum("ObjectIn",{NotExist:null,Exist:R.tuple([Yw,Li])}),xae=R.struct("AccumulatorAddress",{address:it,ty:Il}),Sae=R.enum("AccumulatorOperation",{Merge:null,Split:null}),wae=R.enum("AccumulatorValue",{Integer:R.u64(),IntegerTuple:R.tuple([R.u64(),R.u64()]),EventDigest:R.vector(R.tuple([R.u64(),Xn]))}),Tae=R.struct("AccumulatorWriteV1",{address:xae,operation:Sae,value:wae}),Oae=R.enum("ObjectOut",{NotExist:null,ObjectWrite:R.tuple([Xn,Li]),PackageWrite:Yw,AccumulatorWriteV1:Tae}),jae=R.enum("IDOperation",{None:null,Created:null,Deleted:null}),Aae=R.struct("EffectsObjectChange",{inputState:bae,outputState:Oae,idOperation:jae}),Eae=R.enum("UnchangedConsensusKind",{ReadOnlyRoot:Yw,MutateConsensusStreamEnded:R.u64(),ReadConsensusStreamEnded:R.u64(),Cancelled:R.u64(),PerEpochConfig:null}),_ae=R.struct("TransactionEffectsV2",{status:Ww,executedEpoch:R.u64(),gasUsed:oU,transactionDigest:Xn,gasObjectIndex:R.option(R.u32()),eventsDigest:R.option(Xn),dependencies:R.vector(Xn),lamportVersion:R.u64(),changedObjects:R.vector(R.tuple([it,Aae])),unchangedConsensusObjects:R.vector(R.tuple([it,Eae])),auxDataDigest:R.option(Xn)}),Nae=R.enum("TransactionEffects",{V1:gae,V2:_ae}),Kn={...R,U8:R.u8(),U16:R.u16(),U32:R.u32(),U64:R.u64(),U128:R.u128(),U256:R.u256(),ULEB128:R.uleb128(),Bool:R.bool(),String:R.string(),Address:it,AppId:WB,Argument:sa,CallArg:PB,Command:UB,CompressedSignature:KB,Data:sU,GasData:qB,Intent:YB,IntentMessage:XB,IntentScope:GB,IntentVersion:HB,MoveObject:iU,MoveObjectType:tU,MovePackage:aU,MultiSig:lae,MultiSigPkMap:JB,MultiSigPublicKey:ZB,Object:dae,ObjectArg:IB,ObjectDigest:Xn,Owner:Li,PasskeyAuthenticator:fae,ProgrammableMoveCall:BB,ProgrammableTransaction:LB,PublicKey:QB,SenderSignedData:uae,SenderSignedTransaction:eU,SharedObjectRef:RB,StructTag:Hw,SuiObjectRef:Nr,TransactionData:FB,TransactionDataV1:VB,TransactionEffects:Nae,TransactionExpiration:$B,TransactionKind:zB,TypeOrigin:nU,TypeTag:Il,UpgradeInfo:rU};function kae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function vS(e,t=""){if(!Number.isSafeInteger(e)||e<0){const n=t&&`"${t}" `;throw new Error(`${n}expected integer >= 0, got ${e}`)}}function Ns(e,t,n=""){const r=kae(e),i=e?.length,o=t!==void 0;if(!r||o&&i!==t){const l=n&&`"${n}" `,u=o?` of length ${t}`:"",f=r?`length=${i}`:`type=${typeof e}`;throw new Error(l+"expected Uint8Array"+u+", got "+f)}return e}function DD(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Cae(e,t){Ns(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Jh(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function gS(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const lU=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function cU(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Va=lU?e=>e:e=>cU(e);function Mae(e){for(let t=0;t<e.length;t++)e[t]=cU(e[t]);return e}const Ro=lU?e=>e:Mae;function Dae(e,t={}){const n=(i,o)=>e(o).update(i).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const Rae=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),Rd=BigInt(2**32-1),RD=BigInt(32);function Iae(e,t=!1){return t?{h:Number(e&Rd),l:Number(e>>RD&Rd)}:{h:Number(e>>RD&Rd)|0,l:Number(e&Rd)|0}}const uU=(e,t,n)=>e>>>n|t<<32-n,fU=(e,t,n)=>e<<32-n|t>>>n,Pae=(e,t,n)=>e<<64-n|t>>>n-32,Bae=(e,t,n)=>e>>>n-32|t<<64-n,Uae=(e,t)=>t,Lae=(e,t)=>e;function dU(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const hU=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),pU=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,en=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),ye=new Uint32Array(32);function Mi(e,t,n,r,i,o){const l=i[o],u=i[o+1];let f=ye[2*e],h=ye[2*e+1],y=ye[2*t],m=ye[2*t+1],g=ye[2*n],S=ye[2*n+1],T=ye[2*r],w=ye[2*r+1],x=hU(f,y,l);h=pU(x,h,m,u),f=x|0,{Dh:w,Dl:T}={Dh:w^h,Dl:T^f},{Dh:w,Dl:T}={Dh:Uae(w,T),Dl:Lae(w)},{h:S,l:g}=dU(S,g,w,T),{Bh:m,Bl:y}={Bh:m^S,Bl:y^g},{Bh:m,Bl:y}={Bh:uU(m,y,24),Bl:fU(m,y,24)},ye[2*e]=f,ye[2*e+1]=h,ye[2*t]=y,ye[2*t+1]=m,ye[2*n]=g,ye[2*n+1]=S,ye[2*r]=T,ye[2*r+1]=w}function Di(e,t,n,r,i,o){const l=i[o],u=i[o+1];let f=ye[2*e],h=ye[2*e+1],y=ye[2*t],m=ye[2*t+1],g=ye[2*n],S=ye[2*n+1],T=ye[2*r],w=ye[2*r+1],x=hU(f,y,l);h=pU(x,h,m,u),f=x|0,{Dh:w,Dl:T}={Dh:w^h,Dl:T^f},{Dh:w,Dl:T}={Dh:uU(w,T,16),Dl:fU(w,T,16)},{h:S,l:g}=dU(S,g,w,T),{Bh:m,Bl:y}={Bh:m^S,Bl:y^g},{Bh:m,Bl:y}={Bh:Pae(m,y,63),Bl:Bae(m,y,63)},ye[2*e]=f,ye[2*e+1]=h,ye[2*t]=y,ye[2*t+1]=m,ye[2*n]=g,ye[2*n+1]=S,ye[2*r]=T,ye[2*r+1]=w}function zae(e,t={},n,r,i){if(vS(n),e<0||e>n)throw new Error("outputLen bigger than keyLen");const{key:o,salt:l,personalization:u}=t;if(o!==void 0&&(o.length<1||o.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);l!==void 0&&Ns(l,r,"salt"),u!==void 0&&Ns(u,i,"personalization")}class $ae{buffer;buffer32;finished=!1;destroyed=!1;length=0;pos=0;blockLen;outputLen;constructor(t,n){vS(t),vS(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Jh(this.buffer)}update(t){DD(this),Ns(t);const{blockLen:n,buffer:r,buffer32:i}=this,o=t.length,l=t.byteOffset,u=t.buffer;for(let f=0;f<o;){this.pos===n&&(Ro(i),this.compress(i,0,!1),Ro(i),this.pos=0);const h=Math.min(n-this.pos,o-f),y=l+f;if(h===n&&!(y%4)&&f+h<o){const m=new Uint32Array(u,y,Math.floor((o-f)/4));Ro(m);for(let g=0;f+n<o;g+=i.length,f+=n)this.length+=n,this.compress(m,g,!1);Ro(m);continue}r.set(t.subarray(f,f+h),this.pos),this.pos+=h,this.length+=h,f+=h}return this}digestInto(t){DD(this),Cae(t,this);const{pos:n,buffer32:r}=this;this.finished=!0,gS(this.buffer.subarray(n)),Ro(r),this.compress(r,0,!0),Ro(r);const i=Jh(t);this.get().forEach((o,l)=>i[l]=Va(o))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:i,destroyed:o,outputLen:l,pos:u}=this;return t||=new this.constructor({dkLen:l}),t.set(...this.get()),t.buffer.set(n),t.destroyed=o,t.finished=i,t.length=r,t.pos=u,t.outputLen=l,t}clone(){return this._cloneInto()}}class qae extends $ae{v0l=en[0]|0;v0h=en[1]|0;v1l=en[2]|0;v1h=en[3]|0;v2l=en[4]|0;v2h=en[5]|0;v3l=en[6]|0;v3h=en[7]|0;v4l=en[8]|0;v4h=en[9]|0;v5l=en[10]|0;v5h=en[11]|0;v6l=en[12]|0;v6h=en[13]|0;v7l=en[14]|0;v7h=en[15]|0;constructor(t={}){const n=t.dkLen===void 0?64:t.dkLen;super(128,n),zae(n,t,64,16,16);let{key:r,personalization:i,salt:o}=t,l=0;if(r!==void 0&&(Ns(r,void 0,"key"),l=r.length),this.v0l^=this.outputLen|l<<8|65536|1<<24,o!==void 0){Ns(o,void 0,"salt");const u=Jh(o);this.v4l^=Va(u[0]),this.v4h^=Va(u[1]),this.v5l^=Va(u[2]),this.v5h^=Va(u[3])}if(i!==void 0){Ns(i,void 0,"personalization");const u=Jh(i);this.v6l^=Va(u[0]),this.v6h^=Va(u[1]),this.v7l^=Va(u[2]),this.v7h^=Va(u[3])}if(r!==void 0){const u=new Uint8Array(this.blockLen);u.set(r),this.update(u)}}get(){let{v0l:t,v0h:n,v1l:r,v1h:i,v2l:o,v2h:l,v3l:u,v3h:f,v4l:h,v4h:y,v5l:m,v5h:g,v6l:S,v6h:T,v7l:w,v7h:x}=this;return[t,n,r,i,o,l,u,f,h,y,m,g,S,T,w,x]}set(t,n,r,i,o,l,u,f,h,y,m,g,S,T,w,x){this.v0l=t|0,this.v0h=n|0,this.v1l=r|0,this.v1h=i|0,this.v2l=o|0,this.v2h=l|0,this.v3l=u|0,this.v3h=f|0,this.v4l=h|0,this.v4h=y|0,this.v5l=m|0,this.v5h=g|0,this.v6l=S|0,this.v6h=T|0,this.v7l=w|0,this.v7h=x|0}compress(t,n,r){this.get().forEach((f,h)=>ye[h]=f),ye.set(en,16);let{h:i,l:o}=Iae(BigInt(this.length));ye[24]=en[8]^o,ye[25]=en[9]^i,r&&(ye[28]=~ye[28],ye[29]=~ye[29]);let l=0;const u=Rae;for(let f=0;f<12;f++)Mi(0,4,8,12,t,n+2*u[l++]),Di(0,4,8,12,t,n+2*u[l++]),Mi(1,5,9,13,t,n+2*u[l++]),Di(1,5,9,13,t,n+2*u[l++]),Mi(2,6,10,14,t,n+2*u[l++]),Di(2,6,10,14,t,n+2*u[l++]),Mi(3,7,11,15,t,n+2*u[l++]),Di(3,7,11,15,t,n+2*u[l++]),Mi(0,5,10,15,t,n+2*u[l++]),Di(0,5,10,15,t,n+2*u[l++]),Mi(1,6,11,12,t,n+2*u[l++]),Di(1,6,11,12,t,n+2*u[l++]),Mi(2,7,8,13,t,n+2*u[l++]),Di(2,7,8,13,t,n+2*u[l++]),Mi(3,4,9,14,t,n+2*u[l++]),Di(3,4,9,14,t,n+2*u[l++]);this.v0l^=ye[0]^ye[16],this.v0h^=ye[1]^ye[17],this.v1l^=ye[2]^ye[18],this.v1h^=ye[3]^ye[19],this.v2l^=ye[4]^ye[20],this.v2h^=ye[5]^ye[21],this.v3l^=ye[6]^ye[22],this.v3h^=ye[7]^ye[23],this.v4l^=ye[8]^ye[24],this.v4h^=ye[9]^ye[25],this.v5l^=ye[10]^ye[26],this.v5h^=ye[11]^ye[27],this.v6l^=ye[12]^ye[28],this.v6h^=ye[13]^ye[29],this.v7l^=ye[14]^ye[30],this.v7h^=ye[15]^ye[31],gS(ye)}destroy(){this.destroyed=!0,gS(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const mU=Dae(e=>new qae(e));function yU(e,t,n){const r=Kn.Address.serialize(e).toBytes(),i=Kn.TypeTag.serialize(t).toBytes(),o=Kn.u64().serialize(n.length).toBytes(),l=mU.create({dkLen:32});return l.update(new Uint8Array([240])),l.update(r),l.update(o),l.update(n),l.update(i),`0x${Lu(l.digest().slice(0,32))}`}let vU=(function(e){return e.Failure="FAILURE",e.Success="SUCCESS",e})({}),ID=(function(e){return e.PersonalMessage="PERSONAL_MESSAGE",e.TransactionData="TRANSACTION_DATA",e})({});var Lt=class extends String{constructor(e,t){super(e),this.value=e,this.__meta__=t}toString(){return this.value}};new Lt(`
|
|
462
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
463
|
+
__typename
|
|
464
|
+
... on AddressOwner {
|
|
465
|
+
address {
|
|
466
|
+
address
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
... on ObjectOwner {
|
|
470
|
+
address {
|
|
471
|
+
address
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
... on Shared {
|
|
475
|
+
initialSharedVersion
|
|
476
|
+
}
|
|
477
|
+
... on ConsensusAddressOwner {
|
|
478
|
+
startVersion
|
|
479
|
+
address {
|
|
480
|
+
address
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
`,{fragmentName:"OBJECT_OWNER_FIELDS"});new Lt(`
|
|
485
|
+
fragment OBJECT_FIELDS on Object {
|
|
486
|
+
address
|
|
487
|
+
digest
|
|
488
|
+
version
|
|
489
|
+
objectBcs @include(if: $includeObjectBcs)
|
|
490
|
+
asMoveObject {
|
|
491
|
+
contents {
|
|
492
|
+
bcs @include(if: $includeContent)
|
|
493
|
+
json @include(if: $includeJson)
|
|
494
|
+
display @include(if: $includeDisplay) {
|
|
495
|
+
output
|
|
496
|
+
errors
|
|
497
|
+
}
|
|
498
|
+
type {
|
|
499
|
+
repr
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
asMovePackage {
|
|
504
|
+
__typename
|
|
505
|
+
}
|
|
506
|
+
owner {
|
|
507
|
+
...OBJECT_OWNER_FIELDS
|
|
508
|
+
}
|
|
509
|
+
previousTransaction @include(if: $includePreviousTransaction) {
|
|
510
|
+
digest
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
514
|
+
__typename
|
|
515
|
+
... on AddressOwner {
|
|
516
|
+
address {
|
|
517
|
+
address
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
... on ObjectOwner {
|
|
521
|
+
address {
|
|
522
|
+
address
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
... on Shared {
|
|
526
|
+
initialSharedVersion
|
|
527
|
+
}
|
|
528
|
+
... on ConsensusAddressOwner {
|
|
529
|
+
startVersion
|
|
530
|
+
address {
|
|
531
|
+
address
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}`,{fragmentName:"OBJECT_FIELDS"});new Lt(`
|
|
535
|
+
fragment MOVE_OBJECT_FIELDS on MoveObject {
|
|
536
|
+
address
|
|
537
|
+
digest
|
|
538
|
+
version
|
|
539
|
+
objectBcs @include(if: $includeObjectBcs)
|
|
540
|
+
contents {
|
|
541
|
+
bcs @include(if: $includeContent)
|
|
542
|
+
json @include(if: $includeJson)
|
|
543
|
+
display @include(if: $includeDisplay) {
|
|
544
|
+
output
|
|
545
|
+
errors
|
|
546
|
+
}
|
|
547
|
+
type {
|
|
548
|
+
repr
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
owner {
|
|
552
|
+
...OBJECT_OWNER_FIELDS
|
|
553
|
+
}
|
|
554
|
+
previousTransaction @include(if: $includePreviousTransaction) {
|
|
555
|
+
digest
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
559
|
+
__typename
|
|
560
|
+
... on AddressOwner {
|
|
561
|
+
address {
|
|
562
|
+
address
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
... on ObjectOwner {
|
|
566
|
+
address {
|
|
567
|
+
address
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
... on Shared {
|
|
571
|
+
initialSharedVersion
|
|
572
|
+
}
|
|
573
|
+
... on ConsensusAddressOwner {
|
|
574
|
+
startVersion
|
|
575
|
+
address {
|
|
576
|
+
address
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}`,{fragmentName:"MOVE_OBJECT_FIELDS"});new Lt(`
|
|
580
|
+
fragment TRANSACTION_FIELDS on Transaction {
|
|
581
|
+
digest
|
|
582
|
+
transactionJson @include(if: $includeTransaction)
|
|
583
|
+
transactionBcs @include(if: $includeBcs)
|
|
584
|
+
signatures {
|
|
585
|
+
signatureBytes
|
|
586
|
+
}
|
|
587
|
+
effects {
|
|
588
|
+
status
|
|
589
|
+
executionError {
|
|
590
|
+
message
|
|
591
|
+
abortCode
|
|
592
|
+
identifier
|
|
593
|
+
constant
|
|
594
|
+
sourceLineNumber
|
|
595
|
+
instructionOffset
|
|
596
|
+
module {
|
|
597
|
+
name
|
|
598
|
+
package {
|
|
599
|
+
address
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
function {
|
|
603
|
+
name
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
epoch {
|
|
607
|
+
epochId
|
|
608
|
+
}
|
|
609
|
+
effectsBcs @include(if: $includeEffects)
|
|
610
|
+
effectsJson @include(if: $includeObjectTypes)
|
|
611
|
+
objectChanges(first: 50) @include(if: $includeObjectTypes) {
|
|
612
|
+
nodes {
|
|
613
|
+
address
|
|
614
|
+
outputState {
|
|
615
|
+
asMoveObject {
|
|
616
|
+
contents {
|
|
617
|
+
type {
|
|
618
|
+
repr
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
balanceChangesJson @include(if: $includeBalanceChanges)
|
|
626
|
+
events(first: 50) @include(if: $includeEvents) {
|
|
627
|
+
pageInfo {
|
|
628
|
+
hasNextPage
|
|
629
|
+
}
|
|
630
|
+
nodes {
|
|
631
|
+
transactionModule {
|
|
632
|
+
package {
|
|
633
|
+
address
|
|
634
|
+
}
|
|
635
|
+
name
|
|
636
|
+
}
|
|
637
|
+
sender {
|
|
638
|
+
address
|
|
639
|
+
}
|
|
640
|
+
contents {
|
|
641
|
+
type {
|
|
642
|
+
repr
|
|
643
|
+
}
|
|
644
|
+
bcs
|
|
645
|
+
json
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
`,{fragmentName:"TRANSACTION_FIELDS"});const Vae=new Lt(`
|
|
652
|
+
query getAllBalances($owner: SuiAddress!, $limit: Int, $cursor: String) {
|
|
653
|
+
address(address: $owner) {
|
|
654
|
+
balances(first: $limit, after: $cursor) {
|
|
655
|
+
pageInfo {
|
|
656
|
+
hasNextPage
|
|
657
|
+
endCursor
|
|
658
|
+
}
|
|
659
|
+
nodes {
|
|
660
|
+
coinType {
|
|
661
|
+
repr
|
|
662
|
+
}
|
|
663
|
+
totalBalance
|
|
664
|
+
addressBalance
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
`),Fae=new Lt(`
|
|
670
|
+
query getBalance($owner: SuiAddress!, $coinType: String = "0x2::sui::SUI") {
|
|
671
|
+
address(address: $owner) {
|
|
672
|
+
balance(coinType: $coinType) {
|
|
673
|
+
coinType {
|
|
674
|
+
repr
|
|
675
|
+
}
|
|
676
|
+
totalBalance
|
|
677
|
+
addressBalance
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
`),Gae=new Lt(`
|
|
682
|
+
query getChainIdentifier {
|
|
683
|
+
checkpoint(sequenceNumber: 0) {
|
|
684
|
+
digest
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
`),Hae=new Lt(`
|
|
688
|
+
query getCoinMetadata($coinType: String!) {
|
|
689
|
+
coinMetadata(coinType: $coinType) {
|
|
690
|
+
address
|
|
691
|
+
decimals
|
|
692
|
+
name
|
|
693
|
+
symbol
|
|
694
|
+
description
|
|
695
|
+
iconUrl
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
`),Wae=new Lt(`
|
|
699
|
+
query getCoins($owner: SuiAddress!, $first: Int, $cursor: String, $type: String = "0x2::coin::Coin<0x2::sui::SUI>") {
|
|
700
|
+
address(address: $owner) {
|
|
701
|
+
address
|
|
702
|
+
objects(first: $first, after: $cursor, filter: {type: $type}) {
|
|
703
|
+
pageInfo {
|
|
704
|
+
hasNextPage
|
|
705
|
+
endCursor
|
|
706
|
+
}
|
|
707
|
+
nodes {
|
|
708
|
+
owner {
|
|
709
|
+
...OBJECT_OWNER_FIELDS
|
|
710
|
+
}
|
|
711
|
+
contents {
|
|
712
|
+
json
|
|
713
|
+
type {
|
|
714
|
+
repr
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
address
|
|
718
|
+
version
|
|
719
|
+
digest
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
725
|
+
__typename
|
|
726
|
+
... on AddressOwner {
|
|
727
|
+
address {
|
|
728
|
+
address
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
... on ObjectOwner {
|
|
732
|
+
address {
|
|
733
|
+
address
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
... on Shared {
|
|
737
|
+
initialSharedVersion
|
|
738
|
+
}
|
|
739
|
+
... on ConsensusAddressOwner {
|
|
740
|
+
startVersion
|
|
741
|
+
address {
|
|
742
|
+
address
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}`),Yae=new Lt(`
|
|
746
|
+
query getCurrentSystemState {
|
|
747
|
+
epoch {
|
|
748
|
+
epochId
|
|
749
|
+
referenceGasPrice
|
|
750
|
+
startTimestamp
|
|
751
|
+
protocolConfigs {
|
|
752
|
+
protocolVersion
|
|
753
|
+
}
|
|
754
|
+
systemState {
|
|
755
|
+
json
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
`),Xae=new Lt(`
|
|
760
|
+
query getDynamicFields($parentId: SuiAddress!, $first: Int, $cursor: String, $includeValue: Boolean = false) {
|
|
761
|
+
address(address: $parentId) {
|
|
762
|
+
dynamicFields(first: $first, after: $cursor) {
|
|
763
|
+
pageInfo {
|
|
764
|
+
hasNextPage
|
|
765
|
+
endCursor
|
|
766
|
+
}
|
|
767
|
+
nodes {
|
|
768
|
+
name {
|
|
769
|
+
bcs
|
|
770
|
+
type {
|
|
771
|
+
repr
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
value {
|
|
775
|
+
__typename
|
|
776
|
+
... on MoveValue {
|
|
777
|
+
bcs @include(if: $includeValue)
|
|
778
|
+
type {
|
|
779
|
+
repr
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
... on MoveObject {
|
|
783
|
+
address
|
|
784
|
+
contents {
|
|
785
|
+
bcs @include(if: $includeValue)
|
|
786
|
+
type {
|
|
787
|
+
repr
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
`),Kae=new Lt(`
|
|
797
|
+
query getMoveFunction($package: SuiAddress!, $module: String!, $function: String!) {
|
|
798
|
+
package(address: $package) {
|
|
799
|
+
module(name: $module) {
|
|
800
|
+
function(name: $function) {
|
|
801
|
+
name
|
|
802
|
+
visibility
|
|
803
|
+
isEntry
|
|
804
|
+
typeParameters {
|
|
805
|
+
constraints
|
|
806
|
+
}
|
|
807
|
+
parameters {
|
|
808
|
+
signature
|
|
809
|
+
}
|
|
810
|
+
return {
|
|
811
|
+
signature
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
`),Qae=new Lt(`
|
|
818
|
+
query getProtocolConfig {
|
|
819
|
+
epoch {
|
|
820
|
+
protocolConfigs {
|
|
821
|
+
protocolVersion
|
|
822
|
+
featureFlags {
|
|
823
|
+
key
|
|
824
|
+
value
|
|
825
|
+
}
|
|
826
|
+
configs {
|
|
827
|
+
key
|
|
828
|
+
value
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
`),Jae=new Lt(`
|
|
834
|
+
query getReferenceGasPrice {
|
|
835
|
+
epoch {
|
|
836
|
+
referenceGasPrice
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
`),Zae=new Lt(`
|
|
840
|
+
query defaultSuinsName($address: SuiAddress!) {
|
|
841
|
+
address(address: $address) {
|
|
842
|
+
defaultNameRecord {
|
|
843
|
+
domain
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
`),eie=new Lt(`
|
|
848
|
+
query getOwnedObjects($owner: SuiAddress!, $limit: Int, $cursor: String, $filter: ObjectFilter, $includeContent: Boolean = false, $includePreviousTransaction: Boolean = false, $includeObjectBcs: Boolean = false, $includeJson: Boolean = false, $includeDisplay: Boolean = false) {
|
|
849
|
+
address(address: $owner) {
|
|
850
|
+
objects(first: $limit, after: $cursor, filter: $filter) {
|
|
851
|
+
pageInfo {
|
|
852
|
+
hasNextPage
|
|
853
|
+
endCursor
|
|
854
|
+
}
|
|
855
|
+
nodes {
|
|
856
|
+
...MOVE_OBJECT_FIELDS
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
fragment MOVE_OBJECT_FIELDS on MoveObject {
|
|
862
|
+
address
|
|
863
|
+
digest
|
|
864
|
+
version
|
|
865
|
+
objectBcs @include(if: $includeObjectBcs)
|
|
866
|
+
contents {
|
|
867
|
+
bcs @include(if: $includeContent)
|
|
868
|
+
json @include(if: $includeJson)
|
|
869
|
+
display @include(if: $includeDisplay) {
|
|
870
|
+
output
|
|
871
|
+
errors
|
|
872
|
+
}
|
|
873
|
+
type {
|
|
874
|
+
repr
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
owner {
|
|
878
|
+
...OBJECT_OWNER_FIELDS
|
|
879
|
+
}
|
|
880
|
+
previousTransaction @include(if: $includePreviousTransaction) {
|
|
881
|
+
digest
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
885
|
+
__typename
|
|
886
|
+
... on AddressOwner {
|
|
887
|
+
address {
|
|
888
|
+
address
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
... on ObjectOwner {
|
|
892
|
+
address {
|
|
893
|
+
address
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
... on Shared {
|
|
897
|
+
initialSharedVersion
|
|
898
|
+
}
|
|
899
|
+
... on ConsensusAddressOwner {
|
|
900
|
+
startVersion
|
|
901
|
+
address {
|
|
902
|
+
address
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}`),tie=new Lt(`
|
|
906
|
+
query multiGetObjects($objectKeys: [ObjectKey!]!, $includeContent: Boolean = false, $includePreviousTransaction: Boolean = false, $includeObjectBcs: Boolean = false, $includeJson: Boolean = false, $includeDisplay: Boolean = false) {
|
|
907
|
+
multiGetObjects(keys: $objectKeys) {
|
|
908
|
+
...OBJECT_FIELDS
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
fragment OBJECT_FIELDS on Object {
|
|
912
|
+
address
|
|
913
|
+
digest
|
|
914
|
+
version
|
|
915
|
+
objectBcs @include(if: $includeObjectBcs)
|
|
916
|
+
asMoveObject {
|
|
917
|
+
contents {
|
|
918
|
+
bcs @include(if: $includeContent)
|
|
919
|
+
json @include(if: $includeJson)
|
|
920
|
+
display @include(if: $includeDisplay) {
|
|
921
|
+
output
|
|
922
|
+
errors
|
|
923
|
+
}
|
|
924
|
+
type {
|
|
925
|
+
repr
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
asMovePackage {
|
|
930
|
+
__typename
|
|
931
|
+
}
|
|
932
|
+
owner {
|
|
933
|
+
...OBJECT_OWNER_FIELDS
|
|
934
|
+
}
|
|
935
|
+
previousTransaction @include(if: $includePreviousTransaction) {
|
|
936
|
+
digest
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
fragment OBJECT_OWNER_FIELDS on Owner {
|
|
940
|
+
__typename
|
|
941
|
+
... on AddressOwner {
|
|
942
|
+
address {
|
|
943
|
+
address
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
... on ObjectOwner {
|
|
947
|
+
address {
|
|
948
|
+
address
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
... on Shared {
|
|
952
|
+
initialSharedVersion
|
|
953
|
+
}
|
|
954
|
+
... on ConsensusAddressOwner {
|
|
955
|
+
startVersion
|
|
956
|
+
address {
|
|
957
|
+
address
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}`),nie=new Lt(`
|
|
961
|
+
query simulateTransaction($transaction: JSON!, $includeTransaction: Boolean = false, $includeEffects: Boolean = false, $includeEvents: Boolean = false, $includeBalanceChanges: Boolean = false, $includeObjectTypes: Boolean = false, $includeCommandResults: Boolean = false, $includeBcs: Boolean = false, $doGasSelection: Boolean = false, $checksEnabled: Boolean = true) {
|
|
962
|
+
simulateTransaction(
|
|
963
|
+
transaction: $transaction
|
|
964
|
+
doGasSelection: $doGasSelection
|
|
965
|
+
checksEnabled: $checksEnabled
|
|
966
|
+
) {
|
|
967
|
+
effects {
|
|
968
|
+
transaction {
|
|
969
|
+
...TRANSACTION_FIELDS
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
outputs @include(if: $includeCommandResults) {
|
|
973
|
+
returnValues {
|
|
974
|
+
value {
|
|
975
|
+
bcs
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
mutatedReferences {
|
|
979
|
+
value {
|
|
980
|
+
bcs
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
fragment TRANSACTION_FIELDS on Transaction {
|
|
987
|
+
digest
|
|
988
|
+
transactionJson @include(if: $includeTransaction)
|
|
989
|
+
transactionBcs @include(if: $includeBcs)
|
|
990
|
+
signatures {
|
|
991
|
+
signatureBytes
|
|
992
|
+
}
|
|
993
|
+
effects {
|
|
994
|
+
status
|
|
995
|
+
executionError {
|
|
996
|
+
message
|
|
997
|
+
abortCode
|
|
998
|
+
identifier
|
|
999
|
+
constant
|
|
1000
|
+
sourceLineNumber
|
|
1001
|
+
instructionOffset
|
|
1002
|
+
module {
|
|
1003
|
+
name
|
|
1004
|
+
package {
|
|
1005
|
+
address
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
function {
|
|
1009
|
+
name
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
epoch {
|
|
1013
|
+
epochId
|
|
1014
|
+
}
|
|
1015
|
+
effectsBcs @include(if: $includeEffects)
|
|
1016
|
+
effectsJson @include(if: $includeObjectTypes)
|
|
1017
|
+
objectChanges(first: 50) @include(if: $includeObjectTypes) {
|
|
1018
|
+
nodes {
|
|
1019
|
+
address
|
|
1020
|
+
outputState {
|
|
1021
|
+
asMoveObject {
|
|
1022
|
+
contents {
|
|
1023
|
+
type {
|
|
1024
|
+
repr
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
balanceChangesJson @include(if: $includeBalanceChanges)
|
|
1032
|
+
events(first: 50) @include(if: $includeEvents) {
|
|
1033
|
+
pageInfo {
|
|
1034
|
+
hasNextPage
|
|
1035
|
+
}
|
|
1036
|
+
nodes {
|
|
1037
|
+
transactionModule {
|
|
1038
|
+
package {
|
|
1039
|
+
address
|
|
1040
|
+
}
|
|
1041
|
+
name
|
|
1042
|
+
}
|
|
1043
|
+
sender {
|
|
1044
|
+
address
|
|
1045
|
+
}
|
|
1046
|
+
contents {
|
|
1047
|
+
type {
|
|
1048
|
+
repr
|
|
1049
|
+
}
|
|
1050
|
+
bcs
|
|
1051
|
+
json
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}`),rie=new Lt(`
|
|
1057
|
+
mutation executeTransaction($transactionDataBcs: Base64!, $signatures: [Base64!]!, $includeTransaction: Boolean = false, $includeEffects: Boolean = false, $includeEvents: Boolean = false, $includeBalanceChanges: Boolean = false, $includeObjectTypes: Boolean = false, $includeBcs: Boolean = false) {
|
|
1058
|
+
executeTransaction(
|
|
1059
|
+
transactionDataBcs: $transactionDataBcs
|
|
1060
|
+
signatures: $signatures
|
|
1061
|
+
) {
|
|
1062
|
+
effects {
|
|
1063
|
+
transaction {
|
|
1064
|
+
...TRANSACTION_FIELDS
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
fragment TRANSACTION_FIELDS on Transaction {
|
|
1070
|
+
digest
|
|
1071
|
+
transactionJson @include(if: $includeTransaction)
|
|
1072
|
+
transactionBcs @include(if: $includeBcs)
|
|
1073
|
+
signatures {
|
|
1074
|
+
signatureBytes
|
|
1075
|
+
}
|
|
1076
|
+
effects {
|
|
1077
|
+
status
|
|
1078
|
+
executionError {
|
|
1079
|
+
message
|
|
1080
|
+
abortCode
|
|
1081
|
+
identifier
|
|
1082
|
+
constant
|
|
1083
|
+
sourceLineNumber
|
|
1084
|
+
instructionOffset
|
|
1085
|
+
module {
|
|
1086
|
+
name
|
|
1087
|
+
package {
|
|
1088
|
+
address
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
function {
|
|
1092
|
+
name
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
epoch {
|
|
1096
|
+
epochId
|
|
1097
|
+
}
|
|
1098
|
+
effectsBcs @include(if: $includeEffects)
|
|
1099
|
+
effectsJson @include(if: $includeObjectTypes)
|
|
1100
|
+
objectChanges(first: 50) @include(if: $includeObjectTypes) {
|
|
1101
|
+
nodes {
|
|
1102
|
+
address
|
|
1103
|
+
outputState {
|
|
1104
|
+
asMoveObject {
|
|
1105
|
+
contents {
|
|
1106
|
+
type {
|
|
1107
|
+
repr
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
balanceChangesJson @include(if: $includeBalanceChanges)
|
|
1115
|
+
events(first: 50) @include(if: $includeEvents) {
|
|
1116
|
+
pageInfo {
|
|
1117
|
+
hasNextPage
|
|
1118
|
+
}
|
|
1119
|
+
nodes {
|
|
1120
|
+
transactionModule {
|
|
1121
|
+
package {
|
|
1122
|
+
address
|
|
1123
|
+
}
|
|
1124
|
+
name
|
|
1125
|
+
}
|
|
1126
|
+
sender {
|
|
1127
|
+
address
|
|
1128
|
+
}
|
|
1129
|
+
contents {
|
|
1130
|
+
type {
|
|
1131
|
+
repr
|
|
1132
|
+
}
|
|
1133
|
+
bcs
|
|
1134
|
+
json
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
}`),aie=new Lt(`
|
|
1140
|
+
query getTransactionBlock($digest: String!, $includeTransaction: Boolean = false, $includeEffects: Boolean = false, $includeEvents: Boolean = false, $includeBalanceChanges: Boolean = false, $includeObjectTypes: Boolean = false, $includeBcs: Boolean = false) {
|
|
1141
|
+
transaction(digest: $digest) {
|
|
1142
|
+
...TRANSACTION_FIELDS
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
fragment TRANSACTION_FIELDS on Transaction {
|
|
1146
|
+
digest
|
|
1147
|
+
transactionJson @include(if: $includeTransaction)
|
|
1148
|
+
transactionBcs @include(if: $includeBcs)
|
|
1149
|
+
signatures {
|
|
1150
|
+
signatureBytes
|
|
1151
|
+
}
|
|
1152
|
+
effects {
|
|
1153
|
+
status
|
|
1154
|
+
executionError {
|
|
1155
|
+
message
|
|
1156
|
+
abortCode
|
|
1157
|
+
identifier
|
|
1158
|
+
constant
|
|
1159
|
+
sourceLineNumber
|
|
1160
|
+
instructionOffset
|
|
1161
|
+
module {
|
|
1162
|
+
name
|
|
1163
|
+
package {
|
|
1164
|
+
address
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
function {
|
|
1168
|
+
name
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
epoch {
|
|
1172
|
+
epochId
|
|
1173
|
+
}
|
|
1174
|
+
effectsBcs @include(if: $includeEffects)
|
|
1175
|
+
effectsJson @include(if: $includeObjectTypes)
|
|
1176
|
+
objectChanges(first: 50) @include(if: $includeObjectTypes) {
|
|
1177
|
+
nodes {
|
|
1178
|
+
address
|
|
1179
|
+
outputState {
|
|
1180
|
+
asMoveObject {
|
|
1181
|
+
contents {
|
|
1182
|
+
type {
|
|
1183
|
+
repr
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
balanceChangesJson @include(if: $includeBalanceChanges)
|
|
1191
|
+
events(first: 50) @include(if: $includeEvents) {
|
|
1192
|
+
pageInfo {
|
|
1193
|
+
hasNextPage
|
|
1194
|
+
}
|
|
1195
|
+
nodes {
|
|
1196
|
+
transactionModule {
|
|
1197
|
+
package {
|
|
1198
|
+
address
|
|
1199
|
+
}
|
|
1200
|
+
name
|
|
1201
|
+
}
|
|
1202
|
+
sender {
|
|
1203
|
+
address
|
|
1204
|
+
}
|
|
1205
|
+
contents {
|
|
1206
|
+
type {
|
|
1207
|
+
repr
|
|
1208
|
+
}
|
|
1209
|
+
bcs
|
|
1210
|
+
json
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}`),iie=new Lt(`
|
|
1216
|
+
query resolveTransaction($transaction: JSON!, $doGasSelection: Boolean = true) {
|
|
1217
|
+
simulateTransaction(transaction: $transaction, doGasSelection: $doGasSelection) {
|
|
1218
|
+
effects {
|
|
1219
|
+
transaction {
|
|
1220
|
+
transactionBcs
|
|
1221
|
+
effects {
|
|
1222
|
+
status
|
|
1223
|
+
executionError {
|
|
1224
|
+
message
|
|
1225
|
+
abortCode
|
|
1226
|
+
identifier
|
|
1227
|
+
constant
|
|
1228
|
+
sourceLineNumber
|
|
1229
|
+
instructionOffset
|
|
1230
|
+
module {
|
|
1231
|
+
name
|
|
1232
|
+
package {
|
|
1233
|
+
address
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
function {
|
|
1237
|
+
name
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
`),sie=new Lt(`
|
|
1246
|
+
query verifyZkLoginSignature($bytes: Base64!, $signature: Base64!, $intentScope: ZkLoginIntentScope!, $author: SuiAddress!) {
|
|
1247
|
+
verifyZkLoginSignature(
|
|
1248
|
+
bytes: $bytes
|
|
1249
|
+
signature: $signature
|
|
1250
|
+
intentScope: $intentScope
|
|
1251
|
+
author: $author
|
|
1252
|
+
) {
|
|
1253
|
+
success
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
`),oie="2.17.0",lie="/",cie={"Mvr-Source":`@mysten/sui@${oie}`};var uie=class{#t;#e;#n;#r;constructor({cache:e,url:t,pageSize:n=50,overrides:r}){this.#t=e,this.#e=t,this.#n=n,this.#r={packages:r?.packages,types:r?.types},fie(this.#r)}get#i(){return this.#t.readSync(["#mvrPackageDataLoader",this.#e??""],()=>{const e=new CD(async n=>{if(!this.#e)throw new Error(`MVR Api URL is not set for the current client (resolving ${n.join(", ")})`);const r=await this.#o(n);return n.map(i=>r[i]??new Error(`Failed to resolve package: ${i}`))}),t=this.#r?.packages;if(t)for(const[n,r]of Object.entries(t))e.prime(n,r);return e})}get#a(){return this.#t.readSync(["#mvrTypeDataLoader",this.#e??""],()=>{const e=new CD(async n=>{if(!this.#e)throw new Error(`MVR Api URL is not set for the current client (resolving ${n.join(", ")})`);const r=await this.#s(n);return n.map(i=>r[i]??new Error(`Failed to resolve type: ${i}`))}),t=this.#r?.types;if(t)for(const[n,r]of Object.entries(t))e.prime(n,r);return e})}async#o(e){if(e.length===0)return{};const t=mS(e,this.#n),n={};return await Promise.all(t.map(async r=>{const i=await this.#c("/v1/resolution/bulk",{names:r});if(i?.resolution)for(const o of Object.keys(i?.resolution)){const l=i.resolution[o]?.package_id;l&&(n[o]=l)}})),n}async#s(e){if(e.length===0)return{};const t=mS(e,this.#n),n={};return await Promise.all(t.map(async r=>{const i=await this.#c("/v1/struct-definition/bulk",{types:r});if(i?.resolution)for(const o of Object.keys(i?.resolution)){const l=i.resolution[o]?.type_tag;l&&(n[o]=l)}})),n}async#c(e,t){if(!this.#e)throw new Error("MVR Api URL is not set for the current client");const n=await fetch(`${this.#e}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...cie},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(`Failed to resolve types: ${r?.message}`)}return n.json()}async resolvePackage({package:e}){return tp(e)?{package:await this.#i.load(e)}:{package:e}}async resolveType({type:e}){if(!tp(e))return{type:e};const t=[...Zh(e)],n=await this.#a.loadMany(t),r={};for(let i=0;i<t.length;i++){const o=n[i];if(o instanceof Error)throw o;r[t[i]]=o}return{type:ep(e,r)}}async resolve({types:e=[],packages:t=[]}){const n=new Set;for(const h of e??[])Zh(h,n);const r=[...n],[i,o]=await Promise.all([r.length>0?this.#a.loadMany(r):[],t.length>0?this.#i.loadMany(t):[]]),l={...this.#r?.types};for(const[h,y]of r.entries()){const m=i[h];if(m instanceof Error)throw m;l[y]=m}const u={};for(const h of e??[])u[h]={type:ep(h,l)};const f={};for(const[h,y]of(t??[]).entries()){const m=this.#r?.packages?.[y]??o[h];if(m instanceof Error)throw m;f[y]={package:m}}return{types:u,packages:f}}};function fie(e){if(e?.packages)for(const[t,n]of Object.entries(e.packages)){if(!wB(t))throw new Error(`Invalid package name: ${t}`);if(!Kh(Kt(n)))throw new Error(`Invalid package ID: ${n}`)}if(e?.types)for(const[t,n]of Object.entries(e.types)){if(Bs(t).typeParams.length>0)throw new Error("Type overrides must be first-level only. If you want to supply generic types, just pass each type individually.");if(!Kh(Bs(n).address))throw new Error(`Invalid type: ${n}`)}}function Zh(e,t=new Set){if(typeof e=="string"&&!tp(e))return t;if(typeof e=="string"&&e.startsWith("vector<")&&e.endsWith(">"))return Zh(e.slice(7,-1),t);const n=gU(e)?e:Bs(e);tp(n.address)&&t.add(`${n.address}::${n.module}::${n.name}`);for(const r of n.typeParams)Zh(r,t);return t}function ep(e,t){if(typeof e=="string"&&!e.includes("::"))return e;if(typeof e=="string"&&e.startsWith("vector<")&&e.endsWith(">"))return`vector<${ep(e.slice(7,-1),t)}>`;const n=gU(e)?e:Bs(e),r=t[`${n.address}::${n.module}::${n.name}`];return jl({...n,address:r?r.split("::")[0]:n.address,typeParams:n.typeParams.map(i=>ep(i,t))})}function tp(e){return e.includes(lie)||e.includes("@")||e.includes(".sui")}function gU(e){return typeof e=="object"&&"address"in e&&"module"in e&&"name"in e&&"typeParams"in e}const die={mainnet:"https://mainnet.mvr.mystenlabs.com",testnet:"https://testnet.mvr.mystenlabs.com"};var hie=class extends DB{constructor(e){super(e),this.core=this,this.mvr=new uie({cache:this.cache.scope("core.mvr"),url:e.mvr?.url??die[this.network],pageSize:e.mvr?.pageSize,overrides:e.mvr?.overrides})}async getObject(e){const{objectId:t}=e,{objects:[n]}=await this.getObjects({objectIds:[t],signal:e.signal,include:e.include});if(n instanceof Error)throw n;return{object:n}}async getDynamicField(e){const t=Qh.parseFromStr((await this.core.mvr.resolveType({type:e.name.type})).type),n=yU(e.parentId,t,e.name.bcs),{objects:[r]}=await this.getObjects({objectIds:[n],signal:e.signal,include:{previousTransaction:!0,content:!0}});if(r instanceof Error)throw r;const i=Bs(r.type),o=await r.content,l=i.typeParams[0],u=typeof l!="string"&&l.module==="dynamic_object_field"&&l.name==="Wrapper",f=o.slice(Xp+e.name.bcs.length),h=typeof i.typeParams[1]=="string"?i.typeParams[1]:jl(i.typeParams[1]);return{dynamicField:{$kind:u?"DynamicObject":"DynamicField",fieldId:r.objectId,digest:r.digest,version:r.version,type:r.type,previousTransaction:r.previousTransaction,name:{type:typeof l=="string"?l:jl(l),bcs:e.name.bcs},value:{type:h,bcs:f},childId:u?Kn.Address.parse(f):void 0}}}async getDynamicObjectField(e){const t=`0x2::dynamic_object_field::Wrapper<${(await this.core.mvr.resolveType({type:e.name.type})).type}>`,{dynamicField:n}=await this.getDynamicField({parentId:e.parentId,name:{type:t,bcs:e.name.bcs},signal:e.signal}),{object:r}=await this.getObject({objectId:n.childId,signal:e.signal,include:e.include});return{object:r}}async waitForTransaction(e){const{signal:t,timeout:n=60*1e3,pollSchedule:r,include:i}=e,o="result"in e&&e.result?(e.result.Transaction??e.result.FailedTransaction).digest:e.digest,l=t?AbortSignal.any([AbortSignal.timeout(n),t]):AbortSignal.timeout(n),u=new Promise((g,S)=>{l.addEventListener("abort",()=>S(l.reason))});u.catch(()=>{});const f=r??[0,300,600,1500,3500],h=Date.now();let y=0;const m=f.length>0?f[f.length-1]-(f[f.length-2]??0):2e3;for(;;){if(y<f.length){const g=h+f[y]-Date.now();y++,g>0&&await Promise.race([new Promise(S=>setTimeout(S,g)),u])}else await Promise.race([new Promise(g=>setTimeout(g,m)),u]);l.throwIfAborted();try{return await this.getTransaction({digest:o,include:i,signal:l})}catch{}}}async signAndExecuteTransaction({transaction:e,signer:t,additionalSignatures:n=[],...r}){let i;e instanceof Uint8Array?i=e:(e.setSenderIfNotSet(t.toSuiAddress()),i=await e.build({client:this}));const{signature:o}=await t.signTransaction(i);return this.executeTransaction({transaction:i,signatures:[o,...n],...r})}};let Mx;function bU(e){return{lang:e?.lang??Mx?.lang,message:e?.message,abortEarly:e?.abortEarly??Mx?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Mx?.abortPipeEarly}}let pie;function mie(e){return pie?.get(e)}let yie;function vie(e){return yie?.get(e)}let gie;function bie(e,t){return gie?.get(e)?.get(t)}function xU(e){const t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function Qn(e,t,n,r,i){const o=i&&"input"in i?i.input:n.value,l=i?.expected??e.expects??null,u=i?.received??xU(o),f={kind:e.kind,type:e.type,input:o,expected:l,received:u,message:`Invalid ${t}: ${l?`Expected ${l} but r`:"R"}eceived ${u}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},h=e.kind==="schema",y=i?.message??e.message??bie(e.reference,f.lang)??(h?vie(f.lang):null)??r.message??mie(f.lang);y!==void 0&&(f.message=typeof y=="function"?y(f):y),h&&(n.typed=!1),n.issues?n.issues.push(f):n.issues=[f]}function Mn(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},bU())}}}function xie(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function Sie(e,t){const n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??"never"}var wie=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function Kp(e,t){return{kind:"validation",type:"check",reference:Kp,async:!1,expects:null,requirement:e,message:t,"~run"(n,r){return n.typed&&!this.requirement(n.value)&&Qn(this,"input",n,r),n}}}function ca(e){return{kind:"validation",type:"integer",reference:ca,async:!1,expects:null,requirement:Number.isInteger,message:e,"~run"(t,n){return t.typed&&!this.requirement(t.value)&&Qn(this,"integer",t,n),t}}}function Xw(e){return{kind:"transformation",type:"transform",reference:Xw,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Tie(e,t,n){return typeof e.fallback=="function"?e.fallback(t,n):e.fallback}function Qp(e,t,n){return typeof e.default=="function"?e.default(t,n):e.default}function Oie(e,t){return!e["~run"]({value:t},{abortEarly:!0}).issues}function cn(e,t){return{kind:"schema",type:"array",reference:cn,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Mn(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let o=0;o<i.length;o++){const l=i[o],u=this.item["~run"]({value:l},r);if(u.issues){const f={type:"array",origin:"value",input:i,key:o,value:l};for(const h of u.issues)h.path?h.path.unshift(f):h.path=[f],n.issues?.push(h);if(n.issues||(n.issues=u.issues),r.abortEarly){n.typed=!1;break}}u.typed||(n.typed=!1),n.value.push(u.value)}}else Qn(this,"type",n,r);return n}}}function SU(e){return{kind:"schema",type:"bigint",reference:SU,expects:"bigint",async:!1,message:e,get"~standard"(){return Mn(this)},"~run"(t,n){return typeof t.value=="bigint"?t.typed=!0:Qn(this,"type",t,n),t}}}function Jp(e){return{kind:"schema",type:"boolean",reference:Jp,expects:"boolean",async:!1,message:e,get"~standard"(){return Mn(this)},"~run"(t,n){return typeof t.value=="boolean"?t.typed=!0:Qn(this,"type",t,n),t}}}function bS(e){return{kind:"schema",type:"lazy",reference:bS,expects:"unknown",async:!1,getter:e,get"~standard"(){return Mn(this)},"~run"(t,n){return this.getter(t.value)["~run"](t,n)}}}function Et(e,t){return{kind:"schema",type:"literal",reference:Et,expects:xU(e),async:!1,literal:e,message:t,get"~standard"(){return Mn(this)},"~run"(n,r){return n.value===this.literal?n.typed=!0:Qn(this,"type",n,r),n}}}function _n(e,t){return{kind:"schema",type:"nullable",reference:_n,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:t,get"~standard"(){return Mn(this)},"~run"(n,r){return n.value===null&&(this.default!==void 0&&(n.value=Qp(this,n,r)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function xS(e,t){return{kind:"schema",type:"nullish",reference:xS,expects:`(${e.expects} | null | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Mn(this)},"~run"(n,r){return(n.value===null||n.value===void 0)&&(this.default!==void 0&&(n.value=Qp(this,n,r)),n.value===null||n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function ua(e){return{kind:"schema",type:"number",reference:ua,expects:"number",async:!1,message:e,get"~standard"(){return Mn(this)},"~run"(t,n){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:Qn(this,"type",t,n),t}}}function Pe(e,t){return{kind:"schema",type:"object",reference:Pe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Mn(this)},"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const o in this.entries){const l=this.entries[o];if(o in i||(l.type==="exact_optional"||l.type==="optional"||l.type==="nullish")&&l.default!==void 0){const u=o in i?i[o]:Qp(l),f=l["~run"]({value:u},r);if(f.issues){const h={type:"object",origin:"value",input:i,key:o,value:u};for(const y of f.issues)y.path?y.path.unshift(h):y.path=[h],n.issues?.push(y);if(n.issues||(n.issues=f.issues),r.abortEarly){n.typed=!1;break}}f.typed||(n.typed=!1),n.value[o]=f.value}else if(l.fallback!==void 0)n.value[o]=Tie(l);else if(l.type!=="exact_optional"&&l.type!=="optional"&&l.type!=="nullish"&&(Qn(this,"key",n,r,{input:void 0,expected:`"${o}"`,path:[{type:"object",origin:"key",input:i,key:o,value:i[o]}]}),r.abortEarly))break}}else Qn(this,"type",n,r);return n}}}function zi(e,t){return{kind:"schema",type:"optional",reference:zi,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Mn(this)},"~run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=Qp(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function SS(e,t,n){return{kind:"schema",type:"record",reference:SS,expects:"Object",async:!1,key:e,value:t,message:n,get"~standard"(){return Mn(this)},"~run"(r,i){const o=r.value;if(o&&typeof o=="object"){r.typed=!0,r.value={};for(const l in o)if(xie(o,l)){const u=o[l],f=this.key["~run"]({value:l},i);if(f.issues){const y={type:"object",origin:"key",input:o,key:l,value:u};for(const m of f.issues)m.path=[y],r.issues?.push(m);if(r.issues||(r.issues=f.issues),i.abortEarly){r.typed=!1;break}}const h=this.value["~run"]({value:u},i);if(h.issues){const y={type:"object",origin:"value",input:o,key:l,value:u};for(const m of h.issues)m.path?m.path.unshift(y):m.path=[y],r.issues?.push(m);if(r.issues||(r.issues=h.issues),i.abortEarly){r.typed=!1;break}}(!f.typed||!h.typed)&&(r.typed=!1),f.typed&&(r.value[f.value]=h.value)}}else Qn(this,"type",r,i);return r}}}function rn(e){return{kind:"schema",type:"string",reference:rn,expects:"string",async:!1,message:e,get"~standard"(){return Mn(this)},"~run"(t,n){return typeof t.value=="string"?t.typed=!0:Qn(this,"type",t,n),t}}}function wU(e,t){return{kind:"schema",type:"tuple",reference:wU,expects:"Array",async:!1,items:e,message:t,get"~standard"(){return Mn(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let o=0;o<this.items.length;o++){const l=i[o],u=this.items[o]["~run"]({value:l},r);if(u.issues){const f={type:"array",origin:"value",input:i,key:o,value:l};for(const h of u.issues)h.path?h.path.unshift(f):h.path=[f],n.issues?.push(h);if(n.issues||(n.issues=u.issues),r.abortEarly){n.typed=!1;break}}u.typed||(n.typed=!1),n.value.push(u.value)}}else Qn(this,"type",n,r);return n}}}function PD(e){let t;if(e)for(const n of e)t?t.push(...n.issues):t=n.issues;return t}function ti(e,t){return{kind:"schema",type:"union",reference:ti,expects:Sie(e.map(n=>n.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Mn(this)},"~run"(n,r){let i,o,l;for(const u of this.options){const f=u["~run"]({value:n.value},r);if(f.typed)if(f.issues)o?o.push(f):o=[f];else{i=f;break}else l?l.push(f):l=[f]}if(i)return i;if(o){if(o.length===1)return o[0];Qn(this,"type",n,r,{issues:PD(o)}),n.typed=!0}else{if(l?.length===1)return l[0];Qn(this,"type",n,r,{issues:PD(l)})}return n}}}function Kw(){return{kind:"schema",type:"unknown",reference:Kw,expects:"unknown",async:!1,get"~standard"(){return Mn(this)},"~run"(e){return e.typed=!0,e}}}function Vo(e,t,n){const r=e["~run"]({value:t},bU(n));if(r.issues)throw new wie(r.issues);return r.value}function Dr(...e){return{...e[0],pipe:e,get"~standard"(){return Mn(this)},"~run"(t,n){for(const r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=r["~run"](t,n))}return t}}}function ga(e){return ti(Object.keys(e).map(t=>Fc(t,Pe({[t]:e[t]}))))}function Fc(e,t){return Dr(Pe({...t.entries,$kind:zi(Et(e))}),Xw(n=>({...n,$kind:e})))}const Zp=Dr(rn(),Xw(e=>Kt(e)),Kp(Kh)),ks=Zp,np=rn(),pr=Dr(ti([rn(),Dr(ua(),ca())]),Kp(e=>{try{return BigInt(e),BigInt(e)>=0&&BigInt(e)<=18446744073709551615n}catch{return!1}},"Invalid u64")),jie=Dr(ua(),ca(),Kp(e=>e>=0&&e<2**32,"Invalid u32")),wS=Pe({objectId:Zp,version:pr,digest:rn()}),kr=ti([Fc("GasCoin",Pe({GasCoin:Et(!0)})),Fc("Input",Pe({Input:Dr(ua(),ca()),type:zi(ti([Et("pure"),Et("object"),Et("withdrawal")]))})),Fc("Result",Pe({Result:Dr(ua(),ca())})),Fc("NestedResult",Pe({NestedResult:wU([Dr(ua(),ca()),Dr(ua(),ca())])}))]),Aie=Pe({budget:_n(pr),price:_n(pr),owner:_n(Zp),payment:_n(cn(wS))}),TS=ti([Pe({$kind:Et("address")}),Pe({$kind:Et("bool")}),Pe({$kind:Et("u8")}),Pe({$kind:Et("u16")}),Pe({$kind:Et("u32")}),Pe({$kind:Et("u64")}),Pe({$kind:Et("u128")}),Pe({$kind:Et("u256")}),Pe({$kind:Et("unknown")}),Pe({$kind:Et("vector"),vector:bS(()=>TS)}),Pe({$kind:Et("datatype"),datatype:Pe({typeName:rn(),typeParameters:cn(bS(()=>TS))})}),Pe({$kind:Et("typeParameter"),index:Dr(ua(),ca())})]),Eie=Pe({reference:_n(ti([Et("mutable"),Et("immutable"),Et("unknown")])),body:TS}),_ie=Pe({package:ks,module:rn(),function:rn(),typeArguments:cn(rn()),arguments:cn(kr),_argumentTypes:zi(_n(cn(Eie)))}),Nie=Pe({name:rn(),inputs:SS(rn(),ti([kr,cn(kr)])),data:SS(rn(),Kw())}),kie=ga({MoveCall:_ie,TransferObjects:Pe({objects:cn(kr),address:kr}),SplitCoins:Pe({coin:kr,amounts:cn(kr)}),MergeCoins:Pe({destination:kr,sources:cn(kr)}),Publish:Pe({modules:cn(np),dependencies:cn(ks)}),MakeMoveVec:Pe({type:_n(rn()),elements:cn(kr)}),Upgrade:Pe({modules:cn(np),dependencies:cn(ks),package:ks,ticket:kr}),$Intent:Nie}),TU=ga({ImmOrOwnedObject:wS,SharedObject:Pe({objectId:ks,initialSharedVersion:pr,mutable:Jp()}),Receiving:wS}),Cie=ga({MaxAmountU64:pr}),Mie=ga({Balance:rn()}),Die=ga({Sender:Et(!0),Sponsor:Et(!0)}),Rie=Pe({reservation:Cie,typeArg:Mie,withdrawFrom:Die}),Iie=ga({Object:TU,Pure:Pe({bytes:np}),UnresolvedPure:Pe({value:Kw()}),UnresolvedObject:Pe({objectId:ks,version:zi(_n(pr)),digest:zi(_n(rn())),initialSharedVersion:zi(_n(pr)),mutable:zi(_n(Jp()))}),FundsWithdrawal:Rie});ga({Object:TU,Pure:Pe({bytes:np})});const Pie=Pe({minEpoch:_n(pr),maxEpoch:_n(pr),minTimestamp:_n(pr),maxTimestamp:_n(pr),chain:rn(),nonce:jie}),Bie=ga({None:Et(!0),Epoch:pr,ValidDuring:Pie}),zd=Pe({version:Et(2),sender:xS(Zp),expiration:xS(Bie),gasData:Aie,inputs:cn(Iie),commands:cn(kie)}),BD=Pe({digest:rn(),objectId:rn(),version:ti([Dr(ua(),ca()),rn(),SU()])}),Uie=ga({ImmOrOwned:BD,Shared:Pe({objectId:ks,initialSharedVersion:pr,mutable:Jp()}),Receiving:BD}),UD=ga({Object:Uie,Pure:cn(Dr(ua(),ca()))});function Lie(e){return Vo(zd,{version:2,sender:e.sender??null,expiration:e.expiration?"Epoch"in e.expiration?{Epoch:e.expiration.Epoch}:{None:!0}:null,gasData:{owner:e.gasConfig.owner??null,budget:e.gasConfig.budget?.toString()??null,price:e.gasConfig.price?.toString()??null,payment:e.gasConfig.payment?.map(t=>({digest:t.digest,objectId:t.objectId,version:t.version.toString()}))??null},inputs:e.inputs.map(t=>{if(t.kind==="Input"){if(Oie(UD,t.value)){const n=Vo(UD,t.value);if(n.Object){if(n.Object.ImmOrOwned)return{Object:{ImmOrOwnedObject:{objectId:n.Object.ImmOrOwned.objectId,version:String(n.Object.ImmOrOwned.version),digest:n.Object.ImmOrOwned.digest}}};if(n.Object.Shared)return{Object:{SharedObject:{mutable:n.Object.Shared.mutable??null,initialSharedVersion:n.Object.Shared.initialSharedVersion,objectId:n.Object.Shared.objectId}}};if(n.Object.Receiving)return{Object:{Receiving:{digest:n.Object.Receiving.digest,version:String(n.Object.Receiving.version),objectId:n.Object.Receiving.objectId}}};throw new Error("Invalid object input")}return{Pure:{bytes:Pn(new Uint8Array(n.Pure))}}}return t.type==="object"?{UnresolvedObject:{objectId:t.value}}:{UnresolvedPure:{value:t.value}}}throw new Error("Invalid input")}),commands:e.transactions.map(t=>{switch(t.kind){case"MakeMoveVec":return{MakeMoveVec:{type:"Some"in t.type?Qh.tagToString(t.type.Some):null,elements:t.objects.map(n=>La(n))}};case"MergeCoins":return{MergeCoins:{destination:La(t.destination),sources:t.sources.map(n=>La(n))}};case"MoveCall":{const[n,r,i]=t.target.split("::");return{MoveCall:{package:n,module:r,function:i,typeArguments:t.typeArguments,arguments:t.arguments.map(o=>La(o))}}}case"Publish":return{Publish:{modules:t.modules.map(n=>Pn(Uint8Array.from(n))),dependencies:t.dependencies}};case"SplitCoins":return{SplitCoins:{coin:La(t.coin),amounts:t.amounts.map(n=>La(n))}};case"TransferObjects":return{TransferObjects:{objects:t.objects.map(n=>La(n)),address:La(t.address)}};case"Upgrade":return{Upgrade:{modules:t.modules.map(n=>Pn(Uint8Array.from(n))),dependencies:t.dependencies,package:t.packageId,ticket:La(t.ticket)}}}throw new Error(`Unknown transaction ${Object.keys(t)}`)})})}function La(e){switch(e.kind){case"GasCoin":return{GasCoin:!0};case"Result":return{Result:e.index};case"NestedResult":return{NestedResult:[e.index,e.resultIndex]};case"Input":return{Input:e.index}}}function zie(e,t){const n=Array.from(`${e}::`).map(i=>i.charCodeAt(0)),r=new Uint8Array(n.length+t.length);return r.set(n),r.set(t,n.length),mU(r,{dkLen:32})}function LD(e){if(typeof e=="string")return Kt(e);if(e.Object)return e.Object.ImmOrOwnedObject?Kt(e.Object.ImmOrOwnedObject.objectId):e.Object.Receiving?Kt(e.Object.Receiving.objectId):Kt(e.Object.SharedObject.objectId);if(e.UnresolvedObject)return Kt(e.UnresolvedObject.objectId)}function $ie(e,t,n){const r=i=>{switch(i.$kind){case"Input":{const o=t.get(i.Input);if(o===void 0)throw new Error(`Input ${i.Input} not found in input mapping`);return{...i,Input:o}}case"Result":{const o=n.get(i.Result);return o!==void 0?{...i,Result:o}:i}case"NestedResult":{const o=n.get(i.NestedResult[0]);return o!==void 0?{...i,NestedResult:[o,i.NestedResult[1]]}:i}default:return i}};switch(e.$kind){case"MoveCall":e.MoveCall.arguments=e.MoveCall.arguments.map(r);break;case"TransferObjects":e.TransferObjects.objects=e.TransferObjects.objects.map(r),e.TransferObjects.address=r(e.TransferObjects.address);break;case"SplitCoins":e.SplitCoins.coin=r(e.SplitCoins.coin),e.SplitCoins.amounts=e.SplitCoins.amounts.map(r);break;case"MergeCoins":e.MergeCoins.destination=r(e.MergeCoins.destination),e.MergeCoins.sources=e.MergeCoins.sources.map(r);break;case"MakeMoveVec":e.MakeMoveVec.elements=e.MakeMoveVec.elements.map(r);break;case"Upgrade":e.Upgrade.ticket=r(e.Upgrade.ticket);break;case"$Intent":{const i=e.$Intent.inputs;e.$Intent.inputs={};for(const[o,l]of Object.entries(i))e.$Intent.inputs[o]=Array.isArray(l)?l.map(r):r(l);break}}}function zD(e){return Kt(e).replace("0x","")}var qie=class bs{static fromKindBytes(t){const n=Kn.TransactionKind.parse(t).ProgrammableTransaction;if(!n)throw new Error("Unable to deserialize from bytes.");return bs.restore({version:2,sender:null,expiration:null,gasData:{budget:null,owner:null,payment:null,price:null},inputs:n.inputs,commands:n.commands})}static fromBytes(t){const n=Kn.TransactionData.parse(t)?.V1,r=n.kind.ProgrammableTransaction;if(!n||!r)throw new Error("Unable to deserialize from bytes.");return bs.restore({version:2,sender:n.sender,expiration:n.expiration,gasData:n.gasData,inputs:r.inputs,commands:r.commands})}static restore(t){return t.version===2?new bs(Vo(zd,t)):new bs(Vo(zd,Lie(t)))}static getDigestFromBytes(t){return Yp(zie("TransactionData",t))}constructor(t){this.version=2,this.sender=t?.sender??null,this.expiration=t?.expiration??null,this.inputs=t?.inputs??[],this.commands=t?.commands??[],this.gasData=t?.gasData??{budget:null,price:null,owner:null,payment:null}}build({maxSizeBytes:t=1/0,overrides:n,onlyTransactionKind:r}={}){const i=this.inputs,o=this.commands,l={ProgrammableTransaction:{inputs:i,commands:o}};if(r)return Kn.TransactionKind.serialize(l,{maxSize:t}).toBytes();const u=n?.expiration??this.expiration,f=n?.sender??this.sender,h={...this.gasData,...n?.gasData};if(!f)throw new Error("Missing transaction sender");if(!h.budget)throw new Error("Missing gas budget");if(!h.payment)throw new Error("Missing gas payment");if(!h.price)throw new Error("Missing gas price");const y={sender:zD(f),expiration:u||{None:!0},gasData:{payment:h.payment,owner:zD(this.gasData.owner??f),price:BigInt(h.price),budget:BigInt(h.budget)},kind:{ProgrammableTransaction:{inputs:i,commands:o}}};return Kn.TransactionData.serialize({V1:y},{maxSize:t}).toBytes()}addInput(t,n){const r=this.inputs.length;return this.inputs.push(n),{Input:r,type:t,$kind:"Input"}}getInputUses(t,n){this.mapArguments((r,i)=>(r.$kind==="Input"&&r.Input===t&&n(r,i),r))}mapCommandArguments(t,n){const r=this.commands[t];switch(r.$kind){case"MoveCall":r.MoveCall.arguments=r.MoveCall.arguments.map(o=>n(o,r,t));break;case"TransferObjects":r.TransferObjects.objects=r.TransferObjects.objects.map(o=>n(o,r,t)),r.TransferObjects.address=n(r.TransferObjects.address,r,t);break;case"SplitCoins":r.SplitCoins.coin=n(r.SplitCoins.coin,r,t),r.SplitCoins.amounts=r.SplitCoins.amounts.map(o=>n(o,r,t));break;case"MergeCoins":r.MergeCoins.destination=n(r.MergeCoins.destination,r,t),r.MergeCoins.sources=r.MergeCoins.sources.map(o=>n(o,r,t));break;case"MakeMoveVec":r.MakeMoveVec.elements=r.MakeMoveVec.elements.map(o=>n(o,r,t));break;case"Upgrade":r.Upgrade.ticket=n(r.Upgrade.ticket,r,t);break;case"$Intent":const i=r.$Intent.inputs;r.$Intent.inputs={};for(const[o,l]of Object.entries(i))r.$Intent.inputs[o]=Array.isArray(l)?l.map(u=>n(u,r,t)):n(l,r,t);break;case"Publish":break;default:throw new Error(`Unexpected transaction kind: ${r.$kind}`)}}mapArguments(t){for(const n of this.commands.keys())this.mapCommandArguments(n,t)}replaceCommand(t,n,r=t){if(!Array.isArray(n)){this.commands[t]=n;return}const i=n.length-1;this.commands.splice(t,1,...structuredClone(n)),this.mapArguments((o,l,u)=>{if(u<t+n.length)return o;if(typeof r!="number"&&(o.$kind==="Result"&&o.Result===t||o.$kind==="NestedResult"&&o.NestedResult[0]===t)){if(!("NestedResult"in o)||o.NestedResult[1]===0)return Vo(kr,structuredClone(r));throw new Error(`Cannot replace command ${t} with a specific result type: NestedResult[${t}, ${o.NestedResult[1]}] references a nested element that cannot be mapped to the replacement result`)}switch(o.$kind){case"Result":o.Result===t&&typeof r=="number"&&(o.Result=r),o.Result>t&&(o.Result+=i);break;case"NestedResult":if(o.NestedResult[0]===t&&typeof r=="number")return{$kind:"NestedResult",NestedResult:[r,o.NestedResult[1]]};o.NestedResult[0]>t&&(o.NestedResult[0]+=i);break}return o})}replaceCommandWithTransaction(t,n,r){if(r.$kind!=="Result"&&r.$kind!=="NestedResult")throw new Error("Result must be of kind Result or NestedResult");this.insertTransaction(t,n),this.replaceCommand(t+n.commands.length,[],"Result"in r?{NestedResult:[r.Result+t,0]}:{NestedResult:[r.NestedResult[0]+t,r.NestedResult[1]]})}insertTransaction(t,n){const r=new Map,i=new Map;for(let u=0;u<n.inputs.length;u++){const f=n.inputs[u],h=LD(f);let y=-1;if(h!==void 0&&(y=this.inputs.findIndex(m=>LD(m)===h),y!==-1&&this.inputs[y].Object?.SharedObject&&f.Object?.SharedObject&&(this.inputs[y].Object.SharedObject.mutable=this.inputs[y].Object.SharedObject.mutable||f.Object.SharedObject.mutable)),y!==-1)r.set(u,y);else{const m=this.inputs.length;this.inputs.push(f),r.set(u,m)}}for(let u=0;u<n.commands.length;u++)i.set(u,t+u);const o=[];for(let u=0;u<n.commands.length;u++){const f=structuredClone(n.commands[u]);$ie(f,r,i),o.push(f)}this.commands.splice(t,0,...o);const l=o.length;l>0&&this.mapArguments((u,f,h)=>{if(h>=t&&h<t+o.length)return u;switch(u.$kind){case"Result":u.Result>=t&&(u.Result+=l);break;case"NestedResult":u.NestedResult[0]>=t&&(u.NestedResult[0]+=l);break}return u})}getDigest(){const t=this.build({onlyTransactionKind:!1});return bs.getDigestFromBytes(t)}snapshot(){return Vo(zd,this)}shallowClone(){return new bs({version:this.version,sender:this.sender,expiration:this.expiration,gasData:{...this.gasData},inputs:[...this.inputs],commands:[...this.commands]})}applyResolvedData(t){this.sender||(this.sender=t.sender??null),this.expiration||(this.expiration=t.expiration??null),this.gasData.budget||(this.gasData.budget=t.gasData.budget),this.gasData.owner||(this.gasData.owner=t.gasData.owner??null),this.gasData.payment||(this.gasData.payment=t.gasData.payment),this.gasData.price||(this.gasData.price=t.gasData.price);for(let n=0;n<this.inputs.length;n++){const r=this.inputs[n],i=t.inputs[n];switch(r.$kind){case"UnresolvedPure":if(i.$kind!=="Pure")throw new Error(`Expected input at index ${n} to resolve to a Pure argument, but got ${JSON.stringify(i)}`);this.inputs[n]=i;break;case"UnresolvedObject":if(i.$kind!=="Object")throw new Error(`Expected input at index ${n} to resolve to an Object argument, but got ${JSON.stringify(i)}`);if(i.Object.$kind==="ImmOrOwnedObject"||i.Object.$kind==="Receiving"){const o=r.UnresolvedObject,l=i.Object.ImmOrOwnedObject??i.Object.Receiving;if(Kt(o.objectId)!==Kt(l.objectId)||o.version!=null&&o.version!==l.version||o.digest!=null&&o.digest!==l.digest||o.mutable!=null||o.initialSharedVersion!=null)throw new Error(`Input at index ${n} did not match unresolved object. ${JSON.stringify(o)} is not compatible with ${JSON.stringify(l)}`)}else if(i.Object.$kind==="SharedObject"){const o=r.UnresolvedObject,l=i.Object.SharedObject;if(Kt(o.objectId)!==Kt(l.objectId)||o.initialSharedVersion!=null&&o.initialSharedVersion!==l.initialSharedVersion||o.mutable!=null&&o.mutable!==l.mutable||o.version!=null||o.digest!=null)throw new Error(`Input at index ${n} did not match unresolved object. ${JSON.stringify(o)} is not compatible with ${JSON.stringify(l)}`)}else throw new Error(`Input at index ${n} resolved to an unexpected Object kind: ${JSON.stringify(i.Object)}`);this.inputs[n]=i;break}}}};const Vie=new Intl.PluralRules("en-US",{type:"ordinal"}),Fie=new Map([["one","st"],["two","nd"],["few","rd"],["other","th"]]);function Gie(e){return`${e}${Fie.get(Vie.select(e))}`}function OU(e){const{command:t,location:n,abortCode:r,cleverError:i}=e,o=[];if(t!=null?o.push(`MoveAbort in ${Gie(t+1)} command`):o.push("MoveAbort"),i?.constantName){const l=i.value?`'${i.constantName}': ${i.value}`:`'${i.constantName}'`;o.push(l)}else o.push(`abort code: ${r}`);if(n?.package&&n?.module){const l=[`in '${[n.package.startsWith("0x")?n.package:`0x${n.package}`,n.module,n.functionName].filter(Boolean).join("::")}'`];i?.lineNumber!=null?l.push(`(line ${i.lineNumber})`):n.instruction!=null&&l.push(`(instruction ${n.instruction})`),o.push(l.join(" "))}return o.join(", ")}const $D=Kn.struct("MinimalEffectsWithError",{status:Ww});Kn.enum("MinimalTransactionEffectsWithError",{V1:$D,V2:$D});const Hie=Kn.enum("MinimalExecutionStatusNoError",{Success:null,Failed:null}),qD=Kn.struct("MinimalEffectsNoError",{status:Hie});Kn.enum("MinimalTransactionEffectsNoError",{V1:qD,V2:qD});function Gn(e,t){return t!=null&&typeof t!="boolean"?`${e}(${JSON.stringify(t,(n,r)=>typeof r=="bigint"?r.toString():r)})`:e}function Wie(e){const t=e.error,n=e.command!=null?Number(e.command):void 0;switch(t.$kind){case"MoveAbort":{const[r,i]=t.MoveAbort,o={package:r.module.address,module:r.module.name,function:r.function,functionName:r.functionName??void 0,instruction:r.instruction};return{$kind:"MoveAbort",message:OU({command:n,location:o,abortCode:String(i)}),command:n,MoveAbort:{abortCode:String(i),location:o}}}case"MoveObjectTooBig":return{$kind:"SizeError",message:Gn("MoveObjectTooBig",t.MoveObjectTooBig),command:n,SizeError:{name:"ObjectTooBig",size:Number(t.MoveObjectTooBig.objectSize),maxSize:Number(t.MoveObjectTooBig.maxObjectSize)}};case"MovePackageTooBig":return{$kind:"SizeError",message:Gn("MovePackageTooBig",t.MovePackageTooBig),command:n,SizeError:{name:"PackageTooBig",size:Number(t.MovePackageTooBig.objectSize),maxSize:Number(t.MovePackageTooBig.maxObjectSize)}};case"EffectsTooLarge":return{$kind:"SizeError",message:Gn("EffectsTooLarge",t.EffectsTooLarge),command:n,SizeError:{name:"EffectsTooLarge",size:Number(t.EffectsTooLarge.currentSize),maxSize:Number(t.EffectsTooLarge.maxSize)}};case"WrittenObjectsTooLarge":return{$kind:"SizeError",message:Gn("WrittenObjectsTooLarge",t.WrittenObjectsTooLarge),command:n,SizeError:{name:"WrittenObjectsTooLarge",size:Number(t.WrittenObjectsTooLarge.currentSize),maxSize:Number(t.WrittenObjectsTooLarge.maxSize)}};case"MoveVectorElemTooBig":return{$kind:"SizeError",message:Gn("MoveVectorElemTooBig",t.MoveVectorElemTooBig),command:n,SizeError:{name:"MoveVectorElemTooBig",size:Number(t.MoveVectorElemTooBig.valueSize),maxSize:Number(t.MoveVectorElemTooBig.maxScaledSize)}};case"MoveRawValueTooBig":return{$kind:"SizeError",message:Gn("MoveRawValueTooBig",t.MoveRawValueTooBig),command:n,SizeError:{name:"MoveRawValueTooBig",size:Number(t.MoveRawValueTooBig.valueSize),maxSize:Number(t.MoveRawValueTooBig.maxScaledSize)}};case"CommandArgumentError":return{$kind:"CommandArgumentError",message:Gn("CommandArgumentError",t.CommandArgumentError),command:n,CommandArgumentError:{argument:t.CommandArgumentError.argIdx,name:t.CommandArgumentError.kind.$kind}};case"TypeArgumentError":return{$kind:"TypeArgumentError",message:Gn("TypeArgumentError",t.TypeArgumentError),command:n,TypeArgumentError:{typeArgument:t.TypeArgumentError.argumentIdx,name:t.TypeArgumentError.kind.$kind}};case"PackageUpgradeError":{const r=t.PackageUpgradeError.upgradeError;return{$kind:"PackageUpgradeError",message:Gn("PackageUpgradeError",t.PackageUpgradeError),command:n,PackageUpgradeError:{name:r.$kind,packageId:r.$kind==="UnableToFetchPackage"?r.UnableToFetchPackage.packageId:void 0,digest:r.$kind==="DigestDoesNotMatch"?Pn(r.DigestDoesNotMatch.digest):void 0}}}case"ExecutionCancelledDueToSharedObjectCongestion":return{$kind:"CongestedObjects",message:Gn("ExecutionCancelledDueToSharedObjectCongestion",t.ExecutionCancelledDueToSharedObjectCongestion),command:n,CongestedObjects:{name:"ExecutionCanceledDueToConsensusObjectCongestion",objects:t.ExecutionCancelledDueToSharedObjectCongestion.congested_objects}};case"AddressDeniedForCoin":return{$kind:"CoinDenyListError",message:Gn("AddressDeniedForCoin",t.AddressDeniedForCoin),command:n,CoinDenyListError:{name:"AddressDeniedForCoin",address:t.AddressDeniedForCoin.address,coinType:t.AddressDeniedForCoin.coinType}};case"CoinTypeGlobalPause":return{$kind:"CoinDenyListError",message:Gn("CoinTypeGlobalPause",t.CoinTypeGlobalPause),command:n,CoinDenyListError:{name:"CoinTypeGlobalPause",coinType:t.CoinTypeGlobalPause.coinType}};case"CircularObjectOwnership":return{$kind:"ObjectIdError",message:Gn("CircularObjectOwnership",t.CircularObjectOwnership),command:n,ObjectIdError:{name:"CircularObjectOwnership",objectId:t.CircularObjectOwnership.object}};case"InvalidGasObject":return{$kind:"ObjectIdError",message:"InvalidGasObject",command:n,ObjectIdError:{name:"InvalidGasObject",objectId:""}};case"InputObjectDeleted":return{$kind:"ObjectIdError",message:"InputObjectDeleted",command:n,ObjectIdError:{name:"InputObjectDeleted",objectId:""}};case"InvalidTransferObject":return{$kind:"ObjectIdError",message:"InvalidTransferObject",command:n,ObjectIdError:{name:"InvalidTransferObject",objectId:""}};case"NonExclusiveWriteInputObjectModified":return{$kind:"Unknown",message:Gn("NonExclusiveWriteInputObjectModified",t.NonExclusiveWriteInputObjectModified),command:n,Unknown:null};case"InsufficientGas":case"InvariantViolation":case"FeatureNotYetSupported":case"InsufficientCoinBalance":case"CoinBalanceOverflow":case"PublishErrorNonZeroAddress":case"SuiMoveVerificationError":case"MovePrimitiveRuntimeError":case"VMVerificationOrDeserializationError":case"VMInvariantViolation":case"FunctionNotFound":case"ArityMismatch":case"TypeArityMismatch":case"NonEntryFunctionInvoked":case"UnusedValueWithoutDrop":case"InvalidPublicFunctionReturnType":case"PublishUpgradeMissingDependency":case"PublishUpgradeDependencyDowngrade":case"CertificateDenied":case"SuiMoveVerificationTimedout":case"SharedObjectOperationNotAllowed":case"ExecutionCancelledDueToRandomnessUnavailable":case"InvalidLinkage":case"InsufficientBalanceForWithdraw":return{$kind:"Unknown",message:t.$kind,command:n,Unknown:null};default:return{$kind:"Unknown",message:"Unknown error",command:n,Unknown:null}}}function Yie(e){const t=Kn.TransactionEffects.parse(e);switch(t.$kind){case"V1":return Xie({effects:t.V1});case"V2":return Kie({bytes:e,effects:t.V2});default:throw new Error(`Unknown transaction effects version: ${t.$kind}`)}}function Xie(e){throw new Error("V1 effects are not supported yet")}function Kie({bytes:e,effects:t}){const n=t.changedObjects.map(([r,i])=>({objectId:r,inputState:i.inputState.$kind==="Exist"?"Exists":"DoesNotExist",inputVersion:i.inputState.Exist?.[0][0]??null,inputDigest:i.inputState.Exist?.[0][1]??null,inputOwner:i.inputState.Exist?.[1]??null,outputState:i.outputState.$kind==="NotExist"?"DoesNotExist":i.outputState.$kind,outputVersion:i.outputState.$kind==="PackageWrite"?i.outputState.PackageWrite?.[0]:i.outputState.$kind==="ObjectWrite"?t.lamportVersion:null,outputDigest:i.outputState.$kind==="PackageWrite"?i.outputState.PackageWrite?.[1]:i.outputState.$kind==="ObjectWrite"?i.outputState.ObjectWrite?.[0]??null:null,outputOwner:i.outputState.$kind==="ObjectWrite"?i.outputState.ObjectWrite[1]:null,idOperation:i.idOperation.$kind}));return{bcs:e,version:2,status:t.status.$kind==="Success"?{success:!0,error:null}:{success:!1,error:Wie(t.status.Failure)},gasUsed:t.gasUsed,transactionDigest:t.transactionDigest,gasObject:t.gasObjectIndex===null?null:n[t.gasObjectIndex]??null,eventsDigest:t.eventsDigest,dependencies:t.dependencies,lamportVersion:t.lamportVersion,changedObjects:n,unchangedConsensusObjects:t.unchangedConsensusObjects.map(([r,i])=>({kind:i.$kind,objectId:r,version:i.$kind==="ReadOnlyRoot"?i.ReadOnlyRoot[0]:i[i.$kind],digest:i.$kind==="ReadOnlyRoot"?i.ReadOnlyRoot[1]:null})),auxiliaryDataDigest:t.auxDataDigest}}var jU=class extends Error{},Qie=class extends jU{constructor(e,t){super(e,{cause:t?.cause}),this.executionError=t?.executionError}},VD=class Lo extends jU{constructor(t,n){super(n),this.code=t}static fromResponse(t,n){switch(t.code){case"notExists":return new Lo(t.code,`Object ${t.object_id} does not exist`);case"dynamicFieldNotFound":return new Lo(t.code,`Dynamic field not found for object ${t.parent_object_id}`);case"deleted":return new Lo(t.code,`Object ${t.object_id} has been deleted`);case"displayError":return new Lo(t.code,`Display error: ${t.error}`);default:return new Lo(t.code,`Unknown error while loading object${n?` ${n}`:""}`)}}};BigInt(1e9);const Jie="0x0000000000000000000000000000000000000000000000000000000000000002",FD=`${Jie}::sui::SUI`;function Fs(e){let t=typeof e;if(t=="object"){if(Array.isArray(e))return"array";if(e===null)return"null"}return t}function AU(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}let Ga="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),em=[];for(let e=0;e<Ga.length;e++)em[Ga[e].charCodeAt(0)]=e;em[45]=Ga.indexOf("+");em[95]=Ga.indexOf("/");function Zie(e){let t=e.length*3/4;e[e.length-2]=="="?t-=2:e[e.length-1]=="="&&(t-=1);let n=new Uint8Array(t),r=0,i=0,o,l=0;for(let u=0;u<e.length;u++){if(o=em[e.charCodeAt(u)],o===void 0)switch(e[u]){case"=":i=0;case`
|
|
1257
|
+
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:l=o,i=1;break;case 1:n[r++]=l<<2|(o&48)>>4,l=o,i=2;break;case 2:n[r++]=(l&15)<<4|(o&60)>>2,l=o,i=3;break;case 3:n[r++]=(l&3)<<6|o,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)}function ese(e){let t="",n=0,r,i=0;for(let o=0;o<e.length;o++)switch(r=e[o],n){case 0:t+=Ga[r>>2],i=(r&3)<<4,n=1;break;case 1:t+=Ga[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ga[i|r>>6],t+=Ga[r&63],n=0;break}return n&&(t+=Ga[i],t+="=",n==1&&(t+="=")),t}var rp;(function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(n,r,i,o,l)=>{(t(r)?r[e.symbol]:r[e.symbol]=[]).push({no:i,wireType:o,data:l})},e.onWrite=(n,r,i)=>{for(let{no:o,wireType:l,data:u}of e.list(r))i.tag(o,l).raw(u)},e.list=(n,r)=>{if(t(n)){let i=n[e.symbol];return r?i.filter(o=>o.no==r):i}return[]},e.last=(n,r)=>e.list(n,r).slice(-1)[0];const t=n=>n&&Array.isArray(n[e.symbol])})(rp||(rp={}));function que(e,t){return Object.assign(Object.assign({},e),t)}var qt;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(qt||(qt={}));function tse(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<r,(i&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<r,(i&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function Dx(e,t,n){for(let o=0;o<28;o=o+7){const l=e>>>o,u=!(!(l>>>7)&&t==0),f=(u?l|128:l)&255;if(n.push(f),!u)return}const r=e>>>28&15|(t&7)<<4,i=t>>3!=0;if(n.push((i?r|128:r)&255),!!i){for(let o=3;o<31;o=o+7){const l=t>>>o,u=!!(l>>>7),f=(u?l|128:l)&255;if(n.push(f),!u)return}n.push(t>>>31&1)}}const $d=65536*65536;function EU(e){let t=e[0]=="-";t&&(e=e.slice(1));const n=1e6;let r=0,i=0;function o(l,u){const f=Number(e.slice(l,u));i*=n,r=r*n+f,r>=$d&&(i=i+(r/$d|0),r=r%$d)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,r,i]}function OS(e,t){if(t>>>0<=2097151)return""+($d*t+(e>>>0));let n=e&16777215,r=(e>>>24|t<<8)>>>0&16777215,i=t>>16&65535,o=n+r*6777216+i*6710656,l=r+i*8147497,u=i*2,f=1e7;o>=f&&(l+=Math.floor(o/f),o%=f),l>=f&&(u+=Math.floor(l/f),l%=f);function h(y,m){let g=y?String(y):"";return m?"0000000".slice(g.length)+g:g}return h(u,0)+h(l,u)+h(o,1)}function GD(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function nse(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}let vt;function rse(){const e=new DataView(new ArrayBuffer(8));vt=globalThis.BigInt!==void 0&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}rse();function _U(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const NU=/^-?[0-9]+$/,ap=4294967296,Id=2147483648;class kU{constructor(t,n){this.lo=t|0,this.hi=n|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let t=this.hi*ap+(this.lo>>>0);if(!Number.isSafeInteger(t))throw new Error("cannot convert to safe number");return t}}class kn extends kU{static from(t){if(vt)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=vt.C(t);case"number":if(t===0)return this.ZERO;t=vt.C(t);case"bigint":if(!t)return this.ZERO;if(t<vt.UMIN)throw new Error("signed value for ulong");if(t>vt.UMAX)throw new Error("ulong too large");return vt.V.setBigUint64(0,t,!0),new kn(vt.V.getInt32(0,!0),vt.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!NU.test(t))throw new Error("string is no integer");let[n,r,i]=EU(t);if(n)throw new Error("signed value for ulong");return new kn(r,i);case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");if(t<0)throw new Error("signed value for ulong");return new kn(t,t/ap)}throw new Error("unknown value "+typeof t)}toString(){return vt?this.toBigInt().toString():OS(this.lo,this.hi)}toBigInt(){return _U(vt),vt.V.setInt32(0,this.lo,!0),vt.V.setInt32(4,this.hi,!0),vt.V.getBigUint64(0,!0)}}kn.ZERO=new kn(0,0);class pt extends kU{static from(t){if(vt)switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=="")throw new Error("string is no integer");t=vt.C(t);case"number":if(t===0)return this.ZERO;t=vt.C(t);case"bigint":if(!t)return this.ZERO;if(t<vt.MIN)throw new Error("signed long too small");if(t>vt.MAX)throw new Error("signed long too large");return vt.V.setBigInt64(0,t,!0),new pt(vt.V.getInt32(0,!0),vt.V.getInt32(4,!0))}else switch(typeof t){case"string":if(t=="0")return this.ZERO;if(t=t.trim(),!NU.test(t))throw new Error("string is no integer");let[n,r,i]=EU(t);if(n){if(i>Id||i==Id&&r!=0)throw new Error("signed long too small")}else if(i>=Id)throw new Error("signed long too large");let o=new pt(r,i);return n?o.negate():o;case"number":if(t==0)return this.ZERO;if(!Number.isSafeInteger(t))throw new Error("number is no integer");return t>0?new pt(t,t/ap):new pt(-t,-t/ap).negate()}throw new Error("unknown value "+typeof t)}isNegative(){return(this.hi&Id)!==0}negate(){let t=~this.hi,n=this.lo;return n?n=~n+1:t+=1,new pt(n,t)}toString(){if(vt)return this.toBigInt().toString();if(this.isNegative()){let t=this.negate();return"-"+OS(t.lo,t.hi)}return OS(this.lo,this.hi)}toBigInt(){return _U(vt),vt.V.setInt32(0,this.lo,!0),vt.V.setInt32(4,this.hi,!0),vt.V.getBigInt64(0,!0)}}pt.ZERO=new pt(0,0);const HD={readUnknownField:!0,readerFactory:e=>new ise(e)};function ase(e){return e?Object.assign(Object.assign({},HD),e):HD}class ise{constructor(t,n){this.varint64=tse,this.uint32=nse,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n??new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case qt.Varint:for(;this.buf[this.pos++]&128;);break;case qt.Bit64:this.pos+=4;case qt.Bit32:this.pos+=4;break;case qt.LengthDelimited:let r=this.uint32();this.pos+=r;break;case qt.StartGroup:let i;for(;(i=this.tag()[1])!==qt.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return new pt(...this.varint64())}uint64(){return new kn(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,new pt(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new kn(this.sfixed32(),this.sfixed32())}sfixed64(){return new pt(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}}function tt(e,t){if(!e)throw new Error(t)}function Vue(e,t){throw new Error("Unexpected object: "+e)}const sse=34028234663852886e22,ose=-34028234663852886e22,lse=4294967295,cse=2147483647,use=-2147483648;function Qc(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>cse||e<use)throw new Error("invalid int 32: "+e)}function ip(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>lse||e<0)throw new Error("invalid uint 32: "+e)}function Qw(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>sse||e<ose))throw new Error("invalid float 32: "+e)}const WD={writeUnknownFields:!0,writerFactory:()=>new dse};function fse(e){return e?Object.assign(Object.assign({},WD),e):WD}class dse{constructor(t){this.stack=[],this.textEncoder=t??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let i=0;i<this.chunks.length;i++)t+=this.chunks[i].length;let n=new Uint8Array(t),r=0;for(let i=0;i<this.chunks.length;i++)n.set(this.chunks[i],r),r+=this.chunks[i].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(ip(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Qc(t),GD(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){Qw(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){ip(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Qc(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Qc(t),t=(t<<1^t>>31)>>>0,GD(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=pt.from(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=kn.from(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=pt.from(t);return Dx(n.lo,n.hi,this.buf),this}sint64(t){let n=pt.from(t),r=n.hi>>31,i=n.lo<<1^r,o=(n.hi<<1|n.lo>>>31)^r;return Dx(i,o,this.buf),this}uint64(t){let n=kn.from(t);return Dx(n.lo,n.hi,this.buf),this}}const YD={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},XD={ignoreUnknownFields:!1};function hse(e){return e?Object.assign(Object.assign({},XD),e):XD}function pse(e){return e?Object.assign(Object.assign({},YD),e):YD}function Fue(e,t){var n,r;let i=Object.assign(Object.assign({},e),t);return i.typeRegistry=[...(n=e?.typeRegistry)!==null&&n!==void 0?n:[],...(r=t?.typeRegistry)!==null&&r!==void 0?r:[]],i}const CU=Symbol.for("protobuf-ts/message-type");function KD(e){let t=!1;const n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);i=="_"?t=!0:/\d/.test(i)?(n.push(i),t=!0):t?(n.push(i.toUpperCase()),t=!1):r==0?n.push(i.toLowerCase()):n.push(i)}return n.join("")}var le;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(le||(le={}));var ha;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING",e[e.NUMBER=2]="NUMBER"})(ha||(ha={}));var sp;(function(e){e[e.NO=0]="NO",e[e.PACKED=1]="PACKED",e[e.UNPACKED=2]="UNPACKED"})(sp||(sp={}));function mse(e){var t,n,r,i;return e.localName=(t=e.localName)!==null&&t!==void 0?t:KD(e.name),e.jsonName=(n=e.jsonName)!==null&&n!==void 0?n:KD(e.name),e.repeat=(r=e.repeat)!==null&&r!==void 0?r:sp.NO,e.opt=(i=e.opt)!==null&&i!==void 0?i:e.repeat||e.oneof?!1:e.kind=="message",e}function yse(e){if(typeof e!="object"||e===null||!e.hasOwnProperty("oneofKind"))return!1;switch(typeof e.oneofKind){case"string":return e[e.oneofKind]===void 0?!1:Object.keys(e).length==2;case"undefined":return Object.keys(e).length==1;default:return!1}}class vse{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}prepare(){if(this.data)return;const t=[],n=[],r=[];for(let i of this.fields)if(i.oneof)r.includes(i.oneof)||(r.push(i.oneof),t.push(i.oneof),n.push(i.oneof));else switch(n.push(i.localName),i.kind){case"scalar":case"enum":(!i.opt||i.repeat)&&t.push(i.localName);break;case"message":i.repeat&&t.push(i.localName);break;case"map":t.push(i.localName);break}this.data={req:t,known:n,oneofs:Object.values(r)}}is(t,n,r=!1){if(n<0)return!0;if(t==null||typeof t!="object")return!1;this.prepare();let i=Object.keys(t),o=this.data;if(i.length<o.req.length||o.req.some(l=>!i.includes(l))||!r&&i.some(l=>!o.known.includes(l)))return!1;if(n<1)return!0;for(const l of o.oneofs){const u=t[l];if(!yse(u))return!1;if(u.oneofKind===void 0)continue;const f=this.fields.find(h=>h.localName===u.oneofKind);if(!f||!this.field(u[u.oneofKind],f,r,n))return!1}for(const l of this.fields)if(l.oneof===void 0&&!this.field(t[l.localName],l,r,n))return!1;return!0}field(t,n,r,i){let o=n.repeat;switch(n.kind){case"scalar":return t===void 0?n.opt:o?this.scalars(t,n.T,i,n.L):this.scalar(t,n.T,n.L);case"enum":return t===void 0?n.opt:o?this.scalars(t,le.INT32,i):this.scalar(t,le.INT32);case"message":return t===void 0?!0:o?this.messages(t,n.T(),r,i):this.message(t,n.T(),r,i);case"map":if(typeof t!="object"||t===null)return!1;if(i<2)return!0;if(!this.mapKeys(t,n.K,i))return!1;switch(n.V.kind){case"scalar":return this.scalars(Object.values(t),n.V.T,i,n.V.L);case"enum":return this.scalars(Object.values(t),le.INT32,i);case"message":return this.messages(Object.values(t),n.V.T(),r,i)}break}return!0}message(t,n,r,i){return r?n.isAssignable(t,i):n.is(t,i)}messages(t,n,r,i){if(!Array.isArray(t))return!1;if(i<2)return!0;if(r){for(let o=0;o<t.length&&o<i;o++)if(!n.isAssignable(t[o],i-1))return!1}else for(let o=0;o<t.length&&o<i;o++)if(!n.is(t[o],i-1))return!1;return!0}scalar(t,n,r){let i=typeof t;switch(n){case le.UINT64:case le.FIXED64:case le.INT64:case le.SFIXED64:case le.SINT64:switch(r){case ha.BIGINT:return i=="bigint";case ha.NUMBER:return i=="number"&&!isNaN(t);default:return i=="string"}case le.BOOL:return i=="boolean";case le.STRING:return i=="string";case le.BYTES:return t instanceof Uint8Array;case le.DOUBLE:case le.FLOAT:return i=="number"&&!isNaN(t);default:return i=="number"&&Number.isInteger(t)}}scalars(t,n,r,i){if(!Array.isArray(t))return!1;if(r<2)return!0;if(Array.isArray(t)){for(let o=0;o<t.length&&o<r;o++)if(!this.scalar(t[o],n,i))return!1}return!0}mapKeys(t,n,r){let i=Object.keys(t);switch(n){case le.INT32:case le.FIXED32:case le.SFIXED32:case le.SINT32:case le.UINT32:return this.scalars(i.slice(0,r).map(o=>parseInt(o)),n,r);case le.BOOL:return this.scalars(i.slice(0,r).map(o=>o=="true"?!0:o=="false"?!1:o),n,r);default:return this.scalars(i,n,r,ha.STRING)}}}function Xr(e,t){switch(t){case ha.BIGINT:return e.toBigInt();case ha.NUMBER:return e.toNumber();default:return e.toString()}}class gse{constructor(t){this.info=t}prepare(){var t;if(this.fMap===void 0){this.fMap={};const n=(t=this.info.fields)!==null&&t!==void 0?t:[];for(const r of n)this.fMap[r.name]=r,this.fMap[r.jsonName]=r,this.fMap[r.localName]=r}}assert(t,n,r){if(!t){let i=Fs(r);throw(i=="number"||i=="boolean")&&(i=r.toString()),new Error(`Cannot parse JSON ${i} for ${this.info.typeName}#${n}`)}}read(t,n,r){this.prepare();const i=[];for(const[o,l]of Object.entries(t)){const u=this.fMap[o];if(!u){if(!r.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}const f=u.localName;let h;if(u.oneof){if(l===null&&(u.kind!=="enum"||u.T()[0]!=="google.protobuf.NullValue"))continue;if(i.includes(u.oneof))throw new Error(`Multiple members of the oneof group "${u.oneof}" of ${this.info.typeName} are present in JSON.`);i.push(u.oneof),h=n[u.oneof]={oneofKind:f}}else h=n;if(u.kind=="map"){if(l===null)continue;this.assert(AU(l),u.name,l);const y=h[f];for(const[m,g]of Object.entries(l)){this.assert(g!==null,u.name+" map value",null);let S;switch(u.V.kind){case"message":S=u.V.T().internalJsonRead(g,r);break;case"enum":if(S=this.enum(u.V.T(),g,u.name,r.ignoreUnknownFields),S===!1)continue;break;case"scalar":S=this.scalar(g,u.V.T,u.V.L,u.name);break}this.assert(S!==void 0,u.name+" map value",g);let T=m;u.K==le.BOOL&&(T=T=="true"?!0:T=="false"?!1:T),T=this.scalar(T,u.K,ha.STRING,u.name).toString(),y[T]=S}}else if(u.repeat){if(l===null)continue;this.assert(Array.isArray(l),u.name,l);const y=h[f];for(const m of l){this.assert(m!==null,u.name,null);let g;switch(u.kind){case"message":g=u.T().internalJsonRead(m,r);break;case"enum":if(g=this.enum(u.T(),m,u.name,r.ignoreUnknownFields),g===!1)continue;break;case"scalar":g=this.scalar(m,u.T,u.L,u.name);break}this.assert(g!==void 0,u.name,l),y.push(g)}}else switch(u.kind){case"message":if(l===null&&u.T().typeName!="google.protobuf.Value"){this.assert(u.oneof===void 0,u.name+" (oneof member)",null);continue}h[f]=u.T().internalJsonRead(l,r,h[f]);break;case"enum":if(l===null)continue;let y=this.enum(u.T(),l,u.name,r.ignoreUnknownFields);if(y===!1)continue;h[f]=y;break;case"scalar":if(l===null)continue;h[f]=this.scalar(l,u.T,u.L,u.name);break}}}enum(t,n,r,i){if(t[0]=="google.protobuf.NullValue"&&tt(n===null||n==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${r}, enum ${t[0]} only accepts null.`),n===null)return 0;switch(typeof n){case"number":return tt(Number.isInteger(n),`Unable to parse field ${this.info.typeName}#${r}, enum can only be integral number, got ${n}.`),n;case"string":let o=n;t[2]&&n.substring(0,t[2].length)===t[2]&&(o=n.substring(t[2].length));let l=t[1][o];return typeof l>"u"&&i?!1:(tt(typeof l=="number",`Unable to parse field ${this.info.typeName}#${r}, enum ${t[0]} has no value for "${n}".`),l)}tt(!1,`Unable to parse field ${this.info.typeName}#${r}, cannot parse enum value from ${typeof n}".`)}scalar(t,n,r,i){let o;try{switch(n){case le.DOUBLE:case le.FLOAT:if(t===null)return 0;if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""){o="empty string";break}if(typeof t=="string"&&t.trim().length!==t.length){o="extra whitespace";break}if(typeof t!="string"&&typeof t!="number")break;let l=Number(t);if(Number.isNaN(l)){o="not a number";break}if(!Number.isFinite(l)){o="too large or small";break}return n==le.FLOAT&&Qw(l),l;case le.INT32:case le.FIXED32:case le.SFIXED32:case le.SINT32:case le.UINT32:if(t===null)return 0;let u;if(typeof t=="number"?u=t:t===""?o="empty string":typeof t=="string"&&(t.trim().length!==t.length?o="extra whitespace":u=Number(t)),u===void 0)break;return n==le.UINT32?ip(u):Qc(u),u;case le.INT64:case le.SFIXED64:case le.SINT64:if(t===null)return Xr(pt.ZERO,r);if(typeof t!="number"&&typeof t!="string")break;return Xr(pt.from(t),r);case le.FIXED64:case le.UINT64:if(t===null)return Xr(kn.ZERO,r);if(typeof t!="number"&&typeof t!="string")break;return Xr(kn.from(t),r);case le.BOOL:if(t===null)return!1;if(typeof t!="boolean")break;return t;case le.STRING:if(t===null)return"";if(typeof t!="string"){o="extra whitespace";break}try{encodeURIComponent(t)}catch(f){f="invalid UTF8";break}return t;case le.BYTES:if(t===null||t==="")return new Uint8Array(0);if(typeof t!="string")break;return Zie(t)}}catch(l){o=l.message}this.assert(!1,i+(o?" - "+o:""),t)}}class bse{constructor(t){var n;this.fields=(n=t.fields)!==null&&n!==void 0?n:[]}write(t,n){const r={},i=t;for(const o of this.fields){if(!o.oneof){let h=this.field(o,i[o.localName],n);h!==void 0&&(r[n.useProtoFieldName?o.name:o.jsonName]=h);continue}const l=i[o.oneof];if(l.oneofKind!==o.localName)continue;const u=o.kind=="scalar"||o.kind=="enum"?Object.assign(Object.assign({},n),{emitDefaultValues:!0}):n;let f=this.field(o,l[o.localName],u);tt(f!==void 0),r[n.useProtoFieldName?o.name:o.jsonName]=f}return r}field(t,n,r){let i;if(t.kind=="map"){tt(typeof n=="object"&&n!==null);const o={};switch(t.V.kind){case"scalar":for(const[f,h]of Object.entries(n)){const y=this.scalar(t.V.T,h,t.name,!1,!0);tt(y!==void 0),o[f.toString()]=y}break;case"message":const l=t.V.T();for(const[f,h]of Object.entries(n)){const y=this.message(l,h,t.name,r);tt(y!==void 0),o[f.toString()]=y}break;case"enum":const u=t.V.T();for(const[f,h]of Object.entries(n)){tt(h===void 0||typeof h=="number");const y=this.enum(u,h,t.name,!1,!0,r.enumAsInteger);tt(y!==void 0),o[f.toString()]=y}break}(r.emitDefaultValues||Object.keys(o).length>0)&&(i=o)}else if(t.repeat){tt(Array.isArray(n));const o=[];switch(t.kind){case"scalar":for(let f=0;f<n.length;f++){const h=this.scalar(t.T,n[f],t.name,t.opt,!0);tt(h!==void 0),o.push(h)}break;case"enum":const l=t.T();for(let f=0;f<n.length;f++){tt(n[f]===void 0||typeof n[f]=="number");const h=this.enum(l,n[f],t.name,t.opt,!0,r.enumAsInteger);tt(h!==void 0),o.push(h)}break;case"message":const u=t.T();for(let f=0;f<n.length;f++){const h=this.message(u,n[f],t.name,r);tt(h!==void 0),o.push(h)}break}(r.emitDefaultValues||o.length>0||r.emitDefaultValues)&&(i=o)}else switch(t.kind){case"scalar":i=this.scalar(t.T,n,t.name,t.opt,r.emitDefaultValues);break;case"enum":i=this.enum(t.T(),n,t.name,t.opt,r.emitDefaultValues,r.enumAsInteger);break;case"message":i=this.message(t.T(),n,t.name,r);break}return i}enum(t,n,r,i,o,l){if(t[0]=="google.protobuf.NullValue")return!o&&!i?void 0:null;if(n===void 0){tt(i);return}if(!(n===0&&!o&&!i))return tt(typeof n=="number"),tt(Number.isInteger(n)),l||!t[1].hasOwnProperty(n)?n:t[2]?t[2]+t[1][n]:t[1][n]}message(t,n,r,i){return n===void 0?i.emitDefaultValues?null:void 0:t.internalJsonWrite(n,i)}scalar(t,n,r,i,o){if(n===void 0){tt(i);return}const l=o||i;switch(t){case le.INT32:case le.SFIXED32:case le.SINT32:return n===0?l?0:void 0:(Qc(n),n);case le.FIXED32:case le.UINT32:return n===0?l?0:void 0:(ip(n),n);case le.FLOAT:Qw(n);case le.DOUBLE:return n===0?l?0:void 0:(tt(typeof n=="number"),Number.isNaN(n)?"NaN":n===Number.POSITIVE_INFINITY?"Infinity":n===Number.NEGATIVE_INFINITY?"-Infinity":n);case le.STRING:return n===""?l?"":void 0:(tt(typeof n=="string"),n);case le.BOOL:return n===!1?l?!1:void 0:(tt(typeof n=="boolean"),n);case le.UINT64:case le.FIXED64:tt(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let u=kn.from(n);return u.isZero()&&!l?void 0:u.toString();case le.INT64:case le.SFIXED64:case le.SINT64:tt(typeof n=="number"||typeof n=="string"||typeof n=="bigint");let f=pt.from(n);return f.isZero()&&!l?void 0:f.toString();case le.BYTES:return tt(n instanceof Uint8Array),n.byteLength?ese(n):l?"":void 0}}}function jS(e,t=ha.STRING){switch(e){case le.BOOL:return!1;case le.UINT64:case le.FIXED64:return Xr(kn.ZERO,t);case le.INT64:case le.SFIXED64:case le.SINT64:return Xr(pt.ZERO,t);case le.DOUBLE:case le.FLOAT:return 0;case le.BYTES:return new Uint8Array(0);case le.STRING:return"";default:return 0}}class xse{constructor(t){this.info=t}prepare(){var t;if(!this.fieldNoToField){const n=(t=this.info.fields)!==null&&t!==void 0?t:[];this.fieldNoToField=new Map(n.map(r=>[r.no,r]))}}read(t,n,r,i){this.prepare();const o=i===void 0?t.len:t.pos+i;for(;t.pos<o;){const[l,u]=t.tag(),f=this.fieldNoToField.get(l);if(!f){let g=r.readUnknownField;if(g=="throw")throw new Error(`Unknown field ${l} (wire type ${u}) for ${this.info.typeName}`);let S=t.skip(u);g!==!1&&(g===!0?rp.onRead:g)(this.info.typeName,n,l,u,S);continue}let h=n,y=f.repeat,m=f.localName;switch(f.oneof&&(h=h[f.oneof],h.oneofKind!==m&&(h=n[f.oneof]={oneofKind:m})),f.kind){case"scalar":case"enum":let g=f.kind=="enum"?le.INT32:f.T,S=f.kind=="scalar"?f.L:void 0;if(y){let x=h[m];if(u==qt.LengthDelimited&&g!=le.STRING&&g!=le.BYTES){let O=t.uint32()+t.pos;for(;t.pos<O;)x.push(this.scalar(t,g,S))}else x.push(this.scalar(t,g,S))}else h[m]=this.scalar(t,g,S);break;case"message":if(y){let x=h[m],O=f.T().internalBinaryRead(t,t.uint32(),r);x.push(O)}else h[m]=f.T().internalBinaryRead(t,t.uint32(),r,h[m]);break;case"map":let[T,w]=this.mapEntry(f,t,r);h[m][T]=w;break}}}mapEntry(t,n,r){let i=n.uint32(),o=n.pos+i,l,u;for(;n.pos<o;){let[f,h]=n.tag();switch(f){case 1:t.K==le.BOOL?l=n.bool().toString():l=this.scalar(n,t.K,ha.STRING);break;case 2:switch(t.V.kind){case"scalar":u=this.scalar(n,t.V.T,t.V.L);break;case"enum":u=n.int32();break;case"message":u=t.V.T().internalBinaryRead(n,n.uint32(),r);break}break;default:throw new Error(`Unknown field ${f} (wire type ${h}) in map entry for ${this.info.typeName}#${t.name}`)}}if(l===void 0){let f=jS(t.K);l=t.K==le.BOOL?f.toString():f}if(u===void 0)switch(t.V.kind){case"scalar":u=jS(t.V.T,t.V.L);break;case"enum":u=0;break;case"message":u=t.V.T().create();break}return[l,u]}scalar(t,n,r){switch(n){case le.INT32:return t.int32();case le.STRING:return t.string();case le.BOOL:return t.bool();case le.DOUBLE:return t.double();case le.FLOAT:return t.float();case le.INT64:return Xr(t.int64(),r);case le.UINT64:return Xr(t.uint64(),r);case le.FIXED64:return Xr(t.fixed64(),r);case le.FIXED32:return t.fixed32();case le.BYTES:return t.bytes();case le.UINT32:return t.uint32();case le.SFIXED32:return t.sfixed32();case le.SFIXED64:return Xr(t.sfixed64(),r);case le.SINT32:return t.sint32();case le.SINT64:return Xr(t.sint64(),r)}}}class Sse{constructor(t){this.info=t}prepare(){if(!this.fields){const t=this.info.fields?this.info.fields.concat():[];this.fields=t.sort((n,r)=>n.no-r.no)}}write(t,n,r){this.prepare();for(const o of this.fields){let l,u,f=o.repeat,h=o.localName;if(o.oneof){const y=t[o.oneof];if(y.oneofKind!==h)continue;l=y[h],u=!0}else l=t[h],u=!1;switch(o.kind){case"scalar":case"enum":let y=o.kind=="enum"?le.INT32:o.T;if(f)if(tt(Array.isArray(l)),f==sp.PACKED)this.packed(n,y,o.no,l);else for(const m of l)this.scalar(n,y,o.no,m,!0);else l===void 0?tt(o.opt):this.scalar(n,y,o.no,l,u||o.opt);break;case"message":if(f){tt(Array.isArray(l));for(const m of l)this.message(n,r,o.T(),o.no,m)}else this.message(n,r,o.T(),o.no,l);break;case"map":tt(typeof l=="object"&&l!==null);for(const[m,g]of Object.entries(l))this.mapEntry(n,r,o,m,g);break}}let i=r.writeUnknownFields;i!==!1&&(i===!0?rp.onWrite:i)(this.info.typeName,t,n)}mapEntry(t,n,r,i,o){t.tag(r.no,qt.LengthDelimited),t.fork();let l=i;switch(r.K){case le.INT32:case le.FIXED32:case le.UINT32:case le.SFIXED32:case le.SINT32:l=Number.parseInt(i);break;case le.BOOL:tt(i=="true"||i=="false"),l=i=="true";break}switch(this.scalar(t,r.K,1,l,!0),r.V.kind){case"scalar":this.scalar(t,r.V.T,2,o,!0);break;case"enum":this.scalar(t,le.INT32,2,o,!0);break;case"message":this.message(t,n,r.V.T(),2,o);break}t.join()}message(t,n,r,i,o){o!==void 0&&(r.internalBinaryWrite(o,t.tag(i,qt.LengthDelimited).fork(),n),t.join())}scalar(t,n,r,i,o){let[l,u,f]=this.scalarInfo(n,i);(!f||o)&&(t.tag(r,l),t[u](i))}packed(t,n,r,i){if(!i.length)return;tt(n!==le.BYTES&&n!==le.STRING),t.tag(r,qt.LengthDelimited),t.fork();let[,o]=this.scalarInfo(n);for(let l=0;l<i.length;l++)t[o](i[l]);t.join()}scalarInfo(t,n){let r=qt.Varint,i,o=n===void 0,l=n===0;switch(t){case le.INT32:i="int32";break;case le.STRING:l=o||!n.length,r=qt.LengthDelimited,i="string";break;case le.BOOL:l=n===!1,i="bool";break;case le.UINT32:i="uint32";break;case le.DOUBLE:r=qt.Bit64,i="double";break;case le.FLOAT:r=qt.Bit32,i="float";break;case le.INT64:l=o||pt.from(n).isZero(),i="int64";break;case le.UINT64:l=o||kn.from(n).isZero(),i="uint64";break;case le.FIXED64:l=o||kn.from(n).isZero(),r=qt.Bit64,i="fixed64";break;case le.BYTES:l=o||!n.byteLength,r=qt.LengthDelimited,i="bytes";break;case le.FIXED32:r=qt.Bit32,i="fixed32";break;case le.SFIXED32:r=qt.Bit32,i="sfixed32";break;case le.SFIXED64:l=o||pt.from(n).isZero(),r=qt.Bit64,i="sfixed64";break;case le.SINT32:i="sint32";break;case le.SINT64:l=o||pt.from(n).isZero(),i="sint64";break}return[r,i,o||l]}}function wse(e){const t=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},CU,{value:e});for(let n of e.fields){let r=n.localName;if(!n.opt)if(n.oneof)t[n.oneof]={oneofKind:void 0};else if(n.repeat)t[r]=[];else switch(n.kind){case"scalar":t[r]=jS(n.T,n.L);break;case"enum":t[r]=0;break;case"map":t[r]={};break}}return t}function Rx(e,t,n){let r,i=n,o;for(let l of e.fields){let u=l.localName;if(l.oneof){const f=i[l.oneof];if(f?.oneofKind==null)continue;if(r=f[u],o=t[l.oneof],o.oneofKind=f.oneofKind,r==null){delete o[u];continue}}else if(r=i[u],o=t,r==null)continue;switch(l.repeat&&(o[u].length=r.length),l.kind){case"scalar":case"enum":if(l.repeat)for(let h=0;h<r.length;h++)o[u][h]=r[h];else o[u]=r;break;case"message":let f=l.T();if(l.repeat)for(let h=0;h<r.length;h++)o[u][h]=f.create(r[h]);else o[u]===void 0?o[u]=f.create(r):f.mergePartial(o[u],r);break;case"map":switch(l.V.kind){case"scalar":case"enum":Object.assign(o[u],r);break;case"message":let h=l.V.T();for(let y of Object.keys(r))o[u][y]=h.create(r[y]);break}break}}}function Tse(e,t,n){if(t===n)return!0;if(!t||!n)return!1;for(let r of e.fields){let i=r.localName,o=r.oneof?t[r.oneof][i]:t[i],l=r.oneof?n[r.oneof][i]:n[i];switch(r.kind){case"enum":case"scalar":let u=r.kind=="enum"?le.INT32:r.T;if(!(r.repeat?QD(u,o,l):MU(u,o,l)))return!1;break;case"map":if(!(r.V.kind=="message"?JD(r.V.T(),Pd(o),Pd(l)):QD(r.V.kind=="enum"?le.INT32:r.V.T,Pd(o),Pd(l))))return!1;break;case"message":let f=r.T();if(!(r.repeat?JD(f,o,l):f.equals(o,l)))return!1;break}}return!0}const Pd=Object.values;function MU(e,t,n){if(t===n)return!0;if(e!==le.BYTES)return!1;let r=t,i=n;if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!=i[o])return!1;return!0}function QD(e,t,n){if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!MU(e,t[r],n[r]))return!1;return!0}function JD(e,t,n){if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e.equals(t[r],n[r]))return!1;return!0}const DU=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),Ose=DU[CU]={};class me{constructor(t,n,r){this.defaultCheckDepth=16,this.typeName=t,this.fields=n.map(mse),this.options=r??{},Ose.value=this,this.messagePrototype=Object.create(null,DU),this.refTypeCheck=new vse(this),this.refJsonReader=new gse(this),this.refJsonWriter=new bse(this),this.refBinReader=new xse(this),this.refBinWriter=new Sse(this)}create(t){let n=wse(this);return t!==void 0&&Rx(this,n,t),n}clone(t){let n=this.create();return Rx(this,n,t),n}equals(t,n){return Tse(this,t,n)}is(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!1)}isAssignable(t,n=this.defaultCheckDepth){return this.refTypeCheck.is(t,n,!0)}mergePartial(t,n){Rx(this,t,n)}fromBinary(t,n){let r=ase(n);return this.internalBinaryRead(r.readerFactory(t),t.byteLength,r)}fromJson(t,n){return this.internalJsonRead(t,hse(n))}fromJsonString(t,n){let r=JSON.parse(t);return this.fromJson(r,n)}toJson(t,n){return this.internalJsonWrite(t,pse(n))}toJsonString(t,n){var r;let i=this.toJson(t,n);return JSON.stringify(i,null,(r=n?.prettySpaces)!==null&&r!==void 0?r:0)}toBinary(t,n){let r=fse(n);return this.internalBinaryWrite(t,r.writerFactory(),r).finish()}internalJsonRead(t,n,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let i=r??this.create();return this.refJsonReader.read(t,i,n),i}throw new Error(`Unable to parse message ${this.typeName} from JSON ${Fs(t)}.`)}internalJsonWrite(t,n){return this.refJsonWriter.write(t,n)}internalBinaryWrite(t,n,r){return this.refBinWriter.write(t,n,r),n}internalBinaryRead(t,n,r,i){let o=i??this.create();return this.refBinReader.read(t,o,r,n),o}}var jse=class extends me{constructor(){super("google.protobuf.Duration",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}internalJsonWrite(e,t){let n=pt.from(e.seconds).toNumber();if(n>315576e6||n<-315576e6)throw new Error("Duration value out of range.");let r=e.seconds.toString();if(n===0&&e.nanos<0&&(r="-"+r),e.nanos!==0){let i=Math.abs(e.nanos).toString();i="0".repeat(9-i.length)+i,i.substring(3)==="000000"?i=i.substring(0,3):i.substring(6)==="000"&&(i=i.substring(0,6)),r+="."+i}return r+"s"}internalJsonRead(e,t,n){if(typeof e!="string")throw new Error("Unable to parse Duration from JSON "+Fs(e)+". Expected string.");let r=e.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/);if(r===null)throw new Error("Unable to parse Duration from JSON string. Invalid format.");n||(n=this.create());let[,i,o,l]=r,u=pt.from(i+o);if(u.toNumber()>315576e6||u.toNumber()<-315576e6)throw new Error("Unable to parse Duration from JSON string. Value out of range.");if(n.seconds=u.toBigInt(),typeof l=="string"){let f=i+l+"0".repeat(9-l.length);n.nanos=parseInt(f)}return n}};const Ase=new jse;var Ese=class extends me{constructor(){super("sui.rpc.v2.JwkId",[{no:1,name:"iss",kind:"scalar",opt:!0,T:9},{no:2,name:"kid",kind:"scalar",opt:!0,T:9}])}};const _se=new Ese;var Nse=class extends me{constructor(){super("sui.rpc.v2.Jwk",[{no:1,name:"kty",kind:"scalar",opt:!0,T:9},{no:2,name:"e",kind:"scalar",opt:!0,T:9},{no:3,name:"n",kind:"scalar",opt:!0,T:9},{no:4,name:"alg",kind:"scalar",opt:!0,T:9}])}};const kse=new Nse;var Cse=class extends me{constructor(){super("sui.rpc.v2.Bcs",[{no:1,name:"name",kind:"scalar",opt:!0,T:9},{no:2,name:"value",kind:"scalar",opt:!0,T:12}])}};const op=new Cse;let ZD=(function(e){return e[e.NULL_VALUE=0]="NULL_VALUE",e})({});var Mse=class extends me{constructor(){super("google.protobuf.Struct",[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:()=>pa}}])}internalJsonWrite(e,t){let n={};for(let[r,i]of Object.entries(e.fields))n[r]=pa.toJson(i);return n}internalJsonRead(e,t,n){if(!AU(e))throw new globalThis.Error("Unable to parse message "+this.typeName+" from JSON "+Fs(e)+".");n||(n=this.create());for(let[r,i]of globalThis.Object.entries(e))n.fields[r]=pa.fromJson(i);return n}};const eR=new Mse;var Dse=class extends me{constructor(){super("google.protobuf.Value",[{no:1,name:"null_value",kind:"enum",oneof:"kind",T:()=>["google.protobuf.NullValue",ZD]},{no:2,name:"number_value",kind:"scalar",oneof:"kind",T:1},{no:3,name:"string_value",kind:"scalar",oneof:"kind",T:9},{no:4,name:"bool_value",kind:"scalar",oneof:"kind",T:8},{no:5,name:"struct_value",kind:"message",oneof:"kind",T:()=>eR},{no:6,name:"list_value",kind:"message",oneof:"kind",T:()=>tR}])}internalJsonWrite(e,t){if(e.kind.oneofKind===void 0)throw new globalThis.Error;switch(e.kind.oneofKind){case void 0:throw new globalThis.Error;case"boolValue":return e.kind.boolValue;case"nullValue":return null;case"numberValue":let n=e.kind.numberValue;if(typeof n=="number"&&!Number.isFinite(n))throw new globalThis.Error;return n;case"stringValue":return e.kind.stringValue;case"listValue":let r=this.fields.find(o=>o.no===6);if(r?.kind!=="message")throw new globalThis.Error;return r.T().toJson(e.kind.listValue);case"structValue":let i=this.fields.find(o=>o.no===5);if(i?.kind!=="message")throw new globalThis.Error;return i.T().toJson(e.kind.structValue)}}internalJsonRead(e,t,n){switch(n||(n=this.create()),typeof e){case"number":n.kind={oneofKind:"numberValue",numberValue:e};break;case"string":n.kind={oneofKind:"stringValue",stringValue:e};break;case"boolean":n.kind={oneofKind:"boolValue",boolValue:e};break;case"object":e===null?n.kind={oneofKind:"nullValue",nullValue:ZD.NULL_VALUE}:globalThis.Array.isArray(e)?n.kind={oneofKind:"listValue",listValue:tR.fromJson(e)}:n.kind={oneofKind:"structValue",structValue:eR.fromJson(e)};break;default:throw new globalThis.Error("Unable to parse "+this.typeName+" from JSON "+Fs(e))}return n}};const pa=new Dse;var Rse=class extends me{constructor(){super("google.protobuf.ListValue",[{no:1,name:"values",kind:"message",repeat:2,T:()=>pa}])}internalJsonWrite(e,t){return e.values.map(n=>pa.toJson(n))}internalJsonRead(e,t,n){if(!globalThis.Array.isArray(e))throw new globalThis.Error("Unable to parse "+this.typeName+" from JSON "+Fs(e));n||(n=this.create());let r=e.map(i=>pa.fromJson(i));return n.values.push(...r),n}};const tR=new Rse;let Ise=(function(e){return e[e.DATATYPE_KIND_UNKNOWN=0]="DATATYPE_KIND_UNKNOWN",e[e.STRUCT=1]="STRUCT",e[e.ENUM=2]="ENUM",e})({}),Pse=(function(e){return e[e.TYPE_UNKNOWN=0]="TYPE_UNKNOWN",e[e.ADDRESS=1]="ADDRESS",e[e.BOOL=2]="BOOL",e[e.U8=3]="U8",e[e.U16=4]="U16",e[e.U32=5]="U32",e[e.U64=6]="U64",e[e.U128=7]="U128",e[e.U256=8]="U256",e[e.VECTOR=9]="VECTOR",e[e.DATATYPE=10]="DATATYPE",e[e.TYPE_PARAMETER=11]="TYPE_PARAMETER",e})({}),Bse=(function(e){return e[e.VISIBILITY_UNKNOWN=0]="VISIBILITY_UNKNOWN",e[e.PRIVATE=1]="PRIVATE",e[e.PUBLIC=2]="PUBLIC",e[e.FRIEND=3]="FRIEND",e})({}),Use=(function(e){return e[e.REFERENCE_UNKNOWN=0]="REFERENCE_UNKNOWN",e[e.IMMUTABLE=1]="IMMUTABLE",e[e.MUTABLE=2]="MUTABLE",e})({}),RU=(function(e){return e[e.ABILITY_UNKNOWN=0]="ABILITY_UNKNOWN",e[e.COPY=1]="COPY",e[e.DROP=2]="DROP",e[e.STORE=3]="STORE",e[e.KEY=4]="KEY",e})({});var Lse=class extends me{constructor(){super("sui.rpc.v2.Package",[{no:1,name:"storage_id",kind:"scalar",opt:!0,T:9},{no:2,name:"original_id",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"modules",kind:"message",repeat:2,T:()=>qse},{no:5,name:"type_origins",kind:"message",repeat:2,T:()=>eoe},{no:6,name:"linkage",kind:"message",repeat:2,T:()=>noe}])}};const zse=new Lse;var $se=class extends me{constructor(){super("sui.rpc.v2.Module",[{no:1,name:"name",kind:"scalar",opt:!0,T:9},{no:2,name:"contents",kind:"scalar",opt:!0,T:12},{no:3,name:"datatypes",kind:"message",repeat:2,T:()=>Fse},{no:4,name:"functions",kind:"message",repeat:2,T:()=>Qse}])}};const qse=new $se;var Vse=class extends me{constructor(){super("sui.rpc.v2.DatatypeDescriptor",[{no:1,name:"type_name",kind:"scalar",opt:!0,T:9},{no:2,name:"defining_id",kind:"scalar",opt:!0,T:9},{no:3,name:"module",kind:"scalar",opt:!0,T:9},{no:4,name:"name",kind:"scalar",opt:!0,T:9},{no:5,name:"abilities",kind:"enum",repeat:1,T:()=>["sui.rpc.v2.Ability",RU]},{no:6,name:"type_parameters",kind:"message",repeat:2,T:()=>IU},{no:7,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.DatatypeDescriptor.DatatypeKind",Ise]},{no:8,name:"fields",kind:"message",repeat:2,T:()=>PU},{no:9,name:"variants",kind:"message",repeat:2,T:()=>Yse}])}};const Fse=new Vse;var Gse=class extends me{constructor(){super("sui.rpc.v2.TypeParameter",[{no:1,name:"constraints",kind:"enum",repeat:1,T:()=>["sui.rpc.v2.Ability",RU]},{no:2,name:"is_phantom",kind:"scalar",opt:!0,T:8}])}};const IU=new Gse;var Hse=class extends me{constructor(){super("sui.rpc.v2.FieldDescriptor",[{no:1,name:"name",kind:"scalar",opt:!0,T:9},{no:2,name:"position",kind:"scalar",opt:!0,T:13},{no:3,name:"type",kind:"message",T:()=>Jw}])}};const PU=new Hse;var Wse=class extends me{constructor(){super("sui.rpc.v2.VariantDescriptor",[{no:1,name:"name",kind:"scalar",opt:!0,T:9},{no:2,name:"position",kind:"scalar",opt:!0,T:13},{no:3,name:"fields",kind:"message",repeat:2,T:()=>PU}])}};const Yse=new Wse;var Xse=class extends me{constructor(){super("sui.rpc.v2.OpenSignatureBody",[{no:1,name:"type",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.OpenSignatureBody.Type",Pse]},{no:2,name:"type_name",kind:"scalar",opt:!0,T:9},{no:3,name:"type_parameter_instantiation",kind:"message",repeat:2,T:()=>Jw},{no:4,name:"type_parameter",kind:"scalar",opt:!0,T:13}])}};const Jw=new Xse;var Kse=class extends me{constructor(){super("sui.rpc.v2.FunctionDescriptor",[{no:1,name:"name",kind:"scalar",opt:!0,T:9},{no:5,name:"visibility",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.FunctionDescriptor.Visibility",Bse]},{no:6,name:"is_entry",kind:"scalar",opt:!0,T:8},{no:7,name:"type_parameters",kind:"message",repeat:2,T:()=>IU},{no:8,name:"parameters",kind:"message",repeat:2,T:()=>nR},{no:9,name:"returns",kind:"message",repeat:2,T:()=>nR}])}};const Qse=new Kse;var Jse=class extends me{constructor(){super("sui.rpc.v2.OpenSignature",[{no:1,name:"reference",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.OpenSignature.Reference",Use]},{no:2,name:"body",kind:"message",T:()=>Jw}])}};const nR=new Jse;var Zse=class extends me{constructor(){super("sui.rpc.v2.TypeOrigin",[{no:1,name:"module_name",kind:"scalar",opt:!0,T:9},{no:2,name:"datatype_name",kind:"scalar",opt:!0,T:9},{no:3,name:"package_id",kind:"scalar",opt:!0,T:9}])}};const eoe=new Zse;var toe=class extends me{constructor(){super("sui.rpc.v2.Linkage",[{no:1,name:"original_id",kind:"scalar",opt:!0,T:9},{no:2,name:"upgraded_id",kind:"scalar",opt:!0,T:9},{no:3,name:"upgraded_version",kind:"scalar",opt:!0,T:4,L:0}])}};const noe=new toe;let roe=(function(e){return e[e.OWNER_KIND_UNKNOWN=0]="OWNER_KIND_UNKNOWN",e[e.ADDRESS=1]="ADDRESS",e[e.OBJECT=2]="OBJECT",e[e.SHARED=3]="SHARED",e[e.IMMUTABLE=4]="IMMUTABLE",e[e.CONSENSUS_ADDRESS=5]="CONSENSUS_ADDRESS",e})({});var aoe=class extends me{constructor(){super("sui.rpc.v2.Owner",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.Owner.OwnerKind",roe]},{no:2,name:"address",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:4,L:0}])}};const AS=new aoe;var ioe=class extends me{constructor(){super("sui.rpc.v2.Object",[{no:1,name:"bcs",kind:"message",T:()=>op},{no:2,name:"object_id",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"digest",kind:"scalar",opt:!0,T:9},{no:5,name:"owner",kind:"message",T:()=>AS},{no:6,name:"object_type",kind:"scalar",opt:!0,T:9},{no:7,name:"has_public_transfer",kind:"scalar",opt:!0,T:8},{no:8,name:"contents",kind:"message",T:()=>op},{no:9,name:"package",kind:"message",T:()=>zse},{no:10,name:"previous_transaction",kind:"scalar",opt:!0,T:9},{no:11,name:"storage_rebate",kind:"scalar",opt:!0,T:4,L:0},{no:100,name:"json",kind:"message",T:()=>pa},{no:101,name:"balance",kind:"scalar",opt:!0,T:4,L:0},{no:102,name:"display",kind:"message",T:()=>loe}])}};const BU=new ioe;var soe=class extends me{constructor(){super("sui.rpc.v2.ObjectSet",[{no:1,name:"objects",kind:"message",repeat:2,T:()=>BU}])}};const Gue=new soe;var ooe=class extends me{constructor(){super("sui.rpc.v2.Display",[{no:1,name:"output",kind:"message",T:()=>pa},{no:2,name:"errors",kind:"message",T:()=>pa}])}};const loe=new ooe;let $i=(function(e){return e[e.ARGUMENT_KIND_UNKNOWN=0]="ARGUMENT_KIND_UNKNOWN",e[e.GAS=1]="GAS",e[e.INPUT=2]="INPUT",e[e.RESULT=3]="RESULT",e})({});var coe=class extends me{constructor(){super("sui.rpc.v2.Argument",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.Argument.ArgumentKind",$i]},{no:2,name:"input",kind:"scalar",opt:!0,T:13},{no:3,name:"result",kind:"scalar",opt:!0,T:13},{no:4,name:"subresult",kind:"scalar",opt:!0,T:13}])}};const ni=new coe;let Kr=(function(e){return e[e.INPUT_KIND_UNKNOWN=0]="INPUT_KIND_UNKNOWN",e[e.PURE=1]="PURE",e[e.IMMUTABLE_OR_OWNED=2]="IMMUTABLE_OR_OWNED",e[e.SHARED=3]="SHARED",e[e.RECEIVING=4]="RECEIVING",e[e.FUNDS_WITHDRAWAL=5]="FUNDS_WITHDRAWAL",e})({}),uoe=(function(e){return e[e.MUTABILITY_UNKNOWN=0]="MUTABILITY_UNKNOWN",e[e.IMMUTABLE=1]="IMMUTABLE",e[e.MUTABLE=2]="MUTABLE",e[e.NON_EXCLUSIVE_WRITE=3]="NON_EXCLUSIVE_WRITE",e})({}),lp=(function(e){return e[e.SOURCE_UNKNOWN=0]="SOURCE_UNKNOWN",e[e.SENDER=1]="SENDER",e[e.SPONSOR=2]="SPONSOR",e})({});var foe=class extends me{constructor(){super("sui.rpc.v2.Input",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.Input.InputKind",Kr]},{no:2,name:"pure",kind:"scalar",opt:!0,T:12},{no:3,name:"object_id",kind:"scalar",opt:!0,T:9},{no:4,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:5,name:"digest",kind:"scalar",opt:!0,T:9},{no:6,name:"mutable",kind:"scalar",opt:!0,T:8},{no:7,name:"mutability",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.Input.Mutability",uoe]},{no:8,name:"funds_withdrawal",kind:"message",T:()=>poe},{no:1e3,name:"literal",kind:"message",T:()=>pa}])}};const doe=new foe;var hoe=class extends me{constructor(){super("sui.rpc.v2.FundsWithdrawal",[{no:1,name:"amount",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"coin_type",kind:"scalar",opt:!0,T:9},{no:3,name:"source",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.FundsWithdrawal.Source",lp]}])}};const poe=new hoe;var moe=class extends me{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){const e=this.create(),t=Date.now();return e.seconds=pt.from(Math.floor(t/1e3)).toBigInt(),e.nanos=t%1e3*1e6,e}toDate(e){return new Date(pt.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){const t=this.create(),n=e.getTime();return t.seconds=pt.from(Math.floor(n/1e3)).toBigInt(),t.nanos=(n%1e3+(n<0&&n%1e3!==0?1e3:0))*1e6,t}internalJsonWrite(e,t){let n=pt.from(e.seconds).toNumber()*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let r="Z";if(e.nanos>0){let i=(e.nanos+1e9).toString().substring(1);i.substring(3)==="000000"?r="."+i.substring(0,3)+"Z":i.substring(6)==="000"?r="."+i.substring(0,6)+"Z":r="."+i+"Z"}return new Date(n).toISOString().replace(".000Z",r)}internalJsonRead(e,t,n){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+Fs(e)+".");let r=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let i=Date.parse(r[1]+"-"+r[2]+"-"+r[3]+"T"+r[4]+":"+r[5]+":"+r[6]+(r[8]?r[8]:"Z"));if(Number.isNaN(i))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return n||(n=this.create()),n.seconds=pt.from(i/1e3).toBigInt(),n.nanos=0,r[7]&&(n.nanos=parseInt("1"+r[7]+"0".repeat(9-r[7].length))-1e9),n}};const cp=new moe;var yoe=class extends me{constructor(){super("sui.rpc.v2.ObjectReference",[{no:1,name:"object_id",kind:"scalar",opt:!0,T:9},{no:2,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"digest",kind:"scalar",opt:!0,T:9}])}};const UU=new yoe;let Cs=(function(e){return e[e.TRANSACTION_EXPIRATION_KIND_UNKNOWN=0]="TRANSACTION_EXPIRATION_KIND_UNKNOWN",e[e.NONE=1]="NONE",e[e.EPOCH=2]="EPOCH",e[e.VALID_DURING=3]="VALID_DURING",e})({}),voe=(function(e){return e[e.KIND_UNKNOWN=0]="KIND_UNKNOWN",e[e.PROGRAMMABLE_TRANSACTION=1]="PROGRAMMABLE_TRANSACTION",e[e.CHANGE_EPOCH=2]="CHANGE_EPOCH",e[e.GENESIS=3]="GENESIS",e[e.CONSENSUS_COMMIT_PROLOGUE_V1=4]="CONSENSUS_COMMIT_PROLOGUE_V1",e[e.AUTHENTICATOR_STATE_UPDATE=5]="AUTHENTICATOR_STATE_UPDATE",e[e.END_OF_EPOCH=6]="END_OF_EPOCH",e[e.RANDOMNESS_STATE_UPDATE=7]="RANDOMNESS_STATE_UPDATE",e[e.CONSENSUS_COMMIT_PROLOGUE_V2=8]="CONSENSUS_COMMIT_PROLOGUE_V2",e[e.CONSENSUS_COMMIT_PROLOGUE_V3=9]="CONSENSUS_COMMIT_PROLOGUE_V3",e[e.CONSENSUS_COMMIT_PROLOGUE_V4=10]="CONSENSUS_COMMIT_PROLOGUE_V4",e[e.PROGRAMMABLE_SYSTEM_TRANSACTION=11]="PROGRAMMABLE_SYSTEM_TRANSACTION",e})({}),goe=(function(e){return e[e.KIND_UNKNOWN=0]="KIND_UNKNOWN",e[e.CHANGE_EPOCH=1]="CHANGE_EPOCH",e[e.AUTHENTICATOR_STATE_CREATE=2]="AUTHENTICATOR_STATE_CREATE",e[e.AUTHENTICATOR_STATE_EXPIRE=3]="AUTHENTICATOR_STATE_EXPIRE",e[e.RANDOMNESS_STATE_CREATE=4]="RANDOMNESS_STATE_CREATE",e[e.DENY_LIST_STATE_CREATE=5]="DENY_LIST_STATE_CREATE",e[e.BRIDGE_STATE_CREATE=6]="BRIDGE_STATE_CREATE",e[e.BRIDGE_COMMITTEE_INIT=7]="BRIDGE_COMMITTEE_INIT",e[e.STORE_EXECUTION_TIME_OBSERVATIONS=8]="STORE_EXECUTION_TIME_OBSERVATIONS",e[e.ACCUMULATOR_ROOT_CREATE=9]="ACCUMULATOR_ROOT_CREATE",e[e.COIN_REGISTRY_CREATE=10]="COIN_REGISTRY_CREATE",e[e.DISPLAY_REGISTRY_CREATE=11]="DISPLAY_REGISTRY_CREATE",e[e.ADDRESS_ALIAS_STATE_CREATE=12]="ADDRESS_ALIAS_STATE_CREATE",e[e.WRITE_ACCUMULATOR_STORAGE_COST=13]="WRITE_ACCUMULATOR_STORAGE_COST",e})({}),boe=(function(e){return e[e.EXECUTION_TIME_OBSERVATION_KIND_UNKNOWN=0]="EXECUTION_TIME_OBSERVATION_KIND_UNKNOWN",e[e.MOVE_ENTRY_POINT=1]="MOVE_ENTRY_POINT",e[e.TRANSFER_OBJECTS=2]="TRANSFER_OBJECTS",e[e.SPLIT_COINS=3]="SPLIT_COINS",e[e.MERGE_COINS=4]="MERGE_COINS",e[e.PUBLISH=5]="PUBLISH",e[e.MAKE_MOVE_VECTOR=6]="MAKE_MOVE_VECTOR",e[e.UPGRADE=7]="UPGRADE",e})({});var xoe=class extends me{constructor(){super("sui.rpc.v2.Transaction",[{no:1,name:"bcs",kind:"message",T:()=>op},{no:2,name:"digest",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:5},{no:4,name:"kind",kind:"message",T:()=>Aoe},{no:5,name:"sender",kind:"scalar",opt:!0,T:9},{no:6,name:"gas_payment",kind:"message",T:()=>woe},{no:7,name:"expiration",kind:"message",T:()=>Ooe}])}};const Zw=new xoe;var Soe=class extends me{constructor(){super("sui.rpc.v2.GasPayment",[{no:1,name:"objects",kind:"message",repeat:2,T:()=>UU},{no:2,name:"owner",kind:"scalar",opt:!0,T:9},{no:3,name:"price",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"budget",kind:"scalar",opt:!0,T:4,L:0}])}};const woe=new Soe;var Toe=class extends me{constructor(){super("sui.rpc.v2.TransactionExpiration",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.TransactionExpiration.TransactionExpirationKind",Cs]},{no:2,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"min_epoch",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"min_timestamp",kind:"message",T:()=>cp},{no:5,name:"max_timestamp",kind:"message",T:()=>cp},{no:6,name:"chain",kind:"scalar",opt:!0,T:9},{no:7,name:"nonce",kind:"scalar",opt:!0,T:13}])}};const Ooe=new Toe;var joe=class extends me{constructor(){super("sui.rpc.v2.TransactionKind",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.TransactionKind.Kind",voe]},{no:2,name:"programmable_transaction",kind:"message",oneof:"data",T:()=>_oe},{no:3,name:"change_epoch",kind:"message",oneof:"data",T:()=>zU},{no:4,name:"genesis",kind:"message",oneof:"data",T:()=>Koe},{no:5,name:"consensus_commit_prologue",kind:"message",oneof:"data",T:()=>Joe},{no:6,name:"authenticator_state_update",kind:"message",oneof:"data",T:()=>sle},{no:7,name:"end_of_epoch",kind:"message",oneof:"data",T:()=>ule},{no:8,name:"randomness_state_update",kind:"message",oneof:"data",T:()=>Goe}])}};const Aoe=new joe;var Eoe=class extends me{constructor(){super("sui.rpc.v2.ProgrammableTransaction",[{no:1,name:"inputs",kind:"message",repeat:2,T:()=>doe},{no:2,name:"commands",kind:"message",repeat:2,T:()=>koe}])}};const _oe=new Eoe;var Noe=class extends me{constructor(){super("sui.rpc.v2.Command",[{no:1,name:"move_call",kind:"message",oneof:"command",T:()=>LU},{no:2,name:"transfer_objects",kind:"message",oneof:"command",T:()=>Doe},{no:3,name:"split_coins",kind:"message",oneof:"command",T:()=>Ioe},{no:4,name:"merge_coins",kind:"message",oneof:"command",T:()=>Boe},{no:5,name:"publish",kind:"message",oneof:"command",T:()=>Loe},{no:6,name:"make_move_vector",kind:"message",oneof:"command",T:()=>$oe},{no:7,name:"upgrade",kind:"message",oneof:"command",T:()=>Voe}])}};const koe=new Noe;var Coe=class extends me{constructor(){super("sui.rpc.v2.MoveCall",[{no:1,name:"package",kind:"scalar",opt:!0,T:9},{no:2,name:"module",kind:"scalar",opt:!0,T:9},{no:3,name:"function",kind:"scalar",opt:!0,T:9},{no:4,name:"type_arguments",kind:"scalar",repeat:2,T:9},{no:5,name:"arguments",kind:"message",repeat:2,T:()=>ni}])}};const LU=new Coe;var Moe=class extends me{constructor(){super("sui.rpc.v2.TransferObjects",[{no:1,name:"objects",kind:"message",repeat:2,T:()=>ni},{no:2,name:"address",kind:"message",T:()=>ni}])}};const Doe=new Moe;var Roe=class extends me{constructor(){super("sui.rpc.v2.SplitCoins",[{no:1,name:"coin",kind:"message",T:()=>ni},{no:2,name:"amounts",kind:"message",repeat:2,T:()=>ni}])}};const Ioe=new Roe;var Poe=class extends me{constructor(){super("sui.rpc.v2.MergeCoins",[{no:1,name:"coin",kind:"message",T:()=>ni},{no:2,name:"coins_to_merge",kind:"message",repeat:2,T:()=>ni}])}};const Boe=new Poe;var Uoe=class extends me{constructor(){super("sui.rpc.v2.Publish",[{no:1,name:"modules",kind:"scalar",repeat:2,T:12},{no:2,name:"dependencies",kind:"scalar",repeat:2,T:9}])}};const Loe=new Uoe;var zoe=class extends me{constructor(){super("sui.rpc.v2.MakeMoveVector",[{no:1,name:"element_type",kind:"scalar",opt:!0,T:9},{no:2,name:"elements",kind:"message",repeat:2,T:()=>ni}])}};const $oe=new zoe;var qoe=class extends me{constructor(){super("sui.rpc.v2.Upgrade",[{no:1,name:"modules",kind:"scalar",repeat:2,T:12},{no:2,name:"dependencies",kind:"scalar",repeat:2,T:9},{no:3,name:"package",kind:"scalar",opt:!0,T:9},{no:4,name:"ticket",kind:"message",T:()=>ni}])}};const Voe=new qoe;var Foe=class extends me{constructor(){super("sui.rpc.v2.RandomnessStateUpdate",[{no:1,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"randomness_round",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"random_bytes",kind:"scalar",opt:!0,T:12},{no:4,name:"randomness_object_initial_shared_version",kind:"scalar",opt:!0,T:4,L:0}])}};const Goe=new Foe;var Hoe=class extends me{constructor(){super("sui.rpc.v2.ChangeEpoch",[{no:1,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"protocol_version",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"storage_charge",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"computation_charge",kind:"scalar",opt:!0,T:4,L:0},{no:5,name:"storage_rebate",kind:"scalar",opt:!0,T:4,L:0},{no:6,name:"non_refundable_storage_fee",kind:"scalar",opt:!0,T:4,L:0},{no:7,name:"epoch_start_timestamp",kind:"message",T:()=>cp},{no:8,name:"system_packages",kind:"message",repeat:2,T:()=>Yoe}])}};const zU=new Hoe;var Woe=class extends me{constructor(){super("sui.rpc.v2.SystemPackage",[{no:1,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"modules",kind:"scalar",repeat:2,T:12},{no:3,name:"dependencies",kind:"scalar",repeat:2,T:9}])}};const Yoe=new Woe;var Xoe=class extends me{constructor(){super("sui.rpc.v2.GenesisTransaction",[{no:1,name:"objects",kind:"message",repeat:2,T:()=>BU}])}};const Koe=new Xoe;var Qoe=class extends me{constructor(){super("sui.rpc.v2.ConsensusCommitPrologue",[{no:1,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"round",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"commit_timestamp",kind:"message",T:()=>cp},{no:4,name:"consensus_commit_digest",kind:"scalar",opt:!0,T:9},{no:5,name:"sub_dag_index",kind:"scalar",opt:!0,T:4,L:0},{no:6,name:"consensus_determined_version_assignments",kind:"message",T:()=>ale},{no:7,name:"additional_state_digest",kind:"scalar",opt:!0,T:9}])}};const Joe=new Qoe;var Zoe=class extends me{constructor(){super("sui.rpc.v2.VersionAssignment",[{no:1,name:"object_id",kind:"scalar",opt:!0,T:9},{no:2,name:"start_version",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"version",kind:"scalar",opt:!0,T:4,L:0}])}};const ele=new Zoe;var tle=class extends me{constructor(){super("sui.rpc.v2.CanceledTransaction",[{no:1,name:"digest",kind:"scalar",opt:!0,T:9},{no:2,name:"version_assignments",kind:"message",repeat:2,T:()=>ele}])}};const nle=new tle;var rle=class extends me{constructor(){super("sui.rpc.v2.ConsensusDeterminedVersionAssignments",[{no:1,name:"version",kind:"scalar",opt:!0,T:5},{no:3,name:"canceled_transactions",kind:"message",repeat:2,T:()=>nle}])}};const ale=new rle;var ile=class extends me{constructor(){super("sui.rpc.v2.AuthenticatorStateUpdate",[{no:1,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"round",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"new_active_jwks",kind:"message",repeat:2,T:()=>lle},{no:4,name:"authenticator_object_initial_shared_version",kind:"scalar",opt:!0,T:4,L:0}])}};const sle=new ile;var ole=class extends me{constructor(){super("sui.rpc.v2.ActiveJwk",[{no:1,name:"id",kind:"message",T:()=>_se},{no:2,name:"jwk",kind:"message",T:()=>kse},{no:3,name:"epoch",kind:"scalar",opt:!0,T:4,L:0}])}};const lle=new ole;var cle=class extends me{constructor(){super("sui.rpc.v2.EndOfEpochTransaction",[{no:1,name:"transactions",kind:"message",repeat:2,T:()=>dle}])}};const ule=new cle;var fle=class extends me{constructor(){super("sui.rpc.v2.EndOfEpochTransactionKind",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.EndOfEpochTransactionKind.Kind",goe]},{no:2,name:"change_epoch",kind:"message",oneof:"data",T:()=>zU},{no:3,name:"authenticator_state_expire",kind:"message",oneof:"data",T:()=>ple},{no:4,name:"execution_time_observations",kind:"message",oneof:"data",T:()=>yle},{no:5,name:"bridge_chain_id",kind:"scalar",oneof:"data",T:9},{no:6,name:"bridge_object_version",kind:"scalar",oneof:"data",T:4,L:0},{no:7,name:"storage_cost",kind:"scalar",oneof:"data",T:4,L:0}])}};const dle=new fle;var hle=class extends me{constructor(){super("sui.rpc.v2.AuthenticatorStateExpire",[{no:1,name:"min_epoch",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"authenticator_object_initial_shared_version",kind:"scalar",opt:!0,T:4,L:0}])}};const ple=new hle;var mle=class extends me{constructor(){super("sui.rpc.v2.ExecutionTimeObservations",[{no:1,name:"version",kind:"scalar",opt:!0,T:5},{no:2,name:"observations",kind:"message",repeat:2,T:()=>gle}])}};const yle=new mle;var vle=class extends me{constructor(){super("sui.rpc.v2.ExecutionTimeObservation",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.ExecutionTimeObservation.ExecutionTimeObservationKind",boe]},{no:2,name:"move_entry_point",kind:"message",T:()=>LU},{no:3,name:"validator_observations",kind:"message",repeat:2,T:()=>xle}])}};const gle=new vle;var ble=class extends me{constructor(){super("sui.rpc.v2.ValidatorExecutionTimeObservation",[{no:1,name:"validator",kind:"scalar",opt:!0,T:12},{no:2,name:"duration",kind:"message",T:()=>Ase}])}};const xle=new ble;function Sle(e){switch(e.$kind){case"Pure":return{kind:Kr.PURE,pure:Ut(e.Pure.bytes)};case"Object":if(e.Object.$kind==="ImmOrOwnedObject")return{kind:Kr.IMMUTABLE_OR_OWNED,objectId:e.Object.ImmOrOwnedObject.objectId,version:BigInt(e.Object.ImmOrOwnedObject.version),digest:e.Object.ImmOrOwnedObject.digest};if(e.Object.$kind==="SharedObject")return{kind:Kr.SHARED,objectId:e.Object.SharedObject.objectId,version:BigInt(e.Object.SharedObject.initialSharedVersion),mutable:e.Object.SharedObject.mutable};if(e.Object.$kind==="Receiving")return{kind:Kr.RECEIVING,objectId:e.Object.Receiving.objectId,version:BigInt(e.Object.Receiving.version),digest:e.Object.Receiving.digest};throw new Error(`Unknown Object kind: ${JSON.stringify(e.Object)}`);case"UnresolvedObject":const t=e.UnresolvedObject;return{objectId:t.objectId,version:t.version?BigInt(t.version):t.initialSharedVersion?BigInt(t.initialSharedVersion):void 0,digest:t.digest??void 0,mutable:t.mutable??void 0};case"UnresolvedPure":throw new Error("UnresolvedPure arguments must be resolved before converting to gRPC format");case"FundsWithdrawal":{const n=e.FundsWithdrawal;return{kind:Kr.FUNDS_WITHDRAWAL,fundsWithdrawal:{amount:n.reservation.$kind==="MaxAmountU64"?BigInt(n.reservation.MaxAmountU64):void 0,coinType:n.typeArg.$kind==="Balance"?n.typeArg.Balance:void 0,source:n.withdrawFrom.$kind==="Sponsor"?lp.SPONSOR:lp.SENDER}}}default:throw new Error(`Unknown CallArg kind: ${JSON.stringify(e)}`)}}function za(e){if("GasCoin"in e)return{kind:$i.GAS};if("Input"in e)return{kind:$i.INPUT,input:e.Input};if("Result"in e)return{kind:$i.RESULT,result:e.Result};if("NestedResult"in e)return{kind:$i.RESULT,result:e.NestedResult[0],subresult:e.NestedResult[1]};throw new Error(`Unknown Argument: ${JSON.stringify(e)}`)}function wle(e){switch(e.$kind){case"MoveCall":return{command:{oneofKind:"moveCall",moveCall:{package:e.MoveCall.package,module:e.MoveCall.module,function:e.MoveCall.function,typeArguments:e.MoveCall.typeArguments,arguments:e.MoveCall.arguments.map(za)}}};case"TransferObjects":return{command:{oneofKind:"transferObjects",transferObjects:{objects:e.TransferObjects.objects.map(za),address:za(e.TransferObjects.address)}}};case"SplitCoins":return{command:{oneofKind:"splitCoins",splitCoins:{coin:za(e.SplitCoins.coin),amounts:e.SplitCoins.amounts.map(za)}}};case"MergeCoins":return{command:{oneofKind:"mergeCoins",mergeCoins:{coin:za(e.MergeCoins.destination),coinsToMerge:e.MergeCoins.sources.map(za)}}};case"Publish":return{command:{oneofKind:"publish",publish:{modules:e.Publish.modules.map(t=>Ut(t)),dependencies:e.Publish.dependencies}}};case"MakeMoveVec":return{command:{oneofKind:"makeMoveVector",makeMoveVector:{elementType:e.MakeMoveVec.type??void 0,elements:e.MakeMoveVec.elements.map(za)}}};case"Upgrade":return{command:{oneofKind:"upgrade",upgrade:{modules:e.Upgrade.modules.map(t=>Ut(t)),dependencies:e.Upgrade.dependencies,package:e.Upgrade.package,ticket:za(e.Upgrade.ticket)}}};default:throw new Error(`Unknown Command kind: ${JSON.stringify(e)}`)}}function $U(e){const t={version:1,kind:{data:{oneofKind:"programmableTransaction",programmableTransaction:{inputs:e.inputs.map(Sle),commands:e.commands.map(wle)}}}};e.sender&&(t.sender=e.sender);const n=e.gasData.owner??e.sender;if(t.gasPayment={objects:e.gasData.payment?e.gasData.payment.map(r=>({objectId:r.objectId,version:BigInt(r.version),digest:r.digest})):[],price:e.gasData.price?BigInt(e.gasData.price):void 0,budget:e.gasData.budget?BigInt(e.gasData.budget):void 0},n&&(t.gasPayment.owner=n),e.expiration){if("None"in e.expiration)t.expiration={kind:Cs.NONE};else if(e.expiration.$kind==="Epoch")t.expiration={kind:Cs.EPOCH,epoch:BigInt(e.expiration.Epoch)};else if(e.expiration.$kind==="ValidDuring"){const r=e.expiration.ValidDuring;t.expiration={kind:Cs.VALID_DURING,minEpoch:r.minEpoch!=null?BigInt(r.minEpoch):void 0,epoch:r.maxEpoch!=null?BigInt(r.maxEpoch):void 0,chain:r.chain,nonce:r.nonce}}}return t}function Hue(e,t,n){const r=qU(t);n?.onlyTransactionKind?e.applyResolvedData({...r,gasData:{budget:null,owner:null,payment:null,price:null},expiration:null}):e.applyResolvedData(r)}function Tle(e){const t=e.getData();return t.sender||(t.sender="0x0000000000000000000000000000000000000000000000000000000000000000"),$U(t)}function Ole(e){const t=Tle(e);return Zw.toJson(t)}function jle(e){switch(e.kind){case Kr.PURE:return{$kind:"Pure",Pure:{bytes:Pn(e.pure)}};case Kr.IMMUTABLE_OR_OWNED:return{$kind:"Object",Object:{$kind:"ImmOrOwnedObject",ImmOrOwnedObject:{objectId:e.objectId,version:e.version.toString(),digest:e.digest}}};case Kr.SHARED:return{$kind:"Object",Object:{$kind:"SharedObject",SharedObject:{objectId:e.objectId,initialSharedVersion:e.version.toString(),mutable:e.mutable??!1}}};case Kr.RECEIVING:return{$kind:"Object",Object:{$kind:"Receiving",Receiving:{objectId:e.objectId,version:e.version.toString(),digest:e.digest}}};case Kr.FUNDS_WITHDRAWAL:return{$kind:"FundsWithdrawal",FundsWithdrawal:{reservation:{$kind:"MaxAmountU64",MaxAmountU64:e.fundsWithdrawal?.amount?.toString()??"0"},typeArg:{$kind:"Balance",Balance:e.fundsWithdrawal?.coinType??"0x2::sui::SUI"},withdrawFrom:e.fundsWithdrawal?.source===lp.SPONSOR?{$kind:"Sponsor",Sponsor:!0}:{$kind:"Sender",Sender:!0}}};default:throw new Error(`Unknown Input kind: ${JSON.stringify(e)}`)}}function $a(e){switch(e.kind){case $i.GAS:return{$kind:"GasCoin",GasCoin:!0};case $i.INPUT:return{$kind:"Input",Input:e.input};case $i.RESULT:return e.subresult!=null?{$kind:"NestedResult",NestedResult:[e.result,e.subresult]}:{$kind:"Result",Result:e.result};default:throw new Error(`Unknown Argument kind: ${JSON.stringify(e)}`)}}function Ale(e){const t=e.command;if(!t)throw new Error("Command is missing");switch(t.oneofKind){case"moveCall":return{$kind:"MoveCall",MoveCall:{package:t.moveCall.package,module:t.moveCall.module,function:t.moveCall.function,typeArguments:t.moveCall.typeArguments??[],arguments:t.moveCall.arguments.map($a)}};case"transferObjects":return{$kind:"TransferObjects",TransferObjects:{objects:t.transferObjects.objects.map($a),address:$a(t.transferObjects.address)}};case"splitCoins":return{$kind:"SplitCoins",SplitCoins:{coin:$a(t.splitCoins.coin),amounts:t.splitCoins.amounts.map($a)}};case"mergeCoins":return{$kind:"MergeCoins",MergeCoins:{destination:$a(t.mergeCoins.coin),sources:t.mergeCoins.coinsToMerge.map($a)}};case"publish":return{$kind:"Publish",Publish:{modules:t.publish.modules.map(n=>Pn(n)),dependencies:t.publish.dependencies??[]}};case"makeMoveVector":return{$kind:"MakeMoveVec",MakeMoveVec:{type:t.makeMoveVector.elementType??null,elements:t.makeMoveVector.elements.map($a)}};case"upgrade":return{$kind:"Upgrade",Upgrade:{modules:t.upgrade.modules.map(n=>Pn(n)),dependencies:t.upgrade.dependencies??[],package:t.upgrade.package,ticket:$a(t.upgrade.ticket)}};default:throw new Error(`Unknown Command kind: ${JSON.stringify(t)}`)}}function qU(e){const t=e.kind?.data;if(t?.oneofKind!=="programmableTransaction")throw new Error("Only programmable transactions are supported");const n=t.programmableTransaction.inputs.map(jle),r=t.programmableTransaction.commands.map(Ale);let i=null;if(e.expiration)switch(e.expiration.kind){case Cs.NONE:i={$kind:"None",None:!0};break;case Cs.EPOCH:i={$kind:"Epoch",Epoch:e.expiration.epoch.toString()};break;case Cs.VALID_DURING:i={$kind:"ValidDuring",ValidDuring:{minEpoch:e.expiration.minEpoch?.toString()??null,maxEpoch:e.expiration.epoch?.toString()??null,minTimestamp:null,maxTimestamp:null,chain:e.expiration.chain??"",nonce:e.expiration.nonce??0}};break}return{version:2,sender:e.sender??null,expiration:i,gasData:{budget:e.gasPayment?.budget?.toString()??null,owner:e.gasPayment?.owner??null,payment:e.gasPayment?.objects?.map(o=>({objectId:o.objectId,version:o.version.toString(),digest:o.digest}))??null,price:e.gasPayment?.price?.toString()??null},inputs:n,commands:r}}var Ele=class extends me{constructor(){super("sui.rpc.v2.BalanceChange",[{no:1,name:"address",kind:"scalar",opt:!0,T:9},{no:2,name:"coin_type",kind:"scalar",opt:!0,T:9},{no:3,name:"amount",kind:"scalar",opt:!0,T:9}])}};const _le=new Ele;var Nle=class extends me{constructor(){super("sui.rpc.v2.GasCostSummary",[{no:1,name:"computation_cost",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"storage_cost",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"storage_rebate",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"non_refundable_storage_fee",kind:"scalar",opt:!0,T:4,L:0}])}};const kle=new Nle;let Cle=(function(e){return e[e.EXECUTION_ERROR_KIND_UNKNOWN=0]="EXECUTION_ERROR_KIND_UNKNOWN",e[e.INSUFFICIENT_GAS=1]="INSUFFICIENT_GAS",e[e.INVALID_GAS_OBJECT=2]="INVALID_GAS_OBJECT",e[e.INVARIANT_VIOLATION=3]="INVARIANT_VIOLATION",e[e.FEATURE_NOT_YET_SUPPORTED=4]="FEATURE_NOT_YET_SUPPORTED",e[e.OBJECT_TOO_BIG=5]="OBJECT_TOO_BIG",e[e.PACKAGE_TOO_BIG=6]="PACKAGE_TOO_BIG",e[e.CIRCULAR_OBJECT_OWNERSHIP=7]="CIRCULAR_OBJECT_OWNERSHIP",e[e.INSUFFICIENT_COIN_BALANCE=8]="INSUFFICIENT_COIN_BALANCE",e[e.COIN_BALANCE_OVERFLOW=9]="COIN_BALANCE_OVERFLOW",e[e.PUBLISH_ERROR_NON_ZERO_ADDRESS=10]="PUBLISH_ERROR_NON_ZERO_ADDRESS",e[e.SUI_MOVE_VERIFICATION_ERROR=11]="SUI_MOVE_VERIFICATION_ERROR",e[e.MOVE_PRIMITIVE_RUNTIME_ERROR=12]="MOVE_PRIMITIVE_RUNTIME_ERROR",e[e.MOVE_ABORT=13]="MOVE_ABORT",e[e.VM_VERIFICATION_OR_DESERIALIZATION_ERROR=14]="VM_VERIFICATION_OR_DESERIALIZATION_ERROR",e[e.VM_INVARIANT_VIOLATION=15]="VM_INVARIANT_VIOLATION",e[e.FUNCTION_NOT_FOUND=16]="FUNCTION_NOT_FOUND",e[e.ARITY_MISMATCH=17]="ARITY_MISMATCH",e[e.TYPE_ARITY_MISMATCH=18]="TYPE_ARITY_MISMATCH",e[e.NON_ENTRY_FUNCTION_INVOKED=19]="NON_ENTRY_FUNCTION_INVOKED",e[e.COMMAND_ARGUMENT_ERROR=20]="COMMAND_ARGUMENT_ERROR",e[e.TYPE_ARGUMENT_ERROR=21]="TYPE_ARGUMENT_ERROR",e[e.UNUSED_VALUE_WITHOUT_DROP=22]="UNUSED_VALUE_WITHOUT_DROP",e[e.INVALID_PUBLIC_FUNCTION_RETURN_TYPE=23]="INVALID_PUBLIC_FUNCTION_RETURN_TYPE",e[e.INVALID_TRANSFER_OBJECT=24]="INVALID_TRANSFER_OBJECT",e[e.EFFECTS_TOO_LARGE=25]="EFFECTS_TOO_LARGE",e[e.PUBLISH_UPGRADE_MISSING_DEPENDENCY=26]="PUBLISH_UPGRADE_MISSING_DEPENDENCY",e[e.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE=27]="PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE",e[e.PACKAGE_UPGRADE_ERROR=28]="PACKAGE_UPGRADE_ERROR",e[e.WRITTEN_OBJECTS_TOO_LARGE=29]="WRITTEN_OBJECTS_TOO_LARGE",e[e.CERTIFICATE_DENIED=30]="CERTIFICATE_DENIED",e[e.SUI_MOVE_VERIFICATION_TIMEDOUT=31]="SUI_MOVE_VERIFICATION_TIMEDOUT",e[e.CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED=32]="CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED",e[e.INPUT_OBJECT_DELETED=33]="INPUT_OBJECT_DELETED",e[e.EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION=34]="EXECUTION_CANCELED_DUE_TO_CONSENSUS_OBJECT_CONGESTION",e[e.ADDRESS_DENIED_FOR_COIN=35]="ADDRESS_DENIED_FOR_COIN",e[e.COIN_TYPE_GLOBAL_PAUSE=36]="COIN_TYPE_GLOBAL_PAUSE",e[e.EXECUTION_CANCELED_DUE_TO_RANDOMNESS_UNAVAILABLE=37]="EXECUTION_CANCELED_DUE_TO_RANDOMNESS_UNAVAILABLE",e[e.MOVE_VECTOR_ELEM_TOO_BIG=38]="MOVE_VECTOR_ELEM_TOO_BIG",e[e.MOVE_RAW_VALUE_TOO_BIG=39]="MOVE_RAW_VALUE_TOO_BIG",e[e.INVALID_LINKAGE=40]="INVALID_LINKAGE",e[e.INSUFFICIENT_FUNDS_FOR_WITHDRAW=41]="INSUFFICIENT_FUNDS_FOR_WITHDRAW",e[e.NON_EXCLUSIVE_WRITE_INPUT_OBJECT_MODIFIED=42]="NON_EXCLUSIVE_WRITE_INPUT_OBJECT_MODIFIED",e})({}),Mle=(function(e){return e[e.COMMAND_ARGUMENT_ERROR_KIND_UNKNOWN=0]="COMMAND_ARGUMENT_ERROR_KIND_UNKNOWN",e[e.TYPE_MISMATCH=1]="TYPE_MISMATCH",e[e.INVALID_BCS_BYTES=2]="INVALID_BCS_BYTES",e[e.INVALID_USAGE_OF_PURE_ARGUMENT=3]="INVALID_USAGE_OF_PURE_ARGUMENT",e[e.INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION=4]="INVALID_ARGUMENT_TO_PRIVATE_ENTRY_FUNCTION",e[e.INDEX_OUT_OF_BOUNDS=5]="INDEX_OUT_OF_BOUNDS",e[e.SECONDARY_INDEX_OUT_OF_BOUNDS=6]="SECONDARY_INDEX_OUT_OF_BOUNDS",e[e.INVALID_RESULT_ARITY=7]="INVALID_RESULT_ARITY",e[e.INVALID_GAS_COIN_USAGE=8]="INVALID_GAS_COIN_USAGE",e[e.INVALID_VALUE_USAGE=9]="INVALID_VALUE_USAGE",e[e.INVALID_OBJECT_BY_VALUE=10]="INVALID_OBJECT_BY_VALUE",e[e.INVALID_OBJECT_BY_MUT_REF=11]="INVALID_OBJECT_BY_MUT_REF",e[e.CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED=12]="CONSENSUS_OBJECT_OPERATION_NOT_ALLOWED",e[e.INVALID_ARGUMENT_ARITY=13]="INVALID_ARGUMENT_ARITY",e[e.INVALID_TRANSFER_OBJECT=14]="INVALID_TRANSFER_OBJECT",e[e.INVALID_MAKE_MOVE_VEC_NON_OBJECT_ARGUMENT=15]="INVALID_MAKE_MOVE_VEC_NON_OBJECT_ARGUMENT",e[e.ARGUMENT_WITHOUT_VALUE=16]="ARGUMENT_WITHOUT_VALUE",e[e.CANNOT_MOVE_BORROWED_VALUE=17]="CANNOT_MOVE_BORROWED_VALUE",e[e.CANNOT_WRITE_TO_EXTENDED_REFERENCE=18]="CANNOT_WRITE_TO_EXTENDED_REFERENCE",e[e.INVALID_REFERENCE_ARGUMENT=19]="INVALID_REFERENCE_ARGUMENT",e})({}),Dle=(function(e){return e[e.PACKAGE_UPGRADE_ERROR_KIND_UNKNOWN=0]="PACKAGE_UPGRADE_ERROR_KIND_UNKNOWN",e[e.UNABLE_TO_FETCH_PACKAGE=1]="UNABLE_TO_FETCH_PACKAGE",e[e.NOT_A_PACKAGE=2]="NOT_A_PACKAGE",e[e.INCOMPATIBLE_UPGRADE=3]="INCOMPATIBLE_UPGRADE",e[e.DIGEST_DOES_NOT_MATCH=4]="DIGEST_DOES_NOT_MATCH",e[e.UNKNOWN_UPGRADE_POLICY=5]="UNKNOWN_UPGRADE_POLICY",e[e.PACKAGE_ID_DOES_NOT_MATCH=6]="PACKAGE_ID_DOES_NOT_MATCH",e})({}),Rle=(function(e){return e[e.TYPE_ARGUMENT_ERROR_KIND_UNKNOWN=0]="TYPE_ARGUMENT_ERROR_KIND_UNKNOWN",e[e.TYPE_NOT_FOUND=1]="TYPE_NOT_FOUND",e[e.CONSTRAINT_NOT_SATISFIED=2]="CONSTRAINT_NOT_SATISFIED",e})({});var Ile=class extends me{constructor(){super("sui.rpc.v2.ExecutionStatus",[{no:1,name:"success",kind:"scalar",opt:!0,T:8},{no:2,name:"error",kind:"message",T:()=>Ule}])}};const Ple=new Ile;var Ble=class extends me{constructor(){super("sui.rpc.v2.ExecutionError",[{no:1,name:"description",kind:"scalar",opt:!0,T:9},{no:2,name:"command",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.ExecutionError.ExecutionErrorKind",Cle]},{no:4,name:"abort",kind:"message",oneof:"errorDetails",T:()=>zle},{no:5,name:"size_error",kind:"message",oneof:"errorDetails",T:()=>Hle},{no:6,name:"command_argument_error",kind:"message",oneof:"errorDetails",T:()=>Zle},{no:7,name:"type_argument_error",kind:"message",oneof:"errorDetails",T:()=>rce},{no:8,name:"package_upgrade_error",kind:"message",oneof:"errorDetails",T:()=>tce},{no:9,name:"index_error",kind:"message",oneof:"errorDetails",T:()=>VU},{no:10,name:"object_id",kind:"scalar",oneof:"errorDetails",T:9},{no:11,name:"coin_deny_list_error",kind:"message",oneof:"errorDetails",T:()=>Xle},{no:12,name:"congested_objects",kind:"message",oneof:"errorDetails",T:()=>Qle}])}};const Ule=new Ble;var Lle=class extends me{constructor(){super("sui.rpc.v2.MoveAbort",[{no:1,name:"abort_code",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"location",kind:"message",T:()=>qle},{no:3,name:"clever_error",kind:"message",T:()=>Fle}])}};const zle=new Lle;var $le=class extends me{constructor(){super("sui.rpc.v2.MoveLocation",[{no:1,name:"package",kind:"scalar",opt:!0,T:9},{no:2,name:"module",kind:"scalar",opt:!0,T:9},{no:3,name:"function",kind:"scalar",opt:!0,T:13},{no:4,name:"instruction",kind:"scalar",opt:!0,T:13},{no:5,name:"function_name",kind:"scalar",opt:!0,T:9}])}};const qle=new $le;var Vle=class extends me{constructor(){super("sui.rpc.v2.CleverError",[{no:1,name:"error_code",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"line_number",kind:"scalar",opt:!0,T:4,L:0},{no:3,name:"constant_name",kind:"scalar",opt:!0,T:9},{no:4,name:"constant_type",kind:"scalar",opt:!0,T:9},{no:5,name:"rendered",kind:"scalar",oneof:"value",T:9},{no:6,name:"raw",kind:"scalar",oneof:"value",T:12}])}};const Fle=new Vle;var Gle=class extends me{constructor(){super("sui.rpc.v2.SizeError",[{no:1,name:"size",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"max_size",kind:"scalar",opt:!0,T:4,L:0}])}};const Hle=new Gle;var Wle=class extends me{constructor(){super("sui.rpc.v2.IndexError",[{no:1,name:"index",kind:"scalar",opt:!0,T:13},{no:2,name:"subresult",kind:"scalar",opt:!0,T:13}])}};const VU=new Wle;var Yle=class extends me{constructor(){super("sui.rpc.v2.CoinDenyListError",[{no:1,name:"address",kind:"scalar",opt:!0,T:9},{no:2,name:"coin_type",kind:"scalar",opt:!0,T:9}])}};const Xle=new Yle;var Kle=class extends me{constructor(){super("sui.rpc.v2.CongestedObjects",[{no:1,name:"objects",kind:"scalar",repeat:2,T:9}])}};const Qle=new Kle;var Jle=class extends me{constructor(){super("sui.rpc.v2.CommandArgumentError",[{no:1,name:"argument",kind:"scalar",opt:!0,T:13},{no:2,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.CommandArgumentError.CommandArgumentErrorKind",Mle]},{no:3,name:"index_error",kind:"message",T:()=>VU}])}};const Zle=new Jle;var ece=class extends me{constructor(){super("sui.rpc.v2.PackageUpgradeError",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.PackageUpgradeError.PackageUpgradeErrorKind",Dle]},{no:2,name:"package_id",kind:"scalar",opt:!0,T:9},{no:3,name:"digest",kind:"scalar",opt:!0,T:9},{no:4,name:"policy",kind:"scalar",opt:!0,T:13},{no:5,name:"ticket_id",kind:"scalar",opt:!0,T:9}])}};const tce=new ece;var nce=class extends me{constructor(){super("sui.rpc.v2.TypeArgumentError",[{no:1,name:"type_argument",kind:"scalar",opt:!0,T:13},{no:2,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.TypeArgumentError.TypeArgumentErrorKind",Rle]}])}};const rce=new nce;let ace=(function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.DOES_NOT_EXIST=1]="DOES_NOT_EXIST",e[e.EXISTS=2]="EXISTS",e})({}),ice=(function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.DOES_NOT_EXIST=1]="DOES_NOT_EXIST",e[e.OBJECT_WRITE=2]="OBJECT_WRITE",e[e.PACKAGE_WRITE=3]="PACKAGE_WRITE",e[e.ACCUMULATOR_WRITE=4]="ACCUMULATOR_WRITE",e})({}),sce=(function(e){return e[e.ID_OPERATION_UNKNOWN=0]="ID_OPERATION_UNKNOWN",e[e.NONE=1]="NONE",e[e.CREATED=2]="CREATED",e[e.DELETED=3]="DELETED",e})({}),oce=(function(e){return e[e.ACCUMULATOR_OPERATION_UNKNOWN=0]="ACCUMULATOR_OPERATION_UNKNOWN",e[e.MERGE=1]="MERGE",e[e.SPLIT=2]="SPLIT",e})({}),lce=(function(e){return e[e.ACCUMULATOR_VALUE_UNKNOWN=0]="ACCUMULATOR_VALUE_UNKNOWN",e[e.INTEGER=1]="INTEGER",e[e.INTEGER_TUPLE=2]="INTEGER_TUPLE",e[e.EVENT_DIGEST=3]="EVENT_DIGEST",e})({}),cce=(function(e){return e[e.UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN=0]="UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN",e[e.READ_ONLY_ROOT=1]="READ_ONLY_ROOT",e[e.MUTATE_CONSENSUS_STREAM_ENDED=2]="MUTATE_CONSENSUS_STREAM_ENDED",e[e.READ_CONSENSUS_STREAM_ENDED=3]="READ_CONSENSUS_STREAM_ENDED",e[e.CANCELED=4]="CANCELED",e[e.PER_EPOCH_CONFIG=5]="PER_EPOCH_CONFIG",e})({});var uce=class extends me{constructor(){super("sui.rpc.v2.TransactionEffects",[{no:1,name:"bcs",kind:"message",T:()=>op},{no:2,name:"digest",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:5},{no:4,name:"status",kind:"message",T:()=>Ple},{no:5,name:"epoch",kind:"scalar",opt:!0,T:4,L:0},{no:6,name:"gas_used",kind:"message",T:()=>kle},{no:7,name:"transaction_digest",kind:"scalar",opt:!0,T:9},{no:8,name:"gas_object",kind:"message",T:()=>rR},{no:9,name:"events_digest",kind:"scalar",opt:!0,T:9},{no:10,name:"dependencies",kind:"scalar",repeat:2,T:9},{no:11,name:"lamport_version",kind:"scalar",opt:!0,T:4,L:0},{no:12,name:"changed_objects",kind:"message",repeat:2,T:()=>rR},{no:13,name:"unchanged_consensus_objects",kind:"message",repeat:2,T:()=>gce},{no:14,name:"auxiliary_data_digest",kind:"scalar",opt:!0,T:9},{no:15,name:"unchanged_loaded_runtime_objects",kind:"message",repeat:2,T:()=>UU}])}};const fce=new uce;var dce=class extends me{constructor(){super("sui.rpc.v2.ChangedObject",[{no:1,name:"object_id",kind:"scalar",opt:!0,T:9},{no:2,name:"input_state",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.ChangedObject.InputObjectState",ace,"INPUT_OBJECT_STATE_"]},{no:3,name:"input_version",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"input_digest",kind:"scalar",opt:!0,T:9},{no:5,name:"input_owner",kind:"message",T:()=>AS},{no:6,name:"output_state",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.ChangedObject.OutputObjectState",ice,"OUTPUT_OBJECT_STATE_"]},{no:7,name:"output_version",kind:"scalar",opt:!0,T:4,L:0},{no:8,name:"output_digest",kind:"scalar",opt:!0,T:9},{no:9,name:"output_owner",kind:"message",T:()=>AS},{no:12,name:"accumulator_write",kind:"message",T:()=>yce},{no:10,name:"id_operation",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.ChangedObject.IdOperation",sce]},{no:11,name:"object_type",kind:"scalar",opt:!0,T:9}])}};const rR=new dce;var hce=class extends me{constructor(){super("sui.rpc.v2.EventDigestEntry",[{no:1,name:"event_index",kind:"scalar",opt:!0,T:4,L:0},{no:2,name:"digest",kind:"scalar",opt:!0,T:9}])}};const pce=new hce;var mce=class extends me{constructor(){super("sui.rpc.v2.AccumulatorWrite",[{no:1,name:"address",kind:"scalar",opt:!0,T:9},{no:2,name:"accumulator_type",kind:"scalar",opt:!0,T:9},{no:3,name:"operation",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.AccumulatorWrite.AccumulatorOperation",oce]},{no:4,name:"value_kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.AccumulatorWrite.AccumulatorValue",lce]},{no:5,name:"integer_value",kind:"scalar",opt:!0,T:4,L:0},{no:6,name:"integer_tuple",kind:"scalar",repeat:1,T:4,L:0},{no:7,name:"event_digest_value",kind:"message",repeat:2,T:()=>pce}])}};const yce=new mce;var vce=class extends me{constructor(){super("sui.rpc.v2.UnchangedConsensusObject",[{no:1,name:"kind",kind:"enum",opt:!0,T:()=>["sui.rpc.v2.UnchangedConsensusObject.UnchangedConsensusObjectKind",cce]},{no:2,name:"object_id",kind:"scalar",opt:!0,T:9},{no:3,name:"version",kind:"scalar",opt:!0,T:4,L:0},{no:4,name:"digest",kind:"scalar",opt:!0,T:9},{no:5,name:"object_type",kind:"scalar",opt:!0,T:9}])}};const gce=new vce;var bce=class extends hie{#t;constructor({graphqlClient:e,mvr:t}){super({network:e.network,base:e,mvr:t}),this.#t=e}async#e(e,t){const{data:n,errors:r}=await this.#t.query(e);Ix(r);const i=n&&(t?t(n):n);if(i==null)throw new Error("Missing response data");return i}async getObjects(e){const t=mS(e.objectIds,50),n=[];for(const r of t){const i=await this.#e({query:tie,variables:{objectKeys:r.map(o=>({address:o})),includeContent:e.include?.content??!1,includePreviousTransaction:e.include?.previousTransaction??!1,includeObjectBcs:e.include?.objectBcs??!1,includeJson:e.include?.json??!1,includeDisplay:e.include?.display??!1}},o=>o.multiGetObjects);n.push(...r.map(o=>Kt(o)).map(o=>i.find(l=>l?.address===o)??new VD("notFound",`Object ${o} not found`)).map(o=>{if(o instanceof VD)return o;const l=o.asMoveObject?.contents?.bcs?Ut(o.asMoveObject.contents.bcs):void 0,u=o.objectBcs?Ut(o.objectBcs):void 0;let f;o.asMovePackage?f="package":o.asMoveObject?.contents?.type?.repr?f=o.asMoveObject.contents.type.repr:f="";const h=e.include?.json?o.asMoveObject?.contents?.json?o.asMoveObject.contents.json:null:void 0,y=aR(e.include?.display,o.asMoveObject?.contents?.display);return{objectId:o.address,version:o.version?.toString(),digest:o.digest,owner:Px(o.owner),type:f,content:l,previousTransaction:o.previousTransaction?.digest??void 0,objectBcs:u,json:h,display:y}}))}return{objects:n}}async listOwnedObjects(e){const t=await this.#e({query:eie,variables:{owner:e.owner,limit:e.limit,cursor:e.cursor,filter:e.type?{type:(await this.mvr.resolveType({type:e.type})).type}:void 0,includeContent:e.include?.content??!1,includePreviousTransaction:e.include?.previousTransaction??!1,includeObjectBcs:e.include?.objectBcs??!1,includeJson:e.include?.json??!1,includeDisplay:e.include?.display??!1}},n=>n.address?.objects);return{objects:t.nodes.map(n=>({objectId:n.address,version:n.version?.toString(),digest:n.digest,owner:Px(n.owner),type:n.contents?.type?.repr,content:n.contents?.bcs?Ut(n.contents.bcs):void 0,previousTransaction:n.previousTransaction?.digest??void 0,objectBcs:n.objectBcs?Ut(n.objectBcs):void 0,json:e.include?.json?n.contents?.json?n.contents.json:null:void 0,display:aR(e.include?.display,n.contents?.display)})),hasNextPage:t.pageInfo.hasNextPage,cursor:t.pageInfo.endCursor??null}}async listCoins(e){const t=e.coinType??FD,n=await this.#e({query:Wae,variables:{owner:e.owner,cursor:e.cursor,first:e.limit,type:`0x2::coin::Coin<${(await this.mvr.resolveType({type:t})).type}>`}},r=>r.address?.objects);return{cursor:n.pageInfo.endCursor??null,hasNextPage:n.pageInfo.hasNextPage,objects:n.nodes.map(r=>({objectId:r.address,version:r.version?.toString(),digest:r.digest,owner:Px(r.owner),type:r.contents?.type?.repr,balance:r.contents?.json?.balance}))}}async getBalance(e){const t=e.coinType??FD,n=await this.#e({query:Fae,variables:{owner:e.owner,coinType:(await this.mvr.resolveType({type:t})).type}},o=>o.address?.balance),r=BigInt(n.addressBalance??"0"),i=BigInt(n.totalBalance??"0")-r;return{balance:{coinType:n.coinType?.repr??t,balance:n.totalBalance??"0",coinBalance:i.toString(),addressBalance:r.toString()}}}async getCoinMetadata(e){const t=(await this.mvr.resolveType({type:e.coinType})).type,{data:n,errors:r}=await this.#t.query({query:Hae,variables:{coinType:t}});return Ix(r),n?.coinMetadata?{coinMetadata:{id:n.coinMetadata.address,decimals:n.coinMetadata.decimals,name:n.coinMetadata.name,symbol:n.coinMetadata.symbol,description:n.coinMetadata.description,iconUrl:n.coinMetadata.iconUrl??null}}:{coinMetadata:null}}async listBalances(e){const t=await this.#e({query:Vae,variables:{owner:e.owner}},n=>n.address?.balances);return{cursor:t.pageInfo.endCursor??null,hasNextPage:t.pageInfo.hasNextPage,balances:t.nodes.map(n=>{const r=BigInt(n.addressBalance??"0"),i=BigInt(n.totalBalance??"0")-r;return{coinType:n.coinType?.repr,balance:n.totalBalance,coinBalance:i.toString(),addressBalance:r.toString()}})}}async getTransaction(e){return Bx(await this.#e({query:aie,variables:{digest:e.digest,includeTransaction:e.include?.transaction??!1,includeEffects:e.include?.effects??!1,includeEvents:e.include?.events??!1,includeBalanceChanges:e.include?.balanceChanges??!1,includeObjectTypes:e.include?.objectTypes??!1,includeBcs:e.include?.bcs??!1}},t=>t.transaction),e.include)}async executeTransaction(e){return Bx((await this.#e({query:rie,variables:{transactionDataBcs:Pn(e.transaction),signatures:e.signatures,includeTransaction:e.include?.transaction??!1,includeEffects:e.include?.effects??!1,includeEvents:e.include?.events??!1,includeBalanceChanges:e.include?.balanceChanges??!1,includeObjectTypes:e.include?.objectTypes??!1,includeBcs:e.include?.bcs??!1}},t=>t.executeTransaction)).effects?.transaction,e.include)}async simulateTransaction(e){e.transaction instanceof Uint8Array||await e.transaction.prepareForSerialization({client:this});const t=await this.#e({query:nie,variables:{transaction:e.transaction instanceof Uint8Array?{bcs:{value:Pn(e.transaction)}}:Ole(e.transaction),includeTransaction:e.include?.transaction??!1,includeEffects:e.include?.effects??!1,includeEvents:e.include?.events??!1,includeBalanceChanges:e.include?.balanceChanges??!1,includeObjectTypes:e.include?.objectTypes??!1,includeCommandResults:e.include?.commandResults??!1,includeBcs:e.include?.bcs??!1,checksEnabled:e.checksEnabled??!0}},i=>i.simulateTransaction),n=Bx(t.effects?.transaction,e.include),r=e.include?.commandResults&&t.outputs?t.outputs.map(i=>({returnValues:(i.returnValues??[]).map(o=>({bcs:o.value?.bcs?Ut(o.value.bcs):null})),mutatedReferences:(i.mutatedReferences??[]).map(o=>({bcs:o.value?.bcs?Ut(o.value.bcs):null}))})):void 0;return n.$kind==="Transaction"?{$kind:"Transaction",Transaction:n.Transaction,commandResults:r}:{$kind:"FailedTransaction",FailedTransaction:n.FailedTransaction,commandResults:r}}async getReferenceGasPrice(){return{referenceGasPrice:await this.#e({query:Jae},e=>e.epoch?.referenceGasPrice)??""}}async getProtocolConfig(){const e=await this.#e({query:Qae},r=>r.epoch?.protocolConfigs),t={};for(const r of e?.featureFlags??[])t[r.key]=r.value;const n={};for(const r of e?.configs??[])n[r.key]=r.value??null;return{protocolConfig:{protocolVersion:e?.protocolVersion?.toString()??null,featureFlags:t,attributes:n}}}async getCurrentSystemState(){const e=await this.#e({query:Yae},r=>r.epoch);if(!e)throw new Error("Epoch data not found in response");const t=e.startTimestamp?new Date(e.startTimestamp).getTime().toString():null,n=e.systemState?.json;return{systemState:{systemStateVersion:n?.system_state_version?.toString()??null,epoch:e.epochId?.toString()??null,protocolVersion:e.protocolConfigs?.protocolVersion?.toString()??null,referenceGasPrice:e.referenceGasPrice??null,epochStartTimestampMs:t,safeMode:n?.safe_mode??!1,safeModeStorageRewards:n?.safe_mode_storage_rewards??null,safeModeComputationRewards:n?.safe_mode_computation_rewards??null,safeModeStorageRebates:n?.safe_mode_storage_rebates?.toString()??null,safeModeNonRefundableStorageFee:n?.safe_mode_non_refundable_storage_fee?.toString()??null,parameters:{epochDurationMs:n?.parameters?.epoch_duration_ms?.toString()??null,stakeSubsidyStartEpoch:n?.parameters?.stake_subsidy_start_epoch?.toString()??null,maxValidatorCount:n?.parameters?.max_validator_count?.toString()??null,minValidatorJoiningStake:n?.parameters?.min_validator_joining_stake?.toString()??null,validatorLowStakeThreshold:n?.parameters?.validator_low_stake_threshold?.toString()??null,validatorLowStakeGracePeriod:n?.parameters?.validator_low_stake_grace_period?.toString()??null},storageFund:{totalObjectStorageRebates:n?.storage_fund?.total_object_storage_rebates??null,nonRefundableBalance:n?.storage_fund?.non_refundable_balance??null},stakeSubsidy:{balance:n?.stake_subsidy?.balance??null,distributionCounter:n?.stake_subsidy?.distribution_counter?.toString()??null,currentDistributionAmount:n?.stake_subsidy?.current_distribution_amount?.toString()??null,stakeSubsidyPeriodLength:n?.stake_subsidy?.stake_subsidy_period_length?.toString()??null,stakeSubsidyDecreaseRate:n?.stake_subsidy?.stake_subsidy_decrease_rate??null}}}}async listDynamicFields(e){return this.#t.listDynamicFields(e)}async verifyZkLoginSignature(e){const t=e.intentScope==="TransactionData"?ID.TransactionData:ID.PersonalMessage,{data:n}=await this.#t.query({query:sie,variables:{bytes:e.bytes,signature:e.signature,intentScope:t,author:e.address}});return{success:n?.verifyZkLoginSignature?.success??!1,errors:[]}}async defaultNameServiceName(e){return{data:{name:await this.#e({query:Zae,signal:e.signal,variables:{address:e.address}},t=>t.address?.defaultNameRecord?.domain??null)}}}async getMoveFunction(e){const t=await this.#e({query:Kae,variables:{package:(await this.mvr.resolvePackage({package:e.packageId})).package,module:e.moduleName,function:e.name}},r=>r.package?.module?.function);let n="unknown";switch(t.visibility){case"PUBLIC":n="public";break;case"PRIVATE":n="private";break;case"FRIEND":n="friend";break}return{function:{packageId:Kt(e.packageId),moduleName:e.moduleName,name:t.name,visibility:n,isEntry:t.isEntry??!1,typeParameters:t.typeParameters?.map(({constraints:r})=>({isPhantom:!1,constraints:r.map(i=>{switch(i){case"COPY":return"copy";case"DROP":return"drop";case"STORE":return"store";case"KEY":return"key";default:return"unknown"}})??[]}))??[],parameters:t.parameters?.map(r=>iR(r.signature))??[],returns:t.return?.map(({signature:r})=>iR(r))??[]}}}async getChainIdentifier(e){return this.cache.read(["chainIdentifier"],async()=>{const t=await this.#e({query:Gae},n=>n.checkpoint);if(!t?.digest)throw new Error("Genesis checkpoint digest not found");return{chainIdentifier:t.digest}})}resolveTransactionPlugin(){const e=this.#t;return async function(n,r,i){const o=n.snapshot();o.sender||(o.sender="0x0000000000000000000000000000000000000000000000000000000000000000");const l=$U(o),u=Zw.toJson(l),{data:f,errors:h}=await e.query({query:iie,variables:{transaction:u,doGasSelection:!r.onlyTransactionKind&&(o.gasData.budget==null||o.gasData.payment==null)}});Ix(h);const y=f?.simulateTransaction?.effects?.transaction?.effects;if(!r.onlyTransactionKind&&y?.status===vU.Failure){const S=FU(y.executionError);throw new Qie(`Transaction resolution failed: ${S?.message??"Transaction failed"}`,{executionError:S})}const m=f?.simulateTransaction?.effects?.transaction?.transactionBcs;if(!m)throw new Error("simulateTransaction did not return resolved transaction data");const g=qie.fromBytes(Ut(m)).snapshot();return r.onlyTransactionKind?n.applyResolvedData({...g,gasData:{budget:null,owner:null,payment:null,price:null},expiration:null}):n.applyResolvedData(g),await i()}}};function aR(e,t){if(e)return t?{output:t.output??null,errors:t.errors??null}:null}function Ix(e){if(!e||e.length===0)return;const t=e.map(n=>new xce(n));throw t.length===1?t[0]:new AggregateError(t)}var xce=class extends Error{constructor(e){super(e.message),this.locations=e.locations}};function Px(e){switch(e.__typename){case"AddressOwner":return{$kind:"AddressOwner",AddressOwner:e.address?.address};case"ConsensusAddressOwner":return{$kind:"ConsensusAddressOwner",ConsensusAddressOwner:{owner:e?.address?.address,startVersion:String(e.startVersion)}};case"ObjectOwner":return{$kind:"ObjectOwner",ObjectOwner:e.address?.address};case"Immutable":return{$kind:"Immutable",Immutable:!0};case"Shared":return{$kind:"Shared",Shared:{initialSharedVersion:String(e.initialSharedVersion)}}}}function Bx(e,t){const n={};if(t?.objectTypes){const f=e.effects?.effectsJson;f&&fce.fromJson(f).changedObjects?.forEach(y=>{y.objectId&&y.objectType&&(n[y.objectId]=y.objectType)});const h=e.effects?.objectChanges?.nodes;if(h)for(const y of h){const m=y.outputState?.asMoveObject?.contents?.type?.repr;y.address&&m&&(n[y.address]=m)}}let r;if(t?.balanceChanges){const f=e.effects?.balanceChangesJson;Array.isArray(f)?r=f.map(h=>{const y=_le.fromJson(h);return{coinType:y.coinType,address:y.address,amount:y.amount}}):r=[]}const i=e.effects?.status===vU.Success?{success:!0,error:null}:{success:!1,error:FU(e.effects?.executionError)};let o;if(t?.transaction&&e.transactionJson){const f=qU(Zw.fromJson(e.transactionJson));o={gasData:f.gasData,sender:f.sender,expiration:f.expiration,commands:f.commands,inputs:f.inputs,version:f.version}}const l=t?.bcs&&e.transactionBcs?Ut(e.transactionBcs):void 0,u={digest:e.digest,status:i,effects:t?.effects?Yie(Ut(e.effects?.effectsBcs)):void 0,epoch:e.effects?.epoch?.epochId?.toString()??null,objectTypes:t?.objectTypes?n:void 0,transaction:o,bcs:l,signatures:e.signatures.map(f=>f.signatureBytes),balanceChanges:r,events:t?.events?e.effects?.events?.nodes.map(f=>{const h=f.contents?.type?.repr,[y,m]=h.split("::");return{packageId:y,module:m,sender:f.sender?.address,eventType:h,bcs:f.contents?.bcs?Ut(f.contents.bcs):new Uint8Array,json:f.contents?.json??null}})??[]:void 0};return i.success?{$kind:"Transaction",Transaction:u,FailedTransaction:void 0}:{$kind:"FailedTransaction",Transaction:void 0,FailedTransaction:u}}function iR(e){let t=null;return e.ref==="&"?t="immutable":e.ref==="&mut"&&(t="mutable"),{reference:t,body:ES(e.body)}}function FU(e){if(Sce(e)==="MoveAbort"&&e?.abortCode!=null){const t=wce(e),n=Tce(e),r=e.message?.match(/in (\d+)\w* command/),i=r?parseInt(r[1],10)-1:void 0;return{$kind:"MoveAbort",message:OU({command:i,location:t?{package:t.package,module:t.module,functionName:t.functionName,instruction:t.instruction}:void 0,abortCode:e.abortCode,cleverError:n?{lineNumber:n.lineNumber,constantName:n.constantName,value:n.value}:void 0}),command:i,MoveAbort:{abortCode:e.abortCode,location:t,cleverError:n}}}return{$kind:"Unknown",message:e?.message??"Transaction failed",Unknown:null}}function Sce(e){return e?.abortCode!=null?"MoveAbort":e?.message?.match(/^(\w+)/)?.[1]??"Unknown"}function wce(e){if(e.module?.package?.address&&e.module?.name)return{package:e.module?.package?.address,module:e.module?.name,functionName:e.function?.name,instruction:e.instructionOffset??void 0}}function Tce(e){if(e.identifier||e.constant)return{constantName:e.identifier??void 0,value:e.constant??void 0,lineNumber:e.sourceLineNumber??void 0}}function ES(e){switch(e){case"address":return{$kind:"address"};case"bool":return{$kind:"bool"};case"u8":return{$kind:"u8"};case"u16":return{$kind:"u16"};case"u32":return{$kind:"u32"};case"u64":return{$kind:"u64"};case"u128":return{$kind:"u128"};case"u256":return{$kind:"u256"}}if(typeof e=="string")throw new Error(`Unknown type: ${e}`);if("vector"in e)return{$kind:"vector",vector:ES(e.vector)};if("datatype"in e)return{$kind:"datatype",datatype:{typeName:`${Kt(e.datatype.package)}::${e.datatype.module}::${e.datatype.type}`,typeParameters:e.datatype.typeParameters.map(t=>ES(t))}};if("typeParameter"in e)return{$kind:"typeParameter",index:e.typeParameter};throw new Error(`Unknown type: ${JSON.stringify(e)}`)}var Oce=class extends Error{};const jce=Symbol.for("@mysten/SuiGraphQLClient");var Ace=class extends DB{#t;#e;#n;#r;get mvr(){return this.core.mvr}get[jce](){return!0}constructor({url:e,fetch:t=fetch,headers:n={},queries:r={},network:i,mvr:o}){super({network:i}),this.#t=e,this.#e=r,this.#n=n,this.#r=(...l)=>t(...l),this.core=new bce({graphqlClient:this,mvr:o})}async query(e){const t=await this.#r(this.#t,{method:"POST",headers:{"Content-Type":"application/json",...this.#n},body:JSON.stringify({query:typeof e.query=="string"||e.query instanceof String?String(e.query):IS(e.query),variables:e.variables,extensions:e.extensions,operationName:e.operationName}),signal:e.signal});if(!t.ok)throw new Oce(`GraphQL request failed: ${t.statusText} (${t.status})`);return await t.json()}async execute(e,t){return this.query({...t,query:this.#e[e]})}getObjects(e){return this.core.getObjects(e)}getObject(e){return this.core.getObject(e)}listCoins(e){return this.core.listCoins(e)}listOwnedObjects(e){return this.core.listOwnedObjects(e)}getBalance(e){return this.core.getBalance(e)}listBalances(e){return this.core.listBalances(e)}getCoinMetadata(e){return this.core.getCoinMetadata(e)}getTransaction(e){return this.core.getTransaction(e)}executeTransaction(e){return this.core.executeTransaction(e)}signAndExecuteTransaction(e){return this.core.signAndExecuteTransaction(e)}waitForTransaction(e){return this.core.waitForTransaction(e)}simulateTransaction(e){return this.core.simulateTransaction(e)}getReferenceGasPrice(){return this.core.getReferenceGasPrice()}async listDynamicFields(e){const t=e.include?.value??!1,{data:n,errors:r}=await this.query({query:Xae,variables:{parentId:e.parentId,first:e.limit,cursor:e.cursor,includeValue:t}});if(r?.length)throw r.length===1?new Error(r[0].message):new AggregateError(r.map(o=>new Error(o.message)));const i=n?.address?.dynamicFields;if(!i)throw new Error("Missing response data");return{dynamicFields:i.nodes.map(o=>{const l=o.value?.__typename==="MoveObject"?o.value.contents?.type?.repr:o.value?.type?.repr,u=o.value?.__typename==="MoveObject",f=u?`0x2::dynamic_object_field::Wrapper<${o.name?.type?.repr}>`:o.name?.type?.repr;let h;if(t){let y;o.value?.__typename==="MoveValue"?y=Ut(o.value.bcs??""):o.value?.__typename==="MoveObject"?y=Ut(o.value.contents?.bcs??""):y=new Uint8Array,h={type:l,bcs:y}}return{$kind:u?"DynamicObject":"DynamicField",fieldId:yU(e.parentId,f,Ut(o.name?.bcs)),type:jl(u?`0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${o.name?.type?.repr}>,0x2::object::ID>`:`0x2::dynamic_field::Field<${o.name?.type?.repr},${l}>`),name:{type:o.name?.type?.repr,bcs:Ut(o.name?.bcs)},valueType:l,childId:u&&o.value?.__typename==="MoveObject"?o.value.address:void 0,value:t?h:void 0}}),cursor:i.pageInfo.endCursor??null,hasNextPage:i.pageInfo.hasNextPage}}getDynamicField(e){return this.core.getDynamicField(e)}getMoveFunction(e){return this.core.getMoveFunction(e)}resolveTransactionPlugin(){return this.core.resolveTransactionPlugin()}verifyZkLoginSignature(e){return this.core.verifyZkLoginSignature(e)}defaultNameServiceName(e){return this.core.defaultNameServiceName(e)}};const Pl=BS(),eT=e=>{const t=e.find(r=>r.name.toLowerCase()==="graphql")?.url;if(t===void 0)return null;const n=t.replace(/\/+$/,"");return n.endsWith("/graphql")?n:`${n}/graphql`},sR=new Map,tm=e=>{const t=sR.get(e);if(t)return t;const n=new Ace({url:e,network:"localnet"});return sR.set(e,n),n},tT=e=>{if(!e)return null;const t=Date.parse(e);return Number.isFinite(t)?t:null},Ece=Pl(`
|
|
1258
|
+
query AddressSentTxs($addr: SuiAddress!, $limit: Int!) {
|
|
1259
|
+
transactions(last: $limit, filter: { sentAddress: $addr }) {
|
|
1260
|
+
nodes {
|
|
1261
|
+
digest
|
|
1262
|
+
sender {
|
|
1263
|
+
address
|
|
1264
|
+
}
|
|
1265
|
+
effects {
|
|
1266
|
+
status
|
|
1267
|
+
timestamp
|
|
1268
|
+
}
|
|
1269
|
+
kind {
|
|
1270
|
+
__typename
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
`),_ce=Pl(`
|
|
1276
|
+
query AddressReceivedTxs($addr: SuiAddress!, $limit: Int!) {
|
|
1277
|
+
transactions(last: $limit, filter: { affectedAddress: $addr }) {
|
|
1278
|
+
nodes {
|
|
1279
|
+
digest
|
|
1280
|
+
sender {
|
|
1281
|
+
address
|
|
1282
|
+
}
|
|
1283
|
+
effects {
|
|
1284
|
+
status
|
|
1285
|
+
timestamp
|
|
1286
|
+
}
|
|
1287
|
+
kind {
|
|
1288
|
+
__typename
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
`),Nce=Pl(`
|
|
1294
|
+
query ObjectAffectedTxs($addr: SuiAddress!, $limit: Int!) {
|
|
1295
|
+
transactions(last: $limit, filter: { affectedObject: $addr }) {
|
|
1296
|
+
nodes {
|
|
1297
|
+
digest
|
|
1298
|
+
sender {
|
|
1299
|
+
address
|
|
1300
|
+
}
|
|
1301
|
+
effects {
|
|
1302
|
+
status
|
|
1303
|
+
timestamp
|
|
1304
|
+
}
|
|
1305
|
+
kind {
|
|
1306
|
+
__typename
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
`),kce=e=>e==="SUCCESS"?"success":e==="FAILURE"?"failure":"unknown",Cce=async(e,t,n,r=25)=>{const i=n==="sent"?Ece:n==="object"?Nce:_ce,o=tm(e),{data:l,errors:u}=await o.query({query:i,variables:{addr:t,limit:r}});if(u?.length)throw new Error(u.map(f=>f.message).join("; "));return(l?.transactions?.nodes??[]).flatMap(f=>f.digest===null?[]:[{digest:f.digest,sender:f.sender?.address??null,status:kce(f.effects?.status),kind:f.kind?.__typename??"Transaction",timestampMs:tT(f.effects?.timestamp)}]).sort((f,h)=>(h.timestampMs??0)-(f.timestampMs??0))},oR=5e3,GU=(e,t,n,r=25)=>lt({queryKey:["sui-graphql",e,"addressTxs",t,n,r],queryFn:()=>Cce(e,t,n,r),enabled:e!==null&&t!=="",staleTime:oR,refetchInterval:oR*2}),Mce=e=>(e.split("::").pop()??e).toUpperCase(),Dce=e=>{const t=e.split("<")[0];return t.split("::").slice(-2).join("::")||t||e},Rce=e=>e==="success"?"green":e==="failure"?"red":"dim",Ice=[{value:"sent",label:"Sent"},{value:"received",label:"Received"}],Pce=({chain:e,projection:t,id:n})=>{const r=YR(e,n),i=KR(e,n),o=eT(t.endpoints),[l,u]=z.useState("sent"),f=GU(o,n,l),h=t.accounts.find(w=>w.address===n)??null,y=r.data??[],m=i.data??[],g=f.data??[],S=[{key:"digest",header:"Digest",render:w=>p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(mt,{token:Rce(w.status)}),p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:He(w.digest,8,6)})]})},{key:"kind",header:"Kind",render:w=>p.jsx("span",{className:"trunc",style:{fontSize:11.5,color:"var(--tx-mid)",maxWidth:180},title:w.kind,children:w.kind.replace(/Transaction$/,"")})},{key:"when",header:"When",align:"right",render:w=>p.jsx("span",{className:"tnum",style:{fontSize:11.5,color:"var(--tx-lo)"},children:w.timestampMs===null?"—":fn(w.timestampMs)}),sortVal:w=>w.timestampMs??0},{key:"chev",header:"",width:36,render:()=>p.jsx(xe,{name:"chevR",size:14,style:{color:"var(--tx-dim)"}})}],T=[{key:"id",header:"Object",render:w=>p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:He(w.id,8,6)})},{key:"type",header:"Type",render:w=>p.jsx("span",{className:"mono trunc",style:{fontSize:11.5,color:"var(--c-blue)",maxWidth:220},title:w.type,children:Dce(w.type)})},{key:"version",header:"Version",align:"right",render:w=>p.jsxs("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)"},children:["v",w.version]}),sortVal:w=>Number(w.version)},{key:"chev",header:"",width:36,render:()=>p.jsx(xe,{name:"chevR",size:14,style:{color:"var(--tx-dim)"}})}];return p.jsxs("div",{className:"col fade-up",style:{gap:18},children:[p.jsx(Oe,{pad:!0,children:p.jsxs("div",{className:"row between wrap",style:{gap:12,marginBottom:14},children:[p.jsxs("div",{className:"row",style:{gap:10},children:[p.jsx(FS,{address:n,size:28}),p.jsx("div",{className:"col",style:{gap:2},children:h?p.jsxs(p.Fragment,{children:[p.jsx("span",{style:{fontSize:15,fontWeight:560,color:"var(--c-magenta)"},children:h.name}),p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"configured account"})]}):p.jsx("span",{style:{fontSize:13,color:"var(--tx-mid)"},children:"Address"})})]}),p.jsx(bt,{text:n,display:He(n,10,6)})]})}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:"Owned objects",count:y.length})}),r.isLoading?p.jsx(Fi,{rows:5,cols:3}):p.jsx(Nn,{columns:T,rows:y,rowKey:w=>w.id,onRowClick:w=>Qo(w.id),empty:p.jsx(Ge,{icon:"box",title:"No owned objects"})})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"Balances"}),i.isLoading?p.jsx("span",{style:{fontSize:11.5,color:"var(--tx-dim)"},children:"Loading balances…"}):m.length===0?p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-dim)"},children:"No coin balances held by this address."}):p.jsx("div",{className:"col",style:{gap:7},children:m.map(w=>{const x=Mce(w.coinType);return p.jsxs("div",{className:"row between",children:[p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(el,{symbol:x,size:18}),p.jsx("span",{className:"mono",style:{fontSize:12},children:x})]}),p.jsx(Zo,{mist:w.balance,symbol:x})]},w.coinType)})})]})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsxs("div",{className:"panel-pad row between wrap",style:{padding:"12px 18px",gap:12},children:[p.jsx(Je,{title:"Transactions",count:o?g.length:void 0}),o&&p.jsx(nI,{options:Ice,value:l,onChange:u})]}),o===null?p.jsx("div",{className:"panel-pad",style:{padding:"4px 18px 16px"},children:p.jsx("span",{style:{fontSize:12,color:"var(--tx-dim)"},children:"Transaction history unavailable (no GraphQL endpoint on this stack)."})}):f.isLoading?p.jsx(Fi,{rows:5,cols:3}):p.jsx(Nn,{columns:S,rows:g,rowKey:w=>w.digest,onRowClick:w=>Ko(w.digest),empty:p.jsx(Ge,{icon:"box",title:l==="sent"?"No transactions sent from this address":"No transactions affecting this address"})})]})]})},Bce=(e,t)=>e.packages.some(n=>n.kind==="local"&&n.packageId===t),Uce=(e,t)=>e.packages.find(n=>n.packageId===t),nT=()=>p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,className:"col",style:{gap:12},children:[p.jsx(Kc,{w:180,h:18}),p.jsx(Kc,{w:"60%"}),p.jsx(Kc,{w:"40%"})]}),p.jsx(Oe,{style:{overflow:"hidden"},children:p.jsx(Fi,{rows:5,cols:3})})]}),Lce=(e,t)=>{if(!t||t<=0)return null;const n=(Date.now()-e)/t*100;return Math.max(0,Math.min(100,Math.round(n)))},zce=({chain:e,projection:t,unreachable:n})=>{const r=VS(e),i=I5(e),o=P5(e),l=B5(e,20),u=t.packages,f=r.data,h=i.data,y=h?Lce(h.epochStartMs,h.epochDurationMs):null,{rate:m,isTps:g}=JR(e.network,f?.checkpoint??null,f?.totalTransactions??null,f?.timestampMs??null),S=w=>w==null?"—":String(w),T=[{key:"digest",header:"Digest",render:w=>p.jsx("span",{className:"mono",style:{color:"var(--c-cyan)",fontSize:12.5},children:He(w.digest,8,4)})},{key:"sender",header:"Sender",render:w=>p.jsx("span",{className:"mono",style:{color:"var(--c-magenta)",fontSize:12},children:w.sender?He(w.sender,6,4):"—"})},{key:"kind",header:"Kind",render:w=>p.jsx("span",{style:{fontSize:12,color:"var(--tx-mid)"},children:w.kind})},{key:"gas",header:"Gas",align:"right",render:w=>p.jsx("span",{className:"mono tnum",style:{fontSize:12,color:"var(--tx-lo)"},children:w.gas.toLocaleString()}),sortVal:w=>w.gas},{key:"status",header:"Status",width:70,render:w=>p.jsx(mt,{token:w.status==="success"?"green":"red"})},{key:"when",header:"When",align:"right",render:w=>p.jsx("span",{className:"mono",style:{fontSize:11.5,color:"var(--tx-dim)"},children:w.timestampMs!=null?fn(w.timestampMs):"—"}),sortVal:w=>w.timestampMs??0}];return p.jsxs(p.Fragment,{children:[!n&&p.jsx(Cn,{tone:"info",title:`Connected to ${t.identity.network}${f?.chainId?` · chain ${f.chainId}`:""}`,children:"Live chain reads over the local node's gRPC endpoint. Lists walk back from the head checkpoint; no history is fabricated."}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Epoch",value:S(f?.epoch??h?.epoch),sub:y!=null?`${y}% elapsed`:void 0,icon:"clock"}),p.jsx(ht,{label:"Checkpoint",value:f?f.checkpoint.toLocaleString():"—",token:"cyan",icon:"box",live:!0}),p.jsx(ht,{label:"Total tx",value:f?.totalTransactions!=null?f.totalTransactions.toLocaleString():"—",sub:"since genesis",token:"magenta",icon:"hash"}),p.jsx(ht,{label:g?"TPS":"Throughput",value:m!=null?m.toFixed(2):"—",sub:g?"tx / s":"cp / s",token:"green",icon:"activity",live:m!=null}),p.jsx(ht,{label:"Protocol",value:S(h?.protocolVersion),sub:"version",icon:"hash"}),p.jsx(ht,{label:"Ref gas",value:o.data!=null?o.data.toLocaleString():"—",sub:"MIST",token:"green",icon:"zap"}),p.jsx("span",{title:"The lowest checkpoint the node still retains. Older checkpoints have been pruned, so chain reads can only go back this far.",style:{display:"block",minWidth:0},children:p.jsx(ht,{label:"Oldest checkpoint",value:f?.lowestAvailableCheckpoint!=null?f.lowestAvailableCheckpoint.toLocaleString():"—",sub:"earliest retained",icon:"layers"})})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.4fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:"Latest transactions"})}),l.isLoading?p.jsx(Fi,{rows:6,cols:5}):l.isError?p.jsx("div",{className:"panel-pad",children:p.jsx(Cn,{tone:"danger",title:"Couldn't load transactions",children:"The node rejected the checkpoint read. It may still be starting up."})}):p.jsx(Nn,{columns:T,rows:l.data??[],rowKey:w=>w.digest,onRowClick:w=>Ko(w.digest),empty:p.jsx(Ge,{icon:"hash",title:"No transactions yet"})})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:"Packages",count:u.length})}),p.jsxs("div",{className:"col",style:{padding:"0 0 8px"},children:[u.length===0&&p.jsx("div",{style:{padding:"0 18px 12px"},children:p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No packages published or tracked yet."})}),u.map(w=>{const x=w.kind==="local";return p.jsxs("button",{type:"button",className:"row between activity-row",onClick:()=>AR(w.packageId),style:{cursor:"pointer",background:"transparent",border:"none",textAlign:"left",width:"100%"},children:[p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx(mt,{token:x?"blue":"white"}),p.jsxs("div",{children:[p.jsxs("div",{style:{fontWeight:530,fontSize:13},children:[w.name,x&&p.jsx("span",{className:"badge",style:{height:17,fontSize:9.5,color:"var(--c-blue)",marginLeft:4},children:"published here"})]}),p.jsxs("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)"},children:[He(w.packageId,8,4),w.upgradeCapId?" · upgradeable":""]})]})]}),p.jsx(xe,{name:"chevR",size:15,style:{color:"var(--tx-dim)"}})]},w.key)})]})]})]})]})},$ce={public:"tx-mid",friend:"tx-mid",private:"tx-lo",unknown:"tx-lo"},HU=({chain:e,projection:t,id:n})=>{const r=z5(e,n),[i,o]=z.useState(null),l=r.data?.modules??[];if(z.useEffect(()=>{i===null&&l.length>0&&o(l[0].name)},[i,l]),r.isLoading)return p.jsx(nT,{});if(r.isError)return p.jsxs(Cn,{tone:"danger",title:"Package not found",children:["No package with id ",p.jsx("span",{className:"mono",children:He(n,10,6)})," exists on this node. Object ids that aren't packages won't resolve here."]});const u=r.data;if(!u)return p.jsx(Cn,{tone:"warn",title:"No data",children:"The node returned no detail for this package."});const f=Uce(t,u.id),h=f?.kind==="local",y=f?.name??He(u.id,8,6),m=l.find(T=>T.name===i)??l[0]??null,g=m?.functions??[],S=[{key:"fn",header:"Function",render:T=>p.jsx("span",{className:"mono",style:{fontSize:12.5,color:"var(--c-blue)"},children:T.name})},{key:"visibility",header:"Visibility",render:T=>p.jsx(Vt,{style:{height:19,fontSize:10.5,color:T.isEntry?"var(--c-yellow)":`var(--${$ce[T.visibility]??"tx-mid"})`},children:T.isEntry?"entry":T.visibility})},{key:"params",header:"Params",align:"right",render:T=>p.jsx("span",{className:"mono tnum",style:{color:"var(--tx-lo)"},children:T.params}),sortVal:T=>T.params}];return p.jsxs("div",{className:"col fade-up",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,children:[p.jsxs("div",{className:"row between wrap",style:{gap:12,marginBottom:14},children:[p.jsxs("div",{className:"row",style:{gap:10},children:[p.jsx(mt,{token:h?"blue":"white"}),p.jsx("h3",{style:{fontSize:16},children:y}),h&&p.jsx(Vt,{style:{height:19,fontSize:10,color:"var(--c-blue)"},children:"published by this stack"})]}),p.jsx(bt,{text:u.id,display:He(u.id,10,6)})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px,1fr))",gap:14},children:[p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Version"}),p.jsx("span",{className:"mono tnum",style:{fontSize:13},children:u.version!=null?`v${u.version}`:"—"})]}),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Modules"}),p.jsx("span",{className:"mono tnum",style:{fontSize:13},children:l.length})]}),f?.upgradeCapId&&p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Upgrade cap"}),p.jsx(bt,{text:f.upgradeCapId,display:He(f.upgradeCapId,5,3)})]}),f?.sourcePath&&p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Source"}),p.jsx("span",{className:"mono trunc",style:{fontSize:12,color:"var(--tx-mid)",maxWidth:220},title:f.sourcePath,children:f.sourcePath})]})]})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"200px 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"12px 14px"},children:p.jsx("span",{className:"eyebrow",children:"Modules"})}),p.jsxs("div",{className:"col",style:{padding:"0 0 8px"},children:[l.length===0&&p.jsx("span",{style:{padding:"4px 14px",color:"var(--tx-dim)",fontSize:12},children:"No modules."}),l.map(T=>{const w=m?.name===T.name;return p.jsxs("button",{type:"button",onClick:()=>o(T.name),className:"row",style:{gap:8,padding:"8px 14px",background:w?"var(--accent-soft)":"transparent",border:"none",color:w?"var(--tx-hi)":"var(--tx-mid)",fontFamily:"var(--font-mono)",fontSize:12.5,cursor:"pointer",textAlign:"left"},children:[p.jsx(xe,{name:"hash",size:13,style:{color:w?"var(--accent)":"var(--tx-dim)"}}),p.jsx("span",{className:"trunc",children:T.name})]},T.name)})]})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:m?`${m.name} — functions`:"Functions",count:g.length})}),p.jsx(Nn,{columns:S,rows:g,rowKey:T=>T.name,empty:p.jsx(Ge,{icon:"box",title:"No public functions"})})]})]})]})},qce=e=>(e.split("::").pop()??e).toUpperCase(),Vce=e=>{const t=e.split("<")[0];return t.split("::").slice(-2).join("::")||t||e},Fce=e=>e==="success"?"green":e==="failure"?"red":"dim",Gce=({owner:e})=>{if((e.kind==="AddressOwner"||e.kind==="ObjectOwner")&&e.address){const t=e.address,n=e.kind==="AddressOwner"?Fo:Qo;return p.jsx("button",{type:"button",onClick:()=>n(t),style:{background:"none",border:"none",padding:0,color:"var(--c-magenta)",fontSize:12.5,fontFamily:"var(--font-mono)",textAlign:"left"},children:He(t,8,6)})}return p.jsx(Vt,{style:{height:19,fontSize:10.5},children:e.kind})},Hce=({chain:e,projection:t,id:n})=>{const r=WR(e,n),i=L5(e,n),o=YR(e,n),l=KR(e,n),u=eT(t.endpoints),f=GU(u,n,"object");if(r.isLoading)return p.jsx(nT,{});if(r.isError)return p.jsxs(Cn,{tone:"danger",title:"Object not found",children:["No object with id ",p.jsx("span",{className:"mono",children:He(n,10,6)})," exists on this node, or it has been deleted/pruned."]});const h=r.data;if(!h)return p.jsx(Cn,{tone:"warn",title:"No data",children:"The node returned no detail for this object."});if(h.type==="package")return p.jsx(HU,{chain:e,projection:t,id:h.id});const y=Bce(t,h.id),m=i.data??[],g=o.data??[],S=l.data??[],T=f.data??[],w=[{key:"digest",header:"Digest",render:E=>p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(mt,{token:Fce(E.status)}),p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:He(E.digest,8,6)})]})},{key:"kind",header:"Kind",render:E=>p.jsx("span",{className:"trunc",style:{fontSize:11.5,color:"var(--tx-mid)",maxWidth:180},title:E.kind,children:E.kind.replace(/Transaction$/,"")})},{key:"when",header:"When",align:"right",render:E=>p.jsx("span",{className:"tnum",style:{fontSize:11.5,color:"var(--tx-lo)"},children:E.timestampMs===null?"—":fn(E.timestampMs)}),sortVal:E=>E.timestampMs??0},{key:"chev",header:"",width:36,render:()=>p.jsx(xe,{name:"chevR",size:14,style:{color:"var(--tx-dim)"}})}],x=[{key:"id",header:"Object",render:E=>p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--c-cyan)"},children:He(E.id,8,6)})},{key:"type",header:"Type",render:E=>p.jsx("span",{className:"mono trunc",style:{fontSize:11.5,color:"var(--c-blue)",maxWidth:220},title:E.type,children:Vce(E.type)})},{key:"chev",header:"",width:36,render:()=>p.jsx(xe,{name:"chevR",size:14,style:{color:"var(--tx-dim)"}})}],O=[{key:"name",header:"Name",render:E=>p.jsx("span",{className:"mono trunc",style:{fontSize:12,maxWidth:160},children:E.name})},{key:"type",header:"Type",render:E=>p.jsx("span",{className:"mono trunc",style:{fontSize:11.5,color:"var(--tx-lo)",maxWidth:150},children:E.type})},{key:"chev",header:"",width:36,render:()=>p.jsx(xe,{name:"chevR",size:14,style:{color:"var(--tx-dim)"}})}];return p.jsxs("div",{className:"col fade-up",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,children:[p.jsxs("div",{className:"row between wrap",style:{gap:12,marginBottom:14},children:[p.jsxs("div",{className:"row",style:{gap:10},children:[y&&p.jsx(mt,{token:"blue"}),p.jsx(bt,{text:h.id,display:He(h.id,10,6)}),y&&p.jsx(Vt,{style:{height:19,fontSize:10,color:"var(--c-blue)"},children:"published by this stack"})]}),p.jsxs(Vt,{style:{height:22,fontSize:11},children:["v",h.version]})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px,1fr))",gap:14},children:[p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Type"}),p.jsx("span",{className:"mono trunc",style:{fontSize:12.5,color:"var(--c-blue)",maxWidth:320},title:h.type,children:h.type})]}),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Owner"}),p.jsx("span",{style:{fontSize:12.5},children:p.jsx(Gce,{owner:h.owner})})]}),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Previous tx"}),h.previousTx?p.jsx("button",{type:"button",onClick:()=>Ko(h.previousTx),style:{background:"none",border:"none",padding:0,color:"var(--c-cyan)",fontSize:12.5,fontFamily:"var(--font-mono)",textAlign:"left"},children:He(h.previousTx,8,6)}):p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:"—"})]})]})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"Fields"}),p.jsx("div",{className:"logbox",style:{maxHeight:320},children:h.fields?p.jsx(iI,{data:h.fields}):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11.5},children:"No decoded Move content (package or wrapped object)."})})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"12px 16px"},children:p.jsx(Je,{title:"Dynamic fields",count:m.length})}),i.isLoading?p.jsx(Fi,{rows:4,cols:2}):p.jsx(Nn,{columns:O,rows:m,rowKey:E=>E.id,onRowClick:E=>Qo(E.id),empty:p.jsx(Ge,{icon:"box",title:"No dynamic fields"})})]})]}),(o.isLoading||g.length>0||S.length>0)&&p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad",style:{padding:"14px 18px"},children:p.jsx(Je,{title:"Owned objects",count:g.length})}),o.isLoading?p.jsx(Fi,{rows:4,cols:3}):p.jsx(Nn,{columns:x,rows:g,rowKey:E=>E.id,onRowClick:E=>Qo(E.id),empty:p.jsx(Ge,{icon:"box",title:"No owned objects"})})]}),S.length>0&&p.jsxs(Oe,{pad:!0,children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"Balances"}),p.jsx("div",{className:"col",style:{gap:7},children:S.map(E=>{const N=qce(E.coinType);return p.jsxs("div",{className:"row between",children:[p.jsxs("span",{className:"row",style:{gap:7},children:[p.jsx(el,{symbol:N,size:18}),p.jsx("span",{className:"mono",style:{fontSize:12},children:N})]}),p.jsx(Zo,{mist:E.balance,symbol:N})]},E.coinType)})})]})]}),p.jsxs(Oe,{style:{overflow:"hidden"},children:[p.jsx("div",{className:"panel-pad row between wrap",style:{padding:"12px 18px",gap:12},children:p.jsx(Je,{title:"Transactions",count:u?T.length:void 0})}),u===null?p.jsx("div",{className:"panel-pad",style:{padding:"4px 18px 16px"},children:p.jsx("span",{style:{fontSize:12,color:"var(--tx-dim)"},children:"Transaction history unavailable (no GraphQL endpoint on this stack)."})}):f.isLoading?p.jsx(Fi,{rows:5,cols:3}):p.jsx(Nn,{columns:w,rows:T,rowKey:E=>E.digest,onRowClick:E=>Ko(E.digest),empty:p.jsx(Ge,{icon:"box",title:"No transactions use this object"})})]})]})},Wce=({chain:e,digest:t})=>{const n=U5(e,t);if(n.isLoading)return p.jsx(nT,{});if(n.isError)return p.jsxs(Cn,{tone:"danger",title:"Transaction not found",children:["No transaction with digest ",p.jsx("span",{className:"mono",children:He(t,10,6)})," was found on this node. It may be from a different network or not yet executed."]});const r=n.data;if(!r)return p.jsx(Cn,{tone:"warn",title:"No data",children:"The node returned no detail for this digest."});const i=r.status==="success";return p.jsxs("div",{className:"col fade-up",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,children:[p.jsxs("div",{className:"row between wrap",style:{gap:12,marginBottom:14},children:[p.jsxs("div",{className:"row",style:{gap:10},children:[p.jsxs(Vt,{style:{borderColor:`color-mix(in oklab, var(--c-${i?"green":"red"}) 36%, var(--line-strong))`},children:[p.jsx(mt,{token:i?"green":"red"}),p.jsx("span",{style:{color:`var(--c-${i?"green":"red"})`,fontSize:11.5},children:r.status})]}),p.jsx(Vt,{style:{height:22,fontSize:11},children:r.kind})]}),p.jsx(bt,{text:r.digest,display:He(r.digest,10,6)})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px,1fr))",gap:14},children:[p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Sender"}),r.sender?p.jsx("button",{type:"button",className:"row",onClick:()=>Fo(r.sender),style:{background:"none",border:"none",padding:0,gap:6},children:p.jsx("span",{className:"mono",style:{color:"var(--c-magenta)",fontSize:12.5},children:He(r.sender,8,6)})}):p.jsx("span",{style:{fontSize:13,color:"var(--tx-lo)"},children:"—"})]}),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Timestamp"}),p.jsx("span",{style:{fontSize:13},children:r.timestampMs!=null?`${fn(r.timestampMs)} ago`:"—"})]}),p.jsxs("div",{className:"col",style:{gap:3},children:[p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"Checkpoint"}),p.jsx("span",{className:"mono tnum",style:{fontSize:13,color:"var(--c-cyan)"},children:r.checkpoint!=null?r.checkpoint.toLocaleString():"—"})]})]})]}),p.jsx(cne,{tx:r.effects}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"Events"}),r.events.length===0?p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No events emitted."}):p.jsx("div",{className:"col",style:{gap:14},children:r.events.map((o,l)=>p.jsxs("div",{className:"col",style:{gap:8},children:[p.jsx("span",{className:"mono trunc",style:{fontSize:12.5,color:"var(--c-blue)"},children:o.type}),p.jsx("div",{className:"logbox",children:o.fields?p.jsx(iI,{data:o.fields}):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11.5},children:"No decoded fields."})})]},l))})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx("div",{className:"eyebrow",style:{marginBottom:10},children:"Programmable transaction"}),r.commands.length===0?p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"No commands."}):p.jsx("div",{className:"col",style:{gap:4},children:r.commands.map((o,l)=>p.jsxs("div",{className:"row",style:{gap:9},children:[p.jsx("span",{className:"mono",style:{fontSize:11,color:"var(--tx-dim)",minWidth:18},children:l}),p.jsx("span",{className:"mono",style:{fontSize:12,color:"var(--tx-hi)"},children:o})]},l))})]})]})]})},Yce={tx:"Transaction",object:"Object",package:"Package",address:"Address"},Xce=({projection:e,chain:t})=>{const n=jR(),r=m4(n.param),[i,o]=z.useState(""),[l,u]=z.useState(!1),f=VS(t),h=t.rpcUrl===null||f.isError,y=async S=>{const T=S.trim();if(!T)return;const w=T.includes("::")?T.split("::")[0]:T;if(!V$(w)){Ko(T);return}if(t.rpcUrl===null){Fo(w);return}u(!0);try{const x=await _5(t.rpcUrl,w);x==="package"?AR(w):x==="object"?Qo(w):Fo(w)}catch{Fo(w)}finally{u(!1)}},m=()=>{const S=i;o(""),y(S)},g=[{label:"Explorer",onClick:r.kind!=="home"?y4:void 0}];return r.kind!=="home"&&g.push({label:Yce[r.kind]??"Detail"},{label:He(r.id,6,4)}),p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs("div",{className:"row between wrap",style:{gap:12},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:19},children:"Sui Explorer"}),r.kind==="home"?p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:13,margin:"3px 0 0"},children:"Browser-side explorer over the local node — reads the stack's gRPC endpoint directly."}):p.jsx("div",{style:{marginTop:6},children:p.jsx(une,{items:g})})]}),p.jsxs("div",{className:"row",style:{gap:8,background:"var(--bg-panel)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"0 12px",height:34,width:320,maxWidth:"100%"},children:[p.jsx(xe,{name:"search",size:15,style:{color:"var(--tx-lo)"}}),p.jsx("input",{value:i,onChange:S=>o(S.target.value),onKeyDown:S=>{S.key==="Enter"&&!l&&m()},disabled:l,placeholder:"Digest · object · address · package…",style:{background:"transparent",border:"none",outline:"none",color:"var(--tx-hi)",fontSize:12.5,flex:1,fontFamily:"var(--font-mono)"}}),l&&p.jsxs("span",{className:"row",style:{gap:6,flex:"none"},children:[p.jsx(mt,{token:"cyan",pulse:!0}),p.jsx("span",{style:{fontSize:11,color:"var(--tx-lo)"},children:"resolving…"})]})]})]}),h&&p.jsx(Cn,{tone:"danger",title:"Node unreachable",children:t.rpcUrl===null?"No gRPC endpoint is registered for this stack yet — chain reads are unavailable.":"Could not reach the local node over gRPC. Retrying in the background."}),r.kind==="tx"?p.jsx(Wce,{chain:t,digest:r.id}):r.kind==="object"?p.jsx(Hce,{chain:t,projection:e,id:r.id}):r.kind==="package"?p.jsx(HU,{chain:t,projection:e,id:r.id}):r.kind==="address"?p.jsx(Pce,{chain:t,projection:e,id:r.id}):p.jsx(zce,{chain:t,projection:e,unreachable:h})]})},Cr="—",Io=({label:e,children:t})=>p.jsxs("div",{className:"row between",style:{padding:"9px 0",borderBottom:"1px solid var(--line-faint)",gap:12},children:[p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:e}),p.jsx("span",{style:{textAlign:"right",minWidth:0},children:t})]}),lR=e=>(e.split("::").pop()??e)||e,Kce=e=>{if(e.name)return e.name;const t=lR(e.baseCoinType),n=lR(e.quoteCoinType);return t&&n?`${t} / ${n}`:e.poolId},Ux=(e,...t)=>{if(!e)return null;for(const n of t){const r=e[n];if(typeof r=="string"||typeof r=="number")return Gd(String(r));if(typeof r=="bigint")return Gd(r.toString())}return null},Qce=({pool:e,chain:t})=>{const n=WR(t,e.poolId),r=n.data?.fields??null,i=Ux(r,"tick_size","tickSize"),o=Ux(r,"lot_size","lotSize"),l=Ux(r,"min_size","minSize"),u={color:"var(--tx-lo)",fontSize:12};return p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx("span",{style:{fontWeight:550},children:e.pair})}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-dim)"},children:Cr}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-dim)"},children:Cr}),p.jsx("td",{className:"mono tnum",style:u,children:n.isLoading?"…":i??Cr}),p.jsx("td",{className:"mono tnum",style:u,children:n.isLoading?"…":o??Cr}),p.jsx("td",{className:"mono tnum",style:u,children:n.isLoading?"…":l??Cr}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-dim)"},children:Cr}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-dim)"},children:Cr}),p.jsx("td",{children:p.jsx(bt,{text:e.poolId,display:He(e.poolId,5,3)})})]})},Jce=({row:e,endpoint:t,chain:n})=>{const{success:r,info:i}=Br(),o=n.network,l=F5(t,o),u=l.data??[],f=l.isLoading,h=(e?u.find(T=>T.pluginKey===e.key):void 0)??u[0]??null,y=T=>p.jsx(Gs,{label:"DeepBook",icon:"box",row:e,token:"blue",subtitle:"CLOB · liquidity",phase:e?.phase??h?.pluginKey??"deepbook",actions:p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"btn btn-sm",onClick:()=>{const w=h?.pluginKey??e?.key;w&&Us(t,w).then(x=>x.ok?r(x.message??"Restart requested"):i(x.message??"Restart failed")).catch(x=>i(x instanceof Error?x.message:String(x)))},children:[p.jsx(xe,{name:"refresh",size:13})," Restart"]}),e&&p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:"Logs & events"})]}),children:T});if(f&&u.length===0)return y(p.jsx(Oe,{pad:!0,children:p.jsx(Ge,{icon:"box",title:"Loading DeepBook…"})}));if(!h)return y(p.jsx(Oe,{pad:!0,children:p.jsx(Ge,{icon:"box",title:"No DeepBook deployment",hint:"The control plane reports no resolved DeepBook plugin for this stack."})}));const m=h.pools.map(T=>({poolId:T.poolId,pair:Kce(T)})),g=!!h.indexerUrl,S=h.marketMakerRunning;return y(p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Pools",value:m.length,sub:"active",token:"blue",icon:"box"}),p.jsx(ht,{label:"24h volume",value:Cr,sub:g?"indexer":"no indexer",icon:"activity"}),p.jsx(ht,{label:"DEEP treasury",value:h.deepTreasuryId?"present":Cr,sub:h.deepTreasuryId?He(h.deepTreasuryId,5,3):"none",token:"cyan",icon:"coins"}),p.jsx(ht,{label:"Market maker",value:S?"Running":"Stopped",token:S?"green":"white",icon:"zap"})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Price"}),p.jsx(Ge,{icon:"activity",title:"Price feed unavailable",hint:"Mid-price history comes from the DeepBook indexer, which isn't reachable from the browser for this stack."})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Order book depth"}),p.jsx(Ge,{icon:"layers",title:"Depth unavailable",hint:"Order-book depth is served by the DeepBook indexer; not available here."})]})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Pools",count:m.length,right:p.jsx(Jr,{label:"No browser-safe seed mutation is exposed by the control plane.",children:p.jsxs("button",{className:"btn btn-sm",disabled:!0,children:[p.jsx(xe,{name:"drop",size:13})," Seed liquidity"]})})}),children:m.length===0?p.jsx(Ge,{icon:"box",title:"No pools",hint:"This deployment registered no pools."}):p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Pair"}),p.jsx("th",{children:"Price"}),p.jsx("th",{children:"24h"}),p.jsx("th",{children:"Tick"}),p.jsx("th",{children:"Lot"}),p.jsx("th",{children:"Min"}),p.jsx("th",{children:"Depth"}),p.jsx("th",{children:"Trades"}),p.jsx("th",{children:"Pool ID"})]})}),p.jsx("tbody",{children:m.map(T=>p.jsx(Qce,{pool:T,chain:n},T.poolId))})]})}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.1fr 1fr",gap:18,alignItems:"start"},children:[p.jsx(Oe,{header:p.jsx(Je,{title:"Pyth price feeds"}),children:p.jsx(Ge,{icon:"activity",title:"No Pyth feeds reported",hint:"Pyth lives inside DeepBook by default; the control plane exposes no feed snapshot for the dashboard, so none are shown rather than fabricated."})}),p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Market maker"}),p.jsx(Io,{label:"Status",children:p.jsxs("span",{className:"row",style:{gap:9,justifyContent:"flex-end"},children:[p.jsx("span",{style:{fontSize:12.5,color:S?"var(--c-green)":"var(--tx-lo)"},children:S?"running":"stopped"}),p.jsx(Jr,{label:"Read-only — no control-plane mutation to start/stop the market maker.",children:p.jsx("span",{style:{opacity:.6,pointerEvents:"none"},children:p.jsx(dne,{checked:S})})})]})}),p.jsx(Io,{label:"Spread",children:p.jsx(Jr,{label:"Read-only — the spread isn't exposed or mutable via the control plane.",children:p.jsx("span",{style:{opacity:.6},children:p.jsx(fne,{value:0,min:0,max:50,suffix:"bps",width:120})})})}),p.jsx("div",{style:{fontSize:11.5,color:"var(--tx-dim)",paddingTop:8},children:"Reflects the live deployment state. Controls are disabled until the control plane exposes a market-maker mutation."})]}),p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Addresses"}),p.jsx(Io,{label:"Package",children:h.packageId?p.jsx(bt,{text:h.packageId,display:He(h.packageId)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:Cr})}),p.jsx(Io,{label:"Registry",children:h.registryId?p.jsx(bt,{text:h.registryId,display:He(h.registryId)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:Cr})}),p.jsx(Io,{label:"Admin cap",children:h.adminCapId?p.jsx(bt,{text:h.adminCapId,display:He(h.adminCapId)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:Cr})}),p.jsx(Io,{label:"Mode",children:p.jsx(Vt,{style:{height:19,fontSize:11},children:h.mode})})]})]})]})]}))},Zce=eT,eue=e=>{const t=i=>i.name.toLowerCase().startsWith("walrus")||i.key.toLowerCase().includes("walrus");return(e.find(i=>t(i)&&i.kind==="local")??e.find(t))?.packageId??null},cR=e=>typeof e=="string"?e:typeof e=="number"?String(e):null,Jc=e=>typeof e=="number"?e:typeof e=="string"&&/^\d+$/.test(e)?Number(e):null,tue=e=>typeof e=="boolean"?e:null,nue=Pl(`
|
|
1312
|
+
query WalrusBlobTxs($fn: String!, $limit: Int!) {
|
|
1313
|
+
transactions(last: $limit, filter: { function: $fn }) {
|
|
1314
|
+
nodes {
|
|
1315
|
+
digest
|
|
1316
|
+
sender {
|
|
1317
|
+
address
|
|
1318
|
+
}
|
|
1319
|
+
effects {
|
|
1320
|
+
timestamp
|
|
1321
|
+
events {
|
|
1322
|
+
nodes {
|
|
1323
|
+
contents {
|
|
1324
|
+
type {
|
|
1325
|
+
repr
|
|
1326
|
+
}
|
|
1327
|
+
json
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
`),rue=(e,t)=>t!==null&&(e===null||t>=e),uR=(e,t,n,r)=>{const i=tT(t.effects?.timestamp);for(const o of t.effects?.events?.nodes??[]){if(!(o.contents?.type?.repr??"").endsWith(`::events::${r}`))continue;const u=o.contents?.json??{},f=cR(u.blob_id);if(f===null)continue;const h=e.get(f)??{objectId:null,size:null,registeredEpoch:null,endEpoch:null,certified:!1,deletable:null,timestampMs:null,digest:null,sender:null};h.objectId=h.objectId??cR(u.object_id),h.endEpoch=Jc(u.end_epoch)??h.endEpoch,h.deletable=h.deletable??tue(u.deletable),n==="register"?(h.size=Jc(u.size)??h.size,h.registeredEpoch=Jc(u.epoch)??h.registeredEpoch):h.certified=!0,rue(h.timestampMs,i)&&(h.timestampMs=i,h.digest=t.digest??h.digest,h.sender=t.sender?.address??h.sender),e.set(f,h)}},aue=async(e,t,n=25)=>{const r=tm(e),i=f=>r.query({query:nue,variables:{fn:f,limit:n}}).then(({data:h,errors:y})=>{if(y?.length)throw new Error(y.map(m=>m.message).join("; "));return h?.transactions?.nodes??[]}),[o,l]=await Promise.all([i(`${t}::system::register_blob`),i(`${t}::system::certify_blob`)]),u=new Map;for(const f of o)uR(u,f,"register","BlobRegistered");for(const f of l)uR(u,f,"certify","BlobCertified");return[...u.entries()].map(([f,h])=>({blobId:f,...h})).sort((f,h)=>(h.timestampMs??0)-(f.timestampMs??0)).slice(0,n)},iue=Pl(`
|
|
1336
|
+
query WalrusLatestEvent($type: String!) {
|
|
1337
|
+
events(last: 1, filter: { type: $type }) {
|
|
1338
|
+
nodes {
|
|
1339
|
+
contents {
|
|
1340
|
+
json
|
|
1341
|
+
}
|
|
1342
|
+
timestamp
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
`),sue=async(e,t)=>{const n=tm(e);for(const r of["EpochChangeDone","EpochChangeStart"]){const{data:i,errors:o}=await n.query({query:iue,variables:{type:`${t}::events::${r}`}});if(o?.length)throw new Error(o.map(f=>f.message).join("; "));const l=i?.events?.nodes[0];if(!l?.contents)continue;const u=Jc(l.contents.json.epoch);if(u!==null)return{epoch:u,changedAtMs:tT(l.timestamp)}}return null},oue=Pl(`
|
|
1347
|
+
query WalrusShards($type: String!) {
|
|
1348
|
+
events(last: 32, filter: { type: $type }) {
|
|
1349
|
+
nodes {
|
|
1350
|
+
contents {
|
|
1351
|
+
json
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
`),lue=async(e,t)=>{const n=tm(e),{data:r,errors:i}=await n.query({query:oue,variables:{type:`${t}::events::ShardsReceived`}});if(i?.length)throw new Error(i.map(u=>u.message).join("; "));let o=-1;const l=[];for(const u of r?.events?.nodes??[]){const f=u.contents?.json??{},h=Jc(f.epoch),y=Array.isArray(f.shards)?f.shards.length:null;h===null||y===null||(h>o&&(o=h,l.length=0),h===o&&l.push(y))}return o<0?null:{epoch:o,nodeCount:l.length,totalShards:l.reduce((u,f)=>u+f,0),perNode:l}},fR=5e3,up=15e3,rT=e=>e.graphqlUrl!==null&&e.packageId!==null,cue=(e,t=25)=>lt({queryKey:["walrus",e.network,e.packageId,"recentBlobs",t],queryFn:()=>aue(e.graphqlUrl,e.packageId,t),enabled:rT(e),staleTime:fR,refetchInterval:fR*2}),uue=e=>lt({queryKey:["walrus",e.network,e.packageId,"epoch"],queryFn:()=>sue(e.graphqlUrl,e.packageId),enabled:rT(e),staleTime:up,refetchInterval:up}),fue=e=>lt({queryKey:["walrus",e.network,e.packageId,"shards"],queryFn:()=>lue(e.graphqlUrl,e.packageId),enabled:rT(e),staleTime:up,refetchInterval:up}),qa="—",dR=({onClick:e,title:t,children:n})=>p.jsx("button",{type:"button",onClick:e,title:t,style:{background:"none",border:"none",padding:0,color:"var(--c-magenta)",fontSize:12.5,fontFamily:"inherit",textAlign:"left",cursor:"pointer"},children:n}),Bd=({label:e,children:t})=>p.jsxs("div",{className:"row between",style:{padding:"9px 0",borderBottom:"1px solid var(--line-faint)",gap:12},children:[p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:e}),p.jsx("span",{style:{textAlign:"right",minWidth:0},children:t})]}),due=async e=>{const t=e.replace(/\/+$/,""),n=[`${t}/v1/api`,t];let r="no response";for(const i of n)try{const o=await fetch(i,{method:"GET",mode:"cors"});if(o.ok)return{state:"reachable",detail:`HTTP ${o.status} · ${i}`};r=`HTTP ${o.status}`}catch(o){try{return await fetch(i,{method:"GET",mode:"no-cors"}),{state:"reachable",detail:`reachable (opaque) · ${i}`}}catch{r=o instanceof Error?o.message:String(o)}}return{state:"unreachable",detail:r}},hR=(e,t)=>e.find(n=>n.name===t)??null,hue=(e,t)=>e&&t<e.perNode.length?e.perNode[t]:null,pue=({row:e,endpoint:t,projection:n,chain:r})=>{const{success:i,info:o}=Br(),l=r.network,u=n.endpoints.filter(_=>_.name.startsWith("walrus")),f=hR(u,"walrus-aggregator"),h=hR(u,"walrus-publisher"),y=u.filter(_=>_.name.startsWith("walrus-node-")).sort((_,C)=>_.name.localeCompare(C.name,void 0,{numeric:!0})),m={graphqlUrl:Zce(n.endpoints),packageId:eue(n.packages),network:l},g=uue(m),S=fue(m),T=cue(m,25),w=S.data??null,x=T.data??[],[O,E]=z.useState({state:"probing",detail:""});z.useEffect(()=>{let _=!0;const C=f?.url??null;if(!C){E({state:"unreachable",detail:"no aggregator endpoint"});return}return E({state:"probing",detail:""}),due(C).then(I=>{_&&E(I)}),()=>{_=!1}},[f?.url,l]);const N=O.state==="reachable",k=y.length,A=g.data??null;return p.jsxs(Gs,{label:"Walrus",icon:"database",row:e,token:"cyan",subtitle:"decentralized storage",phase:e?.phase??"walrus",actions:p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"btn btn-sm",onClick:()=>{e?.key&&Us(t,e.key).then(_=>_.ok?i(_.message??"Restart requested"):o(_.message??"Restart failed")).catch(_=>o(_ instanceof Error?_.message:String(_)))},children:[p.jsx(xe,{name:"refresh",size:13})," Restart"]}),e&&p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:"Logs & events"})]}),children:[p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Cluster",value:O.state==="probing"?"…":N?`${k}/${k}`:`0/${k}`,sub:"nodes reachable",token:N?"green":O.state==="probing"?"yellow":"white",icon:"database"}),p.jsx(ht,{label:"Storage epoch",value:g.isPending?"…":A?.epoch??qa,sub:A?A.changedAtMs?fn(A.changedAtMs):void 0:g.isPending?void 0:"no epoch events",icon:"clock"}),p.jsx(ht,{label:"Blobs stored",value:T.isPending?"…":Gd(x.length),sub:x.length>0?"recent window":T.isPending?void 0:"none seen",token:"cyan",icon:"box"}),p.jsx(ht,{label:"Shards",value:S.isPending?"…":w?.totalShards??qa,sub:w?`${w.nodeCount} nodes`:S.isPending?void 0:"on-chain",token:"blue",icon:"hash"})]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.4fr",gap:18,alignItems:"start"},children:[p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Endpoints"}),p.jsx(Bd,{label:"Aggregator",children:f?p.jsx(bt,{text:f.url,display:nu(f)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:qa})}),p.jsx(Bd,{label:"Publisher",children:h?p.jsx(bt,{text:h.url,display:nu(h)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:qa})}),p.jsx(Bd,{label:"Proxy",children:p.jsx(Jr,{label:"No proxy endpoint is registered in the projection for this stack.",children:p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"not registered"})})}),p.jsx(Bd,{label:"Daemon",children:p.jsxs("span",{className:"row",style:{gap:6,justifyContent:"flex-end"},children:[p.jsx(mt,{token:N?"green":O.state==="probing"?"yellow":"red",pulse:O.state==="probing"}),p.jsx(Jr,{label:O.detail||"probing the aggregator daemon",children:p.jsx("span",{style:{fontSize:12.5,color:N?"var(--c-green)":O.state==="probing"?"var(--c-yellow)":"var(--c-red)"},children:O.state==="probing"?"probing":N?"reachable":"unreachable"})})]})})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Cluster nodes",count:k||void 0}),children:k===0?p.jsx(Ge,{icon:"database",title:"No cluster nodes",hint:"No per-node Walrus endpoints are registered for this stack."}):p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Node"}),p.jsx("th",{children:"Shards"}),p.jsx("th",{children:"Stake"}),p.jsx("th",{children:"Status"})]})}),p.jsx("tbody",{children:y.map((_,C)=>{const I=hue(w,C);return p.jsxs("tr",{children:[p.jsx("td",{className:"mono",style:{fontSize:12.5},children:_.name}),p.jsx("td",{className:"mono tnum",style:{color:I===null?"var(--tx-dim)":"var(--tx-hi)"},children:I===null?qa:I}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-dim)"},children:qa}),p.jsx("td",{children:p.jsx(hp,{status:e?.status??"ready"})})]},_.endpointKey)})})]})})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Recent blobs",count:x.length||void 0,right:p.jsx(Jr,{label:"Uploading needs the publisher encode/register/certify flow, which the dashboard doesn't implement.",children:p.jsxs("button",{className:"btn btn-sm",disabled:!0,children:[p.jsx(xe,{name:"download",size:13,style:{transform:"rotate(180deg)"}})," ","Upload"]})})}),children:T.isError?p.jsx(Ge,{icon:"box",title:"Blob list unavailable",hint:m.graphqlUrl===null?"No Sui GraphQL endpoint is registered for this stack.":m.packageId===null?"No Walrus package was found in the projection for this stack.":`GraphQL read failed: ${T.error instanceof Error?T.error.message:"unknown error"}`}):T.isPending?p.jsx(Ge,{icon:"box",title:"Loading recent blobs…",hint:"Querying the node's Sui GraphQL."}):x.length===0?p.jsx(Ge,{icon:"box",title:"No recent blobs",hint:"No register_blob / certify_blob transactions were found on-chain for this stack yet."}):p.jsxs("table",{className:"tbl",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Blob"}),p.jsx("th",{children:"Size"}),p.jsx("th",{children:"Epochs"}),p.jsx("th",{children:"When"}),p.jsx("th",{children:"State"})]})}),p.jsx("tbody",{children:x.map(_=>p.jsxs("tr",{children:[p.jsx("td",{className:"mono",style:{fontSize:12.5},children:_.objectId?p.jsx(dR,{onClick:()=>Qo(_.objectId),title:`blob_id ${_.blobId}`,children:He(_.objectId)}):p.jsx("span",{title:`blob_id ${_.blobId}`,children:He(_.blobId)})}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-mid)"},children:_.size===null?qa:zS(_.size)}),p.jsx("td",{className:"mono tnum",style:{color:"var(--tx-mid)"},children:_.registeredEpoch!==null&&_.endEpoch!==null?`${_.registeredEpoch} → ${_.endEpoch}`:_.endEpoch!==null?`→ ${_.endEpoch}`:qa}),p.jsx("td",{style:{color:"var(--tx-mid)",fontSize:12.5},children:_.digest?p.jsx(dR,{onClick:()=>Ko(_.digest),title:_.digest,children:_.timestampMs?fn(_.timestampMs):"tx"}):_.timestampMs?fn(_.timestampMs):qa}),p.jsx("td",{children:_.certified?p.jsx(Vt,{style:{height:18,fontSize:10,color:"var(--c-green)"},children:"certified"}):p.jsx(Vt,{style:{height:18,fontSize:10,color:"var(--c-yellow)"},children:"registered"})})]},_.blobId))})]})})]})]})},mue=async e=>{const n=`${e.replace(/\/+$/,"")}/health`;try{const r=await fetch(n,{method:"GET",mode:"cors"});return r.ok?{state:"healthy",detail:`HTTP ${r.status} · ${n}`}:{state:"unreachable",detail:`HTTP ${r.status} on ${n} (expected 2xx)`}}catch(r){try{return await fetch(n,{method:"GET",mode:"no-cors"}),{state:"healthy",detail:`reachable (opaque) · ${n}`}}catch{return{state:"unreachable",detail:r instanceof Error?r.message:String(r)}}}},yue={probing:"yellow",healthy:"green",unreachable:"yellow"},vue={probing:"probing",healthy:"healthy",unreachable:"unreachable"},gue=({row:e,pluginKey:t,endpoint:n,refresh:r,chain:i})=>{const{success:o,error:l}=Br(),u=i.network,f=G5(n,u),h=f.data?.[0]??null,y=f.isLoading,m=f.isError?f.error instanceof Error?f.error.message:String(f.error):null,[g,S]=z.useState({state:"probing",detail:""}),[T,w]=z.useState(!1),x=h?.keyServerUrl??null,O=z.useCallback(async()=>{if(!x)return;S({state:"probing",detail:""});const A=await mue(x);S(A)},[x]);z.useEffect(()=>{x?O():S({state:"unreachable",detail:"no key-server URL"})},[x,O]);const E=z.useCallback(async()=>{if(!T){w(!0);try{const A=await Us(n,e?.key??t);A.ok?o(A.message??"Seal restart requested"):l(A.message??"Seal restart failed"),await r()}catch(A){l(A instanceof Error?A.message:String(A))}finally{w(!1)}}},[T,n,e,t,o,l,r]),N=yue[g.state],k=g.state==="unreachable";return p.jsx(Gs,{label:"Seal",icon:"plug",row:e,token:"magenta",subtitle:"Threshold encryption · key-server set.",actions:p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"btn btn-sm",disabled:T,onClick:()=>{E()},children:[p.jsx(xe,{name:"refresh",size:13})," Restart"]}),e&&p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:"Logs & events"})]}),children:m?p.jsxs(Cn,{tone:"danger",title:"Seal info unavailable",children:["Couldn't load the Seal deployment from the control plane: ",m]}):y?p.jsx(Oe,{pad:!0,children:p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"Loading Seal deployment…"})}):h?p.jsxs(p.Fragment,{children:[k&&p.jsxs(Cn,{tone:"warn",title:"Key-server unreachable from the browser",action:p.jsxs("button",{className:"btn btn-sm",onClick:()=>{O()},children:[p.jsx(xe,{name:"refresh",size:13})," Probe"]}),children:["Couldn't reach the key-server's /health route. This may be a CORS or network issue from the browser rather than the server being down — encryption requests may still work in-process.",g.detail?` (${g.detail})`:""]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.5fr",gap:18,alignItems:"start"},children:[p.jsxs(Oe,{pad:!0,children:[p.jsx(Je,{title:"Key server"}),p.jsx(Po,{label:"Health",children:p.jsxs("span",{className:"row",style:{gap:6,justifyContent:"flex-end"},children:[p.jsx(mt,{token:N,pulse:g.state==="probing"}),p.jsx("span",{style:{fontSize:12.5,color:`var(--c-${N})`},children:vue[g.state]})]})}),p.jsx(Po,{label:"Mode",children:p.jsx(Vt,{style:{height:19,fontSize:11},children:h.mode})}),p.jsx(Po,{label:"Threshold",children:p.jsx("span",{className:"mono tnum",style:{fontSize:12.5},children:h.threshold})}),p.jsx(Po,{label:"Key servers",children:p.jsx("span",{className:"mono tnum",children:h.keyServers.length})}),p.jsx(Po,{label:"Object ID",children:p.jsx(bt,{text:h.objectId,display:He(h.objectId)})}),p.jsx(Po,{label:"Key-server URL",children:p.jsx(bt,{text:h.keyServerUrl,display:h.keyServerUrl.replace(/^https?:\/\//,"")})})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Key-server set",count:h.keyServers.length}),children:p.jsx(bue,{servers:h.keyServers})})]})]}):p.jsx(Oe,{children:p.jsx(Ge,{icon:"plug",title:"No Seal deployment in this stack",hint:"This stack doesn't run the Seal plugin, so there's no key-server set to show."})})})},Po=({label:e,children:t})=>p.jsxs("div",{className:"row between",style:{padding:"9px 0",borderBottom:"1px solid var(--line-faint)",gap:12},children:[p.jsx("span",{style:{fontSize:12.5,color:"var(--tx-lo)"},children:e}),p.jsx("span",{style:{textAlign:"right",minWidth:0},children:t})]}),bue=({servers:e})=>{const t=[{key:"objectId",header:"Object ID",render:n=>p.jsx(bt,{text:n.objectId,display:He(n.objectId,7,4)})},{key:"weight",header:"Weight",align:"right",width:90,sortVal:n=>n.weight,render:n=>p.jsx("span",{className:"mono tnum",style:{fontSize:12.5},children:n.weight})}];return p.jsx(Nn,{columns:t,rows:e,rowKey:n=>n.objectId,empty:p.jsx(Ge,{title:"No key servers configured"})})},xue=({row:e,pluginKey:t,endpoint:n,projection:r,refresh:i,chain:o})=>{const{success:l,error:u}=Br(),f=H5(n,o.network),h=f.data??[],y=f.isLoading,m=f.isError?f.error instanceof Error?f.error.message:String(f.error):null,[g,S]=z.useState(null),[T,w]=z.useState(!1),x=async()=>{if(!T){w(!0);try{const O=await Us(n,e?.key??t);O.ok?l(O.message??"Coin plugin restart requested"):u(O.message??"Coin plugin restart failed"),await i()}catch(O){u(O instanceof Error?O.message:String(O))}finally{w(!1)}}};return p.jsx(Gs,{label:"Coins",icon:"coins",row:e,token:"yellow",subtitle:"Coin registry · treasury caps.",actions:p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"btn btn-sm",disabled:T,onClick:()=>{x()},children:[p.jsx(xe,{name:"refresh",size:13})," Restart"]}),e&&p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:"Logs & events"})]}),children:m?p.jsxs(Cn,{tone:"danger",title:"Coin registry unavailable",children:["Couldn't load coin treasury caps from the control plane: ",m]}):y?p.jsx(Oe,{pad:!0,children:p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"Loading coin registry…"})}):h.length===0?p.jsx(Oe,{children:p.jsx(Ge,{icon:"coins",title:"No coins registered",hint:"This stack hasn't registered any coin treasury caps yet."})}):p.jsxs(p.Fragment,{children:[p.jsx(Oe,{header:p.jsx(Je,{title:"Coin registry",count:h.length}),children:p.jsx(Sue,{caps:h,chain:o,onMint:O=>S(E=>E?.fullCoinType===O.fullCoinType?null:O),activeMint:g?.fullCoinType??null})}),g&&p.jsx(Oue,{cap:g,accounts:r.accounts,endpoint:n,chain:o,onCancel:()=>S(null)})]})})},Sue=({caps:e,chain:t,onMint:n,activeMint:r})=>{const i=[{key:"coin",header:"Coin",render:o=>p.jsx(wue,{cap:o,chain:t})},{key:"type",header:"Type",render:o=>p.jsx(bt,{text:o.fullCoinType,display:o.fullCoinType})},{key:"decimals",header:"Decimals",align:"right",width:90,sortVal:o=>o.decimals,render:o=>p.jsx("span",{className:"mono tnum",style:{color:"var(--tx-lo)"},children:o.decimals})},{key:"supply",header:"Supply",align:"right",width:130,render:o=>p.jsx(Tue,{cap:o,chain:t})},{key:"source",header:"Source",width:110,render:o=>p.jsx(Vt,{style:{height:19,fontSize:10.5},children:o.source})},{key:"treasury",header:"Treasury cap",render:o=>o.treasuryCapId?p.jsx(bt,{text:o.treasuryCapId,display:He(o.treasuryCapId,5,3)}):p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})},{key:"action",header:"",width:110,render:o=>o.treasuryCapId?p.jsxs("button",{className:`btn btn-sm ${r===o.fullCoinType?"btn-primary":""}`.trimEnd(),onClick:l=>{l.stopPropagation(),n(o)},children:[p.jsx(xe,{name:"coins",size:13})," Mint"]}):p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:11.5},children:"no cap"})}];return p.jsx(Nn,{columns:i,rows:e,rowKey:o=>o.fullCoinType,activeKey:r??void 0})},wue=({cap:e,chain:t})=>{const n=$5(t,e.fullCoinType),r=e.symbol??e.fullCoinType.split("::").pop()??"?",i=n.data?.symbol??r;return p.jsxs("span",{className:"row",style:{gap:8},children:[p.jsx(el,{symbol:i,size:20}),p.jsx("span",{style:{fontWeight:550},children:i})]})},Tue=({cap:e,chain:t})=>{const n=q5(t,e.treasuryCapId??null);if(!e.treasuryCapId)return p.jsx(Jr,{label:"No treasury cap for this coin — total supply isn't readable.",children:p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})});if(n.isLoading)return p.jsx("span",{style:{color:"var(--tx-dim)"},children:"…"});if(n.isError||n.data==null)return p.jsx(Jr,{label:"Couldn't read total supply from the treasury cap object.",children:p.jsx("span",{style:{color:"var(--tx-dim)"},children:"—"})});const r=e.symbol??e.fullCoinType.split("::").pop()??"";return p.jsx(Zo,{mist:n.data,decimals:e.decimals,symbol:r})},Oue=({cap:e,accounts:t,endpoint:n,chain:r,onCancel:i})=>{const{success:o,error:l}=Br(),u=RS(),f=z.useMemo(()=>t.filter(E=>E.address),[t]),[h,y]=z.useState(f[0]?.address??""),[m,g]=z.useState(1e3),[S,T]=z.useState(!1),w=e.symbol??e.fullCoinType.split("::").pop()??"coin",x=!S&&h!==""&&Number.isInteger(m)&&m>0,O=async()=>{if(x){T(!0);try{const E=await g$(n,{coinType:e.fullCoinType,recipient:h,amountBaseUnits:F$(m,e.decimals)});E.ok?(o(`Minted ${m.toLocaleString()} ${w}${E.digest?` · ${E.digest}`:""}`),await u.invalidateQueries({queryKey:["chain",r.network,"totalSupply",e.treasuryCapId??null]}),i()):l(E.detail)}catch(E){l(E instanceof Error?E.message:String(E))}finally{T(!1)}}};return p.jsxs(Oe,{pad:!0,className:"fade-up",style:{maxWidth:480},children:[p.jsx(Je,{title:`Mint ${w}`}),p.jsxs("div",{className:"col",style:{gap:12},children:[p.jsx(PE,{label:"Recipient",children:p.jsxs(eI,{value:h,onChange:E=>y(E.target.value),children:[f.length===0&&p.jsx("option",{value:"",children:"No funded accounts"}),f.map(E=>p.jsxs("option",{value:E.address??"",children:[E.name," · ",He(E.address??"")]},E.key))]})}),p.jsx(PE,{label:"Amount",hint:`Whole ${w} (scaled by ${e.decimals} decimals)`,children:p.jsx(tI,{value:m,min:0,onChange:g,disabled:S})}),p.jsxs("div",{className:"row",style:{gap:8},children:[p.jsx("button",{className:"btn btn-primary grow",disabled:!x,onClick:()=>{O()},children:S?"Minting…":`Mint ${m.toLocaleString()} ${w}`}),p.jsx("button",{className:"btn",onClick:i,disabled:S,children:"Cancel"})]})]})]})},jue=({row:e,pluginKey:t,endpoint:n,refresh:r,chain:i})=>{const{success:o,error:l}=Br(),u=W5(n,i.network),f=u.data?.[0]??null,h=u.isLoading,y=u.isError?u.error instanceof Error?u.error.message:String(u.error):null,[m,g]=z.useState(!1),S=async()=>{if(!m){g(!0);try{const x=await Us(n,e?.key??t);x.ok?o(x.message??"Postgres restart requested"):l(x.message??"Postgres restart failed"),await r()}catch(x){l(x instanceof Error?x.message:String(x))}finally{g(!1)}}},T=f?.available??!1,w=f?Math.max(1,...f.tables.map(x=>x.totalBytes)):1;return p.jsx(Gs,{label:"Postgres",icon:"database",row:e,token:"blue",subtitle:"Indexer datastore · wire-protocol stats.",actions:p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"btn btn-sm",disabled:m,onClick:()=>{S()},children:[p.jsx(xe,{name:"refresh",size:13})," Restart"]}),e&&p.jsx("button",{className:"btn btn-sm btn-ghost",onClick:()=>Ct("activity"),children:"Logs & events"})]}),children:y?p.jsxs(Cn,{tone:"danger",title:"Postgres stats unavailable",children:["Couldn't load Postgres stats from the control plane: ",y]}):h?p.jsx(Oe,{pad:!0,children:p.jsx("span",{style:{color:"var(--tx-dim)",fontSize:12.5},children:"Loading Postgres stats…"})}):f?p.jsxs(p.Fragment,{children:[p.jsxs(Oe,{pad:!0,className:"row between wrap",style:{gap:12},children:[p.jsxs("div",{className:"row",style:{gap:12,minWidth:0},children:[p.jsx(xe,{name:"database",size:18,style:{color:"var(--c-blue)",flex:"none"}}),p.jsx(bt,{text:f.plainUrl,display:f.plainUrl})]}),p.jsx(Jr,{label:`psql "${f.plainUrl}"`,children:p.jsx(bt,{text:`psql "${f.plainUrl}"`,display:"Open psql",icon:"terminal",mono:!1})})]}),!T&&p.jsxs(Cn,{tone:"warn",title:"Postgres is not reporting healthy",children:["The control plane couldn't gather live stats.",f.detail?` (${f.detail})`:""]}),p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:14},children:[p.jsx(ht,{label:"Health",value:T?"OK":"Down",token:T?"green":"red",icon:"activity"}),p.jsx(ht,{label:"Index lag",value:p.jsx(Jr,{label:"Index/replication lag isn't reported by the control plane.",children:p.jsx("span",{children:"n/a"})}),token:"dim",icon:"clock"}),p.jsx(ht,{label:"DB size",value:zS(f.databaseBytes),icon:"database"}),p.jsx(ht,{label:"Connections",value:f.connectionCount,token:"cyan",icon:"plug"})]}),p.jsx(Oe,{header:p.jsx(Je,{title:"Tables",count:f.tables.length}),children:p.jsx(Aue,{tables:f.tables,maxBytes:w})})]}):p.jsx(Oe,{children:p.jsx(Ge,{icon:"database",title:"No Postgres in this stack",hint:"This stack doesn't run the Postgres plugin, so there's no datastore to inspect."})})})},Aue=({tables:e,maxBytes:t})=>{const n=[{key:"name",header:"Table",sortVal:r=>`${r.schema}.${r.name}`,render:r=>p.jsx("span",{className:"mono",style:{fontSize:12.5},children:r.schema==="public"?r.name:p.jsxs(p.Fragment,{children:[p.jsxs("span",{style:{color:"var(--tx-dim)"},children:[r.schema,"."]}),r.name]})})},{key:"rows",header:"Rows",align:"right",width:130,sortVal:r=>r.rowEstimate,render:r=>p.jsx(Jr,{label:"Live row estimate (pg_class.reltuples).",children:p.jsx("span",{className:"mono tnum",children:Gd(Math.round(r.rowEstimate))})})},{key:"size",header:"Size",align:"right",width:110,sortVal:r=>r.totalBytes,render:r=>p.jsx("span",{className:"mono tnum",style:{color:"var(--tx-lo)"},children:zS(r.totalBytes)})},{key:"fill",header:"",width:"36%",render:r=>p.jsx(rI,{value:r.totalBytes/t,token:"blue"})}];return p.jsx(Nn,{columns:n,rows:e,rowKey:r=>`${r.schema}.${r.name}`,empty:p.jsx(Ge,{title:"No tables",hint:"The indexer hasn't created any tables in this database yet."})})},Eue={deepbook:Jce,walrus:pue,seal:gue,coins:xue,postgres:jue},_ue=new Map(Vw.map(e=>[e.key,e])),WU=e=>{const t=_ue.get(e);return t?{label:t.label,icon:t.icon}:{label:LS(e),icon:"plug"}},Nue=({pluginKey:e,row:t})=>{const{label:n,icon:r}=WU(e);return p.jsx(Gs,{label:n,icon:r,row:t,children:p.jsx("div",{className:"panel",children:p.jsx(Ge,{icon:r,title:`${n} panel coming soon`,hint:"This plugin's domain view hasn't been wired to the dashboard yet."})})})},kue=({pluginKey:e})=>{const{label:t,icon:n}=WU(e);return p.jsx(Gs,{label:t,icon:n,row:null,subtitle:"Not part of this stack.",children:p.jsx("div",{className:"panel",children:p.jsx(Ge,{icon:n,title:`${t} isn't part of this stack`,hint:`Add \`${e}()\` to your devstack config to see this panel.`})})})},Gs=({label:e,icon:t,row:n,subtitle:r,token:i,phase:o,actions:l,children:u})=>{const f=i?`var(--c-${i})`:"var(--accent)",h=o??n?.phase??e;return p.jsxs("div",{className:"col",style:{gap:18},children:[p.jsxs("div",{className:"row between wrap",style:{gap:12},children:[p.jsxs("div",{className:"row",style:{gap:13},children:[p.jsx("div",{style:{width:42,height:42,borderRadius:11,display:"grid",placeItems:"center",background:`color-mix(in oklab, ${f} 16%, transparent)`,color:f,flex:"none",boxShadow:`0 0 0 1px color-mix(in oklab, ${f} 28%, transparent)`},children:p.jsx(xe,{name:t,size:21})}),p.jsxs("div",{children:[p.jsxs("div",{className:"row",style:{gap:10},children:[p.jsx("h2",{style:{fontSize:19},children:e}),n&&p.jsx(hp,{status:n.status})]}),p.jsxs("span",{style:{fontSize:12.5,color:"var(--tx-mid)"},children:[r??"Plugin control surface."," ·"," ",p.jsx("span",{className:"mono",style:{color:"var(--tx-lo)"},children:h})]})]})]}),l&&p.jsx("div",{className:"row",style:{gap:8},children:l})]}),u]})},Cue=e=>{const{pluginKey:t}=e,n=VR(e.projection.rows,t);if(n===null)return p.jsx(kue,{pluginKey:t});const r=Eue[t]??Nue;return p.jsx(r,{...e,row:n})},YU="devstack.gql",Mue="devstack.theme",XU="devstack.nav",_S=typeof window<"u"?new URL("/graphql",window.location.origin).toString():"/graphql",Due=()=>localStorage.getItem(YU)??_S,Rue=()=>document.documentElement.dataset.theme??"dark",Iue=()=>localStorage.getItem(XU)==="collapsed",Pue={overview:SB,services:Ene,activity:Vne,accounts:Wne,faucet:ere,explorer:Xce,controls:sre,config:cre},Bue="linear-gradient(180deg, color-mix(in oklab, var(--bg-panel) 70%, var(--bg-base)), var(--bg-base))",pR=({endpoint:e,onApply:t,onClose:n})=>{const[r,i]=z.useState(e);return p.jsx("div",{className:"overlay",onClick:n,children:p.jsxs("div",{className:"panel panel-pad col",onClick:o=>o.stopPropagation(),style:{width:460,maxWidth:"92vw",gap:14,boxShadow:"var(--sh-pop)"},children:[p.jsxs("div",{className:"row between",children:[p.jsx("h3",{style:{fontSize:15},children:"Dashboard endpoint"}),p.jsx(Ms,{icon:"x",label:"Close",onClick:n})]}),p.jsx("p",{style:{color:"var(--tx-mid)",fontSize:12.5,margin:0},children:"The devstack dashboard GraphQL endpoint. Persisted locally."}),p.jsx(Wd,{className:"mono",value:r,onChange:o=>i(o.target.value),placeholder:_S,spellCheck:!1}),p.jsxs("div",{className:"row",style:{gap:8,justifyContent:"flex-end"},children:[p.jsx(un,{onClick:n,children:"Cancel"}),p.jsx(un,{variant:"primary",onClick:()=>{t(r.trim()||_S),n()},children:"Apply"})]})]})})},Uue=({children:e})=>p.jsxs("div",{style:{position:"relative",height:"100%"},children:[p.jsx("div",{className:"atmos"}),p.jsx("div",{className:"col",style:{position:"relative",height:"100%",alignItems:"center",justifyContent:"center",zIndex:1,gap:16},children:e})]}),Lue=()=>{const e=Br(),t=jR(),[n,r]=z.useState(Due),[i,o]=z.useState(Rue),[l,u]=z.useState(Iue),[f,h]=z.useState(!1),[y,m]=z.useState(!1),g=s5(n),{projection:S}=g,T=z.useMemo(()=>Tne(S?.rows??[]),[S?.rows]),w=V5(n,S?.identity.network??"").data??null,x=z.useCallback(L=>{r(L),localStorage.setItem(YU,L)},[]),O=z.useCallback(()=>{o(L=>{const P=L==="dark"?"light":"dark";return document.documentElement.dataset.theme=P,localStorage.setItem(Mue,P),P})},[]),E=z.useCallback(()=>{u(L=>{const P=!L;return localStorage.setItem(XU,P?"collapsed":"rail"),P})},[]),N=z.useCallback(async(L,P)=>{try{const H=await P();H.ok?e.success(H.message??`${L} ok`):e.error(H.message??`${L} failed`),await g.refresh()}catch(H){e.error(H instanceof Error?H.message:String(H))}},[g,e]),k=z.useCallback(()=>{e.info("Restarting stack…"),N("Restart",()=>CR(n))},[n,N,e]),A=z.useCallback(()=>{N("Snapshot",()=>MR(n))},[n,N]),_=z.useCallback(()=>{N("Codegen",()=>DR(n))},[n,N]),C=z.useMemo(()=>{const L=One(T).map(H=>({id:`go:${H.id}`,label:`Go to ${H.label}`,icon:H.icon,run:()=>H.pluginKey?Ct("plugin",H.pluginKey):Ct(H.id)})),P=[{id:"act:restart",label:"Restart stack",icon:"refresh",run:k},{id:"act:snapshot",label:"Capture snapshot",icon:"camera",run:A},{id:"act:codegen",label:"Run codegen",icon:"cog",run:_},{id:"act:settings",label:"Edit dashboard endpoint",icon:"plug",run:()=>m(!0)}];return[...L,...P]},[T,k,A,_]);if(z.useEffect(()=>{const L=P=>{if((P.metaKey||P.ctrlKey)&&P.key.toLowerCase()==="k"){P.preventDefault(),h(K=>!K);return}const H=P.target;H instanceof HTMLInputElement||H instanceof HTMLSelectElement||H instanceof HTMLTextAreaElement||(H?.isContentEditable??!1)||P.metaKey||P.ctrlKey||P.altKey||(P.key==="/"?(P.preventDefault(),h(!0)):P.key==="r"?k():P.key==="s"?Ct("controls"):P.key==="l"&&Ct("activity"))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[k]),!S){const L=g.connection==="error";return p.jsxs(p.Fragment,{children:[p.jsx(Uue,{children:L?p.jsxs(p.Fragment,{children:[p.jsx(Ge,{icon:"alert",title:"Can't reach the dashboard API",hint:g.error??n}),p.jsx(un,{variant:"primary",icon:"plug",onClick:()=>m(!0),children:"Edit endpoint"})]}):p.jsxs("div",{className:"col",style:{alignItems:"center",gap:12},children:[p.jsx("span",{className:"dot dot-cyan dot-pulse",style:{width:12,height:12}}),p.jsxs("span",{style:{color:"var(--tx-mid)",fontSize:13},children:["Connecting to ",p.jsx("span",{className:"mono",children:n}),"…"]})]})}),y&&p.jsx(pR,{endpoint:n,onApply:x,onClose:()=>m(!1)})]})}const I=qS(S.rows),q={projection:S,activity:g.activity,endpoint:n,connection:g.connection,chain:{rpcUrl:u5(S.endpoints),network:S.identity.network},refresh:g.refresh},G=()=>{if(t.name==="plugin"&&t.param)return p.jsx(Cue,{...q,pluginKey:t.param});const L=Pue[t.name]??SB;return p.jsx(L,{...q})};return p.jsxs("div",{style:{position:"relative",height:"100%",display:"grid",gridTemplateColumns:`${l?"var(--nav-w-collapsed)":"var(--nav-w)"} 1fr`,gridTemplateRows:"minmax(0, 1fr)",zIndex:1,background:Bue},children:[p.jsx("div",{className:"atmos"}),p.jsx(mne,{sections:T,route:t.param?`${t.name}:${t.param}`:t.name,collapsed:l,onToggleCollapsed:E,phase:S.cycle.phase,cycleId:S.cycle.id,ready:I.ready,total:I.total,mode:w==="fork"?"fork":S.identity.network,failedCount:I.failed}),p.jsxs("div",{className:"col",style:{minWidth:0,minHeight:0,height:"100%"},children:[p.jsx(vne,{projection:S,mode:w,connection:g.connection,onOpenPalette:()=>h(!0),onToggleTheme:O,theme:i}),p.jsxs("main",{className:"scroll-y grow",style:{padding:"24px 26px",minHeight:0},children:[g.connection==="error"&&g.projection!=null&&p.jsx(Cn,{tone:"warn",title:"Reconnecting…",className:"mb-[18px]",children:"Lost the live connection — showing the last snapshot."}),p.jsx("div",{className:"fade-up",children:G()},t.param?`${t.name}:${t.param}`:t.name)]})]}),p.jsx(bne,{open:f,onClose:()=>h(!1),commands:C}),y&&p.jsx(pR,{endpoint:n,onApply:x,onClose:()=>m(!1)}),p.jsx("button",{type:"button",className:"iconbtn",onClick:()=>m(!0),title:"Dashboard endpoint","aria-label":"Dashboard endpoint",style:{position:"fixed",bottom:14,right:14,zIndex:50},children:p.jsx(xe,{name:"cog",className:"ic"})})]})},zue=()=>p.jsx(Z5,{children:p.jsx(Lue,{})});document.documentElement.dataset.theme=localStorage.getItem("devstack.theme")??"dark";const $ue=new Qz({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}),KU=document.getElementById("root");if(!KU)throw new Error("missing #root element");jz.createRoot(KU).render(p.jsx(z.StrictMode,{children:p.jsx(Jz,{client:$ue,children:p.jsx(zue,{})})}));export{ni as A,op as B,hie as C,sce as D,ice as E,Bse as F,ace as G,kle as H,pse as I,_se as J,AU as K,BU as L,me as M,Fse as N,Gue as O,zse as P,Qse as Q,lle as R,FD as S,Zw as T,cce as U,pa as V,ese as W,Zie as X,DB as Y,fce as a,cp as b,_le as c,Fue as d,tt as e,Vue as f,mS as g,Ut as h,Pn as i,Tle as j,RU as k,KD as l,que as m,jl as n,Kt as o,$U as p,Qie as q,Hue as r,Kn as s,Fs as t,roe as u,qU as v,Use as w,OU as x,Pse as y,Mle as z};
|