iobroker.eos-admin 9.0.21 → 9.0.24
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/NEXOWATT_EOS_BUILD_INFO.json +17 -11
- package/README.md +32 -8
- package/START_HIER_9.0.21.md +53 -0
- package/START_HIER_9.0.22.md +48 -0
- package/START_HIER_9.0.23.md +47 -0
- package/START_HIER_9.0.24.md +70 -0
- package/adminWww/.vite/manifest.json +55 -55
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
- package/adminWww/assets/{AdapterUpdateDialog-Dxl_b7Op.js → AdapterUpdateDialog-D7sI5VRm.js} +1 -1
- package/adminWww/assets/{Adapters-CVKKhXmI.js → Adapters-DS6ITaEH.js} +1 -1
- package/adminWww/assets/{ConfigManager-Bf6nTAkL.js → ConfigManager-_iFDSXuD.js} +1 -1
- package/adminWww/assets/{Enums-CJHVJY7t.js → Enums-Bdv7Tqmf.js} +1 -1
- package/adminWww/assets/{Fields-DWHbZKvm.js → Fields-CWUY1AnV.js} +1 -1
- package/adminWww/assets/{Files-a6owMTXA.js → Files-BveV1b_F.js} +1 -1
- package/adminWww/assets/{Hosts-LtEMeXpV.js → Hosts-B1HWZLGl.js} +1 -1
- package/adminWww/assets/{Instances-DhChziA1.js → Instances-DYvbOlj7.js} +1 -1
- package/adminWww/assets/{Intro-Cyq9gVDC.js → Intro-pYT2FzIK.js} +1 -1
- package/adminWww/assets/{Logs-wcramXsg.js → Logs-D2ZbCY3Z.js} +1 -1
- package/adminWww/assets/{Objects-DINVHd_e.js → Objects-CTUxbXJM.js} +1 -1
- package/adminWww/assets/{Overview-DK4R41zR.js → Overview-i6PsoN_F.js} +1 -1
- package/adminWww/assets/{State-DcEACXzL.js → State-BEQXNcI3.js} +1 -1
- package/adminWww/assets/{UsedResources-C1LcM0Rb.js → UsedResources-CLc1afk1.js} +1 -1
- package/adminWww/assets/{Users-DvDdSyDY.js → Users-DG6i7iqC.js} +1 -1
- package/adminWww/assets/{bootstrap-Dbj_GbnP.js → bootstrap-4KhX67tn.js} +4 -4
- package/adminWww/assets/{hostInit-BNFIx0-f.js → hostInit-B08JmaAP.js} +1 -1
- package/adminWww/assets/{icons-material-DVbdXNgr.js → icons-material-sOCHi6x9.js} +1 -1
- package/adminWww/assets/{index-CoKP1NSA.js → index-DHSNS0v8.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CMvku1F1.js → installSVGRenderer-CWaaO5tF.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-ac330bce.js → mf-entry-bootstrap-0-e7c54f7f.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-9.0.21.js → remoteEntry-eos-9.0.24.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosHistoryBackupScope.js +73 -0
- package/build/lib/eosHistoryBackupScope.js.map +1 -0
- package/build/lib/eosKiosk.js +348 -0
- package/build/lib/eosKiosk.js.map +1 -0
- package/build/lib/eosLegacyMigration.js +14 -3
- package/build/lib/eosLegacyMigration.js.map +1 -1
- package/build/lib/eosLicenseService.js +1 -1
- package/build/lib/eosLicenseService.js.map +1 -1
- package/build/lib/eosModuleConfigStore.js +1 -1
- package/build/lib/eosModuleConfigStore.js.map +1 -1
- package/build/lib/eosModuleHost.js +241 -21
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +40 -6
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleProcess.js +317 -0
- package/build/lib/eosModuleProcess.js.map +1 -0
- package/build/lib/eosModuleProcessProtocol.js +213 -0
- package/build/lib/eosModuleProcessProtocol.js.map +1 -0
- package/build/lib/eosModuleProcessWorker.js +279 -0
- package/build/lib/eosModuleProcessWorker.js.map +1 -0
- package/build/lib/eosPostgresProvisioning.js +189 -0
- package/build/lib/eosPostgresProvisioning.js.map +1 -0
- package/build/lib/eosRuntimeHealth.js +155 -0
- package/build/lib/eosRuntimeHealth.js.map +1 -0
- package/build/lib/eosUiProcess.js +689 -0
- package/build/lib/eosUiProcess.js.map +1 -0
- package/build/lib/eosUiProcessRpc.js +279 -0
- package/build/lib/eosUiProcessRpc.js.map +1 -0
- package/build/lib/eosUiProcessWorker.js +399 -0
- package/build/lib/eosUiProcessWorker.js.map +1 -0
- package/build/lib/eosUiSecretCodec.js +64 -0
- package/build/lib/eosUiSecretCodec.js.map +1 -0
- package/build/lib/eosUnifiedBoundary.js +28 -4
- package/build/lib/eosUnifiedBoundary.js.map +1 -1
- package/build/lib/eosUpdateSnapshot.js +32 -1
- package/build/lib/eosUpdateSnapshot.js.map +1 -1
- package/build/lib/web.js +104 -7
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.21/CRA_NACHWEISSTAND.md +159 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_BACKEND_REVIEW.md +30 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_UI_REVIEW.md +44 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_WORKER_REVIEW.md +147 -0
- package/docs/reports/unified-9.0.21/CUSTOMER_WORKER_ZWEITPRUEFUNG.md +108 -0
- package/docs/reports/unified-9.0.21/DEVICE_STABILITY_REVIEW.md +50 -0
- package/docs/reports/unified-9.0.21/EMS_STABILITAET.md +41 -0
- package/docs/reports/unified-9.0.21/HISTORY_TARIFF_STABILITY_REVIEW.md +48 -0
- package/docs/reports/unified-9.0.21/MQTT_ZWEITPRUEFUNG_EMS.md +47 -0
- package/docs/reports/unified-9.0.21/PERSISTENZ_STABILITAET.md +76 -0
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +64 -0
- package/docs/reports/unified-9.0.21/SECURITY_STABILITY_REVIEW.md +118 -0
- package/docs/reports/unified-9.0.21/UI_SECURITY_GATE_REVIEW.md +62 -0
- package/docs/reports/unified-9.0.21/UPDATE_HTTP_SNAPSHOT_PRUEFUNG.md +46 -0
- package/docs/reports/unified-9.0.21/raw/INDEX.json +1307 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.21/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.21/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/cra/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-glue/root-glue-focused-node24.tap +34 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/real920-archive-inspection.json +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node22.log +110 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node24.log +24 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/service-verification.json +54 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-service/typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/independent-worker-probes.cjs +109 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node22.tap +86 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node24.tap +20 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node22.tap +44 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node24.tap +13 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/receipt.json +89 -0
- package/docs/reports/unified-9.0.21/raw/customer-update-worker/receipt.json +42 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-catch-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node22.log +1968 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node24.log +337 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node22.log +1895 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node24.log +317 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node22.log +1959 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node24.log +327 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node22.log +36 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node24.log +28 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node22.log +15 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node22.log +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node24.log +14 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node22.log +74 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node24.log +46 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-drain-test-update.json +206 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-runtime-review.json +150 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-final.json +275 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/commands.json +134 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node22.log +3 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node24.log +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node22.log +2 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-command-replay-repro.cjs +38 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-shutdown-repro.cjs +31 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node22.log +322 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node24.log +55 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-evidence.py +23 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/run-final-evidence.py +20 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-920.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-921.json +1 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/source-hashes.json +16 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/ems/baseline-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/changed-files-eslint.json +1 -0
- package/docs/reports/unified-9.0.21/raw/ems/engine.patch +38 -0
- package/docs/reports/unified-9.0.21/raw/ems/eslint-delta.json +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/evidence.json +171 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-baseline-node24.log +124 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node22.log +56 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node24.log +15 -0
- package/docs/reports/unified-9.0.21/raw/ems/farm-owned-methods.patch +133 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node22.log +460 -0
- package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node24.log +82 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node22.log +153 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node24.log +39 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node24.log +33 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-queue-inheritance-before.log +28 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-baseline-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-initial-timing.log +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node22.log +44 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node24.log +13 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.cjs +23 -0
- package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.log +119 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node22.log +170 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node24.log +121 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node22.log +68 -0
- package/docs/reports/unified-9.0.21/raw/ems/nvp-node24.log +17 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-code-delta-inventory.json +32 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-farm-fingerprint-moves.json +74 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-policy-tests.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node22.log +5 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node24.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-initial.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-main-full-delta.patch +135 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-changes.json +93 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-findings-before.json +3185 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node22.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node24.json +28833 -0
- package/docs/reports/unified-9.0.21/raw/ems/ui-security-inventory-before.json +28991 -0
- package/docs/reports/unified-9.0.21/raw/ems/update-ui-reviewed-findings.cjs +59 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.21/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/frontend-installer-sbom.json +32 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-influx-sequence-node24.log +12 -0
- package/docs/reports/unified-9.0.21/raw/history/baseline920-outage-node24.log +64 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node22.log +38 -0
- package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node24.log +36 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-baseline-comparison.json +83 -0
- package/docs/reports/unified-9.0.21/raw/history/lint-scope.cjs +29 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node22.log +438 -0
- package/docs/reports/unified-9.0.21/raw/history/regression-node24.log +75 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node22.json +37 -0
- package/docs/reports/unified-9.0.21/raw/history/results-node24.json +66 -0
- package/docs/reports/unified-9.0.21/raw/history/run-checks.py +18 -0
- package/docs/reports/unified-9.0.21/raw/history/source-evidence.json +83 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.21/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.log +16 -0
- package/docs/reports/unified-9.0.21/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.21/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.log +13274 -0
- package/docs/reports/unified-9.0.21/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.log +2223 -0
- package/docs/reports/unified-9.0.21/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-http-draft-revision-node24.log +50 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-late-commit-overwrite-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/920-save-lifecycle-node24.log +59 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-backend-types.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-editor-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-eebus-editor-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-final-format-review.json +24 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-http-before.log +177 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-snapshot-before.log +80 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.log +1019 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.log +174 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.receipt.json +28 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-eslint-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.log +137 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.log +30 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.receipt.json +21 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-strict-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-typecheck-final.log +0 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-after.log +3 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-before-observation.json +25 -0
- package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-repro.cjs +7 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.pre-final-format.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/persistence/source-files.sha256 +14 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/obsolete-assets-920-added.json +94 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.log +49 -0
- package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.result.json +15 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.21/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/backend-typecheck.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node22.tap +495 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node24.tap +88 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node22.tap +179 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node24.tap +36 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/results.json +118 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node22.tap +63 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node24.tap +47 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node22.tap +148 -0
- package/docs/reports/unified-9.0.21/raw/security-stability/upload-node24.tap +30 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.21/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.21/raw/ui-security-final.result.json +14 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/baseline-ui.log +280 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/browser-preview.test.cjs +170 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/draft-regression.log +214 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/eos-updates-before.ts +171 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/results.json +90 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/source-evidence.json +30 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node22.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/type-node24.log +0 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node22.log +98 -0
- package/docs/reports/unified-9.0.21/raw/update-ui/ui-node24.log +22 -0
- package/docs/reports/unified-9.0.22/BACKUP_POSTGRES_FOLLOWUP.md +44 -0
- package/docs/reports/unified-9.0.22/ENERGIEFLUSS_BROWSERPRUEFUNG.md +40 -0
- package/docs/reports/unified-9.0.22/ENERGY_FLOW_BACKEND.md +44 -0
- package/docs/reports/unified-9.0.22/FLOW_TARIFF_INDEPENDENT_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.22/OCPP_STOP_WRITER_REVIEW.md +27 -0
- package/docs/reports/unified-9.0.22/POSTGRESQL_SYSTEM_SETUP.md +34 -0
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +85 -0
- package/docs/reports/unified-9.0.22/flow/PRUEFVERMERK.md +42 -0
- package/docs/reports/unified-9.0.22/flow/frontend-cadence-tests.log +37 -0
- package/docs/reports/unified-9.0.22/flow/frontend-source-hashes.json +13 -0
- package/docs/reports/unified-9.0.22/flow/frontend-tests.log +31 -0
- package/docs/reports/unified-9.0.22/postgres-history-review.md +43 -0
- package/docs/reports/unified-9.0.22/postgres-real-review.tap +21 -0
- package/docs/reports/unified-9.0.22/postgres-review-lint.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/postgres-review-unit-api.tap +25 -0
- package/docs/reports/unified-9.0.22/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/eslint-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-after.tap +13 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-before.tap +54 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-test-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/influx-real-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/scope-hashes.json +51 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-before.tap +96 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-flow.tap +12 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/tests-node24.tap +116 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup-scope.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-postgres-setup.log +0 -0
- package/docs/reports/unified-9.0.22/raw/current/admin-build.log +152 -0
- package/docs/reports/unified-9.0.22/raw/current/availability-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/backend-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-repairs.log +60 -0
- package/docs/reports/unified-9.0.22/raw/current/baseline-unified.log +1675 -0
- package/docs/reports/unified-9.0.22/raw/current/combined-fixes.log +65 -0
- package/docs/reports/unified-9.0.22/raw/current/control-final.log +25 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.json +244 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.json +63 -0
- package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/current/lint-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/lint.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/markdown-build.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/modules-build.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/pre-ocpp-full.log +2337 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.json +22 -0
- package/docs/reports/unified-9.0.22/raw/current/production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build-final.log +8 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-build.log +32 -0
- package/docs/reports/unified-9.0.22/raw/current/runtime-sync.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/safety-envelope-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom-lock-graph.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/sbom.log +6120 -0
- package/docs/reports/unified-9.0.22/raw/current/station-permission-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/storage-feedforward-final.log +1 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.22/raw/current/typecheck.log +5 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/eslint.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-tests.tap +124 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-availability.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-safety.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-station.txt +1 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-tests.tap +26 -0
- package/docs/reports/unified-9.0.22/raw/ems-control-points/typecheck.txt +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node22.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node24.tap +11 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/environment.json +7 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node22.tap +164 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/node24.tap +33 -0
- package/docs/reports/unified-9.0.22/raw/flow-backend/typecheck.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-runtime.json +11 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.json +49 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.stderr +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/build.log +18 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/environment.json +38 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/lint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node22.tap +144 -0
- package/docs/reports/unified-9.0.22/raw/history-ui/node24.tap +30 -0
- package/docs/reports/unified-9.0.22/raw/node22-tests-final.log +14086 -0
- package/docs/reports/unified-9.0.22/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/node24-tests-final.log +2356 -0
- package/docs/reports/unified-9.0.22/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node22.tap +72 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node24.tap +70 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/status-eslint.log +0 -0
- package/docs/reports/unified-9.0.22/raw/postgresql-system/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/MODULE_PROCESS_IMPLEMENTATION.md +43 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_ERGEBNIS.json +24 -0
- package/docs/reports/unified-9.0.23/OCPP_0.4.3_PRUEFBERICHT.md +50 -0
- package/docs/reports/unified-9.0.23/OCPP_AUTOMATISCHE_ZUORDNUNG.md +49 -0
- package/docs/reports/unified-9.0.23/OCPP_CM_INTEGRATION.md +31 -0
- package/docs/reports/unified-9.0.23/PROZESSDIAGNOSE.md +35 -0
- package/docs/reports/unified-9.0.23/PRUEFBERICHT.md +75 -0
- package/docs/reports/unified-9.0.23/UI_EMS_PROZESSGRENZE.md +36 -0
- package/docs/reports/unified-9.0.23/UI_PROCESS_INDEPENDENT_FOLLOWUP.md +33 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node22.tap +86 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review-node24.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.md +39 -0
- package/docs/reports/unified-9.0.23/module-process-contract-review.tap +20 -0
- package/docs/reports/unified-9.0.23/module-process-final.tap +27 -0
- package/docs/reports/unified-9.0.23/module-process-static.json +57 -0
- package/docs/reports/unified-9.0.23/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.23/raw/build-backend-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/build-frontend.log +152 -0
- package/docs/reports/unified-9.0.23/raw/build-installer.log +26 -0
- package/docs/reports/unified-9.0.23/raw/build-ui-final.log +7 -0
- package/docs/reports/unified-9.0.23/raw/current/evcs-stop-writer-ocpp043.txt +20 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-tests.txt +28 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-lint.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-tests.txt +27 -0
- package/docs/reports/unified-9.0.23/raw/current/runtime-health-types.txt +1 -0
- package/docs/reports/unified-9.0.23/raw/eos-production-audit.json +22 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node22.log +75 -0
- package/docs/reports/unified-9.0.23/raw/idle-pwa-node24.log +22 -0
- package/docs/reports/unified-9.0.23/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/node22-tests-final.log +14612 -0
- package/docs/reports/unified-9.0.23/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/node24-tests-final.log +2443 -0
- package/docs/reports/unified-9.0.23/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-auto-discovery.log +21 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-browser.json +55 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-discovery-lifecycle-regression.log +48 -0
- package/docs/reports/unified-9.0.23/raw/ocpp-production-audit.json +69 -0
- package/docs/reports/unified-9.0.23/raw/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/discovery-review.tap +21 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node22.tap +118 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/node24.tap +112 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/root-typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/typecheck.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-build-node24.tap +196 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-node22.tap +200 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-lint.log +0 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node22.tap +92 -0
- package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node24.tap +90 -0
- package/docs/reports/unified-9.0.23/ui-process-contract-review.md +30 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node22.tap +50 -0
- package/docs/reports/unified-9.0.23/ui-process-final-review-node24.tap +14 -0
- package/docs/reports/unified-9.0.23/ui-process-followup-hashes.json +13 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node22.tap +30 -0
- package/docs/reports/unified-9.0.23/ui-process-operational-review-node24.tap +11 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node22.tap +48 -0
- package/docs/reports/unified-9.0.23/ui-process-review-node24.tap +46 -0
- package/docs/reports/unified-9.0.24/BACKUP_INTEROP_PRUEFBERICHT.md +48 -0
- package/docs/reports/unified-9.0.24/KIOSK_FRONTEND_BROWSERPRUEFUNG.md +49 -0
- package/docs/reports/unified-9.0.24/KIOSK_UNABHAENGIGER_REVIEW.md +21 -0
- package/docs/reports/unified-9.0.24/OCPP_HOST_MIGRATION.md +41 -0
- package/docs/reports/unified-9.0.24/OCPP_NAMESPACE_REGELPFAD.md +55 -0
- package/docs/reports/unified-9.0.24/OCPP_UNABHAENGIGER_REVIEW.md +37 -0
- package/docs/reports/unified-9.0.24/OCPP_VERWALTUNG.md +33 -0
- package/docs/reports/unified-9.0.24/PRUEFBERICHT.md +54 -0
- package/docs/reports/unified-9.0.24/PUBLISH_OVERLAY_9_0_21.md +23 -0
- package/docs/reports/unified-9.0.24/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ems-independence-node24.tap +9 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node22.tap +175 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/final-node24.tap +35 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node22.tap +132 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node24.tap +27 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-review-node24.tap +13 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-update-snapshot-node24.tap +22 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-source.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/lint-tests.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/ocpp-backup-node24.tap +10 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/own-source-hashes.json +12 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/backup-interop/update-snapshot-node24.tap +20 -0
- package/docs/reports/unified-9.0.24/raw/build.log +200 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.stderr.txt +3 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.json +69 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.stderr.txt +2 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node22.txt +253 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node24.txt +52 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-lint.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-lease-registration-before.txt +28 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node22.txt +302 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node24.txt +55 -0
- package/docs/reports/unified-9.0.24/raw/current/ocpp-native-generic-before.txt +25 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.json +49 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.stderr.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/current/runtime-health-types.txt +0 -0
- package/docs/reports/unified-9.0.24/raw/eos-production-audit.json +77 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node22.log +16 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node24.log +14 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node22.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-browser-node24.json +57 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node22.log +215 -0
- package/docs/reports/unified-9.0.24/raw/kiosk-idle-node24.log +42 -0
- package/docs/reports/unified-9.0.24/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.24/raw/node22-tests-final.log +15517 -0
- package/docs/reports/unified-9.0.24/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/node24-tests-final.log +2595 -0
- package/docs/reports/unified-9.0.24/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node22.tap +105 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-node24.tap +24 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node22.tap +818 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node24.tap +140 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-hosted-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-legacy-mapping-browser.log +2 -0
- package/docs/reports/unified-9.0.24/raw/ocpp-namespace-control.log +49 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node22.tap +278 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-node24.tap +52 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance-922-923.json +32 -0
- package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance.json +19 -0
- package/docs/reports/unified-9.0.24/raw/typecheck.log +5 -0
- package/docs/unified/EMS_BEDIEN_DATENPUNKTE_9_0_22.md +51 -0
- package/docs/unified/HISTORY_UI_9_0_22.md +75 -0
- package/docs/unified/POSTGRESQL_9_0_22.md +89 -0
- package/io-package.json +16 -17
- package/modules/backup/README.md +10 -0
- package/modules/backup/RECOVERY-9.0.22.md +59 -0
- package/modules/backup/admin/index.html +2 -1
- package/modules/backup/admin/index.js +17 -1
- package/modules/backup/build/config.js +2 -0
- package/modules/backup/build/coverage.js +64 -0
- package/modules/backup/build/creators.js +22 -17
- package/modules/backup/build/databaseTargets.js +42 -0
- package/modules/backup/build/index.js +47 -4
- package/modules/backup/build/influxIntegrity.js +159 -0
- package/modules/backup/build/postgresHistory.js +91 -0
- package/modules/backup/build/preflight.js +3 -8
- package/modules/backup/build/publicTrust.js +46 -0
- package/modules/backup/build/restore-cli.js +72 -1
- package/modules/backup/build/storageRetention.js +26 -0
- package/modules/backup/build/worker.js +18 -1
- package/modules/backup/src/config.ts +2 -0
- package/modules/backup/src/coverage.ts +50 -0
- package/modules/backup/src/creators.ts +20 -17
- package/modules/backup/src/databaseTargets.ts +45 -0
- package/modules/backup/src/index.ts +37 -4
- package/modules/backup/src/influxIntegrity.ts +125 -0
- package/modules/backup/src/postgresHistory.ts +66 -0
- package/modules/backup/src/preflight.ts +3 -10
- package/modules/backup/src/publicTrust.ts +34 -0
- package/modules/backup/src/restore-cli.ts +55 -4
- package/modules/backup/src/storageRetention.ts +20 -0
- package/modules/backup/src/types.ts +5 -0
- package/modules/backup/src/worker.ts +18 -2
- package/modules/backup/test/completeness.test.cjs +193 -0
- package/modules/backup/test/hosted.test.cjs +43 -3
- package/modules/backup/test/influx-real.test.cjs +75 -0
- package/modules/backup/test/lifecycle.test.cjs +7 -5
- package/modules/backup/test/ocpp-coverage.test.cjs +152 -0
- package/modules/devices/admin/index.html +1 -1
- package/modules/eebus/admin/index.html +1 -1
- package/modules/ocpp/LICENSE +21 -0
- package/modules/ocpp/README.md +61 -0
- package/modules/ocpp/admin/config-fields.json +353 -0
- package/modules/ocpp/admin/index.html +52 -0
- package/modules/ocpp/admin/index.js +228 -0
- package/modules/ocpp/admin/style.css +27 -0
- package/modules/ocpp/build/index.js +401 -0
- package/modules/ocpp/build/operationGuard.js +26 -0
- package/modules/ocpp/build/server.js +155 -0
- package/modules/ocpp/eslint.config.mjs +13 -0
- package/modules/ocpp/index.js +3 -0
- package/modules/ocpp/native-defaults.json +44 -0
- package/modules/ocpp/ocpp/common.js +646 -0
- package/modules/ocpp/ocpp/compact.js +332 -0
- package/modules/ocpp/ocpp/configuration.js +364 -0
- package/modules/ocpp/ocpp/eos-contract.js +149 -0
- package/modules/ocpp/ocpp/freshness.d.ts +10 -0
- package/modules/ocpp/ocpp/freshness.js +272 -0
- package/modules/ocpp/ocpp/schemas/NOTICE.md +17 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_0_1_official.json +1 -0
- package/modules/ocpp/ocpp/schemas/ocpp2_1_official.json +1 -0
- package/modules/ocpp/ocpp/server.js +3 -0
- package/modules/ocpp/ocpp/v16.js +213 -0
- package/modules/ocpp/ocpp/v201.js +4 -0
- package/modules/ocpp/ocpp/v21.js +4 -0
- package/modules/ocpp/ocpp/v2base.js +255 -0
- package/modules/ocpp/package.json +11 -0
- package/modules/ocpp/provenance.json +33 -0
- package/modules/ocpp/runtime.d.ts +16 -0
- package/modules/ocpp/runtime.js +3391 -0
- package/modules/ocpp/src/index.ts +463 -0
- package/modules/ocpp/src/operationGuard.ts +29 -0
- package/modules/ocpp/src/server.ts +193 -0
- package/modules/ocpp/test/configuration-runtime.test.js +786 -0
- package/modules/ocpp/test/core.test.js +772 -0
- package/modules/ocpp/test/eos-contract.test.js +67 -0
- package/modules/ocpp/test/hosted.test.cjs +165 -0
- package/modules/ocpp/tsconfig.json +7 -0
- package/modules/ocpp/validation/manifest.json +36 -0
- package/modules/ocpp/validation/node22-tests.log +525 -0
- package/modules/ocpp/validation/node24-tests.log +92 -0
- package/package.json +27 -11
- package/public/eos-migration/index.html +1 -1
- package/public/eos-migration/index.js +2 -2
- package/public/eos-runtime/index.html +35 -0
- package/public/eos-runtime/index.js +111 -0
- package/public/eos-runtime/style.css +18 -0
- package/release-manifests/unified/build-environment.cdx.json +767 -131
- package/release-manifests/unified/files.json +612 -207
- package/release-manifests/unified/obsolete-admin-assets.json +210 -6
- package/release-manifests/unified/runtime.cdx.json +871 -143
- package/release-manifests/unified/validation.json +15 -15
- package/reports/unified/ocpp-pure-pv-9.0.22/PRUEFVERMERK.md +35 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/auto-pv-phases.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/control-tests.log +11 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/ocpp-stability.log +1 -0
- package/reports/unified/ocpp-pure-pv-9.0.22/raw/rc60.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/PRUEFVERMERK.md +44 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/focused-tests.log +37 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/grid-charge-policy.log +1 -0
- package/reports/unified/tariff-energy-flow-9.0.22/raw/status-truth.log +1 -0
- package/tools/eos-release-check.cjs +5 -0
- package/tools/eos-release-manifest.cjs +3 -3
- package/tools/eos-sbom-vendored.cjs +2 -1
- package/tools/system/eos-postgresql-setup.cjs +409 -0
- package/tsconfig.eos-history-backup-scope.json +9 -0
- package/tsconfig.eos-postgres-system.json +15 -0
- package/ui/admin/react/assets/index-wHWXfD_g.js +13 -0
- package/ui/admin/react/index.html +1 -1
- package/ui/ems/consumers/evcs.js +11 -7
- package/ui/ems/datapoints.js +14 -5
- package/ui/ems/engine.js +4 -1
- package/ui/ems/modules/charging-management.js +193 -63
- package/ui/ems/modules/core-limits.js +15 -20
- package/ui/ems/modules/storage-control.js +8 -6
- package/ui/ems/modules/tarif-vis.js +7 -2
- package/ui/ems/modules/tariff-status.js +19 -1
- package/ui/eslint.postgres-history.config.mjs +9 -0
- package/ui/io-package.json +5 -1
- package/ui/lib/ems-control-values.js +64 -0
- package/ui/lib/flow-measurement.js +72 -0
- package/ui/lib/hosted-adapter.js +12 -1
- package/ui/lib/influx-history-runtime.js +66 -24
- package/ui/lib/installer-lifecycle.js +4 -2
- package/ui/lib/ocpp-auto-discovery.js +397 -0
- package/ui/lib/ocpp-limit-feedback.js +166 -0
- package/ui/lib/partner-runtime.js +35 -2
- package/ui/lib/partner-websocket.js +4 -1
- package/ui/lib/postgres-history-config.js +57 -0
- package/ui/lib/postgres-history.js +344 -0
- package/ui/lib/runtime-proxy-html.js +34 -1
- package/ui/lib/smarthome-device-controls.js +4 -1
- package/ui/lib/ui-access-policy.js +39 -6
- package/ui/main.js +392 -222
- package/ui/package.json +1 -1
- package/ui/tsconfig.postgres-history.json +4 -0
- package/ui/www/app.js +106 -152
- package/ui/www/auth.js +36 -10
- package/ui/www/charging-diagnostics-appcenter.js +1 -0
- package/ui/www/customer-tariff.js +1 -0
- package/ui/www/dashboard-lp-status.js +1 -0
- package/ui/www/dc-station-display.js +1 -0
- package/ui/www/ems-apps.js +48 -8
- package/ui/www/energy-origin-appcenter.js +1 -0
- package/ui/www/energy-origin-ledger-view.js +1 -0
- package/ui/www/eos-kiosk-settings.js +174 -0
- package/ui/www/eos-session-idle.js +40 -6
- package/ui/www/eos-updates.js +1 -0
- package/ui/www/index.html +2 -1
- package/ui/www/license.js +1 -0
- package/ui/www/licenses/smarthome-markdown-components.json +157 -157
- package/ui/www/live-display.js +4 -2
- package/ui/www/login.js +19 -7
- package/ui/www/manifest.webmanifest +3 -3
- package/ui/www/netoperator-appcenter.js +1 -0
- package/ui/www/netoperator.js +1 -0
- package/ui/www/operating-strategies-appcenter.js +1 -0
- package/ui/www/operating-strategies-rule-builder.js +1 -0
- package/ui/www/power-measurements.js +27 -2
- package/ui/www/pwa.js +1 -0
- package/ui/www/runtime-base.js +1 -0
- package/ui/www/settings.html +13 -1
- package/ui/www/smarthome-activation.js +1 -0
- package/ui/www/smarthome-alias-config.js +1 -0
- package/ui/www/smarthome-custom-config.js +1 -0
- package/ui/www/smarthome-custom-views.js +1 -0
- package/ui/www/smarthome-device-categories.js +1 -0
- package/ui/www/smarthome-device-config.js +1 -0
- package/ui/www/smarthome-device-controls.js +1 -0
- package/ui/www/smarthome-feedback.js +1 -0
- package/ui/www/smarthome-layout-editor.js +1 -0
- package/ui/www/smarthome-presentation.js +1 -0
- package/ui/www/smarthome-setup.js +1 -0
- package/ui/www/smarthome-touch.js +1 -0
- package/ui/www/storagefarm-dispatch.js +1 -0
- package/ui/www/storagefarm-summary.js +1 -0
- package/ui/www/tariff-display.js +62 -2
- package/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))d(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&d(m)}).observe(document,{childList:!0,subtree:!0});function o(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function d(c){if(c.ep)return;c.ep=!0;const h=o(c);fetch(c.href,h)}})();function Mf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var mo={exports:{}},Ii={},go={exports:{}},je={};var Zd;function xm(){if(Zd)return je;Zd=1;var r=Symbol.for("react.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.iterator;function C(b){return b===null||typeof b!="object"?null:(b=E&&b[E]||b["@@iterator"],typeof b=="function"?b:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,D={};function N(b,L,pe){this.props=b,this.context=L,this.refs=D,this.updater=pe||O}N.prototype.isReactComponent={},N.prototype.setState=function(b,L){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,L,"setState")},N.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function V(){}V.prototype=N.prototype;function U(b,L,pe){this.props=b,this.context=L,this.refs=D,this.updater=pe||O}var M=U.prototype=new V;M.constructor=U,P(M,N.prototype),M.isPureReactComponent=!0;var te=Array.isArray,ne=Object.prototype.hasOwnProperty,xe={current:null},Ee={key:!0,ref:!0,__self:!0,__source:!0};function ee(b,L,pe){var ke,$={},re=null,ge=null;if(L!=null)for(ke in L.ref!==void 0&&(ge=L.ref),L.key!==void 0&&(re=""+L.key),L)ne.call(L,ke)&&!Ee.hasOwnProperty(ke)&&($[ke]=L[ke]);var ue=arguments.length-2;if(ue===1)$.children=pe;else if(1<ue){for(var we=Array(ue),Ve=0;Ve<ue;Ve++)we[Ve]=arguments[Ve+2];$.children=we}if(b&&b.defaultProps)for(ke in ue=b.defaultProps,ue)$[ke]===void 0&&($[ke]=ue[ke]);return{$$typeof:r,type:b,key:re,ref:ge,props:$,_owner:xe.current}}function be(b,L){return{$$typeof:r,type:b.type,key:L,ref:b.ref,props:b.props,_owner:b._owner}}function z(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function ae(b){var L={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(pe){return L[pe]})}var j=/\/+/g;function H(b,L){return typeof b=="object"&&b!==null&&b.key!=null?ae(""+b.key):L.toString(36)}function me(b,L,pe,ke,$){var re=typeof b;(re==="undefined"||re==="boolean")&&(b=null);var ge=!1;if(b===null)ge=!0;else switch(re){case"string":case"number":ge=!0;break;case"object":switch(b.$$typeof){case r:case l:ge=!0}}if(ge)return ge=b,$=$(ge),b=ke===""?"."+H(ge,0):ke,te($)?(pe="",b!=null&&(pe=b.replace(j,"$&/")+"/"),me($,L,pe,"",function(Ve){return Ve})):$!=null&&(z($)&&($=be($,pe+(!$.key||ge&&ge.key===$.key?"":(""+$.key).replace(j,"$&/")+"/")+b)),L.push($)),1;if(ge=0,ke=ke===""?".":ke+":",te(b))for(var ue=0;ue<b.length;ue++){re=b[ue];var we=ke+H(re,ue);ge+=me(re,L,pe,we,$)}else if(we=C(b),typeof we=="function")for(b=we.call(b),ue=0;!(re=b.next()).done;)re=re.value,we=ke+H(re,ue++),ge+=me(re,L,pe,we,$);else if(re==="object")throw L=String(b),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return ge}function q(b,L,pe){if(b==null)return b;var ke=[],$=0;return me(b,ke,"","",function(re){return L.call(pe,re,$++)}),ke}function ce(b){if(b._status===-1){var L=b._result;L=L(),L.then(function(pe){(b._status===0||b._status===-1)&&(b._status=1,b._result=pe)},function(pe){(b._status===0||b._status===-1)&&(b._status=2,b._result=pe)}),b._status===-1&&(b._status=0,b._result=L)}if(b._status===1)return b._result.default;throw b._result}var Se={current:null},W={transition:null},oe={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:W,ReactCurrentOwner:xe};function K(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:q,forEach:function(b,L,pe){q(b,function(){L.apply(this,arguments)},pe)},count:function(b){var L=0;return q(b,function(){L++}),L},toArray:function(b){return q(b,function(L){return L})||[]},only:function(b){if(!z(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},je.Component=N,je.Fragment=o,je.Profiler=c,je.PureComponent=U,je.StrictMode=d,je.Suspense=p,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,je.act=K,je.cloneElement=function(b,L,pe){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var ke=P({},b.props),$=b.key,re=b.ref,ge=b._owner;if(L!=null){if(L.ref!==void 0&&(re=L.ref,ge=xe.current),L.key!==void 0&&($=""+L.key),b.type&&b.type.defaultProps)var ue=b.type.defaultProps;for(we in L)ne.call(L,we)&&!Ee.hasOwnProperty(we)&&(ke[we]=L[we]===void 0&&ue!==void 0?ue[we]:L[we])}var we=arguments.length-2;if(we===1)ke.children=pe;else if(1<we){ue=Array(we);for(var Ve=0;Ve<we;Ve++)ue[Ve]=arguments[Ve+2];ke.children=ue}return{$$typeof:r,type:b.type,key:$,ref:re,props:ke,_owner:ge}},je.createContext=function(b){return b={$$typeof:m,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:h,_context:b},b.Consumer=b},je.createElement=ee,je.createFactory=function(b){var L=ee.bind(null,b);return L.type=b,L},je.createRef=function(){return{current:null}},je.forwardRef=function(b){return{$$typeof:g,render:b}},je.isValidElement=z,je.lazy=function(b){return{$$typeof:S,_payload:{_status:-1,_result:b},_init:ce}},je.memo=function(b,L){return{$$typeof:x,type:b,compare:L===void 0?null:L}},je.startTransition=function(b){var L=W.transition;W.transition={};try{b()}finally{W.transition=L}},je.unstable_act=K,je.useCallback=function(b,L){return Se.current.useCallback(b,L)},je.useContext=function(b){return Se.current.useContext(b)},je.useDebugValue=function(){},je.useDeferredValue=function(b){return Se.current.useDeferredValue(b)},je.useEffect=function(b,L){return Se.current.useEffect(b,L)},je.useId=function(){return Se.current.useId()},je.useImperativeHandle=function(b,L,pe){return Se.current.useImperativeHandle(b,L,pe)},je.useInsertionEffect=function(b,L){return Se.current.useInsertionEffect(b,L)},je.useLayoutEffect=function(b,L){return Se.current.useLayoutEffect(b,L)},je.useMemo=function(b,L){return Se.current.useMemo(b,L)},je.useReducer=function(b,L,pe){return Se.current.useReducer(b,L,pe)},je.useRef=function(b){return Se.current.useRef(b)},je.useState=function(b){return Se.current.useState(b)},je.useSyncExternalStore=function(b,L,pe){return Se.current.useSyncExternalStore(b,L,pe)},je.useTransition=function(){return Se.current.useTransition()},je.version="18.3.1",je}var qd;function $o(){return qd||(qd=1,go.exports=xm()),go.exports}var Xd;function Sm(){if(Xd)return Ii;Xd=1;var r=$o(),l=Symbol.for("react.element"),o=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function m(g,p,x){var S,E={},C=null,O=null;x!==void 0&&(C=""+x),p.key!==void 0&&(C=""+p.key),p.ref!==void 0&&(O=p.ref);for(S in p)d.call(p,S)&&!h.hasOwnProperty(S)&&(E[S]=p[S]);if(g&&g.defaultProps)for(S in p=g.defaultProps,p)E[S]===void 0&&(E[S]=p[S]);return{$$typeof:l,type:g,key:C,ref:O,props:E,_owner:c.current}}return Ii.Fragment=o,Ii.jsx=m,Ii.jsxs=m,Ii}var Yd;function km(){return Yd||(Yd=1,mo.exports=Sm()),mo.exports}var s=km(),v=$o();const Ff=Mf(v);var Js={},wo={exports:{}},xt={},vo={exports:{}},yo={};var Jd;function Em(){return Jd||(Jd=1,(function(r){function l(W,oe){var K=W.length;W.push(oe);e:for(;0<K;){var b=K-1>>>1,L=W[b];if(0<c(L,oe))W[b]=oe,W[K]=L,K=b;else break e}}function o(W){return W.length===0?null:W[0]}function d(W){if(W.length===0)return null;var oe=W[0],K=W.pop();if(K!==oe){W[0]=K;e:for(var b=0,L=W.length,pe=L>>>1;b<pe;){var ke=2*(b+1)-1,$=W[ke],re=ke+1,ge=W[re];if(0>c($,K))re<L&&0>c(ge,$)?(W[b]=ge,W[re]=K,b=re):(W[b]=$,W[ke]=K,b=ke);else if(re<L&&0>c(ge,K))W[b]=ge,W[re]=K,b=re;else break e}}return oe}function c(W,oe){var K=W.sortIndex-oe.sortIndex;return K!==0?K:W.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var m=Date,g=m.now();r.unstable_now=function(){return m.now()-g}}var p=[],x=[],S=1,E=null,C=3,O=!1,P=!1,D=!1,N=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(W){for(var oe=o(x);oe!==null;){if(oe.callback===null)d(x);else if(oe.startTime<=W)d(x),oe.sortIndex=oe.expirationTime,l(p,oe);else break;oe=o(x)}}function te(W){if(D=!1,M(W),!P)if(o(p)!==null)P=!0,ce(ne);else{var oe=o(x);oe!==null&&Se(te,oe.startTime-W)}}function ne(W,oe){P=!1,D&&(D=!1,V(ee),ee=-1),O=!0;var K=C;try{for(M(oe),E=o(p);E!==null&&(!(E.expirationTime>oe)||W&&!ae());){var b=E.callback;if(typeof b=="function"){E.callback=null,C=E.priorityLevel;var L=b(E.expirationTime<=oe);oe=r.unstable_now(),typeof L=="function"?E.callback=L:E===o(p)&&d(p),M(oe)}else d(p);E=o(p)}if(E!==null)var pe=!0;else{var ke=o(x);ke!==null&&Se(te,ke.startTime-oe),pe=!1}return pe}finally{E=null,C=K,O=!1}}var xe=!1,Ee=null,ee=-1,be=5,z=-1;function ae(){return!(r.unstable_now()-z<be)}function j(){if(Ee!==null){var W=r.unstable_now();z=W;var oe=!0;try{oe=Ee(!0,W)}finally{oe?H():(xe=!1,Ee=null)}}else xe=!1}var H;if(typeof U=="function")H=function(){U(j)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,q=me.port2;me.port1.onmessage=j,H=function(){q.postMessage(null)}}else H=function(){N(j,0)};function ce(W){Ee=W,xe||(xe=!0,H())}function Se(W,oe){ee=N(function(){W(r.unstable_now())},oe)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(W){W.callback=null},r.unstable_continueExecution=function(){P||O||(P=!0,ce(ne))},r.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<W?Math.floor(1e3/W):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_getFirstCallbackNode=function(){return o(p)},r.unstable_next=function(W){switch(C){case 1:case 2:case 3:var oe=3;break;default:oe=C}var K=C;C=oe;try{return W()}finally{C=K}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(W,oe){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var K=C;C=W;try{return oe()}finally{C=K}},r.unstable_scheduleCallback=function(W,oe,K){var b=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?b+K:b):K=b,W){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=K+L,W={id:S++,callback:oe,priorityLevel:W,startTime:K,expirationTime:L,sortIndex:-1},K>b?(W.sortIndex=K,l(x,W),o(p)===null&&W===o(x)&&(D?(V(ee),ee=-1):D=!0,Se(te,K-b))):(W.sortIndex=L,l(p,W),P||O||(P=!0,ce(ne))),W},r.unstable_shouldYield=ae,r.unstable_wrapCallback=function(W){var oe=C;return function(){var K=C;C=oe;try{return W.apply(this,arguments)}finally{C=K}}}})(yo)),yo}var ef;function bm(){return ef||(ef=1,vo.exports=Em()),vo.exports}var tf;function jm(){if(tf)return xt;tf=1;var r=$o(),l=bm();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d=new Set,c={};function h(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(c[e]=t,e=0;e<t.length;e++)d.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,x=/^[: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]*$/,S={},E={};function C(e){return p.call(E,e)?!0:p.call(S,e)?!1:x.test(e)?E[e]=!0:(S[e]=!0,!1)}function O(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P(e,t,n,i){if(t===null||typeof t>"u"||O(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function D(e,t,n,i,a,u,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=f}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new D(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new D(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new D(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new D(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new D(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new D(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new D(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new D(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new D(e,5,!1,e.toLowerCase(),null,!1,!1)});var V=/[\-:]([a-z])/g;function U(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(V,U);N[t]=new D(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(V,U);N[t]=new D(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(V,U);N[t]=new D(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new D(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new D(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,t,n,i){var a=N.hasOwnProperty(t)?N[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(P(t,n,a,i)&&(n=null),i||a===null?C(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,i=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var te=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),ae=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),W=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,b;function L(e){if(b===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);b=t&&t[1]||""}return`
|
|
2
|
+
`+b+e}var pe=!1;function ke(e,t){if(!e||pe)return"";pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(A){var i=A}Reflect.construct(e,[],t)}else{try{t.call()}catch(A){i=A}e.call(t.prototype)}else{try{throw Error()}catch(A){i=A}e()}}catch(A){if(A&&i&&typeof A.stack=="string"){for(var a=A.stack.split(`
|
|
3
|
+
`),u=i.stack.split(`
|
|
4
|
+
`),f=a.length-1,w=u.length-1;1<=f&&0<=w&&a[f]!==u[w];)w--;for(;1<=f&&0<=w;f--,w--)if(a[f]!==u[w]){if(f!==1||w!==1)do if(f--,w--,0>w||a[f]!==u[w]){var y=`
|
|
5
|
+
`+a[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=f&&0<=w);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function $(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=ke(e.type,!1),e;case 11:return e=ke(e.type.render,!1),e;case 1:return e=ke(e.type,!0),e;default:return""}}function re(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ee:return"Fragment";case xe:return"Portal";case be:return"Profiler";case ee:return"StrictMode";case H:return"Suspense";case me:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ae:return(e.displayName||"Context")+".Consumer";case z:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:re(e.type)||"Memo";case ce:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}function ge(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(t);case 8:return t===ee?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ue(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function we(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ve(e){var t=we(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(f){i=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(f){i=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kn(e){e._valueTracker||(e._valueTracker=Ve(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=we(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ve(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ue(e,t){var n=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kt(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ue(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fe(e,t){t=t.checked,t!=null&&M(e,"checked",t,!1)}function qt(e,t){Fe(e,t);var n=ue(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?El(e,t.type,n):t.hasOwnProperty("defaultValue")&&El(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function El(e,t,n){(t!=="number"||ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kr=Array.isArray;function pr(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+ue(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function bl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return K({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function su(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(Kr(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ue(n)}}function lu(e,t){var n=ue(t.value),i=ue(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function au(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ou(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ou(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hi,uu=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hi=Hi||document.createElement("div"),Hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bh=["Webkit","ms","Moz","O"];Object.keys(Zr).forEach(function(e){bh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zr[t]=Zr[e]})});function cu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zr.hasOwnProperty(e)&&Zr[e]?(""+t).trim():t+"px"}function du(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,a=cu(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,a):e[n]=a}}var jh=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nl(e,t){if(t){if(jh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function Cl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rl=null;function _l(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pl=null,mr=null,gr=null;function fu(e){if(e=wi(e)){if(typeof Pl!="function")throw Error(o(280));var t=e.stateNode;t&&(t=ps(t),Pl(e.stateNode,e.type,t))}}function hu(e){mr?gr?gr.push(e):gr=[e]:mr=e}function pu(){if(mr){var e=mr,t=gr;if(gr=mr=null,fu(e),t)for(e=0;e<t.length;e++)fu(t[e])}}function mu(e,t){return e(t)}function gu(){}var Al=!1;function wu(e,t,n){if(Al)return e(t,n);Al=!0;try{return mu(e,t,n)}finally{Al=!1,(mr!==null||gr!==null)&&(gu(),pu())}}function qr(e,t){var n=e.stateNode;if(n===null)return null;var i=ps(n);if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var Il=!1;if(g)try{var Xr={};Object.defineProperty(Xr,"passive",{get:function(){Il=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{Il=!1}function Nh(e,t,n,i,a,u,f,w,y){var A=Array.prototype.slice.call(arguments,3);try{t.apply(n,A)}catch(F){this.onError(F)}}var Yr=!1,Gi=null,Ki=!1,Dl=null,Ch={onError:function(e){Yr=!0,Gi=e}};function Rh(e,t,n,i,a,u,f,w,y){Yr=!1,Gi=null,Nh.apply(Ch,arguments)}function _h(e,t,n,i,a,u,f,w,y){if(Rh.apply(this,arguments),Yr){if(Yr){var A=Gi;Yr=!1,Gi=null}else throw Error(o(198));Ki||(Ki=!0,Dl=A)}}function Qn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yu(e){if(Qn(e)!==e)throw Error(o(188))}function Ph(e){var t=e.alternate;if(!t){if(t=Qn(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var u=a.alternate;if(u===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===n)return yu(a),e;if(u===i)return yu(a),t;u=u.sibling}throw Error(o(188))}if(n.return!==i.return)n=a,i=u;else{for(var f=!1,w=a.child;w;){if(w===n){f=!0,n=a,i=u;break}if(w===i){f=!0,i=a,n=u;break}w=w.sibling}if(!f){for(w=u.child;w;){if(w===n){f=!0,n=u,i=a;break}if(w===i){f=!0,i=u,n=a;break}w=w.sibling}if(!f)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function xu(e){return e=Ph(e),e!==null?Su(e):null}function Su(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Su(e);if(t!==null)return t;e=e.sibling}return null}var ku=l.unstable_scheduleCallback,Eu=l.unstable_cancelCallback,Ah=l.unstable_shouldYield,Ih=l.unstable_requestPaint,Ge=l.unstable_now,Dh=l.unstable_getCurrentPriorityLevel,zl=l.unstable_ImmediatePriority,bu=l.unstable_UserBlockingPriority,Qi=l.unstable_NormalPriority,zh=l.unstable_LowPriority,ju=l.unstable_IdlePriority,Zi=null,Xt=null;function Lh(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(Zi,e,void 0,(e.current.flags&128)===128)}catch{}}var Wt=Math.clz32?Math.clz32:Mh,Oh=Math.log,Th=Math.LN2;function Mh(e){return e>>>=0,e===0?32:31-(Oh(e)/Th|0)|0}var qi=64,Xi=4194304;function Jr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Yi(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,a=e.suspendedLanes,u=e.pingedLanes,f=n&268435455;if(f!==0){var w=f&~a;w!==0?i=Jr(w):(u&=f,u!==0&&(i=Jr(u)))}else f=n&~a,f!==0?i=Jr(f):u!==0&&(i=Jr(u));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,u=t&-t,a>=u||a===16&&(u&4194240)!==0))return t;if((i&4)!==0&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-Wt(t),a=1<<n,i|=e[n],t&=~a;return i}function Fh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wh(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes;0<u;){var f=31-Wt(u),w=1<<f,y=a[f];y===-1?((w&n)===0||(w&i)!==0)&&(a[f]=Fh(w,t)):y<=t&&(e.expiredLanes|=w),u&=~w}}function Ll(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Nu(){var e=qi;return qi<<=1,(qi&4194240)===0&&(qi=64),e}function Ol(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ei(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wt(t),e[t]=n}function Bh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-Wt(n),u=1<<a;t[a]=0,i[a]=-1,e[a]=-1,n&=~u}}function Tl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Wt(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}var Pe=0;function Cu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ru,Ml,_u,Pu,Au,Fl=!1,Ji=[],bn=null,jn=null,Nn=null,ti=new Map,ni=new Map,Cn=[],Vh="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 submit".split(" ");function Iu(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Nn=null;break;case"pointerover":case"pointerout":ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ni.delete(t.pointerId)}}function ri(e,t,n,i,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[a]},t!==null&&(t=wi(t),t!==null&&Ml(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Uh(e,t,n,i,a){switch(t){case"focusin":return bn=ri(bn,e,t,n,i,a),!0;case"dragenter":return jn=ri(jn,e,t,n,i,a),!0;case"mouseover":return Nn=ri(Nn,e,t,n,i,a),!0;case"pointerover":var u=a.pointerId;return ti.set(u,ri(ti.get(u)||null,e,t,n,i,a)),!0;case"gotpointercapture":return u=a.pointerId,ni.set(u,ri(ni.get(u)||null,e,t,n,i,a)),!0}return!1}function Du(e){var t=Zn(e.target);if(t!==null){var n=Qn(t);if(n!==null){if(t=n.tag,t===13){if(t=vu(n),t!==null){e.blockedOn=t,Au(e.priority,function(){_u(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function es(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Rl=i,n.target.dispatchEvent(i),Rl=null}else return t=wi(n),t!==null&&Ml(t),e.blockedOn=n,!1;t.shift()}return!0}function zu(e,t,n){es(e)&&n.delete(t)}function $h(){Fl=!1,bn!==null&&es(bn)&&(bn=null),jn!==null&&es(jn)&&(jn=null),Nn!==null&&es(Nn)&&(Nn=null),ti.forEach(zu),ni.forEach(zu)}function ii(e,t){e.blockedOn===t&&(e.blockedOn=null,Fl||(Fl=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,$h)))}function si(e){function t(a){return ii(a,e)}if(0<Ji.length){ii(Ji[0],e);for(var n=1;n<Ji.length;n++){var i=Ji[n];i.blockedOn===e&&(i.blockedOn=null)}}for(bn!==null&&ii(bn,e),jn!==null&&ii(jn,e),Nn!==null&&ii(Nn,e),ti.forEach(t),ni.forEach(t),n=0;n<Cn.length;n++)i=Cn[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Cn.length&&(n=Cn[0],n.blockedOn===null);)Du(n),n.blockedOn===null&&Cn.shift()}var wr=te.ReactCurrentBatchConfig,ts=!0;function Hh(e,t,n,i){var a=Pe,u=wr.transition;wr.transition=null;try{Pe=1,Wl(e,t,n,i)}finally{Pe=a,wr.transition=u}}function Gh(e,t,n,i){var a=Pe,u=wr.transition;wr.transition=null;try{Pe=4,Wl(e,t,n,i)}finally{Pe=a,wr.transition=u}}function Wl(e,t,n,i){if(ts){var a=Bl(e,t,n,i);if(a===null)ia(e,t,i,ns,n),Iu(e,i);else if(Uh(a,e,t,n,i))i.stopPropagation();else if(Iu(e,i),t&4&&-1<Vh.indexOf(e)){for(;a!==null;){var u=wi(a);if(u!==null&&Ru(u),u=Bl(e,t,n,i),u===null&&ia(e,t,i,ns,n),u===a)break;a=u}a!==null&&i.stopPropagation()}else ia(e,t,i,null,n)}}var ns=null;function Bl(e,t,n,i){if(ns=null,e=_l(i),e=Zn(e),e!==null)if(t=Qn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ns=e,null}function Lu(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Dh()){case zl:return 1;case bu:return 4;case Qi:case zh:return 16;case ju:return 536870912;default:return 16}default:return 16}}var Rn=null,Vl=null,rs=null;function Ou(){if(rs)return rs;var e,t=Vl,n=t.length,i,a="value"in Rn?Rn.value:Rn.textContent,u=a.length;for(e=0;e<n&&t[e]===a[e];e++);var f=n-e;for(i=1;i<=f&&t[n-i]===a[u-i];i++);return rs=a.slice(e,1<i?1-i:void 0)}function is(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ss(){return!0}function Tu(){return!1}function Et(e){function t(n,i,a,u,f){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(n=e[w],this[w]=n?n(u):u[w]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ss:Tu,this.isPropagationStopped=Tu,this}return K(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ss)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ss)},persist:function(){},isPersistent:ss}),t}var vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ul=Et(vr),li=K({},vr,{view:0,detail:0}),Kh=Et(li),$l,Hl,ai,ls=K({},li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ai&&(ai&&e.type==="mousemove"?($l=e.screenX-ai.screenX,Hl=e.screenY-ai.screenY):Hl=$l=0,ai=e),$l)},movementY:function(e){return"movementY"in e?e.movementY:Hl}}),Mu=Et(ls),Qh=K({},ls,{dataTransfer:0}),Zh=Et(Qh),qh=K({},li,{relatedTarget:0}),Gl=Et(qh),Xh=K({},vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Yh=Et(Xh),Jh=K({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ep=Et(Jh),tp=K({},vr,{data:0}),Fu=Et(tp),np={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rp={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"},ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ip[e])?!!t[e]:!1}function Kl(){return sp}var lp=K({},li,{key:function(e){if(e.key){var t=np[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kl,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ap=Et(lp),op=K({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wu=Et(op),up=K({},li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kl}),cp=Et(up),dp=K({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),fp=Et(dp),hp=K({},ls,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),pp=Et(hp),mp=[9,13,27,32],Ql=g&&"CompositionEvent"in window,oi=null;g&&"documentMode"in document&&(oi=document.documentMode);var gp=g&&"TextEvent"in window&&!oi,Bu=g&&(!Ql||oi&&8<oi&&11>=oi),Vu=" ",Uu=!1;function $u(e,t){switch(e){case"keyup":return mp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yr=!1;function wp(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Uu=!0,Vu);case"textInput":return e=t.data,e===Vu&&Uu?null:e;default:return null}}function vp(e,t){if(yr)return e==="compositionend"||!Ql&&$u(e,t)?(e=Ou(),rs=Vl=Rn=null,yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bu&&t.locale!=="ko"?null:t.data;default:return null}}var yp={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 Gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yp[e.type]:t==="textarea"}function Ku(e,t,n,i){hu(i),t=ds(t,"onChange"),0<t.length&&(n=new Ul("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var ui=null,ci=null;function xp(e){dc(e,0)}function as(e){var t=br(e);if(Q(t))return e}function Sp(e,t){if(e==="change")return t}var Qu=!1;if(g){var Zl;if(g){var ql="oninput"in document;if(!ql){var Zu=document.createElement("div");Zu.setAttribute("oninput","return;"),ql=typeof Zu.oninput=="function"}Zl=ql}else Zl=!1;Qu=Zl&&(!document.documentMode||9<document.documentMode)}function qu(){ui&&(ui.detachEvent("onpropertychange",Xu),ci=ui=null)}function Xu(e){if(e.propertyName==="value"&&as(ci)){var t=[];Ku(t,ci,e,_l(e)),wu(xp,t)}}function kp(e,t,n){e==="focusin"?(qu(),ui=t,ci=n,ui.attachEvent("onpropertychange",Xu)):e==="focusout"&&qu()}function Ep(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return as(ci)}function bp(e,t){if(e==="click")return as(t)}function jp(e,t){if(e==="input"||e==="change")return as(t)}function Np(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Np;function di(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!p.call(t,a)||!Bt(e[a],t[a]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ju(e,t){var n=Yu(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tc(){for(var e=window,t=ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ve(e.document)}return t}function Xl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Cp(e){var t=tc(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ec(n.ownerDocument.documentElement,n)){if(i!==null&&Xl(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,u=Math.min(i.start,a);i=i.end===void 0?u:Math.min(i.end,a),!e.extend&&u>i&&(a=i,i=u,u=a),a=Ju(n,u);var f=Ju(n,i);a&&f&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),u>i?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Rp=g&&"documentMode"in document&&11>=document.documentMode,xr=null,Yl=null,fi=null,Jl=!1;function nc(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jl||xr==null||xr!==ve(i)||(i=xr,"selectionStart"in i&&Xl(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),fi&&di(fi,i)||(fi=i,i=ds(Yl,"onSelect"),0<i.length&&(t=new Ul("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=xr)))}function os(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:os("Animation","AnimationEnd"),animationiteration:os("Animation","AnimationIteration"),animationstart:os("Animation","AnimationStart"),transitionend:os("Transition","TransitionEnd")},ea={},rc={};g&&(rc=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);function us(e){if(ea[e])return ea[e];if(!Sr[e])return e;var t=Sr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rc)return ea[e]=t[n];return e}var ic=us("animationend"),sc=us("animationiteration"),lc=us("animationstart"),ac=us("transitionend"),oc=new Map,uc="abort auxClick 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(" ");function _n(e,t){oc.set(e,t),h(t,[e])}for(var ta=0;ta<uc.length;ta++){var na=uc[ta],_p=na.toLowerCase(),Pp=na[0].toUpperCase()+na.slice(1);_n(_p,"on"+Pp)}_n(ic,"onAnimationEnd"),_n(sc,"onAnimationIteration"),_n(lc,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(ac,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),h("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),h("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),h("onBeforeInput",["compositionend","keypress","textInput","paste"]),h("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),Ap=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function cc(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,_h(i,t,void 0,e),e.currentTarget=null}function dc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var f=i.length-1;0<=f;f--){var w=i[f],y=w.instance,A=w.currentTarget;if(w=w.listener,y!==u&&a.isPropagationStopped())break e;cc(a,w,A),u=y}else for(f=0;f<i.length;f++){if(w=i[f],y=w.instance,A=w.currentTarget,w=w.listener,y!==u&&a.isPropagationStopped())break e;cc(a,w,A),u=y}}}if(Ki)throw e=Dl,Ki=!1,Dl=null,e}function Le(e,t){var n=t[ca];n===void 0&&(n=t[ca]=new Set);var i=e+"__bubble";n.has(i)||(fc(t,e,2,!1),n.add(i))}function ra(e,t,n){var i=0;t&&(i|=4),fc(n,e,i,t)}var cs="_reactListening"+Math.random().toString(36).slice(2);function pi(e){if(!e[cs]){e[cs]=!0,d.forEach(function(n){n!=="selectionchange"&&(Ap.has(n)||ra(n,!1,e),ra(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cs]||(t[cs]=!0,ra("selectionchange",!1,t))}}function fc(e,t,n,i){switch(Lu(t)){case 1:var a=Hh;break;case 4:a=Gh;break;default:a=Wl}n=a.bind(null,t,n,e),a=void 0,!Il||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function ia(e,t,n,i,a){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var f=i.tag;if(f===3||f===4){var w=i.stateNode.containerInfo;if(w===a||w.nodeType===8&&w.parentNode===a)break;if(f===4)for(f=i.return;f!==null;){var y=f.tag;if((y===3||y===4)&&(y=f.stateNode.containerInfo,y===a||y.nodeType===8&&y.parentNode===a))return;f=f.return}for(;w!==null;){if(f=Zn(w),f===null)return;if(y=f.tag,y===5||y===6){i=u=f;continue e}w=w.parentNode}}i=i.return}wu(function(){var A=u,F=_l(n),B=[];e:{var T=oc.get(e);if(T!==void 0){var Z=Ul,Y=e;switch(e){case"keypress":if(is(n)===0)break e;case"keydown":case"keyup":Z=ap;break;case"focusin":Y="focus",Z=Gl;break;case"focusout":Y="blur",Z=Gl;break;case"beforeblur":case"afterblur":Z=Gl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=cp;break;case ic:case sc:case lc:Z=Yh;break;case ac:Z=fp;break;case"scroll":Z=Kh;break;case"wheel":Z=pp;break;case"copy":case"cut":case"paste":Z=ep;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Wu}var ie=(t&4)!==0,Ke=!ie&&e==="scroll",R=ie?T!==null?T+"Capture":null:T;ie=[];for(var k=A,_;k!==null;){_=k;var G=_.stateNode;if(_.tag===5&&G!==null&&(_=G,R!==null&&(G=qr(k,R),G!=null&&ie.push(mi(k,G,_)))),Ke)break;k=k.return}0<ie.length&&(T=new Z(T,Y,null,n,F),B.push({event:T,listeners:ie}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",T&&n!==Rl&&(Y=n.relatedTarget||n.fromElement)&&(Zn(Y)||Y[un]))break e;if((Z||T)&&(T=F.window===F?F:(T=F.ownerDocument)?T.defaultView||T.parentWindow:window,Z?(Y=n.relatedTarget||n.toElement,Z=A,Y=Y?Zn(Y):null,Y!==null&&(Ke=Qn(Y),Y!==Ke||Y.tag!==5&&Y.tag!==6)&&(Y=null)):(Z=null,Y=A),Z!==Y)){if(ie=Mu,G="onMouseLeave",R="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(ie=Wu,G="onPointerLeave",R="onPointerEnter",k="pointer"),Ke=Z==null?T:br(Z),_=Y==null?T:br(Y),T=new ie(G,k+"leave",Z,n,F),T.target=Ke,T.relatedTarget=_,G=null,Zn(F)===A&&(ie=new ie(R,k+"enter",Y,n,F),ie.target=_,ie.relatedTarget=Ke,G=ie),Ke=G,Z&&Y)t:{for(ie=Z,R=Y,k=0,_=ie;_;_=kr(_))k++;for(_=0,G=R;G;G=kr(G))_++;for(;0<k-_;)ie=kr(ie),k--;for(;0<_-k;)R=kr(R),_--;for(;k--;){if(ie===R||R!==null&&ie===R.alternate)break t;ie=kr(ie),R=kr(R)}ie=null}else ie=null;Z!==null&&hc(B,T,Z,ie,!1),Y!==null&&Ke!==null&&hc(B,Ke,Y,ie,!0)}}e:{if(T=A?br(A):window,Z=T.nodeName&&T.nodeName.toLowerCase(),Z==="select"||Z==="input"&&T.type==="file")var le=Sp;else if(Gu(T))if(Qu)le=jp;else{le=Ep;var de=kp}else(Z=T.nodeName)&&Z.toLowerCase()==="input"&&(T.type==="checkbox"||T.type==="radio")&&(le=bp);if(le&&(le=le(e,A))){Ku(B,le,n,F);break e}de&&de(e,T,A),e==="focusout"&&(de=T._wrapperState)&&de.controlled&&T.type==="number"&&El(T,"number",T.value)}switch(de=A?br(A):window,e){case"focusin":(Gu(de)||de.contentEditable==="true")&&(xr=de,Yl=A,fi=null);break;case"focusout":fi=Yl=xr=null;break;case"mousedown":Jl=!0;break;case"contextmenu":case"mouseup":case"dragend":Jl=!1,nc(B,n,F);break;case"selectionchange":if(Rp)break;case"keydown":case"keyup":nc(B,n,F)}var fe;if(Ql)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else yr?$u(e,n)&&(ye="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ye="onCompositionStart");ye&&(Bu&&n.locale!=="ko"&&(yr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&yr&&(fe=Ou()):(Rn=F,Vl="value"in Rn?Rn.value:Rn.textContent,yr=!0)),de=ds(A,ye),0<de.length&&(ye=new Fu(ye,e,null,n,F),B.push({event:ye,listeners:de}),fe?ye.data=fe:(fe=Hu(n),fe!==null&&(ye.data=fe)))),(fe=gp?wp(e,n):vp(e,n))&&(A=ds(A,"onBeforeInput"),0<A.length&&(F=new Fu("onBeforeInput","beforeinput",null,n,F),B.push({event:F,listeners:A}),F.data=fe))}dc(B,t)})}function mi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ds(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,u=a.stateNode;a.tag===5&&u!==null&&(a=u,u=qr(e,n),u!=null&&i.unshift(mi(e,u,a)),u=qr(e,t),u!=null&&i.push(mi(e,u,a))),e=e.return}return i}function kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hc(e,t,n,i,a){for(var u=t._reactName,f=[];n!==null&&n!==i;){var w=n,y=w.alternate,A=w.stateNode;if(y!==null&&y===i)break;w.tag===5&&A!==null&&(w=A,a?(y=qr(n,u),y!=null&&f.unshift(mi(n,y,w))):a||(y=qr(n,u),y!=null&&f.push(mi(n,y,w)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var Ip=/\r\n?/g,Dp=/\u0000|\uFFFD/g;function pc(e){return(typeof e=="string"?e:""+e).replace(Ip,`
|
|
6
|
+
`).replace(Dp,"")}function fs(e,t,n){if(t=pc(t),pc(e)!==t&&n)throw Error(o(425))}function hs(){}var sa=null,la=null;function aa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oa=typeof setTimeout=="function"?setTimeout:void 0,zp=typeof clearTimeout=="function"?clearTimeout:void 0,mc=typeof Promise=="function"?Promise:void 0,Lp=typeof queueMicrotask=="function"?queueMicrotask:typeof mc<"u"?function(e){return mc.resolve(null).then(e).catch(Op)}:oa;function Op(e){setTimeout(function(){throw e})}function ua(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(i===0){e.removeChild(a),si(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=a}while(n);si(t)}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function gc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Er=Math.random().toString(36).slice(2),Yt="__reactFiber$"+Er,gi="__reactProps$"+Er,un="__reactContainer$"+Er,ca="__reactEvents$"+Er,Tp="__reactListeners$"+Er,Mp="__reactHandles$"+Er;function Zn(e){var t=e[Yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[un]||n[Yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gc(e);e!==null;){if(n=e[Yt])return n;e=gc(e)}return t}e=n,n=e.parentNode}return null}function wi(e){return e=e[Yt]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function ps(e){return e[gi]||null}var da=[],jr=-1;function An(e){return{current:e}}function Oe(e){0>jr||(e.current=da[jr],da[jr]=null,jr--)}function ze(e,t){jr++,da[jr]=e.current,e.current=t}var In={},lt=An(In),mt=An(!1),qn=In;function Nr(e,t){var n=e.type.contextTypes;if(!n)return In;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},u;for(u in n)a[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gt(e){return e=e.childContextTypes,e!=null}function ms(){Oe(mt),Oe(lt)}function wc(e,t,n){if(lt.current!==In)throw Error(o(168));ze(lt,t),ze(mt,n)}function vc(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(o(108,ge(e)||"Unknown",a));return K({},n,i)}function gs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||In,qn=lt.current,ze(lt,e),ze(mt,mt.current),!0}function yc(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=vc(e,t,qn),i.__reactInternalMemoizedMergedChildContext=e,Oe(mt),Oe(lt),ze(lt,e)):Oe(mt),ze(mt,n)}var cn=null,ws=!1,fa=!1;function xc(e){cn===null?cn=[e]:cn.push(e)}function Fp(e){ws=!0,xc(e)}function Dn(){if(!fa&&cn!==null){fa=!0;var e=0,t=Pe;try{var n=cn;for(Pe=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}cn=null,ws=!1}catch(a){throw cn!==null&&(cn=cn.slice(e+1)),ku(zl,Dn),a}finally{Pe=t,fa=!1}}return null}var Cr=[],Rr=0,vs=null,ys=0,_t=[],Pt=0,Xn=null,dn=1,fn="";function Yn(e,t){Cr[Rr++]=ys,Cr[Rr++]=vs,vs=e,ys=t}function Sc(e,t,n){_t[Pt++]=dn,_t[Pt++]=fn,_t[Pt++]=Xn,Xn=e;var i=dn;e=fn;var a=32-Wt(i)-1;i&=~(1<<a),n+=1;var u=32-Wt(t)+a;if(30<u){var f=a-a%5;u=(i&(1<<f)-1).toString(32),i>>=f,a-=f,dn=1<<32-Wt(t)+a|n<<a|i,fn=u+e}else dn=1<<u|n<<a|i,fn=e}function ha(e){e.return!==null&&(Yn(e,1),Sc(e,1,0))}function pa(e){for(;e===vs;)vs=Cr[--Rr],Cr[Rr]=null,ys=Cr[--Rr],Cr[Rr]=null;for(;e===Xn;)Xn=_t[--Pt],_t[Pt]=null,fn=_t[--Pt],_t[Pt]=null,dn=_t[--Pt],_t[Pt]=null}var bt=null,jt=null,Te=!1,Vt=null;function kc(e,t){var n=zt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ec(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,jt=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xn!==null?{id:dn,overflow:fn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=zt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,bt=e,jt=null,!0):!1;default:return!1}}function ma(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ga(e){if(Te){var t=jt;if(t){var n=t;if(!Ec(e,t)){if(ma(e))throw Error(o(418));t=Pn(n.nextSibling);var i=bt;t&&Ec(e,t)?kc(i,n):(e.flags=e.flags&-4097|2,Te=!1,bt=e)}}else{if(ma(e))throw Error(o(418));e.flags=e.flags&-4097|2,Te=!1,bt=e}}}function bc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function xs(e){if(e!==bt)return!1;if(!Te)return bc(e),Te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!aa(e.type,e.memoizedProps)),t&&(t=jt)){if(ma(e))throw jc(),Error(o(418));for(;t;)kc(e,t),t=Pn(t.nextSibling)}if(bc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){jt=Pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=bt?Pn(e.stateNode.nextSibling):null;return!0}function jc(){for(var e=jt;e;)e=Pn(e.nextSibling)}function _r(){jt=bt=null,Te=!1}function wa(e){Vt===null?Vt=[e]:Vt.push(e)}var Wp=te.ReactCurrentBatchConfig;function vi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var a=i,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(f){var w=a.refs;f===null?delete w[u]:w[u]=f},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Ss(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Nc(e){var t=e._init;return t(e._payload)}function Cc(e){function t(R,k){if(e){var _=R.deletions;_===null?(R.deletions=[k],R.flags|=16):_.push(k)}}function n(R,k){if(!e)return null;for(;k!==null;)t(R,k),k=k.sibling;return null}function i(R,k){for(R=new Map;k!==null;)k.key!==null?R.set(k.key,k):R.set(k.index,k),k=k.sibling;return R}function a(R,k){return R=Bn(R,k),R.index=0,R.sibling=null,R}function u(R,k,_){return R.index=_,e?(_=R.alternate,_!==null?(_=_.index,_<k?(R.flags|=2,k):_):(R.flags|=2,k)):(R.flags|=1048576,k)}function f(R){return e&&R.alternate===null&&(R.flags|=2),R}function w(R,k,_,G){return k===null||k.tag!==6?(k=oo(_,R.mode,G),k.return=R,k):(k=a(k,_),k.return=R,k)}function y(R,k,_,G){var le=_.type;return le===Ee?F(R,k,_.props.children,G,_.key):k!==null&&(k.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ce&&Nc(le)===k.type)?(G=a(k,_.props),G.ref=vi(R,k,_),G.return=R,G):(G=Hs(_.type,_.key,_.props,null,R.mode,G),G.ref=vi(R,k,_),G.return=R,G)}function A(R,k,_,G){return k===null||k.tag!==4||k.stateNode.containerInfo!==_.containerInfo||k.stateNode.implementation!==_.implementation?(k=uo(_,R.mode,G),k.return=R,k):(k=a(k,_.children||[]),k.return=R,k)}function F(R,k,_,G,le){return k===null||k.tag!==7?(k=lr(_,R.mode,G,le),k.return=R,k):(k=a(k,_),k.return=R,k)}function B(R,k,_){if(typeof k=="string"&&k!==""||typeof k=="number")return k=oo(""+k,R.mode,_),k.return=R,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ne:return _=Hs(k.type,k.key,k.props,null,R.mode,_),_.ref=vi(R,null,k),_.return=R,_;case xe:return k=uo(k,R.mode,_),k.return=R,k;case ce:var G=k._init;return B(R,G(k._payload),_)}if(Kr(k)||oe(k))return k=lr(k,R.mode,_,null),k.return=R,k;Ss(R,k)}return null}function T(R,k,_,G){var le=k!==null?k.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return le!==null?null:w(R,k,""+_,G);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ne:return _.key===le?y(R,k,_,G):null;case xe:return _.key===le?A(R,k,_,G):null;case ce:return le=_._init,T(R,k,le(_._payload),G)}if(Kr(_)||oe(_))return le!==null?null:F(R,k,_,G,null);Ss(R,_)}return null}function Z(R,k,_,G,le){if(typeof G=="string"&&G!==""||typeof G=="number")return R=R.get(_)||null,w(k,R,""+G,le);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case ne:return R=R.get(G.key===null?_:G.key)||null,y(k,R,G,le);case xe:return R=R.get(G.key===null?_:G.key)||null,A(k,R,G,le);case ce:var de=G._init;return Z(R,k,_,de(G._payload),le)}if(Kr(G)||oe(G))return R=R.get(_)||null,F(k,R,G,le,null);Ss(k,G)}return null}function Y(R,k,_,G){for(var le=null,de=null,fe=k,ye=k=0,et=null;fe!==null&&ye<_.length;ye++){fe.index>ye?(et=fe,fe=null):et=fe.sibling;var Re=T(R,fe,_[ye],G);if(Re===null){fe===null&&(fe=et);break}e&&fe&&Re.alternate===null&&t(R,fe),k=u(Re,k,ye),de===null?le=Re:de.sibling=Re,de=Re,fe=et}if(ye===_.length)return n(R,fe),Te&&Yn(R,ye),le;if(fe===null){for(;ye<_.length;ye++)fe=B(R,_[ye],G),fe!==null&&(k=u(fe,k,ye),de===null?le=fe:de.sibling=fe,de=fe);return Te&&Yn(R,ye),le}for(fe=i(R,fe);ye<_.length;ye++)et=Z(fe,R,ye,_[ye],G),et!==null&&(e&&et.alternate!==null&&fe.delete(et.key===null?ye:et.key),k=u(et,k,ye),de===null?le=et:de.sibling=et,de=et);return e&&fe.forEach(function(Vn){return t(R,Vn)}),Te&&Yn(R,ye),le}function ie(R,k,_,G){var le=oe(_);if(typeof le!="function")throw Error(o(150));if(_=le.call(_),_==null)throw Error(o(151));for(var de=le=null,fe=k,ye=k=0,et=null,Re=_.next();fe!==null&&!Re.done;ye++,Re=_.next()){fe.index>ye?(et=fe,fe=null):et=fe.sibling;var Vn=T(R,fe,Re.value,G);if(Vn===null){fe===null&&(fe=et);break}e&&fe&&Vn.alternate===null&&t(R,fe),k=u(Vn,k,ye),de===null?le=Vn:de.sibling=Vn,de=Vn,fe=et}if(Re.done)return n(R,fe),Te&&Yn(R,ye),le;if(fe===null){for(;!Re.done;ye++,Re=_.next())Re=B(R,Re.value,G),Re!==null&&(k=u(Re,k,ye),de===null?le=Re:de.sibling=Re,de=Re);return Te&&Yn(R,ye),le}for(fe=i(R,fe);!Re.done;ye++,Re=_.next())Re=Z(fe,R,ye,Re.value,G),Re!==null&&(e&&Re.alternate!==null&&fe.delete(Re.key===null?ye:Re.key),k=u(Re,k,ye),de===null?le=Re:de.sibling=Re,de=Re);return e&&fe.forEach(function(ym){return t(R,ym)}),Te&&Yn(R,ye),le}function Ke(R,k,_,G){if(typeof _=="object"&&_!==null&&_.type===Ee&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case ne:e:{for(var le=_.key,de=k;de!==null;){if(de.key===le){if(le=_.type,le===Ee){if(de.tag===7){n(R,de.sibling),k=a(de,_.props.children),k.return=R,R=k;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ce&&Nc(le)===de.type){n(R,de.sibling),k=a(de,_.props),k.ref=vi(R,de,_),k.return=R,R=k;break e}n(R,de);break}else t(R,de);de=de.sibling}_.type===Ee?(k=lr(_.props.children,R.mode,G,_.key),k.return=R,R=k):(G=Hs(_.type,_.key,_.props,null,R.mode,G),G.ref=vi(R,k,_),G.return=R,R=G)}return f(R);case xe:e:{for(de=_.key;k!==null;){if(k.key===de)if(k.tag===4&&k.stateNode.containerInfo===_.containerInfo&&k.stateNode.implementation===_.implementation){n(R,k.sibling),k=a(k,_.children||[]),k.return=R,R=k;break e}else{n(R,k);break}else t(R,k);k=k.sibling}k=uo(_,R.mode,G),k.return=R,R=k}return f(R);case ce:return de=_._init,Ke(R,k,de(_._payload),G)}if(Kr(_))return Y(R,k,_,G);if(oe(_))return ie(R,k,_,G);Ss(R,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,k!==null&&k.tag===6?(n(R,k.sibling),k=a(k,_),k.return=R,R=k):(n(R,k),k=oo(_,R.mode,G),k.return=R,R=k),f(R)):n(R,k)}return Ke}var Pr=Cc(!0),Rc=Cc(!1),ks=An(null),Es=null,Ar=null,va=null;function ya(){va=Ar=Es=null}function xa(e){var t=ks.current;Oe(ks),e._currentValue=t}function Sa(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t){Es=e,va=Ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(wt=!0),e.firstContext=null)}function At(e){var t=e._currentValue;if(va!==e)if(e={context:e,memoizedValue:t,next:null},Ar===null){if(Es===null)throw Error(o(308));Ar=e,Es.dependencies={lanes:0,firstContext:e}}else Ar=Ar.next=e;return t}var Jn=null;function ka(e){Jn===null?Jn=[e]:Jn.push(e)}function _c(e,t,n,i){var a=t.interleaved;return a===null?(n.next=n,ka(t)):(n.next=a.next,a.next=n),t.interleaved=n,hn(e,i)}function hn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var zn=!1;function Ea(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ln(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ce&2)!==0){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,hn(e,n)}return a=i.interleaved,a===null?(t.next=t,ka(i)):(t.next=a.next,a.next=t),i.interleaved=t,hn(e,n)}function bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Tl(e,n)}}function Ac(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?a=u=f:u=u.next=f,n=n.next}while(n!==null);u===null?a=u=t:u=u.next=t}else a=u=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function js(e,t,n,i){var a=e.updateQueue;zn=!1;var u=a.firstBaseUpdate,f=a.lastBaseUpdate,w=a.shared.pending;if(w!==null){a.shared.pending=null;var y=w,A=y.next;y.next=null,f===null?u=A:f.next=A,f=y;var F=e.alternate;F!==null&&(F=F.updateQueue,w=F.lastBaseUpdate,w!==f&&(w===null?F.firstBaseUpdate=A:w.next=A,F.lastBaseUpdate=y))}if(u!==null){var B=a.baseState;f=0,F=A=y=null,w=u;do{var T=w.lane,Z=w.eventTime;if((i&T)===T){F!==null&&(F=F.next={eventTime:Z,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var Y=e,ie=w;switch(T=t,Z=n,ie.tag){case 1:if(Y=ie.payload,typeof Y=="function"){B=Y.call(Z,B,T);break e}B=Y;break e;case 3:Y.flags=Y.flags&-65537|128;case 0:if(Y=ie.payload,T=typeof Y=="function"?Y.call(Z,B,T):Y,T==null)break e;B=K({},B,T);break e;case 2:zn=!0}}w.callback!==null&&w.lane!==0&&(e.flags|=64,T=a.effects,T===null?a.effects=[w]:T.push(w))}else Z={eventTime:Z,lane:T,tag:w.tag,payload:w.payload,callback:w.callback,next:null},F===null?(A=F=Z,y=B):F=F.next=Z,f|=T;if(w=w.next,w===null){if(w=a.shared.pending,w===null)break;T=w,w=T.next,T.next=null,a.lastBaseUpdate=T,a.shared.pending=null}}while(!0);if(F===null&&(y=B),a.baseState=y,a.firstBaseUpdate=A,a.lastBaseUpdate=F,t=a.shared.interleaved,t!==null){a=t;do f|=a.lane,a=a.next;while(a!==t)}else u===null&&(a.shared.lanes=0);nr|=f,e.lanes=f,e.memoizedState=B}}function Ic(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!="function")throw Error(o(191,a));a.call(i)}}}var yi={},Jt=An(yi),xi=An(yi),Si=An(yi);function er(e){if(e===yi)throw Error(o(174));return e}function ba(e,t){switch(ze(Si,t),ze(xi,e),ze(Jt,yi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jl(t,e)}Oe(Jt),ze(Jt,t)}function Dr(){Oe(Jt),Oe(xi),Oe(Si)}function Dc(e){er(Si.current);var t=er(Jt.current),n=jl(t,e.type);t!==n&&(ze(xi,e),ze(Jt,n))}function ja(e){xi.current===e&&(Oe(Jt),Oe(xi))}var We=An(0);function Ns(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=[];function Ca(){for(var e=0;e<Na.length;e++)Na[e]._workInProgressVersionPrimary=null;Na.length=0}var Cs=te.ReactCurrentDispatcher,Ra=te.ReactCurrentBatchConfig,tr=0,Be=null,qe=null,Ye=null,Rs=!1,ki=!1,Ei=0,Bp=0;function at(){throw Error(o(321))}function _a(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Pa(e,t,n,i,a,u){if(tr=u,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cs.current=e===null||e.memoizedState===null?Hp:Gp,e=n(i,a),ki){u=0;do{if(ki=!1,Ei=0,25<=u)throw Error(o(301));u+=1,Ye=qe=null,t.updateQueue=null,Cs.current=Kp,e=n(i,a)}while(ki)}if(Cs.current=As,t=qe!==null&&qe.next!==null,tr=0,Ye=qe=Be=null,Rs=!1,t)throw Error(o(300));return e}function Aa(){var e=Ei!==0;return Ei=0,e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?Be.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function It(){if(qe===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=Ye===null?Be.memoizedState:Ye.next;if(t!==null)Ye=t,qe=e;else{if(e===null)throw Error(o(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Ye===null?Be.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function bi(e,t){return typeof t=="function"?t(e):t}function Ia(e){var t=It(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=qe,a=i.baseQueue,u=n.pending;if(u!==null){if(a!==null){var f=a.next;a.next=u.next,u.next=f}i.baseQueue=a=u,n.pending=null}if(a!==null){u=a.next,i=i.baseState;var w=f=null,y=null,A=u;do{var F=A.lane;if((tr&F)===F)y!==null&&(y=y.next={lane:0,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),i=A.hasEagerState?A.eagerState:e(i,A.action);else{var B={lane:F,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null};y===null?(w=y=B,f=i):y=y.next=B,Be.lanes|=F,nr|=F}A=A.next}while(A!==null&&A!==u);y===null?f=i:y.next=w,Bt(i,t.memoizedState)||(wt=!0),t.memoizedState=i,t.baseState=f,t.baseQueue=y,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do u=a.lane,Be.lanes|=u,nr|=u,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Da(e){var t=It(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,u=t.memoizedState;if(a!==null){n.pending=null;var f=a=a.next;do u=e(u,f.action),f=f.next;while(f!==a);Bt(u,t.memoizedState)||(wt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,i]}function zc(){}function Lc(e,t){var n=Be,i=It(),a=t(),u=!Bt(i.memoizedState,a);if(u&&(i.memoizedState=a,wt=!0),i=i.queue,za(Mc.bind(null,n,i,e),[e]),i.getSnapshot!==t||u||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,ji(9,Tc.bind(null,n,i,a,t),void 0,null),Je===null)throw Error(o(349));(tr&30)!==0||Oc(n,t,a)}return a}function Oc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tc(e,t,n,i){t.value=n,t.getSnapshot=i,Fc(t)&&Wc(e)}function Mc(e,t,n){return n(function(){Fc(t)&&Wc(e)})}function Fc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function Wc(e){var t=hn(e,1);t!==null&&Gt(t,e,1,-1)}function Bc(e){var t=en();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:e},t.queue=e,e=e.dispatch=$p.bind(null,Be,e),[t.memoizedState,e]}function ji(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=Be.updateQueue,t===null?(t={lastEffect:null,stores:null},Be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function Vc(){return It().memoizedState}function _s(e,t,n,i){var a=en();Be.flags|=e,a.memoizedState=ji(1|t,n,void 0,i===void 0?null:i)}function Ps(e,t,n,i){var a=It();i=i===void 0?null:i;var u=void 0;if(qe!==null){var f=qe.memoizedState;if(u=f.destroy,i!==null&&_a(i,f.deps)){a.memoizedState=ji(t,n,u,i);return}}Be.flags|=e,a.memoizedState=ji(1|t,n,u,i)}function Uc(e,t){return _s(8390656,8,e,t)}function za(e,t){return Ps(2048,8,e,t)}function $c(e,t){return Ps(4,2,e,t)}function Hc(e,t){return Ps(4,4,e,t)}function Gc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kc(e,t,n){return n=n!=null?n.concat([e]):null,Ps(4,4,Gc.bind(null,t,e),n)}function La(){}function Qc(e,t){var n=It();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&_a(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Zc(e,t){var n=It();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&_a(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function qc(e,t,n){return(tr&21)===0?(e.baseState&&(e.baseState=!1,wt=!0),e.memoizedState=n):(Bt(n,t)||(n=Nu(),Be.lanes|=n,nr|=n,e.baseState=!0),t)}function Vp(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var i=Ra.transition;Ra.transition={};try{e(!1),t()}finally{Pe=n,Ra.transition=i}}function Xc(){return It().memoizedState}function Up(e,t,n){var i=Fn(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Yc(e))Jc(t,n);else if(n=_c(e,t,n,i),n!==null){var a=ft();Gt(n,e,i,a),ed(n,t,i)}}function $p(e,t,n){var i=Fn(e),a={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yc(e))Jc(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,w=u(f,n);if(a.hasEagerState=!0,a.eagerState=w,Bt(w,f)){var y=t.interleaved;y===null?(a.next=a,ka(t)):(a.next=y.next,y.next=a),t.interleaved=a;return}}catch{}n=_c(e,t,a,i),n!==null&&(a=ft(),Gt(n,e,i,a),ed(n,t,i))}}function Yc(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Jc(e,t){ki=Rs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ed(e,t,n){if((n&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Tl(e,n)}}var As={readContext:At,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},Hp={readContext:At,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Uc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_s(4194308,4,Gc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){return _s(4,2,e,t)},useMemo:function(e,t){var n=en();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=en();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Up.bind(null,Be,e),[i.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:La,useDeferredValue:function(e){return en().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=Vp.bind(null,e[1]),en().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Be,a=en();if(Te){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Je===null)throw Error(o(349));(tr&30)!==0||Oc(i,t,n)}a.memoizedState=n;var u={value:n,getSnapshot:t};return a.queue=u,Uc(Mc.bind(null,i,u,e),[e]),i.flags|=2048,ji(9,Tc.bind(null,i,u,n,t),void 0,null),n},useId:function(){var e=en(),t=Je.identifierPrefix;if(Te){var n=fn,i=dn;n=(i&~(1<<32-Wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ei++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Bp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gp={readContext:At,useCallback:Qc,useContext:At,useEffect:za,useImperativeHandle:Kc,useInsertionEffect:$c,useLayoutEffect:Hc,useMemo:Zc,useReducer:Ia,useRef:Vc,useState:function(){return Ia(bi)},useDebugValue:La,useDeferredValue:function(e){var t=It();return qc(t,qe.memoizedState,e)},useTransition:function(){var e=Ia(bi)[0],t=It().memoizedState;return[e,t]},useMutableSource:zc,useSyncExternalStore:Lc,useId:Xc,unstable_isNewReconciler:!1},Kp={readContext:At,useCallback:Qc,useContext:At,useEffect:za,useImperativeHandle:Kc,useInsertionEffect:$c,useLayoutEffect:Hc,useMemo:Zc,useReducer:Da,useRef:Vc,useState:function(){return Da(bi)},useDebugValue:La,useDeferredValue:function(e){var t=It();return qe===null?t.memoizedState=e:qc(t,qe.memoizedState,e)},useTransition:function(){var e=Da(bi)[0],t=It().memoizedState;return[e,t]},useMutableSource:zc,useSyncExternalStore:Lc,useId:Xc,unstable_isNewReconciler:!1};function Ut(e,t){if(e&&e.defaultProps){t=K({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Oa(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:K({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={isMounted:function(e){return(e=e._reactInternals)?Qn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ft(),a=Fn(e),u=pn(i,a);u.payload=t,n!=null&&(u.callback=n),t=Ln(e,u,a),t!==null&&(Gt(t,e,a,i),bs(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ft(),a=Fn(e),u=pn(i,a);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Ln(e,u,a),t!==null&&(Gt(t,e,a,i),bs(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),i=Fn(e),a=pn(n,i);a.tag=2,t!=null&&(a.callback=t),t=Ln(e,a,i),t!==null&&(Gt(t,e,i,n),bs(t,e,i))}};function td(e,t,n,i,a,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,f):t.prototype&&t.prototype.isPureReactComponent?!di(n,i)||!di(a,u):!0}function nd(e,t,n){var i=!1,a=In,u=t.contextType;return typeof u=="object"&&u!==null?u=At(u):(a=gt(t)?qn:lt.current,i=t.contextTypes,u=(i=i!=null)?Nr(e,a):In),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Is,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=u),t}function rd(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function Ta(e,t,n,i){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Ea(e);var u=t.contextType;typeof u=="object"&&u!==null?a.context=At(u):(u=gt(t)?qn:lt.current,a.context=Nr(e,u)),a.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Oa(e,t,u,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Is.enqueueReplaceState(a,a.state,null),js(e,n,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function zr(e,t){try{var n="",i=t;do n+=$(i),i=i.return;while(i);var a=n}catch(u){a=`
|
|
7
|
+
Error generating stack: `+u.message+`
|
|
8
|
+
`+u.stack}return{value:e,source:t,stack:a,digest:null}}function Ma(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Qp=typeof WeakMap=="function"?WeakMap:Map;function id(e,t,n){n=pn(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Fs||(Fs=!0,eo=i),Fa(e,t)},n}function sd(e,t,n){n=pn(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;n.payload=function(){return i(a)},n.callback=function(){Fa(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Fa(e,t),typeof i!="function"&&(Tn===null?Tn=new Set([this]):Tn.add(this));var f=t.stack;this.componentDidCatch(t.value,{componentStack:f!==null?f:""})}),n}function ld(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Qp;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(a.add(n),e=om.bind(null,e,t,n),t.then(e,e))}function ad(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function od(e,t,n,i,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pn(-1,1),t.tag=2,Ln(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var Zp=te.ReactCurrentOwner,wt=!1;function dt(e,t,n,i){t.child=e===null?Rc(t,null,n,i):Pr(t,e.child,n,i)}function ud(e,t,n,i,a){n=n.render;var u=t.ref;return Ir(t,a),i=Pa(e,t,n,i,u,a),n=Aa(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mn(e,t,a)):(Te&&n&&ha(t),t.flags|=1,dt(e,t,i,a),t.child)}function cd(e,t,n,i,a){if(e===null){var u=n.type;return typeof u=="function"&&!ao(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,dd(e,t,u,i,a)):(e=Hs(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&a)===0){var f=u.memoizedProps;if(n=n.compare,n=n!==null?n:di,n(f,i)&&e.ref===t.ref)return mn(e,t,a)}return t.flags|=1,e=Bn(u,i),e.ref=t.ref,e.return=t,t.child=e}function dd(e,t,n,i,a){if(e!==null){var u=e.memoizedProps;if(di(u,i)&&e.ref===t.ref)if(wt=!1,t.pendingProps=i=u,(e.lanes&a)!==0)(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,mn(e,t,a)}return Wa(e,t,n,i,a)}function fd(e,t,n){var i=t.pendingProps,a=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(Or,Nt),Nt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(Or,Nt),Nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:n,ze(Or,Nt),Nt|=i}else u!==null?(i=u.baseLanes|n,t.memoizedState=null):i=n,ze(Or,Nt),Nt|=i;return dt(e,t,a,n),t.child}function hd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wa(e,t,n,i,a){var u=gt(n)?qn:lt.current;return u=Nr(t,u),Ir(t,a),n=Pa(e,t,n,i,u,a),i=Aa(),e!==null&&!wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mn(e,t,a)):(Te&&i&&ha(t),t.flags|=1,dt(e,t,n,a),t.child)}function pd(e,t,n,i,a){if(gt(n)){var u=!0;gs(t)}else u=!1;if(Ir(t,a),t.stateNode===null)zs(e,t),nd(t,n,i),Ta(t,n,i,a),i=!0;else if(e===null){var f=t.stateNode,w=t.memoizedProps;f.props=w;var y=f.context,A=n.contextType;typeof A=="object"&&A!==null?A=At(A):(A=gt(n)?qn:lt.current,A=Nr(t,A));var F=n.getDerivedStateFromProps,B=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function";B||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w!==i||y!==A)&&rd(t,f,i,A),zn=!1;var T=t.memoizedState;f.state=T,js(t,i,f,a),y=t.memoizedState,w!==i||T!==y||mt.current||zn?(typeof F=="function"&&(Oa(t,n,F,i),y=t.memoizedState),(w=zn||td(t,n,w,i,T,y,A))?(B||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=y),f.props=i,f.state=y,f.context=A,i=w):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Pc(e,t),w=t.memoizedProps,A=t.type===t.elementType?w:Ut(t.type,w),f.props=A,B=t.pendingProps,T=f.context,y=n.contextType,typeof y=="object"&&y!==null?y=At(y):(y=gt(n)?qn:lt.current,y=Nr(t,y));var Z=n.getDerivedStateFromProps;(F=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w!==B||T!==y)&&rd(t,f,i,y),zn=!1,T=t.memoizedState,f.state=T,js(t,i,f,a);var Y=t.memoizedState;w!==B||T!==Y||mt.current||zn?(typeof Z=="function"&&(Oa(t,n,Z,i),Y=t.memoizedState),(A=zn||td(t,n,A,i,T,Y,y)||!1)?(F||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,Y,y),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,Y,y)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||w===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Y),f.props=i,f.state=Y,f.context=y,i=A):(typeof f.componentDidUpdate!="function"||w===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),i=!1)}return Ba(e,t,n,i,u,a)}function Ba(e,t,n,i,a,u){hd(e,t);var f=(t.flags&128)!==0;if(!i&&!f)return a&&yc(t,n,!1),mn(e,t,u);i=t.stateNode,Zp.current=t;var w=f&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&f?(t.child=Pr(t,e.child,null,u),t.child=Pr(t,null,w,u)):dt(e,t,w,u),t.memoizedState=i.state,a&&yc(t,n,!0),t.child}function md(e){var t=e.stateNode;t.pendingContext?wc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wc(e,t.context,!1),ba(e,t.containerInfo)}function gd(e,t,n,i,a){return _r(),wa(a),t.flags|=256,dt(e,t,n,i),t.child}var Va={dehydrated:null,treeContext:null,retryLane:0};function Ua(e){return{baseLanes:e,cachePool:null,transitions:null}}function wd(e,t,n){var i=t.pendingProps,a=We.current,u=!1,f=(t.flags&128)!==0,w;if((w=f)||(w=e!==null&&e.memoizedState===null?!1:(a&2)!==0),w?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),ze(We,a&1),e===null)return ga(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(f=i.children,e=i.fallback,u?(i=t.mode,u=t.child,f={mode:"hidden",children:f},(i&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=f):u=Gs(f,i,0,null),e=lr(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Ua(n),t.memoizedState=Va,e):$a(t,f));if(a=e.memoizedState,a!==null&&(w=a.dehydrated,w!==null))return qp(e,t,f,i,w,a,n);if(u){u=i.fallback,f=t.mode,a=e.child,w=a.sibling;var y={mode:"hidden",children:i.children};return(f&1)===0&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=y,t.deletions=null):(i=Bn(a,y),i.subtreeFlags=a.subtreeFlags&14680064),w!==null?u=Bn(w,u):(u=lr(u,f,n,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,f=e.child.memoizedState,f=f===null?Ua(n):{baseLanes:f.baseLanes|n,cachePool:null,transitions:f.transitions},u.memoizedState=f,u.childLanes=e.childLanes&~n,t.memoizedState=Va,i}return u=e.child,e=u.sibling,i=Bn(u,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function $a(e,t){return t=Gs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ds(e,t,n,i){return i!==null&&wa(i),Pr(t,e.child,null,n),e=$a(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qp(e,t,n,i,a,u,f){if(n)return t.flags&256?(t.flags&=-257,i=Ma(Error(o(422))),Ds(e,t,f,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=i.fallback,a=t.mode,i=Gs({mode:"visible",children:i.children},a,0,null),u=lr(u,a,f,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,(t.mode&1)!==0&&Pr(t,e.child,null,f),t.child.memoizedState=Ua(f),t.memoizedState=Va,u);if((t.mode&1)===0)return Ds(e,t,f,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var w=i.dgst;return i=w,u=Error(o(419)),i=Ma(u,i,void 0),Ds(e,t,f,i)}if(w=(f&e.childLanes)!==0,wt||w){if(i=Je,i!==null){switch(f&-f){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|f))!==0?0:a,a!==0&&a!==u.retryLane&&(u.retryLane=a,hn(e,a),Gt(i,e,a,-1))}return lo(),i=Ma(Error(o(421))),Ds(e,t,f,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=um.bind(null,e),a._reactRetry=t,null):(e=u.treeContext,jt=Pn(a.nextSibling),bt=t,Te=!0,Vt=null,e!==null&&(_t[Pt++]=dn,_t[Pt++]=fn,_t[Pt++]=Xn,dn=e.id,fn=e.overflow,Xn=t),t=$a(t,i.children),t.flags|=4096,t)}function vd(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Sa(e.return,t,n)}function Ha(e,t,n,i,a){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=n,u.tailMode=a)}function yd(e,t,n){var i=t.pendingProps,a=i.revealOrder,u=i.tail;if(dt(e,t,i.children,n),i=We.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vd(e,n,t);else if(e.tag===19)vd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(ze(We,i),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Ns(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ha(t,!1,a,n,u);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ns(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ha(t,!0,n,null,u);break;case"together":Ha(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Bn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Xp(e,t,n){switch(t.tag){case 3:md(t),_r();break;case 5:Dc(t);break;case 1:gt(t.type)&&gs(t);break;case 4:ba(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;ze(ks,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ze(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?wd(e,t,n):(ze(We,We.current&1),e=mn(e,t,n),e!==null?e.sibling:null);ze(We,We.current&1);break;case 19:if(i=(n&t.childLanes)!==0,(e.flags&128)!==0){if(i)return yd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ze(We,We.current),i)break;return null;case 22:case 23:return t.lanes=0,fd(e,t,n)}return mn(e,t,n)}var xd,Ga,Sd,kd;xd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ga=function(){},Sd=function(e,t,n,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,er(Jt.current);var u=null;switch(n){case"input":a=Ue(e,a),i=Ue(e,i),u=[];break;case"select":a=K({},a,{value:void 0}),i=K({},i,{value:void 0}),u=[];break;case"textarea":a=bl(e,a),i=bl(e,i),u=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=hs)}Nl(n,i);var f;n=null;for(A in a)if(!i.hasOwnProperty(A)&&a.hasOwnProperty(A)&&a[A]!=null)if(A==="style"){var w=a[A];for(f in w)w.hasOwnProperty(f)&&(n||(n={}),n[f]="")}else A!=="dangerouslySetInnerHTML"&&A!=="children"&&A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(c.hasOwnProperty(A)?u||(u=[]):(u=u||[]).push(A,null));for(A in i){var y=i[A];if(w=a?.[A],i.hasOwnProperty(A)&&y!==w&&(y!=null||w!=null))if(A==="style")if(w){for(f in w)!w.hasOwnProperty(f)||y&&y.hasOwnProperty(f)||(n||(n={}),n[f]="");for(f in y)y.hasOwnProperty(f)&&w[f]!==y[f]&&(n||(n={}),n[f]=y[f])}else n||(u||(u=[]),u.push(A,n)),n=y;else A==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,w=w?w.__html:void 0,y!=null&&w!==y&&(u=u||[]).push(A,y)):A==="children"?typeof y!="string"&&typeof y!="number"||(u=u||[]).push(A,""+y):A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&(c.hasOwnProperty(A)?(y!=null&&A==="onScroll"&&Le("scroll",e),u||w===y||(u=[])):(u=u||[]).push(A,y))}n&&(u=u||[]).push("style",n);var A=u;(t.updateQueue=A)&&(t.flags|=4)}},kd=function(e,t,n,i){n!==i&&(t.flags|=4)};function Ni(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Yp(e,t,n){var i=t.pendingProps;switch(pa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return gt(t.type)&&ms(),ot(t),null;case 3:return i=t.stateNode,Dr(),Oe(mt),Oe(lt),Ca(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vt!==null&&(ro(Vt),Vt=null))),Ga(e,t),ot(t),null;case 5:ja(t);var a=er(Si.current);if(n=t.type,e!==null&&t.stateNode!=null)Sd(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ot(t),null}if(e=er(Jt.current),xs(t)){i=t.stateNode,n=t.type;var u=t.memoizedProps;switch(i[Yt]=t,i[gi]=u,e=(t.mode&1)!==0,n){case"dialog":Le("cancel",i),Le("close",i);break;case"iframe":case"object":case"embed":Le("load",i);break;case"video":case"audio":for(a=0;a<hi.length;a++)Le(hi[a],i);break;case"source":Le("error",i);break;case"img":case"image":case"link":Le("error",i),Le("load",i);break;case"details":Le("toggle",i);break;case"input":kt(i,u),Le("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!u.multiple},Le("invalid",i);break;case"textarea":su(i,u),Le("invalid",i)}Nl(n,u),a=null;for(var f in u)if(u.hasOwnProperty(f)){var w=u[f];f==="children"?typeof w=="string"?i.textContent!==w&&(u.suppressHydrationWarning!==!0&&fs(i.textContent,w,e),a=["children",w]):typeof w=="number"&&i.textContent!==""+w&&(u.suppressHydrationWarning!==!0&&fs(i.textContent,w,e),a=["children",""+w]):c.hasOwnProperty(f)&&w!=null&&f==="onScroll"&&Le("scroll",i)}switch(n){case"input":Kn(i),iu(i,u,!0);break;case"textarea":Kn(i),au(i);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(i.onclick=hs)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{f=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ou(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=f.createElement(n,{is:i.is}):(e=f.createElement(n),n==="select"&&(f=e,i.multiple?f.multiple=!0:i.size&&(f.size=i.size))):e=f.createElementNS(e,n),e[Yt]=t,e[gi]=i,xd(e,t,!1,!1),t.stateNode=e;e:{switch(f=Cl(n,i),n){case"dialog":Le("cancel",e),Le("close",e),a=i;break;case"iframe":case"object":case"embed":Le("load",e),a=i;break;case"video":case"audio":for(a=0;a<hi.length;a++)Le(hi[a],e);a=i;break;case"source":Le("error",e),a=i;break;case"img":case"image":case"link":Le("error",e),Le("load",e),a=i;break;case"details":Le("toggle",e),a=i;break;case"input":kt(e,i),a=Ue(e,i),Le("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=K({},i,{value:void 0}),Le("invalid",e);break;case"textarea":su(e,i),a=bl(e,i),Le("invalid",e);break;default:a=i}Nl(n,a),w=a;for(u in w)if(w.hasOwnProperty(u)){var y=w[u];u==="style"?du(e,y):u==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&uu(e,y)):u==="children"?typeof y=="string"?(n!=="textarea"||y!=="")&&Qr(e,y):typeof y=="number"&&Qr(e,""+y):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(c.hasOwnProperty(u)?y!=null&&u==="onScroll"&&Le("scroll",e):y!=null&&M(e,u,y,f))}switch(n){case"input":Kn(e),iu(e,i,!1);break;case"textarea":Kn(e),au(e);break;case"option":i.value!=null&&e.setAttribute("value",""+ue(i.value));break;case"select":e.multiple=!!i.multiple,u=i.value,u!=null?pr(e,!!i.multiple,u,!1):i.defaultValue!=null&&pr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=hs)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ot(t),null;case 6:if(e&&t.stateNode!=null)kd(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(n=er(Si.current),er(Jt.current),xs(t)){if(i=t.stateNode,n=t.memoizedProps,i[Yt]=t,(u=i.nodeValue!==n)&&(e=bt,e!==null))switch(e.tag){case 3:fs(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fs(i.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Yt]=t,t.stateNode=i}return ot(t),null;case 13:if(Oe(We),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Te&&jt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)jc(),_r(),t.flags|=98560,u=!1;else if(u=xs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Yt]=t}else _r(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),u=!1}else Vt!==null&&(ro(Vt),Vt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(We.current&1)!==0?Xe===0&&(Xe=3):lo())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return Dr(),Ga(e,t),e===null&&pi(t.stateNode.containerInfo),ot(t),null;case 10:return xa(t.type._context),ot(t),null;case 17:return gt(t.type)&&ms(),ot(t),null;case 19:if(Oe(We),u=t.memoizedState,u===null)return ot(t),null;if(i=(t.flags&128)!==0,f=u.rendering,f===null)if(i)Ni(u,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ns(e),f!==null){for(t.flags|=128,Ni(u,!1),i=f.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)u=n,e=i,u.flags&=14680066,f=u.alternate,f===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=f.childLanes,u.lanes=f.lanes,u.child=f.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=f.memoizedProps,u.memoizedState=f.memoizedState,u.updateQueue=f.updateQueue,u.type=f.type,e=f.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ze(We,We.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ge()>Tr&&(t.flags|=128,i=!0,Ni(u,!1),t.lanes=4194304)}else{if(!i)if(e=Ns(f),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ni(u,!0),u.tail===null&&u.tailMode==="hidden"&&!f.alternate&&!Te)return ot(t),null}else 2*Ge()-u.renderingStartTime>Tr&&n!==1073741824&&(t.flags|=128,i=!0,Ni(u,!1),t.lanes=4194304);u.isBackwards?(f.sibling=t.child,t.child=f):(n=u.last,n!==null?n.sibling=f:t.child=f,u.last=f)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ge(),t.sibling=null,n=We.current,ze(We,i?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return so(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Nt&1073741824)!==0&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Jp(e,t){switch(pa(t),t.tag){case 1:return gt(t.type)&&ms(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dr(),Oe(mt),Oe(lt),Ca(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ja(t),null;case 13:if(Oe(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));_r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(We),null;case 4:return Dr(),null;case 10:return xa(t.type._context),null;case 22:case 23:return so(),null;case 24:return null;default:return null}}var Ls=!1,ut=!1,em=typeof WeakSet=="function"?WeakSet:Set,X=null;function Lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){$e(e,t,i)}else n.current=null}function Ka(e,t,n){try{n()}catch(i){$e(e,t,i)}}var Ed=!1;function tm(e,t){if(sa=ts,e=tc(),Xl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var f=0,w=-1,y=-1,A=0,F=0,B=e,T=null;t:for(;;){for(var Z;B!==n||a!==0&&B.nodeType!==3||(w=f+a),B!==u||i!==0&&B.nodeType!==3||(y=f+i),B.nodeType===3&&(f+=B.nodeValue.length),(Z=B.firstChild)!==null;)T=B,B=Z;for(;;){if(B===e)break t;if(T===n&&++A===a&&(w=f),T===u&&++F===i&&(y=f),(Z=B.nextSibling)!==null)break;B=T,T=B.parentNode}B=Z}n=w===-1||y===-1?null:{start:w,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(la={focusedElem:e,selectionRange:n},ts=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var Y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Y!==null){var ie=Y.memoizedProps,Ke=Y.memoizedState,R=t.stateNode,k=R.getSnapshotBeforeUpdate(t.elementType===t.type?ie:Ut(t.type,ie),Ke);R.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(G){$e(t,t.return,G)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return Y=Ed,Ed=!1,Y}function Ci(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var u=a.destroy;a.destroy=void 0,u!==void 0&&Ka(t,n,u)}a=a.next}while(a!==i)}}function Os(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function Qa(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function bd(e){var t=e.alternate;t!==null&&(e.alternate=null,bd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yt],delete t[gi],delete t[ca],delete t[Tp],delete t[Mp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jd(e){return e.tag===5||e.tag===3||e.tag===4}function Nd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Za(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hs));else if(i!==4&&(e=e.child,e!==null))for(Za(e,t,n),e=e.sibling;e!==null;)Za(e,t,n),e=e.sibling}function qa(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(qa(e,t,n),e=e.sibling;e!==null;)qa(e,t,n),e=e.sibling}var tt=null,$t=!1;function On(e,t,n){for(n=n.child;n!==null;)Cd(e,t,n),n=n.sibling}function Cd(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(Zi,n)}catch{}switch(n.tag){case 5:ut||Lr(n,t);case 6:var i=tt,a=$t;tt=null,On(e,t,n),tt=i,$t=a,tt!==null&&($t?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&($t?(e=tt,n=n.stateNode,e.nodeType===8?ua(e.parentNode,n):e.nodeType===1&&ua(e,n),si(e)):ua(tt,n.stateNode));break;case 4:i=tt,a=$t,tt=n.stateNode.containerInfo,$t=!0,On(e,t,n),tt=i,$t=a;break;case 0:case 11:case 14:case 15:if(!ut&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var u=a,f=u.destroy;u=u.tag,f!==void 0&&((u&2)!==0||(u&4)!==0)&&Ka(n,t,f),a=a.next}while(a!==i)}On(e,t,n);break;case 1:if(!ut&&(Lr(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(w){$e(n,t,w)}On(e,t,n);break;case 21:On(e,t,n);break;case 22:n.mode&1?(ut=(i=ut)||n.memoizedState!==null,On(e,t,n),ut=i):On(e,t,n);break;default:On(e,t,n)}}function Rd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new em),t.forEach(function(i){var a=cm.bind(null,e,i);n.has(i)||(n.add(i),i.then(a,a))})}}function Ht(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var u=e,f=t,w=f;e:for(;w!==null;){switch(w.tag){case 5:tt=w.stateNode,$t=!1;break e;case 3:tt=w.stateNode.containerInfo,$t=!0;break e;case 4:tt=w.stateNode.containerInfo,$t=!0;break e}w=w.return}if(tt===null)throw Error(o(160));Cd(u,f,a),tt=null,$t=!1;var y=a.alternate;y!==null&&(y.return=null),a.return=null}catch(A){$e(a,t,A)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_d(t,e),t=t.sibling}function _d(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(t,e),tn(e),i&4){try{Ci(3,e,e.return),Os(3,e)}catch(ie){$e(e,e.return,ie)}try{Ci(5,e,e.return)}catch(ie){$e(e,e.return,ie)}}break;case 1:Ht(t,e),tn(e),i&512&&n!==null&&Lr(n,n.return);break;case 5:if(Ht(t,e),tn(e),i&512&&n!==null&&Lr(n,n.return),e.flags&32){var a=e.stateNode;try{Qr(a,"")}catch(ie){$e(e,e.return,ie)}}if(i&4&&(a=e.stateNode,a!=null)){var u=e.memoizedProps,f=n!==null?n.memoizedProps:u,w=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{w==="input"&&u.type==="radio"&&u.name!=null&&Fe(a,u),Cl(w,f);var A=Cl(w,u);for(f=0;f<y.length;f+=2){var F=y[f],B=y[f+1];F==="style"?du(a,B):F==="dangerouslySetInnerHTML"?uu(a,B):F==="children"?Qr(a,B):M(a,F,B,A)}switch(w){case"input":qt(a,u);break;case"textarea":lu(a,u);break;case"select":var T=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!u.multiple;var Z=u.value;Z!=null?pr(a,!!u.multiple,Z,!1):T!==!!u.multiple&&(u.defaultValue!=null?pr(a,!!u.multiple,u.defaultValue,!0):pr(a,!!u.multiple,u.multiple?[]:"",!1))}a[gi]=u}catch(ie){$e(e,e.return,ie)}}break;case 6:if(Ht(t,e),tn(e),i&4){if(e.stateNode===null)throw Error(o(162));a=e.stateNode,u=e.memoizedProps;try{a.nodeValue=u}catch(ie){$e(e,e.return,ie)}}break;case 3:if(Ht(t,e),tn(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{si(t.containerInfo)}catch(ie){$e(e,e.return,ie)}break;case 4:Ht(t,e),tn(e);break;case 13:Ht(t,e),tn(e),a=e.child,a.flags&8192&&(u=a.memoizedState!==null,a.stateNode.isHidden=u,!u||a.alternate!==null&&a.alternate.memoizedState!==null||(Ja=Ge())),i&4&&Rd(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(A=ut)||F,Ht(t,e),ut=A):Ht(t,e),tn(e),i&8192){if(A=e.memoizedState!==null,(e.stateNode.isHidden=A)&&!F&&(e.mode&1)!==0)for(X=e,F=e.child;F!==null;){for(B=X=F;X!==null;){switch(T=X,Z=T.child,T.tag){case 0:case 11:case 14:case 15:Ci(4,T,T.return);break;case 1:Lr(T,T.return);var Y=T.stateNode;if(typeof Y.componentWillUnmount=="function"){i=T,n=T.return;try{t=i,Y.props=t.memoizedProps,Y.state=t.memoizedState,Y.componentWillUnmount()}catch(ie){$e(i,n,ie)}}break;case 5:Lr(T,T.return);break;case 22:if(T.memoizedState!==null){Id(B);continue}}Z!==null?(Z.return=T,X=Z):Id(B)}F=F.sibling}e:for(F=null,B=e;;){if(B.tag===5){if(F===null){F=B;try{a=B.stateNode,A?(u=a.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(w=B.stateNode,y=B.memoizedProps.style,f=y!=null&&y.hasOwnProperty("display")?y.display:null,w.style.display=cu("display",f))}catch(ie){$e(e,e.return,ie)}}}else if(B.tag===6){if(F===null)try{B.stateNode.nodeValue=A?"":B.memoizedProps}catch(ie){$e(e,e.return,ie)}}else if((B.tag!==22&&B.tag!==23||B.memoizedState===null||B===e)&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===e)break e;for(;B.sibling===null;){if(B.return===null||B.return===e)break e;F===B&&(F=null),B=B.return}F===B&&(F=null),B.sibling.return=B.return,B=B.sibling}}break;case 19:Ht(t,e),tn(e),i&4&&Rd(e);break;case 21:break;default:Ht(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jd(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Qr(a,""),i.flags&=-33);var u=Nd(e);qa(e,u,a);break;case 3:case 4:var f=i.stateNode.containerInfo,w=Nd(e);Za(e,w,f);break;default:throw Error(o(161))}}catch(y){$e(e,e.return,y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nm(e,t,n){X=e,Pd(e)}function Pd(e,t,n){for(var i=(e.mode&1)!==0;X!==null;){var a=X,u=a.child;if(a.tag===22&&i){var f=a.memoizedState!==null||Ls;if(!f){var w=a.alternate,y=w!==null&&w.memoizedState!==null||ut;w=Ls;var A=ut;if(Ls=f,(ut=y)&&!A)for(X=a;X!==null;)f=X,y=f.child,f.tag===22&&f.memoizedState!==null?Dd(a):y!==null?(y.return=f,X=y):Dd(a);for(;u!==null;)X=u,Pd(u),u=u.sibling;X=a,Ls=w,ut=A}Ad(e)}else(a.subtreeFlags&8772)!==0&&u!==null?(u.return=a,X=u):Ad(e)}}function Ad(e){for(;X!==null;){var t=X;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Os(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ut)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ut(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&Ic(t,u,i);break;case 3:var f=t.updateQueue;if(f!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ic(t,f,n)}break;case 5:var w=t.stateNode;if(n===null&&t.flags&4){n=w;var y=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&n.focus();break;case"img":y.src&&(n.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var A=t.alternate;if(A!==null){var F=A.memoizedState;if(F!==null){var B=F.dehydrated;B!==null&&si(B)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}ut||t.flags&512&&Qa(t)}catch(T){$e(t,t.return,T)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function Id(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function Dd(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Os(4,t)}catch(y){$e(t,n,y)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(y){$e(t,a,y)}}var u=t.return;try{Qa(t)}catch(y){$e(t,u,y)}break;case 5:var f=t.return;try{Qa(t)}catch(y){$e(t,f,y)}}}catch(y){$e(t,t.return,y)}if(t===e){X=null;break}var w=t.sibling;if(w!==null){w.return=t.return,X=w;break}X=t.return}}var rm=Math.ceil,Ts=te.ReactCurrentDispatcher,Xa=te.ReactCurrentOwner,Dt=te.ReactCurrentBatchConfig,Ce=0,Je=null,Qe=null,nt=0,Nt=0,Or=An(0),Xe=0,Ri=null,nr=0,Ms=0,Ya=0,_i=null,vt=null,Ja=0,Tr=1/0,gn=null,Fs=!1,eo=null,Tn=null,Ws=!1,Mn=null,Bs=0,Pi=0,to=null,Vs=-1,Us=0;function ft(){return(Ce&6)!==0?Ge():Vs!==-1?Vs:Vs=Ge()}function Fn(e){return(e.mode&1)===0?1:(Ce&2)!==0&&nt!==0?nt&-nt:Wp.transition!==null?(Us===0&&(Us=Nu()),Us):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:Lu(e.type)),e)}function Gt(e,t,n,i){if(50<Pi)throw Pi=0,to=null,Error(o(185));ei(e,n,i),((Ce&2)===0||e!==Je)&&(e===Je&&((Ce&2)===0&&(Ms|=n),Xe===4&&Wn(e,nt)),yt(e,i),n===1&&Ce===0&&(t.mode&1)===0&&(Tr=Ge()+500,ws&&Dn()))}function yt(e,t){var n=e.callbackNode;Wh(e,t);var i=Yi(e,e===Je?nt:0);if(i===0)n!==null&&Eu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&Eu(n),t===1)e.tag===0?Fp(Ld.bind(null,e)):xc(Ld.bind(null,e)),Lp(function(){(Ce&6)===0&&Dn()}),n=null;else{switch(Cu(i)){case 1:n=zl;break;case 4:n=bu;break;case 16:n=Qi;break;case 536870912:n=ju;break;default:n=Qi}n=Ud(n,zd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zd(e,t){if(Vs=-1,Us=0,(Ce&6)!==0)throw Error(o(327));var n=e.callbackNode;if(Mr()&&e.callbackNode!==n)return null;var i=Yi(e,e===Je?nt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=$s(e,i);else{t=i;var a=Ce;Ce|=2;var u=Td();(Je!==e||nt!==t)&&(gn=null,Tr=Ge()+500,ir(e,t));do try{lm();break}catch(w){Od(e,w)}while(!0);ya(),Ts.current=u,Ce=a,Qe!==null?t=0:(Je=null,nt=0,t=Xe)}if(t!==0){if(t===2&&(a=Ll(e),a!==0&&(i=a,t=no(e,a))),t===1)throw n=Ri,ir(e,0),Wn(e,i),yt(e,Ge()),n;if(t===6)Wn(e,i);else{if(a=e.current.alternate,(i&30)===0&&!im(a)&&(t=$s(e,i),t===2&&(u=Ll(e),u!==0&&(i=u,t=no(e,u))),t===1))throw n=Ri,ir(e,0),Wn(e,i),yt(e,Ge()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:sr(e,vt,gn);break;case 3:if(Wn(e,i),(i&130023424)===i&&(t=Ja+500-Ge(),10<t)){if(Yi(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){ft(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=oa(sr.bind(null,e,vt,gn),t);break}sr(e,vt,gn);break;case 4:if(Wn(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var f=31-Wt(i);u=1<<f,f=t[f],f>a&&(a=f),i&=~u}if(i=a,i=Ge()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*rm(i/1960))-i,10<i){e.timeoutHandle=oa(sr.bind(null,e,vt,gn),i);break}sr(e,vt,gn);break;case 5:sr(e,vt,gn);break;default:throw Error(o(329))}}}return yt(e,Ge()),e.callbackNode===n?zd.bind(null,e):null}function no(e,t){var n=_i;return e.current.memoizedState.isDehydrated&&(ir(e,t).flags|=256),e=$s(e,t),e!==2&&(t=vt,vt=n,t!==null&&ro(t)),e}function ro(e){vt===null?vt=e:vt.push.apply(vt,e)}function im(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var a=n[i],u=a.getSnapshot;a=a.value;try{if(!Bt(u(),a))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~Ya,t&=~Ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Wt(t),i=1<<n;e[n]=-1,t&=~i}}function Ld(e){if((Ce&6)!==0)throw Error(o(327));Mr();var t=Yi(e,0);if((t&1)===0)return yt(e,Ge()),null;var n=$s(e,t);if(e.tag!==0&&n===2){var i=Ll(e);i!==0&&(t=i,n=no(e,i))}if(n===1)throw n=Ri,ir(e,0),Wn(e,t),yt(e,Ge()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sr(e,vt,gn),yt(e,Ge()),null}function io(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(Tr=Ge()+500,ws&&Dn())}}function rr(e){Mn!==null&&Mn.tag===0&&(Ce&6)===0&&Mr();var t=Ce;Ce|=1;var n=Dt.transition,i=Pe;try{if(Dt.transition=null,Pe=1,e)return e()}finally{Pe=i,Dt.transition=n,Ce=t,(Ce&6)===0&&Dn()}}function so(){Nt=Or.current,Oe(Or)}function ir(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zp(n)),Qe!==null)for(n=Qe.return;n!==null;){var i=n;switch(pa(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ms();break;case 3:Dr(),Oe(mt),Oe(lt),Ca();break;case 5:ja(i);break;case 4:Dr();break;case 13:Oe(We);break;case 19:Oe(We);break;case 10:xa(i.type._context);break;case 22:case 23:so()}n=n.return}if(Je=e,Qe=e=Bn(e.current,null),nt=Nt=t,Xe=0,Ri=null,Ya=Ms=nr=0,vt=_i=null,Jn!==null){for(t=0;t<Jn.length;t++)if(n=Jn[t],i=n.interleaved,i!==null){n.interleaved=null;var a=i.next,u=n.pending;if(u!==null){var f=u.next;u.next=a,i.next=f}n.pending=i}Jn=null}return e}function Od(e,t){do{var n=Qe;try{if(ya(),Cs.current=As,Rs){for(var i=Be.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Rs=!1}if(tr=0,Ye=qe=Be=null,ki=!1,Ei=0,Xa.current=null,n===null||n.return===null){Xe=1,Ri=t,Qe=null;break}e:{var u=e,f=n.return,w=n,y=t;if(t=nt,w.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var A=y,F=w,B=F.tag;if((F.mode&1)===0&&(B===0||B===11||B===15)){var T=F.alternate;T?(F.updateQueue=T.updateQueue,F.memoizedState=T.memoizedState,F.lanes=T.lanes):(F.updateQueue=null,F.memoizedState=null)}var Z=ad(f);if(Z!==null){Z.flags&=-257,od(Z,f,w,u,t),Z.mode&1&&ld(u,A,t),t=Z,y=A;var Y=t.updateQueue;if(Y===null){var ie=new Set;ie.add(y),t.updateQueue=ie}else Y.add(y);break e}else{if((t&1)===0){ld(u,A,t),lo();break e}y=Error(o(426))}}else if(Te&&w.mode&1){var Ke=ad(f);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),od(Ke,f,w,u,t),wa(zr(y,w));break e}}u=y=zr(y,w),Xe!==4&&(Xe=2),_i===null?_i=[u]:_i.push(u),u=f;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var R=id(u,y,t);Ac(u,R);break e;case 1:w=y;var k=u.type,_=u.stateNode;if((u.flags&128)===0&&(typeof k.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Tn===null||!Tn.has(_)))){u.flags|=65536,t&=-t,u.lanes|=t;var G=sd(u,w,t);Ac(u,G);break e}}u=u.return}while(u!==null)}Fd(n)}catch(le){t=le,Qe===n&&n!==null&&(Qe=n=n.return);continue}break}while(!0)}function Td(){var e=Ts.current;return Ts.current=As,e===null?As:e}function lo(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),Je===null||(nr&268435455)===0&&(Ms&268435455)===0||Wn(Je,nt)}function $s(e,t){var n=Ce;Ce|=2;var i=Td();(Je!==e||nt!==t)&&(gn=null,ir(e,t));do try{sm();break}catch(a){Od(e,a)}while(!0);if(ya(),Ce=n,Ts.current=i,Qe!==null)throw Error(o(261));return Je=null,nt=0,Xe}function sm(){for(;Qe!==null;)Md(Qe)}function lm(){for(;Qe!==null&&!Ah();)Md(Qe)}function Md(e){var t=Vd(e.alternate,e,Nt);e.memoizedProps=e.pendingProps,t===null?Fd(e):Qe=t,Xa.current=null}function Fd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Yp(n,t,Nt),n!==null){Qe=n;return}}else{if(n=Jp(n,t),n!==null){n.flags&=32767,Qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Qe=null;return}}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);Xe===0&&(Xe=5)}function sr(e,t,n){var i=Pe,a=Dt.transition;try{Dt.transition=null,Pe=1,am(e,t,n,i)}finally{Dt.transition=a,Pe=i}return null}function am(e,t,n,i){do Mr();while(Mn!==null);if((Ce&6)!==0)throw Error(o(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(Bh(e,u),e===Je&&(Qe=Je=null,nt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ws||(Ws=!0,Ud(Qi,function(){return Mr(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=Dt.transition,Dt.transition=null;var f=Pe;Pe=1;var w=Ce;Ce|=4,Xa.current=null,tm(e,n),_d(n,e),Cp(la),ts=!!sa,la=sa=null,e.current=n,nm(n),Ih(),Ce=w,Pe=f,Dt.transition=u}else e.current=n;if(Ws&&(Ws=!1,Mn=e,Bs=a),u=e.pendingLanes,u===0&&(Tn=null),Lh(n.stateNode),yt(e,Ge()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(Fs)throw Fs=!1,e=eo,eo=null,e;return(Bs&1)!==0&&e.tag!==0&&Mr(),u=e.pendingLanes,(u&1)!==0?e===to?Pi++:(Pi=0,to=e):Pi=0,Dn(),null}function Mr(){if(Mn!==null){var e=Cu(Bs),t=Dt.transition,n=Pe;try{if(Dt.transition=null,Pe=16>e?16:e,Mn===null)var i=!1;else{if(e=Mn,Mn=null,Bs=0,(Ce&6)!==0)throw Error(o(331));var a=Ce;for(Ce|=4,X=e.current;X!==null;){var u=X,f=u.child;if((X.flags&16)!==0){var w=u.deletions;if(w!==null){for(var y=0;y<w.length;y++){var A=w[y];for(X=A;X!==null;){var F=X;switch(F.tag){case 0:case 11:case 15:Ci(8,F,u)}var B=F.child;if(B!==null)B.return=F,X=B;else for(;X!==null;){F=X;var T=F.sibling,Z=F.return;if(bd(F),F===A){X=null;break}if(T!==null){T.return=Z,X=T;break}X=Z}}}var Y=u.alternate;if(Y!==null){var ie=Y.child;if(ie!==null){Y.child=null;do{var Ke=ie.sibling;ie.sibling=null,ie=Ke}while(ie!==null)}}X=u}}if((u.subtreeFlags&2064)!==0&&f!==null)f.return=u,X=f;else e:for(;X!==null;){if(u=X,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Ci(9,u,u.return)}var R=u.sibling;if(R!==null){R.return=u.return,X=R;break e}X=u.return}}var k=e.current;for(X=k;X!==null;){f=X;var _=f.child;if((f.subtreeFlags&2064)!==0&&_!==null)_.return=f,X=_;else e:for(f=k;X!==null;){if(w=X,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:Os(9,w)}}catch(le){$e(w,w.return,le)}if(w===f){X=null;break e}var G=w.sibling;if(G!==null){G.return=w.return,X=G;break e}X=w.return}}if(Ce=a,Dn(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(Zi,e)}catch{}i=!0}return i}finally{Pe=n,Dt.transition=t}}return!1}function Wd(e,t,n){t=zr(n,t),t=id(e,t,1),e=Ln(e,t,1),t=ft(),e!==null&&(ei(e,1,t),yt(e,t))}function $e(e,t,n){if(e.tag===3)Wd(e,e,n);else for(;t!==null;){if(t.tag===3){Wd(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Tn===null||!Tn.has(i))){e=zr(n,e),e=sd(t,e,1),t=Ln(t,e,1),e=ft(),t!==null&&(ei(t,1,e),yt(t,e));break}}t=t.return}}function om(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,Je===e&&(nt&n)===n&&(Xe===4||Xe===3&&(nt&130023424)===nt&&500>Ge()-Ja?ir(e,0):Ya|=n),yt(e,t)}function Bd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xi,Xi<<=1,(Xi&130023424)===0&&(Xi=4194304)));var n=ft();e=hn(e,t),e!==null&&(ei(e,t,n),yt(e,n))}function um(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bd(e,n)}function cm(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(t),Bd(e,n)}var Vd;Vd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||mt.current)wt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return wt=!1,Xp(e,t,n);wt=(e.flags&131072)!==0}else wt=!1,Te&&(t.flags&1048576)!==0&&Sc(t,ys,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;zs(e,t),e=t.pendingProps;var a=Nr(t,lt.current);Ir(t,n),a=Pa(null,t,i,e,a,n);var u=Aa();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(i)?(u=!0,gs(t)):u=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Ea(t),a.updater=Is,t.stateNode=a,a._reactInternals=t,Ta(t,i,e,n),t=Ba(null,t,i,!0,u,n)):(t.tag=0,Te&&u&&ha(t),dt(null,t,a,n),t=t.child),t;case 16:i=t.elementType;e:{switch(zs(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=fm(i),e=Ut(i,e),a){case 0:t=Wa(null,t,i,e,n);break e;case 1:t=pd(null,t,i,e,n);break e;case 11:t=ud(null,t,i,e,n);break e;case 14:t=cd(null,t,i,Ut(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),Wa(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),pd(e,t,i,a,n);case 3:e:{if(md(t),e===null)throw Error(o(387));i=t.pendingProps,u=t.memoizedState,a=u.element,Pc(e,t),js(t,i,null,n);var f=t.memoizedState;if(i=f.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){a=zr(Error(o(423)),t),t=gd(e,t,i,n,a);break e}else if(i!==a){a=zr(Error(o(424)),t),t=gd(e,t,i,n,a);break e}else for(jt=Pn(t.stateNode.containerInfo.firstChild),bt=t,Te=!0,Vt=null,n=Rc(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_r(),i===a){t=mn(e,t,n);break e}dt(e,t,i,n)}t=t.child}return t;case 5:return Dc(t),e===null&&ga(t),i=t.type,a=t.pendingProps,u=e!==null?e.memoizedProps:null,f=a.children,aa(i,a)?f=null:u!==null&&aa(i,u)&&(t.flags|=32),hd(e,t),dt(e,t,f,n),t.child;case 6:return e===null&&ga(t),null;case 13:return wd(e,t,n);case 4:return ba(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Pr(t,null,i,n):dt(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),ud(e,t,i,a,n);case 7:return dt(e,t,t.pendingProps,n),t.child;case 8:return dt(e,t,t.pendingProps.children,n),t.child;case 12:return dt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,u=t.memoizedProps,f=a.value,ze(ks,i._currentValue),i._currentValue=f,u!==null)if(Bt(u.value,f)){if(u.children===a.children&&!mt.current){t=mn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var w=u.dependencies;if(w!==null){f=u.child;for(var y=w.firstContext;y!==null;){if(y.context===i){if(u.tag===1){y=pn(-1,n&-n),y.tag=2;var A=u.updateQueue;if(A!==null){A=A.shared;var F=A.pending;F===null?y.next=y:(y.next=F.next,F.next=y),A.pending=y}}u.lanes|=n,y=u.alternate,y!==null&&(y.lanes|=n),Sa(u.return,n,t),w.lanes|=n;break}y=y.next}}else if(u.tag===10)f=u.type===t.type?null:u.child;else if(u.tag===18){if(f=u.return,f===null)throw Error(o(341));f.lanes|=n,w=f.alternate,w!==null&&(w.lanes|=n),Sa(f,n,t),f=u.sibling}else f=u.child;if(f!==null)f.return=u;else for(f=u;f!==null;){if(f===t){f=null;break}if(u=f.sibling,u!==null){u.return=f.return,f=u;break}f=f.return}u=f}dt(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ir(t,n),a=At(a),i=i(a),t.flags|=1,dt(e,t,i,n),t.child;case 14:return i=t.type,a=Ut(i,t.pendingProps),a=Ut(i.type,a),cd(e,t,i,a,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ut(i,a),zs(e,t),t.tag=1,gt(i)?(e=!0,gs(t)):e=!1,Ir(t,n),nd(t,i,a),Ta(t,i,a,n),Ba(null,t,i,!0,e,n);case 19:return yd(e,t,n);case 22:return fd(e,t,n)}throw Error(o(156,t.tag))};function Ud(e,t){return ku(e,t)}function dm(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,n,i){return new dm(e,t,n,i)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fm(e){if(typeof e=="function")return ao(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===q)return 14}return 2}function Bn(e,t){var n=e.alternate;return n===null?(n=zt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hs(e,t,n,i,a,u){var f=2;if(i=e,typeof e=="function")ao(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case Ee:return lr(n.children,a,u,t);case ee:f=8,a|=8;break;case be:return e=zt(12,n,t,a|2),e.elementType=be,e.lanes=u,e;case H:return e=zt(13,n,t,a),e.elementType=H,e.lanes=u,e;case me:return e=zt(19,n,t,a),e.elementType=me,e.lanes=u,e;case Se:return Gs(n,a,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:f=10;break e;case ae:f=9;break e;case j:f=11;break e;case q:f=14;break e;case ce:f=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=zt(f,n,t,a),t.elementType=e,t.type=i,t.lanes=u,t}function lr(e,t,n,i){return e=zt(7,e,i,t),e.lanes=n,e}function Gs(e,t,n,i){return e=zt(22,e,i,t),e.elementType=Se,e.lanes=n,e.stateNode={isHidden:!1},e}function oo(e,t,n){return e=zt(6,e,null,t),e.lanes=n,e}function uo(e,t,n){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hm(e,t,n,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ol(0),this.expirationTimes=Ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function co(e,t,n,i,a,u,f,w,y){return e=new hm(e,t,n,w,y),t===1?(t=1,u===!0&&(t|=8)):t=0,u=zt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ea(u),e}function pm(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xe,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function $d(e){if(!e)return In;e=e._reactInternals;e:{if(Qn(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(gt(n))return vc(e,n,t)}return t}function Hd(e,t,n,i,a,u,f,w,y){return e=co(n,i,!0,e,a,u,f,w,y),e.context=$d(null),n=e.current,i=ft(),a=Fn(n),u=pn(i,a),u.callback=t??null,Ln(n,u,a),e.current.lanes=a,ei(e,a,i),yt(e,i),e}function Ks(e,t,n,i){var a=t.current,u=ft(),f=Fn(a);return n=$d(n),t.context===null?t.context=n:t.pendingContext=n,t=pn(u,f),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Ln(a,t,f),e!==null&&(Gt(e,a,f,u),bs(e,a,f)),f}function Qs(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Gd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fo(e,t){Gd(e,t),(e=e.alternate)&&Gd(e,t)}function mm(){return null}var Kd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ho(e){this._internalRoot=e}Zs.prototype.render=ho.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));Ks(e,t,null,null)},Zs.prototype.unmount=ho.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rr(function(){Ks(null,e,null,null)}),t[un]=null}};function Zs(e){this._internalRoot=e}Zs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cn.length&&t!==0&&t<Cn[n].priority;n++);Cn.splice(n,0,e),n===0&&Du(e)}};function po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Qd(){}function gm(e,t,n,i,a){if(a){if(typeof i=="function"){var u=i;i=function(){var A=Qs(f);u.call(A)}}var f=Hd(t,i,e,0,null,!1,!1,"",Qd);return e._reactRootContainer=f,e[un]=f.current,pi(e.nodeType===8?e.parentNode:e),rr(),f}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var w=i;i=function(){var A=Qs(y);w.call(A)}}var y=co(e,0,!1,null,null,!1,!1,"",Qd);return e._reactRootContainer=y,e[un]=y.current,pi(e.nodeType===8?e.parentNode:e),rr(function(){Ks(t,y,n,i)}),y}function Xs(e,t,n,i,a){var u=n._reactRootContainer;if(u){var f=u;if(typeof a=="function"){var w=a;a=function(){var y=Qs(f);w.call(y)}}Ks(t,f,e,a)}else f=gm(n,t,e,a,i);return Qs(f)}Ru=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jr(t.pendingLanes);n!==0&&(Tl(t,n|1),yt(t,Ge()),(Ce&6)===0&&(Tr=Ge()+500,Dn()))}break;case 13:rr(function(){var i=hn(e,1);if(i!==null){var a=ft();Gt(i,e,1,a)}}),fo(e,1)}},Ml=function(e){if(e.tag===13){var t=hn(e,134217728);if(t!==null){var n=ft();Gt(t,e,134217728,n)}fo(e,134217728)}},_u=function(e){if(e.tag===13){var t=Fn(e),n=hn(e,t);if(n!==null){var i=ft();Gt(n,e,t,i)}fo(e,t)}},Pu=function(){return Pe},Au=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}},Pl=function(e,t,n){switch(t){case"input":if(qt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=ps(i);if(!a)throw Error(o(90));Q(i),qt(i,a)}}}break;case"textarea":lu(e,n);break;case"select":t=n.value,t!=null&&pr(e,!!n.multiple,t,!1)}},mu=io,gu=rr;var wm={usingClientEntryPoint:!1,Events:[wi,br,ps,hu,pu,io]},Ai={findFiberByHostInstance:Zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vm={bundleType:Ai.bundleType,version:Ai.version,rendererPackageName:Ai.rendererPackageName,rendererConfig:Ai.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:te.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xu(e),e===null?null:e.stateNode},findFiberByHostInstance:Ai.findFiberByHostInstance||mm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{Zi=Ys.inject(vm),Xt=Ys}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wm,xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!po(t))throw Error(o(200));return pm(e,t,null,n)},xt.createRoot=function(e,t){if(!po(e))throw Error(o(299));var n=!1,i="",a=Kd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=co(e,1,!1,null,null,n,!1,i,a),e[un]=t.current,pi(e.nodeType===8?e.parentNode:e),new ho(t)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=xu(t),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return rr(e)},xt.hydrate=function(e,t,n){if(!qs(t))throw Error(o(200));return Xs(null,e,t,!0,n)},xt.hydrateRoot=function(e,t,n){if(!po(e))throw Error(o(405));var i=n!=null&&n.hydratedSources||null,a=!1,u="",f=Kd;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),t=Hd(t,null,e,1,n??null,a,!1,u,f),e[un]=t.current,pi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Zs(t)},xt.render=function(e,t,n){if(!qs(t))throw Error(o(200));return Xs(null,e,t,!1,n)},xt.unmountComponentAtNode=function(e){if(!qs(e))throw Error(o(40));return e._reactRootContainer?(rr(function(){Xs(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1},xt.unstable_batchedUpdates=io,xt.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!qs(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Xs(e,t,n,!1,i)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var nf;function Nm(){if(nf)return wo.exports;nf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(l){console.error(l)}}return r(),wo.exports=jm(),wo.exports}var rf;function Cm(){if(rf)return Js;rf=1;var r=Nm();return Js.createRoot=r.createRoot,Js.hydrateRoot=r.hydrateRoot,Js}var Rm=Cm();const _m=Mf(Rm);var Ho=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Wf=/^[\\/]{2}/;function Pm(r,l){return l+r.replace(/\\/g,"/")}var sf="popstate";function lf(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function Am(r={}){function l(c,h){let{pathname:m="/",search:g="",hash:p=""}=dr(c.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),Lo("",{pathname:m,search:g,hash:p},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function o(c,h){let m=c.document.querySelector("base"),g="";if(m&&m.getAttribute("href")){let p=c.location.href,x=p.indexOf("#");g=x===-1?p:p.slice(0,x)}return g+"#"+(typeof h=="string"?h:cr(h))}function d(c,h){Ft(c.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return Dm(l,o,d,r)}function Me(r,l){if(r===!1||r===null||typeof r>"u")throw new Error(l)}function Ft(r,l){if(!r){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Im(){return Math.random().toString(36).substring(2,10)}function af(r,l){return{usr:r.state,key:r.key,idx:l,masked:r.mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function Lo(r,l,o=null,d,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof l=="string"?dr(l):l,state:o,key:l&&l.key||d||Im(),mask:c}}function cr({pathname:r="/",search:l="",hash:o=""}){return l&&l!=="?"&&(r+=l.charAt(0)==="?"?l:"?"+l),o&&o!=="#"&&(r+=o.charAt(0)==="#"?o:"#"+o),r}function dr(r){let l={};if(r){let o=r.indexOf("#");o>=0&&(l.hash=r.substring(o),r=r.substring(0,o));let d=r.indexOf("?");d>=0&&(l.search=r.substring(d),r=r.substring(0,d)),r&&(l.pathname=r)}return l}function Dm(r,l,o,d={}){let{window:c=document.defaultView,v5Compat:h=!1}=d,m=c.history,g="POP",p=null,x=S();x==null&&(x=0,m.replaceState({...m.state,idx:x},""));function S(){return(m.state||{idx:null}).idx}function E(){g="POP";let N=S(),V=N==null?null:N-x;x=N,p&&p({action:g,location:D.location,delta:V})}function C(N,V){g="PUSH";let U=lf(N)?N:Lo(D.location,N,V);o&&o(U,N),x=S()+1;let M=af(U,x),te=D.createHref(U.mask||U);try{m.pushState(M,"",te)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;c.location.assign(te)}h&&p&&p({action:g,location:D.location,delta:1})}function O(N,V){g="REPLACE";let U=lf(N)?N:Lo(D.location,N,V);o&&o(U,N),x=S();let M=af(U,x),te=D.createHref(U.mask||U);m.replaceState(M,"",te),h&&p&&p({action:g,location:D.location,delta:0})}function P(N){return zm(c,N)}let D={get action(){return g},get location(){return r(c,m)},listen(N){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(sf,E),p=N,()=>{c.removeEventListener(sf,E),p=null}},createHref(N){return l(c,N)},createURL:P,encodeLocation(N){let V=P(N);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:C,replace:O,go(N){return m.go(N)}};return D}function zm(r,l,o=!1){let d="http://localhost";r&&(d=r.location.origin!=="null"?r.location.origin:r.location.href),Me(d,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:cr(l);return c=c.replace(/ $/,"%20"),!o&&Wf.test(c)&&(c=d+c),new URL(c,d)}function Bf(r,l,o="/"){return Lm(r,l,o,!1)}function Lm(r,l,o,d,c){let h=typeof l=="string"?dr(l):l,m=Sn(h.pathname||"/",o);if(m==null)return null;let g=Om(r),p=null,x=Km(m);for(let S=0;p==null&&S<g.length;++S)p=Gm(g[S],x,d);return p}function Om(r){let l=Vf(r);return Tm(l),l}function Vf(r,l=[],o=[],d="",c=!1){let h=(m,g,p=c,x)=>{let S={relativePath:x===void 0?m.path||"":x,caseSensitive:m.caseSensitive===!0,childrenIndex:g,route:m};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(d)&&p)return;Me(S.relativePath.startsWith(d),`Absolute route path "${S.relativePath}" nested under path "${d}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(d.length)}let E=Zt([d,S.relativePath]),C=o.concat(S);m.children&&m.children.length>0&&(Me(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Vf(m.children,l,C,E,p)),!(m.path==null&&!m.index)&&l.push({path:E,score:$m(E,m.index),routesMeta:C.map((O,P)=>{let[D,N]=Hf(O.relativePath,O.caseSensitive,P===C.length-1);return{...O,matcher:D,compiledParams:N}})})};return r.forEach((m,g)=>{if(m.path===""||!m.path?.includes("?"))h(m,g);else for(let p of Uf(m.path))h(m,g,!0,p)}),l}function Uf(r){let l=r.split("/");if(l.length===0)return[];let[o,...d]=l,c=o.endsWith("?"),h=o.replace(/\?$/,"");if(d.length===0)return c?[h,""]:[h];let m=Uf(d.join("/")),g=[];return g.push(...m.map(p=>p===""?h:[h,p].join("/"))),c&&g.push(...m),g.map(p=>r.startsWith("/")&&p===""?"/":p)}function Tm(r){r.sort((l,o)=>l.score!==o.score?o.score-l.score:Hm(l.routesMeta.map(d=>d.childrenIndex),o.routesMeta.map(d=>d.childrenIndex)))}var Mm=/^:[\w-]+$/,Fm=3,Wm=2,Bm=1,Vm=10,Um=-2,of=r=>r==="*";function $m(r,l){let o=r.split("/"),d=o.length;return o.some(of)&&(d+=Um),l&&(d+=Wm),o.filter(c=>!of(c)).reduce((c,h)=>c+(Mm.test(h)?Fm:h===""?Bm:Vm),d)}function Hm(r,l){return r.length===l.length&&r.slice(0,-1).every((d,c)=>d===l[c])?r[r.length-1]-l[l.length-1]:0}function Gm(r,l,o=!1){let{routesMeta:d}=r,c={},h="/",m=[];for(let g=0;g<d.length;++g){let p=d[g],x=g===d.length-1,S=h==="/"?l:l.slice(h.length)||"/",E={path:p.relativePath,caseSensitive:p.caseSensitive,end:x},C=p.matcher&&p.compiledParams?$f(E,S,p.matcher,p.compiledParams):ul(E,S),O=p.route;if(!C&&x&&o&&!d[d.length-1].route.index&&(C=ul({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},S)),!C)return null;Object.assign(c,C.params),m.push({params:c,pathname:Zt([h,C.pathname]),pathnameBase:qm(Zt([h,C.pathnameBase])),route:O}),C.pathnameBase!=="/"&&(h=Zt([h,C.pathnameBase]))}return m}function ul(r,l){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[o,d]=Hf(r.path,r.caseSensitive,r.end);return $f(r,l,o,d)}function $f(r,l,o,d){let c=l.match(o);if(!c)return null;let h=c[0],m=Vr(h,1),g=c.slice(1);return{params:d.reduce((x,{paramName:S,isOptional:E},C)=>{if(S==="*"){let P=g[C]||"";m=Vr(h.slice(0,h.length-P.length),1)}const O=g[C];return E&&!O?x[S]=void 0:x[S]=(O||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:m,pattern:r}}function Hf(r,l=!1,o=!0){Ft(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let d=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,g,p,x,S)=>{if(d.push({paramName:g,isOptional:p!=null}),p){let E=S.charAt(x+m.length);return E&&E!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(d.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,l?void 0:"i"),d]}function Km(r){try{return r.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Ft(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),r}}function Sn(r,l){if(l==="/")return r;if(!r.toLowerCase().startsWith(l.toLowerCase()))return null;let o=l.endsWith("/")?l.length-1:l.length,d=r.charAt(o);return d&&d!=="/"?null:r.slice(o)||"/"}function Qm(r,l="/"){let{pathname:o,search:d="",hash:c=""}=typeof r=="string"?dr(r):r,h;return o?(o=Gf(o),o.startsWith("/")||o.startsWith("\\")?h=uf(o.substring(1),"/"):h=uf(o,l)):h=l,{pathname:h,search:Xm(d),hash:Ym(c)}}function uf(r,l){let o=Vr(l).split("/");return r.split("/").forEach(c=>{c===".."?o.length>1&&o.pop():c!=="."&&o.push(c)}),o.length>1?o.join("/"):"/"}function xo(r,l,o,d){return`Cannot include a '${r}' character in a manually specified \`to.${l}\` field [${JSON.stringify(d)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Zm(r){return r.filter((l,o)=>o===0||l.route.path&&l.route.path.length>0)}function Go(r){let l=Zm(r);return l.map((o,d)=>d===l.length-1?o.pathname:o.pathnameBase)}function wl(r,l,o,d=!1){let c;typeof r=="string"?c=dr(r):(c={...r},Me(!c.pathname||!c.pathname.includes("?"),xo("?","pathname","search",c)),Me(!c.pathname||!c.pathname.includes("#"),xo("#","pathname","hash",c)),Me(!c.search||!c.search.includes("#"),xo("#","search","hash",c)));let h=r===""||c.pathname==="",m=h?"/":c.pathname,g;if(m==null)g=o;else{let E=l.length-1;if(!d&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),E-=1;c.pathname=C.join("/")}g=E>=0?l[E]:"/"}let p=Qm(c,g),x=m&&m!=="/"&&m.endsWith("/"),S=(h||m===".")&&o.endsWith("/");return!p.pathname.endsWith("/")&&(x||S)&&(p.pathname+="/"),p}var Gf=r=>r.replace(/[\\/]{2,}/g,"/"),Zt=r=>Gf(r.join("/"));function Vr(r,l=0){let o=r.length;for(;o>l&&r.charCodeAt(o-1)===47;)o--;return o===r.length?r:r.slice(0,o)}var qm=r=>Vr(r).replace(/^\/*/,"/"),Xm=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Ym=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,Jm=class{constructor(r,l,o,d=!1){this.status=r,this.statusText=l||"",this.internal=d,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function eg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function tg(r){let l=r.map(o=>o.route.path).filter(Boolean);return Zt(l)||"/"}var Kf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qf(r,l){let o=r;if(typeof o!="string"||!Ho.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let d=o,c=!1;if(Kf)try{let h=new URL(window.location.href),m=Wf.test(o)?new URL(Pm(o,h.protocol)):new URL(o),g=Sn(m.pathname,l);m.origin===h.origin&&g!=null?o=g+m.search+m.hash:c=!0}catch{Ft(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:d,isExternal:c,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cf=new URL("http://localhost");function Ko(r){if(r.createURL)return r.createURL("/");try{return new URL(r.createHref("/"),cf)}catch{return cf}}function So(r,l){return r.origin===l.origin&&(r.origin!=="null"||r.protocol===l.protocol&&r.host===l.host)}function ng(r,l){if(r.startsWith("//"))return!0;let o=l.protocol.toLowerCase();return r.toLowerCase().startsWith(o)?l.host===""||r.slice(o.length).startsWith("//"):!1}function Qo(r,l,o,d){let c=null;try{c=r==null?null:new URL(r,o)}catch{}let h=new URL(l,o),m=c!=null&&!So(c,o),g=!So(h,o);if(d==="reject"){if(m||g)throw new Error("External navigation is not allowed")}else if(g&&(c==null||!ng(r,c)||!So(c,h)))throw new Error("External navigation is not allowed")}var Zf=["POST","PUT","PATCH","DELETE"];new Set(Zf);var rg=["GET",...Zf];new Set(rg);var ig=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function sg(r){try{return ig.includes(new URL(r).protocol)}catch{return!1}}var Hr=v.createContext(null);Hr.displayName="DataRouter";var vl=v.createContext(null);vl.displayName="DataRouterState";var qf=v.createContext(!1);function lg(){return v.useContext(qf)}var Xf=v.createContext({isTransitioning:!1});Xf.displayName="ViewTransition";var ag=v.createContext(new Map);ag.displayName="Fetchers";var og=v.createContext(null);og.displayName="Await";var Rt=v.createContext(null);Rt.displayName="Navigation";var Ui=v.createContext(null);Ui.displayName="Location";var ln=v.createContext({outlet:null,matches:[],isDataRoute:!1});ln.displayName="Route";var Zo=v.createContext(null);Zo.displayName="RouteError";var Yf="REACT_ROUTER_ERROR",ug="REDIRECT",cg="ROUTE_ERROR_RESPONSE";function dg(r){if(r.startsWith(`${Yf}:${ug}:{`))try{let l=JSON.parse(r.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function fg(r){if(r.startsWith(`${Yf}:${cg}:{`))try{let l=JSON.parse(r.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Jm(l.status,l.statusText,l.data)}catch{}}function hg(r,{relative:l}={}){Me(Gr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:d}=v.useContext(Rt),{hash:c,pathname:h,search:m}=$i(r,{relative:l}),g=h;return o!=="/"&&(g=h==="/"?o:Zt([o,h])),d.createHref({pathname:g,search:m,hash:c})}function Gr(){return v.useContext(Ui)!=null}function an(){return Me(Gr(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Ui).location}var Jf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eh(r){v.useContext(Rt).static||v.useLayoutEffect(r)}function th(){let{isDataRoute:r}=v.useContext(ln);return r?Ng():pg()}function pg(){Me(Gr(),"useNavigate() may be used only in the context of a <Router> component.");let r=v.useContext(Hr),{basename:l,navigator:o}=v.useContext(Rt),{matches:d}=v.useContext(ln),{pathname:c}=an(),h=JSON.stringify(Go(d)),m=v.useRef(!1);return eh(()=>{m.current=!0}),v.useCallback((p,x={})=>{if(Ft(m.current,Jf),!m.current)return;if(typeof p=="number"){o.go(p);return}let S=wl(p,JSON.parse(h),c,x.relative==="path");r==null&&l!=="/"&&(S.pathname=S.pathname==="/"?l:Zt([l,S.pathname])),Qo(typeof p=="string"?p:cr(p),o.createHref(S),Ko(o),"reject"),(x.replace?o.replace:o.push)(S,x.state,x)},[l,o,h,c,r])}v.createContext(null);function $i(r,{relative:l}={}){let{matches:o}=v.useContext(ln),{pathname:d}=an(),c=JSON.stringify(Go(o));return v.useMemo(()=>wl(r,JSON.parse(c),d,l==="path"),[r,c,d,l])}function mg(r,l){return nh(r,l)}function nh(r,l,o){Me(Gr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=v.useContext(Rt),{matches:c}=v.useContext(ln),h=c[c.length-1],m=h?h.params:{},g=h?h.pathname:"/",p=h?h.pathnameBase:"/",x=h&&h.route;{let N=x&&x.path||"";ih(g,!x||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
9
|
+
|
|
10
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let S=an(),E;if(l){let N=typeof l=="string"?dr(l):l;Me(p==="/"||N.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${N.pathname}" was given in the \`location\` prop.`),E=N}else E=S;let C=E.pathname||"/",O=C;if(p!=="/"){let N=p.replace(/^\//,"").split("/");O="/"+C.replace(/^\//,"").split("/").slice(N.length).join("/")}let P=o&&o.state.matches.length?o.state.matches.map(N=>Object.assign(N,{route:o.manifest[N.route.id]||N.route})):Bf(r,{pathname:O});Ft(x||P!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Ft(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=xg(P&&P.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:Zt([p,d.encodeLocation?d.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?p:Zt([p,d.encodeLocation?d.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,o);return l&&D?v.createElement(Ui.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...E},navigationType:"POP"}},D):D}function gg(){let r=jg(),l=eg(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),o=r instanceof Error?r.stack:null,d="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:d},h={padding:"2px 4px",backgroundColor:d},m=null;return console.error("Error handled by React Router default ErrorBoundary:",r),m=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:h},"ErrorBoundary")," or"," ",v.createElement("code",{style:h},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},l),o?v.createElement("pre",{style:c},o):null,m)}var wg=v.createElement(gg,null),rh=class extends v.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,l){return l.location!==r.location||l.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:l.error,location:l.location,revalidation:r.revalidation||l.revalidation}}componentDidCatch(r,l){this.props.onError?this.props.onError(r,l):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const o=fg(r.digest);o&&(r=o)}let l=r!==void 0?v.createElement(ln.Provider,{value:this.props.routeContext},v.createElement(Zo.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?v.createElement(vg,{error:r},l):l}};rh.contextType=qf;var ko=new WeakMap;function vg({children:r,error:l}){let{basename:o,navigator:d}=v.useContext(Rt);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let c=dg(l.digest);if(c){let h=ko.get(l);if(h)throw h;let m=Qf(c.location,o),g=m.absoluteURL||m.to;if(Qo(c.location,g,Ko(d),"allow-explicit"),sg(g))throw new Error("Invalid redirect location");if(Kf&&!ko.get(l))if(m.isExternal||c.reloadDocument)window.location.href=g;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw ko.set(l,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${g}`})}}return r}function yg({routeContext:r,match:l,children:o}){let d=v.useContext(Hr);return d&&d.static&&d.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=l.route.id),v.createElement(ln.Provider,{value:r},o)}function xg(r,l=[],o){let d=o?.state;if(r==null){if(!d)return null;if(d.errors)r=d.matches;else if(l.length===0&&!d.initialized&&d.matches.length>0)r=d.matches;else return null}let c=r,h=d?.errors;if(h!=null){let S=c.findIndex(E=>E.route.id&&h?.[E.route.id]!==void 0);Me(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),c=c.slice(0,Math.min(c.length,S+1))}let m=!1,g=-1;if(o&&d){m=d.renderFallback;for(let S=0;S<c.length;S++){let E=c[S];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(g=S),E.route.id){let{loaderData:C,errors:O}=d,P=E.route.loader&&!C.hasOwnProperty(E.route.id)&&(!O||O[E.route.id]===void 0);if(E.route.lazy||P){o.isStatic&&(m=!0),g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}}let p=o?.onError,x=d&&p?(S,E)=>{p(S,{location:d.location,params:d.matches?.[0]?.params??{},pattern:tg(d.matches),errorInfo:E})}:void 0;return c.reduceRight((S,E,C)=>{let O,P=!1,D=null,N=null;d&&(O=h&&E.route.id?h[E.route.id]:void 0,D=E.route.errorElement||wg,m&&(g<0&&C===0?(ih("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),P=!0,N=null):g===C&&(P=!0,N=E.route.hydrateFallbackElement||null)));let V=l.concat(c.slice(0,C+1)),U=()=>{let M;return O?M=D:P?M=N:E.route.Component?M=v.createElement(E.route.Component,null):E.route.element?M=E.route.element:M=S,v.createElement(yg,{match:E,routeContext:{outlet:S,matches:V,isDataRoute:d!=null},children:M})};return d&&(E.route.ErrorBoundary||E.route.errorElement||C===0)?v.createElement(rh,{location:d.location,revalidation:d.revalidation,component:D,error:O,children:U(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:x}):U()},null)}function qo(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sg(r){let l=v.useContext(Hr);return Me(l,qo(r)),l}function kg(r){let l=v.useContext(vl);return Me(l,qo(r)),l}function Eg(r){let l=v.useContext(ln);return Me(l,qo(r)),l}function Xo(r){let l=Eg(r),o=l.matches[l.matches.length-1];return Me(o.route.id,`${r} can only be used on routes that contain a unique "id"`),o.route.id}function bg(){return Xo("useRouteId")}function jg(){let r=v.useContext(Zo),l=kg("useRouteError"),o=Xo("useRouteError");return r!==void 0?r:l.errors?.[o]}function Ng(){let{router:r}=Sg("useNavigate"),l=Xo("useNavigate"),o=v.useRef(!1);return eh(()=>{o.current=!0}),v.useCallback(async(c,h={})=>{Ft(o.current,Jf),o.current&&(typeof c=="number"?await r.navigate(c):await r.navigate(c,{fromRouteId:l,...h}))},[r,l])}var df={};function ih(r,l,o){!l&&!df[r]&&(df[r]=!0,Ft(!1,o))}v.memo(Cg);function Cg({routes:r,manifest:l,future:o,state:d,isStatic:c,onError:h}){return nh(r,void 0,{manifest:l,state:d,isStatic:c,onError:h})}function ff({to:r,replace:l,state:o,relative:d}){Me(Gr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c,navigator:h}=v.useContext(Rt);Ft(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=v.useContext(ln),{pathname:g}=an(),p=th(),x=wl(r,Go(m),g,d==="path");Qo(typeof r=="string"?r:cr(r),h.createHref(x),Ko(h),"reject");let S=JSON.stringify(x);return v.useEffect(()=>{p(JSON.parse(S),{replace:l,state:o,relative:d})},[p,S,d,l,o]),null}function rt(r){Me(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Rg({basename:r="/",children:l=null,location:o,navigationType:d="POP",navigator:c,static:h=!1,useTransitions:m}){Me(!Gr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=r.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:g,navigator:c,static:h,useTransitions:m,future:{}}),[g,c,h,m]);typeof o=="string"&&(o=dr(o));let{pathname:x="/",search:S="",hash:E="",state:C=null,key:O="default",mask:P}=o,D=v.useMemo(()=>{let N=Sn(x,g);return N==null?null:{location:{pathname:N,search:S,hash:E,state:C,key:O,mask:P},navigationType:d}},[g,x,S,E,C,O,d,P]);return Ft(D!=null,`<Router basename="${g}"> is not able to match the URL "${x}${S}${E}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:v.createElement(Rt.Provider,{value:p},v.createElement(Ui.Provider,{children:l,value:D}))}function _g({children:r,location:l}){return mg(Oo(r),l)}function Oo(r,l=[]){let o=[];return v.Children.forEach(r,(d,c)=>{if(!v.isValidElement(d))return;let h=[...l,c];if(d.type===v.Fragment){o.push.apply(o,Oo(d.props.children,h));return}Me(d.type===rt,`[${typeof d.type=="string"?d.type:d.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Me(!d.props.index||!d.props.children,"An index route cannot have child routes.");let m={id:d.props.id||h.join("-"),caseSensitive:d.props.caseSensitive,element:d.props.element,Component:d.props.Component,index:d.props.index,path:d.props.path,middleware:d.props.middleware,loader:d.props.loader,action:d.props.action,hydrateFallbackElement:d.props.hydrateFallbackElement,HydrateFallback:d.props.HydrateFallback,errorElement:d.props.errorElement,ErrorBoundary:d.props.ErrorBoundary,hasErrorBoundary:d.props.hasErrorBoundary===!0||d.props.ErrorBoundary!=null||d.props.errorElement!=null,shouldRevalidate:d.props.shouldRevalidate,handle:d.props.handle,lazy:d.props.lazy};d.props.children&&(m.children=Oo(d.props.children,h)),o.push(m)}),o}var rl="get",il="application/x-www-form-urlencoded";function yl(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Pg(r){return yl(r)&&r.tagName.toLowerCase()==="button"}function Ag(r){return yl(r)&&r.tagName.toLowerCase()==="form"}function Ig(r){return yl(r)&&r.tagName.toLowerCase()==="input"}function Dg(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function zg(r,l){return r.button===0&&(!l||l==="_self")&&!Dg(r)}var el=null;function Lg(){if(el===null)try{new FormData(document.createElement("form"),0),el=!1}catch{el=!0}return el}var Og=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Eo(r){return r!=null&&!Og.has(r)?(Ft(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${il}"`),null):r}function Tg(r,l){let o,d,c,h,m;if(Ag(r)){let g=r.getAttribute("action");d=g?Sn(g,l):null,o=r.getAttribute("method")||rl,c=Eo(r.getAttribute("enctype"))||il,h=new FormData(r)}else if(Pg(r)||Ig(r)&&(r.type==="submit"||r.type==="image")){let g=r.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=r.getAttribute("formaction")||g.getAttribute("action");if(d=p?Sn(p,l):null,o=r.getAttribute("formmethod")||g.getAttribute("method")||rl,c=Eo(r.getAttribute("formenctype"))||Eo(g.getAttribute("enctype"))||il,h=new FormData(g,r),!Lg()){let{name:x,type:S,value:E}=r;if(S==="image"){let C=x?`${x}.`:"";h.append(`${C}x`,"0"),h.append(`${C}y`,"0")}else x&&h.append(x,E)}}else{if(yl(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=rl,d=null,c=il,m=r}return h&&c==="text/plain"&&(m=h,h=void 0),{action:d,method:o.toLowerCase(),encType:c,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yo(r,l){if(r===!1||r===null||typeof r>"u")throw new Error(l)}function sh(r,l,o,d){let c=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return o?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${d}`:c.pathname=`${c.pathname}.${d}`:c.pathname==="/"?c.pathname=`_root.${d}`:l&&Sn(c.pathname,l)==="/"?c.pathname=`${Vr(l)}/_root.${d}`:c.pathname=`${Vr(c.pathname)}.${d}`,c}async function Mg(r,l){if(r.id in l)return l[r.id];try{let o=await import(r.module);return l[r.id]=o,o}catch(o){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Fg(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function Wg(r,l,o){let d=await Promise.all(r.map(async c=>{let h=l.routes[c.route.id];if(h){let m=await Mg(h,o);return m.links?m.links():[]}return[]}));return $g(d.flat(1).filter(Fg).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function hf(r,l,o,d,c,h){let m=(p,x)=>o[x]?p.route.id!==o[x].route.id:!0,g=(p,x)=>o[x].pathname!==p.pathname||o[x].route.path?.endsWith("*")&&o[x].params["*"]!==p.params["*"];return h==="assets"?l.filter((p,x)=>m(p,x)||g(p,x)):h==="data"?l.filter((p,x)=>{let S=d.routes[p.route.id];if(!S||!S.hasLoader)return!1;if(m(p,x)||g(p,x))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function Bg(r,l,{includeHydrateFallback:o}={}){return Vg(r.map(d=>{let c=l.routes[d.route.id];if(!c)return[];let h=[c.module];return c.clientActionModule&&(h=h.concat(c.clientActionModule)),c.clientLoaderModule&&(h=h.concat(c.clientLoaderModule)),o&&c.hydrateFallbackModule&&(h=h.concat(c.hydrateFallbackModule)),c.imports&&(h=h.concat(c.imports)),h}).flat(1))}function Vg(r){return[...new Set(r)]}function Ug(r){let l={},o=Object.keys(r).sort();for(let d of o)l[d]=r[d];return l}function $g(r,l){let o=new Set;return new Set(l),r.reduce((d,c)=>{let h=JSON.stringify(Ug(c));return o.has(h)||(o.add(h),d.push({key:h,link:c})),d},[])}function Jo(){let r=v.useContext(Hr);return Yo(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function Hg(){let r=v.useContext(vl);return Yo(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var eu=v.createContext(void 0);eu.displayName="FrameworkContext";function xl(){let r=v.useContext(eu);return Yo(r,"You must render this element inside a <HydratedRouter> element"),r}function Gg(r,l){let o=v.useContext(eu),[d,c]=v.useState(!1),[h,m]=v.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:x,onMouseLeave:S,onTouchStart:E}=l,C=v.useRef(null);v.useEffect(()=>{if(r==="render"&&m(!0),r==="viewport"){let D=V=>{V.forEach(U=>{m(U.isIntersecting)})},N=new IntersectionObserver(D,{threshold:.5});return C.current&&N.observe(C.current),()=>{N.disconnect()}}},[r]),v.useEffect(()=>{if(d){let D=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(D)}}},[d]);let O=()=>{c(!0)},P=()=>{c(!1),m(!1)};return o?r!=="intent"?[h,C,{}]:[h,C,{onFocus:Di(g,O),onBlur:Di(p,P),onMouseEnter:Di(x,O),onMouseLeave:Di(S,P),onTouchStart:Di(E,O)}]:[!1,C,{}]}function Di(r,l){return o=>{r&&r(o),o.defaultPrevented||l(o)}}function Kg({page:r,...l}){let o=lg(),{nonce:d}=xl(),{router:c}=Jo(),h=v.useMemo(()=>Bf(c.routes,r,c.basename),[c.routes,r,c.basename]);return h?(l.nonce==null&&d&&(l={...l,nonce:d}),o?v.createElement(Zg,{page:r,matches:h,...l}):v.createElement(qg,{page:r,matches:h,...l})):null}function Qg(r){let{manifest:l,routeModules:o}=xl(),[d,c]=v.useState([]);return v.useEffect(()=>{let h=!1;return Wg(r,l,o).then(m=>{h||c(m)}),()=>{h=!0}},[r,l,o]),d}function Zg({page:r,matches:l,...o}){let d=an(),{future:c}=xl(),{basename:h}=Jo(),m=v.useMemo(()=>{if(r===d.pathname+d.search+d.hash)return[];let g=sh(r,h,c.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,x=[];for(let S of l)typeof S.route.shouldRevalidate=="function"?p=!0:x.push(S.route.id);return p&&x.length>0&&g.searchParams.set("_routes",x.join(",")),[g.pathname+g.search]},[h,c.v8_trailingSlashAwareDataRequests,r,d,l]);return v.createElement(v.Fragment,null,m.map(g=>v.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...o})))}function qg({page:r,matches:l,...o}){let d=an(),{future:c,manifest:h,routeModules:m}=xl(),{basename:g}=Jo(),{loaderData:p,matches:x}=Hg(),S=v.useMemo(()=>hf(r,l,x,h,d,"data"),[r,l,x,h,d]),E=v.useMemo(()=>hf(r,l,x,h,d,"assets"),[r,l,x,h,d]),C=v.useMemo(()=>{if(r===d.pathname+d.search+d.hash)return[];let D=new Set,N=!1;if(l.forEach(U=>{let M=h.routes[U.route.id];!M||!M.hasLoader||(!S.some(te=>te.route.id===U.route.id)&&U.route.id in p&&m[U.route.id]?.shouldRevalidate||M.hasClientLoader?N=!0:D.add(U.route.id))}),D.size===0)return[];let V=sh(r,g,c.v8_trailingSlashAwareDataRequests,"data");return N&&D.size>0&&V.searchParams.set("_routes",l.filter(U=>D.has(U.route.id)).map(U=>U.route.id).join(",")),[V.pathname+V.search]},[g,c.v8_trailingSlashAwareDataRequests,p,d,h,S,l,r,m]),O=v.useMemo(()=>Bg(E,h),[E,h]),P=Qg(E);return v.createElement(v.Fragment,null,C.map(D=>v.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...o})),O.map(D=>v.createElement("link",{key:D,rel:"modulepreload",href:D,...o})),P.map(({key:D,link:N})=>v.createElement("link",{key:D,nonce:o.nonce,...N,crossOrigin:N.crossOrigin??o.crossOrigin})))}function Xg(...r){return l=>{r.forEach(o=>{typeof o=="function"?o(l):o!=null&&(o.current=l)})}}var Yg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Yg&&(window.__reactRouterVersion="7.18.4")}catch{}function Jg({basename:r,children:l,useTransitions:o,window:d}){let c=v.useRef();c.current==null&&(c.current=Am({window:d,v5Compat:!0}));let h=c.current,[m,g]=v.useState({action:h.action,location:h.location}),p=v.useCallback(x=>{o===!1?g(x):v.startTransition(()=>g(x))},[o]);return v.useLayoutEffect(()=>h.listen(p),[h,p]),v.createElement(Rg,{basename:r,children:l,location:m.location,navigationType:m.action,navigator:h,useTransitions:o})}var tu=v.forwardRef(function({onClick:l,discover:o="render",prefetch:d="none",relative:c,reloadDocument:h,replace:m,mask:g,state:p,target:x,to:S,preventScrollReset:E,viewTransition:C,defaultShouldRevalidate:O,...P},D){let{basename:N,navigator:V,useTransitions:U}=v.useContext(Rt),M=typeof S=="string"&&Ho.test(S),te=Qf(S,N);S=te.to;let ne=hg(S,{relative:c}),xe=an(),Ee=null;if(g){let q=wl(g,[],xe.mask?xe.mask.pathname:"/",!0);N!=="/"&&(q.pathname=q.pathname==="/"?N:Zt([N,q.pathname])),Ee=V.createHref(q)}let[ee,be,z]=Gg(d,P),ae=rw(S,{replace:m,mask:g,state:p,target:x,preventScrollReset:E,relative:c,viewTransition:C,defaultShouldRevalidate:O,useTransitions:U});function j(q){l&&l(q),q.defaultPrevented||ae(q)}let H=!(te.isExternal||h),me=v.createElement("a",{...P,...z,href:(H?Ee:void 0)||te.absoluteURL||ne,onClick:H?j:l,ref:Xg(D,be),target:x,"data-discover":!M&&o==="render"?"true":void 0});return ee&&!M?v.createElement(v.Fragment,null,me,v.createElement(Kg,{page:ne})):me});tu.displayName="Link";var ew=v.forwardRef(function({"aria-current":l="page",caseSensitive:o=!1,className:d="",end:c=!1,style:h,to:m,viewTransition:g,children:p,...x},S){let E=$i(m,{relative:x.relative}),C=an(),O=v.useContext(vl),{navigator:P,basename:D}=v.useContext(Rt),N=O!=null&&ow(E)&&g===!0,V=P.encodeLocation?P.encodeLocation(E).pathname:E.pathname,U=C.pathname,M=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;o||(U=U.toLowerCase(),M=M?M.toLowerCase():null,V=V.toLowerCase()),M&&D&&(M=Sn(M,D)||M);const te=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let ne=U===V||!c&&U.startsWith(V)&&U.charAt(te)==="/",xe=M!=null&&(M===V||!c&&M.startsWith(V)&&M.charAt(V.length)==="/"),Ee={isActive:ne,isPending:xe,isTransitioning:N},ee=ne?l:void 0,be;typeof d=="function"?be=d(Ee):be=[d,ne?"active":null,xe?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let z=typeof h=="function"?h(Ee):h;return v.createElement(tu,{...x,"aria-current":ee,className:be,ref:S,style:z,to:m,viewTransition:g},typeof p=="function"?p(Ee):p)});ew.displayName="NavLink";var tw=v.forwardRef(({discover:r="render",fetcherKey:l,navigate:o,reloadDocument:d,replace:c,state:h,method:m=rl,action:g,onSubmit:p,relative:x,preventScrollReset:S,viewTransition:E,defaultShouldRevalidate:C,...O},P)=>{let{useTransitions:D}=v.useContext(Rt),N=lw(),V=aw(g,{relative:x}),U=m.toLowerCase()==="get"?"get":"post",M=typeof g=="string"&&Ho.test(g),te=ne=>{if(p&&p(ne),ne.defaultPrevented)return;ne.preventDefault();let xe=ne.nativeEvent.submitter,Ee=xe?.getAttribute("formmethod")||m,ee=()=>N(xe||ne.currentTarget,{fetcherKey:l,method:Ee,navigate:o,replace:c,state:h,relative:x,preventScrollReset:S,viewTransition:E,defaultShouldRevalidate:C});D&&o!==!1?v.startTransition(()=>ee()):ee()};return v.createElement("form",{ref:P,method:U,action:V,onSubmit:d?p:te,...O,"data-discover":!M&&r==="render"?"true":void 0})});tw.displayName="Form";function nw(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lh(r){let l=v.useContext(Hr);return Me(l,nw(r)),l}function rw(r,{target:l,replace:o,mask:d,state:c,preventScrollReset:h,relative:m,viewTransition:g,defaultShouldRevalidate:p,useTransitions:x}={}){let S=th(),E=an(),C=$i(r,{relative:m});return v.useCallback(O=>{if(zg(O,l)){O.preventDefault();let P=o!==void 0?o:cr(E)===cr(C),D=()=>S(r,{replace:P,mask:d,state:c,preventScrollReset:h,relative:m,viewTransition:g,defaultShouldRevalidate:p});x?v.startTransition(()=>D()):D()}},[E,S,C,o,d,c,l,r,h,m,g,p,x])}var iw=0,sw=()=>`__${String(++iw)}__`;function lw(){let{router:r}=lh("useSubmit"),{basename:l}=v.useContext(Rt),o=bg(),d=r.fetch,c=r.navigate;return v.useCallback(async(h,m={})=>{let{action:g,method:p,encType:x,formData:S,body:E}=Tg(h,l);if(m.navigate===!1){let C=m.fetcherKey||sw();await d(C,o,m.action||g,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:S,body:E,formMethod:m.method||p,formEncType:m.encType||x,flushSync:m.flushSync})}else await c(m.action||g,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:S,body:E,formMethod:m.method||p,formEncType:m.encType||x,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[d,c,l,o])}function aw(r,{relative:l}={}){let{basename:o}=v.useContext(Rt),d=v.useContext(ln);Me(d,"useFormAction must be used inside a RouteContext");let[c]=d.matches.slice(-1),h={...$i(r||".",{relative:l})},m=an();if(r==null){h.search=m.search;let g=new URLSearchParams(h.search),p=g.getAll("index");if(p.some(S=>S==="")){g.delete("index"),p.filter(E=>E).forEach(E=>g.append("index",E));let S=g.toString();h.search=S?`?${S}`:""}}return(!r||r===".")&&c.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:Zt([o,h.pathname])),cr(h)}function ow(r,{relative:l}={}){let o=v.useContext(Xf);Me(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:d}=lh("useViewTransitionState"),c=$i(r,{relative:l});if(!o.isTransitioning)return!1;let h=Sn(o.currentLocation.pathname,d)||o.currentLocation.pathname,m=Sn(o.nextLocation.pathname,d)||o.nextLocation.pathname;return ul(c.pathname,m)!=null||ul(c.pathname,h)!=null}const ah=1500,bo=16*1024*1024;class _e extends Error{constructor(l,o,d){super(l),this.status=o,this.payload=d,this.name="RuntimeRequestError"}status;payload}function Sl(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function cl(r){return Sl(r)&&typeof r.status=="number"&&Number.isInteger(r.status)?r.status:0}function St(r,l){return Sl(r)&&typeof r.message=="string"&&r.message?r.message:l}function To(r,l=0,o={remaining:1e5}){if(o.remaining-=1,l>40||o.remaining<0)throw new Error("API-Daten überschreiten die zulässige Strukturgröße.");if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"&&Number.isFinite(r))return r;if(Array.isArray(r))return r.map(c=>To(c,l+1,o));if(!Sl(r))throw new Error("Ungültige JSON-Daten.");const d=Object.create(null);for(const[c,h]of Object.entries(r)){if(c==="__proto__"||c==="prototype"||c==="constructor")throw new Error("Unzulässiger API-Datenschlüssel.");d[c]=To(h,l+1,o)}return d}function oh(r){const l=To(r);if(!Sl(l))throw new Error("Ungültige API-Antwort.");return l}function uh(r){const l=oh(r);if(typeof l.enabled!="boolean"||typeof l.authed!="boolean"||typeof l.role!="string"||typeof l.configured!="boolean"||!["iobroker","eos"].includes(String(l.mode))||!["none","customer","installer","admin"].includes(l.role)||l.authenticated!==void 0&&l.authenticated!==l.authed||!Array.isArray(l.capabilities)||!l.capabilities.every(o=>typeof o=="string")||l.capabilities.length>128||l.user!==void 0&&l.user!==null&&typeof l.user!="string"||l.authed&&(l.configured!==!0||!l.user||l.role==="none"||typeof l.csrfToken!="string"||!/^[A-Za-z0-9+/_=-]{16,1024}$/.test(l.csrfToken)))throw new Error("Ungültiger EOS-Anmeldestatus.");return{...l,enabled:l.enabled,configured:l.configured,mode:l.mode,authed:l.authed,role:l.role,loginUrl:typeof l.loginUrl=="string"&&l.loginUrl.length<=4096?l.loginUrl:"",logoutUrl:typeof l.logoutUrl=="string"&&l.logoutUrl.length<=4096?l.logoutUrl:"",csrfToken:l.authed&&typeof l.csrfToken=="string"?l.csrfToken:"",capabilities:l.capabilities,user:typeof l.user=="string"?l.user:null}}class Mo extends Error{constructor(){super("API-Antwort ist zu groß (maximal 16 MiB)."),this.name="ApiResponseLimitError"}}async function uw(r,l){const o=r.body;if(!o||o.locked)throw l.abort(),new Error("API-Antwort enthält keinen lesbaren Datenstrom.");const d=o.getReader(),c=l.signal,h=()=>{d.cancel().catch(()=>{})};c.addEventListener("abort",h,{once:!0});try{if(c.aborted)throw new Error("API-Abruf abgebrochen.");const m=r.headers.get("content-length");if(m!==null){if(!/^\d+$/.test(m)||!Number.isSafeInteger(Number(m)))throw new Error("Ungültige API-Antwortgröße.");if(Number(m)>bo)throw new Mo}let g=new Uint8Array(64*1024),p=0;for(;;){const E=await d.read();if(c.aborted)throw new Error("API-Abruf abgebrochen.");if(E.done)break;const C=p+E.value.byteLength;if(C>bo)throw new Mo;if(C>g.byteLength){const O=new Uint8Array(Math.min(bo,Math.max(C,g.byteLength*2)));O.set(g.subarray(0,p)),g=O}g.set(E.value,p),p=C}const x=new TextDecoder("utf-8",{fatal:!0}).decode(g.subarray(0,p));return JSON.parse(x)}catch(m){throw l.abort(),h(),m}finally{c.removeEventListener("abort",h),d.releaseLock()}}async function ch(r,l,o=!1){const d=/^application\/json(?:\s*;|$)/i.test(r.headers.get("content-type")||"");if(o&&!d&&[401,403,404,502].includes(r.status))throw l.abort(),r.body&&r.body.cancel().catch(()=>{}),r.status===401?new _e("Die Anmeldung an der Systemverwaltung ist abgelaufen. Bitte dort erneut anmelden.",401,{error:"admin_proxy_auth_required"}):r.status===403?new _e("Der Admin-Proxy benötigt ein Konto aus der Administratorgruppe der Systemverwaltung.",403,{error:"admin_proxy_forbidden"}):r.status===404?new _e("Der Admin-Proxy dieser Instanz ist nicht verfügbar. Admin-Version und Instanzfreigabe prüfen.",404,{error:"admin_proxy_unavailable"}):new _e("Der UI-Adapter ist über den Admin-Proxy nicht erreichbar. Instanzstatus und Port prüfen.",502,{error:"runtime_unreachable"});let c;try{const h=await uw(r,l);c=oh(h)}catch(h){const m=Object.create(null),g=r.ok?h instanceof Mo?h.message:"Ungültige API-Antwort.":`HTTP ${r.status}`;throw new _e(g,r.status,m)}if(!r.ok||c.ok===!1){const h=typeof c.message=="string"?c.message:typeof c.error=="string"?c.error:`HTTP ${r.status}`;throw new _e(h,r.status,c)}return c}function Ur(r){if(typeof r!="string"||!/^(0|[1-9]\d{0,5})$/.test(r))throw new _e("Ungültige Adapterinstanz.",0,{error:"runtime_instance_invalid"});return r}function on(){const r=new URLSearchParams(window.location.search||"").get("instance");if(r!==null)return Ur(r);const l="/proxy/nexowatt-ui.",o=window.location.pathname||"/",d=o.indexOf(l);if(d>=0){const c=o.slice(d+l.length),h=c.indexOf("/");return Ur(h<0?c:c.slice(0,h))}return"0"}function jo(r){if(typeof r!="string"||r.length>256||!r.startsWith("/")||!r.endsWith("/"))throw new _e("Der Admin-Verbindungspfad ist ungültig.",0,{error:"runtime_path_invalid"});const l=r.slice(1,-1).split("/");if(r!=="/"&&(l.length>16||l.some(o=>!/^[A-Za-z0-9._~-]{1,128}$/.test(o)||o==="."||o==="..")))throw new _e("Der Admin-Verbindungspfad ist ungültig.",0,{error:"runtime_path_invalid"});if(/\/proxy\/nexowatt-ui\.(?:0|[1-9][0-9]{0,5})\//u.test(r))throw new _e("Der Admin-Verbindungspfad ist mehrdeutig.",0,{error:"runtime_path_invalid"});return r}function pf(r,l){const o=`${r}proxy/nexowatt-ui.${l}`;if(o.length>256)throw new _e("Der Admin-Verbindungspfad ist zu lang.",0,{error:"runtime_path_invalid"});return dh()+o}function dh(){const r=window.location.protocol;if(r!=="http:"&&r!=="https:")throw new _e("Für die EOS-Verbindung ist HTTP oder HTTPS erforderlich.",0,{error:"runtime_protocol_invalid"});const l=window.location.hostname;if(!l||/[\\\s/?#@]/.test(l))throw new _e("Der EOS-Hostname ist ungültig.",0,{error:"runtime_host_invalid"});const o=window.location.port;if(o&&(!/^\d{1,5}$/.test(o)||Number(o)<1||Number(o)>65535))throw new _e("Der EOS-Port ist ungültig.",0,{error:"runtime_port_invalid"});return`${r}//${l}${o?`:${o}`:""}`}function kn(r=on()){const l=Ur(r),o=window.location.pathname||"/",d="/proxy/nexowatt-ui.",c=o.indexOf(d);if(c>=0){if(o.indexOf(d,c+d.length)>=0||o.indexOf("/adapter/nexowatt-ui/",c+d.length)>=0)throw new _e("Der Admin-Verbindungspfad ist mehrdeutig.",0,{error:"runtime_path_invalid"});const S=o.slice(c+d.length),E=S.indexOf("/");if(Ur(E<0?S:S.slice(0,E))!==l)throw new _e("Die Seite gehört zu einer anderen Adapterinstanz.",0,{error:"runtime_instance_mismatch"});const O=jo(o.slice(0,c+1));return pf(O,l)}if(window.location.protocol!=="https:")return null;const h="/adapter/nexowatt-ui/",m=o.indexOf(h);if(m<0)return null;const g=jo(o.slice(0,m+1)),p=o.slice(m+h.length);if(p!=="tab.html"&&p!=="react/index.html"&&p!=="react/"&&p!=="react")throw new _e("Der Admin-Einstiegspfad ist unbekannt.",0,{error:"runtime_path_invalid"});const x=No(()=>window.socketPath)||No(()=>window.parent&&window.parent.socketPath)||No(()=>window.top&&window.top.socketPath);if(x!=null&&x!==""&&!(typeof x=="string"&&x.includes("@@"))&&jo(x)!==g)throw new _e("Admin-Pfad und Verbindungspfad stimmen nicht überein.",0,{error:"runtime_path_mismatch"});return pf(g,l)}async function kl(r=on(),l=null){return dh()}function No(r){try{return r()}catch{return null}}async function mf(r,l=ah,o={}){const d=new AbortController;let c,h=!1;try{c=setTimeout(()=>{h=!0,d.abort()},l);const m=await fetch(r,{method:"GET",cache:"no-store",redirect:"error",credentials:o.credentials||"omit",headers:o.headers||void 0,signal:d.signal});return await ch(m,d,o.adminProxy===!0)}catch(m){throw h?new _e("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"}):m instanceof _e?m:new _e("Die Verbindung zum UI-Adapter ist nicht erreichbar. Bitte Zugriffspfad und Adapterstatus prüfen.",0,{error:"runtime_network_error"})}finally{c&&clearTimeout(c)}}async function cw(r,l,o=ah,d={}){const c=new AbortController;let h,m=!1;try{h=setTimeout(()=>{m=!0,c.abort()},o);const g=await fetch(r,{method:"POST",cache:"no-store",redirect:"error",credentials:d.credentials||"omit",headers:{"Content-Type":"application/json",...d.headers||{}},body:JSON.stringify(l||{}),signal:c.signal});return await ch(g,c,d.adminProxy===!0)}catch(g){throw m?new _e("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"}):g instanceof _e?g:new _e("Die Verbindung zum UI-Adapter ist nicht erreichbar. Bitte Zugriffspfad und Adapterstatus prüfen.",0,{error:"runtime_network_error"})}finally{h&&clearTimeout(h)}}async function fr(r,l=null,o=6e3,d=on(),c=null){const h=Date.now()+o,m=await kl(d,c);let g=h-Date.now();if(g<=0)throw new _e("Der UI-Adapter antwortet nicht rechtzeitig. Bitte Verbindung und Adapterstatus prüfen.",0,{error:"runtime_timeout"});const p={credentials:"include",adminProxy:m.includes("/proxy/nexowatt-ui.")},x=m+r;if(l!==null){if(new URL(x).origin!==window.location.origin)throw new _e("Schreibzugriffe benötigen den gemeinsamen HTTPS-Zugang zur UI.",0,{error:"runtime_same_origin_required"});if(!/^\/api\/(?:auth|strict-auth)\/login(?:\?|$)/.test(r)){const S=uh(await mf(m+"/api/auth/status",g,p));if(!S.authed||!S.configured||!S.csrfToken)throw new _e("Anmeldung erforderlich.",401,{error:"authentication_required"});if(p.headers={"X-NW-CSRF":S.csrfToken},g=h-Date.now(),g<=0)throw new _e("Die Berechtigungsprüfung hat das Zeitbudget überschritten.",0,{error:"runtime_timeout"})}}return l===null?mf(x,g,p):cw(x,l,g,p)}async function gf(r=on(),l=null){const o=await kl(r,l),d=new URL(o+"/login.html");if(d.username||d.password||d.protocol!=="https:"&&!(d.protocol==="http:"&&["localhost","127.0.0.1","[::1]","::1"].includes(d.hostname)))throw new _e("Die Anmeldung benötigt einen HTTPS-Zugang.",0,{error:"runtime_secure_route_required"});return d.href}async function dw(r=on(),l=null){return uh(await fr(`/api/strict-auth/status?instance=${encodeURIComponent(Ur(r))}&t=${Date.now()}`,null,6e3,r,l))}async function fw(r=on(),l=null){return await fr(`/api/strict-auth/logout?instance=${encodeURIComponent(Ur(r))}&t=${Date.now()}`,{},6e3,r,l),{ok:!0}}function Kt(r){try{(window.top||window).location.href=r}catch{window.location.href=r}}async function wf(r=null){return fr("/api/installer/notification-mail",r,1e4)}async function tl(r="",l=null){if(!["","/check"].includes(r))throw new Error("Ungültiger Historie-Aufruf.");return fr(`/api/installer/history${r}`,l,15e3)}async function Un(r="",l=null){return fr(`/api/mesh/coordinator${r}`,l,1e4)}async function zi(r="",l=null){if(!["","/status","/config","/preview"].includes(r))throw new Error("Ungültiger Netzanschluss-Aufruf.");return fr(`/api/dynamic-grid${r}`,l,5e3)}async function vf(r="",l=null){if(!["","/config","/preview","/revoke"].includes(r))throw new Error("Ungültiger Partner-Aufruf.");return fr(`/api/installer/partner-integrations${r}`,l,5e3)}const hw=""+new URL("nexowatt-192-43ZwQ44y.png",import.meta.url).href;function Gn({title:r,subtitle:l,children:o,actions:d=null,compact:c=!1,embedded:h=!1,showBack:m=!0,backLabel:g="Zurück zum Installer"}){v.useEffect(()=>{document.title=r?`NexoWatt EOS – ${r}`:"NexoWatt EOS Admin"},[r]);const p=on();return h?s.jsx("main",{className:"nw-embedded-ems-page",children:o}):s.jsxs("div",{className:"nw-page-shell",children:[s.jsx("div",{className:"nw-page-gradient"}),s.jsxs("div",{className:`nw-page-wrap ${c?"nw-page-wrap--compact":""}`,children:[s.jsxs("header",{className:"nw-hero",children:[s.jsxs("div",{className:"nw-brand",children:[s.jsx("img",{className:"nw-brand__logo",src:hw,alt:"NexoWatt EOS",width:52,height:52}),s.jsx("div",{children:s.jsx("h1",{children:r})})]}),s.jsxs("div",{className:"nw-instance-badge",children:["Instanz ",p]})]}),l||m||d?s.jsxs("section",{className:"nw-header-card",children:[l?s.jsx("p",{className:"nw-subtitle",children:l}):null,s.jsxs("div",{className:"nw-header-card__actions",children:[m?s.jsx(tu,{className:"nw-link-button",to:"/installer",children:g}):null,d]})]}):null,o]})]})}function pw({children:r}){const l=v.useRef(null);return v.useEffect(()=>{const o=l.current;if(!o)return;const d=document.documentElement,c=document.body,h=d.classList.contains("nw-ems-embedded"),m=c.classList.contains("nw-ems-embedded"),g=c.classList.contains("nw-cockpit-page");d.classList.add("nw-ems-embedded"),c.classList.add("nw-ems-embedded","nw-cockpit-page");const p=document.createElement("link");p.rel="stylesheet",p.href=`${kn()??""}/static/styles.css`,p.dataset.nwEmbeddedEms="true",document.head.appendChild(p);let x=!0,S=0,E=0;const C=()=>{!x||S||(S=window.requestAnimationFrame(()=>{S=0;const P=Math.max(1,Math.ceil(o.getBoundingClientRect().height)+1);P!==E&&(E=P,window.parent.postMessage({type:"nw:dynamic-grid-height",height:P},window.location.origin))}))},O=new ResizeObserver(C);return O.observe(o),p.addEventListener("load",C),window.addEventListener("resize",C),document.fonts?.ready.then(C).catch(()=>{}),C(),()=>{x=!1,O.disconnect(),window.cancelAnimationFrame(S),window.removeEventListener("resize",C),p.removeEventListener("load",C),p.remove(),h||d.classList.remove("nw-ems-embedded"),m||c.classList.remove("nw-ems-embedded"),g||c.classList.remove("nw-cockpit-page")}},[]),s.jsx("div",{className:"nw-embedded-ems-content",ref:l,children:r})}function yf(r){if(!r||r.length>4096||/[\\\u0000-\u0020\u007f]/.test(r)||r.startsWith("//"))return"";try{const l=new URL(r,window.location.origin);return l.username||l.password||!["http:","https:"].includes(l.protocol)||l.origin!==window.location.origin&&l.protocol!=="https:"?"":l.href}catch{return""}}const fh=v.createContext(null);function mw(){return v.useContext(fh)}function xf(r,l,o=null){if(Array.isArray(o)&&!o.includes(r?.role||"")||["license.manage","notifications.manage"].includes(String(l||""))&&r?.role!=="admin"||l==="mesh.configure"&&!["admin","installer"].includes(r?.role||""))return!1;const d=Array.isArray(r?.capabilities)?r.capabilities.map(String):[];return d.includes("*")||d.includes(String(l||""))}function Lt({capability:r,title:l,requiredRole:o="Installer oder Admin",allowedRoles:d=null,embedded:c=!1,children:h}){const m=on(),g=c&&window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1",p=q=>g?s.jsx(pw,{children:q}):q,[x,S]=v.useState("checking"),[E,C]=v.useState(null),[O,P]=v.useState(""),[D,N]=v.useState(!1),[V,U]=v.useState("Berechtigung wird geprüft…"),[M,te]=v.useState(!1),ne=v.useRef(!1),xe=v.useRef(0),Ee=v.useRef(!1),ee=v.useRef(null),be=v.useRef(!1),z=v.useMemo(()=>!!(E?.enabled!==!1&&E?.authed&&xf(E,r,d)),[E,r,d]),ae=v.useCallback(q=>(C(q),q.enabled===!1||!q.configured?(S("locked"),U("Die Anmeldung ist noch nicht korrekt eingerichtet. Der geschützte Bereich bleibt gesperrt."),"denied"):q.authed&&xf(q,r,d)?(S("authorized"),U("Zugriff freigegeben."),"authorized"):(S("locked"),U(q.authed?`Das angemeldete Konto besitzt nicht die erforderliche Rolle (${o}).`:q.mode==="eos"?`Bitte zentral im EOS mit der Rolle ${o} anmelden.`:`Bitte mit einem Benutzerkonto der Rolle ${o} anmelden.`),"denied")),[r,o,d]),j=v.useCallback(q=>(C(null),P(""),S("locked"),U(`Berechtigungsprüfung nicht erreichbar: ${St(q,"Verbindung nicht verfügbar")}. Der Bereich bleibt gesperrt.`),"unavailable"),[]),H=v.useCallback(async({silent:q=!1}={})=>{if(!ne.current||Ee.current||ee.current!==null||q&&be.current)return"stale";q||(be.current=!1);const ce=++xe.current;ee.current=ce;const Se=()=>ne.current&&xe.current===ce;q||(S("checking"),U("Berechtigung wird geprüft…"));try{const W=await dw(m,null);if(!Se())return"stale";const oe=ae(W);if(W.configured&&(!W.authed||oe==="denied")){const K=!W.authed&&W.mode==="eos"?yf(W.loginUrl):await gf(m,null);Se()&&P(K)}return oe}catch(W){return Se()?j(W):"stale"}finally{ee.current===ce&&(ee.current=null)}},[ae,j,m]);v.useEffect(()=>{ne.current=!0,Ee.current=!1,te(!1),H().catch(()=>{});const q=()=>{H({silent:!0}).catch(()=>{})};window.addEventListener("focus",q);const ce=window.setInterval(()=>{H({silent:!0}).catch(()=>{})},3e4);return()=>{ne.current=!1,xe.current+=1,ee.current=null,Ee.current=!1,window.clearInterval(ce),window.removeEventListener("focus",q)}},[H]);const me=async()=>{if(!ne.current||Ee.current)return;const q=E,ce=++xe.current,Se=()=>ne.current&&xe.current===ce;ee.current=null,Ee.current=!0,be.current=!0,te(!0),C(null),S("locked"),U("Abmeldung läuft…");try{if(await fw(m,null),!Se())return;if(window.navigator.serviceWorker?.controller?.postMessage({type:"NW_AUTH_LOGOUT"}),q?.mode==="eos")P(yf(q.logoutUrl)),N(!0),U("Die Ansicht ist gesperrt. Bitte die zentrale EOS-Abmeldung im eigenen Fenster abschließen.");else{const W=await gf(m,null);if(!Se())return;P(W),N(!1),U(`Abgemeldet. Bitte mit einem Benutzerkonto der Rolle ${o} anmelden.`)}}catch(W){Se()&&U(`Ansicht gesperrt. Die Abmeldung konnte nicht bestätigt werden: ${St(W,"Verbindung nicht verfügbar")}. Bitte erneut prüfen.`)}finally{Se()&&(Ee.current=!1,te(!1))}};return p(z&&x==="authorized"?s.jsx(fh.Provider,{value:E,children:s.jsxs("div",{className:"nw-protected-route",children:[!g&&s.jsxs("div",{className:"nw-protected-route__session",children:[s.jsx("span",{children:E?.user?`Angemeldet als ${E.user} (${E.role||"berechtigt"})`:"Geschützter Zugriff aktiv"}),s.jsx("button",{className:"nw-button",disabled:M,onClick:me,type:"button",children:"Abmelden"})]}),h]})}):s.jsx(Gn,{embedded:g,title:l,subtitle:`Dieser Bereich ist ausschließlich für ${o} freigegeben. Inhalte und Lizenzdaten werden erst nach erfolgreicher EOS-Anmeldung geladen.`,showBack:!1,compact:!0,children:s.jsxs("section",{className:"nw-card nw-access-gate","aria-busy":x==="checking"||M,children:[s.jsx("h2",{children:"Zugriff geschützt"}),s.jsx("p",{className:"nw-text-muted",children:"Direkte Links, Browser-Lesezeichen und erneutes Laden umgehen diese Sperre nicht."}),s.jsx("p",{className:"nw-text-muted",id:"nwAuthHelp",children:E?.mode==="eos"?"Die zentrale EOS-Anmeldung bestätigt dein Konto und deine Rolle. Hier wird kein Passwort abgefragt.":"Die Anmeldung öffnet sich in einem eigenen Fenster. Verwende dort dein eigenes Benutzerkonto und kehre anschließend hierher zurück."}),s.jsxs("div",{className:"nw-actions-row",children:[O&&s.jsx("a",{className:"nw-button nw-button--primary",href:O,target:"_blank",rel:"noopener noreferrer",children:D?"Zentral abmelden":E?.authed?"Zur Bedienoberfläche":E?.mode==="eos"?"Zentral anmelden":"Anmeldung öffnen"}),s.jsx("button",{className:"nw-button",disabled:M||x==="checking",onClick:()=>{N(!1),H()},type:"button",children:"Erneut prüfen"})]}),s.jsx("div",{className:`nw-status ${z?"nw-status--ok":"nw-status--bad"}`,children:V})]})}))}function gw(r){if(r?.authed!==!0||!["admin","installer","customer"].includes(r.role))return[];const l=[{label:"Zum EOS-Dashboard",path:"/"}];return r.role==="admin"&&l.unshift({label:"Zur EOS-Administration",path:"/system/"}),l}function ww(r){return r?.authed!==!0||r.role!=="admin"?[]:[{label:"Devices",path:"/modules/devices/"},{label:"EEBus",path:"/modules/eebus/"},{label:"Sicherung",path:"/modules/backup/"},{label:"Zertifikate",path:"/security/tls/"},{label:"Bestandsübernahme",path:"/migration/"}]}function Sf(){const r=mw(),l=r?.authed===!0&&r?.role==="admin",o=on(),[d,c]=v.useState(null),[h,m]=v.useState("Verbindung wird geprüft…");v.useEffect(()=>{let S=!0;return c(null),m("Verbindung wird geprüft…"),(async()=>{try{const E=await kl(o);if(!S)return;c({instance:o,url:E}),m("Bereit.")}catch{if(!S)return;c(null),m("Die Adresse der Oberfläche konnte nicht ermittelt werden. Bitte die Adapterverbindung prüfen.")}})(),()=>{S=!1}},[o]);const g=d?.instance===o?d.url:null,p=v.useMemo(()=>{const S=window.location.port||(window.location.protocol==="https:"?"443":"80");return`nwAdmin=1&instance=${encodeURIComponent(String(o))}&adminPort=${encodeURIComponent(S)}`},[o]),x=[...ww(r).map(S=>({label:S.label,adminOnly:!0,onClick:()=>Kt(`${g}${S.path}`)})),{label:"E-Mail-Versand",adminOnly:!0,onClick:()=>Kt(`${g}/mail-setup/?instance=${o}#/notification-mail`)},{label:"VIS öffnen",variant:"primary",onClick:()=>Kt(`${g}/`)},{label:"EMS Apps öffnen",onClick:()=>Kt(`${g}/ems-apps.html?${p}`)},...r?.role==="admin"||r?.role==="installer"?[{label:"Historie einrichten",onClick:()=>Kt(`${g}/installer/?instance=${o}#/history-setup`)}]:[],{label:"Simulation",onClick:()=>Kt(`${g}/simulation.html?${p}`)},{label:"Lizenz",adminOnly:!0,onClick:()=>Kt(`${g}/nexowatt/license`)},{label:"SmartHome VIS",onClick:()=>Kt(`${g}/smarthome.html`)},{label:"SmartHome Config",onClick:()=>Kt(`${g}/smarthome-config.html?${p}`)}];return s.jsx(Gn,{title:"Installer",subtitle:"Wähle, was geöffnet werden soll. Die Verbindung wird aus der Adapter-Instanz ermittelt. Die Installer-Seite ist für Konfiguration und Mapping gedacht.",showBack:!1,actions:g?gw(r).map(S=>s.jsx("a",{className:"nw-link-button",href:`${g}${S.path}`,target:"_top",children:S.label},S.path)):null,children:s.jsxs("section",{className:"nw-card nw-card--centered",children:[s.jsx("div",{className:"nw-button-grid",children:x.filter(S=>!S.adminOnly||l).map(S=>s.jsx("button",{className:`nw-button ${S.variant==="primary"?"nw-button--primary":""}`,onClick:()=>{g&&S.onClick()},disabled:!g,type:"button",children:S.label},S.label))}),s.jsx("div",{className:"nw-install-hint",role:"status",children:h})]})})}const pt=()=>{throw new Error("Ungültige Mesh-Daten. Bitte Verbindung und Konfiguration prüfen.")};function Bi(r){if(r===null||typeof r!="object"||Array.isArray(r))return pt();const l=Object.getPrototypeOf(r);return l!==Object.prototype&&l!==null?pt():r}const se=r=>typeof r=="string"&&r.length<=16384?r:pt(),J=r=>typeof r=="number"&&Number.isFinite(r)?r:pt(),Mt=r=>typeof r=="boolean"?r:pt(),Ie=r=>l=>l==null?null:r(l),ht=(r,l)=>o=>o===void 0?l:r(o),Hn=(r,l=1e4)=>o=>Array.isArray(o)&&o.length<=l?o.map(d=>r(d)):pt(),$n=(...r)=>l=>{for(const o of r)if(l===o)return o;return pt()};function Ne(r){return l=>{const o=Bi(l),d=Object.create(null);for(const[c,h]of Object.entries(r))d[c]=h(o[c]);return d}}function Fo(r,l=0,o={remaining:2e5}){if((--o.remaining<0||l>24)&&pt(),!(r===null||typeof r=="boolean")){if(typeof r=="string"){se(r);return}if(typeof r=="number"){J(r);return}if(Array.isArray(r)){r.length>1e4&&pt();for(const d of r)Fo(d,l+1,o);return}for(const[d,c]of Object.entries(Bi(r)))(d==="__proto__"||d==="prototype"||d==="constructor")&&pt(),Fo(c,l+1,o)}}function hr(r){return l=>(Fo(l),r(l))}const vw=["importW","exportW","l1A","l2A","l3A","evW","chargeW","dischargeW","pvW","flexW"],yw=["importW","exportW","l1A","l2A","l3A"],Co=Ne({importW:J,exportW:J,l1A:J,l2A:J,l3A:J}),dl=Ne({importW:J,exportW:J,l1A:J,l2A:J,l3A:J,evW:J,chargeW:J,dischargeW:J,pvW:J,flexW:J}),hh={limit:Co,reserve:Co,unmonitored:Co},xw=Ne(hh),kf=Ne({id:se,name:se,branch:se,max:dl,fallback:dl,weight:J,commissioned:Mt,watchdogVerified:Mt}),Sw=Ne({strategy:$n("fixed","transformer"),headroomW:J,headroomA:J,engagePct:J,releasePct:J}),kw=Ne({evW:ht(se,""),chargeW:ht(se,""),dischargeW:ht(se,""),pvW:ht(se,""),flexW:ht(se,"")}),Ew=Ne({gridW:ht(se,""),l1A:ht(se,""),l2A:ht(se,""),l3A:ht(se,"")}),bw=Ne({id:se,epoch:se,importDp:se,exportDp:se,unit:$n("Wh","kWh")}),ph=Ne({role:$n("off","master","slave"),mode:$n("diagnostic","active"),siteId:se,nodeId:se,masterId:se,revision:J,intervalMs:J,requestTimeoutMs:J,leaseMs:J,staleMs:J,recoveryCycles:J,rampWPerSecond:J,allocation:Sw,masterUrl:se,localParticipates:Mt,nodes:Hn(kf,99),branches:Hn(Ne({id:se,...hh}),100),local:kf,site:xw,feedback:kw,siteFeedback:Ew,meter:Ne({id:se,epoch:se,importDp:se,exportDp:se,unit:$n("Wh","kWh"),archiveIntervalMs:J})}),mh=Ne({importW:J,exportW:J,strategy:r=>r===void 0?void 0:$n("fixed","transformer")(r)}),jw=hr(mh),fl=r=>{const l=Bi(r),o=Ne({seq:J,at:se,stream:se,meter:bw,quality:se,importMilliWh:Ie(J),exportMilliWh:Ie(J),sourceAt:Hn(Ie(J),2)})(r);return(!Number.isSafeInteger(o.seq)||o.seq<1||!Number.isFinite(Date.parse(o.at)))&&pt(),{...l,...o,meter:{...Bi(l.meter),...o.meter}}},Nw=Ne({error:ht(se,""),local:Ie(Ne({sequence:J})),pending:J,lastSync:Ie(se),meterQuality:se,nodes:Hn(Ne({id:se,name:se,last:Ie(fl),receivedAt:Ie(se),failure:ht(se,""),sequence:ht(J,0)}),100)}),Cw=Ne({controlMode:se,state:se,reason:se,operatorLimits:Ie(mh),siteMeasurement:Ie(Ne({gridW:Ie(J),ageMs:Ie(J),phaseA:Ie(Hn(Ie(J),3))})),nodes:Hn(Ne({id:se,name:se,online:Mt,ageMs:Ie(J),rttMs:Ie(J),confirmed:Mt,sample:Ie(Ne({gridW:J})),allowed:dl,reserved:dl}),100)}),Rw=Ne({master:Ie(Cw),local:Ie(Ne({state:ht(se,""),reason:ht(se,""),remainingMs:ht(J,0)})),timing:Ne({lastRttMs:Ie(J),p95RttMs:Ie(J)}),error:se,accounting:Nw}),_w=Ne({enabled:Mt}),gh={app:_w,config:ph,pairedNodes:Hn(se,99),locked:Mt},Pw=hr(Ne(gh)),Aw=hr(Ne({...gh,status:Rw})),Iw=Ne({config:ph,pairingKey:se}),wh=hr(r=>{const l=Iw(r);return(l.config.role!=="slave"||!/^[A-Za-z0-9_-]{43}$/.test(l.pairingKey))&&pt(),l});function Dw(r){r.length>1048576&&pt();let l;try{l=JSON.parse(r)}catch{return pt()}return wh(l)}const zw=Ne({importEuroKwh:J,exportEuroKwh:J,periodFeeEuro:J}),Lw=Ne({enabled:Mt,intervalMs:J,maxAgeMs:J,maxSkewMs:J,maxArchiveMB:J,operatorName:se,tariff:zw,meter:Ne({id:se,epoch:se,importDp:se,exportDp:se,unit:$n("Wh","kWh"),calibrated:Mt,calibrationUntil:se})}),Ef=hr(Ne({config:Lw})),Ow=hr(Ne({lastSequence:J,records:Hn(fl)})),Tw=hr(r=>{const l=Ne({nodeId:se,name:se,operatorName:se,status:$n("BLOCKED","PARTIAL_PERIOD","DRAFT"),requested:Ne({from:se,to:se}),measured:Ne({from:Ie(se),to:Ie(se)}),first:Ie(fl),last:Ie(fl),count:J,invalid:J,gaps:J,importKwh:Ie(J),exportKwh:Ie(J),amounts:Ie(Ne({importCents:J,exportCents:J,periodFeeCents:J,balanceCents:J})),note:se,periodFeePending:Mt,usable:Mt,boundaryComplete:Mt,generatedAt:se})(r);return l.usable&&(!l.amounts||!l.first||!l.last||!l.measured.from||!l.measured.to)&&pt(),{...Bi(r),...l}}),nn=r=>r?new Date(r).toLocaleString("de-DE"):"—",nl=r=>{const l=new Date(r);return new Date(l.getTime()-l.getTimezoneOffset()*6e4).toISOString().slice(0,23)},bf=r=>r==null?"—":r/1e6,Ro=r=>(r/100).toLocaleString("de-DE",{style:"currency",currency:"EUR"});function _o(r,l,o="application/json"){const d=URL.createObjectURL(new Blob([l],{type:`${o};charset=utf-8`})),c=document.createElement("a");c.href=d,c.download=r,c.click(),setTimeout(()=>URL.revokeObjectURL(d),1e3)}const Mw=r=>`"${(typeof r=="number"&&Number.isFinite(r)?String(r):String(r??"").replace(/^[=+\-@\t\r]/,"'$&")).replace(/"/g,'""')}"`;function Fw({meshConfig:r,status:l}){const[o,d]=v.useState(null),[c,h]=v.useState(""),[m,g]=v.useState(!1),[p,x]=v.useState(""),[S,E]=v.useState(nl(Date.now()-30*864e5)),[C,O]=v.useState(nl(Date.now())),[P,D]=v.useState(null),[N,V]=v.useState(null);v.useEffect(()=>{let z=!0;return Un("/accounting").then(ae=>{const j=Ef(ae);z&&d(j.config)}).catch(ae=>{z&&h(St(ae,"Mesh-Anfrage fehlgeschlagen."))}),()=>{z=!1}},[]),v.useEffect(()=>{!N&&r?.role==="master"&&V(l?.master?.operatorLimits||{importW:r.site.limit.importW,exportW:r.site.limit.exportW,strategy:r.allocation.strategy})},[r,l,N]);const U=r.role==="master",M=r.role==="slave"||r.localParticipates,te=[...r.nodes,...U&&M?[r.local]:[]],ne=(z,ae)=>d(j=>j&&{...j,[z]:ae}),xe=async z=>{g(!0),h("");try{await z()}catch(ae){h(St(ae,"Mesh-Anfrage fehlgeschlagen."))}finally{g(!1)}},Ee=z=>{z.preventDefault(),xe(async()=>{const ae=Ef(await Un("/accounting",o));d(ae.config),D(null),h("Zählerarchiv und Tarife gespeichert.")})},ee=z=>{z.preventDefault(),xe(async()=>{o&&(D(null),D(Tw(await Un("/accounting/report",{nodeId:p,from:new Date(S).toISOString(),to:new Date(C).toISOString(),tariff:o.tariff}))))})},be=()=>xe(async()=>{const z=[];let ae=0,j=null;do{const H=Ow(await Un("/accounting/records",{nodeId:p,after:ae}));if(j===null&&(j=H.lastSequence),!H.records.length)break;let me=ae;for(const ce of H.records){if(ce.seq<=me)throw new Error("Ungültige Reihenfolge im Zählerarchiv.");me=ce.seq}for(const ce of H.records)ce.seq<=j&&Date.parse(ce.at)>=Date.parse(S)&&Date.parse(ce.at)<=Date.parse(C)&&z.push(ce);const q=H.records.at(-1);if(!q)break;if(ae=q.seq,z.length>1e5)throw new Error("Mehr als 100.000 Datensätze: Exportzeitraum verkleinern.");h(`${ae} von ${j} Archivpositionen geprüft…`)}while(ae<j);_o(`NexoWatt_Zaehler_${p}.jsonl`,z.map(H=>JSON.stringify(H)).join(`
|
|
11
|
+
`)+`
|
|
12
|
+
`,"application/x-ndjson"),h(`${z.length} Originaldatensätze exportiert.`)});return s.jsxs(s.Fragment,{children:[U&&N&&s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Betreiber · Trafo-Freigabe"}),s.jsx("p",{children:"Die gemeinsame Leistung wird auf die Haus-NVPs verteilt. Absenkungen wirken mit der nächsten Antwort; zusätzliche Freigaben erst nach bestätigter Begrenzung. Technische Anschlussgrenzen und Rückfallreserven bleiben verbindlich."}),s.jsxs("form",{onSubmit:z=>{z.preventDefault(),xe(async()=>{V(jw(await Un("/operating",N))),h("Trafo-Freigabe gespeichert. Umsetzung in der Teilnehmerübersicht kontrollieren.")})},style:{display:"grid",gap:12},children:[s.jsxs("label",{className:"nw-field-label",children:["Verteilung im Betrieb",s.jsxs("select",{className:"nw-input",value:N.strategy||r.allocation?.strategy||"fixed",onChange:z=>V({...N,strategy:z.target.value==="transformer"?"transformer":"fixed"}),children:[s.jsx("option",{value:"fixed",children:"Feste Anteile"}),s.jsx("option",{value:"transformer",children:"Bedarfsabhängig · Trafo / Häuser"})]})]}),["importW","exportW"].map(z=>s.jsxs("label",{className:"nw-field-label",children:[z==="importW"?"Gesamter Bezug maximal W":"Gesamte Einspeisung maximal W",s.jsx("input",{className:"nw-input",type:"number",min:"0",max:r.site.limit[z],value:N[z],onChange:ae=>V({...N,[z]:ae.target.value===""?"":Number(ae.target.value)}),required:!0})]},z)),s.jsx("button",{className:"nw-button nw-button--primary",disabled:m,children:"Gesamtfreigabe übernehmen"})]})]}),s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:U?"Betreiber · Zähler und Abrechnung":"Haus-NVP · Lokales Zählerarchiv"}),s.jsx("p",{role:"status",children:c}),s.jsx("p",{children:"Optionales Archiv mit kumulativem Bezug und Einspeisung. Originalstände bleiben am Haus gespeichert und werden nach einer Verbindungsunterbrechung nachgeliefert. Master und Slave benötigen jeweils ein aktiviertes Archiv."}),l?.accounting?.error&&s.jsxs("p",{role:"alert",children:["Archivstörung: ",l.accounting.error,". Die Regelung läuft über einen getrennten Kanal."]}),M&&s.jsxs("p",{children:["Lokale Datensätze: ",l?.accounting?.local?.sequence||0," · Noch nicht am Master bestätigt: ",U?"lokal am Master":l?.accounting?.pending||0," · Letzter Abgleich: ",nn(l?.accounting?.lastSync)," · Zählerqualität: ",l?.accounting?.meterQuality||"missing"]}),U&&s.jsx("div",{style:{overflowX:"auto",maxHeight:360},children:s.jsxs("table",{style:{width:"100%"},children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Haus"}),s.jsx("th",{children:"Zähler / Epoche"}),s.jsx("th",{children:"Bezug kWh"}),s.jsx("th",{children:"Einspeisung kWh"}),s.jsx("th",{children:"Messzeit / Empfang"}),s.jsx("th",{children:"Qualität / Datensätze"})]})}),s.jsx("tbody",{children:l?.accounting?.nodes?.map(z=>s.jsxs("tr",{children:[s.jsx("td",{children:z.name||z.id}),s.jsxs("td",{children:[z.last?.meter?.id||"Nicht eingerichtet"," / ",z.last?.meter?.epoch||"—"]}),s.jsx("td",{children:z.last?.importMilliWh==null?"—":(z.last.importMilliWh/1e6).toLocaleString("de-DE")}),s.jsx("td",{children:z.last?.exportMilliWh==null?"—":(z.last.exportMilliWh/1e6).toLocaleString("de-DE")}),s.jsxs("td",{children:[nn(z.last?.at),s.jsx("br",{}),nn(z.receivedAt)]}),s.jsxs("td",{children:[z.failure||z.last?.quality||"Fehlt"," / ",z.sequence||0]})]},z.id))})]})}),o&&s.jsx("form",{onSubmit:Ee,children:s.jsxs("fieldset",{disabled:m,style:{border:0,padding:0,minWidth:0,display:"grid",gap:12},children:[s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:o.enabled,onChange:z=>ne("enabled",z.target.checked)})," ",U?"Abrechnung und Zählerarchiv im Master aktivieren":"Lokales Zählerarchiv und Nachlieferung aktivieren"]}),M&&s.jsxs("details",{open:!o.meter.id,children:[s.jsx("summary",{children:"Geeichten Haus-NVP-Zähler zuordnen"}),s.jsx("p",{children:"Bei Zählerwechsel oder Rücksetzung eine neue Epoche vergeben. Eine neue Epoche darf keine fehlende Zählerdifferenz überbrücken. Der eingebaute Verbrauchsverlauf ersetzt diese ausdrückliche Zählerzuordnung nicht."}),[["id","Zählernummer"],["epoch","Zählerepoche (z. B. Einbaudatum)"],["importDp","Kumulativer Bezugszähler – Datenpunkt"],["exportDp","Kumulativer Einspeisezähler – Datenpunkt"]].map(([z,ae])=>s.jsxs("label",{className:"nw-field-label",children:[ae,s.jsx("input",{className:"nw-input",value:o.meter[z],onChange:j=>ne("meter",{...o.meter,[z]:j.target.value})})]},z)),s.jsxs("label",{className:"nw-field-label",children:["Einheit der beiden Datenpunkte",s.jsxs("select",{className:"nw-input",value:o.meter.unit,onChange:z=>ne("meter",{...o.meter,unit:z.target.value==="Wh"?"Wh":"kWh"}),children:[s.jsx("option",{children:"kWh"}),s.jsx("option",{children:"Wh"})]})]}),s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:o.meter.calibrated,onChange:z=>ne("meter",{...o.meter,calibrated:z.target.checked})})," Geeichter Zweirichtungszähler am Haus-NVP und Zuordnung vor Ort geprüft"]}),s.jsxs("label",{className:"nw-field-label",children:["Eichfrist gültig bis",s.jsx("input",{className:"nw-input",type:"date",value:o.meter.calibrationUntil,onChange:z=>ne("meter",{...o.meter,calibrationUntil:z.target.value})})]})]}),s.jsxs("details",{children:[s.jsx("summary",{children:"Archivintervalle und Speichergrenze"}),[["intervalMs","Messintervall ms (mindestens 60.000)"],["maxAgeMs","Zählerstand maximal alt ms"],["maxSkewMs","Beide Zählerstände maximal versetzt ms"],["maxArchiveMB","Archivgrenze MiB je Haus"]].map(([z,ae])=>s.jsxs("label",{className:"nw-field-label",children:[ae,s.jsx("input",{className:"nw-input",type:"number",min:"0",value:o[z],onChange:j=>ne(z,j.target.value===""?"":Number(j.target.value)),required:!0})]},z)),s.jsx("p",{children:"Archive werden nicht automatisch gelöscht. Bei voller Grenze wird die Erfassung mit einer sichtbaren Störung angehalten; bestätigte Originale bleiben erhalten."})]}),U&&s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"nw-field-label",children:["Betreibername",s.jsx("input",{className:"nw-input",value:o.operatorName,onChange:z=>ne("operatorName",z.target.value)})]}),s.jsx("h3",{children:"Tarif für den ausgewählten Abrechnungsentwurf"}),s.jsx("p",{children:"Preise für den gesamten ausgewerteten Zeitraum eingeben. Bei Tarifwechsel getrennte Zeiträume auswerten. Die Pauschale gilt einmal je Haus und ausgewähltem Zeitraum. Keine automatische Umsatzsteuerberechnung."}),[["importEuroKwh","Bezug EUR/kWh"],["exportEuroKwh","Einspeisegutschrift EUR/kWh"],["periodFeeEuro","Pauschale EUR je ausgewertetem Zeitraum"]].map(([z,ae])=>s.jsxs("label",{className:"nw-field-label",children:[ae,s.jsx("input",{className:"nw-input",type:"number",min:"0",step:"0.000001",value:o.tariff[z],onChange:j=>{ne("tariff",{...o.tariff,[z]:j.target.value===""?"":Number(j.target.value)}),D(null)},required:!0})]},z))]}),s.jsx("button",{className:"nw-button nw-button--primary",children:"Archiv-Einstellungen speichern"})]})}),U&&o&&s.jsxs("form",{onSubmit:ee,style:{display:"grid",gap:12,marginTop:24},children:[s.jsx("h3",{children:"Zeitraum auswerten"}),s.jsxs("label",{className:"nw-field-label",children:["Haus",s.jsxs("select",{className:"nw-input",value:p,onChange:z=>{x(z.target.value),D(null)},required:!0,children:[s.jsx("option",{value:"",children:"Haus wählen"}),te.map(z=>s.jsx("option",{value:z.id,children:z.name||z.id},z.id))]})]}),s.jsxs("label",{className:"nw-field-label",children:["Von (Ortszeit)",s.jsx("input",{className:"nw-input",type:"datetime-local",step:"0.001",value:S,onChange:z=>{E(z.target.value),D(null)},required:!0})]}),s.jsxs("label",{className:"nw-field-label",children:["Bis (Ortszeit)",s.jsx("input",{className:"nw-input",type:"datetime-local",step:"0.001",value:C,onChange:z=>{O(z.target.value),D(null)},required:!0})]}),s.jsx("button",{className:"nw-button nw-button--primary",disabled:m,children:"Abrechnungsentwurf berechnen"}),s.jsx("button",{className:"nw-button",type:"button",disabled:m||!p,onClick:be,children:"Originalzählerstände für Zeitraum exportieren (JSONL)"})]})]}),P&&s.jsxs("section",{className:"nw-card nw-mesh-report",children:[s.jsxs("h2",{children:["Abrechnungsentwurf · ",P.name||P.nodeId]}),s.jsx("p",{children:P.operatorName}),s.jsx("p",{children:s.jsx("strong",{children:P.status==="BLOCKED"?"Gesperrt – Zählerdaten nicht durchgehend zuordenbar":P.status==="PARTIAL_PERIOD"?"Teilzeitraum – angeforderte Randstände fehlen":"Entwurf aus Originalzählerständen"})}),s.jsxs("p",{children:["Gewünscht: ",nn(P.requested.from)," bis ",nn(P.requested.to),s.jsx("br",{}),"Gemessen: ",nn(P.measured.from)," bis ",nn(P.measured.to)]}),s.jsxs("p",{children:[P.count," Datensätze · ",P.invalid," Qualitätsfehler · ",P.gaps," Intervalllücken · Zähler ",P.first?.meter?.id||"—"]}),s.jsxs("table",{style:{width:"100%"},children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Position"}),s.jsx("th",{children:"Anfang kWh"}),s.jsx("th",{children:"Ende kWh"}),s.jsx("th",{children:"Differenz kWh"}),s.jsx("th",{children:"Betrag"})]})}),s.jsx("tbody",{children:[["import","Bezug"],["export","Einspeisung"]].map(([z,ae])=>s.jsxs("tr",{children:[s.jsx("th",{children:ae}),s.jsxs("td",{children:[bf(P.first?.[`${z}MilliWh`]),s.jsx("br",{}),s.jsx("small",{children:nn(P.first?.sourceAt?.[z==="import"?0:1])})]}),s.jsxs("td",{children:[bf(P.last?.[`${z}MilliWh`]),s.jsx("br",{}),s.jsx("small",{children:nn(P.last?.sourceAt?.[z==="import"?0:1])})]}),s.jsx("td",{children:P[`${z}Kwh`]??"—"}),s.jsx("td",{children:P.amounts?Ro(P.amounts[`${z}Cents`]):"—"})]},z))})]}),P.amounts&&s.jsxs("p",{children:["Pauschale: ",Ro(P.amounts.periodFeeCents)," · Saldo Bezug + Pauschale − Einspeisung: ",s.jsx("strong",{children:Ro(P.amounts.balanceCents)})]}),s.jsx("p",{children:P.note}),P.periodFeePending&&s.jsx("p",{children:"Die Pauschale ist für diesen Teilzeitraum noch nicht angesetzt. Randzeiten prüfen und ausdrücklich übernehmen."}),s.jsxs("p",{children:["Originalreferenzen: ",P.first?.stream||"—"," · Sequenz ",P.first?.seq||"—"," bis ",P.last?.seq||"—",". Erstellt ",nn(P.generatedAt),"."]}),s.jsxs("div",{className:"nw-mesh-no-print",style:{display:"flex",flexWrap:"wrap",gap:8},children:[P.usable&&!P.boundaryComplete&&s.jsx("button",{className:"nw-button",onClick:()=>{!P.measured.from||!P.measured.to||(E(nl(P.measured.from)),O(nl(P.measured.to)),h("Gemessene Randzeiten übernommen. Erneut berechnen."))},children:"Gemessene Randzeiten übernehmen"}),s.jsx("button",{className:"nw-button",onClick:()=>_o(`NexoWatt_Entwurf_${P.nodeId}.json`,JSON.stringify(P,null,2)),children:"Prüfbeleg JSON"}),s.jsx("button",{className:"nw-button",disabled:!P.usable,onClick:()=>{if(!P.amounts)return;const z=[["Status","Haus","Von gemessen","Bis gemessen","Bezug kWh","Einspeisung kWh","Bezug Cent","Einspeisung Cent","Pauschale Cent","Saldo Cent"],[P.status,P.name||P.nodeId,P.measured.from,P.measured.to,P.importKwh,P.exportKwh,P.amounts.importCents,P.amounts.exportCents,P.amounts.periodFeeCents,P.amounts.balanceCents]];_o(`NexoWatt_Entwurf_${P.nodeId}.csv`,"\uFEFF"+z.map(ae=>ae.map(Mw).join(";")).join(`\r
|
|
13
|
+
`),"text/csv")},children:"Abrechnungsentwurf CSV"}),s.jsx("button",{className:"nw-button",disabled:!P.usable,onClick:()=>window.print(),children:"Drucken / PDF"})]}),s.jsx("style",{children:"@media print { body * { visibility: hidden; } .nw-mesh-report, .nw-mesh-report * { visibility: visible; color: #111 !important; background: white !important; } .nw-mesh-report { position: absolute; left: 0; top: 0; width: 100%; } .nw-mesh-no-print, .nw-mesh-no-print * { display: none !important; } }"})]})]})}const Vi={importW:"Hausbezug W",exportW:"Einspeisung W",l1A:"Phase L1 A",l2A:"Phase L2 A",l3A:"Phase L3 A",evW:"Ladepunkte gesamt W",chargeW:"Speicherladung W",dischargeW:"Speicherentladung W",pvW:"PV-Erzeugung W",flexW:"Weitere flexible Lasten W"},jf=()=>({importW:0,exportW:0,l1A:0,l2A:0,l3A:0,evW:0,chargeW:0,dischargeW:0,pvW:0,flexW:0}),Ww=r=>({id:r,name:"",branch:"",max:jf(),fallback:jf(),weight:1,commissioned:!1,watchdogVerified:!1});function Br({label:r,value:l,onChange:o}){return s.jsxs("label",{className:"nw-field-label",children:[r,s.jsx("input",{className:"nw-input",type:"number",min:"0",step:"any",value:l??0,onChange:d=>o(d.target.value===""?"":Number(d.target.value)),required:!0})]})}function Nf({value:r,onChange:l}){return s.jsx("div",{style:{overflowX:"auto"},children:s.jsxs("table",{style:{width:"100%"},children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Grenze"}),s.jsx("th",{children:"Anschluss"}),s.jsx("th",{children:"Reserve"}),s.jsx("th",{children:"Nicht erfasste Last"})]})}),s.jsx("tbody",{children:yw.map(o=>s.jsxs("tr",{children:[s.jsx("th",{children:Vi[o]}),["limit","reserve","unmonitored"].map(d=>s.jsx("td",{children:s.jsx(Br,{label:`${d} ${Vi[o]}`,value:r[d][o],onChange:c=>l({...r,[d]:{...r[d],[o]:c}})})},d))]},o))})]})})}function Cf({value:r,onChange:l,local:o=!1}){const d=(c,h)=>l({...r,[c]:h});return s.jsxs("div",{style:{display:"grid",gap:12},children:[!o&&s.jsxs("label",{className:"nw-field-label",children:["Eindeutige Slave-ID",s.jsx("input",{className:"nw-input",value:r.id,onChange:c=>d("id",c.target.value),required:!0,pattern:"[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}"})]}),s.jsxs("label",{className:"nw-field-label",children:["Haus / Gerät",s.jsx("input",{className:"nw-input",value:r.name,onChange:c=>d("name",c.target.value)})]}),s.jsxs("label",{className:"nw-field-label",children:["Strang-ID (optional)",s.jsx("input",{className:"nw-input",value:r.branch,onChange:c=>d("branch",c.target.value)})]}),s.jsx(Br,{label:"Verteilungsgewicht (1–100)",value:r.weight,onChange:c=>d("weight",c)}),s.jsx("div",{style:{overflowX:"auto"},children:s.jsxs("table",{style:{width:"100%"},children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Gesamtes Haus"}),s.jsx("th",{children:"Maximum"}),s.jsx("th",{children:"Sicherer Rückfall"})]})}),s.jsx("tbody",{children:vw.map(c=>s.jsxs("tr",{children:[s.jsx("th",{children:Vi[c]}),["max","fallback"].map(h=>s.jsx("td",{children:s.jsx(Br,{label:`${h==="max"?"Maximum":"Rückfall"} ${Vi[c]}`,value:r[h][c],onChange:m=>d(h,{...r[h],[c]:m})})},h))]},c))})]})}),s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:r.commissioned,onChange:c=>d("commissioned",c.target.checked)})," Lokale Messung, Vorzeichen, Gerätegrenzen und Regelung geprüft"]}),s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:r.watchdogVerified,onChange:c=>d("watchdogVerified",c.target.checked)})," Unabhängigen Geräte-Rückfall bei EOS-/Verbindungsausfall vor Ort nachgewiesen"]})]})}function Bw(){const[r,l]=v.useState(null),[o,d]=v.useState(!1),[c,h]=v.useState(null),[m,g]=v.useState(null),[p,x]=v.useState(0),[S,E]=v.useState("Konfiguration wird geladen…"),[C,O]=v.useState(!1),[P,D]=v.useState(!1),[N,V]=v.useState(""),[U,M]=v.useState(""),[te,ne]=v.useState(""),[xe,Ee]=v.useState([]);v.useEffect(()=>{let j=!0,H;const me=async(q=!1)=>{try{const ce=Aw(await Un());if(!j)return;l(ce.app),d(!1),g(ce.status),D(ce.locked||ce.config.mode==="active"),Ee(ce.pairedNodes),q?(h(ce.config),E("Verbindung zuerst im Diagnosebetrieb einrichten.")):h(Se=>Se===null||ce.config.mode==="active"?ce.config:Se)}catch(ce){j&&(E(St(ce,"Mesh-Anfrage fehlgeschlagen.")),[401,403,404].includes(cl(ce)??0)&&(d(!0),h(null),g(null),M("")))}finally{j&&(H=setTimeout(()=>me(),2e3))}};return me(!0),()=>{j=!1,clearTimeout(H)}},[]);const ee=(j,H)=>h(me=>me&&{...me,[j]:H}),be=async j=>{j.preventDefault(),O(!0),M("");try{const H=Pw(await Un("/config",{config:c,pairingKey:N}));h(H.config),D(H.config.mode==="active"),V(""),Ee(H.pairedNodes),E("Konfiguration gespeichert. Aktive Verbünde starten mit sicherem Rückfall und neuer Synchronisation.")}catch(H){E(St(H,"Mesh-Anfrage fehlgeschlagen."))}finally{O(!1)}},z=async()=>{if(c?.nodes[p]){O(!0);try{const j=wh(await Un("/pair",{nodeId:c.nodes[p].id}));M(JSON.stringify(j,null,2)),E("Paarungsdaten einmalig kopieren und am zugehörigen Slave importieren. Vertraulich behandeln.")}catch(j){E(St(j,"Mesh-Anfrage fehlgeschlagen."))}finally{O(!1)}}},ae=()=>{try{const j=Dw(te);h(j.config),V(j.pairingKey),ne(""),E("Paarung übernommen. Master-Adresse und lokale Messwerte ergänzen, anschließend speichern.")}catch(j){E(St(j,"Mesh-Anfrage fehlgeschlagen."))}};return s.jsxs(Gn,{title:"Microgrid · Master / Slave",subtitle:"EMS-App · Ein Trafo-Master · bis zu 99 Haus-Slaves",showBack:!1,compact:new URLSearchParams(window.location.search).has("embedded"),actions:s.jsx("a",{className:"nw-link-button",href:`${kn()??""}/ems-apps.html?nwAdmin=1`,target:window.parent!==window?"_parent":"_self",children:"Zum EMS-AppCenter"}),children:[o&&s.jsxs("section",{className:"nw-card",children:[s.jsx("p",{role:"alert",children:S}),s.jsx("p",{children:"Die App muss im EMS-AppCenter installiert sein. Zugriff nur für Installer und Admin."})]}),!o&&s.jsxs(s.Fragment,{children:[r&&!r.enabled&&s.jsxs("section",{className:"nw-card",children:[s.jsx("strong",{children:"App inaktiv"}),s.jsx("p",{children:"Einrichtung und gespeicherte Daten sind zugänglich. Regelkommunikation und Zähleraufzeichnung starten erst mit „Aktiv: An“ im EMS-AppCenter."})]}),s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Verbindung und Freigaben"}),s.jsx("p",{role:"status",children:S}),m&&s.jsxs(s.Fragment,{children:[s.jsxs("p",{children:[s.jsx("strong",{children:m.master?.controlMode==="LOCAL_AUTONOMY"?"Lokale Hausregelung":m.master?.controlMode==="TRANSFORMER_LIMIT"?"Trafo-Begrenzung":m.master?.state||m.local?.state})," · Antwort ",m.timing.lastRttMs===null?"—":`${Math.round(m.timing.lastRttMs)} ms`," · P95 ",m.timing.p95RttMs===null?"—":`${Math.round(m.timing.p95RttMs)} ms`," · Freigabe ",Math.round(m.local?.remainingMs||0)," ms"]}),s.jsxs("p",{children:[m.master?.reason||m.local?.reason," ",m.error]}),m.master?.siteMeasurement&&s.jsxs("p",{children:["Trafo-NVP: ",m.master.siteMeasurement.gridW!==null?`${Math.round(m.master.siteMeasurement.gridW)} W`:"Messung fehlt"," · Messwertalter: ",m.master.siteMeasurement.ageMs!==null?`${Math.round(m.master.siteMeasurement.ageMs)} ms`:"—"," · Phasen A: ",m.master.siteMeasurement.phaseA?.map(j=>Number(j).toFixed(1)).join(" / ")||"—"]})]}),s.jsx("p",{children:"Der Master begrenzt den gesamten Hausanschluss. 0 ist eine wirksame Grenze. Bei Ausfall bleibt nur der geplante Rückfall; Boost und Zeitpläne erhöhen ihn nicht."}),s.jsx("p",{children:"Direkte Tailscale-Verbindungen bevorzugen; tatsächliche Laufzeit am Standort prüfen. Ein unabhängiger Geräte-Watchdog ist für aktive Regelung erforderlich."}),P&&s.jsxs("p",{children:[s.jsx("strong",{children:"Aktive Konfiguration geschützt."})," Grenz- oder Topologieänderungen benötigen eine geplante Stillsetzung und erneute Inbetriebnahme."]})]}),m?.master&&s.jsxs("section",{className:"nw-card",children:[s.jsxs("h2",{children:["Betreiberübersicht · Teilnehmer (",m.master.nodes.length,"/100 einschließlich optionalem Master-Haus)"]}),s.jsx("div",{style:{overflowX:"auto",maxHeight:360},children:s.jsxs("table",{style:{width:"100%"},children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Haus"}),s.jsx("th",{children:"Verbindung"}),s.jsx("th",{children:"Alter"}),s.jsx("th",{children:"Antwortzeit"}),s.jsx("th",{children:"Bestätigt"}),s.jsx("th",{children:"Haus-NVP aktuell"}),s.jsx("th",{children:"Bezug / Reserviert"}),s.jsx("th",{children:"Einspeisegrenze"})]})}),s.jsx("tbody",{children:m.master.nodes.map(j=>s.jsxs("tr",{children:[s.jsx("td",{children:j.name||j.id}),s.jsx("td",{children:j.online?"Verbunden":"Fehlt"}),s.jsx("td",{children:j.ageMs===null?"—":`${Math.round(j.ageMs)} ms`}),s.jsx("td",{children:j.rttMs===null?"—":`${Math.round(j.rttMs)} ms`}),s.jsx("td",{children:j.confirmed?"Verifiziert":"Ausstehend"}),s.jsx("td",{children:j.sample!==null?`${Math.round(j.sample.gridW)} W`:"—"}),s.jsxs("td",{children:[Math.round(j.allowed.importW)," / ",Math.round(j.reserved.importW)," W"]}),s.jsxs("td",{children:[Math.round(j.allowed.exportW)," W"]})]},j.id))})]})})]}),c&&c.role!=="off"&&s.jsx(Fw,{meshConfig:c,status:m}),c&&s.jsx("form",{onSubmit:be,children:s.jsxs("fieldset",{disabled:C||P,style:{border:0,padding:0,minWidth:0},children:[s.jsxs("section",{className:"nw-card",style:{display:"grid",gap:14},children:[s.jsx("h2",{children:"Verbund einrichten"}),s.jsxs("label",{className:"nw-field-label",children:["Rolle",s.jsxs("select",{className:"nw-input",value:c.role,onChange:j=>ee("role",j.target.value==="master"?"master":j.target.value==="slave"?"slave":"off"),children:[s.jsx("option",{value:"off",children:"Aus"}),s.jsx("option",{value:"master",children:"Master"}),s.jsx("option",{value:"slave",children:"Slave"})]})]}),c.role!=="off"&&s.jsxs(s.Fragment,{children:[["siteId","nodeId","masterId"].map((j,H)=>s.jsxs("label",{className:"nw-field-label",children:[["Standort-ID","Lokale Knoten-ID","Feste Master-ID"][H],s.jsx("input",{className:"nw-input",value:c[j],onChange:me=>ee(j,me.target.value),required:!0})]},j)),s.jsx(Br,{label:"Gemeinsame Konfigurationsversion",value:c.revision,onChange:j=>ee("revision",j)}),s.jsxs("label",{className:"nw-field-label",children:["Betrieb",s.jsxs("select",{className:"nw-input",value:c.mode,onChange:j=>ee("mode",j.target.value==="active"?"active":"diagnostic"),children:[s.jsx("option",{value:"diagnostic",children:"Diagnose – noch keine Master-Regelung"}),s.jsx("option",{value:"active",children:"Aktiv – geprüfte Anlage verbindlich begrenzen"})]})]}),c.role==="slave"&&s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"nw-field-label",children:["Tailscale-Adresse des Masters inklusive EOS-Port",s.jsx("input",{className:"nw-input",placeholder:"http://100.x.x.x:8188",value:c.masterUrl,onChange:j=>ee("masterUrl",j.target.value),required:!0})]}),s.jsxs("label",{className:"nw-field-label",children:["Individueller Paarungsschlüssel",s.jsx("input",{className:"nw-input",type:"password",autoComplete:"new-password",value:N,onChange:j=>V(j.target.value),placeholder:"Leer lassen zum Beibehalten"})]})]}),c.role==="master"&&s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:c.localParticipates,onChange:j=>ee("localParticipates",j.target.checked)})," Master regelt zusätzlich sein eigenes Haus"]}),s.jsxs("details",{children:[s.jsx("summary",{children:"Kommunikationszeiten und Wiederanlauf"}),s.jsx("p",{children:"Startwerte: Austausch 1 s, Antwort-Timeout 800 ms, Freigabe 3 s, Messwertalter höchstens 2 s. Vor Ort prüfen."}),[["intervalMs","Austausch ms"],["requestTimeoutMs","Antwort-Timeout ms"],["leaseMs","Freigabedauer ms"],["staleMs","Maximales Messwertalter ms"],["recoveryCycles","Stabile Zyklen vor Erhöhung"],["rampWPerSecond","Wiederanlauframpe W/s"]].map(([j,H])=>s.jsx(Br,{label:H,value:c[j],onChange:me=>ee(j,me)},j))]})]})]}),c.role==="master"&&s.jsxs(s.Fragment,{children:[s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Trafo-Regelung"}),s.jsxs("label",{className:"nw-field-label",children:["Verteilung",s.jsxs("select",{className:"nw-input",value:c.allocation?.strategy||"fixed",onChange:j=>ee("allocation",{...c.allocation||{headroomW:1e3,headroomA:3,engagePct:90,releasePct:80},strategy:j.target.value==="transformer"?"transformer":"fixed"}),children:[s.jsx("option",{value:"fixed",children:"Feste Anteile (bisheriges Verhalten)"}),s.jsx("option",{value:"transformer",children:"Bedarfsabhängig · Master am Trafo, Slaves an Häusern"})]})]}),s.jsx("p",{children:"Die Häuser optimieren lokal innerhalb sicherer NVP-Korridore. Bei knapper Kapazität verteilt der Master die Gesamtfreigabe bedarfsgerecht. Haus- und Stranggrenzen gelten in jedem Betriebszustand."}),c.allocation?.strategy==="transformer"&&s.jsxs(s.Fragment,{children:[[["headroomW","Zusätzlicher Spielraum je Haus W"],["headroomA","Zusätzlicher Spielraum je Phase A"],["engagePct","Eingriff ab Trafoauslastung %"],["releasePct","Wiederfreigabe unter Trafoauslastung %"]].map(([j,H])=>s.jsx(Br,{label:H,value:c.allocation[j],onChange:me=>ee("allocation",{...c.allocation,[j]:me})},j)),s.jsx("button",{className:"nw-button",type:"button",onClick:()=>h(j=>j&&{...j,intervalMs:250,requestTimeoutMs:200,leaseMs:1500,staleMs:1e3}),children:"Schnellen Takt übernehmen: 250 ms / 200 ms Timeout"}),s.jsx("p",{children:"Nur bei entsprechend schnellen NVP-Messwerten und stabiler Verbindung verwenden. Messung, Netzwerk und Stellgeräte bestimmen zusammen die tatsächliche Reaktionszeit."})]})]}),s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Gemeinsamer Anschluss"}),s.jsx("p",{children:"Hauptzähler und alle drei Phasen unter der lokalen Netzmessung zuordnen. Für nicht geregelte Lasten dauerhaft Kapazität vorhalten."}),s.jsx(Nf,{value:c.site,onChange:j=>ee("site",j)}),c.localParticipates&&s.jsxs(s.Fragment,{children:[s.jsx("h3",{children:"Getrennter Hauptzähler des Verbunds"}),s.jsx("p",{children:"Hier die Messung des gesamten Standorts eintragen; die lokale Hausmessung bleibt getrennt."}),["gridW","l1A","l2A","l3A"].map(j=>s.jsxs("label",{className:"nw-field-label",children:[j," – Hauptzähler-DP",s.jsx("input",{className:"nw-input",value:c.siteFeedback?.[j]||"",onChange:H=>ee("siteFeedback",{...c.siteFeedback,[j]:H.target.value})})]},j))]})]}),s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Stränge"}),c.branches.map((j,H)=>s.jsxs("details",{children:[s.jsxs("summary",{children:["Strang ",j.id||H+1]}),s.jsx("input",{className:"nw-input","aria-label":"Strang-ID",value:j.id,onChange:me=>ee("branches",c.branches.map((q,ce)=>H===ce?{...q,id:me.target.value}:q))}),s.jsx(Nf,{value:j,onChange:me=>ee("branches",c.branches.map((q,ce)=>H===ce?me:q))}),s.jsx("button",{className:"nw-button",type:"button",onClick:()=>ee("branches",c.branches.filter((me,q)=>q!==H)),children:"Strang entfernen"})]},H)),s.jsx("button",{className:"nw-button",type:"button",onClick:()=>ee("branches",[...c.branches,{id:"",reserve:{...c.site.reserve},unmonitored:{...c.site.unmonitored},limit:{importW:0,exportW:0,l1A:0,l2A:0,l3A:0}}]),children:"Strang hinzufügen"})]}),s.jsxs("section",{className:"nw-card",children:[s.jsxs("h2",{children:["Slaves (",c.nodes.length,"/99)"]}),s.jsx("p",{children:"Erst Teilnehmer speichern, dann für jeden Slave eigene Paarungsdaten erzeugen."}),s.jsx("select",{className:"nw-input","aria-label":"Slave auswählen",value:p,onChange:j=>x(Number(j.target.value)),children:c.nodes.map((j,H)=>s.jsxs("option",{value:H,children:[j.name||j.id||`Slave ${H+1}`," ",xe.includes(j.id)?"· gepaart":""]},H))}),c.nodes[p]&&s.jsxs(s.Fragment,{children:[s.jsx(Cf,{value:c.nodes[p],onChange:j=>ee("nodes",c.nodes.map((H,me)=>me===p?j:H))}),s.jsx("button",{className:"nw-button",type:"button",onClick:z,children:"Paarung für gespeicherten Slave erzeugen"}),s.jsx("button",{className:"nw-button",type:"button",onClick:()=>{ee("nodes",c.nodes.filter((j,H)=>H!==p)),x(0),M("")},children:"Slave entfernen"})]}),s.jsx("button",{className:"nw-button",type:"button",disabled:c.nodes.length>=99,onClick:()=>{ee("nodes",[...c.nodes,Ww(`haus_${c.nodes.length+1}`)]),x(c.nodes.length),M("")},children:"Slave hinzufügen"})]})]}),(c.role==="slave"||c.role==="master"&&c.localParticipates)&&s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Lokales Haus"}),s.jsx(Cf,{local:!0,value:c.local,onChange:j=>ee("local",j)}),s.jsx("h3",{children:"Tatsächliche Leistungen"}),s.jsx("p",{children:"Summenmesswerte in W, jeweils positiv. Nur vorhandene Geräte freigeben. Lokalen NVP und Phasen im App-Center zuordnen."}),["evW","chargeW","dischargeW","pvW","flexW"].map(j=>s.jsxs("label",{className:"nw-field-label",children:[Vi[j]," – Messwert-DP",s.jsx("input",{className:"nw-input",value:c.feedback?.[j]||"",onChange:H=>ee("feedback",{...c.feedback,[j]:H.target.value})})]},j))]}),s.jsx("section",{className:"nw-card",children:s.jsx("button",{className:"nw-button nw-button--primary",type:"submit",children:"Konfiguration speichern"})}),c.role!=="master"&&s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Paarung vom Master übernehmen"}),s.jsx("textarea",{className:"nw-input",rows:5,"aria-label":"Paarungsdaten importieren",value:te,onChange:j=>ne(j.target.value)}),s.jsx("button",{className:"nw-button",type:"button",onClick:ae,children:"Paarung in Formular übernehmen"})]})]})}),U&&s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Einmalige Paarungsdaten"}),s.jsx("p",{children:"Enthält den Schlüssel dieses Slaves. Nach Übernahme schließen."}),s.jsx("textarea",{className:"nw-input",rows:8,readOnly:!0,value:U,"aria-label":"Einmalige Paarungsdaten"}),s.jsx("button",{className:"nw-button",onClick:()=>M(""),children:"Schließen und aus Ansicht entfernen"})]})]})]})}const it=r=>r!==null&&typeof r=="object"&&!Array.isArray(r)&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null),he=r=>typeof r=="string",st=r=>typeof r=="number"&&Number.isFinite(r),ct=r=>typeof r=="boolean",Ae=r=>r===null||r===""||st(r),hl=r=>ct(r)||Ae(r),I=r=>l=>l===void 0||r(l),Ze=r=>l=>l===null||r(l),Ct=r=>l=>Array.isArray(l)&&l.every(r);function De(r){return l=>{if(!it(l))return!1;for(const o in r)if(Object.hasOwn(r,o)&&!r[o](l[o]))return!1;return!0}}const Po=r=>l=>it(l)&&Object.keys(l).every(o=>!["__proto__","prototype","constructor"].includes(o)&&r(l[o]));function En(r){const l=[{value:r,depth:0}],o=new Set;let d=0;for(;l.length;){const c=l.pop();if(!c||++d>5e4||c.depth>32)return!1;const h=c.value;if(h===null||ct(h)||st(h))continue;if(he(h)){if(h.length>1048576)return!1;continue}if(!Array.isArray(h)&&!it(h)||o.has(h))return!1;o.add(h);const m=Object.getOwnPropertyDescriptors(h);for(const g of Object.keys(m)){if(["__proto__","prototype","constructor"].includes(g))return!1;const p=m[g];if(!p||!("value"in p))return!1;if(Array.isArray(h)&&g==="length")continue;const x=p.value;l.push({value:x,depth:c.depth+1})}}return!0}const xn=De({stateId:I(he),unit:I(he),sign:I(Ae),maxAgeMs:I(Ae),scale:I(Ae)}),Vw=De({stateId:I(he),unit:I(he),sign:I(Ae),maxAgeMs:I(Ae),scale:I(Ae),kind:I(he),importMeasurement:I(xn),exportMeasurement:I(xn)}),Uw=De({measurement:I(Ze(Vw)),valid:I(ct),reason:I(he)}),$w=De({id:he,source:I(he),measurement:I(xn),importLimitW:I(Ze(Ae)),exportLimitW:I(Ze(Ae)),importReserveW:I(Ae),exportReserveW:I(Ae)}),Li=De({stateId:I(he),scale:I(Ae),sign:I(Ae),readbackStateId:I(he)}),Ao=De({stateId:I(he),readbackStateId:I(he),onValue:I(hl),offValue:I(hl)}),Hw=De({stateId:I(he),ttlMs:I(Ae),writeValue:I(hl),readbackStateId:I(he),expiryBehavior:I(he)}),Gw=De({mode:I(he),signedTarget:I(Li),chargeTarget:I(Li),dischargeTarget:I(Li),maxCharge:I(Li),maxDischarge:I(Li),appliedMaxCharge:I(xn),appliedMaxDischarge:I(xn),watchdog:I(Hw),run:I(Ao),chargeEnable:I(Ao),dischargeEnable:I(Ao)}),Kw=De({targetGridImportW:I(Ae),importThresholdW:I(Ae),peakLimitW:I(Ae)}),Qw=De({stateId:I(he),availableValue:I(hl),maxAgeMs:I(Ae)}),Zw=De({id:he,name:I(he),connectionPointId:I(he),controlPointId:I(he),dispatchGroupId:I(he),primaryPurpose:I(he),authority:I(he),powerMeasurement:I(xn),socMeasurement:I(xn),maxChargeW:I(Ae),maxDischargeW:I(Ae),minSoc:I(Ae),maxSoc:I(Ae),maxDeltaWPerSec:I(Ae),configuredToleranceW:I(Ae),commandTimeoutMs:I(Ae),strategy:I(Kw),command:I(Gw),availability:I(Qw),requestPowerMeasurement:I(xn)}),qw=De({stateId:I(he),unit:I(he),scale:I(Ae),readbackStateId:I(he)}),Xw=De({id:he,connectionPointId:I(he),referencePowerW:I(Ae),powerMeasurement:I(xn),command:I(qw),evuControl:I(ct)}),Yw=De({schemaVersion:I(st),configVersion:st,maxSkewMs:I(Ae),points:Ct($w),storages:Ct(Zw),pvAssignments:Ct(Xw)}),Jw=De({installed:ct,enabled:ct}),ev=De({path:I(he),message:I(he),reason:I(he),code:I(he)}),ur=r=>he(r)||ev(r),vh=De({valid:I(ct),activeEligible:I(ct),errors:I(Ct(ur)),activationErrors:I(Ct(ur)),warnings:I(Ct(ur))}),Rf=De({valueW:I(Ze(st)),ageMs:I(Ze(st)),valid:I(ct),reason:I(he)}),tv=De({socPct:I(Ze(st)),available:I(ct)}),nv=De({id:I(he),requestedW:I(Ze(st)),targetW:I(Ze(st)),minPowerW:I(Ze(st)),maxPowerW:I(Ze(st)),commandConfirmed:I(ct),accepted:I(ct),reason:I(he)}),rv=De({id:I(he),appliedConfirmed:I(ct),targetW:I(Ze(st))}),iv=De({id:he,connectionPointId:I(he),primaryPurpose:I(he),authority:I(he),requestedW:I(Ze(st)),reason:I(he),status:I(he)}),sv=De({points:I(Po(Rf)),storages:I(Po(Rf)),storageTelemetry:I(Po(tv)),errors:I(Ct(ur))}),lv=De({ts:I(Ze(st)),status:I(he),configVersion:I(Ze(st)),reason:I(he),budget:I(Ze(De({reason:I(he)}))),snapshot:I(Ze(sv)),storageResults:I(Ct(nv)),pendingIntervals:I(Ct(rv)),errors:I(Ct(ur)),activationErrors:I(Ct(ur)),groups:I(Ct(iv)),writesPerformed:I(Ze(st))}),av=De({config:I(Yw),app:I(Jw),rootSource:I(Ze(Uw)),status:I(Ze(lv)),validation:I(Ze(vh)),locked:I(ct)});function Oi(r,l=!0){if(!En(r)||!av(r))throw new Error("Ungültige Antwort der Netzanschluss-API. Der Entwurf bleibt erhalten.");if(l&&(!r.config||!r.app))throw new Error("Unvollständige Antwort der Netzanschluss-API. Der Entwurf bleibt erhalten.");if(r.config&&(!Number.isSafeInteger(r.config.configVersion)||r.config.configVersion<1||r.config.points.length!==2||!r.config.points.some(o=>o.id==="M0")||!r.config.points.some(o=>o.id==="M1")))throw new Error("Ungültige Messstruktur der Netzanschluss-API.");return r}function ov(r){return En(r)&&vh(r)?r:null}function uv(r){return En(r)&&Ct(ur)(r)?{valid:!1,errors:r}:null}const cv=De({enabled:ct,host:he,port:st,tlsMode:he,user:he,siteName:he,passwordSet:ct});function _f(r){if(!En(r)||!it(r)||!cv(r.config)||!Number.isInteger(r.config.port)||r.config.port<1||r.config.port>65535||!["tls","starttls"].includes(r.config.tlsMode))throw new Error("Ungültige Antwort der E-Mail-Konfiguration.");return r.config}function dv(){const[r,l]=v.useState({enabled:!1,host:"",port:465,tlsMode:"tls",user:"",siteName:"",passwordSet:!1}),[o,d]=v.useState(""),[c,h]=v.useState(!1),[m,g]=v.useState(!0),[p,x]=v.useState(!1),[S,E]=v.useState("Versandkonfiguration wird geladen…"),[C,O]=v.useState(!1);v.useEffect(()=>{let N=!0;return wf().then(V=>{N&&(l(_f(V)),x(!0),E("SMTP-Zugangsdaten werden verschlüsselt auf dieser Anlage gespeichert."))}).catch(V=>{N&&(E(St(V,"E-Mail-Konfiguration nicht erreichbar.")),O(!0))}).finally(()=>{N&&g(!1)}),()=>{N=!1}},[]);const P=(N,V)=>l(U=>({...U,[N]:V})),D=async N=>{N.preventDefault(),g(!0),O(!1);try{const V=await wf({...r,password:o,clearPassword:c});l(_f(V)),d(""),h(!1),E("Gespeichert. Unter Kunden-Einstellungen → Benachrichtigungen die Empfängeradresse eintragen und eine Test-Mail senden.")}catch(V){E(St(V,"E-Mail-Konfiguration nicht erreichbar.")),O(!0)}finally{g(!1)}};return s.jsxs(Gn,{title:"E-Mail-Versand",subtitle:"Direkter Versand wichtiger EOS-Meldungen. Einrichtung ausschließlich durch den Admin.",showBack:!1,children:[s.jsx("section",{className:"nw-card",children:s.jsxs("form",{onSubmit:D,className:"nw-access-gate__form",style:{maxWidth:680,margin:"0 auto"},children:[s.jsxs("label",{className:"nw-field-label",children:[s.jsx("input",{type:"checkbox",checked:r.enabled,disabled:m||!p,onChange:N=>P("enabled",N.target.checked)})," Direkten E-Mail-Versand aktivieren"]}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailFrom",children:"Absender"}),s.jsx("input",{className:"nw-input",id:"mailFrom",value:"info@nexowatt.com",readOnly:!0}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailSite",children:"Anlagenname für die E-Mail"}),s.jsx("input",{className:"nw-input",id:"mailSite",value:r.siteName,maxLength:100,disabled:m,onChange:N=>P("siteName",N.target.value),placeholder:"Zum Beispiel Firmenstandort Rhede"}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailHost",children:"SMTP-Server"}),s.jsx("input",{className:"nw-input",id:"mailHost",value:r.host,disabled:m,required:r.enabled,onChange:N=>P("host",N.target.value),placeholder:"SMTP-Server des E-Mail-Anbieters",autoComplete:"off"}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailTls",children:"Verschlüsselung"}),s.jsxs("select",{className:"nw-input",id:"mailTls",value:r.tlsMode,disabled:m,onChange:N=>{const V=N.target.value;l(U=>({...U,tlsMode:V,port:[465,587].includes(U.port)?V==="tls"?465:587:U.port}))},children:[s.jsx("option",{value:"tls",children:"TLS (normalerweise Port 465)"}),s.jsx("option",{value:"starttls",children:"STARTTLS verpflichtend (normalerweise Port 587)"})]}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailPort",children:"SMTP-Port"}),s.jsx("input",{className:"nw-input",id:"mailPort",type:"number",min:1,max:65535,value:r.port,disabled:m,onChange:N=>P("port",Number(N.target.value))}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailUser",children:"SMTP-Benutzer"}),s.jsx("input",{className:"nw-input",id:"mailUser",value:r.user,disabled:m,required:r.enabled,autoComplete:"off",onChange:N=>P("user",N.target.value)}),s.jsx("label",{className:"nw-field-label",htmlFor:"mailPassword",children:"SMTP-Passwort / App-Passwort"}),s.jsx("input",{className:"nw-input",id:"mailPassword",type:"password",autoComplete:"new-password",value:o,disabled:m,onChange:N=>d(N.target.value),placeholder:r.passwordSet?"Gespeichert – leer lassen zum Beibehalten":"Noch nicht hinterlegt"}),s.jsxs("label",{className:"nw-field-label",children:[s.jsx("input",{type:"checkbox",checked:c,disabled:m,onChange:N=>h(N.target.checked)})," Gespeichertes Passwort löschen (Versand vorher deaktivieren)"]}),s.jsx("button",{className:"nw-button nw-button--primary",type:"submit",disabled:m||!p,children:m?"Bitte warten…":"Versandkonfiguration speichern"}),s.jsx("div",{role:"status",className:`nw-status ${C?"nw-status--bad":"nw-status--ok"}`,children:S})]})}),s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Meldeverhalten"}),s.jsx("p",{children:"Harte Fehler: sofort bei Erkennung. Normale Fehler: gesammelt alle 30 Minuten. Sonstige Hinweise, Entwarnungen und Erinnerungen an harte Fehler: als Tageszusammenfassung. Gleichzeitige Störungen werden gebündelt."}),s.jsx("p",{children:"Reguläre Ladepausen, Ladeende und normale PV-Abregelung erzeugen keine Störungsmail. Bei vollständigem Rechner- oder Internetausfall kann dieses Gerät selbst keine E-Mail versenden."}),s.jsx("a",{className:"nw-button",href:`${kn()??""}/settings.html`,children:"Kunden-Benachrichtigungen öffnen"}),s.jsx("a",{className:"nw-button",href:`${kn()??""}/ems-apps.html`,children:"Zurück zum App-Center"})]})]})}function rn(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function wn(r,l=2048){if(r==null)return"";if(typeof r!="string"||r.length>l)throw new Error("EOS_HISTORY_RESPONSE_INVALID");return r}function Ti(r){return typeof r=="number"&&Number.isFinite(r)&&r>=0?r:null}function Pf(r){if(r===void 0||r===""||r==="adapter")return"adapter";if(r==="influxdb2"||r==="postgresql")return r;throw new Error("EOS_HISTORY_RESPONSE_INVALID")}function Io(r){if(!rn(r)||r.ok!==!0||!rn(r.config)||!rn(r.status))throw new Error("EOS_HISTORY_RESPONSE_INVALID");const l=r.config.influxdb2;if(l!==void 0&&!rn(l))throw new Error("EOS_HISTORY_RESPONSE_INVALID");const o=r.config.postgresql,d=Pf(r.config.provider);if(r.config.newInstallationAllowed!==void 0&&typeof r.config.newInstallationAllowed!="boolean")throw new Error("EOS_HISTORY_RESPONSE_INVALID");if(o!==void 0&&(!rn(o)||o.profile!=="local"||typeof o.provisioned!="boolean"))throw new Error("EOS_HISTORY_RESPONSE_INVALID");if(d==="postgresql"&&!rn(o))throw new Error("EOS_HISTORY_RESPONSE_INVALID");const c=wn(r.configurationRevision,128);if(!c)throw new Error("EOS_HISTORY_RESPONSE_INVALID");return{configurationRevision:c,config:{provider:d,instance:wn(r.config.instance,256),newInstallationAllowed:r.config.newInstallationAllowed===!0,influxdb2:{url:wn(l?.url),organization:wn(l?.organization,256),bucket:wn(l?.bucket,256),hasToken:l?.hasToken===!0,hasCaCertificate:l?.hasCaCertificate===!0},postgresql:{profile:"local",provisioned:o?.provisioned===!0}},status:{provider:Pf(r.status.provider),state:wn(r.status.state,64),queueDepth:Ti(r.status.queueDepth),droppedPoints:Ti(r.status.droppedPoints),lastWriteAt:Ti(r.status.lastWriteAt),lastReadAt:Ti(r.status.lastReadAt),lastError:wn(r.status.lastError,256),readError:wn(r.status.readError,256),writeError:wn(r.status.writeError,256),legacyRecordingCount:Ti(r.status.legacyRecordingCount),writeVerified:r.status.writeVerified===!0}}}function fv(r){return{provider:r.provider,instance:r.instance,url:r.influxdb2.url,organization:r.influxdb2.organization,bucket:r.influxdb2.bucket,token:"",caCertificate:"",clearCaCertificate:!1,newInstallation:!1}}function yh(r){return r.provider==="adapter"&&r.newInstallationAllowed===!0}function hv(r){return r==="postgresql"?"PostgreSQL lokal":r==="influxdb2"?"InfluxDB 2 direkt":"ioBroker-Historieadapter"}function Af(r){let l;try{l=new URL(r.trim())}catch{throw new Error("EOS_INFLUX_URL_INVALID")}if(r.length>2048||!["http:","https:"].includes(l.protocol)||!l.hostname||l.username||l.password||l.search||l.hash||l.pathname.includes("/api/"))throw new Error("EOS_INFLUX_URL_INVALID");return l}function pv(r,l){if(r.provider==="adapter")return{provider:"adapter",instance:r.instance.trim()};if(r.provider==="postgresql"){if(l.provider!=="postgresql"){if(!yh(l))throw new Error("EOS_POSTGRES_EXISTING_HISTORY");if(r.newInstallation!==!0)throw new Error("EOS_POSTGRES_NEW_INSTALLATION_REQUIRED")}return{provider:"postgresql",postgresql:{profile:"local"},...l.provider!=="postgresql"?{newInstallation:!0}:{}}}const o=Af(r.url);if(!r.organization.trim()||!r.bucket.trim()||r.organization.length>256||r.bucket.length>256)throw new Error("EOS_INFLUX_CONFIG_INVALID");if(!r.token.trim()){if(!l.influxdb2.hasToken)throw new Error("EOS_INFLUX_TOKEN_REQUIRED");let d=!1;try{d=Af(l.influxdb2.url).origin===o.origin}catch{d=!1}if(!d)throw new Error("EOS_INFLUX_TOKEN_ORIGIN_CHANGED")}if(r.token.length>8192||r.caCertificate.length>65536)throw new Error("EOS_INFLUX_CONFIG_INVALID");if(r.caCertificate.trim()&&o.protocol!=="https:"||r.caCertificate.trim()&&r.clearCaCertificate)throw new Error("EOS_INFLUX_CA_INVALID");return{provider:"influxdb2",influxdb2:{url:r.url.trim(),organization:r.organization.trim(),bucket:r.bucket.trim(),token:r.token.trim(),caCertificate:r.caCertificate.trim(),clearCaCertificate:r.clearCaCertificate}}}function mv(r){if(!rn(r)||r.ok!==!0||!rn(r.check)||typeof r.check.reachable!="boolean"||typeof r.check.readable!="boolean")throw new Error("EOS_HISTORY_RESPONSE_INVALID");return{reachable:r.check.reachable,readable:r.check.readable}}const If=new Map([["EOS_POSTGRES_NEW_INSTALLATION_REQUIRED","PostgreSQL ist für ausdrücklich eingerichtete Neuanlagen vorgesehen. Die Neuanlage bestätigen; bestehende Historien bleiben erhalten."],["EOS_POSTGRES_EXISTING_HISTORY","Eine bestehende Historie ist eingerichtet. Die Umstellung auf PostgreSQL wird nicht durchgeführt. Den bisherigen Anbieter weiterverwenden."],["EOS_POSTGRES_NOT_PROVISIONED","Die geschützte lokale PostgreSQL-Umgebung ist noch nicht eingerichtet. Ein Installer muss zuerst das EOS-Systemsetup ausführen. Danach den Status neu laden und die Verbindung prüfen."],["EOS_POSTGRES_SETUP_REQUIRED","Die geschützte lokale PostgreSQL-Umgebung ist noch nicht eingerichtet. Ein Installer muss zuerst das EOS-Systemsetup ausführen. Danach den Status neu laden und die Verbindung prüfen."],["EOS_POSTGRES_NOT_CONFIGURED","Die lokale PostgreSQL-Historie ist noch nicht eingerichtet. Systemsetup und gespeicherte Historie-Auswahl prüfen."],["EOS_POSTGRES_CONFIG_INVALID","Die geschützte PostgreSQL-Konfiguration ist ungültig. Ein Installer muss das EOS-Systemsetup prüfen. Zugangsdaten werden hier nicht angezeigt."],["EOS_POSTGRES_PROFILE_INVALID","Das lokale PostgreSQL-Verbindungsprofil ist ungültig. Ein Installer muss das EOS-Systemsetup prüfen."],["EOS_POSTGRES_PROFILE_PERMISSIONS","Die Dateirechte des geschützten Datenbankprofils sind nicht zulässig. Ein Installer muss das EOS-Systemsetup prüfen; Rechte nicht pauschal erweitern."],["EOS_POSTGRES_CA_INVALID","Das öffentliche PostgreSQL-CA-Zertifikat ist ungültig. Ein Installer muss die Zertifikate des EOS-Systemsetups prüfen."],["EOS_POSTGRES_SCHEMA_MISSING","Die benötigte EOS-Historienstruktur fehlt in PostgreSQL. Ein Installer muss das EOS-Systemsetup vervollständigen."],["EOS_POSTGRES_TLS_FAILED","Das PostgreSQL-Zertifikat konnte nicht geprüft werden. Das EOS-Systemsetup muss Zertifikatskette, Servername und Gültigkeit prüfen. Ein unverschlüsselter Ersatzweg wird nicht verwendet."],["EOS_POSTGRES_AUTHORIZATION_FAILED","PostgreSQL lehnt den Datenbankzugang ab. Ein Installer muss die geschützten Datenbankrollen und Rechte prüfen."],["EOS_POSTGRES_CONNECTION_FAILED","Die lokale PostgreSQL-Datenbank ist nicht erreichbar. Dienststatus und EOS-Systemsetup prüfen."],["EOS_POSTGRES_TIMEOUT","Die lokale Datenbank antwortet nicht rechtzeitig. Dienststatus und Auslastung prüfen."],["EOS_POSTGRES_QUERY_FAILED","Die Historienabfrage konnte nicht abgeschlossen werden. Datenbankstatus und EOS-Protokoll prüfen."],["EOS_POSTGRES_DISK_FULL","PostgreSQL meldet einen vollen Datenträger. Die Historie kann nicht vollständig gespeichert werden. Speicherplatz und Aufbewahrungsregeln prüfen."],["EOS_POSTGRES_RESOURCE_LIMIT","PostgreSQL hat eine Ressourcenbegrenzung erreicht. Datenbankstatus, Arbeitsspeicher und Auslastung prüfen."],["EOS_POSTGRES_WRITE_FAILED","Messwerte konnten nicht in PostgreSQL gespeichert werden. Dienststatus und Speicherplatz prüfen."],["EOS_POSTGRES_QUEUE_FULL","Die Historie-Warteschlange ist voll; Messwerte wurden verworfen. Datenbankverbindung und Schreibzugriff prüfen."],["EOS_POSTGRES_RESPONSE_INVALID","Die Datenbank hat ungültige Historienwerte geliefert. EOS übernimmt diese Werte nicht. Datenbankstatus und EOS-Protokoll prüfen."],["EOS_POSTGRES_RESPONSE_LIMIT","Die Historienantwort überschreitet die zulässige Größe. Einen kleineren Zeitraum wählen."],["EOS_POSTGRES_QUERY_INVALID","Die Historienabfrage ist ungültig. Zeitraum und Datenpunkt auswählen und erneut prüfen."],["EOS_POSTGRES_QUERY_LIMIT","Die Historienabfrage überschreitet die zulässige Größe. Einen kleineren Zeitraum wählen."],["EOS_POSTGRES_AGGREGATE_UNSUPPORTED","Diese Zusammenfassung der Historienwerte wird nicht unterstützt. Eine verfügbare Darstellung auswählen."],["EOS_POSTGRES_BUSY","Die Historien-Datenbank ist momentan ausgelastet. Später erneut prüfen."],["EOS_POSTGRES_CLOSED","Die PostgreSQL-Verbindung ist beendet. EOS-Betriebsstatus prüfen und den Status erneut laden."],["EOS_INFLUX_AUTHORIZATION_FAILED","InfluxDB lehnt den Zugriff ab (401/403). Token sowie Lese- und Schreibrechte für den Bucket prüfen."],["EOS_INFLUX_NOT_FOUND","InfluxDB-Endpunkt oder Bucket nicht gefunden. Serveradresse, Organisation und Bucket prüfen."],["EOS_INFLUX_TLS_FAILED","Das TLS-Zertifikat konnte nicht geprüft werden. Servername, Zertifikatsgültigkeit und gegebenenfalls das CA-Zertifikat prüfen."],["EOS_INFLUX_CA_INVALID","Das CA-Zertifikat ist ungültig oder passt nicht zur Auswahl. PEM nur mit HTTPS verwenden; Ersetzen und Entfernen nicht gleichzeitig wählen."],["EOS_INFLUX_CONNECTION_FAILED","InfluxDB ist nicht erreichbar. Adresse, Port und Netzwerkverbindung prüfen."],["EOS_INFLUX_TIMEOUT","InfluxDB antwortet nicht rechtzeitig. Verbindung und Server prüfen."],["EOS_INFLUX_URL_INVALID","Eine vollständige Serveradresse mit http:// oder https:// und gegebenenfalls Port eintragen. Keine Zugangsdaten oder /api/-Adresse verwenden."],["EOS_INFLUX_CONFIG_INVALID","InfluxDB-Einstellungen sind unvollständig oder ungültig. Organisation, Bucket und Zugangsdaten prüfen."],["EOS_INFLUX_TOKEN_REQUIRED","Für diese Verbindung muss ein InfluxDB-Token eingetragen werden."],["EOS_INFLUX_TOKEN_ORIGIN_CHANGED","Die Serveradresse oder der Port wurde geändert. Dafür einen Token neu eingeben; der gespeicherte Token wird nicht an ein anderes Ziel gesendet."],["EOS_INFLUX_REDIRECT_REJECTED","InfluxDB leitet die Anfrage um. Die endgültige Serveradresse direkt eintragen."],["EOS_INFLUX_RATE_LIMITED","InfluxDB begrenzt derzeit die Anfragen. Später erneut prüfen."],["EOS_INFLUX_NEW_DESTINATION_REQUIRES_TOKEN","Die Serveradresse oder der Port wurde geändert. Dafür einen Token neu eingeben; der gespeicherte Token wird nicht an ein anderes Ziel gesendet."],["EOS_INFLUX_TOKEN_INVALID","Der InfluxDB-Token fehlt oder ist ungültig. Einen gültigen Token für den gewählten Bucket eintragen."],["EOS_INFLUX_PROVIDER_INVALID","Für diese Verbindungsprüfung „InfluxDB 2 direkt“ auswählen."],["EOS_INFLUX_HTTP_REQUIRES_LOCAL_ADDRESS","Unverschlüsseltes HTTP ist nur für lokale Serveradressen erlaubt. Für einen externen InfluxDB-Server HTTPS verwenden."],["EOS_INFLUX_ADDRESS_FORBIDDEN","Diese Serveradresse ist für die Historie-Anbindung nicht zulässig. Eine reguläre InfluxDB-Serveradresse verwenden."],["EOS_INFLUX_CHECK_BUSY","Eine Verbindungsprüfung läuft bereits. Kurz warten und anschließend erneut prüfen."],["EOS_INFLUX_CONFIG_BUSY","Andere Einstellungen werden gerade gespeichert. Kurz warten; der Entwurf bleibt erhalten."],["EOS_INFLUX_CONFIG_SAVE_FAILED","Die Historie-Einstellungen konnten nicht gespeichert werden. Der Entwurf bleibt erhalten. Speicherstatus und EOS-Protokoll prüfen."],["EOS_INFLUX_TOKEN_ENCRYPTION_FAILED","Der Token konnte nicht sicher gespeichert werden. EOS-Systemkonfiguration und Protokoll prüfen; der Entwurf bleibt erhalten."],["EOS_INFLUX_TOKEN_DECRYPTION_FAILED","Der gespeicherte Token konnte nicht gelesen werden. Einen Token erneut eingeben und ausdrücklich speichern."],["EOS_INFLUX_NOT_READY","Der InfluxDB-Server meldet sich noch nicht als betriebsbereit. Serverstatus prüfen."],["EOS_INFLUX_NOT_CONFIGURED","Die direkte InfluxDB-Verbindung ist noch nicht eingerichtet. Einstellungen prüfen und speichern."],["EOS_INFLUX_BUSY","Die Historie ist momentan ausgelastet. Später erneut prüfen."],["EOS_INFLUX_QUEUE_FULL","Die Historie-Warteschlange ist voll; Messwerte wurden verworfen. Serververbindung und Schreibzugriff prüfen."],["EOS_INFLUX_RESPONSE_INVALID","InfluxDB hat keine gültige Antwort geliefert. Serverversion und Verbindung prüfen."],["EOS_INFLUX_RESPONSE_LIMIT","Die Antwort von InfluxDB überschreitet die zulässige Größe. Abfrage und Server prüfen."],["EOS_INFLUX_REQUEST_FAILED","InfluxDB hat die Anfrage abgelehnt. Organisation, Bucket, Token und Serverstatus prüfen."],["EOS_UI_OWNERSHIP_REQUIRED","EOS besitzt aktuell keine Betriebsfreigabe für diese Änderung. Systemfreigabe und Bestandsübernahme prüfen."],["EOS_INSTALLER_CONFIG_CONFLICT","Die Einstellungen wurden inzwischen geändert. Der Entwurf bleibt erhalten. Den gespeicherten Stand vor einem erneuten Speichern neu laden."],["EOS_HISTORY_RESPONSE_INVALID","Die Antwort der Historie ist unvollständig. Es wurde kein Erfolg bestätigt."]]);function Mi(r){const l=rn(r)?r:null,o=l&&rn(l.payload)?l.payload:null,d=typeof o?.error=="string"?o.error:typeof l?.code=="string"?l.code:r instanceof Error?r.message:"";if(o?.saved===!0)return"Die Einstellungen wurden gespeichert, konnten aber noch nicht vollständig aktiviert werden. Den gespeicherten Stand neu laden und die EOS-Betriebsfreigabe prüfen.";const c=If.get(d);return c||(l?.status===409?If.get("EOS_INSTALLER_CONFIG_CONFLICT")||"Die Einstellungen wurden inzwischen geändert.":l?.status===401?"Die EOS-Sitzung ist abgelaufen. Bitte erneut anmelden; der Entwurf bleibt geöffnet.":l?.status===403?"Für diese Einrichtung ist eine Installer- oder Admin-Freigabe erforderlich.":"Die Historie-Anfrage konnte nicht abgeschlossen werden. Einstellungen und Verbindung prüfen. Der Entwurf bleibt erhalten.")}function Df(r){return r!==null&&r>0&&Number.isFinite(new Date(r).getTime())?new Date(r).toLocaleString("de-DE"):"Noch nicht bestätigt"}function gv(r){return r?r.state==="ready"?r.lastReadAt||r.lastWriteAt?"Eingerichtet":"Eingerichtet; Zugriff noch nicht bestätigt":r.state==="error"?"Fehler":r.state==="disabled"?"Direktverbindung deaktiviert":r.state==="closed"?"Verbindung geschlossen":"Noch nicht bekannt":"Noch nicht bekannt"}const wv={provider:"adapter",instance:"",url:"",organization:"",bucket:"",token:"",caCertificate:"",clearCaCertificate:!1,newInstallation:!1};function vv(){const[r,l]=v.useState(null),[o,d]=v.useState(wv),[c,h]=v.useState(null),[m,g]=v.useState(null),[p,x]=v.useState(!1),[S,E]=v.useState(!0),[C,O]=v.useState("Historie-Einstellungen werden geladen…"),[P,D]=v.useState(!1),N=v.useRef(!0),V=v.useRef(!1),U=v.useRef(0),M=j=>{l(j),d(fv(j.config)),h(j.status),g(null),x(j.config.postgresql.provisioned)};v.useEffect(()=>{N.current=!0,V.current=!0;const j=++U.current;return tl().then(H=>{!N.current||j!==U.current||(M(Io(H)),O("Gespeicherter Stand geladen. Änderungen werden erst mit „Speichern“ übernommen."))}).catch(H=>{N.current&&j===U.current&&(D(!0),O(Mi(H)))}).finally(()=>{N.current&&j===U.current&&(E(!1),V.current=!1)}),()=>{N.current=!1,U.current++}},[]);const te=(j,H)=>{d(me=>({...me,[j]:H})),g(null)},ne=async j=>{if(!(V.current||!r&&j!=="reload")){V.current=!0,E(!0),D(!1),j==="check"&&g(null);try{if(j==="save"||j==="check"){if(!r)return;const H=pv(o,r.config);if(j==="save"){const me=await tl("",{history:H,expectedConfigurationRevision:r.configurationRevision});N.current&&(M(Io(me)),O("Historie-Einstellungen gespeichert. Der Betriebsstatus zeigt Lese- und Schreibvorgänge getrennt."))}else{const me=await tl("/check",{history:H});N.current&&(g(mv(me)),O("Verbindungsprüfung abgeschlossen. Der Entwurf wurde nicht gespeichert; Schreibrechte wurden nicht geprüft."))}}else{const H=Io(await tl());N.current&&(j==="reload"?(M(H),O("Gespeicherter Stand neu geladen.")):(h(H.status),x(H.config.postgresql.provisioned),O("Betriebsstatus aktualisiert. Der Entwurf bleibt unverändert.")))}}catch(H){N.current&&(D(!0),O(Mi(H)))}finally{N.current&&(V.current=!1,E(!1))}}},xe=o.provider==="influxdb2",Ee=o.provider==="postgresql",ee=Ee&&r?.config.provider!=="postgresql",be=r!==null&&yh(r.config),z=ee&&!o.newInstallation,ae=kn()??"";return s.jsx(Gn,{title:"Historie einrichten",subtitle:"Bestehende Historie weiterverwenden oder eine neue EOS-Anlage mit lokaler PostgreSQL-Datenbank einrichten. Einrichtung durch Installer oder Admin.",children:s.jsxs("form",{className:"nw-history-setup",onSubmit:j=>{j.preventDefault(),ne("save")},children:[s.jsxs("section",{className:"nw-card",children:[s.jsx("h2",{children:"Datenquelle"}),s.jsxs("fieldset",{disabled:S||!r,className:"nw-history-fields",children:[s.jsxs("label",{className:"nw-history-field",htmlFor:"historyProvider",children:["Historie-Anbindung",s.jsxs("select",{id:"historyProvider",className:"nw-input",value:o.provider,onChange:j=>{const H=j.target.value;(H==="adapter"||H==="influxdb2"||H==="postgresql")&&te("provider",H)},children:[s.jsx("option",{value:"adapter",children:"Vorhandener ioBroker-Historieadapter"}),s.jsx("option",{value:"influxdb2",children:"InfluxDB 2 direkt"}),s.jsx("option",{value:"postgresql",disabled:!be&&r?.config.provider!=="postgresql",children:"PostgreSQL lokal · neue EOS-Anlage"})]})]}),be&&!Ee?s.jsxs("div",{className:"nw-history-new-installation",children:[s.jsx("p",{className:"nw-history-note",children:"Für eine neue Anlage verwendet EOS die geschützte lokale PostgreSQL-Datenbank. Eine bestehende InfluxDB-Historie wird beim Update nicht umgestellt."}),s.jsx("button",{className:"nw-button",type:"button",onClick:()=>{d(j=>({...j,provider:"postgresql",newInstallation:!0})),g(null)},children:"Neue Anlage mit PostgreSQL einrichten"})]}):null,xe?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"nw-history-note",children:"EOS verbindet sich direkt mit einem bestehenden InfluxDB-2-Server. Die Einrichtung verändert keinen ioBroker-InfluxDB-Adapter und erstellt oder löscht keine Datenbank."}),s.jsxs("div",{className:"nw-history-grid",children:[s.jsxs("label",{className:"nw-history-field nw-history-wide",htmlFor:"historyUrl",children:["Serveradresse mit Port",s.jsx("input",{id:"historyUrl",className:"nw-input",type:"url",required:!0,maxLength:2048,value:o.url,onChange:j=>te("url",j.target.value),placeholder:"https://influx.example:8086",autoComplete:"off"})]}),s.jsxs("label",{className:"nw-history-field",htmlFor:"historyOrganization",children:["Organisation",s.jsx("input",{id:"historyOrganization",className:"nw-input",required:!0,maxLength:256,value:o.organization,onChange:j=>te("organization",j.target.value),autoComplete:"off"})]}),s.jsxs("label",{className:"nw-history-field",htmlFor:"historyBucket",children:["Bucket",s.jsx("input",{id:"historyBucket",className:"nw-input",required:!0,maxLength:256,value:o.bucket,onChange:j=>te("bucket",j.target.value),autoComplete:"off"})]}),s.jsxs("label",{className:"nw-history-field nw-history-wide",htmlFor:"historyToken",children:["InfluxDB-Token",s.jsx("input",{id:"historyToken",className:"nw-input",type:"password",autoComplete:"new-password",maxLength:8192,value:o.token,onChange:j=>te("token",j.target.value),placeholder:r?.config.influxdb2.hasToken?"Token gespeichert – leer lassen zum Beibehalten":"Token mit Zugriff auf diesen Bucket eintragen"}),s.jsx("small",{children:"Der gespeicherte Token wird nicht angezeigt. Bei einem anderen Server oder Port muss ein Token neu eingegeben werden."})]})]}),s.jsxs("details",{className:"nw-history-tls",children:[s.jsx("summary",{children:"Zertifikat und Verschlüsselung"}),s.jsx("p",{children:"Bei HTTPS wird das Serverzertifikat immer geprüft. Bei HTTP werden Token und Daten unverschlüsselt übertragen; dafür ein entsprechend geschütztes lokales Netz verwenden."}),s.jsxs("label",{className:"nw-history-field",htmlFor:"historyCa",children:["Eigenes CA-Zertifikat (optional, PEM)",s.jsx("textarea",{id:"historyCa",className:"nw-input",rows:5,maxLength:65536,spellCheck:!1,value:o.caCertificate,onChange:j=>te("caCertificate",j.target.value),placeholder:r?.config.influxdb2.hasCaCertificate?"CA-Zertifikat gespeichert – leer lassen zum Beibehalten":"-----BEGIN CERTIFICATE-----"}),s.jsx("small",{children:"Nur das öffentliche CA-Zertifikat eintragen, keinen privaten Schlüssel. Ohne eigenes CA-Zertifikat gelten die vertrauenswürdigen Zertifikatsstellen des Systems."})]}),s.jsxs("label",{className:"nw-history-checkbox",children:[s.jsx("input",{id:"historyClearCa",type:"checkbox",checked:o.clearCaCertificate,onChange:j=>te("clearCaCertificate",j.target.checked)}),"Gespeichertes eigenes CA-Zertifikat entfernen"]})]})]}):Ee?s.jsxs("section",{"aria-label":"Geschützte PostgreSQL-Umgebung",children:[s.jsx("h3",{children:"Lokale EOS-Datenbank"}),s.jsx("p",{className:"nw-history-note",children:"Die Verbindung ist auf das lokale Gerät begrenzt und verwendet TLS mit Zertifikatsprüfung. Dienstkonto, Zugänge und Zertifikate verwaltet das EOS-Systemsetup."}),s.jsx("p",{role:"status",className:p?"nw-status":"nw-history-warning",children:p?"Geschütztes Verbindungsprofil vorhanden. Den Datenbankzugriff mit „Verbindung prüfen“ prüfen.":"Systemeinrichtung erforderlich: Ein Installer muss zuerst die geschützte PostgreSQL-Umgebung mit dem EOS-Systemsetup bereitstellen. Danach „Status aktualisieren“ und „Verbindung prüfen“ wählen."}),ee?s.jsxs("label",{className:"nw-history-checkbox",children:[s.jsx("input",{id:"historyNewInstallation",type:"checkbox",checked:o.newInstallation,disabled:!be,onChange:j=>te("newInstallation",j.target.checked)}),"Diese Installation ausdrücklich als Neuanlage einrichten. Es wird keine bestehende Historie übernommen oder umgestellt."]}):null,s.jsx("p",{className:"nw-history-note",children:"Die Auswahl wird erst durch „Speichern“ übernommen. Der Verbindungstest installiert keinen Datenbankdienst und ändert keine Systemrechte."})]}):s.jsxs("label",{className:"nw-history-field",htmlFor:"historyInstance",children:["ioBroker-Historieinstanz",s.jsx("input",{id:"historyInstance",className:"nw-input",value:o.instance,maxLength:256,onChange:j=>te("instance",j.target.value),placeholder:"Zum Beispiel influxdb.0",autoComplete:"off"}),s.jsx("small",{children:"Die bestehende Historie-Anbindung bleibt bis zum ausdrücklichen Speichern erhalten. Die Konfiguration des anderen Adapters wird hier nicht geändert."})]})]}),s.jsxs("div",{className:"nw-actions-row",children:[s.jsx("button",{className:"nw-button nw-button--primary",type:"submit",disabled:S||!r||z,children:"Speichern"}),xe||Ee?s.jsx("button",{className:"nw-button",type:"button",disabled:S||!r||z,onClick:()=>{ne("check")},children:"Verbindung prüfen"}):null,s.jsx("button",{className:"nw-button",type:"button",disabled:S,onClick:()=>{ne("reload")},children:r?"Entwurf verwerfen & neu laden":"Erneut laden"})]}),s.jsx("p",{role:"status","aria-live":"polite",className:`nw-status ${P?"nw-status--bad":""}`,children:S?"Bitte warten…":C}),xe||Ee?s.jsxs("section",{className:"nw-history-check","aria-label":"Verbindungsprüfung des Entwurfs",children:[s.jsx("h3",{children:"Verbindungsprüfung des Entwurfs"}),s.jsxs("div",{className:"nw-history-check-grid",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Erreichbarkeit"}),s.jsx("strong",{children:m?m.reachable?"Bestätigt":"Nicht bestätigt":"Noch nicht geprüft"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Lesezugriff"}),s.jsx("strong",{children:m?m.readable?"Bestätigt":"Nicht bestätigt":"Noch nicht geprüft"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Schreibzugriff"}),s.jsx("strong",{children:"Nicht durch diesen Test geprüft"})]})]}),s.jsx("p",{className:"nw-history-note",children:"Die Prüfung liest ausschließlich. Ein erfolgreicher Test bestätigt weder Schreibrechte noch die Speicherung von Messwerten."})]}):null]}),s.jsxs("section",{className:"nw-card","aria-label":"Gespeicherte Historie im Betrieb",children:[s.jsxs("div",{className:"nw-history-heading",children:[s.jsx("h2",{children:"Gespeicherte Historie im Betrieb"}),s.jsx("button",{className:"nw-button",type:"button",disabled:S||!r,onClick:()=>{ne("status")},children:"Status aktualisieren"})]}),s.jsxs("dl",{className:"nw-history-runtime",children:[s.jsxs("div",{children:[s.jsx("dt",{children:"Aktive Anbindung"}),s.jsx("dd",{children:c?hv(c.provider):"Unbekannt"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Verbindungszustand"}),s.jsx("dd",{children:gv(c)})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Letzter bestätigter Lesezugriff"}),s.jsxs("dd",{children:[Df(c?.lastReadAt??null),c?.readError?s.jsx("small",{className:"nw-history-failure",children:Mi({code:c.readError})}):null]})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Letzter bestätigter Schreibzugriff"}),s.jsxs("dd",{children:[c?.writeVerified===!0?Df(c.lastWriteAt):"Noch nicht bestätigt",c?.writeError?s.jsx("small",{className:"nw-history-failure",children:Mi({code:c.writeError})}):null]})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Messwerte in Warteschlange"}),s.jsx("dd",{children:c?.queueDepth??"Unbekannt"})]}),s.jsxs("div",{children:[s.jsx("dt",{children:"Verworfene Messwerte"}),s.jsx("dd",{children:c?.droppedPoints??"Unbekannt"})]})]}),c?.lastError&&c.lastError!==c.readError&&c.lastError!==c.writeError?s.jsx("p",{className:"nw-status nw-status--bad",children:Mi({code:c.lastError})}):null,c?.provider==="influxdb2"&&(c.legacyRecordingCount??0)>0?s.jsxs("p",{className:"nw-history-warning",role:"status",children:["Für ",c.legacyRecordingCount," EOS-Datenpunkte ist im bisherigen ioBroker-InfluxDB-Adapter noch eine Aufzeichnung eingerichtet. Ziel-Bucket und Betriebsstatus dieses Adapters prüfen. Bei demselben Bucket die bisherige Aufzeichnung dieser Datenpunkte gezielt deaktivieren, damit Messwerte nicht doppelt geschrieben werden. EOS ändert diese Einstellungen nicht automatisch."]}):null,s.jsx("p",{className:"nw-history-note",children:"Der Status gehört zur gespeicherten Verbindung. „Eingerichtet“ bestätigt keine Schreibrechte. Reguläre EOS-Verlaufswerte werden standardmäßig im 10-Minuten-Raster geschrieben; ohne frische Messwerte entsteht kein bestätigter Schreibzugriff. Ein Anbieterwechsel kopiert keine alten Daten und stellt gelöschte Daten nicht wieder her."}),s.jsxs("div",{className:"nw-actions-row",children:[s.jsx("a",{className:"nw-button",href:`${ae}/history.html`,children:"Historie öffnen"}),s.jsx("a",{className:"nw-button",href:`${ae}/ems-apps.html`,children:"EMS App-Center öffnen"})]})]})]})})}const yv=r=>typeof r=="string"&&r.length>0&&r.length<=512&&r===r.trim()&&!/[\x00-\x1f\x7f]/.test(r);function xv({currentId:r="",mode:l="read",signal:o}={}){return new Promise((d,c)=>{if(o?.aborted){c(new DOMException("Auswahl abgebrochen.","AbortError"));return}const h=Array.from(crypto.getRandomValues(new Uint8Array(16)),M=>M.toString(16).padStart(2,"0")).join(""),m=window.location.origin,g=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1";let p=g?window.parent:null,x=null,S=!1,E=!1,C,O;const P=()=>{try{p?.postMessage({type:"nw:dp-picker-cancel",requestId:h},m)}catch{}},D=(M,te)=>{if(!S){S=!0,clearTimeout(O),clearInterval(C),window.removeEventListener("message",U),window.removeEventListener("pagehide",N),o?.removeEventListener("abort",N),(te||M===null)&&P();try{x&&!x.closed&&x.close()}catch{}te?c(te):d(M)}},N=()=>D(null,new DOMException("Auswahl abgebrochen.","AbortError")),V=()=>{if(!(E||!p||S)){E=!0;try{p.postMessage({type:"nw:dp-picker-open",requestId:h,currentId:r.slice(0,512),mode:l},m)}catch{D(null,new Error("Datenpunktauswahl konnte nicht geöffnet werden."))}}};function U(M){if(!(S||M.origin!==m||M.source!==p||!En(M.data)||!it(M.data)||M.data.requestId!==h)){if(M.data.type==="nw:dp-picker-ready"&&x){V();return}M.data.type==="nw:dp-picker-opened"&&E&&(clearTimeout(O),O=setTimeout(()=>D(null,new Error("Datenpunktauswahl beendet. Bitte erneut öffnen.")),3e5)),M.data.type==="nw:dp-picker-result"&&E&&(M.data.id===null?D(null):yv(M.data.id)&&D(M.data.id))}}if(window.addEventListener("message",U),window.addEventListener("pagehide",N),o?.addEventListener("abort",N,{once:!0}),O=setTimeout(()=>D(null,new Error("Datenpunktauswahl nicht erreichbar. Bitte Anmeldung prüfen und erneut öffnen.")),15e3),g)V();else{const M=new URL(`${kn()??""}/ems-apps.html`,m);M.searchParams.set("nwAdmin","1"),M.searchParams.set("dpPicker","1"),M.searchParams.set("requestId",h);try{x=window.open(M.toString(),`nw-dp-picker-${h}`,"popup,width=1050,height=760")}catch{D(null,new Error("Bitte das Fenster zur Datenpunktauswahl im Browser zulassen."));return}if(p=x,!x){D(null,new Error("Bitte das Fenster zur Datenpunktauswahl im Browser zulassen."));return}C=setInterval(()=>{x?.closed&&D(null)},400)}})}const xh=v.createContext({revision:0,blocked:!1});function Qt({label:r,value:l="",onChange:o,required:d=!1,help:c="",maxLength:h=512,mode:m="read",disabled:g=!1}){const p=v.useId(),x=v.useContext(xh),[S,E]=v.useState(!1),[C,O]=v.useState(""),P=v.useRef(null),D=v.useRef({context:x,value:l,onChange:o,disabled:g});D.current={context:x,value:l,onChange:o,disabled:g},v.useLayoutEffect(()=>(P.current?.abort(),P.current=null,E(!1),()=>{P.current?.abort(),P.current=null}),[x.revision,x.blocked,l,g]);async function N(){if(g||x.blocked)return;P.current?.abort();const V=new AbortController,U={context:x,value:l};P.current=V,E(!0),O("");try{const M=await xv({currentId:typeof l=="string"?l:"",mode:m,signal:V.signal});M!==null&&!V.signal.aborted&&P.current===V&&D.current.context.revision===U.context.revision&&!D.current.context.blocked&&D.current.value===U.value&&!D.current.disabled&&D.current.onChange(M)}catch(M){!(M instanceof Error&&M.name==="AbortError")&&!V.signal.aborted&&O(M instanceof Error?M.message:"Datenpunkt konnte nicht gewählt werden.")}finally{P.current===V&&(P.current=null,E(!1))}}return s.jsxs("div",{className:"nw-nvp-field nw-config-field","data-dp-field":"true",children:[s.jsx("label",{htmlFor:p,className:"nw-config-label",children:r}),s.jsxs("div",{className:"nw-dp-field-controls",style:{display:"flex",gap:8,alignItems:"stretch",minWidth:0},children:[s.jsx("input",{id:p,className:"nw-input nw-config-input",style:{minWidth:0,flex:1},value:l??"",required:d,maxLength:h,disabled:g||x.blocked,onChange:V=>o(V.target.value)}),s.jsx("button",{type:"button",className:"nw-button nw-config-btn nw-config-btn--ghost","data-dp-pick":"true","aria-label":`Datenpunkt auswählen: ${r}`,disabled:g||x.blocked||S,onClick:N,children:S?"Auswahl offen…":"DP wählen"})]}),c&&s.jsx("small",{children:c}),C&&s.jsx("small",{role:"alert",children:C})]})}const nu=r=>{const l=Object.create(null);for(const[o,d]of Object.entries(r))l[o]=d;return Object.freeze(l)},Wo=nu({selfConsumption:"Eigenverbrauchsoptimierung (EVO)",zeroExport:"Nulleinspeisung",peakShaving:"Lastspitzenkappung",arbitrage:"Arbitrage",tariff:"Tarifgeführter Betrieb"}),pl=nu({M0:"M0 · Gesamtanschluss",M1:"M1 · lokaler Bereich"}),$r=()=>({stateId:"",unit:"W",sign:1,maxAgeMs:5e3}),zf=r=>({id:r,source:r==="M0"?"general":"mapped",...r==="M1"?{measurement:$r()}:{},importLimitW:null,exportLimitW:null,importReserveW:0,exportReserveW:0}),Lf=()=>({schemaVersion:1,configVersion:1,maxSkewMs:1e3,points:[zf("M0"),zf("M1")],storages:[],pvAssignments:[]}),ml=()=>({stateId:"",scale:1,sign:1}),Sv=()=>({id:"",name:"",connectionPointId:"",controlPointId:"",dispatchGroupId:"",primaryPurpose:"selfConsumption",authority:"eos",powerMeasurement:$r(),socMeasurement:{stateId:"",scale:1,maxAgeMs:5e3},maxChargeW:"",maxDischargeW:"",minSoc:10,maxSoc:90,maxDeltaWPerSec:"",configuredToleranceW:100,commandTimeoutMs:5e3,strategy:{targetGridImportW:50,importThresholdW:20},command:{mode:"signedTarget",signedTarget:ml()}}),kv=()=>({id:"",connectionPointId:"",referencePowerW:"",powerMeasurement:$r(),command:{stateId:"",unit:"W",scale:1}}),ar=r=>typeof r=="number"&&Number.isFinite(r)?`${(r/1e3).toLocaleString("de-DE",{maximumFractionDigits:2})} kW`:"—",Bo=r=>typeof r=="string"?r:r?.message||r?.reason||r?.code||"Unbekannter Prüfhinweis",ru=(r,l,o)=>{const d={...r};return o?d[l]=o:delete d[l],d};function He({label:r,value:l,onChange:o,min:d=0,max:c,required:h=!0,unit:m="",help:g=""}){return s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsxs("span",{className:"nw-config-label",children:[r,m?` (${m})`:""]}),s.jsx("input",{className:"nw-input nw-config-input",type:"number",min:d,max:c,step:"any",required:h,value:l??"",onChange:p=>o(p.target.value===""?"":Number(p.target.value))}),g&&s.jsx("small",{children:g})]})}function sl({label:r,value:l,onChange:o,required:d=!1,help:c="",maxLength:h=256}){return s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:r}),s.jsx("input",{className:"nw-input nw-config-input",value:l??"",required:d,maxLength:h,onChange:m=>o(m.target.value)}),c&&s.jsx("small",{children:c})]})}function Ot({label:r,value:l,onChange:o,options:d,required:c=!0,placeholder:h=!1}){return s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:r}),s.jsxs("select",{className:"nw-input nw-config-select",value:l??"",required:c,onChange:m=>o(m.target.value),children:[h&&s.jsx("option",{value:"",children:"Bitte ausdrücklich zuordnen"}),Object.entries(d).map(([m,g])=>s.jsx("option",{value:m,children:String(g)},m))]})]})}function Wr({value:r,onChange:l,label:o="Istleistung · Datenpunkt",storage:d=!1,positiveOnly:c=!1}){const h=r||$r(),m=(g,p)=>l({...h,[g]:p});return s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{label:o,value:h.stateId,onChange:g=>m("stateId",g),required:!0,help:d?"AC-Wirkung der Batterie. PV und Batterie benötigen getrennte Istwerte.":"Vollständige Datenpunktkennung."}),s.jsx(Ot,{label:"Einheit des Messwerts",value:h.unit,onChange:g=>m("unit",g),options:{W:"Watt (W)",kW:"Kilowatt (kW)"}}),s.jsx(Ot,{label:"Vorzeichen der Messung",value:h.sign,onChange:g=>m("sign",Number(g)),options:c?{1:"Positiver Betrag"}:d?{1:"Positiv = Entladen","-1":"Positiv = Laden"}:{1:"Rohwert unverändert","-1":"Rohwert umkehren"}}),s.jsx(He,{label:"Höchstens zulässiges Messwertalter",unit:"ms",min:1,value:h.maxAgeMs,onChange:g=>m("maxAgeMs",g)})]})}function Ev({rootSource:r}){const l=r?.measurement,o=l?.kind==="split"?[["Netzbezug",l.importMeasurement],["Netzeinspeisung",l.exportMeasurement]]:[["Signierte Netzleistung",l]];return s.jsxs("div",{className:"nw-dynamic-root-source",children:[s.jsx("h3",{children:"M0-Messung aus Allgemein"}),s.jsx("p",{children:"Verknüpfte Quelle, hier schreibgeschützt. M0 erfasst den Gesamtanschluss einschließlich M1."}),s.jsx("dl",{className:"nw-dynamic-readout",children:o.map(([d,c])=>s.jsxs(Ff.Fragment,{children:[s.jsx("dt",{children:d}),s.jsxs("dd",{children:[s.jsx("code",{children:c?.stateId||"Noch nicht zugeordnet"}),c?.stateId&&s.jsxs("small",{children:[c.unit||"Einheit nicht bestätigt"," · Vorzeichen ",c.sign===-1?"umgekehrt":"unverändert"," · Alter maximal ",c.maxAgeMs??l?.maxAgeMs??"—"," ms"]})]})]},d))}),r?.valid===!1&&s.jsx("p",{className:"nw-nvp-notice",children:r.reason||"M0 muss zuerst unter Allgemein vollständig zugeordnet werden."}),l?.kind==="split"&&s.jsxs("p",{children:["Gemeinsames Vorzeichen: ",l.sign===-1?"Bezug minus Einspeisung wird umgekehrt":"Bezug minus Einspeisung","."]}),s.jsx("a",{className:"nw-link-button nw-config-btn",href:`${kn()??""}/ems-apps.html?nwAdmin=1&tab=mapping`,target:typeof window<"u"&&window.parent!==window?"_parent":"_self",children:"Zuordnung → Allgemein öffnen"})]})}function bv({value:r,onChange:l,rootSource:o=null}){const d=(h,m)=>l({...r,[h]:m}),c=r.id==="M1";return s.jsxs("section",{className:"nw-card nw-config-card nw-nvp-point","aria-label":`${r.id} einrichten`,children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h2",{className:"nw-config-card__title",children:pl[r.id]}),s.jsx("span",{className:"nw-nvp-tag",children:c?"Innerhalb von M0":"Gesamtanschluss"})]}),c?s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"M1 misst ausschließlich den lokalen Bereich. Netzbezug ist positiv, Einspeisung negativ."}),s.jsx(Wr,{label:"M1-Nettoleistung · Datenpunkt",value:r.measurement,onChange:h=>d("measurement",h)})]}):s.jsx(Ev,{rootSource:o}),s.jsx("h3",{children:"Anschlussgrenzen und feste Reserven"}),s.jsx("p",{children:"Die Betriebsgrenze ergibt sich aus Anschlussgrenze minus Reserve. 0 W ist eine wirksame Grenze."}),s.jsx("div",{className:"nw-nvp-grid",children:["import","export"].map(h=>{const m=`${h}LimitW`,g=`${h}ReserveW`,p=h==="import"?"Bezug":"Einspeisung",x=c&&r[m]===null,S=r[m],E=r[g];return s.jsxs("div",{className:"nw-nvp-limit",children:[c&&s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:!x,onChange:C=>l({...r,[m]:C.target.checked?"":null,[g]:C.target.checked?r[g]:0})})," ",p," lokal begrenzen"]}),x?s.jsxs("p",{children:[p,": ausdrücklich keine lokale Vertragsgrenze. M0 bleibt wirksam."]}):s.jsxs(s.Fragment,{children:[s.jsx(He,{label:`${p} · Anschlussgrenze`,unit:"W",value:r[m],onChange:C=>d(m,C)}),s.jsx(He,{label:`${p} · feste Reserve`,unit:"W",value:r[g],onChange:C=>d(g,C)}),s.jsxs("p",{className:"nw-text-muted",children:["Betriebsgrenze: ",typeof S=="number"&&typeof E=="number"?`${S-E} W`:"noch nicht festgelegt"]})]})]},h)})})]})}function gl({label:r,value:l,onChange:o}){const d=typeof l=="number"||l==="";return s.jsxs("div",{className:"nw-dynamic-scalar",children:[s.jsx(Ot,{label:`${r} · Datentyp`,value:d?"number":"boolean",onChange:c=>o(c==="number"?0:!1),options:{boolean:"Boolean",number:"Zahl"}}),d?s.jsx(He,{label:r,min:-Number.MAX_SAFE_INTEGER,value:typeof l=="number"||l===""?l:void 0,onChange:o}):s.jsx(Ot,{label:r,value:String(l===!0),onChange:c=>o(c==="true"),options:{true:"true",false:"false"}})]})}function Fi({label:r,value:l,onChange:o,signed:d=!1}){const c=l||ml(),h=(m,g)=>o({...c,[m]:g});return s.jsxs("div",{className:"nw-dynamic-subsection",children:[s.jsx("h4",{children:r}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{mode:"write",label:`${r} · Schreib-Datenpunkt`,value:c.stateId,onChange:m=>h("stateId",m),required:!0}),s.jsx(He,{label:`${r} · W je Rohwert`,min:1e-6,value:c.scale,onChange:m=>h("scale",m),help:"1 für W; 1000 für kW. Der Sollwert in W wird durch diesen Faktor geteilt."}),d&&s.jsx(Ot,{label:"Vorzeichen des Sollwerts",value:c.sign,onChange:m=>h("sign",Number(m)),options:{1:"Positiv = Entladen","-1":"Positiv = Laden"}}),s.jsx(Qt,{label:`${r} · Rücklese-Datenpunkt (optional)`,value:c.readbackStateId,onChange:m=>o(ru(c,"readbackStateId",m)),help:"Rückgelesener Sollwert ist getrennt von der gemessenen Leistung."})]})]})}function jv({label:r,value:l,onChange:o}){const d=(c,h)=>o({...l,[c]:h});return s.jsxs("div",{className:"nw-dynamic-subsection",children:[s.jsx("h4",{children:r}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{mode:"write",label:`${r} · Schreib-Datenpunkt`,value:l.stateId,onChange:c=>d("stateId",c),required:!0}),s.jsx(Qt,{label:`${r} · Rücklese-Datenpunkt (optional)`,value:l.readbackStateId,onChange:c=>o(ru(l,"readbackStateId",c))}),s.jsx(gl,{label:`${r} · Ein-Wert`,value:l.onValue,onChange:c=>d("onValue",c)}),s.jsx(gl,{label:`${r} · Aus-Wert`,value:l.offValue,onChange:c=>d("offValue",c)})]})]})}function Nv({value:r,onChange:l,onRemove:o}){const d=(p,x)=>l({...r,[p]:x}),c=r.command||{mode:"signedTarget",signedTarget:ml()},h=(p,x)=>d("command",{...c,[p]:x}),m=(p,x)=>d("strategy",{...r.strategy,[p]:x}),g=p=>{const x={...c,mode:p};["signedTarget","chargeTarget","dischargeTarget","maxCharge","maxDischarge","appliedMaxCharge","appliedMaxDischarge","watchdog"].forEach(E=>delete x[E]),(p==="signedTarget"?["signedTarget"]:p==="splitTarget"?["chargeTarget","dischargeTarget"]:["maxCharge","maxDischarge"]).forEach(E=>{x[E]=c[E]||ml()}),p==="externalLimits"&&(x.appliedMaxCharge=c.appliedMaxCharge||$r(),x.appliedMaxDischarge=c.appliedMaxDischarge||$r(),x.watchdog=c.watchdog||{stateId:"",ttlMs:5e3,writeValue:!0,readbackStateId:"",expiryBehavior:"zeroLimits"}),d("command",x)};return s.jsxs("article",{className:"nw-nvp-device",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h3",{children:r.name||r.id||"Neuer Speicher"}),s.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:o,children:"Speicher entfernen"})]}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(sl,{label:"Speicherkennung",value:r.id,onChange:p=>d("id",p),required:!0,help:"Eindeutige freie Kennung dieser App; keine bestehende Farm-Zuordnung erforderlich."}),s.jsx(sl,{label:"Speichername",value:r.name,onChange:p=>d("name",p)}),s.jsx(Ot,{label:"Physischer Anschlussbereich",value:r.connectionPointId,onChange:p=>d("connectionPointId",p),options:pl,placeholder:!0}),s.jsx(Ot,{label:"Regelmesspunkt",value:r.controlPointId,onChange:p=>d("controlPointId",p),options:pl,placeholder:!0}),s.jsx(sl,{label:"Regel-/Dispatchgruppe",value:r.dispatchGroupId,onChange:p=>d("dispatchGroupId",p),required:!0,help:"Gemeinsame Gruppe nur bei gleichem Bereich, gleicher Aufgabe, Strategie und Hoheit."}),s.jsx(Ot,{label:"Betriebsaufgabe",value:r.primaryPurpose,onChange:p=>d("primaryPurpose",p),options:Wo}),s.jsx(Ot,{label:"Stellhoheit",value:r.authority,onChange:p=>d("authority",p),options:{eos:"EOS gibt Leistungsziele vor",external:"Externer Regler innerhalb EOS-Grenzen"}})]}),s.jsxs("p",{className:"nw-nvp-info",children:["Wirksame Anschlussgrenzen: ",r.connectionPointId==="M1"?"M1 und M0":r.connectionPointId==="M0"?"M0":"noch nicht zugeordnet","."]}),s.jsx("h4",{children:"Istwerte und Verfügbarkeit"}),s.jsx(Wr,{storage:!0,label:"Batterie-Istleistung · Datenpunkt",value:r.powerMeasurement,onChange:p=>d("powerMeasurement",p)}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{label:"SoC · Datenpunkt",value:r.socMeasurement?.stateId,onChange:p=>d("socMeasurement",{...r.socMeasurement,stateId:p}),required:!0}),s.jsx(He,{label:"SoC · Prozentpunkte je Rohwert",min:1e-6,value:r.socMeasurement?.scale,onChange:p=>d("socMeasurement",{...r.socMeasurement,scale:p})}),s.jsx(He,{label:"SoC · Höchstalter",unit:"ms",min:1,value:r.socMeasurement?.maxAgeMs,onChange:p=>d("socMeasurement",{...r.socMeasurement,maxAgeMs:p})})]}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:!!r.availability,onChange:p=>{const x={...r};p.target.checked?x.availability={stateId:"",availableValue:!0,maxAgeMs:5e3}:delete x.availability,l(x)}})," Zusätzliches Verfügbarkeitssignal verwenden"]}),r.availability&&s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{label:"Verfügbarkeit · Datenpunkt",value:r.availability.stateId,onChange:p=>d("availability",{...r.availability,stateId:p}),required:!0}),s.jsx(gl,{label:"Verfügbar-Wert",value:r.availability.availableValue,onChange:p=>d("availability",{...r.availability,availableValue:p})}),s.jsx(He,{label:"Verfügbarkeit · Höchstalter",unit:"ms",min:1,value:r.availability.maxAgeMs,onChange:p=>d("availability",{...r.availability,maxAgeMs:p})})]}),s.jsx("h4",{children:"Leistungs-, SoC- und Änderungsgrenzen"}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(He,{label:"Maximale Ladeleistung",unit:"W",value:r.maxChargeW,onChange:p=>d("maxChargeW",p)}),s.jsx(He,{label:"Maximale Entladeleistung",unit:"W",value:r.maxDischargeW,onChange:p=>d("maxDischargeW",p)}),s.jsx(He,{label:"Untergrenze SoC",unit:"%",max:100,value:r.minSoc,onChange:p=>d("minSoc",p)}),s.jsx(He,{label:"Obergrenze SoC",unit:"%",max:100,value:r.maxSoc,onChange:p=>d("maxSoc",p)}),s.jsx(He,{label:"Höchste Leistungsänderung",unit:"W/s",min:1,value:r.maxDeltaWPerSec,onChange:p=>d("maxDeltaWPerSec",p)}),s.jsx(He,{label:"Bestätigungstoleranz",unit:"W",value:r.configuredToleranceW,onChange:p=>d("configuredToleranceW",p)}),s.jsx(He,{label:"Bestätigungsfrist",unit:"ms",min:1,value:r.commandTimeoutMs,onChange:p=>d("commandTimeoutMs",p)})]}),s.jsxs("h4",{children:["Strategie für ",Wo[r.primaryPurpose||""]]}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(He,{label:"Ziel-Netzbezug",unit:"W",value:r.strategy?.targetGridImportW,onChange:p=>m("targetGridImportW",p)}),s.jsx(He,{label:"Bezugsschwelle / Toleranz",unit:"W",value:r.strategy?.importThresholdW,onChange:p=>m("importThresholdW",p)}),r.primaryPurpose==="peakShaving"&&s.jsx(He,{label:"Lastspitzengrenze",unit:"W",value:r.strategy?.peakLimitW,onChange:p=>m("peakLimitW",p)})]}),r.primaryPurpose==="arbitrage"&&r.authority==="eos"&&s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Ein extern berechneter Leistungswunsch wird von EOS innerhalb der Anschluss- und Speichergrenzen umgesetzt."}),s.jsx(Wr,{storage:!0,label:"Arbitrage-Leistungswunsch · Datenpunkt",value:r.requestPowerMeasurement,onChange:p=>d("requestPowerMeasurement",p)})]}),r.primaryPurpose==="tariff"&&s.jsx("p",{className:"nw-nvp-info",children:"Der aktive Tarifbetrieb nutzt das zentrale Preissignal. Anschluss- und SoC-Grenzen gelten auch bei günstigen Preisen."}),s.jsx("h4",{children:"Generische Geräteschnittstelle"}),s.jsx(Ot,{label:"Befehlsschnittstelle",value:c.mode,onChange:g,options:{signedTarget:"Signierter Leistungs-Sollwert",splitTarget:"Getrennte Lade-/Entlade-Sollwerte",externalLimits:"Maximale Lade-/Entladefreigaben für externen Regler"}}),c.mode==="signedTarget"&&s.jsx(Fi,{signed:!0,label:"Leistungssollwert",value:c.signedTarget,onChange:p=>h("signedTarget",p)}),c.mode==="splitTarget"&&s.jsxs(s.Fragment,{children:[s.jsx(Fi,{label:"Ladesollwert",value:c.chargeTarget,onChange:p=>h("chargeTarget",p)}),s.jsx(Fi,{label:"Entladesollwert",value:c.dischargeTarget,onChange:p=>h("dischargeTarget",p)}),s.jsx("p",{children:"Richtungswechsel erfolgen erst nach bestätigter Neutralisierung des bisherigen Sollwerts."})]}),c.mode==="externalLimits"&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"nw-nvp-notice",children:"Externe Stellhoheit ist für Arbitrage vorgesehen. EOS erteilt maximale Lade-/Entladefreigaben, keine Leistungsziele. Wirksame Grenzrücklesung und geräteseitiger Ablauf sind erforderlich."}),s.jsx(Fi,{label:"Maximale Ladefreigabe",value:c.maxCharge,onChange:p=>h("maxCharge",p)}),s.jsx(Fi,{label:"Maximale Entladefreigabe",value:c.maxDischarge,onChange:p=>h("maxDischarge",p)}),s.jsx(Wr,{positiveOnly:!0,label:"Angewandte Ladegrenze · Datenpunkt",value:c.appliedMaxCharge,onChange:p=>h("appliedMaxCharge",p)}),s.jsx(Wr,{positiveOnly:!0,label:"Angewandte Entladegrenze · Datenpunkt",value:c.appliedMaxDischarge,onChange:p=>h("appliedMaxDischarge",p)}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{mode:"write",label:"Watchdog · Schreib-Datenpunkt",value:c.watchdog?.stateId,onChange:p=>h("watchdog",{...c.watchdog,stateId:p}),required:!0}),s.jsx(Qt,{label:"Watchdog · Rücklese-Datenpunkt",value:c.watchdog?.readbackStateId,onChange:p=>h("watchdog",{...c.watchdog,readbackStateId:p}),required:!0}),s.jsx(He,{label:"Geräteseitige Ablaufzeit",unit:"ms",min:1,value:c.watchdog?.ttlMs,onChange:p=>h("watchdog",{...c.watchdog,ttlMs:p})}),s.jsx(gl,{label:"Watchdog · Schreibwert",value:c.watchdog?.writeValue,onChange:p=>h("watchdog",{...c.watchdog,writeValue:p})})]}),s.jsx("p",{children:"Konfigurierter Gerätevertrag: Nach Ablauf setzt das Gerät seine externen Maximalfreigaben auf 0. Diese Funktion muss im Gerät eingerichtet sein."})]}),s.jsxs("details",{children:[s.jsx("summary",{children:"Optionale Betriebs- und Richtungsfreigaben"}),[["run","Betriebsfreigabe"],["chargeEnable","Ladefreigabe"],["dischargeEnable","Entladefreigabe"]].map(([p,x])=>s.jsxs("div",{children:[s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:!!c[p],onChange:S=>{const E={...c};S.target.checked?E[p]={stateId:"",onValue:!0,offValue:!1}:delete E[p],d("command",E)}})," ",x," zuordnen"]}),c[p]&&s.jsx(jv,{label:x,value:c[p],onChange:S=>h(p,S)})]},p))]})]})}function Cv({value:r,onChange:l,onRemove:o}){const d=(c,h)=>l({...r,[c]:h});return s.jsxs("article",{className:"nw-nvp-device",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h3",{children:r.id||"Neuer PV-Wechselrichter"}),s.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:o,children:"PV entfernen"})]}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(sl,{label:"PV-Kennung",value:r.id,onChange:c=>d("id",c),required:!0}),s.jsx(Ot,{label:"PV-Anschlussbereich",value:r.connectionPointId,onChange:c=>d("connectionPointId",c),options:pl,placeholder:!0}),s.jsx(He,{label:"AC-Bezugsleistung",unit:"W",min:1,value:r.referencePowerW,onChange:c=>d("referencePowerW",c),help:"Bezugsleistung der Wirkleistungsregelung, keine ungeprüfte DC-Modulleistung."})]}),s.jsx(Wr,{label:"PV-Istleistung · Datenpunkt",value:r.powerMeasurement,onChange:c=>d("powerMeasurement",c)}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(Qt,{mode:"write",label:"PV-Erzeugungsgrenze · Schreib-Datenpunkt",value:r.command?.stateId,onChange:c=>d("command",{...r.command,stateId:c}),required:!0}),s.jsx(Ot,{label:"Einheit der PV-Vorgabe",value:r.command?.unit,onChange:c=>d("command",{...r.command,unit:c}),options:{W:"Watt (W)","%":"Prozent der AC-Bezugsleistung"}}),s.jsx(He,{label:r.command?.unit==="%"?"Prozentpunkte je Rohwert":"PV-Vorgabe · W je Rohwert",min:1e-6,value:r.command?.scale,onChange:c=>d("command",{...r.command,scale:c})}),s.jsx(Qt,{label:"PV-Erzeugungsgrenze · Rücklese-Datenpunkt (optional)",value:r.command?.readbackStateId,onChange:c=>d("command",ru(r.command||{},"readbackStateId",c))})]}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:r.evuControl===!0,onChange:c=>d("evuControl",c.target.checked)})," Vorhandene EVU-Stufen auf diesen Wechselrichter anwenden"]}),r.evuControl&&s.jsx("p",{children:"Verwendet die bestehende EVU-Anlagenzuordnung. EVU-Stufe und dynamische Anschlussgrenze werden zu einer gemeinsamen Erzeugungsvorgabe zusammengeführt."})]})}function Of({status:r,preview:l=!1}){if(!r)return s.jsx("p",{children:l?"Noch keine Messwertvorschau verfügbar.":"Noch kein Betriebsstatus verfügbar."});const o=r.ts,d=typeof o!="number"||!Number.isFinite(o)||o>Date.now()||Date.now()-o>15e3,c=r.snapshot||{},h=Object.entries(c.points||{}).map(([C,O])=>({id:C,...O})),m=c.storages||{},g=Array.isArray(r.storageResults)?r.storageResults:[],p=Array.isArray(r.pendingIntervals)?r.pendingIntervals:[],x=[...new Set([...Object.keys(m),...g.map(C=>C.id),...p.map(C=>C.id)])].filter(C=>typeof C=="string"),S=[...Array.isArray(r.errors)?r.errors:[],...Array.isArray(r.activationErrors)?r.activationErrors:[],...Array.isArray(c.errors)?c.errors:[]],E=nu({active:"Aktiv",limited:"Durch Grenzen beschränkt",recovering:"Anschlussgrenze wiederherstellen",handover_pending:"Stellübergabe läuft",handover_confirmed:"Stellübergabe bestätigt",config_invalid:"Konfiguration unvollständig oder ungültig",runtime_error:"Laufzeitfehler","root-measurement-unavailable":"M0-Messung nicht verfügbar","other-actuator-transition-unconfirmed":"Weitere Aktorwirkung noch unbestätigt",inactive:"Inaktiv"});return s.jsxs("div",{className:"nw-dynamic-live",children:[s.jsxs("p",{children:[s.jsx("strong",{children:l?"Vorschau – keine Geräteschreibzugriffe":E[r.status||""]||r.status||"Laufender Betrieb"}),r.configVersion?` · Konfiguration ${r.configVersion}`:""]}),r.reason||r.budget?.reason?s.jsx("p",{children:r.reason||r.budget?.reason}):null,d&&s.jsx("p",{role:"alert",children:"Betriebsanzeige veraltet. Aktuelle Stellwerte können nicht bestätigt werden."}),S.length>0&&s.jsx("ul",{children:S.map((C,O)=>s.jsx("li",{children:Bo(C)},O))}),h.length>0&&s.jsx("div",{className:"nw-nvp-table-wrap",children:s.jsxs("table",{className:"nw-nvp-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Messpunkt"}),s.jsx("th",{children:"Netzleistung"}),s.jsx("th",{children:"Qualität"}),s.jsx("th",{children:"Messwertalter"})]})}),s.jsx("tbody",{children:h.map(C=>s.jsxs("tr",{children:[s.jsx("th",{children:C.id}),s.jsx("td",{children:ar(C.valueW)}),s.jsx("td",{children:d?"Anzeige veraltet":C.valid?"Gültig":C.reason||"Ungültig"}),s.jsx("td",{children:typeof C.ageMs=="number"?`${Math.round(C.ageMs)} ms`:"—"})]},C.id))})]})}),Array.isArray(r.groups)&&r.groups.length>0&&s.jsx("div",{className:"nw-nvp-table-wrap",children:s.jsxs("table",{className:"nw-nvp-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Regelgruppe"}),s.jsx("th",{children:"Bereich / Aufgabe"}),s.jsx("th",{children:"Bedarf"}),s.jsx("th",{children:"Begründung"})]})}),s.jsx("tbody",{children:r.groups.map(C=>s.jsxs("tr",{children:[s.jsx("th",{children:C.id}),s.jsxs("td",{children:[C.connectionPointId," · ",Wo[C.primaryPurpose||""]||C.primaryPurpose,s.jsx("small",{children:C.authority==="external"?"Externe Stellhoheit":"EOS-Stellhoheit"})]}),s.jsx("td",{children:d?"—":ar(C.requestedW)}),s.jsx("td",{children:C.reason||C.status||"—"})]},C.id))})]})}),x.length>0&&s.jsx("div",{className:"nw-nvp-table-wrap",children:s.jsxs("table",{className:"nw-nvp-table","aria-label":"Sollwerte, Bestätigung und Messung",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Speicher"}),s.jsx("th",{children:"Anforderung"}),s.jsx("th",{children:"Ziel / Freigabe"}),s.jsx("th",{children:"Befehl"}),s.jsx("th",{children:"Anwendung"}),s.jsx("th",{children:"Gemessen"})]})}),s.jsx("tbody",{children:x.map(C=>{const O=m[C]||{},P=c.storageTelemetry?.[C]||{},D=g.find(M=>M.id===C)||{},N=p.find(M=>M.id===C)||{},V=N.appliedConfirmed===!0&&(!Number.isFinite(D.targetW)||N.targetW===D.targetW),U=typeof D.targetW=="number"?ar(D.targetW):typeof D.minPowerW=="number"&&typeof D.maxPowerW=="number"?`${ar(D.minPowerW)} bis ${ar(D.maxPowerW)}`:"—";return s.jsxs("tr",{children:[s.jsx("th",{children:C}),s.jsx("td",{children:d?"—":ar(D.requestedW)}),s.jsx("td",{children:d?"—":U}),s.jsxs("td",{children:[l?"Vorschau":d?"Unbekannt":D.commandConfirmed?"Rücklesung bestätigt":D.accepted?"Gesendet · unbestätigt":"Keine bestätigte Ausgabe",s.jsx("small",{children:D.reason||""})]}),s.jsx("td",{children:l?"Keine Anwendung":d?"Unbekannt":V?"Wirkung / Grenze bestätigt":"Noch nicht bestätigt"}),s.jsxs("td",{children:[ar(O.valueW),s.jsxs("small",{children:[typeof P.socPct=="number"?`${P.socPct} % SoC`:"SoC unbekannt"," · ",P.available===!0&&O.valid?"verfügbar":"Verfügbarkeit unbestätigt"]})]})]},C)})})]})}),typeof r.writesPerformed=="number"&&s.jsxs("p",{children:["Angenommene Schreibvorgänge im letzten Zyklus: ",r.writesPerformed,"."]}),s.jsx("p",{className:"nw-text-muted",children:"Netzbezug positiv; Speicherentladung positiv. Gesendete Sollwerte, bestätigte Gerätegrenzen und gemessene Wirkung sind unterschiedliche Zustände."})]})}function Rv({validation:r}){if(!r)return null;const l=[...r.errors||[],...r.activationErrors||[]];return s.jsxs("div",{className:"nw-dynamic-validation",children:[s.jsx("p",{children:s.jsx("strong",{children:r.valid===!1?"Einrichtung prüfen":r.activeEligible===!1?"Einrichtung noch nicht vollständig aktivierbar":"Einrichtung geprüft"})}),l.length>0&&s.jsx("ul",{children:l.map((o,d)=>s.jsxs("li",{children:[typeof o!="string"&&o.path&&s.jsxs("code",{children:[o.path,": "]}),Bo(o)]},d))}),Array.isArray(r.warnings)&&r.warnings.length>0&&s.jsx("ul",{children:r.warnings.map((o,d)=>s.jsx("li",{children:Bo(o)},d))})]})}function _v(){const[r,l]=v.useState(null),[o,d]=v.useState(null),[c,h]=v.useState(1),m=v.useRef(null),g=v.useRef(0),[p,x]=v.useState(!1),S="Der gespeicherte Stand wurde außerhalb dieses Formulars geändert. Bitte neu laden. Ihr Entwurf bleibt bis dahin erhalten; Speichern und App-Schalter sind gesperrt.",E=Q=>{typeof Q=="number"&&(!Number.isSafeInteger(Q)||Q<1||(g.current=Math.max(g.current,Q),x(m.current!==null&&g.current>m.current)))},[C,O]=v.useState({installed:!1,enabled:!1}),[P,D]=v.useState(null),[N,V]=v.useState(null),[U,M]=v.useState(null),[te,ne]=v.useState(null),[xe,Ee]=v.useState(!1),[ee,be]=v.useState(!1),[z,ae]=v.useState(!1),[j,H]=v.useState(0),[me,q]=v.useState("Dynamischer Netzanschluss wird geladen…"),[ce,Se]=v.useState(!1),W=C.installed&&C.enabled,oe=v.useMemo(()=>({revision:j,blocked:ee||p}),[j,ee,p]),K=(Q,ve=!1,Ue=!1)=>{const kt=Q.config?.configVersion;if(typeof kt=="number"&&Number.isSafeInteger(kt)&&kt<Math.max(g.current,m.current||0))return!1;if(E(Q.config?.configVersion),V(Q.status||null),D(Q.rootSource||null),Q.app&&O(Q.app),Ee(Q.locked===!0),ve||Ue){H(qt=>qt+1);const Fe={...Lf(),...Q.config};(!Array.isArray(Fe.points)||Fe.points.length!==2)&&(Fe.points=Lf().points),Array.isArray(Fe.storages)||(Fe.storages=[]),Array.isArray(Fe.pvAssignments)||(Fe.pvAssignments=[]),d(Fe),h(Fe.configVersion||1),m.current=Fe.configVersion||1,x(g.current>m.current),ve?(l(Fe),ae(!1),M(null),ne(Q.validation||null)):l(qt=>qt?{...qt,configVersion:Fe.configVersion}:Fe)}return!0};v.useEffect(()=>{const Q=ve=>{window.parent===window||ve.source!==window.parent||ve.origin!==window.location.origin||!En(ve.data)||!it(ve.data)||ve.data.type!=="nw:dynamic-grid-parent-changed"||E(ve.data.configVersion)};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[]);const b=Q=>{window.parent!==window&&Q.config&&Number.isSafeInteger(Q.config.configVersion)&&window.parent.postMessage({type:"nw:dynamic-grid-saved",configVersion:Q.config.configVersion},window.location.origin)};v.useEffect(()=>{let Q=!0,ve;const Ue=async(kt=!1)=>{try{const Fe=Oi(await zi());if(!Q)return;const qt=K(Fe,kt);kt&&qt&&(Se(!1),q("Alle Zuordnungen dieser App werden hier eingerichtet."))}catch(Fe){Q&&(Se(!0),q(St(Fe,"App nicht erreichbar.")),[401,403].includes(cl(Fe))&&(l(null),V(null)))}finally{Q&&(ve=window.setTimeout(()=>Ue(!1),3e3))}};return Ue(!0),()=>{Q=!1,window.clearTimeout(ve)}},[]);const L=Q=>{H(ve=>ve+1),l(Q),ae(!0),M(null),ne(null)},pe=(Q,ve)=>{r&&L({...r,[Q]:ve})},ke=(Q,ve,Ue)=>Q.map((kt,Fe)=>Fe===ve?Ue:kt),$=(Q,ve)=>{r&&L({...r,[Q]:r[Q].filter((Ue,kt)=>kt!==ve)})},re=Q=>{if(Se(!0),q(cl(Q)===409?"Der gespeicherte Stand wurde geändert oder eine Stellübergabe ist offen. Bitte Betriebsstatus prüfen und neu laden. Ihr Entwurf bleibt erhalten.":St(Q,"Speichern fehlgeschlagen.")),Q instanceof _e&&it(Q.payload)){const ve=ov(Q.payload.validation)||uv(Q.payload.details);ve&&ne(ve)}},ge=async()=>{be(!0);try{const Q=Oi(await zi());K(Q,!0)&&(Se(!1),q("Gespeicherten Stand geladen."))}catch(Q){re(Q)}finally{be(!1)}},ue=async(Q=!1)=>{if(p){Se(!0),q(S);return}be(!0),Se(!1);try{const ve=Q?{installed:!0,enabled:!0}:{installed:!!C.installed,enabled:!!C.enabled},Ue=Oi(await zi("/config",{config:r,expectedConfigVersion:c,app:ve}));if(!K(Ue,!0)){q(S);return}b(Ue),q(Ue.app?.installed&&Ue.app?.enabled?"Dynamischer Netzanschluss aktiviert. Die Laufzeit prüft Messqualität und Bestätigungen vor der Stellwertausgabe.":"Einrichtung als inaktiver Entwurf gespeichert.")}catch(ve){re(ve)}finally{be(!1)}},we=async Q=>{if(p){Se(!0),q(S);return}be(!0),Se(!1);try{const ve=Oi(await zi("/config",{config:o,expectedConfigVersion:c,app:Q}));if(!K(ve,!z,!0)){q(S);return}b(ve),q(Q.installed?"App installiert und inaktiv. Die Einrichtung bleibt erhalten.":"App deinstalliert. Die gespeicherte Einrichtung bleibt erhalten.")}catch(ve){re(ve)}finally{be(!1)}},Ve=async()=>{be(!0),Se(!1);try{const Q=Oi(await zi("/preview",{config:r}),!1);ne(Q.validation||null),M(Q.status||null),q("Entwurf geprüft. Die Vorschau schreibt keine Gerätesollwerte.")}catch(Q){re(Q)}finally{be(!1)}},Kn=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1";return s.jsx(xh.Provider,{value:oe,children:s.jsxs(Gn,{embedded:Kn,title:"Dynamischer Netzanschluss",subtitle:"M0 und M1 gemeinsam begrenzen. Speicher und PV vollständig in dieser App zuordnen und betreiben.",showBack:!1,actions:s.jsx("a",{className:"nw-link-button nw-config-btn",href:`${kn()??""}/ems-apps.html?nwAdmin=1`,target:Kn?"_parent":"_self",children:"Zu EMS Apps"}),children:[s.jsxs("section",{className:"nw-card nw-config-card nw-dynamic-lifecycle",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h2",{className:"nw-config-card__title",children:"App und Betrieb"}),s.jsx("span",{className:`nw-nvp-tag ${W?"nw-dynamic-active":""}`,children:N?.status==="handover_pending"?"Stellübergabe läuft":W?"Dynamisch aktiv":C.installed?"Installiert · inaktiv":"Nicht installiert"})]}),s.jsx("div",{role:ce?"alert":"status",className:`nw-status ${ce?"nw-status--bad":""}`,children:me}),s.jsx("p",{children:"Installiert und aktiviert schaltet diese App auf dynamischen Betrieb. Inaktive Entwürfe erzeugen keine Stellwerte."}),s.jsxs("div",{className:"nw-actions-row",children:[!C.installed&&s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:ee||p||!r,onClick:()=>we({installed:!0,enabled:!1}),children:"App installieren"}),W&&s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:ee||p,onClick:()=>we({installed:!0,enabled:!1}),children:"App deaktivieren"}),C.installed&&!W&&s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:ee||p,onClick:()=>we({installed:!1,enabled:!1}),children:"App deinstallieren"}),s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:ee,onClick:ge,children:z?"Entwurf verwerfen und neu laden":"Neu laden"})]}),p&&s.jsx("p",{role:"alert",className:"nw-nvp-notice",children:S}),z&&s.jsx("p",{className:"nw-nvp-notice",children:"Ungespeicherte Änderungen. Der Betriebsstatus gehört zum gespeicherten Stand."}),xe&&s.jsx("p",{className:"nw-nvp-notice",children:"Eine Stellübergabe ist noch offen. Der Server prüft, wann Änderungen sicher übernommen werden können."})]}),r&&s.jsx("form",{noValidate:!0,onSubmit:Q=>{Q.preventDefault(),ue(!0)},"aria-busy":ee,children:s.jsxs("fieldset",{disabled:ee,className:"nw-nvp-fieldset",children:[s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Messstruktur und gemeinsame Grenzen"}),s.jsx("p",{children:"M0 umfasst den gesamten Anschluss einschließlich M1. Ein Speicher außerhalb von M1 kann keine lokale M1-Nulleinspeisung herstellen."}),s.jsx(He,{label:"Höchste zeitliche Abweichung zusammengehöriger Messungen",unit:"ms",value:r.maxSkewMs,onChange:Q=>pe("maxSkewMs",Q)})]}),r.points.map((Q,ve)=>s.jsx(bv,{value:Q,rootSource:P,onChange:Ue=>pe("points",ke(r.points,ve,Ue))},Q.id)),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Speicher und Betriebsaufgaben"}),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>pe("storages",[...r.storages,Sv()]),children:"Speicher hinzufügen"})]}),s.jsx("p",{children:"Jeder Speicher erhält hier seine eigenen Datenpunkte, Grenzen und Betriebsaufgaben. Die Einrichtung in einer anderen App ist nicht erforderlich."}),!r.storages.length&&s.jsx("p",{children:"Noch kein Speicher eingerichtet."}),r.storages.map((Q,ve)=>s.jsx(Nv,{value:Q,onChange:Ue=>pe("storages",ke(r.storages,ve,Ue)),onRemove:()=>$("storages",ve)},ve))]}),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h2",{className:"nw-config-card__title",children:"PV-Wechselrichter"}),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>pe("pvAssignments",[...r.pvAssignments,kv()]),children:"PV hinzufügen"})]}),s.jsx("p",{children:"Eine lokale Nulleinspeisung benötigt wirksame Stellmöglichkeiten im lokalen Bereich. PV wird nach gemessener Leistung und verbleibendem Anschlussbudget begrenzt."}),r.pvAssignments.map((Q,ve)=>s.jsx(Cv,{value:Q,onChange:Ue=>pe("pvAssignments",ke(r.pvAssignments,ve,Ue)),onRemove:()=>$("pvAssignments",ve)},ve))]}),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Einrichtung übernehmen"}),s.jsxs("div",{className:"nw-actions-row",children:[s.jsx("button",{type:"button",className:"nw-button nw-config-btn",onClick:Ve,children:"Einrichtung prüfen"}),s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:p,onClick:()=>ue(!1),children:W?"Änderungen speichern":"Entwurf speichern"}),s.jsx("button",{type:"submit",className:"nw-button nw-config-btn nw-button--primary nw-config-btn--primary",disabled:p,children:W?"Speichern und aktiv halten":"Speichern und aktivieren"})]}),s.jsx("p",{children:"Aktivieren übernimmt Konfiguration und App-Zustand gemeinsam. Unvollständige Zuordnungen werden mit konkreten Gründen abgewiesen. Empfang eines Befehls ersetzt keine bestätigte Gerätewirkung."}),s.jsx(Rv,{validation:te})]})]})}),U&&s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Vorschau der Einrichtung"}),s.jsx(Of,{preview:!0,status:U})]}),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Betriebsstatus"}),s.jsx(Of,{status:N})]})]})})}const Pv=["balance.read","telemetry.read","capabilities.read","curtailment.request","storage.charge.request","storage.discharge.request","dispatch.status.read","dispatch.cancel"];function Tt(){throw new Error("Die Partnerdaten sind unvollständig oder ungültig. Bitte Eingaben prüfen oder erneut laden.")}function yn(r,l=256){return typeof r!="string"||r.length>l||/[\u0000-\u001f\u007f]/.test(r)?Tt():r}function sn(r){return typeof r!="boolean"?Tt():r}function vn(r,l,o,d=!1){return typeof r!="number"||!Number.isFinite(r)||r<l||r>o||d&&!Number.isSafeInteger(r)?Tt():r}function ll(r,l){return typeof r!="string"||!l.includes(r)?Tt():r}function al(r,l,o){return!Array.isArray(r)||r.length>l?Tt():r.map(o)}function Vo(r){return!En(r)||!it(r)||!it(r.arbitrage)?Tt():{configVersion:vn(r.configVersion,1,Number.MAX_SAFE_INTEGER,!0),enabled:sn(r.enabled),partnerId:yn(r.partnerId,128),endpoint:yn(r.endpoint,2048),credentialRef:yn(r.credentialRef,128),grants:al(r.grants,64,l=>it(l)?{appId:ll(l.appId,["arbitrage","energyLedger","directMarketing"]),resourceId:yn(l.resourceId,128),permissions:al(l.permissions,8,o=>ll(o,Pv))}:Tt()),arbitrage:{profile:ll(r.arbitrage.profile,["household","tradingOnly"]),maxCommandSeconds:vn(r.arbitrage.maxCommandSeconds,1,60,!0),resources:al(r.arbitrage.resources,32,l=>{if(!it(l))return Tt();const o={id:yn(l.id,128),maxChargeW:vn(l.maxChargeW,0,1e8,!0),maxDischargeW:vn(l.maxDischargeW,0,1e8,!0),minSocPct:vn(l.minSocPct,0,100),maxSocPct:vn(l.maxSocPct,0,100),maxImportW:vn(l.maxImportW,0,1e8,!0),maxExportW:vn(l.maxExportW,0,1e8,!0),allowGridCharge:sn(l.allowGridCharge),allowGridExport:sn(l.allowGridExport),commissioned:sn(l.commissioned)};return o.minSocPct>=o.maxSocPct?Tt():o})}}}function Do(r,l=!1){return!En(r)||!it(r)||r.ok!==!0||!it(r.app)||!it(r.status)||!it(r.validation)?Tt():{ok:!0,config:l&&r.preview===!0&&r.config===null&&r.validation.valid===!1?null:Vo(r.config),app:{installed:sn(r.app.installed),enabled:sn(r.app.enabled),active:sn(r.app.active)},status:{connection:ll(r.status.connection,["disabled","blocked","disconnected","connected"]),reason:yn(r.status.reason,512),controlAvailable:sn(r.status.controlAvailable),revision:vn(r.status.revision,0,Number.MAX_SAFE_INTEGER,!0)},validation:Sh(r.validation),...r.preview===void 0?{}:{preview:sn(r.preview)}}}function Sh(r){return!En(r)||!it(r)?Tt():{valid:sn(r.valid),errors:al(r.errors,256,l=>it(l)?{path:yn(l.path,512),code:yn(l.code,128),message:yn(l.message,1024)}:Tt())}}const zo={arbitrage:"Arbitrage · Speicherhandel",energyLedger:"Bilanz · Partnerfreigaben",directMarketing:"Direktvermarktung · Partnerfreigaben"},kh={"balance.read":"Bilanzdaten lesen","telemetry.read":"Messwerte lesen","capabilities.read":"Verfügbare Funktionen lesen","curtailment.request":"Begrenzung anfragen","storage.charge.request":"Laden anfragen","storage.discharge.request":"Entladen anfragen","dispatch.status.read":"Auftragsstatus lesen","dispatch.cancel":"Eigene Aufträge zurücknehmen"},Av={energyLedger:["balance.read"],directMarketing:["telemetry.read","capabilities.read","curtailment.request","dispatch.status.read","dispatch.cancel"],arbitrage:["telemetry.read","capabilities.read","storage.charge.request","storage.discharge.request","dispatch.status.read","dispatch.cancel"]},Iv={disabled:"Verbindung ausgeschaltet",blocked:"Verbindung gesperrt",disconnected:"Nicht verbunden",connected:"Verbunden"},Tf=Object.freeze({DISABLED:"Partnerverbindung ausgeschaltet.",NOT_CONNECTED:"Noch keine bestätigte Partnerverbindung.",CONTROL_UNAVAILABLE:"Die sichere Speichersteuerung ist noch nicht freigegeben.",INVALID_CONFIG:"Die gespeicherte Konfiguration ist unvollständig oder ungültig.",APP_INACTIVE:"Die zugehörige App ist nicht aktiv."});function Dv(r){return Object.hasOwn(Tf,r)?Tf[r]:`Statushinweis: ${r}`}function or({label:r,value:l,onChange:o,min:d=0,max:c}){return s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:r}),s.jsx("input",{className:"nw-input nw-config-input",type:"number",required:!0,min:d,max:c,step:"any",value:l,onChange:h=>o(h.target.value===""?"":Number(h.target.value))})]})}function ol({label:r,value:l,onChange:o,help:d="",maxLength:c=128}){return s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:r}),s.jsx("input",{className:"nw-input nw-config-input",value:l,maxLength:c,autoComplete:"off",onChange:h=>o(h.target.value)}),d&&s.jsx("small",{children:d})]})}function zv({grant:r,resourceIds:l,onChange:o,onRemove:d}){return s.jsxs("article",{className:"nw-nvp-device",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h3",{children:"Ressourcenfreigabe"}),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:d,children:"Freigabe entfernen"})]}),s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:"Freigegebene Ressource"}),s.jsxs("select",{className:"nw-input nw-config-select",required:!0,value:r.resourceId,onChange:c=>o({...r,resourceId:c.target.value}),children:[s.jsx("option",{value:"",children:"Ressource ausdrücklich auswählen"}),r.resourceId&&!l.includes(r.resourceId)&&s.jsxs("option",{value:r.resourceId,children:["Nicht zugeordnet: ",r.resourceId]}),l.map(c=>s.jsx("option",{value:c,children:c==="site"?"Anlage (site)":c==="single"?"Einzelspeicher (single)":`Dynamische Gruppe: ${c}`},c))]}),s.jsx("small",{children:"Nur lokal eingerichtete Ressourcen freigeben. Rohdatenpunktpfade sind nicht zulässig."})]}),s.jsx("div",{className:"nw-partner-permissions",children:Av[r.appId].map(c=>s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:r.permissions.includes(c),onChange:h=>o({...r,permissions:h.target.checked?[...r.permissions,c]:r.permissions.filter(m=>m!==c)})}),kh[c]]},c))})]})}function Lv({resource:r,onChange:l,onRemove:o}){const d=(c,h)=>l({...r,[c]:h});return s.jsxs("article",{className:"nw-nvp-device",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h3",{children:r.id||"Neuer Handelsspeicher"}),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:o,children:"Speicher entfernen"})]}),s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:"Lokaler Regelpfad"}),s.jsxs("select",{className:"nw-input nw-config-select",value:r.id==="single"?"single":r.id==="farm"?"unsupported":"group",onChange:c=>l({...r,id:c.target.value==="single"?"single":"",commissioned:!1}),children:[s.jsx("option",{value:"single",children:"Vorhandene Einzelspeicher-Regelung (single)"}),s.jsx("option",{value:"group",children:"Konfigurierte dynamische Speichergruppe"}),r.id==="farm"&&s.jsx("option",{value:"unsupported",children:"Speicherfarm: in dieser Version nicht freigegeben"})]})]}),r.id!=="single"&&r.id!=="farm"&&s.jsx(ol,{label:"Kennung der konfigurierten dynamischen Speichergruppe",maxLength:64,value:r.id,onChange:c=>l({...r,id:c,commissioned:!1}),help:"Exakte Gruppenkennung aus dem dynamischen Netzanschluss; keine Datenpunktadresse."}),r.id==="single"&&s.jsx("p",{children:"Die vorhandene lokale Speicherregelung muss eingerichtet und aktiv sein. Arbitrage ergänzt ihre Handelsanforderungen; PV und dynamischer Netzanschluss sind dafür nicht erforderlich."}),r.id==="farm"&&s.jsx("p",{className:"nw-nvp-notice",children:"Die bestehende Speicherfarm ist für Partnersteuerung in dieser Version nicht freigegeben. Diese Ressource entfernen oder einen unterstützten Regelpfad einrichten."}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(or,{label:"Maximale Ladeleistung (W)",value:r.maxChargeW,onChange:c=>d("maxChargeW",c)}),s.jsx(or,{label:"Maximale Entladeleistung (W)",value:r.maxDischargeW,onChange:c=>d("maxDischargeW",c)}),s.jsx(or,{label:"Reserve · Mindest-SoC (%)",value:r.minSocPct,max:100,onChange:c=>d("minSocPct",c)}),s.jsx(or,{label:"Höchster SoC (%)",value:r.maxSocPct,max:100,onChange:c=>d("maxSocPct",c)}),s.jsx(or,{label:"Zulässiger Netzbezug (W)",value:r.maxImportW,onChange:c=>d("maxImportW",c)}),s.jsx(or,{label:"Zulässige Netzeinspeisung (W)",value:r.maxExportW,onChange:c=>d("maxExportW",c)})]}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:r.allowGridCharge,onChange:c=>d("allowGridCharge",c.target.checked)}),"Netzladung für diesen Speicher erlauben"]}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:r.allowGridExport,onChange:c=>d("allowGridExport",c.target.checked)}),"Einspeisung aus diesem Speicher erlauben"]}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:r.id!=="farm"&&r.commissioned,disabled:r.id==="farm",onChange:c=>d("commissioned",c.target.checked)}),"Installateurfreigabe: Messung, Grenzen und sicherer Regelpfad wurden an dieser Anlage geprüft"]})]})}function Uo({appId:r="arbitrage"}){const[l,o]=v.useState(null),[d,c]=v.useState(null),[h,m]=v.useState(null),[g,p]=v.useState(null),[x,S]=v.useState(!1),[E,C]=v.useState(!1),[O,P]=v.useState(!1),[D,N]=v.useState(!1),[V,U]=v.useState(!1),[M,te]=v.useState("Partnerfreigaben werden geladen…"),[ne,xe]=v.useState(0),[Ee,ee]=v.useState(Date.now()),be=v.useRef(null),z=v.useRef(0),ae=v.useRef(!1),j=v.useRef(!0),H="Der gespeicherte Stand wurde geändert. Ihr Entwurf bleibt erhalten. Vor dem nächsten Speichern bitte neu laden.",me=window.parent!==window&&new URLSearchParams(window.location.search).get("embedded")==="1",q=ne===0||Ee-ne>15e3,ce=!q&&!D&&!O,Se=ce&&d?.app.active===!0&&d.status.controlAvailable&&d.status.connection==="connected",W=E||O||D,oe=($,re)=>{!j.current||$.config.configVersion<z.current||(z.current=$.config.configVersion,c($),xe(Date.now()),re?(be.current=$.config.configVersion,o($.config),S(!1),P(!1),N(!1),m(null),p(null)):be.current!==null&&$.config.configVersion>be.current&&P(!0))},K=async($=!1)=>{if(!ae.current){$&&(ae.current=!0,C(!0));try{const re=Do(await vf());if(!$&&ae.current)return;oe(re,$),j.current&&$&&(te("Gespeicherter Stand geladen."),U(!1))}catch(re){if(!j.current)return;xe(0),U(!0),te(St(re,"Der Betriebsstatus ist nicht erreichbar."))}finally{$&&(ae.current=!1,j.current&&C(!1))}}};v.useEffect(()=>{j.current=!0,K(!0);const $=ue=>{if(ue.origin!==window.location.origin||ue.source!==window.parent||!ue.data||typeof ue.data!="object"||!("type"in ue.data)||ue.data.type!=="nw:partner-integrations-parent-changed"||!("configVersion"in ue.data))return;const we=ue.data.configVersion;typeof we!="number"||!Number.isSafeInteger(we)||we<1||(z.current=Math.max(z.current,we),be.current!==null&&we>be.current&&P(!0))};window.addEventListener("message",$);const re=window.setInterval(()=>{K()},5e3),ge=window.setInterval(()=>ee(Date.now()),1e3);return()=>{j.current=!1,window.clearInterval(re),window.clearInterval(ge),window.removeEventListener("message",$)}},[]);const b=$=>{o($),S(!0),m(null),p(null)},L=async($,re)=>{if(ae.current||!l||be.current===null||$!=="preview"&&(O||D))return;ae.current=!0,C(!0),U(!1);let ge=!1;try{const ue=$==="revoke"?{expectedConfigVersion:be.current}:$==="preview"?{config:Vo(l)}:{config:Vo(l),expectedConfigVersion:be.current,...re===void 0?{}:{app:{installed:!0,enabled:re}}};ge=!0;const we=await vf($==="save"?"/config":`/${$}`,ue);if(!j.current)return;if($==="preview"){const Ve=Do(we,!0);m(Ve),p(Ve.validation),te(Ve.validation.valid?"Einrichtung geprüft. Die Vorschau sendet keine Gerätebefehle.":"Die Einrichtung enthält Prüfhinweise.")}else{const Ve=Do(we);oe(Ve,!0),te($==="revoke"?"Partnerverbindung und alle Daten-/Steuerfreigaben wurden widerrufen.":"Konfiguration gespeichert. Der aktuelle Betriebsstatus entscheidet über die Verfügbarkeit."),me&&window.parent.postMessage({type:"nw:partner-integrations-saved",configVersion:Ve.config.configVersion},window.location.origin)}}catch(ue){if(!j.current)return;const we=cl(ue);if(we===409&&P(!0),ge&&$!=="preview"&&we!==400&&we!==422&&we!==409&&N(!0),ue instanceof _e&&ue.payload.validation)try{p(Sh(ue.payload.validation))}catch{}U(!0),te(we===409?H:St(ue,"Der Auftrag konnte nicht bestätigt werden. Bitte den Serverstand neu laden."))}finally{ae.current=!1,j.current&&C(!1)}},pe=l?.grants.map(($,re)=>({grant:$,index:re})).filter($=>$.grant.appId===r)||[],ke=g||h?.validation||d?.validation;return s.jsxs(Gn,{title:zo[r],embedded:me,subtitle:"Partnerverbindung, ausdrücklich freigegebene Daten und sicher begrenzte Anforderungen.",children:[s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsxs("div",{className:"nw-nvp-section-heading",children:[s.jsx("h2",{className:"nw-config-card__title",children:zo[r]}),s.jsx("span",{className:"nw-nvp-tag",children:ce&&d?Iv[d.status.connection]:"Betriebsstatus unbestätigt"})]}),s.jsx("div",{className:`nw-status ${V?"nw-status--bad":""}`,role:V?"alert":"status",children:M}),r==="arbitrage"?s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Eigenständiger Speicherhandel für Haushalte oder Anlagen, in denen EOS ausschließlich Speicher für den Handel regelt. PV, Wallbox, Bilanz und dynamischer Netzanschluss sind dafür keine Voraussetzung."}),s.jsxs("p",{children:[s.jsx("strong",{children:Se?"Partnerkanal bereit · jede Steueranforderung wird einzeln geprüft":"Diagnose / Steuerung gesperrt"})," · ",d?Dv(d.status.reason):"Status wird geprüft."]}),s.jsx("p",{children:"Lokale Netzgrenzen, Speicherreserve und Geräteschutz haben Vorrang vor Händleranforderungen. Eine Verbindung oder Auftragsannahme bestätigt noch keine Wirkung am Speicher."})]}):s.jsx("p",{children:r==="energyLedger"?"Bilanzdaten dürfen nur für die hier benannten Ressourcen gelesen werden. Diese App erteilt keine Speichersteuerrechte.":"Messwerte und Begrenzungsanfragen werden separat freigegeben. Speicherhandel erhält seine Freigaben ausschließlich in der App Arbitrage."}),q&&s.jsx("p",{className:"nw-nvp-notice",role:"alert",children:"Keine frische Betriebsbestätigung. Aktive Steuerung kann nicht bestätigt werden."}),O&&s.jsx("p",{className:"nw-nvp-notice",role:"alert",children:H}),D&&s.jsx("p",{className:"nw-nvp-notice",role:"alert",children:"Das Ergebnis der letzten Änderung ist unklar. Vor weiteren Änderungen den Serverstand neu laden."}),x&&s.jsx("p",{className:"nw-nvp-notice",children:"Ungespeicherter Entwurf. Die Betriebsanzeige zeigt den gespeicherten Stand."}),s.jsxs("div",{className:"nw-actions-row",children:[s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:E,onClick:()=>{K(!0)},children:x?"Entwurf verwerfen und neu laden":"Neu laden"}),r==="arbitrage"&&d&&s.jsx("button",{type:"button",className:"nw-button nw-config-btn",disabled:W||x,onClick:()=>{L("save",!d.app.enabled)},children:d.app.enabled?"Arbitrage-App ausschalten":"Arbitrage-App einschalten"})]}),r==="arbitrage"&&d&&s.jsxs("p",{children:["App: ",d.app.installed?d.app.enabled?"Installiert · eingeschaltet":"Installiert · ausgeschaltet":"Nicht installiert",". Ohne bestätigte Steuerfreigabe bleibt der Betrieb in Diagnose."]})]}),l&&s.jsx("form",{onSubmit:$=>{$.preventDefault(),L("save")},"aria-busy":E,children:s.jsxs("fieldset",{className:"nw-nvp-fieldset",disabled:E,children:[s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Gemeinsame Partnerverbindung"}),s.jsx("p",{children:"Ein Partnerprofil wird von den Fach-Apps gemeinsam genutzt. Die folgenden Verbindungsdaten gelten auch für die anderen Partnerfreigaben."}),s.jsxs("label",{className:"nw-dynamic-checkbox",children:[s.jsx("input",{type:"checkbox",checked:l.enabled,onChange:$=>b({...l,enabled:$.target.checked})}),"Partnerverbindung einschalten"]}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsx(ol,{label:"Partnerkennung",value:l.partnerId,onChange:$=>b({...l,partnerId:$})}),s.jsx(ol,{label:"Geschützte WebSocket-Adresse (wss://)",maxLength:2048,value:l.endpoint,onChange:$=>b({...l,endpoint:$}),help:"Adresse ohne Zugangsdaten, Token, URL-Parameter oder Fragment."}),s.jsx(ol,{label:"Referenz auf das geschützte Zugangstoken",value:l.credentialRef,onChange:$=>b({...l,credentialRef:$}),help:"Name der auf dem EOS-System bereitgestellten Umgebungsvariable mit Präfix NEXOWATT_PARTNER_. Hier keinen Tokenwert eingeben."})]})]}),r==="arbitrage"&&s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Speicherhandel und Reserve"}),s.jsxs("div",{className:"nw-nvp-grid",children:[s.jsxs("label",{className:"nw-nvp-field nw-config-field",children:[s.jsx("span",{className:"nw-config-label",children:"Betriebsprofil"}),s.jsxs("select",{className:"nw-input nw-config-select",value:l.arbitrage.profile,onChange:$=>b({...l,arbitrage:{...l.arbitrage,profile:$.target.value==="tradingOnly"?"tradingOnly":"household"}}),children:[s.jsx("option",{value:"household",children:"Haushalt mit Speicherhandel"}),s.jsx("option",{value:"tradingOnly",children:"Nur Speicherhandel"})]})]}),s.jsx(or,{label:"Maximale Gültigkeit einer Anforderung (s)",value:l.arbitrage.maxCommandSeconds,min:1,max:60,onChange:$=>b({...l,arbitrage:{...l.arbitrage,maxCommandSeconds:$}})})]}),s.jsx("p",{children:"Die Speicherkennung verweist auf die lokale Gerätezuordnung. Die Einzelspeicher-Regelung muss lokal eingerichtet und aktiv sein. Alternativ kann eine bestehende dynamische Speichergruppe verwendet werden. Vor einer Steuerfreigabe müssen aktuelle Messwerte, Anschlussgrenzen und der sichere Regelpfad an der Anlage geprüft sein; diese Maske ersetzt keine Inbetriebnahmeprüfung."}),l.arbitrage.resources.map(($,re)=>s.jsx(Lv,{resource:$,onChange:ge=>b({...l,arbitrage:{...l.arbitrage,resources:l.arbitrage.resources.map((ue,we)=>we===re?ge:ue)}}),onRemove:()=>b({...l,arbitrage:{...l.arbitrage,resources:l.arbitrage.resources.filter((ge,ue)=>ue!==re)},grants:l.grants.filter(ge=>!(ge.appId==="arbitrage"&&ge.resourceId===$.id))})},re)),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:l.arbitrage.resources.length>=32,onClick:()=>b({...l,arbitrage:{...l.arbitrage,resources:[...l.arbitrage.resources,{id:"single",maxChargeW:"",maxDischargeW:"",minSocPct:20,maxSocPct:90,maxImportW:"",maxExportW:"",allowGridCharge:!1,allowGridExport:!1,commissioned:!1}]}}),children:"Handelsspeicher hinzufügen"})]}),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsxs("h2",{className:"nw-config-card__title",children:["Freigaben für ",r==="arbitrage"?"Arbitrage":r==="energyLedger"?"Bilanz":"Direktvermarktung"]}),s.jsx("p",{children:"Nur ausdrücklich ausgewählte Daten und Anforderungen dürfen genutzt werden. Neue Freigaben beginnen ohne Rechte."}),pe.length===0&&s.jsx("p",{children:"Noch keine Ressource freigegeben."}),pe.map(({grant:$,index:re})=>s.jsx(zv,{grant:$,resourceIds:r==="arbitrage"?[...new Set(l.arbitrage.resources.map(ge=>ge.id).filter(ge=>ge&&ge!=="farm"))]:["site"],onChange:ge=>b({...l,grants:l.grants.map((ue,we)=>we===re?ge:ue)}),onRemove:()=>b({...l,grants:l.grants.filter((ge,ue)=>ue!==re)})},re)),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:l.grants.length>=64,onClick:()=>b({...l,grants:[...l.grants,{appId:r,resourceId:"",permissions:[]}]}),children:"Ressource freigeben"}),l.grants.length>pe.length&&s.jsxs("p",{className:"nw-text-muted",children:[l.grants.length-pe.length," weitere Ressourcenfreigabe(n) werden in den anderen Fach-Apps verwaltet und beim Speichern erhalten."]})]}),s.jsxs("section",{className:"nw-card nw-config-card",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Prüfen und übernehmen"}),s.jsxs("div",{className:"nw-actions-row",children:[s.jsx("button",{className:"nw-button nw-config-btn",type:"button",onClick:()=>{L("preview")},children:"Freigaben prüfen"}),s.jsx("button",{className:"nw-button nw-config-btn nw-button--primary nw-config-btn--primary",type:"submit",disabled:W,children:"Konfiguration speichern"})]}),ke&&s.jsxs("div",{className:"nw-dynamic-validation",children:[s.jsx("p",{children:ke.valid?"Einrichtung formal gültig. Die Betriebsfreigabe wird zusätzlich geprüft.":"Einrichtung prüfen:"}),ke.errors.length>0&&s.jsx("ul",{children:ke.errors.map(($,re)=>s.jsxs("li",{children:[$.message," ",s.jsxs("small",{children:["(",$.path,")"]})]},re))})]}),h&&s.jsxs("div",{className:"nw-partner-preview",children:[s.jsx("h3",{children:"Vorschau der Daten- und Steuerfreigaben"}),s.jsx("p",{children:"Geprüfter Entwurf; keine Messwertübertragung und keine Gerätebefehle durch diese Vorschau."}),s.jsx("div",{className:"nw-nvp-table-wrap",children:s.jsxs("table",{className:"nw-nvp-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"App"}),s.jsx("th",{children:"Ressource"}),s.jsx("th",{children:"Erlaubte Nutzung"})]})}),s.jsx("tbody",{children:(h.config?.grants||[]).filter($=>$.appId===r).map(($,re)=>s.jsxs("tr",{children:[s.jsx("td",{children:zo[$.appId]}),s.jsx("td",{children:$.resourceId}),s.jsx("td",{children:$.permissions.map(ge=>kh[ge]).join(", ")||"Keine Rechte"})]},re))})]})})]})]})]})}),d&&s.jsxs("section",{className:"nw-card nw-config-card nw-partner-revoke",children:[s.jsx("h2",{className:"nw-config-card__title",children:"Partnerzugriff widerrufen"}),s.jsx("p",{children:"Schaltet die gemeinsame Partnerverbindung aus und entfernt sämtliche Daten- und Steuerfreigaben für Arbitrage, Bilanz und Direktvermarktung. Lokale Schutzfunktionen bleiben zuständig."}),s.jsx("button",{className:"nw-button nw-config-btn",type:"button",disabled:W,onClick:()=>{L("revoke")},children:"Alle Partnerfreigaben jetzt widerrufen"}),s.jsxs("p",{className:"nw-text-muted",children:["Gespeicherte Konfiguration: ",d.config.configVersion,". Letzte Statusabfrage: ",ne?new Date(ne).toLocaleTimeString("de-DE"):"Nicht bestätigt","."]})]})]})}function Ov(){return s.jsx(Uo,{appId:"arbitrage"})}const Tv={appcenter:{title:"EMS App-Center",path:"/ems-apps.html",needsAdminBackQuery:!0},simulation:{title:"Simulation",path:"/simulation.html",needsAdminBackQuery:!0},license:{title:"Lizenz",path:"/license.html",needsAdminBackQuery:!0},"smarthome-config":{title:"SmartHome Config",path:"/smarthome-config.html",needsAdminBackQuery:!0},"smarthome-vis":{title:"SmartHome VIS",path:"/smarthome.html",needsAdminBackQuery:!1}};function Mv(r,l){if(!r||!r.includes(".html"))return r;const o=r.includes("?")?"&":"?",d=window.location.port||"8081";return`${r}${o}nwAdmin=1&instance=${encodeURIComponent(String(l))}&adminPort=${encodeURIComponent(d)}`}function Fr({targetKey:r}){const l=Tv[r],o=on(),[d,c]=v.useState(null),[h,m]=v.useState("Weiterleitung wird vorbereitet…");v.useEffect(()=>{let p=!0,x;return c(null),m("Weiterleitung wird vorbereitet…"),(async()=>{try{const S=await kl(o);if(!p)return;const E=`${S}${l.needsAdminBackQuery?Mv(l.path,o):l.path}`;c({instance:o,key:r,url:E}),m("Öffne Seite…"),x=setTimeout(()=>{p&&Kt(E)},50)}catch{if(!p)return;c(null),m("Die Adresse der Oberfläche konnte nicht ermittelt werden. Bitte die Adapterverbindung prüfen.")}})(),()=>{p=!1,x!==void 0&&clearTimeout(x)}},[o,r,l.path,l.needsAdminBackQuery]);const g=d?.instance===o&&d.key===r?d.url:null;return s.jsx(Gn,{title:l.title,subtitle:"Weiterleitung wird vorbereitet…",children:s.jsxs("section",{className:"nw-card nw-card--centered",children:[s.jsx("div",{className:`nw-status${g?" nw-status--ok":""}`,role:"status",children:h}),s.jsx("div",{className:"nw-actions-row nw-actions-row--centered",children:s.jsx("button",{className:"nw-button nw-button--primary",onClick:()=>{g&&Kt(g)},disabled:!g,type:"button",children:"Jetzt öffnen"})})]})})}function Fv(){for(const r of["localStorage","sessionStorage"])try{const l=window[r],o=[];for(let d=0;d<l.length;d+=1){const c=l.key(d);c&&c.startsWith("nexowatt-ui.licenseKey.")&&o.push(c)}o.forEach(d=>l.removeItem(d))}catch{}}function Wv(){return v.useEffect(()=>{Fv()},[]),s.jsx(Fr,{targetKey:"license"})}const Wi=["admin","installer"];function Bv(){const r=kn(),l=r?new URL(r).pathname:"",o=window.location.pathname,d=l&&o.startsWith(`${l}/`)?o.slice(l.length):o;return s.jsxs(_g,{children:[s.jsx(rt,{path:"/history-setup",element:s.jsx(Lt,{capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Historie einrichten",allowedRoles:Wi,children:s.jsx(vv,{})})}),s.jsx(rt,{path:"/arbitrage",element:s.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Arbitrage",allowedRoles:Wi,children:s.jsx(Ov,{})})}),s.jsx(rt,{path:"/partner-integrations/energyLedger",element:s.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Bilanz · Partnerfreigaben",allowedRoles:Wi,children:s.jsx(Uo,{appId:"energyLedger"})})}),s.jsx(rt,{path:"/partner-integrations/directMarketing",element:s.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Direktvermarktung · Partnerfreigaben",allowedRoles:Wi,children:s.jsx(Uo,{appId:"directMarketing"})})}),s.jsx(rt,{path:"/dynamic-grid",element:s.jsx(Lt,{embedded:!0,capability:"appcenter.open",requiredRole:"Installer oder Admin",title:"Dynamischer Netzanschluss",allowedRoles:Wi,children:s.jsx(_v,{})})}),s.jsx(rt,{path:"/nvp-topology",element:s.jsx(ff,{replace:!0,to:"/dynamic-grid"})}),s.jsx(rt,{path:"/mesh-coordinator",element:s.jsx(Lt,{capability:"mesh.configure",requiredRole:"Installer oder Admin",title:"Microgrid",children:d.startsWith("/ems/microgrid")?s.jsx(Bw,{}):s.jsx(Fr,{targetKey:"appcenter"})})}),s.jsx(rt,{path:"/notification-mail",element:s.jsx(Lt,{capability:"notifications.manage",requiredRole:"Admin",title:"E-Mail-Versand",children:s.jsx(dv,{})})}),s.jsx(rt,{element:s.jsx(Lt,{capability:"appcenter.open",title:"Installer",children:s.jsx(Sf,{})}),path:"/"}),s.jsx(rt,{element:s.jsx(Lt,{capability:"appcenter.open",title:"Installer",children:s.jsx(Sf,{})}),path:"/installer"}),s.jsx(rt,{element:s.jsx(Lt,{capability:"license.manage",requiredRole:"Admin",title:"Lizenz",children:s.jsx(Wv,{})}),path:"/license"}),s.jsx(rt,{element:s.jsx(Lt,{capability:"appcenter.open",title:"EMS App-Center",children:s.jsx(Fr,{targetKey:"appcenter"})}),path:"/redirect/appcenter"}),s.jsx(rt,{element:s.jsx(Lt,{capability:"simulation.open",title:"Simulation",children:s.jsx(Fr,{targetKey:"simulation"})}),path:"/redirect/simulation"}),s.jsx(rt,{element:s.jsx(Fr,{targetKey:"smarthome-config"}),path:"/redirect/smarthome-config"}),s.jsx(rt,{element:s.jsx(Fr,{targetKey:"smarthome-vis"}),path:"/redirect/smarthome-vis"}),s.jsx(rt,{element:s.jsx(ff,{replace:!0,to:"/installer"}),path:"*"})]})}const Eh=document.getElementById("root");if(!Eh)throw new Error("Admin-Anwendung kann nicht gestartet werden: Einbettung fehlt.");_m.createRoot(Eh).render(s.jsx(Ff.StrictMode,{children:s.jsx(Jg,{children:s.jsx(Bv,{})})}));
|