infra: local contour — pre-push gate:small by default, sandbox bootstrap, test:chunk

- .githooks/pre-push + scripts/pre-push-gate.mjs --hook: gate:small runs by
  default for issue/* branches with an executable diff; C/D-only diffs and
  non-issue refs are skipped, HP_PREPUSH_GATE=0 turns it off, =1 forces it.
  A non-HEAD push with an executable diff is rejected (the gate checks the
  working tree). The gate runs with every GIT_* variable removed: git gives
  hooks GIT_DIR (and GIT_CONFIG_PARAMETERS with the pusher's -c), and unit
  tests that `git init` temporary repositories otherwise write into the real
  one — seen on the first live run. The manual #343 mode is unchanged.
- scripts/sandbox-bootstrap.sh: idempotent worktree / deps / chromium (npm
  @sparticuz/chromium@152.0.0 + Playwright shims) / bundle / check steps,
  no owner paths or credentials.
- scripts/test-chunk.mjs, npm run test:chunk -- N/M: round-robin over
  test/*.test.mjs sorted by code point.
- Tests, seven mutants, docs/DEVELOPMENT.md «Локальный контур за 5 минут»,
  docs/TESTING.md. package.json changed → bundle rebuilt (fingerprint input).

Issue: #633
User-Visible: no
This commit is contained in:
Claude
2026-09-24 05:00:45 +03:00
parent 4de5c0c0b5
commit af62bd4c64
56 changed files with 1452 additions and 519 deletions
@@ -1,127 +1,127 @@
{
"schema": 1,
"fingerprint": "dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5",
"fingerprint": "be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 289457,
"initialViewGzipBytes": 289449,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 290980,
"initialPanelGzipBytes": 290971,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2327,
"initialPanelOnlyGzipBytes": 2324,
"lazyFiles": [
"houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"houseplan-assets/de-DdzklZDC.js",
"houseplan-assets/editor-BjKwKkQK.js",
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/fr-YavZ2C6t.js",
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/houseplan-editor-runtime-CChcj4iD.js",
"houseplan-assets/houseplan-onboarding-runtime-CckGRHgd.js",
"houseplan-assets/hp-zigbee-topology-overlay-BbhGv7aa.js",
"houseplan-assets/iso-scene-render-BdwH4Fpd.js",
"houseplan-assets/live-interaction-runtime-Bx9RBxmo.js",
"houseplan-assets/pdf-export-OwE7zhHL.js",
"houseplan-assets/summary-panel-runtime-loaded-TTGe3qaE.js",
"houseplan-assets/zigbee-topology-DPrbZmN0.js",
"houseplan-assets/zigbee-topology-runtime-C8NG9DN7.js"
"houseplan-assets/backdrop-pick-YbdnEEmM.js",
"houseplan-assets/de-CjsIUY-d.js",
"houseplan-assets/editor-Dv3uqeSS.js",
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/fr-D2W98VDc.js",
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/houseplan-editor-runtime--nYeDmTG.js",
"houseplan-assets/houseplan-onboarding-runtime-zgKhvtTD.js",
"houseplan-assets/hp-zigbee-topology-overlay-C5T09STo.js",
"houseplan-assets/iso-scene-render-3HN3TF4R.js",
"houseplan-assets/live-interaction-runtime-kRE37k2_.js",
"houseplan-assets/pdf-export-DKVHRlMO.js",
"houseplan-assets/summary-panel-runtime-loaded-aaGs9bci.js",
"houseplan-assets/zigbee-topology-CXRVgVl2.js",
"houseplan-assets/zigbee-topology-runtime-C4WynS64.js"
],
"lazyGzipBytes": 460940,
"lazyGzipBytes": 460916,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"houseplan-assets/editor-BjKwKkQK.js",
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/houseplan-editor-runtime-CChcj4iD.js",
"houseplan-assets/zigbee-topology-DPrbZmN0.js"
"houseplan-assets/backdrop-pick-YbdnEEmM.js",
"houseplan-assets/editor-Dv3uqeSS.js",
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/houseplan-editor-runtime--nYeDmTG.js",
"houseplan-assets/zigbee-topology-CXRVgVl2.js"
],
"lazyEditorGzipBytes": 244433,
"lazyEditorGzipBytes": 244420,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/houseplan-onboarding-runtime-CckGRHgd.js"
"houseplan-assets/backdrop-pick-YbdnEEmM.js",
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/houseplan-onboarding-runtime-zgKhvtTD.js"
],
"lazyOnboardingGzipBytes": 34526,
"lazyOnboardingGzipBytes": 34521,
"lazyLocaleFiles": [
"houseplan-assets/de-DdzklZDC.js",
"houseplan-assets/fr-YavZ2C6t.js"
"houseplan-assets/de-CjsIUY-d.js",
"houseplan-assets/fr-D2W98VDc.js"
],
"lazyLocaleGzipBytes": 55260,
"lazyLocaleGzipBytes": 55255,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-BdwH4Fpd.js"
"houseplan-assets/iso-scene-render-3HN3TF4R.js"
],
"lazyIsometricGzipBytes": 17641,
"lazyIsometricGzipBytes": 17640,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js"
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js"
],
"lazyFurnitureArtGzipBytes": 16940,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/pdf-export-OwE7zhHL.js"
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/pdf-export-DKVHRlMO.js"
],
"lazyPdfGzipBytes": 126827,
"files": [
{
"path": "houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"sha256": "6acf3bad16c7100867c5fa126ced199a583db2855484a3499a43c1e37abcde16",
"path": "houseplan-assets/backdrop-pick-YbdnEEmM.js",
"sha256": "07acc6fc3e12ba2fe3e1b07e19a3f57308a0834a03db3c01bdba22ea43b9a7fd",
"rawBytes": 76524,
"gzipBytes": 24573,
"gzipBytes": 24571,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DdzklZDC.js",
"sha256": "f0a47f476e8dbe103d45b2224477370220e01508c0a6b217418ebb0213c2470f",
"path": "houseplan-assets/de-CjsIUY-d.js",
"sha256": "25fa2d8f19df083532e8f022d86c21d290f3e79badaf7b4d058158c50a02286c",
"rawBytes": 92247,
"gzipBytes": 27867,
"gzipBytes": 27864,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-BjKwKkQK.js",
"sha256": "33ff26dede30b326baba08172f18a0bb66ec55ca4d3a5d8d65820293631d56eb",
"path": "houseplan-assets/editor-Dv3uqeSS.js",
"sha256": "b1cdd26dec11ae7d904a675fbc27964757819886d1034ab63d2c9d91b42e3655",
"rawBytes": 3833,
"gzipBytes": 1585,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-CL0PrJiy.js",
"sha256": "0971d05469bb628a54cc386dc1eb08fb5da97b0cdfbfe20749bb82773be414c7",
"path": "houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"sha256": "aee7494545b43e2c932163c572b19483d9ac35c022daf437bcfd3aa21589aa07",
"rawBytes": 25600,
"gzipBytes": 5056,
"gzipBytes": 5055,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-YavZ2C6t.js",
"sha256": "6b5f8aae987b348c236d60399f83028b403450bb64bfda8d8707ba073a08602c",
"path": "houseplan-assets/fr-D2W98VDc.js",
"sha256": "12e70d1138d31d87f8c7f25d750bef3ecb7c84e23925845c101f0af4298208c0",
"rawBytes": 94579,
"gzipBytes": 27393,
"gzipBytes": 27391,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"sha256": "9778c68f355953d7abfe474dd40f7d9376aa3dbabb0735036dbbee57b1ac8495",
"path": "houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"sha256": "63e67cda0c59f37fee93410ae4193ae79d730b83293eea331edefaf63e280d11",
"rawBytes": 52035,
"gzipBytes": 16940,
"isEntry": false,
@@ -129,184 +129,184 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"sha256": "ff306a30871de854aad3b3c7910da5eb15948e086c27bf842cd7b65becacbbbe",
"path": "houseplan-assets/houseplan-card-e9vxRZcR.js",
"sha256": "98c44bf6f915d6121132c133cc12b2e27ea344f1c8203e7af54741f317aa1a5e",
"rawBytes": 1022206,
"gzipBytes": 288653,
"gzipBytes": 288647,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DdzklZDC.js",
"houseplan-assets/editor-BjKwKkQK.js",
"houseplan-assets/fr-YavZ2C6t.js",
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/houseplan-editor-runtime-CChcj4iD.js",
"houseplan-assets/houseplan-onboarding-runtime-CckGRHgd.js",
"houseplan-assets/hp-zigbee-topology-overlay-BbhGv7aa.js",
"houseplan-assets/iso-scene-render-BdwH4Fpd.js",
"houseplan-assets/live-interaction-runtime-Bx9RBxmo.js",
"houseplan-assets/pdf-export-OwE7zhHL.js",
"houseplan-assets/summary-panel-runtime-loaded-TTGe3qaE.js"
"houseplan-assets/de-CjsIUY-d.js",
"houseplan-assets/editor-Dv3uqeSS.js",
"houseplan-assets/fr-D2W98VDc.js",
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/houseplan-editor-runtime--nYeDmTG.js",
"houseplan-assets/houseplan-onboarding-runtime-zgKhvtTD.js",
"houseplan-assets/hp-zigbee-topology-overlay-C5T09STo.js",
"houseplan-assets/iso-scene-render-3HN3TF4R.js",
"houseplan-assets/live-interaction-runtime-kRE37k2_.js",
"houseplan-assets/pdf-export-DKVHRlMO.js",
"houseplan-assets/summary-panel-runtime-loaded-aaGs9bci.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CChcj4iD.js",
"sha256": "df3eef9ff3dfc5ce97d6b87c87a18207763df931f681a06df4f07329cd6c4a25",
"path": "houseplan-assets/houseplan-editor-runtime--nYeDmTG.js",
"sha256": "f476a861b5a2d77cd2ecea724c57d4e9e6dce6fa161eb18cc9479d2ec9752641",
"rawBytes": 678218,
"gzipBytes": 188850,
"gzipBytes": 188846,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/zigbee-topology-DPrbZmN0.js"
"houseplan-assets/backdrop-pick-YbdnEEmM.js",
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-assets/zigbee-topology-CXRVgVl2.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-C8NG9DN7.js"
"houseplan-assets/zigbee-topology-runtime-C4WynS64.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-CckGRHgd.js",
"sha256": "ff84c50ed19ace0bb8e74e3c45325a2b447c9b701f0c0409633f0fdefb9ce918",
"path": "houseplan-assets/houseplan-onboarding-runtime-zgKhvtTD.js",
"sha256": "5613ece2554c3ee9afc3e71dce63370d3e0bbeab9489e297ffaee74f33670e6f",
"rawBytes": 15986,
"gzipBytes": 4897,
"gzipBytes": 4895,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-C7x2A-Ic.js",
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/backdrop-pick-YbdnEEmM.js",
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BbhGv7aa.js",
"sha256": "9a30f7cbc062676c3247dd5c4e9adb5ac1c575ac39e6bb97cfe7b34679e28532",
"path": "houseplan-assets/hp-zigbee-topology-overlay-C5T09STo.js",
"sha256": "d836d918b89ee5685f7d2d10b194cf17feb7ca956c2112c78c4d62db7042ef24",
"rawBytes": 10759,
"gzipBytes": 3688,
"gzipBytes": 3686,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/zigbee-topology-DPrbZmN0.js",
"houseplan-assets/zigbee-topology-runtime-C8NG9DN7.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-assets/zigbee-topology-CXRVgVl2.js",
"houseplan-assets/zigbee-topology-runtime-C4WynS64.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-BdwH4Fpd.js",
"sha256": "51c4c55290167ec63ad124d4e585883c19436a4e184c0772d8ef6fe8052b3bb7",
"path": "houseplan-assets/iso-scene-render-3HN3TF4R.js",
"sha256": "0c1137699d170125b0b3a6a7dd5177a06e270d74e8b3020711c100b4c59bbe0d",
"rawBytes": 51983,
"gzipBytes": 17641,
"gzipBytes": 17640,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-Bx9RBxmo.js",
"sha256": "ba82aa493975ea5d4187c61704dba580a446a3901e2d8185298081d801832038",
"path": "houseplan-assets/live-interaction-runtime-kRE37k2_.js",
"sha256": "e0537b8b7d78df3e70208e5601b95b538509265184027a62b559c43626372385",
"rawBytes": 8216,
"gzipBytes": 3205,
"gzipBytes": 3203,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-OwE7zhHL.js",
"sha256": "eac3940edb1c089840a4ab98036480e30e89cfbaf640ebcfc644515650687269",
"path": "houseplan-assets/pdf-export-DKVHRlMO.js",
"sha256": "fef91b049f58622de45132f31b3ab7f606df5db8eee3fc68d3809b2c5ece7e5d",
"rawBytes": 236264,
"gzipBytes": 109887,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-BtGImX3G.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/furniture-plan-art.generated-YwpfkuFp.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-CMmiMp-J.js",
"sha256": "af159e622c901f85e89f530d831af41119000e3afbecccb66b1dd49da0b05307",
"path": "houseplan-assets/summary-panel-editor-Bj45k8M3.js",
"sha256": "1463acf70394eb7c8fc09b8182b227648b00919bb2fc5ad6a6ae189b1a051a2e",
"rawBytes": 14862,
"gzipBytes": 3426,
"gzipBytes": 3423,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/summary-panel-runtime-loaded-TTGe3qaE.js"
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-assets/summary-panel-runtime-loaded-aaGs9bci.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-BugkdR_l.js",
"sha256": "3fba5bcfa7a5cede40e48c221fae700b2a4d33b0e8dca714d5217fd8bcf12642",
"path": "houseplan-assets/summary-panel-metrics-3K7HlQXp.js",
"sha256": "246a3ee30014c9096527044921c104b76cef9555ebd1b2fbfcaeea54daf010cc",
"rawBytes": 2611,
"gzipBytes": 1308,
"gzipBytes": 1306,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-TTGe3qaE.js",
"sha256": "0ae1920f24688f49281b1d5adf6c21f54d78e40129480016bbdc80c21661fed6",
"path": "houseplan-assets/summary-panel-runtime-loaded-aaGs9bci.js",
"sha256": "527c40315a7cbbfa84289d6c8360688df121f368bf2609488e0b3b527ed2988a",
"rawBytes": 72637,
"gzipBytes": 20164,
"gzipBytes": 20166,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-CL0PrJiy.js",
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/form-kit.styles-Dlhk9WKB.js",
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-CMmiMp-J.js",
"houseplan-assets/summary-panel-metrics-BugkdR_l.js"
"houseplan-assets/summary-panel-editor-Bj45k8M3.js",
"houseplan-assets/summary-panel-metrics-3K7HlQXp.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-DPrbZmN0.js",
"sha256": "a5630f588e923de65f98a805871c165cbb7b56a3c7873db7b14f727cd856f9f6",
"path": "houseplan-assets/zigbee-topology-CXRVgVl2.js",
"sha256": "a68916a24db8c6acc389707ad40f95d8963d4521e40c09e6fa32b6430584569a",
"rawBytes": 18962,
"gzipBytes": 7429,
"gzipBytes": 7425,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-C8NG9DN7.js",
"sha256": "cf5b41c849b41e08fa821415b4079fe9a2b6c2d901ade2f1821e1d70e989c850",
"path": "houseplan-assets/zigbee-topology-runtime-C4WynS64.js",
"sha256": "598d78eb03a6b75e7bf9ce8ac7fdbc7ee514d6c7f056e8651309c541313ced0e",
"rawBytes": 3942,
"gzipBytes": 1765,
"gzipBytes": 1764,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js",
"houseplan-assets/zigbee-topology-DPrbZmN0.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js",
"houseplan-assets/zigbee-topology-CXRVgVl2.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "ad77ef6132b3cb9f7b55bb06a199445eaaf793b159ee3e052cc94e5c2ed83262",
"sha256": "ff5753ceb4dce57c6f1701baad303c37770735cb53b2a61c14e1225e07ac898b",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 802,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "e17e165e87c7e8bf2ce64566dc568a5d174ed3aae766608fad10a14e2811ce24",
"sha256": "90fb829ea2a8310205a7bc7c8d5d57bd38eedb0d62c961eed13d3bc3119b011a",
"rawBytes": 6165,
"gzipBytes": 2327,
"gzipBytes": 2324,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CA5Qv_Yq.js"
"houseplan-assets/houseplan-card-e9vxRZcR.js"
],
"dynamicImports": []
}
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";import{A as e,c as a,s as t,l as i,d as n,ap as s,h as r,j as o,g as l,dH as c,dI as p,dJ as d,cL as h,dK as u,cK as m,dL as g,cQ as _,cP as b,dM as f,bs as v,br as w,bt as y,av as k,aC as $,aD as x,dN as S}from"./houseplan-card-CA5Qv_Yq.js";import{c as C,f as M,C as L}from"./form-kit.styles-CL0PrJiy.js";const z=C+M(L,{withSwitch:!1}),P=new WeakSet;let D=null;function T(e){const a=e.renderRoot;if(!a||P.has(a))return;const t=a.ownerDocument??globalThis.document,i=t?.defaultView?.CSSStyleSheet;if(i&&"adoptedStyleSheets"in a)return D||(D=new i,D.replaceSync(z)),a.adoptedStyleSheets=[...a.adoptedStyleSheets,D],void P.add(a);if(a.querySelector("style[data-hp-form-kit]"))return void P.add(a);const n=t.createElement("style");n.dataset.hpFormKit="true",n.textContent=z,a.appendChild(n),P.add(a)}function H({title:t,help:i,body:n,id:s}){return a`<section class="hpf-card" data-card=${s??e}>
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";import{A as e,c as a,s as t,l as i,d as n,ap as s,h as r,j as o,g as l,dH as c,dI as p,dJ as d,cL as h,dK as u,cK as m,dL as g,cQ as _,cP as b,dM as f,bs as v,br as w,bt as y,av as k,aC as $,aD as x,dN as S}from"./houseplan-card-e9vxRZcR.js";import{c as C,f as M,C as L}from"./form-kit.styles-Dlhk9WKB.js";const z=C+M(L,{withSwitch:!1}),P=new WeakSet;let D=null;function T(e){const a=e.renderRoot;if(!a||P.has(a))return;const t=a.ownerDocument??globalThis.document,i=t?.defaultView?.CSSStyleSheet;if(i&&"adoptedStyleSheets"in a)return D||(D=new i,D.replaceSync(z)),a.adoptedStyleSheets=[...a.adoptedStyleSheets,D],void P.add(a);if(a.querySelector("style[data-hp-form-kit]"))return void P.add(a);const n=t.createElement("style");n.dataset.hpFormKit="true",n.textContent=z,a.appendChild(n),P.add(a)}function H({title:t,help:i,body:n,id:s}){return a`<section class="hpf-card" data-card=${s??e}>
${t?a`<div class="hpf-head"><h3>${t}</h3>${i??e}</div>`:e}
<div class="hpf-body">${n}</div>
</section>`}function E({title:t,help:i}){return a`<div class="hpf-sub"><h4>${t}</h4>${i??e}</div>`}function F({label:t,htmlFor:i,help:n,control:s,hint:r,error:o}){return a`<div class="hpf-field">
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";import{aD as e,l as o,aG as t,ee as s,A as a,ef as i,eg as l,eh as n,E as r,c}from"./houseplan-card-CA5Qv_Yq.js";class f extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,f={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},h=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";import{aD as e,l as o,aG as t,ee as s,A as a,ef as i,eg as l,eh as n,E as r,c}from"./houseplan-card-e9vxRZcR.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
.computeLabel=${e=>f[e.name]||e.name}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(h.slice(0,3))}
${d(f.slice(0,3))}
${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a}
${d(h.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";import{c as a,A as e}from"./houseplan-card-CA5Qv_Yq.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-TTGe3qaE.js";import"./form-kit.styles-CL0PrJiy.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";import{c as a,A as e}from"./houseplan-card-e9vxRZcR.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-aaGs9bci.js";import"./form-kit.styles-Dlhk9WKB.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
<span class="summary-switch-caption"><strong>${b("summary.show_local")}</strong>
<small id="summary-local-show-hint">${b("summary.show_local_hint")}</small></span>
<input id="summary-local-show" data-summary-local-show type="checkbox"
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";import{ek as e,N as t,a$ as n,L as i,ae as o,ac as r,bT as s,bS as a,a_ as c,aZ as l,b0 as d,el as u,em as f,bV as m,en as g}from"./houseplan-card-e9vxRZcR.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,c="entity"===r?e.registry.entities?.[s]:null,l="device"===r?s:c?.device_id,d="device"===r?a?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(s))&&t.add(l)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=c(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:l(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*b(c,l,d=_){try{let u=0;for(const f of l){const l=c.spaces.find(e=>String(e?.id)===f.id);if(!l)continue;const m=e(l,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=a(v)*_*_/1e4}return u}catch{return null}}function h(e,t,n=_){const i=b(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function p(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{b as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,p as summarySystemValue,h as totalCleanFloorAreaM2};
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";import{ek as e,N as t,a$ as n,L as i,ae as o,ac as r,bT as s,bS as a,a_ as l,aZ as c,b0 as d,el as u,em as f,bV as m,en as g}from"./houseplan-card-CA5Qv_Yq.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,l="entity"===r?e.registry.entities?.[s]:null,c="device"===r?s:l?.device_id,d="device"===r?a?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(s))&&t.add(c)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(l,c,d=_){try{let u=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=a(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";import{n as t,b as n}from"./zigbee-topology-DPrbZmN0.js";import{aM as e}from"./houseplan-card-CA5Qv_Yq.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";import{n as t,b as n}from"./zigbee-topology-CXRVgVl2.js";import{aM as e}from"./houseplan-card-e9vxRZcR.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="dd57b1473630f6e58faf9edf00b7c9df6327a11f25f60ed9c6a1e257280220f5";try{await import("./houseplan-assets/houseplan-card-CA5Qv_Yq.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="be980214e65258ad0c8ec0480b3b70c46a1e6f817bba2cda8d2f16c104021db6";try{await import("./houseplan-assets/houseplan-card-e9vxRZcR.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
File diff suppressed because one or more lines are too long