iobroker.eos-admin 9.0.18 → 9.0.19
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 +8 -9
- package/README.md +4 -2
- package/START_HIER_9.0.19.md +52 -0
- package/adminWww/.vite/manifest.json +114 -114
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13759 -13759
- package/adminWww/assets/{AdapterUpdateDialog-ByJk9Cxj.js → AdapterUpdateDialog-JOf2z4Vg.js} +1 -1
- package/adminWww/assets/{Adapters-V2JtEPZX.js → Adapters-C9fcSdWm.js} +1 -1
- package/adminWww/assets/{ConfigManager-BKcdyJnN.js → ConfigManager-BeeLlT6D.js} +1 -1
- package/adminWww/assets/{Enums-ChbfAWzp.js → Enums-FqnXWl8U.js} +1 -1
- package/adminWww/assets/{Fields-DzaVXEvg.js → Fields-DMgrt5Pi.js} +1 -1
- package/adminWww/assets/{Files-CRpIXj4X.js → Files-CIHtt12g.js} +1 -1
- package/adminWww/assets/{Hosts-rOgfd2wo.js → Hosts-fPLBzvTy.js} +1 -1
- package/adminWww/assets/{Instances-BxLhJ6Pb.js → Instances-4XaVQlrT.js} +1 -1
- package/adminWww/assets/{Intro-BOql527d.js → Intro-5TKriiLO.js} +1 -1
- package/adminWww/assets/{Logs-WUUDY7a4.js → Logs-33zcIds-.js} +1 -1
- package/adminWww/assets/{Objects-DYaZkCK7.js → Objects-CNQPVbNG.js} +1 -1
- package/adminWww/assets/{Overview-C6hiiPbm.js → Overview-BskXGOc8.js} +1 -1
- package/adminWww/assets/{State-AH43l7fG.js → State-C8SJ_Iqo.js} +1 -1
- package/adminWww/assets/{UsedResources-jhsRMH4X.js → UsedResources-CgqRa9ei.js} +1 -1
- package/adminWww/assets/{Users-D9wyLyJ1.js → Users-0JVYWR9u.js} +1 -1
- package/adminWww/assets/{bootstrap-gVLo1K_2.js → bootstrap-D16lu6rd.js} +3 -3
- package/adminWww/assets/{hostInit-Dt_M-NAC.js → hostInit-C8YZJuzi.js} +1 -1
- package/adminWww/assets/{icons-material-DuVW_EUA.js → icons-material-CiNJ_6Ur.js} +1 -1
- package/adminWww/assets/{index-B1cnPkSO.js → index-DA9Sphgh.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-GvgHjubR.js → installSVGRenderer-DPdkRa_d.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-6b32b635.js → mf-entry-bootstrap-0-a7ab91de.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.19.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosCookieNamespace.js +12 -2
- package/build/lib/eosCookieNamespace.js.map +1 -1
- package/build/lib/eosDeviceEmsPlan.js +432 -24
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosDeviceEmsService.js +106 -10
- package/build/lib/eosDeviceEmsService.js.map +1 -1
- package/build/lib/eosModuleHost.js +178 -53
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/web.js +19 -3
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.19/ALIAS_MESSWERTFRISCHE.md +31 -0
- package/docs/reports/unified-9.0.19/COMMISSIONING_PLAN_REVIEW.md +56 -0
- package/docs/reports/unified-9.0.19/EMS_ABSCHLUSSREVIEW.md +43 -0
- package/docs/reports/unified-9.0.19/EMS_KATEGORIEN_ABDECKUNG.md +66 -0
- package/docs/reports/unified-9.0.19/EMS_VERGLEICH_UND_KOPPLUNG.md +25 -0
- package/docs/reports/unified-9.0.19/EVCS_STATE_OBJECTS.md +47 -0
- package/docs/reports/unified-9.0.19/GERAETE_EMS_EINRICHTUNG.md +100 -0
- package/docs/reports/unified-9.0.19/GERAETE_STARTAUSFALL.md +37 -0
- package/docs/reports/unified-9.0.19/INSTALLER_LIFECYCLE_REVIEW.md +59 -0
- package/docs/reports/unified-9.0.19/LEGACY_REGRESSION_REVIEW.md +42 -0
- package/docs/reports/unified-9.0.19/MODBUS_AUTHORIZATION_READS.md +25 -0
- package/docs/reports/unified-9.0.19/PRUEFBERICHT.md +56 -0
- package/docs/reports/unified-9.0.19/RUNTIME_START_UEBERNAHME.md +33 -0
- package/docs/reports/unified-9.0.19/SMA_RECEIVER_LIFECYCLE.md +42 -0
- package/docs/reports/unified-9.0.19/STATIC_REVIEW_DE.md +11 -0
- package/docs/reports/unified-9.0.19/TARIFF_PRICE_VALUES_REVIEW.md +31 -0
- package/docs/reports/unified-9.0.19/TARIF_VIERTELSTUNDEN_RUNTIME.md +17 -0
- package/docs/reports/unified-9.0.19/UNABHAENGIGER_REVIEW.md +49 -0
- package/docs/reports/unified-9.0.19/raw/INDEX.json +751 -0
- package/docs/reports/unified-9.0.19/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.19/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.19/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.19/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.log +0 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.log +0 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-build.log +5 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-host-final.log +70 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-lease-918-before.log +26 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-lease-after.log +9 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-after.log +11 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-before.log +28 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-web-pipeline.log +22 -0
- package/docs/reports/unified-9.0.19/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.19/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.19/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.log +539 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-history-http.log +39 -0
- package/docs/reports/unified-9.0.19/raw/legacy-history-http.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.log +30 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.log +203 -0
- package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.log +18 -0
- package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.log +16 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-test-loader.cjs +47 -0
- package/docs/reports/unified-9.0.19/raw/lint-final.log +16 -0
- package/docs/reports/unified-9.0.19/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.19/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node22-tests-final.log +10719 -0
- package/docs/reports/unified-9.0.19/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.19/raw/node24-tests-final.log +1805 -0
- package/docs/reports/unified-9.0.19/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.19/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.19/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.log +11 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.log +68 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.19/raw/ui-security-final.result.json +14 -0
- package/io-package.json +8 -8
- package/modules/devices/admin/ems-assignment.d.ts +8 -2
- package/modules/devices/admin/ems-assignment.js +192 -30
- package/modules/devices/admin/host-bridge.js +36 -11
- package/modules/devices/admin/index.html +26 -5
- package/modules/devices/admin/index_m.js +87 -3
- package/modules/devices/admin/style.css +17 -4
- package/modules/devices/checks/emsAssignment.check.js +10 -6
- package/modules/devices/contracts.d.ts +1 -1
- package/modules/devices/index.js +54 -17
- package/modules/devices/lib/deviceAliasFreshness.js +65 -0
- package/modules/devices/lib/deviceRuntime.js +201 -127
- package/modules/devices/lib/drivers/modbus.js +18 -3
- package/modules/devices/lib/drivers/speedwire.js +42 -22
- package/modules/devices/test/deviceAliasFreshness.test.js +149 -0
- package/modules/devices/test/emsAssignmentUi.test.js +119 -11
- package/modules/devices/test/modbusAuthorizationReads.test.js +112 -0
- package/modules/devices/test/runtimeLiveness.test.js +1 -1
- package/modules/devices/test/speedwireLifecycle.test.js +118 -0
- package/modules/devices/tsconfig.alias-semantics.json +1 -1
- package/modules/devices/tsconfig.hosted.json +1 -1
- package/package.json +9 -7
- package/release-manifests/unified/build-environment.cdx.json +1483 -7370
- package/release-manifests/unified/files.json +295 -133
- package/release-manifests/unified/frontend.cdx.json +2688 -5952
- package/release-manifests/unified/installer.cdx.json +2053 -821
- package/release-manifests/unified/obsolete-admin-assets.json +88 -6
- package/release-manifests/unified/runtime.cdx.json +40 -3283
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +3 -3
- package/ui/docs/security/eslint-reviewed-findings.json +20 -20
- package/ui/ems/engine.js +54 -7
- package/ui/ems/module-manager.js +44 -21
- package/ui/ems/modules/core-limits.js +5 -3
- package/ui/ems/modules/energy-wallet.js +31 -32
- package/ui/ems/modules/storage-control.js +5 -4
- package/ui/ems/modules/tarif-vis.js +36 -24
- package/ui/ems/modules/tariff-provider.js +28 -6
- package/ui/ems/services/tariff-provider-registry.js +11 -8
- package/ui/io-package.json +1 -1
- package/ui/lib/customer-tariff.js +5 -1
- package/ui/lib/installer-lifecycle.js +134 -1
- package/ui/lib/storage-farm-overview.js +115 -0
- package/ui/lib/tariff-price.js +115 -0
- package/ui/main.js +202 -51
- package/ui/package.json +8 -2
- package/ui/www/app.js +47 -134
- package/ui/www/ems-apps.html +2 -0
- package/ui/www/ems-apps.js +14 -2
- package/ui/www/index.html +2 -0
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/power-measurements.js +62 -0
- package/ui/www/settings.html +2 -0
- package/ui/www/storagefarm-summary.css +17 -0
- package/ui/www/storagefarm-summary.js +136 -0
- package/ui/www/storagefarm.html +16 -1
- package/ui/www/storagefarm.js +10 -22
- package/ui/www/tariff-display.js +161 -0
- package/adminWww/remoteEntry-eos-9.0.18.js +0 -12
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 NexoWatt. All rights reserved.
|
|
3
|
+
* Confidential and Proprietary.
|
|
4
|
+
* Use, modification or distribution without express written permission is prohibited.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
|
+
*
|
|
9
|
+
* Quelle: src-ts/runtime-executables/www/power-measurements.ts
|
|
10
|
+
* Quell-Hash: sha256:08b5c3d93c8c4aef0b4b0a39d20386eaa646690987358caf3c4eed5fc0dfc37e
|
|
11
|
+
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
|
+
*
|
|
13
|
+
* Zweck:
|
|
14
|
+
* Diese JavaScript-Datei ist das ausführbare Build-Artefakt für www/power-measurements.js.
|
|
15
|
+
* Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
|
|
16
|
+
* Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
|
|
17
|
+
*
|
|
18
|
+
* Pflege-Regel:
|
|
19
|
+
* 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
|
|
20
|
+
* 2. npm run sync:ts-runtime-executables ausführen.
|
|
21
|
+
* 3. npm run test:runtime-executables prüfen.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* NexoWatt Quellcode-Erklärung (DE)
|
|
25
|
+
* Aufgabe: Vereinheitlicht die Anzeige realer Ladeleistungen und die Prüfung
|
|
26
|
+
* von Leistungs-Datenpunkten im Dashboard und im EMS-AppCenter.
|
|
27
|
+
* Daten und Wirkung: Liest nur Messwerte und Metadaten. Ein gültiger manuell
|
|
28
|
+
* zugeordneter Leistungswert bleibt maßgeblich; boolesche Zustände und fehlende
|
|
29
|
+
* Proben werden nicht als Watt oder künstliche Nullwerte ausgegeben.
|
|
30
|
+
* Zusammenhang: app.ts verwendet dieselbe Quellenauswahl für Karte und
|
|
31
|
+
* Energiefluss; ems-apps.ts meldet unpassende Datentypen und Einheiten.
|
|
32
|
+
* Bei Änderungen: Echte Nullwerte, manuelle Zuordnungen, ungültige Statuswerte,
|
|
33
|
+
* Aggregat-Fallback und die unabhängigen Browser-Vertragstests prüfen.
|
|
34
|
+
*/
|
|
35
|
+
(() => {
|
|
36
|
+
'use strict';
|
|
37
|
+
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
38
|
+
? value : {};
|
|
39
|
+
const number = (value) => typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
40
|
+
function resolveEvcsPower(input) {
|
|
41
|
+
const override = number(input.override);
|
|
42
|
+
if (input.overrideConfigured && override !== null)
|
|
43
|
+
return override;
|
|
44
|
+
return number(input.aggregate) ?? override ?? number(input.legacy);
|
|
45
|
+
}
|
|
46
|
+
function validatePowerReference(value) {
|
|
47
|
+
const info = record(value);
|
|
48
|
+
const common = record(info.common);
|
|
49
|
+
const state = record(info.state);
|
|
50
|
+
if (common.type !== 'number')
|
|
51
|
+
return { kind: 'error', text: 'Kein Leistungswert: Zahl in W/kW wählen' };
|
|
52
|
+
if (info.statePresent === true && number(state.val) === null)
|
|
53
|
+
return { kind: 'error', text: 'Kein gültiger Leistungs-Messwert' };
|
|
54
|
+
const unit = typeof common.unit === 'string' ? common.unit.trim().toLowerCase() : '';
|
|
55
|
+
if (unit && unit !== 'w' && unit !== 'kw')
|
|
56
|
+
return { kind: 'error', text: 'Falsche Einheit: Leistung in W/kW wählen' };
|
|
57
|
+
if (!unit)
|
|
58
|
+
return { kind: 'warn', text: 'Einheit fehlt: W/kW-Zuordnung prüfen' };
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
Reflect.set(window, 'NexoWattPowerMeasurements', Object.freeze({ resolveEvcsPower, validatePowerReference }));
|
|
62
|
+
})();
|
package/ui/www/settings.html
CHANGED
|
@@ -74,6 +74,8 @@
|
|
|
74
74
|
<!-- Inhalt bewusst leer: Einstellungen werden als eigener Bereich darunter gerendert -->
|
|
75
75
|
</main>
|
|
76
76
|
|
|
77
|
+
<script src="/static/power-measurements.js"></script>
|
|
78
|
+
<script src="/static/tariff-display.js"></script>
|
|
77
79
|
<script src="/static/app.js"></script>
|
|
78
80
|
|
|
79
81
|
<section class="settings-wrap nw-page-shell nw-settings-page-shell" data-tab-content="settings" data-settings-page="general">
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* Copyright (c) 2026 NexoWatt. Confidential and proprietary. */
|
|
2
|
+
.nw-farm-summary { margin: 20px 0 24px; }
|
|
3
|
+
.nw-farm-summary__heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
|
|
4
|
+
.nw-farm-summary__heading h3 { margin: 0; font-size: 1.1rem; color: #e5f5f5; }
|
|
5
|
+
.nw-farm-members { border: 1px solid #245a5b; background: #0a302d; color: #a5f1d4; padding: 7px 12px; border-radius: 999px; font-size: .8rem; }
|
|
6
|
+
.nw-farm-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
|
|
7
|
+
.nw-farm-metric { border: 1px solid #244251; border-radius: 16px; padding: 18px; min-width: 0; background: linear-gradient(135deg, #0a2430, #071722); border-top: 2px solid #35d9ad; }
|
|
8
|
+
.nw-farm-metric h4 { margin: 0 0 12px; font-size: .85rem; font-weight: 600; color: #b5ced8; }
|
|
9
|
+
.nw-farm-metric strong { display: block; margin-bottom: 8px; font-size: clamp(1.35rem, 2.2vw, 2.1rem); letter-spacing: -.02em; color: #f1fbfa; overflow-wrap: anywhere; }
|
|
10
|
+
.nw-farm-metric small { display: block; color: #a7c0cb; font-size: .76rem; line-height: 1.45; }
|
|
11
|
+
#sf_metric_soc { border-top-color: #9b91ff; } #sf_metric_pv { border-top-color: #f5c76c; }
|
|
12
|
+
#sf_metric_charge { border-top-color: #55c7fa; } #sf_metric_discharge { border-top-color: #f2a68c; }
|
|
13
|
+
.nw-farm-metric[data-quality="partial"], .nw-farm-metric[data-quality="missing"] { border-top-color: #dfb967; }
|
|
14
|
+
.nw-farm-metric[data-quality="stale"] { opacity: .75; border-top-color: #ad8790; }
|
|
15
|
+
.nw-farm-summary__hint { color: #bacbd2; font-size: .82rem; line-height: 1.5; margin: 14px 0 0; }
|
|
16
|
+
@media (max-width: 900px) { .nw-farm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
17
|
+
@media (max-width: 460px) { .nw-farm-metrics { grid-template-columns: 1fr; } .nw-farm-metric { padding: 16px; } }
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 NexoWatt. All rights reserved.
|
|
3
|
+
* Confidential and Proprietary.
|
|
4
|
+
* Use, modification or distribution without express written permission is prohibited.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
|
+
*
|
|
9
|
+
* Quelle: src-ts/runtime-executables/www/storagefarm-summary.ts
|
|
10
|
+
* Quell-Hash: sha256:9ef2696d6a9308fc938ae02d7e64191aa6ea6b71ca3437ffdb50be0d59963d60
|
|
11
|
+
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
|
+
*
|
|
13
|
+
* Zweck:
|
|
14
|
+
* Diese JavaScript-Datei ist das ausführbare Build-Artefakt für www/storagefarm-summary.js.
|
|
15
|
+
* Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
|
|
16
|
+
* Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
|
|
17
|
+
*
|
|
18
|
+
* Pflege-Regel:
|
|
19
|
+
* 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
|
|
20
|
+
* 2. npm run sync:ts-runtime-executables ausführen.
|
|
21
|
+
* 3. npm run test:runtime-executables prüfen.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* NexoWatt Quellcode-Erklärung (DE)
|
|
25
|
+
* Aufgabe: Zeigt die atomare Speicherfarm-Gesamtübersicht in der Kundenansicht.
|
|
26
|
+
* Daten und Wirkung: Liest ausschließlich storageFarm.overviewJson. Berechnet
|
|
27
|
+
* keine Regelwerte; Vollsummen erscheinen nur bei bestätigter Messabdeckung.
|
|
28
|
+
* SoC ist ausdrücklich ein arithmetischer Mittelwert, keine Energiegewichtung.
|
|
29
|
+
* Bei Änderungen: Nullwerte, Teilabdeckung, Alterung und Verbindungsverlust testen.
|
|
30
|
+
*/
|
|
31
|
+
(() => {
|
|
32
|
+
const staleAfterMs = 30000;
|
|
33
|
+
const isRecord = (value) => !!value && typeof value === 'object' && !Array.isArray(value);
|
|
34
|
+
const own = (value, key) => Object.hasOwn(value, key) ? Reflect.get(value, key) : undefined;
|
|
35
|
+
const finite = (value) => typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
36
|
+
function count(value) {
|
|
37
|
+
if (typeof value !== 'number' || !Number.isInteger(value) || value < 0 || value > 128)
|
|
38
|
+
throw new Error('FARM_COUNT_INVALID');
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
function coverage(value) {
|
|
42
|
+
if (!isRecord(value))
|
|
43
|
+
throw new Error('FARM_COVERAGE_INVALID');
|
|
44
|
+
const valid = count(value.valid), total = count(value.total);
|
|
45
|
+
if (valid > total || typeof value.complete !== 'boolean')
|
|
46
|
+
throw new Error('FARM_COVERAGE_INVALID');
|
|
47
|
+
return { ...value, valid, total, complete: value.complete && valid === total && total > 0 };
|
|
48
|
+
}
|
|
49
|
+
function decode(snapshot) {
|
|
50
|
+
try {
|
|
51
|
+
if (!isRecord(snapshot))
|
|
52
|
+
return null;
|
|
53
|
+
const entry = own(snapshot, 'storageFarm.overviewJson');
|
|
54
|
+
if (!isRecord(entry))
|
|
55
|
+
return null;
|
|
56
|
+
const raw = entry.value;
|
|
57
|
+
if (typeof raw !== 'string' || raw.length > 16384)
|
|
58
|
+
return null;
|
|
59
|
+
const data = JSON.parse(raw);
|
|
60
|
+
if (!isRecord(data) || data.v !== 1 || !isRecord(data.members))
|
|
61
|
+
return null;
|
|
62
|
+
const updatedAt = finite(data.updatedAt);
|
|
63
|
+
if (updatedAt === null || updatedAt <= 0)
|
|
64
|
+
return null;
|
|
65
|
+
const total = count(data.members.total), fresh = count(data.members.fresh);
|
|
66
|
+
if (fresh > total)
|
|
67
|
+
return null;
|
|
68
|
+
const battery = coverage(data.battery), soc = coverage(data.soc), capacity = coverage(data.capacity), pv = coverage(data.pv);
|
|
69
|
+
if (battery.total !== total || soc.total !== total || capacity.total !== total)
|
|
70
|
+
return null;
|
|
71
|
+
const socValue = finite(soc.meanPct);
|
|
72
|
+
return { updatedAt, members: { total, fresh },
|
|
73
|
+
battery: { ...battery, netW: finite(battery.netW), chargeW: finite(battery.chargeW), dischargeW: finite(battery.dischargeW) },
|
|
74
|
+
soc: { ...soc, meanPct: socValue !== null && socValue >= 0 && socValue <= 100 ? socValue : null },
|
|
75
|
+
capacity: { ...capacity, totalKWh: finite(capacity.totalKWh), knownKWh: finite(capacity.knownKWh) },
|
|
76
|
+
pv: { ...pv, powerW: finite(pv.powerW) } };
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function format(value, unit) {
|
|
83
|
+
return value.toLocaleString('de-DE', { maximumFractionDigits: 1 }) + ' ' + unit;
|
|
84
|
+
}
|
|
85
|
+
function power(value) {
|
|
86
|
+
if (value === null)
|
|
87
|
+
return '—';
|
|
88
|
+
if (Math.abs(value) >= 1000000)
|
|
89
|
+
return format(value / 1000000, 'MW');
|
|
90
|
+
if (Math.abs(value) >= 1000)
|
|
91
|
+
return format(value / 1000, 'kW');
|
|
92
|
+
return format(Math.round(value), 'W');
|
|
93
|
+
}
|
|
94
|
+
function text(id, value) { const element = document.getElementById(id); if (element)
|
|
95
|
+
element.textContent = value; }
|
|
96
|
+
function card(key, label, value, detail, quality) {
|
|
97
|
+
text(`sf_${key}_label`, label);
|
|
98
|
+
text(`sf_${key}_value`, value);
|
|
99
|
+
text(`sf_${key}_detail`, detail);
|
|
100
|
+
const element = document.getElementById(`sf_metric_${key}`);
|
|
101
|
+
if (element)
|
|
102
|
+
element.dataset.quality = quality;
|
|
103
|
+
}
|
|
104
|
+
function render(snapshot, connected, now = Date.now()) {
|
|
105
|
+
const data = decode(snapshot);
|
|
106
|
+
const current = !!data && connected && now - data.updatedAt <= staleAfterMs && data.updatedAt <= now + 5000;
|
|
107
|
+
const unavailable = !data ? 'Noch keine bestätigte Gesamtübersicht' : !connected ? 'Verbindung unterbrochen' : 'Messübersicht veraltet';
|
|
108
|
+
const quality = !data ? 'missing' : 'stale';
|
|
109
|
+
const members = data ? data.members.total : null;
|
|
110
|
+
text('sf_members', members === null ? '— / — aktuell' : `${current ? data?.members.fresh ?? 0 : 0} / ${members} aktuell`);
|
|
111
|
+
const fullBattery = current && data?.battery.complete === true && data.battery.netW !== null && data.battery.chargeW !== null && data.battery.chargeW >= 0 && data.battery.dischargeW !== null && data.battery.dischargeW >= 0;
|
|
112
|
+
const batteryDetail = data ? `${current ? data.battery.valid : 0} / ${data.battery.total} aktuelle Batteriemessungen` : unavailable;
|
|
113
|
+
const net = fullBattery ? data.battery.netW : null;
|
|
114
|
+
const netText = net === null ? '—' : net > 0 ? `Entladen ${power(net)}` : net < 0 ? `Laden ${power(-net)}` : power(0);
|
|
115
|
+
const batteryQuality = !current ? quality : fullBattery ? 'complete' : 'partial';
|
|
116
|
+
const detail = !current ? unavailable : fullBattery ? batteryDetail : `${batteryDetail} · keine vollständige Summe`;
|
|
117
|
+
card('net', 'Batterieleistung netto', netText, detail, batteryQuality);
|
|
118
|
+
card('charge', 'Ladeleistung gesamt', power(fullBattery ? data.battery.chargeW : null), detail, batteryQuality);
|
|
119
|
+
card('discharge', 'Entladeleistung gesamt', power(fullBattery ? data.battery.dischargeW : null), detail, batteryQuality);
|
|
120
|
+
const hasSoc = current && data !== null && data.soc.valid > 0 && data.soc.meanPct !== null;
|
|
121
|
+
card('soc', hasSoc && !data.soc.complete ? 'Ø Ladezustand · Teilmittel' : 'Ø Ladezustand', hasSoc ? format(data.soc.meanPct, '%') : '—', !current ? unavailable : `${data?.soc.valid ?? 0} / ${data?.soc.total ?? 0} aktuelle SoC-Werte · arithmetisch, nicht kapazitätsgewichtet`, !current ? quality : data?.soc.complete && hasSoc ? 'complete' : hasSoc ? 'partial' : 'missing');
|
|
122
|
+
const capacity = data?.capacity;
|
|
123
|
+
const capacityValue = capacity?.complete ? capacity.totalKWh : capacity?.knownKWh;
|
|
124
|
+
const hasCapacity = capacityValue !== null && capacityValue !== undefined && capacityValue > 0;
|
|
125
|
+
card('capacity', capacity?.complete ? 'Gesamtkapazität' : 'Bekannte Kapazität', hasCapacity ? format(capacityValue, 'kWh') : '—', capacity ? `${capacity.valid} / ${capacity.total} Kapazitäten hinterlegt${current ? '' : ' · zuletzt bestätigte Konfiguration'}` : unavailable, !hasCapacity ? 'missing' : capacity?.complete ? 'complete' : 'partial');
|
|
126
|
+
const fullPv = current && data?.pv.complete === true && data.pv.powerW !== null && data.pv.powerW >= 0;
|
|
127
|
+
card('pv', 'PV-Leistung gesamt', power(fullPv ? data.pv.powerW : null), !current ? unavailable : data?.pv.total === 0 ? 'Keine PV-Quelle zugeordnet' : `${data?.pv.valid ?? 0} / ${data?.pv.total ?? 0} eindeutige PV-Quellen aktuell${fullPv ? '' : ' · keine vollständige Summe'}`, !current ? quality : fullPv ? 'complete' : data?.pv.total ? 'partial' : 'missing');
|
|
128
|
+
const partial = current && data && (!data.battery.complete || !data.soc.complete || !data.capacity.complete || data.pv.total > 0 && !data.pv.complete);
|
|
129
|
+
text('sf_summary', !current ? unavailable : `${data?.members.fresh ?? 0} von ${members ?? 0} Mitgliedern aktuell${partial ? ' · Teilübersicht' : ''}`);
|
|
130
|
+
text('sf_aggregate_hint', !current ? `${unavailable}. Leistungs- und SoC-Werte werden nicht als aktuell ausgegeben.`
|
|
131
|
+
: partial ? 'Nicht alle Werte liegen vollständig vor. Teilsummen und Teilmittel sind ausdrücklich markiert; vollständige Leistungswerte bleiben bis zur Messabdeckung offen.'
|
|
132
|
+
: 'Aktuelle Gesamtübersicht. Batterieleistung und PV-Erzeugung werden getrennt gezeigt; Ø SoC ist ein arithmetischer Mittelwert.');
|
|
133
|
+
}
|
|
134
|
+
const target = window;
|
|
135
|
+
target.NWStorageFarmSummary = Object.freeze({ render });
|
|
136
|
+
})();
|
package/ui/www/storagefarm.html
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
|
35
35
|
<title>NexoWatt EOS – Speicherfarm</title>
|
|
36
36
|
<link href="/static/styles.css" rel="stylesheet"/>
|
|
37
|
+
<link href="/static/storagefarm-summary.css" rel="stylesheet"/>
|
|
37
38
|
<script src="/static/nw-i18n.js" defer></script>
|
|
38
39
|
<script defer src="/eos-session-idle.js"></script>
|
|
39
40
|
</head>
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
<div>
|
|
80
81
|
<div class="nw-page-hero__eyebrow">Speicherfarm</div>
|
|
81
82
|
<h2>Speicherfarm</h2>
|
|
82
|
-
<small id="sf_summary">
|
|
83
|
+
<small id="sf_summary">Gesamtübersicht wird geladen …</small>
|
|
83
84
|
</div>
|
|
84
85
|
<div class="nw-storagefarm-actions">
|
|
85
86
|
<span id="sf_mode_label" class="nw-storagefarm-mode">Modus: --</span>
|
|
@@ -87,6 +88,19 @@
|
|
|
87
88
|
</div>
|
|
88
89
|
</div>
|
|
89
90
|
|
|
91
|
+
<section class="nw-farm-summary" aria-label="Speicherfarm Gesamtübersicht">
|
|
92
|
+
<div class="nw-farm-summary__heading"><h3>Gesamte Speicherfarm</h3><span id="sf_members" class="nw-farm-members">— / — aktuell</span></div>
|
|
93
|
+
<div class="nw-farm-metrics">
|
|
94
|
+
<article class="nw-farm-metric" id="sf_metric_capacity"><h4 id="sf_capacity_label">Gesamtkapazität</h4><strong id="sf_capacity_value">—</strong><small id="sf_capacity_detail">Noch keine bestätigten Daten</small></article>
|
|
95
|
+
<article class="nw-farm-metric" id="sf_metric_soc"><h4 id="sf_soc_label">Ø Ladezustand</h4><strong id="sf_soc_value">—</strong><small id="sf_soc_detail">Noch keine bestätigten Daten</small></article>
|
|
96
|
+
<article class="nw-farm-metric" id="sf_metric_net"><h4 id="sf_net_label">Batterieleistung netto</h4><strong id="sf_net_value">—</strong><small id="sf_net_detail">Noch keine bestätigten Daten</small></article>
|
|
97
|
+
<article class="nw-farm-metric" id="sf_metric_charge"><h4 id="sf_charge_label">Ladeleistung gesamt</h4><strong id="sf_charge_value">—</strong><small id="sf_charge_detail">Noch keine bestätigten Daten</small></article>
|
|
98
|
+
<article class="nw-farm-metric" id="sf_metric_discharge"><h4 id="sf_discharge_label">Entladeleistung gesamt</h4><strong id="sf_discharge_value">—</strong><small id="sf_discharge_detail">Noch keine bestätigten Daten</small></article>
|
|
99
|
+
<article class="nw-farm-metric" id="sf_metric_pv"><h4 id="sf_pv_label">PV-Leistung gesamt</h4><strong id="sf_pv_value">—</strong><small id="sf_pv_detail">Noch keine bestätigten Daten</small></article>
|
|
100
|
+
</div>
|
|
101
|
+
<p class="nw-farm-summary__hint" id="sf_aggregate_hint" role="status">Warte auf aktuelle Farmdaten.</p>
|
|
102
|
+
</section>
|
|
103
|
+
|
|
90
104
|
<div class="sf-table nw-storagefarm-table" role="table" aria-label="Speicherfarm Status">
|
|
91
105
|
<div class="nw-storagefarm-row nw-storagefarm-row--head" role="row">
|
|
92
106
|
<div role="columnheader">Speicher</div>
|
|
@@ -101,6 +115,7 @@
|
|
|
101
115
|
</section>
|
|
102
116
|
</main>
|
|
103
117
|
|
|
118
|
+
<script src="/static/storagefarm-summary.js"></script>
|
|
104
119
|
<script src="/static/storagefarm.js"></script>
|
|
105
120
|
<script src="/static/cockpit-shell.js"></script>
|
|
106
121
|
<script src="/static/pwa.js" defer></script>
|
package/ui/www/storagefarm.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/www/storagefarm.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:2595c1640ed238436c8dc2b3bafbf815d874da8708d635668c0318ed9a91b803
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
|
|
77
77
|
var state = {};
|
|
78
78
|
var pollTimer = null;
|
|
79
|
+
var aggregateTimer = null;
|
|
80
|
+
var liveConnected = false;
|
|
79
81
|
/**
|
|
80
82
|
* Code-Teil: el
|
|
81
83
|
* Zweck: Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen.
|
|
@@ -100,6 +102,7 @@
|
|
|
100
102
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
101
103
|
*/
|
|
102
104
|
function num(v) {
|
|
105
|
+
if (v === null || v === undefined || v === '' || typeof v === 'boolean') return null;
|
|
103
106
|
var n = Number(v);
|
|
104
107
|
return Number.isFinite(n) ? n : null;
|
|
105
108
|
}
|
|
@@ -150,6 +153,8 @@
|
|
|
150
153
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
151
154
|
*/
|
|
152
155
|
function setLive(ok) {
|
|
156
|
+
liveConnected = !!ok;
|
|
157
|
+
if (window.NWStorageFarmSummary) window.NWStorageFarmSummary.render(state, liveConnected);
|
|
153
158
|
var dot = el('liveDot');
|
|
154
159
|
if (dot) dot.classList.toggle('live', !!ok);
|
|
155
160
|
}
|
|
@@ -246,27 +251,7 @@
|
|
|
246
251
|
var mode = String(stateVal('storageFarm.mode') || 'pool').toLowerCase();
|
|
247
252
|
if (modeLabel) modeLabel.textContent = 'Modus: ' + (mode === 'groups' ? 'Gruppen' : 'Pool');
|
|
248
253
|
|
|
249
|
-
|
|
250
|
-
var net = stateVal('storageFarm.totalPowerW');
|
|
251
|
-
var chg = stateVal('storageFarm.totalChargePowerW');
|
|
252
|
-
var dchg = stateVal('storageFarm.totalDischargePowerW');
|
|
253
|
-
var pv = stateVal('storageFarm.totalPvPowerW');
|
|
254
|
-
var on = stateVal('storageFarm.storagesOnline');
|
|
255
|
-
var disp = stateVal('storageFarm.storagesDispatchAvailable');
|
|
256
|
-
var deg = stateVal('storageFarm.storagesDegraded');
|
|
257
|
-
var tot = stateVal('storageFarm.storagesTotal');
|
|
258
|
-
var socText = num(soc) === null ? '--' : num(soc).toFixed(1);
|
|
259
|
-
var netN = num(net);
|
|
260
|
-
if (netN === null) {
|
|
261
|
-
var chgN = num(chg);
|
|
262
|
-
var dchgN = num(dchg);
|
|
263
|
-
if (chgN !== null || dchgN !== null) netN = Math.max(0, dchgN || 0) - Math.max(0, chgN || 0);
|
|
264
|
-
}
|
|
265
|
-
var netText = netN === null ? '--' : (netN > 0 ? 'Entladen ' : (netN < 0 ? 'Laden ' : 'Neutral ')) + formatPower(Math.abs(netN));
|
|
266
|
-
var text = 'SoC Ø: ' + socText + ' % | Farm netto: ' + netText + ' | PV/WR: ' + formatPower(pv) + ' | Brutto Laden: ' + formatPower(chg) + ' | Brutto Entladen: ' + formatPower(dchg) + ' | Online: ' + (on !== undefined ? on : '--') + '/' + (tot !== undefined ? tot : '--') + ' | Regelbar: ' + (disp !== undefined ? disp : '--') + '/' + (tot !== undefined ? tot : '--');
|
|
267
|
-
if (deg !== undefined && Number(deg) > 0) text += ' | Degraded: ' + deg;
|
|
268
|
-
var summary = el('sf_summary');
|
|
269
|
-
if (summary) summary.textContent = text;
|
|
254
|
+
if (window.NWStorageFarmSummary) window.NWStorageFarmSummary.render(state, liveConnected);
|
|
270
255
|
}
|
|
271
256
|
/**
|
|
272
257
|
* Code-Teil: render
|
|
@@ -395,6 +380,9 @@
|
|
|
395
380
|
loadConfig();
|
|
396
381
|
loadState();
|
|
397
382
|
startEvents();
|
|
383
|
+
aggregateTimer = window.setInterval(function () { if (window.NWStorageFarmSummary) window.NWStorageFarmSummary.render(state, liveConnected); }, 5000);
|
|
384
|
+
window.addEventListener('pagehide', function () { if (aggregateTimer !== null) { window.clearInterval(aggregateTimer); aggregateTimer = null; } });
|
|
385
|
+
window.addEventListener('pageshow', function () { if (aggregateTimer === null) aggregateTimer = window.setInterval(function () { if (window.NWStorageFarmSummary) window.NWStorageFarmSummary.render(state, liveConnected); }, 5000); });
|
|
398
386
|
|
|
399
387
|
});
|
|
400
388
|
})();
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 NexoWatt. All rights reserved.
|
|
3
|
+
* Confidential and Proprietary.
|
|
4
|
+
* Use, modification or distribution without express written permission is prohibited.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
|
+
*
|
|
9
|
+
* Quelle: src-ts/runtime-executables/www/tariff-display.ts
|
|
10
|
+
* Quell-Hash: sha256:452005ed20fb9bbb6e0c73b4175e857fd34a9a3412714a5da8d049878ad80fb6
|
|
11
|
+
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
|
+
*
|
|
13
|
+
* Zweck:
|
|
14
|
+
* Diese JavaScript-Datei ist das ausführbare Build-Artefakt für www/tariff-display.js.
|
|
15
|
+
* Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
|
|
16
|
+
* Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
|
|
17
|
+
*
|
|
18
|
+
* Pflege-Regel:
|
|
19
|
+
* 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
|
|
20
|
+
* 2. npm run sync:ts-runtime-executables ausführen.
|
|
21
|
+
* 3. npm run test:runtime-executables prüfen.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* NexoWatt Quellcode-Erklärung (DE)
|
|
25
|
+
* Aufgabe: Stellt echte Tarifintervalle und bestätigte Preise im Dashboard dar.
|
|
26
|
+
* Daten und Wirkung: Liest nur öffentliche Preisstates und Quellmetadaten; die
|
|
27
|
+
* Anzeige aktiviert keine Tarifoptimierung. EUR-Quellen werden nicht anhand
|
|
28
|
+
* der Preisgröße in Cent umgedeutet. Null, boolesche und veraltete Werte fehlen.
|
|
29
|
+
* Bei Änderungen: Viertelstunden, Sommerzeit, Null-/Negativpreise, Einheiten,
|
|
30
|
+
* nicht verfügbare Quellen und abgeschaltete Optimierung getrennt prüfen.
|
|
31
|
+
*/
|
|
32
|
+
(() => {
|
|
33
|
+
const rec = (value) => value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
34
|
+
const own = (value, key) => Object.hasOwn(value, key) ? Reflect.get(value, key) : undefined;
|
|
35
|
+
function finite(value) {
|
|
36
|
+
if (typeof value !== 'number' && typeof value !== 'string')
|
|
37
|
+
return null;
|
|
38
|
+
if (typeof value === 'string') {
|
|
39
|
+
const text = value.trim();
|
|
40
|
+
if (!text || text.length > 64 || [...text].some(character => !'0123456789eE+-.'.includes(character)))
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const result = Number(value);
|
|
44
|
+
return Number.isFinite(result) ? result : null;
|
|
45
|
+
}
|
|
46
|
+
function euro(value, unit = 'auto') {
|
|
47
|
+
const number = finite(value);
|
|
48
|
+
if (number === null)
|
|
49
|
+
return null;
|
|
50
|
+
const label = typeof unit === 'string' ? unit.toLowerCase().replace(/\s/g, '') : 'auto';
|
|
51
|
+
if (['eur', '€', 'eur/kwh', '€/kwh'].includes(label))
|
|
52
|
+
return number;
|
|
53
|
+
if (['ct', 'cent', 'ct/kwh', 'cent/kwh'].includes(label))
|
|
54
|
+
return number / 100;
|
|
55
|
+
if (['eur/mwh', '€/mwh'].includes(label))
|
|
56
|
+
return number / 1000;
|
|
57
|
+
if (label && label !== 'auto')
|
|
58
|
+
return null;
|
|
59
|
+
// Nur untypisierte Alt-Zuordnungen behalten ihre bisherige Einheitenkonvention.
|
|
60
|
+
return Math.abs(number) >= 10 ? number / 100 : number;
|
|
61
|
+
}
|
|
62
|
+
function format(value) { const number = finite(value); return number === null ? '--' : `${number.toFixed(3)} €/kWh`; }
|
|
63
|
+
function decoded(value) {
|
|
64
|
+
if (typeof value !== 'string')
|
|
65
|
+
return value;
|
|
66
|
+
if (value.length > 2000000)
|
|
67
|
+
return null;
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(value);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function time(value) {
|
|
76
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
77
|
+
return value < 1e12 ? value * 1000 : value;
|
|
78
|
+
if (typeof value === 'string') {
|
|
79
|
+
const result = Date.parse(value);
|
|
80
|
+
return Number.isFinite(result) ? result : null;
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
function parseCurve(raw) {
|
|
85
|
+
const decodedRows = decoded(raw);
|
|
86
|
+
const wrapper = rec(decodedRows);
|
|
87
|
+
const rows = Array.isArray(decodedRows) ? decodedRows : wrapper.prices ?? wrapper.data ?? wrapper.items ?? wrapper.values;
|
|
88
|
+
if (!Array.isArray(rows) || rows.length > 1000)
|
|
89
|
+
return [];
|
|
90
|
+
const pending = [];
|
|
91
|
+
for (const input of rows) {
|
|
92
|
+
const row = rec(input);
|
|
93
|
+
const nested = rec(row.price);
|
|
94
|
+
const price = row.total ?? nested.total ?? nested.value ?? row.price ?? row.value ?? row.marketprice ?? row.marketPrice ?? row.energyPrice;
|
|
95
|
+
// Tibber und der normalisierte EOS-Vertrag geben total in EUR/kWh aus.
|
|
96
|
+
const unit = row.unit ?? row.currency ?? (row.total !== undefined && row.startsAt !== undefined ? 'EUR/kWh' : 'auto');
|
|
97
|
+
const priceEurKwh = euro(price, unit);
|
|
98
|
+
const startMs = time(row.startsAt ?? row.start ?? row.startTime ?? row.from ?? row.begin ?? row.timestamp ?? row.time);
|
|
99
|
+
const endMs = time(row.endsAt ?? row.end ?? row.endTime ?? row.to ?? row.until);
|
|
100
|
+
if (priceEurKwh === null || startMs === null)
|
|
101
|
+
continue;
|
|
102
|
+
pending.push({ startMs, endMs: endMs !== null && endMs > startMs ? endMs : null, priceEurKwh });
|
|
103
|
+
}
|
|
104
|
+
pending.sort((a, b) => a.startMs - b.startMs);
|
|
105
|
+
return pending.map((row, index) => {
|
|
106
|
+
const next = pending.at(index + 1);
|
|
107
|
+
const previous = pending.at(index - 1);
|
|
108
|
+
const observed = next ? next.startMs - row.startMs : previous ? row.startMs - previous.startMs : 3600000;
|
|
109
|
+
const inferredDuration = observed > 0 && observed <= 3600000 ? observed : 3600000;
|
|
110
|
+
return { ...row, endMs: row.endMs ?? row.startMs + inferredDuration };
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function dayRange(now) {
|
|
114
|
+
const start = new Date(now);
|
|
115
|
+
start.setHours(0, 0, 0, 0);
|
|
116
|
+
const end = new Date(start);
|
|
117
|
+
end.setDate(end.getDate() + 1);
|
|
118
|
+
return { startMs: start.getTime(), endMs: end.getTime() };
|
|
119
|
+
}
|
|
120
|
+
function resolution(curve) {
|
|
121
|
+
if (!curve.length)
|
|
122
|
+
return '';
|
|
123
|
+
const durations = new Set(curve.map(row => row.endMs - row.startMs));
|
|
124
|
+
if (durations.size !== 1)
|
|
125
|
+
return 'Originalintervalle';
|
|
126
|
+
const minutes = (curve[0]?.endMs ?? 0) - (curve[0]?.startMs ?? 0);
|
|
127
|
+
return minutes > 0 && minutes % 60000 === 0 ? `${minutes / 60000}-Minuten-Preise` : 'Originalintervalle';
|
|
128
|
+
}
|
|
129
|
+
function display(snapshot, metadata, now = Date.now(), connected = true) {
|
|
130
|
+
if (!connected)
|
|
131
|
+
return { current: null, average: null, status: 'Verbindung unterbrochen – Preis nicht bestätigt' };
|
|
132
|
+
const states = rec(snapshot), info = rec(metadata);
|
|
133
|
+
const entry = (key) => rec(own(states, key));
|
|
134
|
+
const value = (key) => entry(key).value;
|
|
135
|
+
const fresh = (row, maxAge) => {
|
|
136
|
+
const timestamp = finite(row.ts);
|
|
137
|
+
return timestamp !== null && timestamp <= now + 5000 && now - timestamp <= maxAge;
|
|
138
|
+
};
|
|
139
|
+
const provider = rec(decoded(value('tariffProvider.statusJson')));
|
|
140
|
+
const providerFresh = provider.fresh === true && fresh({ ts: provider.ts }, 30000);
|
|
141
|
+
function price(average) {
|
|
142
|
+
const source = average ? info.averageSource : info.currentSource;
|
|
143
|
+
if (source === 'none')
|
|
144
|
+
return null;
|
|
145
|
+
if (source === 'provider')
|
|
146
|
+
return providerFresh ? euro(average ? provider.averagePriceEurPerKwh : provider.currentPriceEurPerKwh, 'EUR/kWh') : null;
|
|
147
|
+
if (value('tarif.currentPriceFresh') === false)
|
|
148
|
+
return null;
|
|
149
|
+
const key = average ? 'priceAverage' : 'priceCurrent';
|
|
150
|
+
const mapped = entry(key);
|
|
151
|
+
const unit = average ? info.averageUnit : info.currentUnit;
|
|
152
|
+
if (fresh(mapped, average ? 86400000 : 5400000))
|
|
153
|
+
return euro(mapped.value, unit ?? 'auto');
|
|
154
|
+
const canonical = entry(average ? 'tarif.preisDurchschnittEurProKwh' : 'tarif.preisAktuellEurProKwh');
|
|
155
|
+
return value('tarif.currentPriceFresh') === true && fresh(canonical, average ? 86400000 : 5400000) ? euro(canonical.value, 'EUR/kWh') : null;
|
|
156
|
+
}
|
|
157
|
+
const current = price(false), average = price(true);
|
|
158
|
+
return { current, average, status: current === null ? 'Aktuell kein bestätigter Preis verfügbar' : 'Preis verfügbar; Optimierung separat einstellbar' };
|
|
159
|
+
}
|
|
160
|
+
Reflect.set(window, 'NexoWattTariffDisplay', Object.freeze({ euro, format, parseCurve, dayRange, resolution, display }));
|
|
161
|
+
})();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./assets/vite-preload-helper-BbbETgeG.js";import{xc as t}from"./assets/loadShare-eager-dmdYQhAl.js";import{t as n}from"./assets/helpers-C0aN90O2.js";var r={};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var i=`__mf_init__virtual:mf:__mfe_internal__iobroker_admin__mf_owner__61128851699218__mf_v__runtimeInit__mf_v__.js__`,a=globalThis[i];if(!a){let e,t,n=new Promise((n,r)=>{e=n,t=r});a=globalThis[i]={initPromise:n,initResolve:e,initReject:t}}var o=a.initResolve,{initReject:s}=a,c=e=>{throw s(e),e},l=`__mf_module_cache__`;globalThis[l]||={share:{},remote:{}},globalThis[l].share||={},globalThis[l].remote||={};var u=globalThis[l];for(let e of Object.keys(u.share))if(e.startsWith(`default:`)){let t=e.slice(8);u.share[t]===void 0&&(u.share[t]=u.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;u.share[t]===void 0&&(u.share[t]=u.share[e])}var d={},f=Array.isArray(`default`)?`default`:[`default`],p=`default`,m=`iobroker_admin`,h=[[`react`,`leaflet`,`semver`],[`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`],[`react-dom/client`,`@emotion/styled`,`react-ace`],[`@mui/material`],[`@iobroker/gui-components`,`@mui/x-date-pickers`],[`@iobroker/json-config`],[`@iobroker/dm-gui-components`]],g,_;async function v(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var y=Symbol(`mf.originalSharedProvider`),b={emit:e=>e},x=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],S=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[y]:r});return n},C=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&(e==null?void 0:e.from)===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},w=(e,t,r,i)=>{var a;if(!e||!r)return;let o=Object.fromEntries(Object.entries(e).filter(([,e])=>{var t;return(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}));if(Object.keys(o).length===0)return;let s=x(r),c=S(o,i),l={};for(let e of s)l[e||`default`]={[t]:c};let u=(a=n.getRegisteredShare(l,t,{...r,scope:s,strategy:i},b))==null?void 0:a.shared;return(u==null?void 0:u[y])||u},T=(e,t,n,r)=>{var i;let a=e=>E(e,n),o=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>{var t;return!a(e)&&(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}));n!=null&&n.version&&((i=n.shareConfig)==null?void 0:i.import)!==!1&&(o[n.version]||(o[n.version]=n));let s=w(o,t,n,r);return a(s)?void 0:s},E=(e,t)=>e===t||!!(t!=null&&t.from&&(e==null?void 0:e.from)===t.from),D=(e,t,n,r,i,a,o,s,c)=>{var l,u;if(c!==`version-first`||!s)return;let d=t==null||(l=t.options)==null||(l=l.shared)==null?void 0:l[i],f=Array.isArray(d)?d.find(e=>(e==null?void 0:e.version)===a):void 0,p=((s==null?void 0:s.from)===(t==null||(u=t.options)==null?void 0:u.name)?s:void 0)||(E(f,s)?f:t?void 0:s);if(p)return e.some(e=>{var i,a;return e!==t&&(e==null||(i=e.options)==null?void 0:i.name)===(o==null?void 0:o.from)&&(e==null||(a=e.shareScopeMap)==null?void 0:a[r])===n})?p:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?D(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||E(u,s)))return{provider:u,scopeRootProvider:l}};async function O(){return g||=v(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-DMV_e2iP.js`),[],import.meta.url)).catch(e=>{throw g=void 0,e}),g}async function k(){return r}async function A(e={},n=[],r={}){var i,s;let l=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},g=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},y=Symbol.for(`module-federation.shared-cache-listeners`),b=Symbol.for(`module-federation.shared-cache-owners`),x=e=>{let t=e[b];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,b,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},S=(e,t)=>{var n;return(n=e[b])==null?void 0:n[t.canonical]},D=e=>{let t=[e,e==null?void 0:e.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},k=(e,t)=>{if(e===t)return!0;let n=D(e),r=D(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},A=(e,t,n,r)=>{var i;let a=g(e,t);if(a!==void 0&&k(a,n))return n;e[t.canonical]=n;let o=t.aliases||[];for(let t of o)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let s=e[b];r===void 0?s&&delete s[t.canonical]:x(e)[t.canonical]=r;let c=(i=e[y])==null?void 0:i[t.canonical];if(c)for(let e of c)e(n);return n},j=Symbol.for(`module-federation.tree-shaking-shared-cache`),M=e=>{let t=e[j];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,j,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},N=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=M(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},P=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),F=e=>{let t=e[P];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,P,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},I=(e,t,n)=>{var r;let i=g(e,t);return i===void 0?(r=e[P])==null||(r=r[t.canonical])==null?void 0:r[n]:i},L=(e,t,n,r)=>{let i=F(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},R=((i=globalThis.__FEDERATION__)==null?void 0:i.__INSTANCES__)||[],te=(s=n.find(e=>e==null?void 0:e.from))==null?void 0:s.from,ne=R.find(t=>{var n,r;return(t==null||(n=t.options)==null?void 0:n.name)===te&&(t==null||(r=t.shareScopeMap)==null?void 0:r.default)===e})||R.find(t=>{var n,r;return(t==null||(n=t.options)==null?void 0:n.name)!==m&&(t==null||(r=t.shareScopeMap)==null?void 0:r.default)===e}),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{var n;for(let[i,a]of Object.entries(((n=q.shareScopeMap)==null?void 0:n[e])||{}))for(let[e,n]of Object.entries(a||{})){var r;if(!n||n.get===((r=B[i])==null?void 0:r.get))continue;let a=t[i]||={};a[e]===void 0&&(a[e]=n)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(V)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},z=Object.create(null);for(let[t,n]of Object.entries(e)){let e=z[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:B,usedRemotes:ce}=await O();function V(e){if(typeof(e==null?void 0:e.get)!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(z).some(e=>Object.values(e||{}).some(V)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},H=(t,n,r,i)=>{if(typeof T!=`function`)return;let a=ue(t),o=!i||a===t?[[t,n]]:[[t,n],[a,B[a]]];for(let[n,i]of o){if(!i)continue;let a=T(r?n===t?r:z[n]:z[n]??e[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=H(e,t,n,!0);return r&&V(r)&&!r.lib&&!r.loaded?r:void 0};var U=d[p];if(U||=d[p]={from:m},n.indexOf(U)>=0)return;n.push(U);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],W=`__mf_vite_runtime_share_load_id__`,he=0,G=new Map,K=new Map,q=t({name:m,remotes:ce,shared:B,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});q.initShareScopeMap(`default`,oe(`default`,e));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){var t;let n=(t=e.shareInfo)==null?void 0:t[W],r=n===void 0?void 0:K.get(n);if(!r)return e;let i=e.resolver;return e.resolver=(...e)=>(r.pinned.reapply(),i(...e)),r.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=q.sharedHandler.hooks.lifecycle.resolveShare;if(!q.__mfKeepAdoptedProviders){var J,ye;q.__mfKeepAdoptedProviders=!0,(J=q.sharedHandler)==null||(J=J.hooks)==null||(J=J.lifecycle)==null||(J=J.afterRegisterShare)==null||(ye=J.on)==null||ye.call(J,e=>{var t,n,r;let{shared:i,previousShared:a,registeredShared:o}=e||{},s=(t=q.shareScopeMap)==null||(t=t[e.scope])==null?void 0:t[e.pkgName];if(i&&s){if(((n=i.shareConfig)==null?void 0:n.import)!==!1){var c;o!==i&&(o==null||(c=o.shareConfig)==null?void 0:c.import)===!1&&!o.loaded&&s[i.version]===o&&(s[i.version]=i)}else o===i&&a&&((r=a.shareConfig)==null?void 0:r.import)!==!1&&s[i.version]===i&&(s[i.version]=a)}})}let Y=new WeakMap;ve.on(e=>{var t;let n=(t=e.shareInfo)==null?void 0:t[W],r=e.resolver;return typeof r==`function`&&(e.resolver=(...t)=>{var i;let a=r(...t);if((a==null||(i=a.shared)==null||(i=i.shareConfig)==null?void 0:i.import)===!1&&typeof w==`function`&&B[e.pkgName]){var o,s;let t=w((o=e.shareScopeMap)==null||(o=o[e.scope])==null?void 0:o[e.pkgName],e.pkgName,B[e.pkgName],`version-first`);t&&((s=t.shareConfig)==null?void 0:s.import)!==!1&&(a={shared:t,useTreesShaking:a.useTreesShaking})}let c=a==null?void 0:a.shared;return c&&(typeof c==`object`||typeof c==`function`)&&!Y.has(c)&&Y.set(c,{from:c.from}),n!==void 0&&c&&G.set(n,c),a}),e});let be=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??(n==null?void 0:n.scope)??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},xe=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),Se=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Ce=async(e,t,n)=>{let r=++he;K.set(r,{pinned:n});try{let n=await q.loadShare(e,{customShareInfo:{shareConfig:t,[W]:r}});return{factory:n===!1?void 0:n,selectedProvider:G.get(r)}}finally{G.delete(r),K.delete(r)}},we=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=be(n,r,i,a);if(!c)return;let l;try{l=await Ce(e,t,c)}catch(e){throw c.release(!1),e}let u=l==null?void 0:l.factory;if(u===void 0){c.release(!1);return}let d=xe(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=Y.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:(n==null?void 0:n[t])===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??Se(d,u);if(!c.release(!0,(h==null?void 0:h.provider)===c.provider)||!h)return;let g=Y.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&(n==null?void 0:n[h.version])!==h.provider))return{provider:h.provider,selection:h,resolved:v}},Te=new Set,Ee=new Map,De=async(t,n,r)=>{var i;let a=!!((i=n.shareConfig)!=null&&i.singleton);if(!a&&n.canLiveRebind!==!1)try{var o,s;let i=T(r,t,n,`version-first`),c=C(r,i);if(!c||((o=n.shareConfig)==null?void 0:o.import)===!1&&E(i,n)||(i==null||(s=i.shareConfig)==null?void 0:s.import)===!1)return;let{version:d}=c;if(!a&&d!==n.version||!i.lib&&!i.loading&&!(i.loaded&&typeof i.get==`function`))return;let f=l(t,a,n.version,n.scope);if(g(u.share,f)!==void 0)return;let p=e[t],m=p==null?void 0:p[d];if(c.registered&&!E(m,i))return;let h,_=i.lib;if(!_&&V(i)||(!_&&i.loading&&(_=await i.loading),!_&&i.loaded&&typeof i.get==`function`&&(_=await i.get()),!_))return;let v=typeof _==`function`?_():_,y=await Promise.resolve(v),b=c.registered?m:i;h={provider:b,selection:{provider:b,version:d,from:i.from,registered:c.registered},resolved:y};let x=h==null?void 0:h.provider,S=h==null?void 0:h.selection;if(!S)return;let w=h==null?void 0:h.resolved;if(w===void 0||g(u.share,f)!==void 0||S.registered&&(p==null?void 0:p[S.version])!==x)return;A(u.share,f,fe(w),S.from),Te.add(x)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},Oe=async(t,n,r,i,a)=>{try{var o,s,c,d;let f=l(t,(o=n.shareConfig)==null?void 0:o.singleton,n.version,n.scope),p=g(u.share,f),h=S(u.share,f),_=T(r,t,n,`version-first`),v=_||w(r,t,n,`version-first`)||n,y=C(r,v);if(!y)return;let b=E(v,n),{version:x}=y;if(!((s=n.shareConfig)!=null&&s.singleton)&&x!==n.version)return;let D=i==null?void 0:i[x],O=ee(R,ne,e,`default`,t,y,_,D,`version-first`);if(!O&&!b)return;let{provider:k,scopeRootProvider:j}=O||{provider:v,scopeRootProvider:void 0};if(n.canLiveRebind===!1||((c=n.shareConfig)==null?void 0:c.import)===!1&&E(k,n)||(k==null||(d=k.shareConfig)==null?void 0:d.import)===!1||p!==void 0&&h!==m)return;let M=e[t],N=M==null?void 0:M[x];if(y.registered&&!j&&!E(N,k))return;let P=await we(t,n.shareConfig,M,x,N,k,y.registered&&!b),F=P==null?void 0:P.provider,I=P==null?void 0:P.selection;if(!I||E(F,n)||a&&(a.version!==I.version||!E({from:I.from},a.provider))||Te.has(F))return;let L=P==null?void 0:P.resolved;if(L===void 0)return;let te=g(u.share,f),re=S(u.share,f);if(te!==void 0&&re!==m||I.registered&&(M==null?void 0:M[I.version])!==F)return;a||Ee.set(t,{version:I.version,provider:{from:I.from}}),Te.add(F);let ie=fe(L);A(u.share,f,ie,I.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of h)await Promise.all(e.map(async e=>{let t=B[e];t&&t.materialize!==!1&&!t.treeShaking&&await De(e,t,z[e])}));for(let[e,t]of Object.entries(B)){var ke;if(t.treeShaking)continue;let n=l(e,(ke=t.shareConfig)==null?void 0:ke.singleton,t.version,t.scope);if(g(u.share,n)!==void 0)continue;let r=l(e,!0,t.version,t.scope),i=g(u.share,r);i!==void 0&&A(u.share,n,i,S(u.share,r))}let Ae=[`react`,`leaflet`,`semver`,`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`,`react-dom/client`,`@emotion/styled`,`react-ace`,`@mui/material`,`@iobroker/gui-components`,`@mui/x-date-pickers`,`@iobroker/json-config`,`@iobroker/dm-gui-components`],je=[[`react`,`leaflet`,`semver`],[`react/jsx-runtime`,`react-dom`,`@emotion/react`,`react-dropzone`,`leaflet-geosearch`],[`react-dom/client`,`@emotion/styled`,`react-ace`],[`@mui/material`],[`@iobroker/gui-components`,`@mui/x-date-pickers`],[`@iobroker/json-config`],[`@iobroker/dm-gui-components`]],X=new Map(Ae.map((e,t)=>[e,t])),Me={3:[0],4:[0],5:[0],6:[0],7:[1],8:[0,4],9:[5,0],10:[0,4],11:[5,9,0,4],12:[6,0,4,11],13:[5,9,11,0,4],14:[5,9,12,11,13,0,4,6],15:[12,14,11]},Z=Ae.filter(e=>{var t;return B[e]&&(B[e].materialize!==!1||((t=B[e].shareConfig)==null?void 0:t.import)===!1&&!B[e].lazy)});u.providerInit||=new Map;let Ne=(e,t)=>{let n=u.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return u.providerInit.set(e,r),r.catch(()=>u.providerInit.delete(e)),r};var Pe=async e=>{let t=new Set(e);for(let e of je)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{var t,n,r;let i=B[e],a=l(e,(t=i.shareConfig)==null?void 0:t.singleton,i.version,i.scope);if(((n=i.shareConfig)==null?void 0:n.import)===!1||i.treeShaking||g(u.share,a)!==void 0)return;let o=l(e,!0,i.version,i.scope),s=g(u.share,o);if(s!==void 0){A(u.share,a,s,S(u.share,o));return}let c=typeof H==`function`?H(e,i):void 0;if(c){var d,f;let t=c.lib;if(!t&&c.loading&&(t=await c.loading),!t&&c.loaded&&typeof c.get==`function`&&(t=await c.get()),t){let e=typeof t==`function`?t():t,n=await Promise.resolve(e);A(u.share,a,(e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(n),c.from);return}if(typeof V==`function`&&V(c)&&((d=i.shareConfig)!=null&&d.singleton||((f=C(z[e],c))==null?void 0:f.version)===i.version))return}let p=a.canonical,h=await Ne(p,async()=>{let e=await i.get(),t=typeof e==`function`?e():e;return Promise.resolve(t)});for(let t of((r=q.options.shared)==null?void 0:r[e])||[])t.get===i.get&&(t.eager=!0);let _=(e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(h),v=_===h?{...h}:_;v.__esModule!==!0&&Object.defineProperty(v,"__esModule",{value:!0,enumerable:!1}),A(u.share,a,v,m)}))};let Q=e=>{var t,n;let r=B[e];if(!r.treeShaking&&((t=r.shareConfig)==null?void 0:t.import)!==!1)return!1;let i=l(e,(n=r.shareConfig)==null?void 0:n.singleton,r.version,r.scope);return r.treeShaking?I(u.share,i,m)===void 0&&g(u.share,i)===void 0:g(u.share,i)===void 0},Fe=e=>{var t,n;let r=B[e],i=l(e,(t=r.shareConfig)==null?void 0:t.singleton,r.version,r.scope);return(r.treeShaking?I(u.share,i,m)??g(u.share,i):g(u.share,i))===void 0?r.treeShaking||((n=r.shareConfig)==null?void 0:n.import)===!1?!0:typeof T==`function`&&!!T(z[e],e,r,`version-first`):!1},Ie=e=>{let t=!0;for(;t;){t=!1;for(let n of Z){let r=X.get(n);e.has(r)||(Me[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Le=Ie(new Set(Z.filter(Fe).map(e=>X.get(e)))),Re=Z.filter(e=>!Le.has(X.get(e)));var ze=Z.filter(e=>Le.has(X.get(e)));await Pe(Re).catch(c);try{await v(async()=>{await Promise.all(await q.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Be=async()=>{for(let t of h)await Promise.all(t.map(async t=>{let n=B[t];n&&n.materialize!==!1&&!n.treeShaking&&await Oe(t,n,e[t],z[t],void 0)}))};le?_=Be:await Be();try{var Ve;let e=(Ve=globalThis.__FEDERATION__)==null?void 0:Ve.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of f){let r=n==null?void 0:n[e];if(r)for(let[e,n]of Object.entries(r)){let r=B==null?void 0:B[e],i=z[e],a=Ee.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!E(t,a.provider))continue;let n=i[e];(t===n||n!=null&&n.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of h)await Promise.all(e.map(async e=>{let n=t[e];n&&await Oe(e,B[e],n,z[e],Ee.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let He=async()=>{},Ue=async(t,n)=>{var r,i;let a=l(t,(r=n.shareConfig)==null?void 0:r.singleton,n.version,n.scope),o=n.treeShaking?I(u.share,a,m):g(u.share,a);if(((i=n.shareConfig)==null?void 0:i.import)!==!1||o!==void 0||de(t,n,z[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=e==null?void 0:e[t],d=w(c,t,n,`version-first`)||n,f=C(c,d);if(!f)return;let p=e=>{var t;return e===n||(e==null||(t=e.shareConfig)==null?void 0:t.import)===!1};if(p(d))return;let{version:h}=f,_=c==null?void 0:c[h],v=await we(t,n.shareConfig,c,h,_,d,f.registered),y=v==null?void 0:v.selection,b=v==null?void 0:v.provider,x=v==null?void 0:v.resolved;if(!y||p(b)||x===void 0||(n.treeShaking?I(u.share,a,m):g(u.share,a))!==void 0||y.registered&&(c==null?void 0:c[y.version])!==b)return;let S=s(x);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];N(u.share,a,e,S),L(u.share,a,m,S)}else A(u.share,a,S,y.from)},We=[],Ge=new Set;for(let e of ze){let t=B[e],n=X.get(e);if(Q(e))try{var Ke;t.treeShaking?await He(e,t):((Ke=t.shareConfig)==null?void 0:Ke.import)===!1&&await Ue(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}Q(e)&&Ge.add(n)}Ie(Ge),We.push(...ze.filter(e=>!Ge.has(X.get(e)))),await Pe(We).catch(c);let $=new Map;return a.loadLazyShares=async t=>{let n=new Set(t);for(let t of h)await Promise.all(t.filter(e=>n.has(e)).map(t=>{let n=B[t];if(!n||!n.lazy||!Q(t))return;let r=$.get(t);return r||(r=Oe(t,n,e[t],z[t],void 0).then(()=>Q(t)?Ue(t,n):void 0),r.catch(()=>$.delete(t)),$.set(t,r)),r}))},o(q),q}async function j(e){let t=await k();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return _&&await _(),u.pendingShareLoads&&await Promise.all(u.pendingShareLoads),t[e]().then(e=>()=>e)}export{j as get,A as init};
|
|
2
|
-
if (typeof document !== 'undefined' && document.head) {
|
|
3
|
-
try {
|
|
4
|
-
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-DMV_e2iP.js","assets/rolldown-runtime-sJBDdmOt.js","assets/loadShare-eager-dmdYQhAl.js","assets/vite-preload-helper-BbbETgeG.js"]) {
|
|
5
|
-
const __mfWarmupLink = document.createElement('link');
|
|
6
|
-
__mfWarmupLink.rel = 'modulepreload';
|
|
7
|
-
__mfWarmupLink.crossOrigin = '';
|
|
8
|
-
__mfWarmupLink.href = new URL(__mfWarmupPath, import.meta.url).href;
|
|
9
|
-
document.head.appendChild(__mfWarmupLink);
|
|
10
|
-
}
|
|
11
|
-
} catch (__mfWarmupError) {}
|
|
12
|
-
}
|