iobroker.eos-admin 9.0.33 → 9.0.35
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 +13 -11
- package/README.md +12 -8
- package/adminWww/.vite/manifest.json +233 -224
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13897 -13887
- package/adminWww/assets/AccessTime-CuR73YC3.js +1 -0
- package/adminWww/assets/{AdapterUpdateDialog-DBUqmmyD.js → AdapterUpdateDialog-DH6S-kWX.js} +5 -5
- package/adminWww/assets/{Adapters-dDEp7o5h.js → Adapters-CIlqSF5B.js} +5 -5
- package/adminWww/assets/ConfigManager-BhVBfM-q.js +1 -0
- package/adminWww/assets/Enums-3H97czGs.js +92 -0
- package/adminWww/assets/Fields-vWLKiuvO.js +1 -0
- package/adminWww/assets/Files-wmjjMXYM.js +1 -0
- package/adminWww/assets/{Hosts-CwU1LujG.js → Hosts-Bk-xmI98.js} +6 -6
- package/adminWww/assets/Instances-Db6Vgh62.js +4 -0
- package/adminWww/assets/Intro-Dc3wAG9V.js +2 -0
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +1 -0
- package/adminWww/assets/{Logs-B5SpNqHq.js → Logs-CPbEGWNq.js} +2 -2
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +1 -0
- package/adminWww/assets/{Objects-COg_cFkz.js → Objects-DJB-2468.js} +4 -4
- package/adminWww/assets/Overview-DdvghCLQ.js +3 -0
- package/adminWww/assets/Pageview-wzrLQZ-j.js +1 -0
- package/adminWww/assets/PersonOff-YtHcY0sV.js +1 -0
- package/adminWww/assets/Star-D8VNXawT.js +1 -0
- package/adminWww/assets/State-0UzpgKYj.js +1 -0
- package/adminWww/assets/UsedResources-Bcmo58YD.js +2 -0
- package/adminWww/assets/Users-BGHf3Rox.js +1 -0
- package/adminWww/assets/ViewCompact-D7bHgn99.js +1 -0
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +1 -0
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +1 -0
- package/adminWww/assets/{bootstrap-Dwfxhm2V.js → bootstrap-qkrk_CAn.js} +25 -25
- package/adminWww/assets/date-fns-BtR4dG_j.js +1 -0
- package/adminWww/assets/en-US-BjjaEI6N.js +1 -0
- package/adminWww/assets/{hostInit-3BbTwhaZ.js → hostInit-DlGqatlv.js} +1 -1
- package/adminWww/assets/icons-material-CUNq6tdT.js +1 -0
- package/adminWww/assets/{index-nddph2Sl.js → index-BrtKq3UN.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CPDIwFAL.js → installSVGRenderer-DujLjpXt.js} +1 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +1 -0
- package/adminWww/assets/locale-DN6Bdkdt.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-d1f0f40f.js → mf-entry-bootstrap-0-3e1cd85c.js} +2 -2
- package/adminWww/assets/sentry-CPzCHrwe.js +1 -0
- package/adminWww/assets/setYear-DDSuW45e.js +1 -0
- 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.33.js → remoteEntry-eos-9.0.35.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDashboardProcessStatus.js +191 -0
- package/build/lib/eosDashboardProcessStatus.js.map +1 -0
- package/build/lib/eosDeviceEmsPlan.js +285 -9
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosDeviceEmsService.js +29 -2
- package/build/lib/eosDeviceEmsService.js.map +1 -1
- package/build/lib/eosKiosk.js +1 -0
- package/build/lib/eosKiosk.js.map +1 -1
- package/build/lib/eosModuleHost.js +17 -6
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +18 -3
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleProcess.js +17 -0
- package/build/lib/eosModuleProcess.js.map +1 -1
- package/build/lib/eosModuleProcessWorker.js +22 -1
- package/build/lib/eosModuleProcessWorker.js.map +1 -1
- package/build/lib/eosRuntimeControl.js +6 -0
- package/build/lib/eosRuntimeControl.js.map +1 -1
- package/build/lib/eosRuntimeHealth.js +50 -1
- package/build/lib/eosRuntimeHealth.js.map +1 -1
- package/build/lib/eosSupervisorNotifications.js +169 -0
- package/build/lib/eosSupervisorNotifications.js.map +1 -0
- package/build/lib/eosUiProcess.js +1 -0
- package/build/lib/eosUiProcess.js.map +1 -1
- package/build/lib/web.js +5 -0
- package/build/lib/web.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/reports/unified-9.0.34/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.34/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.34/raw/INDEX.json +137 -0
- package/docs/reports/unified-9.0.34/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.34/raw/dashboard-interval.json +108 -0
- package/docs/reports/unified-9.0.34/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.34/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.34/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.34/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.34/raw/mira-dashboard-browser.json +1 -0
- package/docs/reports/unified-9.0.34/raw/mira-devices-browser.log +9 -0
- package/docs/reports/unified-9.0.34/raw/mira-memory-process.json +379 -0
- package/docs/reports/unified-9.0.34/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.34/raw/node22-mira.log +216 -0
- package/docs/reports/unified-9.0.34/raw/node22-protocol-to-ems.log +8 -0
- package/docs/reports/unified-9.0.34/raw/node22-tests-final.log +17850 -0
- package/docs/reports/unified-9.0.34/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/node24-mira.log +40 -0
- package/docs/reports/unified-9.0.34/raw/node24-protocol-to-ems.log +6 -0
- package/docs/reports/unified-9.0.34/raw/node24-tests-final.log +2973 -0
- package/docs/reports/unified-9.0.34/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/protocol-to-ems.cjs +364 -0
- package/docs/reports/unified-9.0.34/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.34/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.34/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.34/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.35/PRUEFBERICHT.md +51 -0
- package/docs/reports/unified-9.0.35/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.35/raw/INDEX.json +282 -0
- package/docs/reports/unified-9.0.35/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.35/raw/browser-lp-detail.log +1 -0
- package/docs/reports/unified-9.0.35/raw/browser-lp-feedback.log +1 -0
- package/docs/reports/unified-9.0.35/raw/cold-ocpp-22.log +108 -0
- package/docs/reports/unified-9.0.35/raw/cold-ocpp-24.log +24 -0
- package/docs/reports/unified-9.0.35/raw/core-final-node22.log +1439 -0
- package/docs/reports/unified-9.0.35/raw/core-final-node24.log +1381 -0
- package/docs/reports/unified-9.0.35/raw/dashboard-de-en-nl.json +716 -0
- package/docs/reports/unified-9.0.35/raw/device-chain-closed-fixed.json +98 -0
- package/docs/reports/unified-9.0.35/raw/device-chain-rst-fixed.json +98 -0
- package/docs/reports/unified-9.0.35/raw/device-chain.json +93 -0
- package/docs/reports/unified-9.0.35/raw/ee-fusion-final.log +12 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-browser.json +1 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-node22.log +206 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-node24.log +39 -0
- package/docs/reports/unified-9.0.35/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.35/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.35/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.35/raw/legacy-mail-setup-browser.log +1 -0
- package/docs/reports/unified-9.0.35/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.35/raw/live-ems-loss.log +10 -0
- package/docs/reports/unified-9.0.35/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.35/raw/node22-mira-reconnect-integrity.log +452 -0
- package/docs/reports/unified-9.0.35/raw/node22-mira.log +222 -0
- package/docs/reports/unified-9.0.35/raw/node22-system-status.log +213 -0
- package/docs/reports/unified-9.0.35/raw/node22-tests-final.log +18137 -0
- package/docs/reports/unified-9.0.35/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.35/raw/node24-mira-reconnect-integrity.log +79 -0
- package/docs/reports/unified-9.0.35/raw/node24-mira.log +41 -0
- package/docs/reports/unified-9.0.35/raw/node24-system-status.log +40 -0
- package/docs/reports/unified-9.0.35/raw/node24-tests-final.log +3019 -0
- package/docs/reports/unified-9.0.35/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-legacy-node22.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-legacy-node24.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-node22.log +67 -0
- package/docs/reports/unified-9.0.35/raw/notifications-node24.log +17 -0
- package/docs/reports/unified-9.0.35/raw/npm-runtime-audit.json +77 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node22.log +110 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node24.log +106 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-history-node22.log +561 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-history-node24.log +98 -0
- package/docs/reports/unified-9.0.35/raw/poll-life-node22.log +38 -0
- package/docs/reports/unified-9.0.35/raw/poll-life-node24.log +12 -0
- package/docs/reports/unified-9.0.35/raw/qa-source-check.log +2 -0
- package/docs/reports/unified-9.0.35/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.35/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.35/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.35/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.35/raw/vergleich-9.0.33.json +29 -0
- package/docs/reports/unified-9.0.35/raw/vergleich-9.0.34.json +249 -0
- package/docs/reports/unified-9.0.35/raw/vorher-9.0.33-chromium.json +286 -0
- package/docs/reports/unified-9.0.35/raw/vorher-9.0.34-chromium.json +291 -0
- package/docs/start/START_HIER_9.0.34.md +25 -0
- package/docs/start/START_HIER_9.0.35.md +27 -0
- package/io-package.json +12 -12
- package/modules/devices/admin/alias-contract-v1.json +22 -0
- package/modules/devices/admin/ems-assignment.js +6 -1
- package/modules/devices/admin/host-bridge.js +2 -0
- package/modules/devices/admin/index.html +16 -0
- package/modules/devices/admin/index_m.js +168 -9
- package/modules/devices/admin/templates.json +976 -0
- package/modules/devices/checks/emsAssignment.check.js +52 -2
- package/modules/devices/contracts.d.ts +1 -0
- package/modules/devices/index.js +25 -2
- package/modules/devices/lib/alias-contract-v1.json +22 -0
- package/modules/devices/lib/deviceRuntime.js +36 -7
- package/modules/devices/lib/drivers/modbus.js +12 -7
- package/modules/devices/lib/drivers/modbusRtuBus.js +7 -1
- package/modules/devices/lib/drivers/ovumMira.js +152 -0
- package/modules/devices/lib/ovumMiraAliases.js +61 -0
- package/modules/devices/lib/ovumMiraConnection.js +32 -0
- package/modules/devices/lib/templates.json +976 -0
- package/modules/devices/test/aliasContractV1.test.js +4 -4
- package/modules/devices/test/deviceAliasSemantics.test.js +2 -2
- package/modules/devices/test/fixtures/approved-additive-templates.json +3 -1
- package/modules/devices/test/ovumMiraPairing.test.js +76 -0
- package/modules/devices/test/ovumMiraTemplates.test.js +110 -0
- package/modules/devices/test/ovumMiraTransport.test.js +201 -0
- package/modules/eebus/README.md +8 -0
- package/modules/eebus/admin/index.js +29 -2
- package/modules/eebus/build/index.js +28 -3
- package/modules/eebus/build/lib/eebusRuntime.js +17 -2
- package/modules/eebus/build/lib/partnerMonitor.js +160 -0
- package/modules/eebus/build/lib/shipEndpoint.js +4 -0
- package/modules/eebus/build/lib/stateDefinitions.js +1 -0
- package/modules/eebus/src/index.ts +23 -3
- package/modules/eebus/src/lib/eebusRuntime.ts +20 -2
- package/modules/eebus/src/lib/partnerMonitor.ts +127 -0
- package/modules/eebus/src/lib/shipEndpoint.ts +5 -0
- package/modules/eebus/src/lib/stateDefinitions.ts +1 -0
- package/modules/eebus/test/partner-monitor.test.js +82 -0
- package/modules/eebus/test/security.test.js +17 -0
- package/modules/ocpp/README.md +9 -1
- package/modules/ocpp/build/index.js +137 -10
- package/modules/ocpp/build/stationHistory.js +113 -0
- package/modules/ocpp/ocpp/freshness.d.ts +3 -0
- package/modules/ocpp/ocpp/freshness.js +6 -0
- package/modules/ocpp/provenance.json +3 -2
- package/modules/ocpp/runtime.d.ts +1 -0
- package/modules/ocpp/runtime.js +23 -1
- package/modules/ocpp/src/index.ts +163 -12
- package/modules/ocpp/src/stationHistory.ts +119 -0
- package/modules/ocpp/test/hosted.test.cjs +161 -0
- package/package.json +9 -5
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +313 -190
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +166 -0
- package/release-manifests/unified/runtime.cdx.json +30 -30
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/ems/consumers/ovum-mira.js +164 -0
- package/ui/ems/modules/para14a.js +3 -2
- package/ui/ems/modules/stage-a-diagnostics.js +4 -2
- package/ui/ems/modules/thermal-control.js +91 -10
- package/ui/io-package.json +9 -1
- package/ui/lib/installer-lifecycle.js +11 -2
- package/ui/lib/notification-mail.js +235 -40
- package/ui/lib/notification-policy.js +41 -14
- package/ui/main.js +37 -7
- package/ui/package.json +2 -1
- package/ui/www/app.js +122 -24
- package/ui/www/dashboard-lp-status.js +4 -11
- package/ui/www/dashboard-process-status.js +202 -0
- package/ui/www/ems-apps.js +28 -9
- package/ui/www/i18n/en.json +23 -0
- package/ui/www/i18n/nl.json +20 -0
- package/ui/www/index.html +10 -5
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/live-display.js +101 -9
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/settings.html +2 -2
- package/ui/www/styles.css +4 -0
- package/adminWww/assets/AddLink-0L0E-LsA.js +0 -1
- package/adminWww/assets/ColorLens-DA51K29x.js +0 -1
- package/adminWww/assets/ConfigManager-DbqTWi2N.js +0 -1
- package/adminWww/assets/Enums-DjldGElU.js +0 -92
- package/adminWww/assets/Fields-0GsPCJeU.js +0 -1
- package/adminWww/assets/FileCopy-B16lEuur.js +0 -1
- package/adminWww/assets/Files-COnUtEbg.js +0 -1
- package/adminWww/assets/Instances-CUX5mxMQ.js +0 -4
- package/adminWww/assets/Intro-BhQmHn3A.js +0 -2
- package/adminWww/assets/Lens-9lkeoWGk.js +0 -1
- package/adminWww/assets/LinearScale-Be5h2beh.js +0 -1
- package/adminWww/assets/North-C2whbHM-.js +0 -1
- package/adminWww/assets/Overview-CitzUjBF.js +0 -3
- package/adminWww/assets/PersonOff-DqBq0Fho.js +0 -1
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +0 -1
- package/adminWww/assets/State-D5ljzf-T.js +0 -1
- package/adminWww/assets/UsedResources-BY_NF2wB.js +0 -2
- package/adminWww/assets/Users-Cu93_-VF.js +0 -1
- package/adminWww/assets/date-fns-C1dqkno9.js +0 -1
- package/adminWww/assets/icons-material-DjqX0l_7.js +0 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +0 -1
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +0 -1
- package/adminWww/assets/locale-hLcz_Xh2.js +0 -1
- package/adminWww/assets/sentry-DwQQLI7N.js +0 -1
- package/adminWww/assets/startOfWeek-DJph8SIW.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./icons-material-
|
|
2
|
-
import{a as e,r as t,t as n}from"./rolldown-runtime-sJBDdmOt.js";import{t as r}from"./vite-preload-helper-BbbETgeG.js";import{$a as i,$n as a,$r as o,$s as s,Aa as c,An as l,Ao as u,Ar as d,Bn as f,Bo as p,Bt as m,Ci as h,Co as g,Cs as _,Do as v,Ds as y,Eo as b,Es as x,F as ee,Fo as S,Go as C,Gr as w,Ha as T,Hr as te,Hs as E,I as D,In as ne,Io as re,Ja as ie,Jo as O,Ka as k,Ko as A,Ks as ae,Lo as oe,Lt as se,Mo as ce,Mr as le,Ms as ue,No as de,Nr as fe,Oa as pe,On as me,Oo as he,Os as ge,Po as _e,Qa as ve,Qn as ye,Qo as be,Ro as xe,Rt as Se,Sc as Ce,Si as we,Sr as Te,Ss as Ee,Ti as De,To as Oe,Tr as j,Ts as M,Uo as ke,Us as N,Vo as Ae,Vs as je,Wa as Me,Wo as P,Wr as Ne,Xa as Pe,Xn as Fe,Xo as Ie,Xs as Le,Y as Re,Ya as ze,Yn as Be,Yo as Ve,Ys as He,Za as Ue,Zo as We,_o as Ge,_s as Ke,a as qe,ac as Je,ai as Ye,ao as Xe,as as Ze,ba as Qe,bn as $e,bo as et,br as tt,bs as nt,c as rt,cc as it,co as at,cs as ot,dr as st,ds as ct,ea as lt,ec as ut,eo as dt,fc as F,fo as ft,fr as pt,gc as mt,gn as ht,go as I,hs as gt,ic as _t,ir as vt,is as yt,jn as bt,jo as xt,jr as St,ka as Ct,ko as wt,kr as Tt,lc as Et,lo as L,ls as Dt,mo as R,n as Ot,nc as kt,no as At,nr as jt,ns as Mt,oc as Nt,oi as Pt,oo as Ft,os as It,pc as z,po as Lt,pr as Rt,ps as zt,qa as Bt,qn as Vt,qo as B,qs as Ht,r as Ut,ra as Wt,rc as Gt,rn as Kt,ro as qt,rs as Jt,sc as Yt,so as Xt,sr as Zt,tc as Qt,ti as $t,to as V,ts as en,ua as tn,uc as nn,vs as rn,wn as an,wo as on,xc as sn,xo as cn,xs as ln,yo as H,yr as un,ys as dn,zo as fn}from"./loadShare-eager-dmdYQhAl.js";import{dedupeIntegration as pn,init as mn}from"./prod-ChPGnyiA.js";import{r as hn,t as gn}from"./startOfWeek-DJph8SIW.js";import{$ as _n,A as vn,C as yn,D as bn,E as xn,F as Sn,I as Cn,L as wn,M as Tn,N as En,O as Dn,P as On,S as kn,T as An,U as jn,Z as Mn,a as Nn,at as Pn,b as Fn,c as In,ct as Ln,d as Rn,dt as zn,i as Bn,it as Vn,j as Hn,k as Un,l as Wn,lt as Gn,n as Kn,nt as qn,o as Jn,ot as Yn,r as Xn,rt as Zn,s as Qn,st as $n,t as er,tt as tr,u as nr,w as rr,z as ir}from"./isWithinInterval-Bo1WiDfq.js";import{a as ar,n as or,o as sr,r as cr,t as U}from"./AdminUtils-Dc1eHsx5.js";import{t as lr}from"./AceEditor-BgLZBrSD.js";import{t as ur}from"./ctrlEnter-CruFIPb_.js";x();var dr={y:{sectionType:`year`,contentType:`digit`,maxLength:4},yy:`year`,yyy:{sectionType:`year`,contentType:`digit`,maxLength:4},yyyy:`year`,M:{sectionType:`month`,contentType:`digit`,maxLength:2},MM:`month`,MMMM:{sectionType:`month`,contentType:`letter`},MMM:{sectionType:`month`,contentType:`letter`},L:{sectionType:`month`,contentType:`digit`,maxLength:2},LL:`month`,LLL:{sectionType:`month`,contentType:`letter`},LLLL:{sectionType:`month`,contentType:`letter`},d:{sectionType:`day`,contentType:`digit`,maxLength:2},dd:`day`,do:{sectionType:`day`,contentType:`digit-with-letter`},E:{sectionType:`weekDay`,contentType:`letter`},EE:{sectionType:`weekDay`,contentType:`letter`},EEE:{sectionType:`weekDay`,contentType:`letter`},EEEE:{sectionType:`weekDay`,contentType:`letter`},EEEEE:{sectionType:`weekDay`,contentType:`letter`},i:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ii:`weekDay`,iii:{sectionType:`weekDay`,contentType:`letter`},iiii:{sectionType:`weekDay`,contentType:`letter`},e:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ee:`weekDay`,eee:{sectionType:`weekDay`,contentType:`letter`},eeee:{sectionType:`weekDay`,contentType:`letter`},eeeee:{sectionType:`weekDay`,contentType:`letter`},eeeeee:{sectionType:`weekDay`,contentType:`letter`},c:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},cc:`weekDay`,ccc:{sectionType:`weekDay`,contentType:`letter`},cccc:{sectionType:`weekDay`,contentType:`letter`},ccccc:{sectionType:`weekDay`,contentType:`letter`},cccccc:{sectionType:`weekDay`,contentType:`letter`},a:`meridiem`,aa:`meridiem`,aaa:`meridiem`,H:{sectionType:`hours`,contentType:`digit`,maxLength:2},HH:`hours`,h:{sectionType:`hours`,contentType:`digit`,maxLength:2},hh:`hours`,K:{sectionType:`hours`,contentType:`digit`,maxLength:2},KK:`hours`,k:{sectionType:`hours`,contentType:`digit`,maxLength:2},kk:`hours`,m:{sectionType:`minutes`,contentType:`digit`,maxLength:2},mm:`minutes`,s:{sectionType:`seconds`,contentType:`digit`,maxLength:2},ss:`seconds`},fr={year:`yyyy`,month:`LLLL`,monthShort:`MMM`,dayOfMonth:`d`,dayOfMonthFull:`do`,weekday:`EEEE`,weekdayShort:`EEEEEE`,hours24h:`HH`,hours12h:`hh`,meridiem:`aa`,minutes:`mm`,seconds:`ss`,fullDate:`PP`,keyboardDate:`P`,shortDate:`MMM d`,normalDate:`d MMMM`,normalDateWithWeekday:`EEE, MMM d`,fullTime12h:`hh:mm aa`,fullTime24h:`HH:mm`,keyboardDateTime12h:`P hh:mm aa`,keyboardDateTime24h:`P HH:mm`},pr=class{constructor(e){M(this,`isMUIAdapter`,!0),M(this,`isTimezoneCompatible`,!1),M(this,`formatTokenMap`,dr),M(this,`escapedCharacters`,{start:`'`,end:`'`}),M(this,`date`,e=>e===void 0?new Date:e===null?null:new Date(e)),M(this,`getInvalidDate`,()=>new Date(`Invalid Date`)),M(this,`getTimezone`,()=>`default`),M(this,`setTimezone`,e=>e),M(this,`toJsDate`,e=>e),M(this,`getCurrentLocaleCode`,()=>this.locale.code),M(this,`is12HourCycleInCurrentLocale`,()=>/a/.test(this.locale.formatLong.time({width:`short`}))),M(this,`expandFormat`,e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=this.longFormatters[t];return n(e,this.locale.formatLong)}return e}).join(``)),M(this,`formatNumber`,e=>e),M(this,`getDayOfWeek`,e=>e.getDay()+1);let{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=ae({},fr,n),this.longFormatters=r,this.lib=i||`date-fns`}};x();var mr=class extends pr{constructor({locale:e,formats:t}={}){super({locale:e??hn,formats:t,longFormatters:ir}),M(this,`parse`,(e,t)=>e===``?null:Rn(e,t,new Date,{locale:this.locale})),M(this,`isValid`,e=>e!=null&&wn(e)),M(this,`format`,(e,t)=>this.formatByString(e,this.formats[t])),M(this,`formatByString`,(e,t)=>Cn(e,t,{locale:this.locale})),M(this,`isEqual`,(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:An(e,t)),M(this,`isSameYear`,(e,t)=>yn(e,t)),M(this,`isSameMonth`,(e,t)=>kn(e,t)),M(this,`isSameDay`,(e,t)=>rr(e,t)),M(this,`isSameHour`,(e,t)=>Fn(e,t)),M(this,`isAfter`,(e,t)=>bn(e,t)),M(this,`isAfterYear`,(e,t)=>bn(e,tr(t))),M(this,`isAfterDay`,(e,t)=>bn(e,Zn(t))),M(this,`isBefore`,(e,t)=>xn(e,t)),M(this,`isBeforeYear`,(e,t)=>xn(e,this.startOfYear(t))),M(this,`isBeforeDay`,(e,t)=>xn(e,this.startOfDay(t))),M(this,`isWithinRange`,(e,[t,n])=>er(e,{start:t,end:n})),M(this,`startOfYear`,e=>Mn(e)),M(this,`startOfMonth`,e=>Xn(e)),M(this,`startOfWeek`,e=>gn(e,{locale:this.locale})),M(this,`startOfDay`,e=>_n(e)),M(this,`endOfYear`,e=>tr(e)),M(this,`endOfMonth`,e=>Kn(e)),M(this,`endOfWeek`,e=>qn(e,{locale:this.locale})),M(this,`endOfDay`,e=>Zn(e)),M(this,`addYears`,(e,t)=>Vn(e,t)),M(this,`addMonths`,(e,t)=>Pn(e,t)),M(this,`addWeeks`,(e,t)=>Yn(e,t)),M(this,`addDays`,(e,t)=>zn(e,t)),M(this,`addHours`,(e,t)=>$n(e,t)),M(this,`addMinutes`,(e,t)=>Ln(e,t)),M(this,`addSeconds`,(e,t)=>Gn(e,t)),M(this,`getYear`,e=>Dn(e)),M(this,`getMonth`,e=>Hn(e)),M(this,`getDate`,e=>Sn(e)),M(this,`getHours`,e=>En(e)),M(this,`getMinutes`,e=>Tn(e)),M(this,`getSeconds`,e=>vn(e)),M(this,`getMilliseconds`,e=>Un(e)),M(this,`setYear`,(e,t)=>Bn(e,t)),M(this,`setMonth`,(e,t)=>Qn(e,t)),M(this,`setDate`,(e,t)=>nr(e,t)),M(this,`setHours`,(e,t)=>Wn(e,t)),M(this,`setMinutes`,(e,t)=>In(e,t)),M(this,`setSeconds`,(e,t)=>Jn(e,t)),M(this,`setMilliseconds`,(e,t)=>Nn(e,t)),M(this,`getDaysInMonth`,e=>On(e)),M(this,`getWeekArray`,e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,a=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);a[e]=a[e]||[],a[e].push(i),i=this.addDays(i,1),r+=1}return a}),M(this,`getWeekNumber`,e=>jn(e,{locale:this.locale})),M(this,`getYearRange`,([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],a=n;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i})}};rt();var W={"@mui/icons-material":()=>r(()=>import(`./icons-material-DjqX0l_7.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url),"date-fns":()=>r(()=>import(`./date-fns-C1dqkno9.js`),__vite__mapDeps([30,31,32,1,2,3,33]),import.meta.url),"date-fns/locale":()=>r(()=>import(`./locale-hLcz_Xh2.js`).then(e=>e.t),__vite__mapDeps([34,2,31,33]),import.meta.url)};function hr(){sn({name:`iobroker_admin`,shared:{},remotes:[]}),Ce(Object.fromEntries(Object.entries(W).map(([e,t])=>[e,{version:{"@mui/icons-material":`9.5.0`,"date-fns":`4.4.0`,"date-fns/locale":`4.4.0`}[e],scope:`default`,get:async()=>{let e=await t();return()=>e},shareConfig:{singleton:!0,requiredVersion:`*`,eager:!1}}])))}var gr={version:`9.0.33`},_r=Le({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null});function vr({children:e}){let[t]=z({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null}),{hosts:n,installed:r,repository:i}=t,a=nn(()=>{var e;if(!n||!i)return 0;let t=(e=i[`js-controller`])==null?void 0:e.version,r=0;return n.forEach(e=>{U.updateAvailable(e.common.installedVersion,t,`js-controller on ${e._id}`)&&r++}),r},[n,i]),o=nn(()=>{if(!r||!i)return 0;let e=0;return Object.keys(r).forEach(t=>{let n=r[t],a=i[t];t!==`js-controller`&&t!==`hosts`&&n!=null&&n.version&&a!=null&&a.version&&n.ignoreVersion!==a.version&&U.updateAvailable(n.version,a.version,`adapter "${t}"`)&&e++}),e},[r,i]),s=nn(()=>({...t,hostsUpdate:a,adaptersUpdate:o}),[t,a,o]);return E(_r.Provider,{value:s,children:e})}var yr=Le({dragDropManager:void 0});function br(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var xr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),Sr=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},Cr={INIT:`@@redux/INIT`+Sr(),REPLACE:`@@redux/REPLACE`+Sr(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+Sr()}};function wr(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Tr(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(br(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(br(1));return n(Tr)(e,t)}if(typeof e!=`function`)throw Error(br(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(br(3));return a}function d(e){if(typeof e!=`function`)throw Error(br(4));if(c)throw Error(br(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(br(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!wr(e))throw Error(br(7));if(e.type===void 0)throw Error(br(8));if(c)throw Error(br(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(br(10));i=e,f({type:Cr.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(br(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[xr]=function(){return this},e}return f({type:Cr.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[xr]=m,r}function G(e,t,...n){if(Er()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function Er(){return typeof process<`u`&&!0}function Dr(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function Or(e,t){return e.filter(e=>e!==t)}function kr(e){return typeof e==`object`}function Ar(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function jr(e,t){return e.filter(e=>t.indexOf(e)>-1)}var Mr=`dnd-core/INIT_COORDS`,Nr=`dnd-core/BEGIN_DRAG`,Pr=`dnd-core/PUBLISH_DRAG_SOURCE`,Fr=`dnd-core/HOVER`,Ir=`dnd-core/DROP`,Lr=`dnd-core/END_DRAG`;function Rr(e,t){return{type:Mr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var zr={type:Mr,payload:{clientOffset:null,sourceClientOffset:null}};function Br(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(Rr(i)),Vr(t,o,s);let c=Wr(t,o);if(c==null){e.dispatch(zr);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Hr(a),l=a(c)}e.dispatch(Rr(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Ur(u),s.pinSource(c),{type:Nr,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Vr(e,t,n){G(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){G(n.getSource(e),`Expected sourceIds to be registered.`)})}function Hr(e){G(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Ur(e){G(kr(e),`Item must be an object.`)}function Wr(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Gr(e,t,n[t])})}return e}function qr(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();Jr(n),Zr(n).forEach((i,a)=>{let o={type:Ir,payload:{dropResult:Kr({},t,Yr(i,a,r,n))}};e.dispatch(o)})}}function Jr(e){G(e.isDragging(),`Cannot call drop while not dragging.`),G(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Yr(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Xr(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Xr(e){G(e===void 0||kr(e),`Drop result must either be an object or undefined.`)}function Zr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Qr(e){return function(){let t=e.getMonitor(),n=e.getRegistry();$r(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Lr}}}function $r(e){G(e.isDragging(),`Cannot call endDrag while not dragging.`)}function ei(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function ti(e){return function(t,{clientOffset:n}={}){ni(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return ii(r,a,i.getItemType()),ri(r,i,a),ai(r,i,a),{type:Fr,payload:{targetIds:r,clientOffset:n||null}}}}function ni(e){G(Array.isArray(e),`Expected targetIds to be an array.`)}function ri(e,t,n){G(t.isDragging(),`Cannot call hover while not dragging.`),G(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];G(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`),G(n.getTarget(r),`Expected targetIds to be registered.`)}}function ii(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];ei(t.getTargetType(i),n)||e.splice(r,1)}}function ai(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function oi(e){return function(){if(e.getMonitor().isDragging())return{type:Pr}}}function si(e){return{beginDrag:Br(e),publishDragSource:oi(e),hover:ti(e),drop:qr(e),endDrag:Qr(e)}}var ci=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=si(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function li(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ui(e,t){return{x:e.x-t.x,y:e.y-t.y}}function di(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:ui(li(t,r),n)}function fi(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:ui(t,n)}var pi=[],mi=[];pi.__IS_NONE__=!0,mi.__IS_ALL__=!0;function hi(e,t){return e===pi?!1:e===mi||t===void 0||jr(t,e).length>0}var gi=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;G(typeof e==`function`,`listener must be a function.`),G(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!hi(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){G(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return G(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ei(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ei(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return di(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return fi(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},_i=typeof global<`u`?global:self,vi=_i.MutationObserver||_i.WebKitMutationObserver;function yi(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function bi(e){let t=1,n=new vi(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var xi=typeof vi==`function`?bi:yi,Si=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=xi(this.flush),this.requestErrorThrow=yi(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Ci=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},wi=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new Ci(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},Ti=new Si,Ei=new wi(Ti.registerPendingError);function Di(e){Ti.enqueueTask(Ei.create(e))}var Oi=`dnd-core/ADD_SOURCE`,ki=`dnd-core/ADD_TARGET`,Ai=`dnd-core/REMOVE_SOURCE`,ji=`dnd-core/REMOVE_TARGET`;function Mi(e){return{type:Oi,payload:{sourceId:e}}}function Ni(e){return{type:ki,payload:{targetId:e}}}function Pi(e){return{type:Ai,payload:{sourceId:e}}}function Fi(e){return{type:ji,payload:{targetId:e}}}function Ii(e){G(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),G(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),G(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function Li(e){G(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),G(typeof e.hover==`function`,`Expected hover to be a function.`),G(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function Ri(e,t){t&&Array.isArray(e)?e.forEach(e=>Ri(e,!1)):G(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var zi;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(zi||={});var Bi=0;function Vi(){return Bi++}function Hi(e){let t=Vi().toString();switch(e){case zi.SOURCE:return`S${t}`;case zi.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ui(e){switch(e[0]){case`S`:return zi.SOURCE;case`T`:return zi.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Wi(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Gi=class{addSource(e,t){Ri(e),Ii(t);let n=this.addHandler(zi.SOURCE,e,t);return this.store.dispatch(Mi(n)),n}addTarget(e,t){Ri(e,!0),Li(t);let n=this.addHandler(zi.TARGET,e,t);return this.store.dispatch(Ni(n)),n}containsHandler(e){return Wi(this.dragSources,e)||Wi(this.dropTargets,e)}getSource(e,t=!1){return G(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return G(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Ui(e)===zi.SOURCE}isTargetId(e){return Ui(e)===zi.TARGET}removeSource(e){G(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Pi(e)),Di(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){G(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Fi(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);G(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){G(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Hi(e);return this.types.set(r,t),e===zi.SOURCE?this.dragSources.set(r,n):e===zi.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Ki=(e,t)=>e===t;function qi(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Ji(e,t,n=Ki){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Yi(e=pi,t){switch(t.type){case Fr:break;case Oi:case ki:case ji:case Ai:return pi;case Nr:case Pr:case Lr:case Ir:default:return mi}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=Ar(n,r);if(!(i.length>0||!Ji(n,r)))return pi;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Xi(e,t,n[t])})}return e}var Qi={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function $i(e=Qi,t){let{payload:n}=t;switch(t.type){case Mr:case Nr:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Fr:return qi(e.clientOffset,n.clientOffset)?e:Zi({},e,{clientOffset:n.clientOffset});case Lr:case Ir:return Qi;default:return e}}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ea(e,t,n[t])})}return e}var na={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ra(e=na,t){let{payload:n}=t;switch(t.type){case Nr:return ta({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Pr:return ta({},e,{isSourcePublic:!0});case Fr:return ta({},e,{targetIds:n.targetIds});case ji:return e.targetIds.indexOf(n.targetId)===-1?e:ta({},e,{targetIds:Or(e.targetIds,n.targetId)});case Ir:return ta({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Lr:return ta({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function ia(e=0,t){switch(t.type){case Oi:case ki:return e+1;case Ai:case ji:return e-1;default:return e}}function aa(e=0){return e+1}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){oa(e,t,n[t])})}return e}function ca(e={},t){return{dirtyHandlerIds:Yi(e.dirtyHandlerIds,{type:t.type,payload:sa({},t.payload,{prevTargetIds:Dr(e,`dragOperation.targetIds`,[])})}),dragOffset:$i(e.dragOffset,t),refCount:ia(e.refCount,t),dragOperation:ra(e.dragOperation,t),stateId:aa(e.stateId)}}function la(e,t=void 0,n={},r=!1){let i=K(r),a=new ci(i,new gi(i,new Gi(i))),o=e(a,t,n);return a.receiveBackend(o),a}function K(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tr(ca,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}function ua(e,t){if(e==null)return{};var n=da(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function da(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fa=0,pa=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),ma=kt(function(e){var{children:t}=e;let[n,r]=ha(ua(e,[`children`]));return Yt(()=>{if(r){let e=_a();return++fa,()=>{--fa===0&&(e[pa]=null)}}},[]),E(yr.Provider,{value:n,children:t})});function ha(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[ga(e.backend,e.context,e.options,e.debugMode),!e.context]}function ga(e,t=_a(),n,r){let i=t;return i[pa]||(i[pa]={dragDropManager:la(e,t,n,r)}),i[pa]}function _a(){return typeof global<`u`?global:window}var va=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),ya=typeof window<`u`?Et:Yt,ba=e(va(),1);function xa(e,t,n){let[r,i]=z(()=>t(e)),a=_t(()=>{let a=t(e);(0,ba.default)(r,a)||(i(a),n&&n())},[r,e,n]);return ya(a),[r,a]}function Sa(e,t,n){let[r,i]=xa(e,t,n);return ya(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function Ca(e,t,n){return Sa(t,e||(()=>({})),()=>n.reconnect())}function wa(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),nn(()=>typeof e==`function`?e():e,n)}function Ta(e){return nn(()=>e.hooks.dragSource(),[e])}function Ea(e){return nn(()=>e.hooks.dragPreview(),[e])}var Da=!1,Oa=!1,ka=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){G(!Da,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Da=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Da=!1}}isDragging(){if(!this.sourceId)return!1;G(!Oa,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return Oa=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Oa=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Aa=!1,ja=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;G(!Aa,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return Aa=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Aa=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Ma(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function Na(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function Pa(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function Fa(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ia(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function La(e){return(t=null,n=null)=>{if(!ut(t)){let r=t;return e(r,n),r}let r=t;return Ia(r),Ba(r,n?t=>e(t,n):e)}}function Ra(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=La(r);t[n]=()=>e}}),t}function za(e,t){typeof e==`function`?e(t):e.current=t}function Ba(e,t){let n=e.ref;return G(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?He(e,{ref:e=>{za(n,e),za(t,e)}}):He(e,{ref:t})}var Va=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Pa(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Pa(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ra({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Fa(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Fa(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},Ha=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Pa(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ra({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Fa(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function Ua(){let{dragDropManager:e}=Je(yr);return G(e!=null,`Expected drag drop context`),e}function Wa(e,t){let n=Ua(),r=nn(()=>new Va(n.getBackend()),[n]);return ya(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),ya(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Ga(){let e=Ua();return nn(()=>new ka(e),[e])}var Ka=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag!=`function`||e.canDrag(t)}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function qa(e,t,n){let r=nn(()=>new Ka(e,t,n),[t,n]);return Yt(()=>{r.spec=e},[e]),r}function Ja(e){return nn(()=>{let t=e.type;return G(t!=null,`spec.type must be defined`),t},[e])}function Ya(e,t,n){let r=Ua(),i=qa(e,t,n),a=Ja(e);ya(function(){if(a!=null){let[e,o]=Na(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Xa(e,t){let n=wa(e,t);G(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=Ga(),i=Wa(n.options,n.previewOptions);return Ya(n,r,i),[Ca(n.collect,r,i),Ta(i),Ea(i)]}function Za(e){let t=Ua().getMonitor(),[n,r]=xa(t,e);return Yt(()=>t.subscribeToOffsetChange(r)),Yt(()=>t.subscribeToStateChange(r)),n}function Qa(e){return nn(()=>e.hooks.dropTarget(),[e])}function $a(e){let t=Ua(),n=nn(()=>new Ha(t.getBackend()),[t]);return ya(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function eo(){let e=Ua();return nn(()=>new ja(e),[e])}function to(e){let{accept:t}=e;return nn(()=>(G(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var no=class{canDrop(){let e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function ro(e,t){let n=nn(()=>new no(e,t),[t]);return Yt(()=>{n.spec=e},[e]),n}function io(e,t,n){let r=Ua(),i=ro(e,t),a=to(e);ya(function(){let[e,o]=Ma(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function ao(e,t){let n=wa(e,t),r=eo(),i=$a(n.options);return io(n,r,i),[Ca(n.collect,r,i),Qa(i)]}function oo(e){let t=null;return()=>(t??=e(),t)}function so(e,t){return e.filter(e=>e!==t)}function co(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var lo=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=co(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=so(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},uo=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},fo=t({FILE:()=>po,HTML:()=>go,TEXT:()=>ho,URL:()=>mo}),po=`__NATIVE_FILE__`,mo=`__NATIVE_URL__`,ho=`__NATIVE_TEXT__`,go=`__NATIVE_HTML__`;function _o(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var vo={[po]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[go]:{exposeProperties:{html:(e,t)=>_o(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[mo]:{exposeProperties:{urls:(e,t)=>_o(e,t,``).split(`
|
|
3
|
-
`),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[ho]:{exposeProperties:{text:(e,t)=>_o(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function yo(e,t){let n=vo[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new uo(n);return r.loadDataTransfer(t),r}function bo(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(vo).filter(e=>{let n=vo[e];return n!=null&&n.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}var xo=oo(()=>/firefox/i.test(navigator.userAgent)),So=oo(()=>!!window.safari),Co=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(r<e)s=l+1;else if(r>e)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);let i=[],a=[],o=[],s,c;for(let r=0;r<n-1;r++)s=e[r+1]-e[r],c=t[r+1]-t[r],a.push(s),i.push(c),o.push(c/s);let l=[o[0]];for(let e=0;e<a.length-1;e++){let t=o[e],n=o[e+1];if(t*n<=0)l.push(0);else{s=a[e];let r=a[e+1],i=s+r;l.push(3*i/((i+r)/t+(i+s)/n))}}l.push(o[o.length-1]);let u=[],d=[],f;for(let e=0;e<l.length-1;e++){f=o[e];let t=l[e],n=1/a[e],r=t+l[e+1]-f-f;u.push((f-t-r)*n),d.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=d}},wo=1;function To(e){let t=e.nodeType===wo?e:e.parentElement;if(!t)return null;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Eo(e){return{x:e.clientX,y:e.clientY}}function Do(e){var t;return e.nodeName===`IMG`&&(xo()||!((t=document.documentElement)!=null&&t.contains(e)))}function Oo(e,t,n,r){let i=e?t.width:n,a=e?t.height:r;return So()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function ko(e,t,n,r,i){let a=Do(t),o=To(a?e:t),s={x:n.x-o.x,y:n.y-o.y},{offsetWidth:c,offsetHeight:l}=e,{anchorX:u,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=Oo(a,t,c,l),m=()=>{let e=new Co([0,.5,1],[s.y,s.y/l*p,s.y+p-l]).interpolate(d);return So()&&a&&(e+=(window.devicePixelRatio-1)*p),e},h=()=>new Co([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(u),{offsetX:g,offsetY:_}=i,v=g===0||g,y=_===0||_;return{x:v?g:h(),y:y?_:m()}}var Ao=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){jo(e,t,n[t])})}return e}var q=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Mo({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Mo({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(fo).some(t=>fo[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=yo(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)==null?void 0:e.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&To(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=Eo(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=bo(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=ko(t,i,n,{anchorX:e,anchorY:a},{offsetX:o,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{r==null||r.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;let{dataTransfer:n}=e,r=bo(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Eo(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;this.dragOverTargetIds=[],this.monitor.isDragging()?(this.altKeyPressed=e.altKey,this.lastClientOffset=Eo(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))):(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else bo(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Eo(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Ao(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new lo(this.isNodeInDocument)}},No;function Po(){return No||(No=new Image,No.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),No}var Fo=function(e,t,n){return new q(e,t,n)},Io;(function(e){e.mouse=`mouse`,e.touch=`touch`,e.keyboard=`keyboard`})(Io||={});var Lo=class{get delay(){return this.args.delay??0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){return this.args.ignoreContextMenu??!1}get enableHoverOutsideTarget(){return this.args.enableHoverOutsideTarget??!1}get enableKeyboardEvents(){return this.args.enableKeyboardEvents??!1}get enableMouseEvents(){return this.args.enableMouseEvents??!1}get enableTouchEvents(){return this.args.enableTouchEvents??!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t;return((e=this.args)==null?void 0:e.delayTouchStart)??((t=this.args)==null?void 0:t.delay)??0}get delayMouseStart(){var e,t;return((e=this.args)==null?void 0:e.delayMouseStart)??((t=this.args)==null?void 0:t.delay)??0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<`u`)return window}get document(){var e;if((e=this.context)!=null&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)==null?void 0:e.rootElement)||this.document}constructor(e,t){this.args=e,this.context=t}};function Ro(e,t,n,r){return Math.sqrt(Math.abs(n-e)**2+Math.abs(r-t)**2)}function zo(e,t,n,r,i){if(!i)return!1;let a=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let e=0;e<i.length;++e){let t=i[e];if(t&&(t.start==null||a>=t.start)&&(t.end==null||a<=t.end))return!0}return!1}var Bo={Left:1,Right:2,Center:4},Vo={Left:0,Center:1,Right:2};function Ho(e){return e.button===void 0||e.button===Vo.Left}function Uo(e){return e.buttons===void 0||(e.buttons&Bo.Left)===0}function Wo(e){return!!e.targetTouches}var Go=1;function Ko(e){let t=e.nodeType===Go?e:e.parentElement;if(!t)return;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function qo(e,t){if(e.targetTouches.length===1)return Jo(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return Jo(e.touches[0])}function Jo(e,t){return Wo(e)?qo(e,t):{x:e.clientX,y:e.clientY}}var Yo=(()=>{let e=!1;try{addEventListener(`test`,()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),Xo={[Io.mouse]:{start:`mousedown`,move:`mousemove`,end:`mouseup`,contextmenu:`contextmenu`},[Io.touch]:{start:`touchstart`,move:`touchmove`,end:`touchend`},[Io.keyboard]:{keydown:`keydown`}},Zo=class e{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)==null?void 0:e.length)||0}}get document(){return this.options.document}setup(){let t=this.options.rootElement;t&&(G(!e.isSetUp,`Cannot have two Touch backends at the same time.`),e.isSetUp=!0,this.addEventListener(t,`start`,this.getTopMoveStartHandler()),this.addEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.addEventListener(t,`move`,this.handleTopMove),this.addEventListener(t,`move`,this.handleTopMoveCapture,!0),this.addEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,`keydown`,this.handleCancelOnEscape,!0))}teardown(){let t=this.options.rootElement;t&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.removeEventListener(t,`start`,this.handleTopMoveStart),this.removeEventListener(t,`move`,this.handleTopMoveCapture,!0),this.removeEventListener(t,`move`,this.handleTopMove),this.removeEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,`keydown`,this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n,r=!1){let i=Yo?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Xo[r][t];a&&e.addEventListener(a,n,i)})}removeEventListener(e,t,n,r=!1){let i=Yo?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Xo[r][t];a&&e.removeEventListener(a,n,i)})}connectDragSource(e,t){let n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,`start`,n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,`start`,n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){let n=this.options.rootElement;if(!this.document||!n)return()=>{};let r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let i;switch(r.type){case Xo.mouse.move:i={x:r.clientX,y:r.clientY};break;case Xo.touch.move:var a,o;i={x:((a=r.touches[0])==null?void 0:a.clientX)||0,y:((o=r.touches[0])==null?void 0:o.clientY)||0}}let s=i==null?void 0:this.document.elementFromPoint(i.x,i.y),c=s&&t.contains(s);if(s===t||c)return this.handleMove(r,e)};return this.addEventListener(this.document.body,`move`,r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,`move`,r))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display=`none`,this.draggedSourceNode.removeAttribute(`data-reactid`),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&Ko(t)},this.handleTopMoveStartCapture=e=>{Ho(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!Ho(e))return;let t=Jo(e);t&&(Wo(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!Ho(e))return;let t=e.type===Xo.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;let{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,i=Jo(e,this.lastTargetTouchFallback);if(!i)return;if(this._isScrolling||!this.monitor.isDragging()&&zo(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty(`x`)&&t&&Ro(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;let a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();let o=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),s=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(i.x,i.y,o):this.document.elementsFromPoint(i.x,i.y),c=[];for(let e in s){if(!s.hasOwnProperty(e))continue;let t=s[e];for(t!=null&&c.push(t);t;)t=t.parentElement,t&&c.indexOf(t)===-1&&c.push(t)}let l=c.filter(e=>o.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(let e in this.targetNodes){let t=this.targetNodes.get(e);if(a&&t&&t.contains(a)&&l.indexOf(e)===-1){l.unshift(e);break}}l.reverse(),this.actions.hover(l,{clientOffset:i})},this._getDropTargetId=e=>{let t=this.targetNodes.keys(),n=t.next();for(;n.done===!1;){let r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,Uo(e)&&(!this.monitor.isDragging()||this.monitor.didDrop()?this.moveStartSourceIds=void 0:(e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()))},this.handleCancelOnEscape=e=>{e.key===`Escape`&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new Lo(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Io.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Io.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Io.keyboard)}},Qo=function(e,t={},n={}){return new Zo(e,t,n)},$o=y(E(`path`,{d:`M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z`}),`Update`),es=y(E(`path`,{d:`M19 11h-8v6h8zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2m-2 .02H3V4.97h18z`}),`PictureInPictureAlt`),ts=y(E(`path`,{d:`M21.5 14.98c-.02 0-.03 0-.05.01C21.2 13.3 19.76 12 18 12c-1.4 0-2.6.83-3.16 2.02C13.26 14.1 12 15.4 12 17c0 1.66 1.34 3 3 3l6.5-.02c1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5M10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74M20 6h-2.73c1.43 1.26 2.41 3.01 2.66 5h-2.02c-.23-1.36-.93-2.55-1.91-3.44V10h-2V4h6z`}),`CloudSync`),ns=y(E(`path`,{d:`M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33m-7.14-.94 2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64z`}),`SyncDisabled`),rs=y(E(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),is=y(E(`path`,{d:`m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z`}),`Logout`);x();var as={message:{position:`relative`,display:`block`,width:`100%`},offline:{position:`relative`,justifyContent:`space-between`,display:`flex`,width:`100%`,alignItems:`center`,opacity:.7,"@media screen and (max-width: 550px)":{flexWrap:`wrap`}},timestamp:{color:`text.secondary`,position:`absolute`,top:5,right:25,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},simpleMessage:{fontFamily:`monospace`,fontSize:14,ml:`20px`,mb:`10px`,width:`100%`,display:`block`,whiteSpace:`pre-wrap`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`,ml:0}}},os={alert:0,notify:1,info:2};function ss(e){return e===`notify`||e===`info`?e:`alert`}function cs(e,t){return os[ss(e)]-os[ss(t)]}var ls=class extends Qt{constructor(e){super(e),M(this,`lastAlive`,0),M(this,`onAliveChanged`,(e,t)=>{if(e===`${this.props.instanceId}.alive`&&t&&this.state.alive!==!!t.val){if(t.val){if(this.lastAlive&&Date.now()-this.lastAlive<500)return;this.lastAlive=Date.now()}this.setState({alive:!!t.val},()=>this.getGui())}}),this.state={alive:!1,data:{},schema:null,updateData:0}}async componentDidMount(){var e;if((e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){let e=await this.props.socket.getState(`${this.props.instanceId}.alive`);this.lastAlive=e!=null&&e.val?Date.now():0,this.setState({alive:!!(e!=null&&e.val)},()=>this.getGui()),await this.props.socket.subscribeState(`${this.props.instanceId}.alive`,this.onAliveChanged)}}getGui(){var e;if(this.state.alive&&(e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){var t;let e=JSON.parse(JSON.stringify((t=this.props.message.contextData)==null||(t=t.admin)==null?void 0:t.notification));e.offlineMessage&&delete e.offlineMessage,this.props.socket.sendTo(this.props.instanceId.replace(`system.adapter.`,``),`admin:getNotificationSchema`,e).then(e=>{e&&this.setState({schema:e.schema,data:e.data||this.state.data,updateData:this.state.updateData+1})})}}renderCustomGui(){if(!this.state.schema||!this.state.data||!this.state.alive){var e;let t=(e=this.props.message.contextData)==null||(e=e.admin)==null?void 0:e.notification;if(t){if(!this.state.alive){let e=t.offlineMessage;if(e){let t=typeof e==`string`?e:e[this.props.socket.systemLang]||e.en;return E(I,{sx:as.offline,children:Ne.renderTextWithA(t)})}return E(R,{children:j.t(`Instance is not alive`)})}return E(Ie,{})}return null}let[,,t,n]=this.props.instanceId.split(`.`);return N(je,{children:[this.state.error&&E(`div`,{style:{color:`red`},children:this.state.error}),E(se,{style:{width:`100%`},updateData:this.state.updateData,socket:this.props.socket,adapterName:t,instance:parseInt(n,10),schema:this.state.schema,data:this.state.data,onError:e=>this.setState({error:e}),onChange:e=>this.setState({data:e||{}}),onBackEndCommand:e=>{e&&(e.schema&&this.setState({schema:e.schema,data:e.data||this.state.data}),(e.command===`refresh`||e.refresh)&&this.getGui(),e.command===`link`&&this.props.onLink(e))},embedded:!0,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,AceEditor:lr})]})}renderSimpleMessage(){return this.props.message.message?E(I,{sx:as.simpleMessage,children:Ne.renderTextWithA(this.props.message.message)}):null}render(){return N(R,{component:`div`,sx:as.message,children:[E(I,{sx:as.timestamp,children:new Date(this.props.message.ts).toLocaleString()}),this.renderSimpleMessage(),this.renderCustomGui()]})}},us={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`,flexDirection:`column`}),paper:{maxWidth:1e3,width:`100%`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},column:{flexDirection:`column`},headerText:e=>({fontWeight:`bold`,fontSize:20,color:e.palette.mode===`dark`?`#DDD`:`#111`}),descriptionHeaderText:e=>({margin:`18px 0`,color:e.palette.mode===`dark`?`#CCC`:`#222`}),button:{paddingTop:5,paddingBottom:5,position:`sticky`,bottom:0,zIndex:3},img2:{width:25,height:25,margin:`auto 0`,mr:`10px`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},heading:{display:`flex`,alignItems:`center`,overflow:`hidden`,width:`100%`},headingTop:{display:`flex`,alignItems:`center`},classNameBox:{p:`8px`,"@media screen and (max-width: 550px)":{p:`4px`}},textStyle:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},content:{overflow:`hidden`},buttonStyle:{m:`3px`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}}};function ds({severity:e,isDark:t,...n}){return e=ss(e),e===`notify`?E(rs,{color:t?`primary`:`secondary`,...n}):e===`info`?E(lt,{color:`info`,...n}):E(Pt,{style:{color:`#ffca00`},...n})}function fs(e){return{id:`scrollable-force-tab-${e}`,"aria-controls":`scrollable-force-tabpanel-${e}`}}var ps=({children:e,index:t,sxBox:n,style:r})=>E(`div`,{role:`tabpanel`,id:`scrollable-force-tabpanel-${t}`,"aria-labelledby":`scrollable-force-tab-${t}`,style:r,children:E(I,{sx:n,children:E(R,{component:`div`,children:e})})});function ms(e,t=``){return e?typeof e==`string`?e:e[j.getLanguage()]||e.en||t:t}function hs(e,t,n){let r,i=``;e.url?e.url.toString().startsWith(`#`)||e.url.toString().startsWith(`/`)?(r=e.target||`_self`,i=e.url):e.url.startsWith(`http://`)||e.url.startsWith(`https://`)?(r=e.target||`_blank`,i=e.url):(i=`#tab-instances/config/${t}/${e.url}`,r=e.target||`_self`):(i=`#tab-instances/config/${t}`,r=e.target||`_self`),r===`_self`?(setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}:${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i),e.close&&typeof n==`function`&&n()):(i.startsWith(`#`)?i=`${window.location.protocol}:${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}:${window.location.host}${i}`),window.open(i,r))}var gs=({notifications:e,onClose:t,ackCallback:n,dateFormat:r,themeType:i,instances:a,themeName:o,theme:s,isFloatComma:c,socket:d})=>{let[f,p]=z(``),[m,h]=z([]),[g,_]=z(``),[v,y]=z(!0),b=(e,t)=>{y(!0),p(t),_(``)},x=e=>(t,n)=>_(n?e:``),ee=i===`dark`,S=!!Object.values(a).find(e=>e.common.name===`notification-manager`),C=nn(()=>{let t={};for(let[n,r]of Object.entries(e))for(let[e,i]of Object.entries(r.result))if(e!==`system`)for(let[r,a]of Object.entries(i.categories))t[e]=t[e]||{},t[e][r]={...a,host:n};return t},[e]),w=nn(()=>Object.keys(C).flatMap(e=>Object.keys(C[e]).map(t=>({scope:e,name:t,entry:C[e][t]}))).sort((e,t)=>cs(e.entry.severity,t.entry.severity)),[C]),T=w.length?`${w[0].scope}--${w[0].name}`:``,te=f;if(!te)te=T;else{let[e,t]=te.split(`--`);if(!C[e])te=T;else if(!C[e][t]){let t=Object.keys(C[e])[0];te=t?`${e}--${t}`:T}}let[D,ne]=te.split(`--`),ie=D&&ne?`${D}--${ne}`:``,O=D&&ne?C[D][ne]:null;return N(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":us.paper},children:[N(`h2`,{style:us.headingTop,children:[E(rs,{sx:{color:`primary.main`},style:{fontSize:36,marginLeft:25,marginRight:10}}),j.t(`Notifications`),S?null:E(Lt,{sx:{position:`absolute`,right:24,color:`text.primary`},title:j.t(`Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(lt,{})})]}),E(ce,{style:{...us.flex,...us.overflowHidden},dividers:!0,children:N(I,{component:`div`,sx:us.root,children:[E(yt,{position:`static`,color:`default`,children:E(Xt,{value:te,onChange:b,variant:`scrollable`,scrollButtons:!0,indicatorColor:ee?`primary`:`secondary`,textColor:ee?`primary`:`secondary`,children:w.map(({scope:e,name:t,entry:n},r)=>{let i=`${e}--${t}`;return E(ve,{disabled:m.includes(i),value:i,label:ms(n.name,t),icon:E(ds,{severity:n.severity,isDark:ee}),...fs(r)},i)})})}),O?N(ps,{sxBox:us.classNameBox,style:{...us.overflowAuto,color:ee?`black`:void 0},index:te,children:[E(I,{component:`div`,sx:us.headerText,style:{fontWeight:`bold`},children:ms(O.name,ne)}),E(I,{component:`div`,sx:us.descriptionHeaderText,children:ms(O.description)}),E(`div`,{children:O.instances?Object.keys(O.instances).map(e=>{let n=`${te}--${e}`;v&&(x(n)(``,!0),y(!1));let u=a&&a[e],f=u&&un(u)||`img/no-image.svg`;return N(Bt,{style:ee?void 0:{backgroundColor:`#c0c0c052`},expanded:g===n,onChange:x(n),children:[E(re,{expandIcon:E(l,{}),sx:{"& .MuiAccordionSummary-content":us.content},"aria-controls":`panel1bh-content`,id:`panel1bh-header`,children:N(R,{style:us.heading,children:[E(on,{sx:us.img2,component:`img`,image:f}),E(I,{component:`div`,sx:us.textStyle,style:{marginLeft:8},children:e.replace(/^system\.adapter\./,``)})]})}),E(he,{style:us.column,children:O.instances[e].messages.map((n,a)=>E(ls,{message:n,dateFormat:r,instanceId:e,socket:d,themeType:i,themeName:o,theme:s,isFloatComma:c,onLink:n=>hs(n,e,t)},a))})]},n)}):null})]},`tabPanel-${ne}`):null]})}),N(xt,{children:[D&&ne?E(H,{variant:`contained`,autoFocus:Object.keys(C[D]).length!==1,disabled:m.includes(ie),style:m.includes(ie)?{backgroundColor:`silver`}:void 0,sx:us.buttonStyle,onClick:e=>{e.stopPropagation(),n(C[D][ne].host,ne),h([...m,ie])},color:Object.keys(C[D]).length===1?`grey`:`primary`,startIcon:E(Me,{}),children:j.t(`Acknowledge`)}):null,D&&ne&&Object.keys(C[D]).length===1&&E(H,{variant:`contained`,disabled:m.includes(ie),sx:us.buttonStyle,style:m.includes(ie)?{backgroundColor:`silver`}:void 0,onClick:e=>{e.stopPropagation(),h([...m,ie]),n(C[D][ne].host,ne),t()},startIcon:N(je,{children:[E(Me,{}),E(k,{})]}),color:`primary`,children:j.t(`Acknowledge & close`)}),E(`div`,{style:{flexGrow:1}}),E(H,{id:`notifications-dialog-close`,variant:`contained`,onClick:e=>{e.stopPropagation(),t()},startIcon:E(k,{}),color:`grey`,children:j.t(`Close`)})]})]})};function _s({label:e,compact:t=!1}){return N(`div`,{className:`eos-boot-loader${t?` eos-boot-loader--compact`:``}`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:[E(`img`,{className:`eos-boot-loader__logo`,src:`img/eos/nexowatt-eos-brand-wide.png`,width:1200,height:342,alt:`NexoWatt EOS – Energy Operation System`}),E(`span`,{className:`eos-boot-loader__spinner`,"aria-hidden":`true`}),E(`p`,{className:`eos-boot-loader__label`,children:e})]})}var vs=y(E(`path`,{d:`M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m-7 6-4 4h3v6h2v-6h3z`}),`OpenInBrowser`);x();var ys={log:{height:400,width:860,padding:8,overflowY:`auto`},logNoSpacing:{height:`100%`,width:`calc(100% - 8px)`,marginLeft:8,padding:8,overflowY:`auto`},error:{color:`#f44336`},info:{color:`#2196f3`},warn:{color:`#ffc107`}},bs=class e extends Qt{constructor(t){super(t),M(this,`logRef`,void 0),M(this,`regExp`,void 0),this.state={log:[`$ iobroker ${t.cmd||``}`],init:!1,max:null,value:null,moreChecked:!0,stopped:!1},this.logRef=Ht.createRef(),this.regExp=new RegExp(e.pattern.join(`|`),`i`)}componentDidMount(){this.props.ready&&this.props.cmd&&(console.log(`STARTED: ${this.props.cmd}`),this.executeCommand())}componentDidUpdate(){var e;!this.state.init&&this.props.ready&&this.props.cmd&&this.executeCommand(),this.props.logsRead&&JSON.stringify(this.props.logsRead)!==JSON.stringify(this.state.log)&&this.setState({log:this.props.logsRead}),(e=this.logRef.current)==null||e.scrollIntoView()}executeCommand(){var e;this.setState({init:!0},()=>this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!0)),this.props.socket.registerCmdStdoutHandler((e,t)=>this.cmdStdoutHandler(e,t)),this.props.socket.registerCmdStderrHandler((e,t)=>this.cmdStderrHandler(e,t)),this.props.socket.registerCmdExitHandler((e,t)=>this.cmdExitHandler(e,t));let t=Math.floor(Math.random()*268435454)+1;this.setState({activeCmdId:t});let n=this.props.host.startsWith(`system.host.`)?this.props.host:`system.host.${this.props.host}`;this.props.socket.cmdExec.bind(this.props.socket)(n,this.props.cmd,t,void 0,(e=this.props.files)!=null&&e.length?this.props.files:void 0).catch(e=>console.log(e))}cmdStdoutHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let e=this.state.log.slice();e.push(t);let n=t.match(/^upload \[(\d+)]/),r=n?null:t.match(/^got [-_:/\\.\w\d]+\/admin$/),i=r?null:t.match(/^got [-_:/\\.\w\d]+\/www$/),a=this.state.max,o=null;n?(a||=parseInt(n[1],10),o=parseInt(n[1],10)):(r||i)&&(a=null),this.setState({log:e,max:a,value:o}),console.log(`cmdStdout`)}}cmdStderrHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();n.push(t),this.setState({log:n}),console.log(`cmdStderr`),console.log(e),console.log(t)}}cmdExitHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();if(!window.document.hidden&&t===0&&n.length&&n[n.length-1].endsWith(`created`)&&this.props.callback){let e=n[n.length-1].split(` `).find(e=>e.startsWith(`system`));e&&setTimeout(e=>{this.props.socket.getObject(e).then(t=>{var n;U.fixAdminUI(t),t&&((n=t.common)==null||(n=n.adminUI)==null?void 0:n.config)!==`none`&&d.doNavigate(`tab-instances`,`config`,e)})},1e3,e)}n.push(`${t===0?``:`ERROR: `}Process exited with code ${t}`),this.setState({log:n,stopped:!0},()=>{this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!1),t!==0||this.state.log[this.state.log.length-1].toLowerCase().includes(`error`)?this.props.errorFunc&&this.props.errorFunc(t,this.state.log):(this.props.performed&&this.props.performed(),this.props.onFinished(t,this.state.log)),console.log(`cmdExit`),console.log(e),console.log(t),typeof this.props.callback==`function`&&this.props.callback(t)})}}colorize(e,t){t&&(e=e.substring(0,t));let n=U.parseColorMessage(e);if(typeof n==`object`)return n.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t));if(e.search(this.regExp)!==-1){let t=[];for(;e.search(this.regExp)>=0;){let[n]=e.match(this.regExp)||[``],r=e.search(this.regExp);if(r>0){let n=e.substring(0,r),i=U.parseColorMessage(n);t.push(E(`span`,{children:typeof i==`object`?i.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):i},t.length)),e=e.replace(n,``)}let i=e.substring(0,n.length);if(i){let r=U.parseColorMessage(i);t.push(E(`span`,{style:ys[n.toLowerCase()],children:typeof r==`object`?r.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):r},t.length)),e=e.replace(i,``)}}if(e){let n=U.parseColorMessage(e);t.push(E(`span`,{children:typeof n==`object`?n.parts.map((e,t)=>E(`span`,{style:e.style,children:e.text},t)):n},t.length))}return t}return e}getLog(){return this.state.log.map((e,t)=>{let n=e.startsWith(`$ `);return E(R,{ref:t===this.state.log.length-1?this.logRef:void 0,component:`p`,variant:`body2`,sx:n?e=>({fontWeight:`bold`,backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.06)`,borderRadius:`4px`,py:`2px`,px:`6px`,mx:`-6px`,mb:`6px`}):void 0,children:this.colorize(e)},t)})}render(){return N(P,{style:this.props.noSpacing?{height:`100%`,width:`100%`}:{},container:!0,spacing:this.props.noSpacing?0:2,sx:{flexDirection:`column`},children:[this.props.showElement===void 0||this.props.showElement===!0?E(P,{children:!this.state.stopped&&E(Ie,{style:this.props.commandError?{backgroundColor:`#f44336`}:void 0,variant:this.props.inBackground?`determinate`:`indeterminate`,value:this.state.max&&this.state.value?100-Math.round(this.state.value/this.state.max*100):this.props.commandError?0:100})}):null,N(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:this.props.inBackground?`space-between`:`flex-end`},children:[E(R,{style:this.props.inBackground?{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}:{display:`none`},component:`div`,children:this.colorize(this.state.log[this.state.log.length-1])}),this.props.showElement===void 0||this.props.showElement===!0?N(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`center`,justifyContent:`end`,gap:8,flexWrap:`nowrap`},children:[E(I,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`less output`)}),E(Ue,{checked:this.state.moreChecked,onChange:e=>this.setState({moreChecked:e.target.checked}),color:`primary`}),E(I,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`more output`)})]}):null]}),E(P,{style:this.props.noSpacing?{height:`calc(100% - 45px)`,width:`100%`}:{},children:this.state.moreChecked&&E(Dt,{style:this.props.noSpacing?ys.logNoSpacing:ys.log,children:this.getLog()})})]})}};M(bs,`pattern`,[`error`,`warn`,`info`]),x();var xs={closeButton:e=>({position:`absolute`,right:8,top:8,color:e.palette.grey[500]}),hiddenDialog:{display:`none`},dialogRoot:{height:`calc(100% - 64px)`}},Ss=class extends Qt{constructor(e){super(e),M(this,`paperRef`,Ht.createRef()),M(this,`handleResize`,()=>{this.paperRef.current&&(this.paperRef.current.offsetWidth||0)!==this.state.dialogWidth&&this.setState({dialogWidth:this.paperRef.current.offsetWidth||0})}),this.state={progressText:``,isError:!1,closeOnReady:(window._localStorage||window.localStorage).getItem(`CommandDialog.closeOnReady`)===`true`,dialogWidth:0}}componentDidMount(){window.addEventListener(`resize`,this.handleResize)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleResize)}componentDidUpdate(){var e;if(this.state.dialogWidth!==(((e=this.paperRef.current)==null?void 0:e.offsetWidth)||0)){var t;this.setState({dialogWidth:((t=this.paperRef.current)==null?void 0:t.offsetWidth)||0})}}render(){return N(u,{scroll:`paper`,fullWidth:!0,sx:{"&.MuiDialog-root":this.props.visible?void 0:xs.hiddenDialog,"& .MuiDialog-paper":xs.dialogRoot},onClose:this.props.inBackground?this.props.onClose:this.props.onInBackground,open:!0,maxWidth:`md`,ref:this.paperRef,children:[N(_e,{children:[this.state.progressText||this.props.t(`Running command`),E(A,{size:`large`,sx:xs.closeButton,onClick:this.props.onClose,disabled:this.props.inBackground,children:E(k,{})})]}),E(ce,{dividers:!0,style:{height:`100%`},children:E(bs,{noSpacing:!0,ready:this.props.ready,host:this.props.host,socket:this.props.socket,t:this.props.t,inBackground:this.props.inBackground,commandError:this.props.commandError,errorFunc:()=>{this.setState({isError:!0}),this.props.errorFunc()},performed:this.props.performed,callback:this.props.callback,cmd:this.props.cmd,files:this.props.files,onFinished:()=>this.state.closeOnReady&&this.props.onClose(),onSetCommandRunning:e=>this.props.onSetCommandRunning(e)},`command`)}),N(xt,{style:{justifyContent:`space-between`,gap:8},children:[E(Ae,{style:{marginLeft:16},control:E(Oe,{disabled:this.props.inBackground,checked:this.state.closeOnReady,onChange:e=>{this.setState({closeOnReady:e.target.checked}),(window._localStorage||window.localStorage).setItem(`CommandDialog.closeOnReady`,e.target.checked?`true`:`false`)}}),label:this.props.t(`close on ready`)}),E(`div`,{style:{flexGrow:1}}),E(H,{variant:`contained`,autoFocus:!0,title:this.props.confirmText||this.props.t(`In background`),disabled:this.props.inBackground,onClick:this.props.onInBackground,startIcon:this.state.dialogWidth>600?E(vs,{}):null,color:`primary`,children:this.state.dialogWidth<=600?E(vs,{}):this.props.confirmText||this.props.t(`In background`)}),E(H,{variant:`contained`,disabled:!this.props.inBackground,onClick:this.props.onClose,color:`grey`,style:{backgroundColor:this.state.isError?`#834141`:void 0,color:this.state.isError?`#fff`:void 0},startIcon:this.state.dialogWidth>600?E(k,{}):null,children:this.state.dialogWidth<=600?E(k,{}):this.props.t(`Close`)})]})]})}},Cs=y(E(`path`,{d:`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`ChevronLeft`),ws=y(E(`path`,{d:`M11 21H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h6zm2 0h6c1.1 0 2-.9 2-2v-7h-8zm8-11V5c0-1.1-.9-2-2-2h-6v7z`}),`SpaceDashboard`),Ts=y(E(`path`,{d:`M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z`}),`Devices`),Es=y(E(`path`,{d:`M8.4 18.2c.38.5.6 1.12.6 1.8 0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3c.44 0 .85.09 1.23.26l1.41-1.77c-.92-1.03-1.29-2.39-1.09-3.69l-2.03-.68c-.54.83-1.46 1.38-2.52 1.38-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3c0 .07 0 .14-.01.21l2.03.68c.64-1.21 1.82-2.09 3.22-2.32V5.91C9.96 5.57 9 4.4 9 3c0-1.66 1.34-3 3-3s3 1.34 3 3c0 1.4-.96 2.57-2.25 2.91v2.16c1.4.23 2.58 1.11 3.22 2.32L18 9.71V9.5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-1.06 0-1.98-.55-2.52-1.37l-2.03.68c.2 1.29-.16 2.65-1.09 3.69l1.41 1.77Q17.34 17 18 17c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.68.22-1.3.6-1.8l-1.41-1.77c-1.35.75-3.01.76-4.37 0z`}),`Hub`),Ds=y(E(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z`}),`Backup`),Os=y(E(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Https`),ks=y(E(`path`,{d:`M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19zm-3-5h-2V7h-4v3H8l4 4z`}),`MoveToInbox`);function As(e,t){if(!e||t===void 0)return null;typeof t!=`object`&&(t=t.split(`.`));let n=t.shift(),r=n===void 0?void 0:e[n];return t.length?typeof r==`object`?As(r,t):null:r}function js(e){let{config:t,children:n,name:r,value:i}=e;return i===void 0?!t||As(t,r)!==!1?n:null:i===!1?null:n}var Ms=e(n(((e,t,n)=>{(function(){var n,r=`Expected a function`,i=`__lodash_hash_undefined__`,a=`__lodash_placeholder__`,o=1,s=2,c=8,l=16,u=32,d=64,f=128,p=256,m=512,h=1/0,g=9007199254740991,_=17976931348623157e292,v=NaN,y=4294967295,b=y-1,x=y>>>1,ee=[[`ary`,f],[`bind`,o],[`bindKey`,s],[`curry`,c],[`curryRight`,l],[`flip`,m],[`partial`,u],[`partialRight`,d],[`rearg`,p]],S=`[object Arguments]`,C=`[object Array]`,w=`[object AsyncFunction]`,T=`[object Boolean]`,te=`[object Date]`,E=`[object DOMException]`,D=`[object Error]`,ne=`[object Function]`,re=`[object GeneratorFunction]`,ie=`[object Map]`,O=`[object Number]`,k=`[object Null]`,A=`[object Object]`,ae=`[object Promise]`,oe=`[object Proxy]`,se=`[object RegExp]`,ce=`[object Set]`,le=`[object String]`,ue=`[object Symbol]`,de=`[object Undefined]`,fe=`[object WeakMap]`,pe=`[object WeakSet]`,me=`[object ArrayBuffer]`,he=`[object DataView]`,ge=`[object Float32Array]`,_e=`[object Float64Array]`,ve=`[object Int8Array]`,ye=`[object Int16Array]`,be=`[object Int32Array]`,xe=`[object Uint8Array]`,Se=`[object Uint8ClampedArray]`,Ce=`[object Uint16Array]`,we=`[object Uint32Array]`,Te=/\b__p \+= '';/g,Ee=/\b(__p \+=) '' \+/g,De=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oe=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,M=RegExp(Oe.source),ke=RegExp(j.source),N=/<%-([\s\S]+?)%>/g,Ae=/<%([\s\S]+?)%>/g,je=/<%=([\s\S]+?)%>/g,Me=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pe=/[\\^$.*+?()[\]{}|]/g,Fe=RegExp(Pe.source),Ie=/^\s+/,Le=/\s/,Re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Ve=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,He=/[()=,{}\[\]\/\s]/,Ue=/\\(\\)?/g,We=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ge=/\w*$/,Ke=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,Je=/^\[object .+?Constructor\]$/,Ye=/^0o[0-7]+$/i,Xe=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,$e=/['\n\r\u2028\u2029\\]/g,et=`\\ud800-\\udfff`,tt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,nt=`\\u2700-\\u27bf`,rt=`a-z\\xdf-\\xf6\\xf8-\\xff`,it=`\\xac\\xb1\\xd7\\xf7`,at=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,ot=`\\u2000-\\u206f`,st=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,ct=`A-Z\\xc0-\\xd6\\xd8-\\xde`,lt=`\\ufe0e\\ufe0f`,ut=it+at+ot+st,dt=`['’]`,F=`[`+et+`]`,ft=`[`+ut+`]`,pt=`[`+tt+`]`,mt=`\\d+`,ht=`[`+nt+`]`,I=`[`+rt+`]`,gt=`[^`+et+ut+mt+nt+rt+ct+`]`,_t=`\\ud83c[\\udffb-\\udfff]`,vt=`(?:`+pt+`|`+_t+`)`,yt=`[^`+et+`]`,bt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,xt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,St=`[`+ct+`]`,Ct=`\\u200d`,wt=`(?:`+I+`|`+gt+`)`,Tt=`(?:`+St+`|`+gt+`)`,Et=`(?:`+dt+`(?:d|ll|m|re|s|t|ve))?`,L=`(?:`+dt+`(?:D|LL|M|RE|S|T|VE))?`,Dt=vt+`?`,R=`[`+lt+`]?`,Ot=`(?:`+Ct+`(?:`+[yt,bt,xt].join(`|`)+`)`+R+Dt+`)*`,kt=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,At=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,jt=R+Dt+Ot,Mt=`(?:`+[ht,bt,xt].join(`|`)+`)`+jt,Nt=`(?:`+[yt+pt+`?`,pt,bt,xt,F].join(`|`)+`)`,Pt=RegExp(dt,`g`),Ft=RegExp(pt,`g`),It=RegExp(_t+`(?=`+_t+`)|`+Nt+jt,`g`),z=RegExp([St+`?`+I+`+`+Et+`(?=`+[ft,St,`$`].join(`|`)+`)`,Tt+`+`+L+`(?=`+[ft,St+wt,`$`].join(`|`)+`)`,St+`?`+wt+`+`+Et,St+`+`+L,At,kt,mt,Mt].join(`|`),`g`),Lt=RegExp(`[`+Ct+et+tt+lt+`]`),Rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt=`Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout`.split(`.`),Bt=-1,Vt={};Vt[ge]=Vt[_e]=Vt[ve]=Vt[ye]=Vt[be]=Vt[xe]=Vt[Se]=Vt[Ce]=Vt[we]=!0,Vt[S]=Vt[C]=Vt[me]=Vt[T]=Vt[he]=Vt[te]=Vt[D]=Vt[ne]=Vt[ie]=Vt[O]=Vt[A]=Vt[se]=Vt[ce]=Vt[le]=Vt[fe]=!1;var B={};B[S]=B[C]=B[me]=B[he]=B[T]=B[te]=B[ge]=B[_e]=B[ve]=B[ye]=B[be]=B[ie]=B[O]=B[A]=B[se]=B[ce]=B[le]=B[ue]=B[xe]=B[Se]=B[Ce]=B[we]=!0,B[D]=B[ne]=B[fe]=!1;var Ht={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`},Ut={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Wt={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},Gt={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},Kt=parseFloat,qt=parseInt,Jt=typeof global==`object`&&global&&global.Object===Object&&global,Yt=typeof self==`object`&&self&&self.Object===Object&&self,Xt=Jt||Yt||Function(`return this`)(),Zt=typeof e==`object`&&e&&!e.nodeType&&e,Qt=Zt&&typeof t==`object`&&t&&!t.nodeType&&t,$t=Qt&&Qt.exports===Zt,V=$t&&Jt.process,en=function(){try{return Qt&&Qt.require&&Qt.require(`util`).types||V&&V.binding&&V.binding(`util`)}catch{}}(),tn=en&&en.isArrayBuffer,nn=en&&en.isDate,rn=en&&en.isMap,an=en&&en.isRegExp,on=en&&en.isSet,sn=en&&en.isTypedArray;function cn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ln(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function H(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function un(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function dn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function fn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function pn(e,t){return!!(e!=null&&e.length)&&Tn(e,t,0)>-1}function mn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function hn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function gn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function _n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function vn(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function yn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=kn(`length`);function xn(e){return e.split(``)}function Sn(e){return e.match(Ve)||[]}function Cn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function wn(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Tn(e,t,n){return t===t?tr(e,t,n):wn(e,Dn,n)}function En(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Dn(e){return e!==e}function On(e,t){var n=e==null?0:e.length;return n?Nn(e,t)/n:v}function kn(e){return function(t){return t==null?n:t[e]}}function An(e){return function(t){return e==null?n:e[t]}}function jn(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Mn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Nn(e,t){for(var r,i=-1,a=e.length;++i<a;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function Pn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Fn(e,t){return hn(t,function(t){return[t,e[t]]})}function In(e){return e&&e.slice(0,ar(e)+1).replace(Ie,``)}function Ln(e){return function(t){return e(t)}}function Rn(e,t){return hn(t,function(t){return e[t]})}function zn(e,t){return e.has(t)}function Bn(e,t){for(var n=-1,r=e.length;++n<r&&Tn(t,e[n],0)>-1;);return n}function Vn(e,t){for(var n=e.length;n--&&Tn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Un=An(Ht),Wn=An(Ut);function Gn(e){return`\\`+Gt[e]}function Kn(e,t){return e==null?n:e[t]}function qn(e){return Lt.test(e)}function Jn(e){return Rt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Xn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Zn(e,t){return function(n){return e(t(n))}}function Qn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,o[i++]=n)}return o}function $n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function er(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return qn(e)?sr(e):bn(e)}function ir(e){return qn(e)?cr(e):xn(e)}function ar(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var or=An(Wt);function sr(e){for(var t=It.lastIndex=0;It.test(e);)++t;return t}function cr(e){return e.match(It)||[]}function U(e){return e.match(z)||[]}var lr=(function e(t){t=t==null?Xt:lr.defaults(Xt.Object(),t,lr.pick(Xt,zt));var Le=t.Array,Ve=t.Date,et=t.Error,tt=t.Function,nt=t.Math,rt=t.Object,it=t.RegExp,at=t.String,ot=t.TypeError,st=Le.prototype,ct=tt.prototype,lt=rt.prototype,ut=t[`__core-js_shared__`],dt=ct.toString,F=lt.hasOwnProperty,ft=0,pt=function(){var e=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),mt=lt.toString,ht=dt.call(rt),I=Xt._,gt=it(`^`+dt.call(F).replace(Pe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),_t=$t?t.Buffer:n,vt=t.Symbol,yt=t.Uint8Array,bt=_t?_t.allocUnsafe:n,xt=Zn(rt.getPrototypeOf,rt),St=rt.create,Ct=lt.propertyIsEnumerable,wt=st.splice,Tt=vt?vt.isConcatSpreadable:n,Et=vt?vt.iterator:n,L=vt?vt.toStringTag:n,Dt=function(){try{var e=Fo(rt,`defineProperty`);return e({},``,{}),e}catch{}}(),R=t.clearTimeout!==Xt.clearTimeout&&t.clearTimeout,Ot=Ve&&Ve.now!==Xt.Date.now&&Ve.now,kt=t.setTimeout!==Xt.setTimeout&&t.setTimeout,At=nt.ceil,jt=nt.floor,Mt=rt.getOwnPropertySymbols,Nt=_t?_t.isBuffer:n,It=t.isFinite,z=st.join,Lt=Zn(rt.keys,rt),Rt=nt.max,Ht=nt.min,Ut=Ve.now,Wt=t.parseInt,Gt=nt.random,Jt=st.reverse,Yt=Fo(t,`DataView`),Zt=Fo(t,`Map`),Qt=Fo(t,`Promise`),V=Fo(t,`Set`),en=Fo(t,`WeakMap`),bn=Fo(rt,`create`),xn=en&&new en,An={},tr=bs(Yt),sr=bs(Zt),cr=bs(Qt),ur=bs(V),dr=bs(en),fr=vt?vt.prototype:n,pr=fr?fr.valueOf:n,mr=fr?fr.toString:n;function W(e){if(du(e)&&!Y(e)&&!(e instanceof vr)){if(e instanceof _r)return e;if(F.call(e,`__wrapped__`))return Ss(e)}return new _r(e)}var hr=function(){function e(){}return function(t){if(!uu(t))return{};if(St)return St(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function gr(){}function _r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}W.templateSettings={escape:N,evaluate:Ae,interpolate:je,variable:``,imports:{_:W}},W.prototype=gr.prototype,W.prototype.constructor=W,_r.prototype=hr(gr.prototype),_r.prototype.constructor=_r;function vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function yr(){var e=new vr(this.__wrapped__);return e.__actions__=Ka(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ka(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ka(this.__views__),e}function br(){if(this.__filtered__){var e=new vr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function xr(){var e=this.__wrapped__.value(),t=this.__dir__,n=Y(e),r=t<0,i=n?e.length:0,a=Bo(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,d=u.length,f=0,p=Ht(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return Da(e,this.__actions__);var m=[];outer:for(;c--&&f<p;){l+=t;for(var h=-1,g=e[l];++h<d;){var _=u[h],v=_.iteratee,y=_.type,b=v(g);if(y==2)g=b;else if(!b){if(y==1)continue outer;break outer}}m[f++]=g}return m}vr.prototype=hr(gr.prototype),vr.prototype.constructor=vr;function Sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(){this.__data__=bn?bn(null):{},this.size=0}function wr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function Tr(e){var t=this.__data__;if(bn){var r=t[e];return r===i?n:r}return F.call(t,e)?t[e]:n}function G(e){var t=this.__data__;return bn?t[e]!==n:F.call(t,e)}function Er(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=bn&&t===n?i:t,this}Sr.prototype.clear=Cr,Sr.prototype.delete=wr,Sr.prototype.get=Tr,Sr.prototype.has=G,Sr.prototype.set=Er;function Dr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Or(){this.__data__=[],this.size=0}function kr(e){var t=this.__data__,n=ei(t,e);return n<0?!1:(n==t.length-1?t.pop():wt.call(t,n,1),--this.size,!0)}function Ar(e){var t=this.__data__,r=ei(t,e);return r<0?n:t[r][1]}function jr(e){return ei(this.__data__,e)>-1}function Mr(e,t){var n=this.__data__,r=ei(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Dr.prototype.clear=Or,Dr.prototype.delete=kr,Dr.prototype.get=Ar,Dr.prototype.has=jr,Dr.prototype.set=Mr;function Nr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pr(){this.size=0,this.__data__={hash:new Sr,map:new(Zt||Dr),string:new Sr}}function Fr(e){var t=No(this,e).delete(e);return this.size-=+!!t,t}function Ir(e){return No(this,e).get(e)}function Lr(e){return No(this,e).has(e)}function Rr(e,t){var n=No(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Nr.prototype.clear=Pr,Nr.prototype.delete=Fr,Nr.prototype.get=Ir,Nr.prototype.has=Lr,Nr.prototype.set=Rr;function zr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Nr;++t<n;)this.add(e[t])}function Br(e){return this.__data__.set(e,i),this}function Vr(e){return this.__data__.has(e)}zr.prototype.add=zr.prototype.push=Br,zr.prototype.has=Vr;function Hr(e){var t=this.__data__=new Dr(e);this.size=t.size}function Ur(){this.__data__=new Dr,this.size=0}function Wr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gr(e){return this.__data__.get(e)}function Kr(e){return this.__data__.has(e)}function qr(e,t){var n=this.__data__;if(n instanceof Dr){var r=n.__data__;if(!Zt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nr(r)}return n.set(e,t),this.size=n.size,this}Hr.prototype.clear=Ur,Hr.prototype.delete=Wr,Hr.prototype.get=Gr,Hr.prototype.has=Kr,Hr.prototype.set=qr;function Jr(e,t){var n=Y(e),r=!n&&Jl(e),i=!n&&!r&&$l(e),a=!n&&!r&&!i&&Eu(e),o=n||r||i||a,s=o?Pn(e.length,at):[],c=s.length;for(var l in e)(t||F.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Jo(l,c)))&&s.push(l);return s}function Yr(e){var t=e.length;return t?e[sa(0,t-1)]:n}function Xr(e,t){return _s(Ka(e),oi(t,0,e.length))}function Zr(e){return _s(Ka(e))}function Qr(e,t,r){(r!==n&&!Gl(e[t],r)||r===n&&!(t in e))&&ii(e,t,r)}function $r(e,t,r){var i=e[t];(!(F.call(e,t)&&Gl(i,r))||r===n&&!(t in e))&&ii(e,t,r)}function ei(e,t){for(var n=e.length;n--;)if(Gl(e[n][0],t))return n;return-1}function ti(e,t,n,r){return fi(e,function(e,i,a){t(r,e,n(e),a)}),r}function ni(e,t){return e&&qa(t,sd(t),e)}function ri(e,t){return e&&qa(t,cd(t),e)}function ii(e,t,n){t==`__proto__`&&Dt?Dt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ai(e,t){for(var r=-1,i=t.length,a=Le(i),o=e==null;++r<i;)a[r]=o?n:td(e,t[r]);return a}function oi(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function si(e,t,r,i,a,o){var s,c=t&1,l=t&2,u=t&4;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!uu(e))return e;var d=Y(e);if(d){if(s=Uo(e),!c)return Ka(e,s)}else{var f=zo(e),p=f==ne||f==re;if($l(e))return Ia(e,c);if(f==A||f==S||p&&!a){if(s=l||p?{}:Wo(e),!c)return l?Ya(e,ri(s,e)):Ja(e,ni(s,e))}else{if(!B[f])return a?e:{};s=Go(e,f,c)}}o||=new Hr;var m=o.get(e);if(m)return m;o.set(e,s),Cu(e)?e.forEach(function(n){s.add(si(n,t,r,n,e,o))}):fu(e)&&e.forEach(function(n,i){s.set(i,si(n,t,r,i,e,o))});var h=d?n:(u?l?ko:Oo:l?cd:sd)(e);return H(h||e,function(n,i){h&&(i=n,n=e[i]),$r(s,i,si(n,t,r,i,e,o))}),s}function ci(e){var t=sd(e);return function(n){return li(n,e,t)}}function li(e,t,r){var i=r.length;if(e==null)return!i;for(e=rt(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function ui(e,t,i){if(typeof e!=`function`)throw new ot(r);return ps(function(){e.apply(n,i)},t)}function di(e,t,n,r){var i=-1,a=pn,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=hn(t,Ln(n))),r?(a=mn,o=!1):t.length>=200&&(a=zn,o=!1,t=new zr(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var fi=Qa(xi),pi=Qa(Si,!0);function mi(e,t){var n=!0;return fi(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function hi(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===n?s===s&&!Tu(s):r(s,c)))var c=s,l=o}return l}function gi(e,t,r,i){var a=e.length;for(r=X(r),r<0&&(r=-r>a?0:a+r),i=i===n||i>a?a:X(i),i<0&&(i+=a),i=r>i?0:Pu(i);r<i;)e[r++]=t;return e}function _i(e,t){var n=[];return fi(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vi(e,t,n,r,i){var a=-1,o=e.length;for(n||=qo,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?vi(s,t-1,n,r,i):gn(i,s):r||(i[i.length]=s)}return i}var yi=$a(),bi=$a(!0);function xi(e,t){return e&&yi(e,t,sd)}function Si(e,t){return e&&bi(e,t,sd)}function Ci(e,t){return fn(t,function(t){return su(e[t])})}function wi(e,t){t=Ma(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[ys(t[r++])];return r&&r==i?e:n}function Ti(e,t,n){var r=t(e);return Y(e)?r:gn(r,n(e))}function Ei(e){return e==null?e===n?de:k:L&&L in rt(e)?Io(e):ss(e)}function Di(e,t){return e>t}function Oi(e,t){return e!=null&&F.call(e,t)}function ki(e,t){return e!=null&&t in rt(e)}function Ai(e,t,n){return e>=Ht(t,n)&&e<Rt(t,n)}function ji(e,t,r){for(var i=r?mn:pn,a=e[0].length,o=e.length,s=o,c=Le(o),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=hn(d,Ln(t))),l=Ht(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new zr(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f<a&&u.length<l;){var m=d[f],h=t?t(m):m;if(m=r||m!==0?m:0,!(p?zn(p,h):i(u,h,r))){for(s=o;--s;){var g=c[s];if(!(g?zn(g,h):i(e[s],h,r)))continue outer}p&&p.push(h),u.push(m)}}return u}function Mi(e,t,n,r){return xi(e,function(e,i,a){t(r,n(e),i,a)}),r}function Ni(e,t,r){t=Ma(t,e),e=ls(e,t);var i=e==null?e:e[ys(qs(t))];return i==null?n:cn(i,e,r)}function Pi(e){return du(e)&&Ei(e)==S}function Fi(e){return du(e)&&Ei(e)==me}function Ii(e){return du(e)&&Ei(e)==te}function Li(e,t,n,r,i){return e===t?!0:e==null||t==null||!du(e)&&!du(t)?e!==e&&t!==t:Ri(e,t,n,r,Li,i)}function Ri(e,t,n,r,i,a){var o=Y(e),s=Y(t),c=o?C:zo(e),l=s?C:zo(t);c=c==S?A:c,l=l==S?A:l;var u=c==A,d=l==A,f=c==l;if(f&&$l(e)){if(!$l(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Hr,o||Eu(e)?wo(e,t,n,r,i,a):To(e,t,c,n,r,i,a);if(!(n&1)){var p=u&&F.call(e,`__wrapped__`),m=d&&F.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Hr,i(h,g,n,r,a)}}return f?(a||=new Hr,Eo(e,t,n,r,i,a)):!1}function zi(e){return du(e)&&zo(e)==ie}function Bi(e,t,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=rt(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===n&&!(l in e))return!1}else{var f=new Hr;if(i)var p=i(u,d,l,e,t,f);if(!(p===n?Li(d,u,3,i,f):p))return!1}}return!0}function Vi(e){return!uu(e)||$o(e)?!1:(su(e)?gt:Je).test(bs(e))}function Hi(e){return du(e)&&Ei(e)==se}function Ui(e){return du(e)&&zo(e)==ce}function Wi(e){return du(e)&&lu(e.length)&&!!Vt[Ei(e)]}function Gi(e){return typeof e==`function`?e:e==null?mf:typeof e==`object`?Y(e)?Zi(e[0],e[1]):Xi(e):Df(e)}function Ki(e){if(!ts(e))return Lt(e);var t=[];for(var n in rt(e))F.call(e,n)&&n!=`constructor`&&t.push(n);return t}function qi(e){if(!uu(e))return os(e);var t=ts(e),n=[];for(var r in e)(r!=`constructor`||!t&&F.call(e,r))&&n.push(r);return n}function Ji(e,t){return e<t}function Yi(e,t){var n=-1,r=Xl(e)?Le(e.length):[];return fi(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Xi(e){var t=Po(e);return t.length==1&&t[0][2]?rs(t[0][0],t[0][1]):function(n){return n===e||Bi(n,e,t)}}function Zi(e,t){return Xo(e)&&ns(t)?rs(ys(e),t):function(r){var i=td(r,e);return i===n&&i===t?rd(r,e):Li(t,i,3)}}function Qi(e,t,r,i,a){e!==t&&yi(t,function(o,s){if(a||=new Hr,uu(o))$i(e,t,s,r,Qi,i,a);else{var c=i?i(ds(e,s),o,s+``,e,t,a):n;c===n&&(c=o),Qr(e,s,c)}},cd)}function $i(e,t,r,i,a,o,s){var c=ds(e,r),l=ds(t,r),u=s.get(l);if(u)Qr(e,r,u);else{var d=o?o(c,l,r+``,e,t,s):n,f=d===n;if(f){var p=Y(l),m=!p&&$l(l),h=!p&&!m&&Eu(l);d=l,p||m||h?Y(c)?d=c:Zl(c)?d=Ka(c):m?(f=!1,d=Ia(l,!0)):h?(f=!1,d=Va(l,!0)):d=[]:bu(l)||Jl(l)?(d=c,Jl(c)?d=Iu(c):(!uu(c)||su(c))&&(d=Wo(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),Qr(e,r,d)}}function ea(e,t){var r=e.length;if(r)return t+=t<0?r:0,Jo(t,r)?e[t]:n}function ta(e,t,n){t=t.length?hn(t,function(e){return Y(e)?function(t){return wi(t,e.length===1?e[0]:e)}:e}):[mf];var r=-1;return t=hn(t,Ln(q())),Mn(Yi(e,function(e,n,i){return{criteria:hn(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Ua(e,t,n)})}function na(e,t){return ra(e,t,function(t,n){return rd(e,n)})}function ra(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=wi(e,o);n(s,o)&&fa(a,Ma(o,e),s)}return a}function ia(e){return function(t){return wi(t,e)}}function aa(e,t,n,r){var i=r?En:Tn,a=-1,o=t.length,s=e;for(e===t&&(t=Ka(t)),n&&(s=hn(e,Ln(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&wt.call(s,c,1),wt.call(e,c,1);return e}function oa(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Jo(i)?wt.call(e,i,1):wa(e,i)}}return e}function sa(e,t){return e+jt(Gt()*(t-e+1))}function ca(e,t,n,r){for(var i=-1,a=Rt(At((t-e)/(n||1)),0),o=Le(a);a--;)o[r?a:++i]=e,e+=n;return o}function la(e,t){var n=``;if(!e||t<1||t>g)return n;do t%2&&(n+=e),t=jt(t/2),t&&(e+=e);while(t);return n}function K(e,t){return ms(cs(e,t,mf),e+``)}function ua(e){return Yr(Ed(e))}function da(e,t){var n=Ed(e);return _s(n,oi(t,0,n.length))}function fa(e,t,r,i){if(!uu(e))return e;t=Ma(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=ys(t[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):n,u===n&&(u=uu(d)?d:Jo(t[a+1])?[]:{})}$r(c,l,u),c=c[l]}return e}var pa=xn?function(e,t){return xn.set(e,t),e}:mf,ma=Dt?function(e,t){return Dt(e,`toString`,{configurable:!0,enumerable:!1,value:uf(t),writable:!0})}:mf;function ha(e){return _s(Ed(e))}function ga(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Le(i);++r<i;)a[r]=e[r+t];return a}function _a(e,t){var n;return fi(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function va(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t==`number`&&t===t&&i<=x){for(;r<i;){var a=r+i>>>1,o=e[a];o!==null&&!Tu(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return ya(e,t,mf,n)}function ya(e,t,r,i){var a=0,o=e==null?0:e.length;if(o===0)return 0;t=r(t);for(var s=t!==t,c=t===null,l=Tu(t),u=t===n;a<o;){var d=jt((a+o)/2),f=r(e[d]),p=f!==n,m=f===null,h=f===f,g=Tu(f);if(s)var _=i||h;else _=u?h&&(i||p):c?h&&p&&(i||!m):l?h&&p&&!m&&(i||!g):m||g?!1:i?f<=t:f<t;_?a=d+1:o=d}return Ht(o,b)}function ba(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Gl(s,c)){var c=s;a[i++]=o===0?0:o}}return a}function xa(e){return typeof e==`number`?e:Tu(e)?v:+e}function Sa(e){if(typeof e==`string`)return e;if(Y(e))return hn(e,Sa)+``;if(Tu(e))return mr?mr.call(e):``;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Ca(e,t,n){var r=-1,i=pn,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=mn;else if(a>=200){var l=t?null:vo(e);if(l)return $n(l);o=!1,i=zn,c=new zr}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function wa(e,t){t=Ma(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=ys(t[n]);if(i===`__proto__`&&!F.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=ls(e,t);return a==null||delete a[ys(qs(t))]}function Ta(e,t,n,r){return fa(e,t,n(wi(e,t)),r)}function Ea(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?ga(e,r?0:a,r?a+1:i):ga(e,r?a+1:0,r?i:a)}function Da(e,t){var n=e;return n instanceof vr&&(n=n.value()),_n(t,function(e,t){return t.func.apply(t.thisArg,gn([e],t.args))},n)}function Oa(e,t,n){var r=e.length;if(r<2)return r?Ca(e[0]):[];for(var i=-1,a=Le(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=di(a[i]||o,e[s],t,n));return Ca(vi(a,1),t,n)}function ka(e,t,r){for(var i=-1,a=e.length,o=t.length,s={};++i<a;){var c=i<o?t[i]:n;r(s,e[i],c)}return s}function Aa(e){return Zl(e)?e:[]}function ja(e){return typeof e==`function`?e:mf}function Ma(e,t){return Y(e)?e:Xo(e,t)?[e]:vs(Ru(e))}var Na=K;function Pa(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ga(e,t,r)}var Fa=R||function(e){return Xt.clearTimeout(e)};function Ia(e,t){if(t)return e.slice();var n=e.length,r=bt?bt(n):new e.constructor(n);return e.copy(r),r}function La(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}function Ra(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function za(e){var t=new e.constructor(e.source,Ge.exec(e));return t.lastIndex=e.lastIndex,t}function Ba(e){return pr?rt(pr.call(e)):{}}function Va(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ha(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=Tu(e),s=t!==n,c=t===null,l=t===t,u=Tu(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function Ua(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Ha(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Wa(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Rt(a-o,0),u=Le(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function Ga(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Rt(a-s,0),d=Le(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function Ka(e,t){var n=-1,r=e.length;for(t||=Le(r);++n<r;)t[n]=e[n];return t}function qa(e,t,r,i){var a=!r;r||={};for(var o=-1,s=t.length;++o<s;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),a?ii(r,c,l):$r(r,c,l)}return r}function Ja(e,t){return qa(e,Lo(e),t)}function Ya(e,t){return qa(e,Ro(e),t)}function Xa(e,t){return function(n,r){var i=Y(n)?ln:ti,a=t?t():{};return i(n,e,q(r,2),a)}}function Za(e){return K(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&Yo(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=rt(t);++i<a;){var c=r[i];c&&e(t,c,i,o)}return t})}function Qa(e,t){return function(n,r){if(n==null)return n;if(!Xl(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=rt(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function $a(e){return function(t,n,r){for(var i=-1,a=rt(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function eo(e,t,n){var r=t&o,i=ro(e);function a(){return(this&&this!==Xt&&this instanceof a?i:e).apply(r?n:this,arguments)}return a}function to(e){return function(t){t=Ru(t);var r=qn(t)?ir(t):n,i=r?r[0]:t.charAt(0),a=r?Pa(r,1).join(``):t.slice(1);return i[e]()+a}}function no(e){return function(t){return _n(Z(Nd(t).replace(Pt,``)),e,``)}}function ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=hr(e.prototype),r=e.apply(n,t);return uu(r)?r:n}}function io(e,t,r){var i=ro(e);function a(){for(var o=arguments.length,s=Le(o),c=o,l=Mo(a);c--;)s[c]=arguments[c];var u=o<3&&s[0]!==l&&s[o-1]!==l?[]:Qn(s,l);return o-=u.length,o<r?go(e,t,so,a.placeholder,n,s,u,n,n,r-o):cn(this&&this!==Xt&&this instanceof a?i:e,this,s)}return a}function ao(e){return function(t,r,i){var a=rt(t);if(!Xl(t)){var o=q(r,3);t=sd(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[o?t[s]:s]:n}}function oo(e){return Do(function(t){var i=t.length,a=i,o=_r.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if(typeof s!=`function`)throw new ot(r);if(o&&!l&&jo(s)==`wrapper`)var l=new _r([],!0)}for(a=l?a:i;++a<i;){s=t[a];var d=jo(s),m=d==`wrapper`?Ao(s):n;l=m&&Qo(m[0])&&m[1]==(f|c|u|p)&&!m[4].length&&m[9]==1?l[jo(m[0])].apply(l,m[3]):s.length==1&&Qo(s)?l[d]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&e.length==1&&Y(n))return l.plant(n).value();for(var r=0,a=i?t[r].apply(this,e):n;++r<i;)a=t[r].call(this,a);return a}})}function so(e,t,r,i,a,u,d,p,h,g){var _=t&f,v=t&o,y=t&s,b=t&(c|l),x=t&m,ee=y?n:ro(e);function S(){for(var n=arguments.length,o=Le(n),s=n;s--;)o[s]=arguments[s];if(b)var c=Mo(S),l=Hn(o,c);if(i&&(o=Wa(o,i,a,b)),u&&(o=Ga(o,u,d,b)),n-=l,b&&n<g){var f=Qn(o,c);return go(e,t,so,S.placeholder,r,o,f,p,h,g-n)}var m=v?r:this,C=y?m[e]:e;return n=o.length,p?o=us(o,p):x&&n>1&&o.reverse(),_&&h<n&&(o.length=h),this&&this!==Xt&&this instanceof S&&(C=ee||ro(C)),C.apply(m,o)}return S}function co(e,t){return function(n,r){return Mi(n,e,t(r),{})}}function lo(e,t){return function(r,i){var a;if(r===n&&i===n)return t;if(r!==n&&(a=r),i!==n){if(a===n)return i;typeof r==`string`||typeof i==`string`?(r=Sa(r),i=Sa(i)):(r=xa(r),i=xa(i)),a=e(r,i)}return a}}function uo(e){return Do(function(t){return t=hn(t,Ln(q())),K(function(n){var r=this;return e(t,function(e){return cn(e,r,n)})})})}function fo(e,t){t=t===n?` `:Sa(t);var r=t.length;if(r<2)return r?la(t,e):t;var i=la(t,At(e/rr(t)));return qn(t)?Pa(ir(i),0,e).join(``):i.slice(0,e)}function po(e,t,n,r){var i=t&o,a=ro(e);function s(){for(var t=-1,o=arguments.length,c=-1,l=r.length,u=Le(l+o),d=this&&this!==Xt&&this instanceof s?a:e;++c<l;)u[c]=r[c];for(;o--;)u[c++]=arguments[++t];return cn(d,i?n:this,u)}return s}function mo(e){return function(t,r,i){return i&&typeof i!=`number`&&Yo(t,r,i)&&(r=i=n),t=Nu(t),r===n?(r=t,t=0):r=Nu(r),i=i===n?t<r?1:-1:Nu(i),ca(t,r,i,e)}}function ho(e){return function(t,n){return(typeof t!=`string`||typeof n!=`string`)&&(t=Fu(t),n=Fu(n)),e(t,n)}}function go(e,t,r,i,a,l,f,p,m,h){var g=t&c,_=g?f:n,v=g?n:f,y=g?l:n,b=g?n:l;t|=g?u:d,t&=~(g?d:u),t&4||(t&=~(o|s));var x=[e,t,a,y,_,b,v,p,m,h],ee=r.apply(n,x);return Qo(e)&&fs(ee,x),ee.placeholder=i,hs(ee,e,t)}function _o(e){var t=nt[e];return function(e,n){if(e=Fu(e),n=n==null?0:Ht(X(n),292),n&&It(e)){var r=(Ru(e)+`e`).split(`e`);return r=(Ru(t(r[0]+`e`+(+r[1]+n)))+`e`).split(`e`),+(r[0]+`e`+(+r[1]-n))}return t(e)}}var vo=V&&1/$n(new V([,-0]))[1]==h?function(e){return new V(e)}:Sf;function yo(e){return function(t){var n=zo(t);return n==ie?Xn(t):n==ce?er(t):Fn(t,e(t))}}function bo(e,t,i,a,f,p,m,h){var g=t&s;if(!g&&typeof e!=`function`)throw new ot(r);var _=a?a.length:0;if(_||(t&=~(u|d),a=f=n),m=m===n?m:Rt(X(m),0),h=h===n?h:X(h),_-=f?f.length:0,t&d){var v=a,y=f;a=f=n}var b=g?n:Ao(e),x=[e,t,i,a,f,v,y,p,m,h];if(b&&as(x,b),e=x[0],t=x[1],i=x[2],a=x[3],f=x[4],h=x[9]=x[9]===n?g?0:e.length:Rt(x[9]-_,0),!h&&t&(c|l)&&(t&=~(c|l)),!t||t==o)var ee=eo(e,t,i);else ee=t==c||t==l?io(e,t,h):(t==u||t==(o|u))&&!f.length?po(e,t,i,a):so.apply(n,x);return hs((b?pa:fs)(ee,x),e,t)}function xo(e,t,r,i){return e===n||Gl(e,lt[r])&&!F.call(i,r)?t:e}function So(e,t,r,i,a,o){return uu(e)&&uu(t)&&(o.set(t,e),Qi(e,t,n,So,o),o.delete(t)),e}function Co(e){return bu(e)?n:e}function wo(e,t,r,i,a,o){var s=r&1,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&2?new zr:n;for(o.set(e,t),o.set(t,e);++f<c;){var h=e[f],g=t[f];if(i)var _=s?i(g,h,f,t,e,o):i(h,g,f,e,t,o);if(_!==n){if(_)continue;p=!1;break}if(m){if(!yn(t,function(e,t){if(!zn(m,t)&&(h===e||a(h,e,r,i,o)))return m.push(t)})){p=!1;break}}else if(!(h===g||a(h,g,r,i,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function To(e,t,n,r,i,a,o){switch(n){case he:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case me:return!(e.byteLength!=t.byteLength||!a(new yt(e),new yt(t)));case T:case te:case O:return Gl(+e,+t);case D:return e.name==t.name&&e.message==t.message;case se:case le:return e==t+``;case ie:var s=Xn;case ce:var c=r&1;if(s||=$n,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=wo(s(e),s(t),r,i,a,o);return o.delete(e),u;case ue:if(pr)return pr.call(e)==pr.call(t)}return!1}function Eo(e,t,r,i,a,o){var s=r&1,c=Oo(e),l=c.length;if(l!=Oo(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:F.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=s;++u<l;){d=c[u];var g=e[d],_=t[d];if(i)var v=s?i(_,g,d,t,e,o):i(g,_,d,e,t,o);if(!(v===n?g===_||a(g,_,r,i,o):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m}function Do(e){return ms(cs(e,n,Is),e+``)}function Oo(e){return Ti(e,sd,Lo)}function ko(e){return Ti(e,cd,Ro)}var Ao=xn?function(e){return xn.get(e)}:Sf;function jo(e){for(var t=e.name+``,n=An[t],r=F.call(An,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}function Mo(e){return(F.call(W,`placeholder`)?W:e).placeholder}function q(){var e=W.iteratee||hf;return e=e===hf?Gi:e,arguments.length?e(arguments[0],arguments[1]):e}function No(e,t){var n=e.__data__;return Zo(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Po(e){for(var t=sd(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ns(i)]}return t}function Fo(e,t){var r=Kn(e,t);return Vi(r)?r:n}function Io(e){var t=F.call(e,L),r=e[L];try{e[L]=n;var i=!0}catch{}var a=mt.call(e);return i&&(t?e[L]=r:delete e[L]),a}var Lo=Mt?function(e){return e==null?[]:(e=rt(e),fn(Mt(e),function(t){return Ct.call(e,t)}))}:jf,Ro=Mt?function(e){for(var t=[];e;)gn(t,Lo(e)),e=xt(e);return t}:jf,zo=Ei;(Yt&&zo(new Yt(new ArrayBuffer(1)))!=he||Zt&&zo(new Zt)!=ie||Qt&&zo(Qt.resolve())!=ae||V&&zo(new V)!=ce||en&&zo(new en)!=fe)&&(zo=function(e){var t=Ei(e),r=t==A?e.constructor:n,i=r?bs(r):``;if(i)switch(i){case tr:return he;case sr:return ie;case cr:return ae;case ur:return ce;case dr:return fe}return t});function Bo(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case`drop`:e+=o;break;case`dropRight`:t-=o;break;case`take`:t=Ht(t,e+o);break;case`takeRight`:e=Rt(e,t-o)}}return{start:e,end:t}}function Vo(e){var t=e.match(ze);return t?t[1].split(Be):[]}function Ho(e,t,n){t=Ma(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ys(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&lu(i)&&Jo(o,i)&&(Y(e)||Jl(e)))}function Uo(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&F.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function Wo(e){return typeof e.constructor==`function`&&!ts(e)?hr(xt(e)):{}}function Go(e,t,n){var r=e.constructor;switch(t){case me:return La(e);case T:case te:return new r(+e);case he:return Ra(e,n);case ge:case _e:case ve:case ye:case be:case xe:case Se:case Ce:case we:return Va(e,n);case ie:return new r;case O:case le:return new r(e);case se:return za(e);case ce:return new r;case ue:return Ba(e)}}function Ko(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(Re,`{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./icons-material-CUNq6tdT.js","./loadShare-eager-dmdYQhAl.js","./rolldown-runtime-sJBDdmOt.js","./vite-preload-helper-BbbETgeG.js","./AccessTime-CuR73YC3.js","./MoreHoriz-CS7nODK8.js","./Star-D8VNXawT.js","./WifiTethering-DJ9VO12W.js","./Apps-BZHXIYjq.js","./ViewSidebar-CjClbCI5.js","./Book-Cq8bkU2t.js","./Usb-C8HitPqx.js","./Cached-DXXpEqUN.js","./Pageview-wzrLQZ-j.js","./Computer-BBU3Cm9-.js","./Timer-vc3BIs4y.js","./DeleteForever-CioJt3X3.js","./Extension-DIV5Bi1u.js","./KeyboardArrowRight-ifvmV1ZL.js","./PersonOff-YtHcY0sV.js","./InfoOutlined-Bggo2-pX.js","./ViewCompact-D7bHgn99.js","./PushPinOutlined-BCUm5DLR.js","./Remove-IN7ZNaCF.js","./Schedule-vdojlve9.js","./Timeline-BtOuO808.js","./Storage-B44xXFFu.js","./TextSnippet-C9R3EbZy.js","./UnfoldMore-DOHSVdRn.js","./ViewList-DVj9ENkU.js","./VpnKey-BbZdswcd.js","./date-fns-BtR4dG_j.js","./en-US-BjjaEI6N.js","./setYear-DDSuW45e.js","./isSameWeek-WMSJR5Qs.js","./locale-DN6Bdkdt.js","./Overview-DdvghCLQ.js","./AdminUtils-Dc1eHsx5.js","./installSVGRenderer-DujLjpXt.js","./Adapters-CIlqSF5B.js","./sentry-CPzCHrwe.js","./AdapterUpdateDialog-DH6S-kWX.js","./zh-cn-B6dBxOyw.js","./State-0UzpgKYj.js","./CustomModal-Do2qVZr7.js","./ctrlEnter-CruFIPb_.js","./Instances-Db6Vgh62.js","./Config-C4k51ggG.js","./AceEditor-BgLZBrSD.js","./UsedResources-Bcmo58YD.js","./classPrivateFieldGet2-DZ8s9-Td.js","./Intro-Dc3wAG9V.js","./Logs-CPbEGWNq.js","./Files-wmjjMXYM.js","./Objects-DJB-2468.js","./Users-BGHf3Rox.js","./Fields-vWLKiuvO.js","./Enums-3H97czGs.js","./CustomTab-B4ywHrnT.js","./ConfigManager-BhVBfM-q.js","./Hosts-Bk-xmI98.js","./EasyMode-A2E3hSMo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,r as t,t as n}from"./rolldown-runtime-sJBDdmOt.js";import{t as r}from"./vite-preload-helper-BbbETgeG.js";import{$a as i,$n as a,$r as o,$s as s,Aa as c,An as l,Ao as u,Ar as d,Bn as f,Bo as p,Bt as m,Ci as h,Co as g,Cs as _,Do as v,Ds as y,Eo as b,Es as x,F as ee,Fo as S,Go as C,Gr as w,Ha as te,Hr as ne,Hs as T,I as E,In as re,Io as ie,Ja as ae,Jo as D,Ka as O,Ko as k,Ks as oe,Lo as se,Lt as ce,Mo as le,Mr as ue,Ms as de,No as fe,Nr as pe,Oa as me,On as he,Oo as ge,Os as _e,Po as ve,Qa as ye,Qn as be,Qo as xe,Ro as Se,Rt as Ce,Sc as we,Si as Te,Sr as Ee,Ss as De,Ti as Oe,To as ke,Tr as A,Ts as j,Uo as Ae,Us as M,Vo as je,Vs as Me,Wa as Ne,Wo as N,Wr as Pe,Xa as Fe,Xn as Ie,Xo as Le,Xs as Re,Y as ze,Ya as Be,Yn as Ve,Yo as He,Ys as Ue,Za as We,Zo as Ge,_o as Ke,_s as qe,a as Je,ac as Ye,ai as Xe,ao as Ze,as as Qe,ba as $e,bn as et,bo as tt,br as nt,bs as rt,c as it,cc as at,co as ot,cs as st,dr as ct,ds as lt,ea as ut,ec as dt,eo as ft,fc as P,fo as pt,fr as mt,gc as ht,gn as gt,go as F,hs as _t,ic as vt,ir as yt,is as bt,jn as xt,jo as St,jr as Ct,ka as wt,ko as Tt,kr as Et,lc as Dt,lo as I,ls as Ot,mo as L,n as kt,nc as At,no as jt,nr as Mt,ns as Nt,oc as Pt,oi as Ft,oo as It,os as Lt,pc as R,po as Rt,pr as zt,ps as Bt,qa as Vt,qn as Ht,qo as z,qs as Ut,r as Wt,ra as Gt,rc as Kt,rn as qt,ro as Jt,rs as Yt,sc as Xt,so as Zt,sr as Qt,tc as $t,ti as en,to as B,ts as tn,ua as nn,uc as rn,vs as an,wn as on,wo as sn,xc as cn,xo as ln,xs as un,yo as V,yr as dn,ys as fn,zo as pn}from"./loadShare-eager-dmdYQhAl.js";import{t as mn}from"./AccessTime-CuR73YC3.js";import{dedupeIntegration as hn,init as gn}from"./prod-ChPGnyiA.js";import{d as _n,t as vn}from"./en-US-BjjaEI6N.js";import{$ as yn,C as bn,D as xn,E as Sn,G as Cn,J as wn,K as Tn,M as En,N as Dn,P as On,Q as kn,R as An,S as jn,T as Mn,U as Nn,W as Pn,Y as Fn,Z as In,a as Ln,b as Rn,c as zn,ct as Bn,d as Vn,dt as Hn,et as Un,i as Wn,it as Gn,j as Kn,k as qn,l as Jn,n as Yn,o as Xn,p as Zn,q as Qn,r as $n,s as er,t as tr,tt as nr,u as rr,ut as ir,w as ar,x as or}from"./setYear-DDSuW45e.js";import{a as sr,n as cr,o as lr,r as ur,t as H}from"./AdminUtils-Dc1eHsx5.js";import{t as dr}from"./AceEditor-BgLZBrSD.js";import{t as fr}from"./ctrlEnter-CruFIPb_.js";x(),it();var pr=y(T(`path`,{d:`m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z`}),`ArrowForward`),mr=y(T(`path`,{d:`M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m-2 14-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z`}),`AssignmentTurnedIn`),hr=y(T(`path`,{d:`m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z`}),`AutoAwesome`),U=y(T(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z`}),`Backup`),gr=y(T(`path`,{d:`M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z`}),`BarChart`),_r=y([T(`path`,{d:`M21 19.1H3V5h18zM21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2`},`0`),T(`path`,{d:`M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41z`},`1`)],`CancelPresentation`),vr=y(T(`path`,{d:`M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2m0 13H4v-2h16zm0-5H4V4h16z`}),`CardMembership`),W=y(T(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z`}),`CheckCircle`),yr=y(T(`path`,{d:`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`ChevronLeft`),br=y(T(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96`}),`Cloud`),xr=y(T(`path`,{d:`M21.5 14.98c-.02 0-.03 0-.05.01C21.2 13.3 19.76 12 18 12c-1.4 0-2.6.83-3.16 2.02C13.26 14.1 12 15.4 12 17c0 1.66 1.34 3 3 3l6.5-.02c1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5M10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74M20 6h-2.73c1.43 1.26 2.41 3.01 2.66 5h-2.02c-.23-1.36-.93-2.55-1.91-3.44V10h-2V4h6z`}),`CloudSync`),Sr=y(T(`path`,{d:`M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z`}),`Devices`),Cr=y(T(`path`,{d:`M20 9H4v2h16zM4 15h16v-2H4z`}),`DragHandle`),wr=y(T(`path`,{d:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z`}),`Email`),Tr=y(T(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Https`),Er=y(T(`path`,{d:`M8.4 18.2c.38.5.6 1.12.6 1.8 0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3c.44 0 .85.09 1.23.26l1.41-1.77c-.92-1.03-1.29-2.39-1.09-3.69l-2.03-.68c-.54.83-1.46 1.38-2.52 1.38-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3c0 .07 0 .14-.01.21l2.03.68c.64-1.21 1.82-2.09 3.22-2.32V5.91C9.96 5.57 9 4.4 9 3c0-1.66 1.34-3 3-3s3 1.34 3 3c0 1.4-.96 2.57-2.25 2.91v2.16c1.4.23 2.58 1.11 3.22 2.32L18 9.71V9.5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-1.06 0-1.98-.55-2.52-1.37l-2.03.68c.2 1.29-.16 2.65-1.09 3.69l1.41 1.77Q17.34 17 18 17c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.68.22-1.3.6-1.8l-1.41-1.77c-1.35.75-3.01.76-4.37 0z`}),`Hub`),Dr=y(T(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),Or=y(T(`path`,{d:`M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-5 12H9v-2h6zm5-7H4V4h16z`}),`Inventory2`),kr=y(T(`path`,{d:`M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 9h-4v4h-2v-4H9V9h4V5h2v4h4z`}),`LibraryAdd`),Ar=y([T(`path`,{d:`M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z`},`0`),T(`path`,{d:`M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32`},`1`)],`LockPerson`),jr=y(T(`path`,{d:`m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z`}),`Logout`),Mr=y(T(`path`,{d:`M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z`}),`Memory`),Nr=y(T(`path`,{d:`M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19zm-3-5h-2V7h-4v3H8l4 4z`}),`MoveToInbox`),Pr=y(T(`path`,{d:`M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7`}),`MyLocation`),Fr=y(T(`path`,{d:`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`NavigateBefore`),Ir=y(T(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),Lr=y(T(`path`,{d:`M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m-7 6-4 4h3v6h2v-6h3z`}),`OpenInBrowser`),Rr=y(T(`path`,{d:`M13 7h-2v2h2zm0 4h-2v6h2zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99M17 19H7V5h10z`}),`PermDeviceInformation`),zr=y(T(`path`,{d:`M19 11h-8v6h8zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2m-2 .02H3V4.97h18z`}),`PictureInPictureAlt`),Br=y(T(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`ReportProblem`),Vr=y(T(`path`,{d:`M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9`}),`SettingsBackupRestore`),Hr=y(T(`path`,{d:`M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1m-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05M12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0`}),`SettingsRemote`),Ur=y(T(`path`,{d:`M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13`}),`SmartToy`),Wr=y(T(`path`,{d:`M11 21H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h6zm2 0h6c1.1 0 2-.9 2-2v-7h-8zm8-11V5c0-1.1-.9-2-2-2h-6v7z`}),`SpaceDashboard`),Gr=y(T(`path`,{d:`M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33m-7.14-.94 2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64z`}),`SyncDisabled`),Kr=y(T(`path`,{d:`M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z`}),`Update`),qr=y(T(`path`,{d:`M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z`}),`VerifiedUser`),Jr={y:{sectionType:`year`,contentType:`digit`,maxLength:4},yy:`year`,yyy:{sectionType:`year`,contentType:`digit`,maxLength:4},yyyy:`year`,M:{sectionType:`month`,contentType:`digit`,maxLength:2},MM:`month`,MMMM:{sectionType:`month`,contentType:`letter`},MMM:{sectionType:`month`,contentType:`letter`},L:{sectionType:`month`,contentType:`digit`,maxLength:2},LL:`month`,LLL:{sectionType:`month`,contentType:`letter`},LLLL:{sectionType:`month`,contentType:`letter`},d:{sectionType:`day`,contentType:`digit`,maxLength:2},dd:`day`,do:{sectionType:`day`,contentType:`digit-with-letter`},E:{sectionType:`weekDay`,contentType:`letter`},EE:{sectionType:`weekDay`,contentType:`letter`},EEE:{sectionType:`weekDay`,contentType:`letter`},EEEE:{sectionType:`weekDay`,contentType:`letter`},EEEEE:{sectionType:`weekDay`,contentType:`letter`},i:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ii:`weekDay`,iii:{sectionType:`weekDay`,contentType:`letter`},iiii:{sectionType:`weekDay`,contentType:`letter`},e:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},ee:`weekDay`,eee:{sectionType:`weekDay`,contentType:`letter`},eeee:{sectionType:`weekDay`,contentType:`letter`},eeeee:{sectionType:`weekDay`,contentType:`letter`},eeeeee:{sectionType:`weekDay`,contentType:`letter`},c:{sectionType:`weekDay`,contentType:`digit`,maxLength:1},cc:`weekDay`,ccc:{sectionType:`weekDay`,contentType:`letter`},cccc:{sectionType:`weekDay`,contentType:`letter`},ccccc:{sectionType:`weekDay`,contentType:`letter`},cccccc:{sectionType:`weekDay`,contentType:`letter`},a:`meridiem`,aa:`meridiem`,aaa:`meridiem`,H:{sectionType:`hours`,contentType:`digit`,maxLength:2},HH:`hours`,h:{sectionType:`hours`,contentType:`digit`,maxLength:2},hh:`hours`,K:{sectionType:`hours`,contentType:`digit`,maxLength:2},KK:`hours`,k:{sectionType:`hours`,contentType:`digit`,maxLength:2},kk:`hours`,m:{sectionType:`minutes`,contentType:`digit`,maxLength:2},mm:`minutes`,s:{sectionType:`seconds`,contentType:`digit`,maxLength:2},ss:`seconds`},Yr={year:`yyyy`,month:`LLLL`,monthShort:`MMM`,dayOfMonth:`d`,dayOfMonthFull:`do`,weekday:`EEEE`,weekdayShort:`EEEEEE`,hours24h:`HH`,hours12h:`hh`,meridiem:`aa`,minutes:`mm`,seconds:`ss`,fullDate:`PP`,keyboardDate:`P`,shortDate:`MMM d`,normalDate:`d MMMM`,normalDateWithWeekday:`EEE, MMM d`,fullTime12h:`hh:mm aa`,fullTime24h:`HH:mm`,keyboardDateTime12h:`P hh:mm aa`,keyboardDateTime24h:`P HH:mm`},Xr=class{constructor(e){j(this,`isMUIAdapter`,!0),j(this,`isTimezoneCompatible`,!1),j(this,`formatTokenMap`,Jr),j(this,`escapedCharacters`,{start:`'`,end:`'`}),j(this,`date`,e=>e===void 0?new Date:e===null?null:new Date(e)),j(this,`getInvalidDate`,()=>new Date(`Invalid Date`)),j(this,`getTimezone`,()=>`default`),j(this,`setTimezone`,e=>e),j(this,`toJsDate`,e=>e),j(this,`getCurrentLocaleCode`,()=>this.locale.code),j(this,`is12HourCycleInCurrentLocale`,()=>/a/.test(this.locale.formatLong.time({width:`short`}))),j(this,`expandFormat`,e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=this.longFormatters[t];return n(e,this.locale.formatLong)}return e}).join(``)),j(this,`formatNumber`,e=>e),j(this,`getDayOfWeek`,e=>e.getDay()+1);let{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=oe({},Yr,n),this.longFormatters=r,this.lib=i||`date-fns`}};x();var Zr=class extends Xr{constructor({locale:e,formats:t}={}){super({locale:e??vn,formats:t,longFormatters:On}),j(this,`parse`,(e,t)=>e===``?null:Zn(e,t,new Date,{locale:this.locale})),j(this,`isValid`,e=>e!=null&&Fn(e)),j(this,`format`,(e,t)=>this.formatByString(e,this.formats[t])),j(this,`formatByString`,(e,t)=>Dn(e,t,{locale:this.locale})),j(this,`isEqual`,(e,t)=>e===null&&t===null?!0:e===null||t===null?!1:Rn(e,t)),j(this,`isSameYear`,(e,t)=>Jn(e,t)),j(this,`isSameMonth`,(e,t)=>rr(e,t)),j(this,`isSameDay`,(e,t)=>In(e,t)),j(this,`isSameHour`,(e,t)=>Vn(e,t)),j(this,`isAfter`,(e,t)=>jn(e,t)),j(this,`isAfterYear`,(e,t)=>jn(e,Cn(t))),j(this,`isAfterDay`,(e,t)=>jn(e,wn(t))),j(this,`isBefore`,(e,t)=>or(e,t)),j(this,`isBeforeYear`,(e,t)=>or(e,this.startOfYear(t))),j(this,`isBeforeDay`,(e,t)=>or(e,this.startOfDay(t))),j(this,`isWithinRange`,(e,[t,n])=>zn(e,{start:t,end:n})),j(this,`startOfYear`,e=>Pn(e)),j(this,`startOfMonth`,e=>Tn(e)),j(this,`startOfWeek`,e=>_n(e,{locale:this.locale})),j(this,`startOfDay`,e=>Gn(e)),j(this,`endOfYear`,e=>Cn(e)),j(this,`endOfMonth`,e=>Qn(e)),j(this,`endOfWeek`,e=>Nn(e,{locale:this.locale})),j(this,`endOfDay`,e=>wn(e)),j(this,`addYears`,(e,t)=>kn(e,t)),j(this,`addMonths`,(e,t)=>ir(e,t)),j(this,`addWeeks`,(e,t)=>yn(e,t)),j(this,`addDays`,(e,t)=>Hn(e,t)),j(this,`addHours`,(e,t)=>Bn(e,t)),j(this,`addMinutes`,(e,t)=>nr(e,t)),j(this,`addSeconds`,(e,t)=>Un(e,t)),j(this,`getYear`,e=>bn(e)),j(this,`getMonth`,e=>Mn(e)),j(this,`getDate`,e=>En(e)),j(this,`getHours`,e=>qn(e)),j(this,`getMinutes`,e=>Sn(e)),j(this,`getSeconds`,e=>ar(e)),j(this,`getMilliseconds`,e=>xn(e)),j(this,`setYear`,(e,t)=>tr(e,t)),j(this,`setMonth`,(e,t)=>er(e,t)),j(this,`setDate`,(e,t)=>Xn(e,t)),j(this,`setHours`,(e,t)=>Ln(e,t)),j(this,`setMinutes`,(e,t)=>$n(e,t)),j(this,`setSeconds`,(e,t)=>Yn(e,t)),j(this,`setMilliseconds`,(e,t)=>Wn(e,t)),j(this,`getDaysInMonth`,e=>Kn(e)),j(this,`getWeekArray`,e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,a=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);a[e]=a[e]||[],a[e].push(i),i=this.addDays(i,1),r+=1}return a}),j(this,`getWeekNumber`,e=>An(e,{locale:this.locale})),j(this,`getYearRange`,([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],a=n;for(;this.isBefore(a,r);)i.push(a),a=this.addYears(a,1);return i})}},Qr={"@mui/icons-material":()=>r(()=>import(`./icons-material-CUNq6tdT.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]),import.meta.url),"date-fns":()=>r(()=>import(`./date-fns-BtR4dG_j.js`),__vite__mapDeps([31,32,33,1,2,3,34]),import.meta.url),"date-fns/locale":()=>r(()=>import(`./locale-DN6Bdkdt.js`).then(e=>e.t),__vite__mapDeps([35,2,32,34]),import.meta.url)};function $r(){cn({name:`iobroker_admin`,shared:{},remotes:[]}),we(Object.fromEntries(Object.entries(Qr).map(([e,t])=>[e,{version:{"@mui/icons-material":`9.5.0`,"date-fns":`4.4.0`,"date-fns/locale":`4.4.0`}[e],scope:`default`,get:async()=>{let e=await t();return()=>e},shareConfig:{singleton:!0,requiredVersion:`*`,eager:!1}}])))}var ei={version:`9.0.35`},ti=Re({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null});function ni({children:e}){let[t]=R({hostsUpdate:0,adaptersUpdate:0,hosts:null,repository:null,installed:null}),{hosts:n,installed:r,repository:i}=t,a=rn(()=>{var e;if(!n||!i)return 0;let t=(e=i[`js-controller`])==null?void 0:e.version,r=0;return n.forEach(e=>{H.updateAvailable(e.common.installedVersion,t,`js-controller on ${e._id}`)&&r++}),r},[n,i]),o=rn(()=>{if(!r||!i)return 0;let e=0;return Object.keys(r).forEach(t=>{let n=r[t],a=i[t];t!==`js-controller`&&t!==`hosts`&&n!=null&&n.version&&a!=null&&a.version&&n.ignoreVersion!==a.version&&H.updateAvailable(n.version,a.version,`adapter "${t}"`)&&e++}),e},[r,i]),s=rn(()=>({...t,hostsUpdate:a,adaptersUpdate:o}),[t,a,o]);return T(ti.Provider,{value:s,children:e})}var ri=Re({dragDropManager:void 0});function ii(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var ai=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),oi=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},si={INIT:`@@redux/INIT`+oi(),REPLACE:`@@redux/REPLACE`+oi(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+oi()}};function ci(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function li(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(ii(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(ii(1));return n(li)(e,t)}if(typeof e!=`function`)throw Error(ii(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(ii(3));return a}function d(e){if(typeof e!=`function`)throw Error(ii(4));if(c)throw Error(ii(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(ii(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!ci(e))throw Error(ii(7));if(e.type===void 0)throw Error(ii(8));if(c)throw Error(ii(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(ii(10));i=e,f({type:si.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(ii(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[ai]=function(){return this},e}return f({type:si.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[ai]=m,r}function G(e,t,...n){if(ui()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function ui(){return typeof process<`u`&&!0}function di(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function fi(e,t){return e.filter(e=>e!==t)}function pi(e){return typeof e==`object`}function mi(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function hi(e,t){return e.filter(e=>t.indexOf(e)>-1)}var gi=`dnd-core/INIT_COORDS`,_i=`dnd-core/BEGIN_DRAG`,vi=`dnd-core/PUBLISH_DRAG_SOURCE`,yi=`dnd-core/HOVER`,bi=`dnd-core/DROP`,xi=`dnd-core/END_DRAG`;function Si(e,t){return{type:gi,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Ci={type:gi,payload:{clientOffset:null,sourceClientOffset:null}};function wi(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(Si(i)),Ti(t,o,s);let c=Oi(t,o);if(c==null){e.dispatch(Ci);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);Ei(a),l=a(c)}e.dispatch(Si(i,l));let u=s.getSource(c).beginDrag(o,c);return u==null?void 0:(Di(u),s.pinSource(c),{type:_i,payload:{itemType:s.getSourceType(c),item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}})}}function Ti(e,t,n){G(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){G(n.getSource(e),`Expected sourceIds to be registered.`)})}function Ei(e){G(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Di(e){G(pi(e),`Item must be an object.`)}function Oi(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ai(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ki(e,t,n[t])})}return e}function ji(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();Mi(n),Fi(n).forEach((i,a)=>{let o={type:bi,payload:{dropResult:Ai({},t,Ni(i,a,r,n))}};e.dispatch(o)})}}function Mi(e){G(e.isDragging(),`Cannot call drop while not dragging.`),G(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function Ni(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return Pi(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function Pi(e){G(e===void 0||pi(e),`Drop result must either be an object or undefined.`)}function Fi(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Ii(e){return function(){let t=e.getMonitor(),n=e.getRegistry();Li(t);let r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:xi}}}function Li(e){G(e.isDragging(),`Cannot call endDrag while not dragging.`)}function Ri(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function zi(e){return function(t,{clientOffset:n}={}){Bi(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return Hi(r,a,i.getItemType()),Vi(r,i,a),Ui(r,i,a),{type:yi,payload:{targetIds:r,clientOffset:n||null}}}}function Bi(e){G(Array.isArray(e),`Expected targetIds to be an array.`)}function Vi(e,t,n){G(t.isDragging(),`Cannot call hover while not dragging.`),G(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];G(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`),G(n.getTarget(r),`Expected targetIds to be registered.`)}}function Hi(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];Ri(t.getTargetType(i),n)||e.splice(r,1)}}function Ui(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function Wi(e){return function(){if(e.getMonitor().isDragging())return{type:vi}}}function Gi(e){return{beginDrag:wi(e),publishDragSource:Wi(e),hover:zi(e),drop:ji(e),endDrag:Ii(e)}}var Ki=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=Gi(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function qi(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ji(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yi(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Ji(qi(t,r),n)}function Xi(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Ji(t,n)}var Zi=[],Qi=[];Zi.__IS_NONE__=!0,Qi.__IS_ALL__=!0;function $i(e,t){return e===Zi?!1:e===Qi||t===void 0||hi(t,e).length>0}var ea=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;G(typeof e==`function`,`listener must be a function.`),G(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId;return this.store.subscribe(()=>{let t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!$i(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){G(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return G(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:Ri(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return G(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Ri(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Yi(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Xi(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},ta=typeof global<`u`?global:self,na=ta.MutationObserver||ta.WebKitMutationObserver;function ra(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function ia(e){let t=1,n=new na(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var aa=typeof na==`function`?ia:ra,oa=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=aa(this.flush),this.requestErrorThrow=ra(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},sa=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},ca=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new sa(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},la=new oa,K=new ca(la.registerPendingError);function ua(e){la.enqueueTask(K.create(e))}var da=`dnd-core/ADD_SOURCE`,fa=`dnd-core/ADD_TARGET`,pa=`dnd-core/REMOVE_SOURCE`,ma=`dnd-core/REMOVE_TARGET`;function ha(e){return{type:da,payload:{sourceId:e}}}function ga(e){return{type:fa,payload:{targetId:e}}}function _a(e){return{type:pa,payload:{sourceId:e}}}function va(e){return{type:ma,payload:{targetId:e}}}function ya(e){G(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),G(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),G(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function ba(e){G(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),G(typeof e.hover==`function`,`Expected hover to be a function.`),G(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function xa(e,t){t&&Array.isArray(e)?e.forEach(e=>xa(e,!1)):G(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var Sa;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(Sa||={});var Ca=0;function wa(){return Ca++}function Ta(e){let t=wa().toString();switch(e){case Sa.SOURCE:return`S${t}`;case Sa.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Ea(e){switch(e[0]){case`S`:return Sa.SOURCE;case`T`:return Sa.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function Da(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var Oa=class{addSource(e,t){xa(e),ya(t);let n=this.addHandler(Sa.SOURCE,e,t);return this.store.dispatch(ha(n)),n}addTarget(e,t){xa(e,!0),ba(t);let n=this.addHandler(Sa.TARGET,e,t);return this.store.dispatch(ga(n)),n}containsHandler(e){return Da(this.dragSources,e)||Da(this.dropTargets,e)}getSource(e,t=!1){return G(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return G(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return G(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){return Ea(e)===Sa.SOURCE}isTargetId(e){return Ea(e)===Sa.TARGET}removeSource(e){G(this.getSource(e),`Expected an existing source.`),this.store.dispatch(_a(e)),ua(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){G(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(va(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);G(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){G(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=Ta(e);return this.types.set(r,t),e===Sa.SOURCE?this.dragSources.set(r,n):e===Sa.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},ka=(e,t)=>e===t;function Aa(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ja(e,t,n=ka){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Ma(e=Zi,t){switch(t.type){case yi:break;case da:case fa:case ma:case pa:return Zi;case _i:case vi:case xi:case bi:default:return Qi}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=mi(n,r);if(!(i.length>0||!ja(n,r)))return Zi;let a=r[r.length-1],o=n[n.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function Na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Na(e,t,n[t])})}return e}var Fa={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ia(e=Fa,t){let{payload:n}=t;switch(t.type){case gi:case _i:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case yi:return Aa(e.clientOffset,n.clientOffset)?e:Pa({},e,{clientOffset:n.clientOffset});case xi:case bi:return Fa;default:return e}}function La(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){La(e,t,n[t])})}return e}var za={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ba(e=za,t){let{payload:n}=t;switch(t.type){case _i:return Ra({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case vi:return Ra({},e,{isSourcePublic:!0});case yi:return Ra({},e,{targetIds:n.targetIds});case ma:return e.targetIds.indexOf(n.targetId)===-1?e:Ra({},e,{targetIds:fi(e.targetIds,n.targetId)});case bi:return Ra({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case xi:return Ra({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Va(e=0,t){switch(t.type){case da:case fa:return e+1;case pa:case ma:return e-1;default:return e}}function Ha(e=0){return e+1}function Ua(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ua(e,t,n[t])})}return e}function Ga(e={},t){return{dirtyHandlerIds:Ma(e.dirtyHandlerIds,{type:t.type,payload:Wa({},t.payload,{prevTargetIds:di(e,`dragOperation.targetIds`,[])})}),dragOffset:Ia(e.dragOffset,t),refCount:Va(e.refCount,t),dragOperation:Ba(e.dragOperation,t),stateId:Ha(e.stateId)}}function Ka(e,t=void 0,n={},r=!1){let i=qa(r),a=new Ki(i,new ea(i,new Oa(i))),o=e(a,t,n);return a.receiveBackend(o),a}function qa(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return li(Ga,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}function Ja(e,t){if(e==null)return{};var n=Ya(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ya(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Xa=0,Za=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),Qa=At(function(e){var{children:t}=e;let[n,r]=$a(Ja(e,[`children`]));return Xt(()=>{if(r){let e=to();return++Xa,()=>{--Xa===0&&(e[Za]=null)}}},[]),T(ri.Provider,{value:n,children:t})});function $a(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[eo(e.backend,e.context,e.options,e.debugMode),!e.context]}function eo(e,t=to(),n,r){let i=t;return i[Za]||(i[Za]={dragDropManager:Ka(e,t,n,r)}),i[Za]}function to(){return typeof global<`u`?global:window}var no=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),ro=typeof window<`u`?Dt:Xt,io=e(no(),1);function ao(e,t,n){let[r,i]=R(()=>t(e)),a=vt(()=>{let a=t(e);(0,io.default)(r,a)||(i(a),n&&n())},[r,e,n]);return ro(a),[r,a]}function oo(e,t,n){let[r,i]=ao(e,t,n);return ro(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function so(e,t,n){return oo(t,e||(()=>({})),()=>n.reconnect())}function co(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),rn(()=>typeof e==`function`?e():e,n)}function lo(e){return rn(()=>e.hooks.dragSource(),[e])}function uo(e){return rn(()=>e.hooks.dragPreview(),[e])}var fo=!1,po=!1,mo=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){G(!fo,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return fo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{fo=!1}}isDragging(){if(!this.sourceId)return!1;G(!po,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return po=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{po=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},ho=!1,go=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;G(!ho,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return ho=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ho=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function _o(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function vo(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function yo(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function bo(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function xo(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function So(e){return(t=null,n=null)=>{if(!dt(t)){let r=t;return e(r,n),r}let r=t;return xo(r),To(r,n?t=>e(t,n):e)}}function Co(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=So(r);t[n]=()=>e}}),t}function wo(e,t){typeof e==`function`?e(t):e.current=t}function To(e,t){let n=e.ref;return G(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?Ue(e,{ref:e=>{wo(n,e),wo(t,e)}}):Ue(e,{ref:t})}var Eo=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!yo(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!yo(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Co({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,bo(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,bo(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},Do=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!yo(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Co({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,bo(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function Oo(){let{dragDropManager:e}=Ye(ri);return G(e!=null,`Expected drag drop context`),e}function ko(e,t){let n=Oo(),r=rn(()=>new Eo(n.getBackend()),[n]);return ro(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),ro(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Ao(){let e=Oo();return rn(()=>new mo(e),[e])}var jo=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag!=`function`||e.canDrag(t)}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function Mo(e,t,n){let r=rn(()=>new jo(e,t,n),[t,n]);return Xt(()=>{r.spec=e},[e]),r}function q(e){return rn(()=>{let t=e.type;return G(t!=null,`spec.type must be defined`),t},[e])}function No(e,t,n){let r=Oo(),i=Mo(e,t,n),a=q(e);ro(function(){if(a!=null){let[e,o]=vo(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Po(e,t){let n=co(e,t);G(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=Ao(),i=ko(n.options,n.previewOptions);return No(n,r,i),[so(n.collect,r,i),lo(i),uo(i)]}function Fo(e){let t=Oo().getMonitor(),[n,r]=ao(t,e);return Xt(()=>t.subscribeToOffsetChange(r)),Xt(()=>t.subscribeToStateChange(r)),n}function Io(e){return rn(()=>e.hooks.dropTarget(),[e])}function Lo(e){let t=Oo(),n=rn(()=>new Do(t.getBackend()),[t]);return ro(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Ro(){let e=Oo();return rn(()=>new go(e),[e])}function zo(e){let{accept:t}=e;return rn(()=>(G(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var Bo=class{canDrop(){let e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function Vo(e,t){let n=rn(()=>new Bo(e,t),[t]);return Xt(()=>{n.spec=e},[e]),n}function Ho(e,t,n){let r=Oo(),i=Vo(e,t),a=zo(e);ro(function(){let[e,o]=_o(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function Uo(e,t){let n=co(e,t),r=Ro(),i=Lo(n.options);return Ho(n,r,i),[so(n.collect,r,i),Io(i)]}function Wo(e){let t=null;return()=>(t??=e(),t)}function Go(e,t){return e.filter(e=>e!==t)}function Ko(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var qo=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=Ko(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=Go(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Jo=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},Yo=t({FILE:()=>Xo,HTML:()=>$o,TEXT:()=>Qo,URL:()=>Zo}),Xo=`__NATIVE_FILE__`,Zo=`__NATIVE_URL__`,Qo=`__NATIVE_TEXT__`,$o=`__NATIVE_HTML__`;function es(e,t,n){return t.reduce((t,n)=>t||e.getData(n),``)??n}var ts={[Xo]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[$o]:{exposeProperties:{html:(e,t)=>es(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[Zo]:{exposeProperties:{urls:(e,t)=>es(e,t,``).split(`
|
|
3
|
+
`),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[Qo]:{exposeProperties:{text:(e,t)=>es(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function ns(e,t){let n=ts[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new Jo(n);return r.loadDataTransfer(t),r}function rs(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(ts).filter(e=>{let n=ts[e];return n!=null&&n.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}var is=Wo(()=>/firefox/i.test(navigator.userAgent)),as=Wo(()=>!!window.safari),os=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(r<e)s=l+1;else if(r>e)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);let i=[],a=[],o=[],s,c;for(let r=0;r<n-1;r++)s=e[r+1]-e[r],c=t[r+1]-t[r],a.push(s),i.push(c),o.push(c/s);let l=[o[0]];for(let e=0;e<a.length-1;e++){let t=o[e],n=o[e+1];if(t*n<=0)l.push(0);else{s=a[e];let r=a[e+1],i=s+r;l.push(3*i/((i+r)/t+(i+s)/n))}}l.push(o[o.length-1]);let u=[],d=[],f;for(let e=0;e<l.length-1;e++){f=o[e];let t=l[e],n=1/a[e],r=t+l[e+1]-f-f;u.push((f-t-r)*n),d.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=d}},ss=1;function cs(e){let t=e.nodeType===ss?e:e.parentElement;if(!t)return null;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function ls(e){return{x:e.clientX,y:e.clientY}}function us(e){var t;return e.nodeName===`IMG`&&(is()||!((t=document.documentElement)!=null&&t.contains(e)))}function ds(e,t,n,r){let i=e?t.width:n,a=e?t.height:r;return as()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function fs(e,t,n,r,i){let a=us(t),o=cs(a?e:t),s={x:n.x-o.x,y:n.y-o.y},{offsetWidth:c,offsetHeight:l}=e,{anchorX:u,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=ds(a,t,c,l),m=()=>{let e=new os([0,.5,1],[s.y,s.y/l*p,s.y+p-l]).interpolate(d);return as()&&a&&(e+=(window.devicePixelRatio-1)*p),e},h=()=>new os([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(u),{offsetX:g,offsetY:_}=i,v=g===0||g,y=_===0||_;return{x:v?g:h(),y:y?_:m()}}var ps=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function ms(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ms(e,t,n[t])})}return e}var gs=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return hs({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return hs({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(Yo).some(t=>Yo[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=ns(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)==null?void 0:e.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&cs(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=ls(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=rs(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=fs(t,i,n,{anchorX:e,anchorY:a},{offsetX:o,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{r==null||r.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;let{dataTransfer:n}=e,r=rs(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:ls(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;this.dragOverTargetIds=[],this.monitor.isDragging()?(this.altKeyPressed=e.altKey,this.lastClientOffset=ls(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))):(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else rs(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:ls(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new ps(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new qo(this.isNodeInDocument)}},_s;function vs(){return _s||(_s=new Image,_s.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),_s}var ys=function(e,t,n){return new gs(e,t,n)},bs;(function(e){e.mouse=`mouse`,e.touch=`touch`,e.keyboard=`keyboard`})(bs||={});var xs=class{get delay(){return this.args.delay??0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){return this.args.ignoreContextMenu??!1}get enableHoverOutsideTarget(){return this.args.enableHoverOutsideTarget??!1}get enableKeyboardEvents(){return this.args.enableKeyboardEvents??!1}get enableMouseEvents(){return this.args.enableMouseEvents??!1}get enableTouchEvents(){return this.args.enableTouchEvents??!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t;return((e=this.args)==null?void 0:e.delayTouchStart)??((t=this.args)==null?void 0:t.delay)??0}get delayMouseStart(){var e,t;return((e=this.args)==null?void 0:e.delayMouseStart)??((t=this.args)==null?void 0:t.delay)??0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<`u`)return window}get document(){var e;if((e=this.context)!=null&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)==null?void 0:e.rootElement)||this.document}constructor(e,t){this.args=e,this.context=t}};function Ss(e,t,n,r){return Math.sqrt(Math.abs(n-e)**2+Math.abs(r-t)**2)}function Cs(e,t,n,r,i){if(!i)return!1;let a=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let e=0;e<i.length;++e){let t=i[e];if(t&&(t.start==null||a>=t.start)&&(t.end==null||a<=t.end))return!0}return!1}var ws={Left:1,Right:2,Center:4},Ts={Left:0,Center:1,Right:2};function Es(e){return e.button===void 0||e.button===Ts.Left}function Ds(e){return e.buttons===void 0||(e.buttons&ws.Left)===0}function Os(e){return!!e.targetTouches}var ks=1;function As(e){let t=e.nodeType===ks?e:e.parentElement;if(!t)return;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function js(e,t){if(e.targetTouches.length===1)return Ms(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return Ms(e.touches[0])}function Ms(e,t){return Os(e)?js(e,t):{x:e.clientX,y:e.clientY}}var Ns=(()=>{let e=!1;try{addEventListener(`test`,()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),Ps={[bs.mouse]:{start:`mousedown`,move:`mousemove`,end:`mouseup`,contextmenu:`contextmenu`},[bs.touch]:{start:`touchstart`,move:`touchmove`,end:`touchend`},[bs.keyboard]:{keydown:`keydown`}},Fs=class e{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)==null?void 0:e.length)||0}}get document(){return this.options.document}setup(){let t=this.options.rootElement;t&&(G(!e.isSetUp,`Cannot have two Touch backends at the same time.`),e.isSetUp=!0,this.addEventListener(t,`start`,this.getTopMoveStartHandler()),this.addEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.addEventListener(t,`move`,this.handleTopMove),this.addEventListener(t,`move`,this.handleTopMoveCapture,!0),this.addEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,`keydown`,this.handleCancelOnEscape,!0))}teardown(){let t=this.options.rootElement;t&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.removeEventListener(t,`start`,this.handleTopMoveStart),this.removeEventListener(t,`move`,this.handleTopMoveCapture,!0),this.removeEventListener(t,`move`,this.handleTopMove),this.removeEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,`keydown`,this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n,r=!1){let i=Ns?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Ps[r][t];a&&e.addEventListener(a,n,i)})}removeEventListener(e,t,n,r=!1){let i=Ns?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Ps[r][t];a&&e.removeEventListener(a,n,i)})}connectDragSource(e,t){let n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,`start`,n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,`start`,n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){let n=this.options.rootElement;if(!this.document||!n)return()=>{};let r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let i;switch(r.type){case Ps.mouse.move:i={x:r.clientX,y:r.clientY};break;case Ps.touch.move:var a,o;i={x:((a=r.touches[0])==null?void 0:a.clientX)||0,y:((o=r.touches[0])==null?void 0:o.clientY)||0}}let s=i==null?void 0:this.document.elementFromPoint(i.x,i.y),c=s&&t.contains(s);if(s===t||c)return this.handleMove(r,e)};return this.addEventListener(this.document.body,`move`,r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,`move`,r))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display=`none`,this.draggedSourceNode.removeAttribute(`data-reactid`),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&As(t)},this.handleTopMoveStartCapture=e=>{Es(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!Es(e))return;let t=Ms(e);t&&(Os(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!Es(e))return;let t=e.type===Ps.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;let{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,i=Ms(e,this.lastTargetTouchFallback);if(!i)return;if(this._isScrolling||!this.monitor.isDragging()&&Cs(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty(`x`)&&t&&Ss(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;let a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();let o=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),s=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(i.x,i.y,o):this.document.elementsFromPoint(i.x,i.y),c=[];for(let e in s){if(!s.hasOwnProperty(e))continue;let t=s[e];for(t!=null&&c.push(t);t;)t=t.parentElement,t&&c.indexOf(t)===-1&&c.push(t)}let l=c.filter(e=>o.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(let e in this.targetNodes){let t=this.targetNodes.get(e);if(a&&t&&t.contains(a)&&l.indexOf(e)===-1){l.unshift(e);break}}l.reverse(),this.actions.hover(l,{clientOffset:i})},this._getDropTargetId=e=>{let t=this.targetNodes.keys(),n=t.next();for(;n.done===!1;){let r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,Ds(e)&&(!this.monitor.isDragging()||this.monitor.didDrop()?this.moveStartSourceIds=void 0:(e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()))},this.handleCancelOnEscape=e=>{e.key===`Escape`&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new xs(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(bs.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(bs.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(bs.keyboard)}},Is=function(e,t={},n={}){return new Fs(e,t,n)};x();var Ls={message:{position:`relative`,display:`block`,width:`100%`},offline:{position:`relative`,justifyContent:`space-between`,display:`flex`,width:`100%`,alignItems:`center`,opacity:.7,"@media screen and (max-width: 550px)":{flexWrap:`wrap`}},timestamp:{color:`text.secondary`,position:`absolute`,top:5,right:25,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},simpleMessage:{fontFamily:`monospace`,fontSize:14,ml:`20px`,mb:`10px`,width:`100%`,display:`block`,whiteSpace:`pre-wrap`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`,ml:0}}},Rs={alert:0,notify:1,info:2};function zs(e){return e===`notify`||e===`info`?e:`alert`}function Bs(e,t){return Rs[zs(e)]-Rs[zs(t)]}var Vs=class extends $t{constructor(e){super(e),j(this,`lastAlive`,0),j(this,`onAliveChanged`,(e,t)=>{if(e===`${this.props.instanceId}.alive`&&t&&this.state.alive!==!!t.val){if(t.val){if(this.lastAlive&&Date.now()-this.lastAlive<500)return;this.lastAlive=Date.now()}this.setState({alive:!!t.val},()=>this.getGui())}}),this.state={alive:!1,data:{},schema:null,updateData:0}}async componentDidMount(){var e;if((e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){let e=await this.props.socket.getState(`${this.props.instanceId}.alive`);this.lastAlive=e!=null&&e.val?Date.now():0,this.setState({alive:!!(e!=null&&e.val)},()=>this.getGui()),await this.props.socket.subscribeState(`${this.props.instanceId}.alive`,this.onAliveChanged)}}getGui(){var e;if(this.state.alive&&(e=this.props.message.contextData)!=null&&(e=e.admin)!=null&&e.notification){var t;let e=JSON.parse(JSON.stringify((t=this.props.message.contextData)==null||(t=t.admin)==null?void 0:t.notification));e.offlineMessage&&delete e.offlineMessage,this.props.socket.sendTo(this.props.instanceId.replace(`system.adapter.`,``),`admin:getNotificationSchema`,e).then(e=>{e&&this.setState({schema:e.schema,data:e.data||this.state.data,updateData:this.state.updateData+1})})}}renderCustomGui(){if(!this.state.schema||!this.state.data||!this.state.alive){var e;let t=(e=this.props.message.contextData)==null||(e=e.admin)==null?void 0:e.notification;if(t){if(!this.state.alive){let e=t.offlineMessage;if(e){let t=typeof e==`string`?e:e[this.props.socket.systemLang]||e.en;return T(F,{sx:Ls.offline,children:Pe.renderTextWithA(t)})}return T(L,{children:A.t(`Instance is not alive`)})}return T(Le,{})}return null}let[,,t,n]=this.props.instanceId.split(`.`);return M(Me,{children:[this.state.error&&T(`div`,{style:{color:`red`},children:this.state.error}),T(ce,{style:{width:`100%`},updateData:this.state.updateData,socket:this.props.socket,adapterName:t,instance:parseInt(n,10),schema:this.state.schema,data:this.state.data,onError:e=>this.setState({error:e}),onChange:e=>this.setState({data:e||{}}),onBackEndCommand:e=>{e&&(e.schema&&this.setState({schema:e.schema,data:e.data||this.state.data}),(e.command===`refresh`||e.refresh)&&this.getGui(),e.command===`link`&&this.props.onLink(e))},embedded:!0,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,AceEditor:dr})]})}renderSimpleMessage(){return this.props.message.message?T(F,{sx:Ls.simpleMessage,children:Pe.renderTextWithA(this.props.message.message)}):null}render(){return M(L,{component:`div`,sx:Ls.message,children:[T(F,{sx:Ls.timestamp,children:new Date(this.props.message.ts).toLocaleString()}),this.renderSimpleMessage(),this.renderCustomGui()]})}},Hs={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`,flexDirection:`column`}),paper:{maxWidth:1e3,width:`100%`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},column:{flexDirection:`column`},headerText:e=>({fontWeight:`bold`,fontSize:20,color:e.palette.mode===`dark`?`#DDD`:`#111`}),descriptionHeaderText:e=>({margin:`18px 0`,color:e.palette.mode===`dark`?`#CCC`:`#222`}),button:{paddingTop:5,paddingBottom:5,position:`sticky`,bottom:0,zIndex:3},img2:{width:25,height:25,margin:`auto 0`,mr:`10px`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},heading:{display:`flex`,alignItems:`center`,overflow:`hidden`,width:`100%`},headingTop:{display:`flex`,alignItems:`center`},classNameBox:{p:`8px`,"@media screen and (max-width: 550px)":{p:`4px`}},textStyle:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},content:{overflow:`hidden`},buttonStyle:{m:`3px`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}}};function Us({severity:e,isDark:t,...n}){return e=zs(e),e===`notify`?T(Ir,{color:t?`primary`:`secondary`,...n}):e===`info`?T(ut,{color:`info`,...n}):T(Ft,{style:{color:`#ffca00`},...n})}function Ws(e){return{id:`scrollable-force-tab-${e}`,"aria-controls":`scrollable-force-tabpanel-${e}`}}var Gs=({children:e,index:t,sxBox:n,style:r})=>T(`div`,{role:`tabpanel`,id:`scrollable-force-tabpanel-${t}`,"aria-labelledby":`scrollable-force-tab-${t}`,style:r,children:T(F,{sx:n,children:T(L,{component:`div`,children:e})})});function Ks(e,t=``){return e?typeof e==`string`?e:e[A.getLanguage()]||e.en||t:t}function qs(e,t,n){let r,i=``;e.url?e.url.toString().startsWith(`#`)||e.url.toString().startsWith(`/`)?(r=e.target||`_self`,i=e.url):e.url.startsWith(`http://`)||e.url.startsWith(`https://`)?(r=e.target||`_blank`,i=e.url):(i=`#tab-instances/config/${t}/${e.url}`,r=e.target||`_self`):(i=`#tab-instances/config/${t}`,r=e.target||`_self`),r===`_self`?(setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}:${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i),e.close&&typeof n==`function`&&n()):(i.startsWith(`#`)?i=`${window.location.protocol}:${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}:${window.location.host}${i}`),window.open(i,r))}var Js=({notifications:e,onClose:t,ackCallback:n,dateFormat:r,themeType:i,instances:a,themeName:o,theme:s,isFloatComma:c,socket:d})=>{let[f,p]=R(``),[m,h]=R([]),[g,_]=R(``),[v,y]=R(!0),b=(e,t)=>{y(!0),p(t),_(``)},x=e=>(t,n)=>_(n?e:``),ee=i===`dark`,S=!!Object.values(a).find(e=>e.common.name===`notification-manager`),C=rn(()=>{let t={};for(let[n,r]of Object.entries(e))for(let[e,i]of Object.entries(r.result))if(e!==`system`)for(let[r,a]of Object.entries(i.categories))t[e]=t[e]||{},t[e][r]={...a,host:n};return t},[e]),w=rn(()=>Object.keys(C).flatMap(e=>Object.keys(C[e]).map(t=>({scope:e,name:t,entry:C[e][t]}))).sort((e,t)=>Bs(e.entry.severity,t.entry.severity)),[C]),te=w.length?`${w[0].scope}--${w[0].name}`:``,ne=f;if(!ne)ne=te;else{let[e,t]=ne.split(`--`);if(!C[e])ne=te;else if(!C[e][t]){let t=Object.keys(C[e])[0];ne=t?`${e}--${t}`:te}}let[E,re]=ne.split(`--`),ae=E&&re?`${E}--${re}`:``,D=E&&re?C[E][re]:null;return M(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":Hs.paper},children:[M(`h2`,{style:Hs.headingTop,children:[T(Ir,{sx:{color:`primary.main`},style:{fontSize:36,marginLeft:25,marginRight:10}}),A.t(`Notifications`),S?null:T(Rt,{sx:{position:`absolute`,right:24,color:`text.primary`},title:A.t(`Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(ut,{})})]}),T(le,{style:{...Hs.flex,...Hs.overflowHidden},dividers:!0,children:M(F,{component:`div`,sx:Hs.root,children:[T(bt,{position:`static`,color:`default`,children:T(Zt,{value:ne,onChange:b,variant:`scrollable`,scrollButtons:!0,indicatorColor:ee?`primary`:`secondary`,textColor:ee?`primary`:`secondary`,children:w.map(({scope:e,name:t,entry:n},r)=>{let i=`${e}--${t}`;return T(ye,{disabled:m.includes(i),value:i,label:Ks(n.name,t),icon:T(Us,{severity:n.severity,isDark:ee}),...Ws(r)},i)})})}),D?M(Gs,{sxBox:Hs.classNameBox,style:{...Hs.overflowAuto,color:ee?`black`:void 0},index:ne,children:[T(F,{component:`div`,sx:Hs.headerText,style:{fontWeight:`bold`},children:Ks(D.name,re)}),T(F,{component:`div`,sx:Hs.descriptionHeaderText,children:Ks(D.description)}),T(`div`,{children:D.instances?Object.keys(D.instances).map(e=>{let n=`${ne}--${e}`;v&&(x(n)(``,!0),y(!1));let u=a&&a[e],f=u&&dn(u)||`img/no-image.svg`;return M(Vt,{style:ee?void 0:{backgroundColor:`#c0c0c052`},expanded:g===n,onChange:x(n),children:[T(ie,{expandIcon:T(l,{}),sx:{"& .MuiAccordionSummary-content":Hs.content},"aria-controls":`panel1bh-content`,id:`panel1bh-header`,children:M(L,{style:Hs.heading,children:[T(sn,{sx:Hs.img2,component:`img`,image:f}),T(F,{component:`div`,sx:Hs.textStyle,style:{marginLeft:8},children:e.replace(/^system\.adapter\./,``)})]})}),T(ge,{style:Hs.column,children:D.instances[e].messages.map((n,a)=>T(Vs,{message:n,dateFormat:r,instanceId:e,socket:d,themeType:i,themeName:o,theme:s,isFloatComma:c,onLink:n=>qs(n,e,t)},a))})]},n)}):null})]},`tabPanel-${re}`):null]})}),M(St,{children:[E&&re?T(V,{variant:`contained`,autoFocus:Object.keys(C[E]).length!==1,disabled:m.includes(ae),style:m.includes(ae)?{backgroundColor:`silver`}:void 0,sx:Hs.buttonStyle,onClick:e=>{e.stopPropagation(),n(C[E][re].host,re),h([...m,ae])},color:Object.keys(C[E]).length===1?`grey`:`primary`,startIcon:T(Ne,{}),children:A.t(`Acknowledge`)}):null,E&&re&&Object.keys(C[E]).length===1&&T(V,{variant:`contained`,disabled:m.includes(ae),sx:Hs.buttonStyle,style:m.includes(ae)?{backgroundColor:`silver`}:void 0,onClick:e=>{e.stopPropagation(),h([...m,ae]),n(C[E][re].host,re),t()},startIcon:M(Me,{children:[T(Ne,{}),T(O,{})]}),color:`primary`,children:A.t(`Acknowledge & close`)}),T(`div`,{style:{flexGrow:1}}),T(V,{id:`notifications-dialog-close`,variant:`contained`,onClick:e=>{e.stopPropagation(),t()},startIcon:T(O,{}),color:`grey`,children:A.t(`Close`)})]})]})};function Ys({label:e,compact:t=!1}){return M(`div`,{className:`eos-boot-loader${t?` eos-boot-loader--compact`:``}`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:[T(`img`,{className:`eos-boot-loader__logo`,src:`img/eos/nexowatt-eos-brand-wide.png`,width:1200,height:342,alt:`NexoWatt EOS – Energy Operation System`}),T(`span`,{className:`eos-boot-loader__spinner`,"aria-hidden":`true`}),T(`p`,{className:`eos-boot-loader__label`,children:e})]})}x();var Xs={log:{height:400,width:860,padding:8,overflowY:`auto`},logNoSpacing:{height:`100%`,width:`calc(100% - 8px)`,marginLeft:8,padding:8,overflowY:`auto`},error:{color:`#f44336`},info:{color:`#2196f3`},warn:{color:`#ffc107`}},Zs=class e extends $t{constructor(t){super(t),j(this,`logRef`,void 0),j(this,`regExp`,void 0),this.state={log:[`$ iobroker ${t.cmd||``}`],init:!1,max:null,value:null,moreChecked:!0,stopped:!1},this.logRef=Ut.createRef(),this.regExp=new RegExp(e.pattern.join(`|`),`i`)}componentDidMount(){this.props.ready&&this.props.cmd&&(console.log(`STARTED: ${this.props.cmd}`),this.executeCommand())}componentDidUpdate(){var e;!this.state.init&&this.props.ready&&this.props.cmd&&this.executeCommand(),this.props.logsRead&&JSON.stringify(this.props.logsRead)!==JSON.stringify(this.state.log)&&this.setState({log:this.props.logsRead}),(e=this.logRef.current)==null||e.scrollIntoView()}executeCommand(){var e;this.setState({init:!0},()=>this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!0)),this.props.socket.registerCmdStdoutHandler((e,t)=>this.cmdStdoutHandler(e,t)),this.props.socket.registerCmdStderrHandler((e,t)=>this.cmdStderrHandler(e,t)),this.props.socket.registerCmdExitHandler((e,t)=>this.cmdExitHandler(e,t));let t=Math.floor(Math.random()*268435454)+1;this.setState({activeCmdId:t});let n=this.props.host.startsWith(`system.host.`)?this.props.host:`system.host.${this.props.host}`;this.props.socket.cmdExec.bind(this.props.socket)(n,this.props.cmd,t,void 0,(e=this.props.files)!=null&&e.length?this.props.files:void 0).catch(e=>console.log(e))}cmdStdoutHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let e=this.state.log.slice();e.push(t);let n=t.match(/^upload \[(\d+)]/),r=n?null:t.match(/^got [-_:/\\.\w\d]+\/admin$/),i=r?null:t.match(/^got [-_:/\\.\w\d]+\/www$/),a=this.state.max,o=null;n?(a||=parseInt(n[1],10),o=parseInt(n[1],10)):(r||i)&&(a=null),this.setState({log:e,max:a,value:o}),console.log(`cmdStdout`)}}cmdStderrHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();n.push(t),this.setState({log:n}),console.log(`cmdStderr`),console.log(e),console.log(t)}}cmdExitHandler(e,t){if(this.state.activeCmdId&&this.state.activeCmdId===e){let n=this.state.log.slice();if(!window.document.hidden&&t===0&&n.length&&n[n.length-1].endsWith(`created`)&&this.props.callback){let e=n[n.length-1].split(` `).find(e=>e.startsWith(`system`));e&&setTimeout(e=>{this.props.socket.getObject(e).then(t=>{var n;H.fixAdminUI(t),t&&((n=t.common)==null||(n=n.adminUI)==null?void 0:n.config)!==`none`&&d.doNavigate(`tab-instances`,`config`,e)})},1e3,e)}n.push(`${t===0?``:`ERROR: `}Process exited with code ${t}`),this.setState({log:n,stopped:!0},()=>{this.props.onSetCommandRunning&&this.props.onSetCommandRunning(!1),t!==0||this.state.log[this.state.log.length-1].toLowerCase().includes(`error`)?this.props.errorFunc&&this.props.errorFunc(t,this.state.log):(this.props.performed&&this.props.performed(),this.props.onFinished(t,this.state.log)),console.log(`cmdExit`),console.log(e),console.log(t),typeof this.props.callback==`function`&&this.props.callback(t)})}}colorize(e,t){t&&(e=e.substring(0,t));let n=H.parseColorMessage(e);if(typeof n==`object`)return n.parts.map((e,t)=>T(`span`,{style:e.style,children:e.text},t));if(e.search(this.regExp)!==-1){let t=[];for(;e.search(this.regExp)>=0;){let[n]=e.match(this.regExp)||[``],r=e.search(this.regExp);if(r>0){let n=e.substring(0,r),i=H.parseColorMessage(n);t.push(T(`span`,{children:typeof i==`object`?i.parts.map((e,t)=>T(`span`,{style:e.style,children:e.text},t)):i},t.length)),e=e.replace(n,``)}let i=e.substring(0,n.length);if(i){let r=H.parseColorMessage(i);t.push(T(`span`,{style:Xs[n.toLowerCase()],children:typeof r==`object`?r.parts.map((e,t)=>T(`span`,{style:e.style,children:e.text},t)):r},t.length)),e=e.replace(i,``)}}if(e){let n=H.parseColorMessage(e);t.push(T(`span`,{children:typeof n==`object`?n.parts.map((e,t)=>T(`span`,{style:e.style,children:e.text},t)):n},t.length))}return t}return e}getLog(){return this.state.log.map((e,t)=>{let n=e.startsWith(`$ `);return T(L,{ref:t===this.state.log.length-1?this.logRef:void 0,component:`p`,variant:`body2`,sx:n?e=>({fontWeight:`bold`,backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.06)`,borderRadius:`4px`,py:`2px`,px:`6px`,mx:`-6px`,mb:`6px`}):void 0,children:this.colorize(e)},t)})}render(){return M(N,{style:this.props.noSpacing?{height:`100%`,width:`100%`}:{},container:!0,spacing:this.props.noSpacing?0:2,sx:{flexDirection:`column`},children:[this.props.showElement===void 0||this.props.showElement===!0?T(N,{children:!this.state.stopped&&T(Le,{style:this.props.commandError?{backgroundColor:`#f44336`}:void 0,variant:this.props.inBackground?`determinate`:`indeterminate`,value:this.state.max&&this.state.value?100-Math.round(this.state.value/this.state.max*100):this.props.commandError?0:100})}):null,M(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:this.props.inBackground?`space-between`:`flex-end`},children:[T(L,{style:this.props.inBackground?{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}:{display:`none`},component:`div`,children:this.colorize(this.state.log[this.state.log.length-1])}),this.props.showElement===void 0||this.props.showElement===!0?M(`div`,{style:{display:`flex`,flexDirection:`row`,alignItems:`center`,justifyContent:`end`,gap:8,flexWrap:`nowrap`},children:[T(F,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`less output`)}),T(We,{checked:this.state.moreChecked,onChange:e=>this.setState({moreChecked:e.target.checked}),color:`primary`}),T(F,{style:{whiteSpace:`nowrap`},sx:{"@media (max-width: 600px)":{display:`none`}},children:this.props.t(`more output`)})]}):null]}),T(N,{style:this.props.noSpacing?{height:`calc(100% - 45px)`,width:`100%`}:{},children:this.state.moreChecked&&T(Ot,{style:this.props.noSpacing?Xs.logNoSpacing:Xs.log,children:this.getLog()})})]})}};j(Zs,`pattern`,[`error`,`warn`,`info`]),x();var Qs={closeButton:e=>({position:`absolute`,right:8,top:8,color:e.palette.grey[500]}),hiddenDialog:{display:`none`},dialogRoot:{height:`calc(100% - 64px)`}},$s=class extends $t{constructor(e){super(e),j(this,`paperRef`,Ut.createRef()),j(this,`handleResize`,()=>{this.paperRef.current&&(this.paperRef.current.offsetWidth||0)!==this.state.dialogWidth&&this.setState({dialogWidth:this.paperRef.current.offsetWidth||0})}),this.state={progressText:``,isError:!1,closeOnReady:(window._localStorage||window.localStorage).getItem(`CommandDialog.closeOnReady`)===`true`,dialogWidth:0}}componentDidMount(){window.addEventListener(`resize`,this.handleResize)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleResize)}componentDidUpdate(){var e;if(this.state.dialogWidth!==(((e=this.paperRef.current)==null?void 0:e.offsetWidth)||0)){var t;this.setState({dialogWidth:((t=this.paperRef.current)==null?void 0:t.offsetWidth)||0})}}render(){return M(u,{scroll:`paper`,fullWidth:!0,sx:{"&.MuiDialog-root":this.props.visible?void 0:Qs.hiddenDialog,"& .MuiDialog-paper":Qs.dialogRoot},onClose:this.props.inBackground?this.props.onClose:this.props.onInBackground,open:!0,maxWidth:`md`,ref:this.paperRef,children:[M(ve,{children:[this.state.progressText||this.props.t(`Running command`),T(k,{size:`large`,sx:Qs.closeButton,onClick:this.props.onClose,disabled:this.props.inBackground,children:T(O,{})})]}),T(le,{dividers:!0,style:{height:`100%`},children:T(Zs,{noSpacing:!0,ready:this.props.ready,host:this.props.host,socket:this.props.socket,t:this.props.t,inBackground:this.props.inBackground,commandError:this.props.commandError,errorFunc:()=>{this.setState({isError:!0}),this.props.errorFunc()},performed:this.props.performed,callback:this.props.callback,cmd:this.props.cmd,files:this.props.files,onFinished:()=>this.state.closeOnReady&&this.props.onClose(),onSetCommandRunning:e=>this.props.onSetCommandRunning(e)},`command`)}),M(St,{style:{justifyContent:`space-between`,gap:8},children:[T(je,{style:{marginLeft:16},control:T(ke,{disabled:this.props.inBackground,checked:this.state.closeOnReady,onChange:e=>{this.setState({closeOnReady:e.target.checked}),(window._localStorage||window.localStorage).setItem(`CommandDialog.closeOnReady`,e.target.checked?`true`:`false`)}}),label:this.props.t(`close on ready`)}),T(`div`,{style:{flexGrow:1}}),T(V,{variant:`contained`,autoFocus:!0,title:this.props.confirmText||this.props.t(`In background`),disabled:this.props.inBackground,onClick:this.props.onInBackground,startIcon:this.state.dialogWidth>600?T(Lr,{}):null,color:`primary`,children:this.state.dialogWidth<=600?T(Lr,{}):this.props.confirmText||this.props.t(`In background`)}),T(V,{variant:`contained`,disabled:!this.props.inBackground,onClick:this.props.onClose,color:`grey`,style:{backgroundColor:this.state.isError?`#834141`:void 0,color:this.state.isError?`#fff`:void 0},startIcon:this.state.dialogWidth>600?T(O,{}):null,children:this.state.dialogWidth<=600?T(O,{}):this.props.t(`Close`)})]})]})}};function ec(e,t){if(!e||t===void 0)return null;typeof t!=`object`&&(t=t.split(`.`));let n=t.shift(),r=n===void 0?void 0:e[n];return t.length?typeof r==`object`?ec(r,t):null:r}function tc(e){let{config:t,children:n,name:r,value:i}=e;return i===void 0?!t||ec(t,r)!==!1?n:null:i===!1?null:n}var nc=e(n(((e,t,n)=>{(function(){var n,r=`Expected a function`,i=`__lodash_hash_undefined__`,a=`__lodash_placeholder__`,o=1,s=2,c=8,l=16,u=32,d=64,f=128,p=256,m=512,h=1/0,g=9007199254740991,_=17976931348623157e292,v=NaN,y=4294967295,b=y-1,x=y>>>1,ee=[[`ary`,f],[`bind`,o],[`bindKey`,s],[`curry`,c],[`curryRight`,l],[`flip`,m],[`partial`,u],[`partialRight`,d],[`rearg`,p]],S=`[object Arguments]`,C=`[object Array]`,w=`[object AsyncFunction]`,te=`[object Boolean]`,ne=`[object Date]`,T=`[object DOMException]`,E=`[object Error]`,re=`[object Function]`,ie=`[object GeneratorFunction]`,ae=`[object Map]`,D=`[object Number]`,O=`[object Null]`,k=`[object Object]`,oe=`[object Promise]`,se=`[object Proxy]`,ce=`[object RegExp]`,le=`[object Set]`,ue=`[object String]`,de=`[object Symbol]`,fe=`[object Undefined]`,pe=`[object WeakMap]`,me=`[object WeakSet]`,he=`[object ArrayBuffer]`,ge=`[object DataView]`,_e=`[object Float32Array]`,ve=`[object Float64Array]`,ye=`[object Int8Array]`,be=`[object Int16Array]`,xe=`[object Int32Array]`,Se=`[object Uint8Array]`,Ce=`[object Uint8ClampedArray]`,we=`[object Uint16Array]`,Te=`[object Uint32Array]`,Ee=/\b__p \+= '';/g,De=/\b(__p \+=) '' \+/g,Oe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ke=/&(?:amp|lt|gt|quot|#39);/g,A=/[&<>"']/g,j=RegExp(ke.source),Ae=RegExp(A.source),M=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N=/^\w*$/,Pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fe=/[\\^$.*+?()[\]{}|]/g,Ie=RegExp(Fe.source),Le=/^\s+/,Re=/\s/,ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Be=/\{\n\/\* \[wrapped with (.+)\] \*/,Ve=/,? & /,He=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ue=/[()=,{}\[\]\/\s]/,We=/\\(\\)?/g,Ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ke=/\w*$/,qe=/^[-+]0x[0-9a-f]+$/i,Je=/^0b[01]+$/i,Ye=/^\[object .+?Constructor\]$/,Xe=/^0o[0-7]+$/i,Ze=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$e=/($^)/,et=/['\n\r\u2028\u2029\\]/g,tt=`\\ud800-\\udfff`,nt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,rt=`\\u2700-\\u27bf`,it=`a-z\\xdf-\\xf6\\xf8-\\xff`,at=`\\xac\\xb1\\xd7\\xf7`,ot=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,st=`\\u2000-\\u206f`,ct=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,lt=`A-Z\\xc0-\\xd6\\xd8-\\xde`,ut=`\\ufe0e\\ufe0f`,dt=at+ot+st+ct,ft=`['’]`,P=`[`+tt+`]`,pt=`[`+dt+`]`,mt=`[`+nt+`]`,ht=`\\d+`,gt=`[`+rt+`]`,F=`[`+it+`]`,_t=`[^`+tt+dt+ht+rt+it+lt+`]`,vt=`\\ud83c[\\udffb-\\udfff]`,yt=`(?:`+mt+`|`+vt+`)`,bt=`[^`+tt+`]`,xt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,St=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Ct=`[`+lt+`]`,wt=`\\u200d`,Tt=`(?:`+F+`|`+_t+`)`,Et=`(?:`+Ct+`|`+_t+`)`,Dt=`(?:`+ft+`(?:d|ll|m|re|s|t|ve))?`,I=`(?:`+ft+`(?:D|LL|M|RE|S|T|VE))?`,Ot=yt+`?`,L=`[`+ut+`]?`,kt=`(?:`+wt+`(?:`+[bt,xt,St].join(`|`)+`)`+L+Ot+`)*`,At=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,jt=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,Mt=L+Ot+kt,Nt=`(?:`+[gt,xt,St].join(`|`)+`)`+Mt,Pt=`(?:`+[bt+mt+`?`,mt,xt,St,P].join(`|`)+`)`,Ft=RegExp(ft,`g`),It=RegExp(mt,`g`),Lt=RegExp(vt+`(?=`+vt+`)|`+Pt+Mt,`g`),R=RegExp([Ct+`?`+F+`+`+Dt+`(?=`+[pt,Ct,`$`].join(`|`)+`)`,Et+`+`+I+`(?=`+[pt,Ct+Tt,`$`].join(`|`)+`)`,Ct+`?`+Tt+`+`+Dt,Ct+`+`+I,jt,At,ht,Nt].join(`|`),`g`),Rt=RegExp(`[`+wt+tt+nt+ut+`]`),zt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bt=`Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout`.split(`.`),Vt=-1,Ht={};Ht[_e]=Ht[ve]=Ht[ye]=Ht[be]=Ht[xe]=Ht[Se]=Ht[Ce]=Ht[we]=Ht[Te]=!0,Ht[S]=Ht[C]=Ht[he]=Ht[te]=Ht[ge]=Ht[ne]=Ht[E]=Ht[re]=Ht[ae]=Ht[D]=Ht[k]=Ht[ce]=Ht[le]=Ht[ue]=Ht[pe]=!1;var z={};z[S]=z[C]=z[he]=z[ge]=z[te]=z[ne]=z[_e]=z[ve]=z[ye]=z[be]=z[xe]=z[ae]=z[D]=z[k]=z[ce]=z[le]=z[ue]=z[de]=z[Se]=z[Ce]=z[we]=z[Te]=!0,z[E]=z[re]=z[pe]=!1;var Ut={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`},Wt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Gt={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},Kt={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},qt=parseFloat,Jt=parseInt,Yt=typeof global==`object`&&global&&global.Object===Object&&global,Xt=typeof self==`object`&&self&&self.Object===Object&&self,Zt=Yt||Xt||Function(`return this`)(),Qt=typeof e==`object`&&e&&!e.nodeType&&e,$t=Qt&&typeof t==`object`&&t&&!t.nodeType&&t,en=$t&&$t.exports===Qt,B=en&&Yt.process,tn=function(){try{return $t&&$t.require&&$t.require(`util`).types||B&&B.binding&&B.binding(`util`)}catch{}}(),nn=tn&&tn.isArrayBuffer,rn=tn&&tn.isDate,an=tn&&tn.isMap,on=tn&&tn.isRegExp,sn=tn&&tn.isSet,cn=tn&&tn.isTypedArray;function ln(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function un(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function V(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function dn(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function fn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function pn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function mn(e,t){return!!(e!=null&&e.length)&&En(e,t,0)>-1}function hn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function _n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function yn(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function bn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var xn=An(`length`);function Sn(e){return e.split(``)}function Cn(e){return e.match(He)||[]}function wn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Tn(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function En(e,t,n){return t===t?nr(e,t,n):Tn(e,On,n)}function Dn(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function On(e){return e!==e}function kn(e,t){var n=e==null?0:e.length;return n?Pn(e,t)/n:v}function An(e){return function(t){return t==null?n:t[e]}}function jn(e){return function(t){return e==null?n:e[t]}}function Mn(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Pn(e,t){for(var r,i=-1,a=e.length;++i<a;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function Fn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function In(e,t){return gn(t,function(t){return[t,e[t]]})}function Ln(e){return e&&e.slice(0,or(e)+1).replace(Le,``)}function Rn(e){return function(t){return e(t)}}function zn(e,t){return gn(t,function(t){return e[t]})}function Bn(e,t){return e.has(t)}function Vn(e,t){for(var n=-1,r=e.length;++n<r&&En(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length;n--&&En(t,e[n],0)>-1;);return n}function Un(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Wn=jn(Ut),Gn=jn(Wt);function Kn(e){return`\\`+Kt[e]}function qn(e,t){return e==null?n:e[t]}function Jn(e){return Rt.test(e)}function Yn(e){return zt.test(e)}function Xn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Zn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Qn(e,t){return function(n){return e(t(n))}}function $n(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,o[i++]=n)}return o}function er(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function tr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function nr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function rr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function ir(e){return Jn(e)?cr(e):xn(e)}function ar(e){return Jn(e)?lr(e):Sn(e)}function or(e){for(var t=e.length;t--&&Re.test(e.charAt(t)););return t}var sr=jn(Gt);function cr(e){for(var t=Lt.lastIndex=0;Lt.test(e);)++t;return t}function lr(e){return e.match(Lt)||[]}function ur(e){return e.match(R)||[]}var H=(function e(t){t=t==null?Zt:H.defaults(Zt.Object(),t,H.pick(Zt,Bt));var Re=t.Array,He=t.Date,tt=t.Error,nt=t.Function,rt=t.Math,it=t.Object,at=t.RegExp,ot=t.String,st=t.TypeError,ct=Re.prototype,lt=nt.prototype,ut=it.prototype,dt=t[`__core-js_shared__`],ft=lt.toString,P=ut.hasOwnProperty,pt=0,mt=function(){var e=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),ht=ut.toString,gt=ft.call(it),F=Zt._,_t=at(`^`+ft.call(P).replace(Fe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),vt=en?t.Buffer:n,yt=t.Symbol,bt=t.Uint8Array,xt=vt?vt.allocUnsafe:n,St=Qn(it.getPrototypeOf,it),Ct=it.create,wt=ut.propertyIsEnumerable,Tt=ct.splice,Et=yt?yt.isConcatSpreadable:n,Dt=yt?yt.iterator:n,I=yt?yt.toStringTag:n,Ot=function(){try{var e=Fo(it,`defineProperty`);return e({},``,{}),e}catch{}}(),L=t.clearTimeout!==Zt.clearTimeout&&t.clearTimeout,kt=He&&He.now!==Zt.Date.now&&He.now,At=t.setTimeout!==Zt.setTimeout&&t.setTimeout,jt=rt.ceil,Mt=rt.floor,Nt=it.getOwnPropertySymbols,Pt=vt?vt.isBuffer:n,Lt=t.isFinite,R=ct.join,Rt=Qn(it.keys,it),zt=rt.max,Ut=rt.min,Wt=He.now,Gt=t.parseInt,Kt=rt.random,Yt=ct.reverse,Xt=Fo(t,`DataView`),Qt=Fo(t,`Map`),$t=Fo(t,`Promise`),B=Fo(t,`Set`),tn=Fo(t,`WeakMap`),xn=Fo(it,`create`),Sn=tn&&new tn,jn={},nr=bs(Xt),cr=bs(Qt),lr=bs($t),dr=bs(B),fr=bs(tn),pr=yt?yt.prototype:n,mr=pr?pr.valueOf:n,hr=pr?pr.toString:n;function U(e){if(du(e)&&!Y(e)&&!(e instanceof W)){if(e instanceof vr)return e;if(P.call(e,`__wrapped__`))return Ss(e)}return new vr(e)}var gr=function(){function e(){}return function(t){if(!uu(t))return{};if(Ct)return Ct(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function _r(){}function vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}U.templateSettings={escape:M,evaluate:je,interpolate:Me,variable:``,imports:{_:U}},U.prototype=_r.prototype,U.prototype.constructor=U,vr.prototype=gr(_r.prototype),vr.prototype.constructor=vr;function W(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function yr(){var e=new W(this.__wrapped__);return e.__actions__=Ka(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ka(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ka(this.__views__),e}function br(){if(this.__filtered__){var e=new W(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function xr(){var e=this.__wrapped__.value(),t=this.__dir__,n=Y(e),r=t<0,i=n?e.length:0,a=Bo(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,d=u.length,f=0,p=Ut(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return Da(e,this.__actions__);var m=[];outer:for(;c--&&f<p;){l+=t;for(var h=-1,g=e[l];++h<d;){var _=u[h],v=_.iteratee,y=_.type,b=v(g);if(y==2)g=b;else if(!b){if(y==1)continue outer;break outer}}m[f++]=g}return m}W.prototype=gr(_r.prototype),W.prototype.constructor=W;function Sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(){this.__data__=xn?xn(null):{},this.size=0}function wr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function Tr(e){var t=this.__data__;if(xn){var r=t[e];return r===i?n:r}return P.call(t,e)?t[e]:n}function Er(e){var t=this.__data__;return xn?t[e]!==n:P.call(t,e)}function Dr(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=xn&&t===n?i:t,this}Sr.prototype.clear=Cr,Sr.prototype.delete=wr,Sr.prototype.get=Tr,Sr.prototype.has=Er,Sr.prototype.set=Dr;function Or(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function kr(){this.__data__=[],this.size=0}function Ar(e){var t=this.__data__,n=ti(t,e);return n<0?!1:(n==t.length-1?t.pop():Tt.call(t,n,1),--this.size,!0)}function jr(e){var t=this.__data__,r=ti(t,e);return r<0?n:t[r][1]}function Mr(e){return ti(this.__data__,e)>-1}function Nr(e,t){var n=this.__data__,r=ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Or.prototype.clear=kr,Or.prototype.delete=Ar,Or.prototype.get=jr,Or.prototype.has=Mr,Or.prototype.set=Nr;function Pr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fr(){this.size=0,this.__data__={hash:new Sr,map:new(Qt||Or),string:new Sr}}function Ir(e){var t=No(this,e).delete(e);return this.size-=+!!t,t}function Lr(e){return No(this,e).get(e)}function Rr(e){return No(this,e).has(e)}function zr(e,t){var n=No(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Pr.prototype.clear=Fr,Pr.prototype.delete=Ir,Pr.prototype.get=Lr,Pr.prototype.has=Rr,Pr.prototype.set=zr;function Br(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Pr;++t<n;)this.add(e[t])}function Vr(e){return this.__data__.set(e,i),this}function Hr(e){return this.__data__.has(e)}Br.prototype.add=Br.prototype.push=Vr,Br.prototype.has=Hr;function Ur(e){var t=this.__data__=new Or(e);this.size=t.size}function Wr(){this.__data__=new Or,this.size=0}function Gr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Kr(e){return this.__data__.get(e)}function qr(e){return this.__data__.has(e)}function Jr(e,t){var n=this.__data__;if(n instanceof Or){var r=n.__data__;if(!Qt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pr(r)}return n.set(e,t),this.size=n.size,this}Ur.prototype.clear=Wr,Ur.prototype.delete=Gr,Ur.prototype.get=Kr,Ur.prototype.has=qr,Ur.prototype.set=Jr;function Yr(e,t){var n=Y(e),r=!n&&Jl(e),i=!n&&!r&&$l(e),a=!n&&!r&&!i&&Eu(e),o=n||r||i||a,s=o?Fn(e.length,ot):[],c=s.length;for(var l in e)(t||P.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Jo(l,c)))&&s.push(l);return s}function Xr(e){var t=e.length;return t?e[sa(0,t-1)]:n}function Zr(e,t){return _s(Ka(e),si(t,0,e.length))}function Qr(e){return _s(Ka(e))}function $r(e,t,r){(r!==n&&!Gl(e[t],r)||r===n&&!(t in e))&&ai(e,t,r)}function ei(e,t,r){var i=e[t];(!(P.call(e,t)&&Gl(i,r))||r===n&&!(t in e))&&ai(e,t,r)}function ti(e,t){for(var n=e.length;n--;)if(Gl(e[n][0],t))return n;return-1}function ni(e,t,n,r){return fi(e,function(e,i,a){t(r,e,n(e),a)}),r}function ri(e,t){return e&&qa(t,sd(t),e)}function ii(e,t){return e&&qa(t,cd(t),e)}function ai(e,t,n){t==`__proto__`&&Ot?Ot(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function oi(e,t){for(var r=-1,i=t.length,a=Re(i),o=e==null;++r<i;)a[r]=o?n:td(e,t[r]);return a}function si(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function ci(e,t,r,i,a,o){var s,c=t&1,l=t&2,u=t&4;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!uu(e))return e;var d=Y(e);if(d){if(s=Uo(e),!c)return Ka(e,s)}else{var f=zo(e),p=f==re||f==ie;if($l(e))return Ia(e,c);if(f==k||f==S||p&&!a){if(s=l||p?{}:Wo(e),!c)return l?Ya(e,ii(s,e)):Ja(e,ri(s,e))}else{if(!z[f])return a?e:{};s=Go(e,f,c)}}o||=new Ur;var m=o.get(e);if(m)return m;o.set(e,s),Cu(e)?e.forEach(function(n){s.add(ci(n,t,r,n,e,o))}):fu(e)&&e.forEach(function(n,i){s.set(i,ci(n,t,r,i,e,o))});var h=d?n:(u?l?ko:Oo:l?cd:sd)(e);return V(h||e,function(n,i){h&&(i=n,n=e[i]),ei(s,i,ci(n,t,r,i,e,o))}),s}function li(e){var t=sd(e);return function(n){return G(n,e,t)}}function G(e,t,r){var i=r.length;if(e==null)return!i;for(e=it(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function ui(e,t,i){if(typeof e!=`function`)throw new st(r);return ps(function(){e.apply(n,i)},t)}function di(e,t,n,r){var i=-1,a=mn,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=gn(t,Rn(n))),r?(a=hn,o=!1):t.length>=200&&(a=Bn,o=!1,t=new Br(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var fi=Qa(xi),pi=Qa(Si,!0);function mi(e,t){var n=!0;return fi(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function hi(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===n?s===s&&!Tu(s):r(s,c)))var c=s,l=o}return l}function gi(e,t,r,i){var a=e.length;for(r=X(r),r<0&&(r=-r>a?0:a+r),i=i===n||i>a?a:X(i),i<0&&(i+=a),i=r>i?0:Pu(i);r<i;)e[r++]=t;return e}function _i(e,t){var n=[];return fi(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vi(e,t,n,r,i){var a=-1,o=e.length;for(n||=qo,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?vi(s,t-1,n,r,i):_n(i,s):r||(i[i.length]=s)}return i}var yi=$a(),bi=$a(!0);function xi(e,t){return e&&yi(e,t,sd)}function Si(e,t){return e&&bi(e,t,sd)}function Ci(e,t){return pn(t,function(t){return su(e[t])})}function wi(e,t){t=Ma(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[ys(t[r++])];return r&&r==i?e:n}function Ti(e,t,n){var r=t(e);return Y(e)?r:_n(r,n(e))}function Ei(e){return e==null?e===n?fe:O:I&&I in it(e)?Io(e):ss(e)}function Di(e,t){return e>t}function Oi(e,t){return e!=null&&P.call(e,t)}function ki(e,t){return e!=null&&t in it(e)}function Ai(e,t,n){return e>=Ut(t,n)&&e<zt(t,n)}function ji(e,t,r){for(var i=r?hn:mn,a=e[0].length,o=e.length,s=o,c=Re(o),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=gn(d,Rn(t))),l=Ut(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new Br(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f<a&&u.length<l;){var m=d[f],h=t?t(m):m;if(m=r||m!==0?m:0,!(p?Bn(p,h):i(u,h,r))){for(s=o;--s;){var g=c[s];if(!(g?Bn(g,h):i(e[s],h,r)))continue outer}p&&p.push(h),u.push(m)}}return u}function Mi(e,t,n,r){return xi(e,function(e,i,a){t(r,n(e),i,a)}),r}function Ni(e,t,r){t=Ma(t,e),e=ls(e,t);var i=e==null?e:e[ys(qs(t))];return i==null?n:ln(i,e,r)}function Pi(e){return du(e)&&Ei(e)==S}function Fi(e){return du(e)&&Ei(e)==he}function Ii(e){return du(e)&&Ei(e)==ne}function Li(e,t,n,r,i){return e===t?!0:e==null||t==null||!du(e)&&!du(t)?e!==e&&t!==t:Ri(e,t,n,r,Li,i)}function Ri(e,t,n,r,i,a){var o=Y(e),s=Y(t),c=o?C:zo(e),l=s?C:zo(t);c=c==S?k:c,l=l==S?k:l;var u=c==k,d=l==k,f=c==l;if(f&&$l(e)){if(!$l(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Ur,o||Eu(e)?wo(e,t,n,r,i,a):To(e,t,c,n,r,i,a);if(!(n&1)){var p=u&&P.call(e,`__wrapped__`),m=d&&P.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Ur,i(h,g,n,r,a)}}return f?(a||=new Ur,Eo(e,t,n,r,i,a)):!1}function zi(e){return du(e)&&zo(e)==ae}function Bi(e,t,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=it(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===n&&!(l in e))return!1}else{var f=new Ur;if(i)var p=i(u,d,l,e,t,f);if(!(p===n?Li(d,u,3,i,f):p))return!1}}return!0}function Vi(e){return!uu(e)||$o(e)?!1:(su(e)?_t:Ye).test(bs(e))}function Hi(e){return du(e)&&Ei(e)==ce}function Ui(e){return du(e)&&zo(e)==le}function Wi(e){return du(e)&&lu(e.length)&&!!Ht[Ei(e)]}function Gi(e){return typeof e==`function`?e:e==null?mf:typeof e==`object`?Y(e)?Zi(e[0],e[1]):Xi(e):Df(e)}function Ki(e){if(!ts(e))return Rt(e);var t=[];for(var n in it(e))P.call(e,n)&&n!=`constructor`&&t.push(n);return t}function qi(e){if(!uu(e))return os(e);var t=ts(e),n=[];for(var r in e)(r!=`constructor`||!t&&P.call(e,r))&&n.push(r);return n}function Ji(e,t){return e<t}function Yi(e,t){var n=-1,r=Xl(e)?Re(e.length):[];return fi(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Xi(e){var t=Po(e);return t.length==1&&t[0][2]?rs(t[0][0],t[0][1]):function(n){return n===e||Bi(n,e,t)}}function Zi(e,t){return Xo(e)&&ns(t)?rs(ys(e),t):function(r){var i=td(r,e);return i===n&&i===t?rd(r,e):Li(t,i,3)}}function Qi(e,t,r,i,a){e!==t&&yi(t,function(o,s){if(a||=new Ur,uu(o))$i(e,t,s,r,Qi,i,a);else{var c=i?i(ds(e,s),o,s+``,e,t,a):n;c===n&&(c=o),$r(e,s,c)}},cd)}function $i(e,t,r,i,a,o,s){var c=ds(e,r),l=ds(t,r),u=s.get(l);if(u)$r(e,r,u);else{var d=o?o(c,l,r+``,e,t,s):n,f=d===n;if(f){var p=Y(l),m=!p&&$l(l),h=!p&&!m&&Eu(l);d=l,p||m||h?Y(c)?d=c:Zl(c)?d=Ka(c):m?(f=!1,d=Ia(l,!0)):h?(f=!1,d=Va(l,!0)):d=[]:bu(l)||Jl(l)?(d=c,Jl(c)?d=Iu(c):(!uu(c)||su(c))&&(d=Wo(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),$r(e,r,d)}}function ea(e,t){var r=e.length;if(r)return t+=t<0?r:0,Jo(t,r)?e[t]:n}function ta(e,t,n){t=t.length?gn(t,function(e){return Y(e)?function(t){return wi(t,e.length===1?e[0]:e)}:e}):[mf];var r=-1;return t=gn(t,Rn(q())),Nn(Yi(e,function(e,n,i){return{criteria:gn(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Ua(e,t,n)})}function na(e,t){return ra(e,t,function(t,n){return rd(e,n)})}function ra(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=wi(e,o);n(s,o)&&fa(a,Ma(o,e),s)}return a}function ia(e){return function(t){return wi(t,e)}}function aa(e,t,n,r){var i=r?Dn:En,a=-1,o=t.length,s=e;for(e===t&&(t=Ka(t)),n&&(s=gn(e,Rn(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&Tt.call(s,c,1),Tt.call(e,c,1);return e}function oa(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Jo(i)?Tt.call(e,i,1):wa(e,i)}}return e}function sa(e,t){return e+Mt(Kt()*(t-e+1))}function ca(e,t,n,r){for(var i=-1,a=zt(jt((t-e)/(n||1)),0),o=Re(a);a--;)o[r?a:++i]=e,e+=n;return o}function la(e,t){var n=``;if(!e||t<1||t>g)return n;do t%2&&(n+=e),t=Mt(t/2),t&&(e+=e);while(t);return n}function K(e,t){return ms(cs(e,t,mf),e+``)}function ua(e){return Xr(Ed(e))}function da(e,t){var n=Ed(e);return _s(n,si(t,0,n.length))}function fa(e,t,r,i){if(!uu(e))return e;t=Ma(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=ys(t[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):n,u===n&&(u=uu(d)?d:Jo(t[a+1])?[]:{})}ei(c,l,u),c=c[l]}return e}var pa=Sn?function(e,t){return Sn.set(e,t),e}:mf,ma=Ot?function(e,t){return Ot(e,`toString`,{configurable:!0,enumerable:!1,value:uf(t),writable:!0})}:mf;function ha(e){return _s(Ed(e))}function ga(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Re(i);++r<i;)a[r]=e[r+t];return a}function _a(e,t){var n;return fi(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function va(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t==`number`&&t===t&&i<=x){for(;r<i;){var a=r+i>>>1,o=e[a];o!==null&&!Tu(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return ya(e,t,mf,n)}function ya(e,t,r,i){var a=0,o=e==null?0:e.length;if(o===0)return 0;t=r(t);for(var s=t!==t,c=t===null,l=Tu(t),u=t===n;a<o;){var d=Mt((a+o)/2),f=r(e[d]),p=f!==n,m=f===null,h=f===f,g=Tu(f);if(s)var _=i||h;else _=u?h&&(i||p):c?h&&p&&(i||!m):l?h&&p&&!m&&(i||!g):m||g?!1:i?f<=t:f<t;_?a=d+1:o=d}return Ut(o,b)}function ba(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Gl(s,c)){var c=s;a[i++]=o===0?0:o}}return a}function xa(e){return typeof e==`number`?e:Tu(e)?v:+e}function Sa(e){if(typeof e==`string`)return e;if(Y(e))return gn(e,Sa)+``;if(Tu(e))return hr?hr.call(e):``;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Ca(e,t,n){var r=-1,i=mn,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=hn;else if(a>=200){var l=t?null:vo(e);if(l)return er(l);o=!1,i=Bn,c=new Br}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function wa(e,t){t=Ma(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=ys(t[n]);if(i===`__proto__`&&!P.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=ls(e,t);return a==null||delete a[ys(qs(t))]}function Ta(e,t,n,r){return fa(e,t,n(wi(e,t)),r)}function Ea(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?ga(e,r?0:a,r?a+1:i):ga(e,r?a+1:0,r?i:a)}function Da(e,t){var n=e;return n instanceof W&&(n=n.value()),vn(t,function(e,t){return t.func.apply(t.thisArg,_n([e],t.args))},n)}function Oa(e,t,n){var r=e.length;if(r<2)return r?Ca(e[0]):[];for(var i=-1,a=Re(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=di(a[i]||o,e[s],t,n));return Ca(vi(a,1),t,n)}function ka(e,t,r){for(var i=-1,a=e.length,o=t.length,s={};++i<a;){var c=i<o?t[i]:n;r(s,e[i],c)}return s}function Aa(e){return Zl(e)?e:[]}function ja(e){return typeof e==`function`?e:mf}function Ma(e,t){return Y(e)?e:Xo(e,t)?[e]:vs(Ru(e))}var Na=K;function Pa(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ga(e,t,r)}var Fa=L||function(e){return Zt.clearTimeout(e)};function Ia(e,t){if(t)return e.slice();var n=e.length,r=xt?xt(n):new e.constructor(n);return e.copy(r),r}function La(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Ra(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function za(e){var t=new e.constructor(e.source,Ke.exec(e));return t.lastIndex=e.lastIndex,t}function Ba(e){return mr?it(mr.call(e)):{}}function Va(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ha(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=Tu(e),s=t!==n,c=t===null,l=t===t,u=Tu(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function Ua(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Ha(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Wa(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=zt(a-o,0),u=Re(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function Ga(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=zt(a-s,0),d=Re(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function Ka(e,t){var n=-1,r=e.length;for(t||=Re(r);++n<r;)t[n]=e[n];return t}function qa(e,t,r,i){var a=!r;r||={};for(var o=-1,s=t.length;++o<s;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),a?ai(r,c,l):ei(r,c,l)}return r}function Ja(e,t){return qa(e,Lo(e),t)}function Ya(e,t){return qa(e,Ro(e),t)}function Xa(e,t){return function(n,r){var i=Y(n)?un:ni,a=t?t():{};return i(n,e,q(r,2),a)}}function Za(e){return K(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&Yo(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=it(t);++i<a;){var c=r[i];c&&e(t,c,i,o)}return t})}function Qa(e,t){return function(n,r){if(n==null)return n;if(!Xl(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=it(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function $a(e){return function(t,n,r){for(var i=-1,a=it(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function eo(e,t,n){var r=t&o,i=ro(e);function a(){return(this&&this!==Zt&&this instanceof a?i:e).apply(r?n:this,arguments)}return a}function to(e){return function(t){t=Ru(t);var r=Jn(t)?ar(t):n,i=r?r[0]:t.charAt(0),a=r?Pa(r,1).join(``):t.slice(1);return i[e]()+a}}function no(e){return function(t){return vn(sf(Nd(t).replace(Ft,``)),e,``)}}function ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=gr(e.prototype),r=e.apply(n,t);return uu(r)?r:n}}function io(e,t,r){var i=ro(e);function a(){for(var o=arguments.length,s=Re(o),c=o,l=Mo(a);c--;)s[c]=arguments[c];var u=o<3&&s[0]!==l&&s[o-1]!==l?[]:$n(s,l);return o-=u.length,o<r?go(e,t,so,a.placeholder,n,s,u,n,n,r-o):ln(this&&this!==Zt&&this instanceof a?i:e,this,s)}return a}function ao(e){return function(t,r,i){var a=it(t);if(!Xl(t)){var o=q(r,3);t=sd(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[o?t[s]:s]:n}}function oo(e){return Do(function(t){var i=t.length,a=i,o=vr.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if(typeof s!=`function`)throw new st(r);if(o&&!l&&jo(s)==`wrapper`)var l=new vr([],!0)}for(a=l?a:i;++a<i;){s=t[a];var d=jo(s),m=d==`wrapper`?Ao(s):n;l=m&&Qo(m[0])&&m[1]==(f|c|u|p)&&!m[4].length&&m[9]==1?l[jo(m[0])].apply(l,m[3]):s.length==1&&Qo(s)?l[d]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&e.length==1&&Y(n))return l.plant(n).value();for(var r=0,a=i?t[r].apply(this,e):n;++r<i;)a=t[r].call(this,a);return a}})}function so(e,t,r,i,a,u,d,p,h,g){var _=t&f,v=t&o,y=t&s,b=t&(c|l),x=t&m,ee=y?n:ro(e);function S(){for(var n=arguments.length,o=Re(n),s=n;s--;)o[s]=arguments[s];if(b)var c=Mo(S),l=Un(o,c);if(i&&(o=Wa(o,i,a,b)),u&&(o=Ga(o,u,d,b)),n-=l,b&&n<g){var f=$n(o,c);return go(e,t,so,S.placeholder,r,o,f,p,h,g-n)}var m=v?r:this,C=y?m[e]:e;return n=o.length,p?o=us(o,p):x&&n>1&&o.reverse(),_&&h<n&&(o.length=h),this&&this!==Zt&&this instanceof S&&(C=ee||ro(C)),C.apply(m,o)}return S}function co(e,t){return function(n,r){return Mi(n,e,t(r),{})}}function lo(e,t){return function(r,i){var a;if(r===n&&i===n)return t;if(r!==n&&(a=r),i!==n){if(a===n)return i;typeof r==`string`||typeof i==`string`?(r=Sa(r),i=Sa(i)):(r=xa(r),i=xa(i)),a=e(r,i)}return a}}function uo(e){return Do(function(t){return t=gn(t,Rn(q())),K(function(n){var r=this;return e(t,function(e){return ln(e,r,n)})})})}function fo(e,t){t=t===n?` `:Sa(t);var r=t.length;if(r<2)return r?la(t,e):t;var i=la(t,jt(e/ir(t)));return Jn(t)?Pa(ar(i),0,e).join(``):i.slice(0,e)}function po(e,t,n,r){var i=t&o,a=ro(e);function s(){for(var t=-1,o=arguments.length,c=-1,l=r.length,u=Re(l+o),d=this&&this!==Zt&&this instanceof s?a:e;++c<l;)u[c]=r[c];for(;o--;)u[c++]=arguments[++t];return ln(d,i?n:this,u)}return s}function mo(e){return function(t,r,i){return i&&typeof i!=`number`&&Yo(t,r,i)&&(r=i=n),t=Nu(t),r===n?(r=t,t=0):r=Nu(r),i=i===n?t<r?1:-1:Nu(i),ca(t,r,i,e)}}function ho(e){return function(t,n){return(typeof t!=`string`||typeof n!=`string`)&&(t=Fu(t),n=Fu(n)),e(t,n)}}function go(e,t,r,i,a,l,f,p,m,h){var g=t&c,_=g?f:n,v=g?n:f,y=g?l:n,b=g?n:l;t|=g?u:d,t&=~(g?d:u),t&4||(t&=~(o|s));var x=[e,t,a,y,_,b,v,p,m,h],ee=r.apply(n,x);return Qo(e)&&fs(ee,x),ee.placeholder=i,hs(ee,e,t)}function _o(e){var t=rt[e];return function(e,n){if(e=Fu(e),n=n==null?0:Ut(X(n),292),n&&Lt(e)){var r=(Ru(e)+`e`).split(`e`);return r=(Ru(t(r[0]+`e`+(+r[1]+n)))+`e`).split(`e`),+(r[0]+`e`+(+r[1]-n))}return t(e)}}var vo=B&&1/er(new B([,-0]))[1]==h?function(e){return new B(e)}:Sf;function yo(e){return function(t){var n=zo(t);return n==ae?Zn(t):n==le?tr(t):In(t,e(t))}}function bo(e,t,i,a,f,p,m,h){var g=t&s;if(!g&&typeof e!=`function`)throw new st(r);var _=a?a.length:0;if(_||(t&=~(u|d),a=f=n),m=m===n?m:zt(X(m),0),h=h===n?h:X(h),_-=f?f.length:0,t&d){var v=a,y=f;a=f=n}var b=g?n:Ao(e),x=[e,t,i,a,f,v,y,p,m,h];if(b&&as(x,b),e=x[0],t=x[1],i=x[2],a=x[3],f=x[4],h=x[9]=x[9]===n?g?0:e.length:zt(x[9]-_,0),!h&&t&(c|l)&&(t&=~(c|l)),!t||t==o)var ee=eo(e,t,i);else ee=t==c||t==l?io(e,t,h):(t==u||t==(o|u))&&!f.length?po(e,t,i,a):so.apply(n,x);return hs((b?pa:fs)(ee,x),e,t)}function xo(e,t,r,i){return e===n||Gl(e,ut[r])&&!P.call(i,r)?t:e}function So(e,t,r,i,a,o){return uu(e)&&uu(t)&&(o.set(t,e),Qi(e,t,n,So,o),o.delete(t)),e}function Co(e){return bu(e)?n:e}function wo(e,t,r,i,a,o){var s=r&1,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&2?new Br:n;for(o.set(e,t),o.set(t,e);++f<c;){var h=e[f],g=t[f];if(i)var _=s?i(g,h,f,t,e,o):i(h,g,f,e,t,o);if(_!==n){if(_)continue;p=!1;break}if(m){if(!bn(t,function(e,t){if(!Bn(m,t)&&(h===e||a(h,e,r,i,o)))return m.push(t)})){p=!1;break}}else if(!(h===g||a(h,g,r,i,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function To(e,t,n,r,i,a,o){switch(n){case ge:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case he:return!(e.byteLength!=t.byteLength||!a(new bt(e),new bt(t)));case te:case ne:case D:return Gl(+e,+t);case E:return e.name==t.name&&e.message==t.message;case ce:case ue:return e==t+``;case ae:var s=Zn;case le:var c=r&1;if(s||=er,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=wo(s(e),s(t),r,i,a,o);return o.delete(e),u;case de:if(mr)return mr.call(e)==mr.call(t)}return!1}function Eo(e,t,r,i,a,o){var s=r&1,c=Oo(e),l=c.length;if(l!=Oo(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:P.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=s;++u<l;){d=c[u];var g=e[d],_=t[d];if(i)var v=s?i(_,g,d,t,e,o):i(g,_,d,e,t,o);if(!(v===n?g===_||a(g,_,r,i,o):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m}function Do(e){return ms(cs(e,n,Is),e+``)}function Oo(e){return Ti(e,sd,Lo)}function ko(e){return Ti(e,cd,Ro)}var Ao=Sn?function(e){return Sn.get(e)}:Sf;function jo(e){for(var t=e.name+``,n=jn[t],r=P.call(jn,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}function Mo(e){return(P.call(U,`placeholder`)?U:e).placeholder}function q(){var e=U.iteratee||hf;return e=e===hf?Gi:e,arguments.length?e(arguments[0],arguments[1]):e}function No(e,t){var n=e.__data__;return Zo(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Po(e){for(var t=sd(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ns(i)]}return t}function Fo(e,t){var r=qn(e,t);return Vi(r)?r:n}function Io(e){var t=P.call(e,I),r=e[I];try{e[I]=n;var i=!0}catch{}var a=ht.call(e);return i&&(t?e[I]=r:delete e[I]),a}var Lo=Nt?function(e){return e==null?[]:(e=it(e),pn(Nt(e),function(t){return wt.call(e,t)}))}:jf,Ro=Nt?function(e){for(var t=[];e;)_n(t,Lo(e)),e=St(e);return t}:jf,zo=Ei;(Xt&&zo(new Xt(new ArrayBuffer(1)))!=ge||Qt&&zo(new Qt)!=ae||$t&&zo($t.resolve())!=oe||B&&zo(new B)!=le||tn&&zo(new tn)!=pe)&&(zo=function(e){var t=Ei(e),r=t==k?e.constructor:n,i=r?bs(r):``;if(i)switch(i){case nr:return ge;case cr:return ae;case lr:return oe;case dr:return le;case fr:return pe}return t});function Bo(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case`drop`:e+=o;break;case`dropRight`:t-=o;break;case`take`:t=Ut(t,e+o);break;case`takeRight`:e=zt(e,t-o)}}return{start:e,end:t}}function Vo(e){var t=e.match(Be);return t?t[1].split(Ve):[]}function Ho(e,t,n){t=Ma(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ys(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&lu(i)&&Jo(o,i)&&(Y(e)||Jl(e)))}function Uo(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&P.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function Wo(e){return typeof e.constructor==`function`&&!ts(e)?gr(St(e)):{}}function Go(e,t,n){var r=e.constructor;switch(t){case he:return La(e);case te:case ne:return new r(+e);case ge:return Ra(e,n);case _e:case ve:case ye:case be:case xe:case Se:case Ce:case we:case Te:return Va(e,n);case ae:return new r;case D:case ue:return new r(e);case ce:return za(e);case le:return new r;case de:return Ba(e)}}function Ko(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(ze,`{
|
|
4
4
|
/* [wrapped with `+t+`] */
|
|
5
|
-
`)}function qo(e){return Y(e)||Jl(e)||!!(Tt&&e&&e[Tt])}function Jo(e,t){var n=typeof e;return t??=g,!!t&&(n==`number`||n!=`symbol`&&Xe.test(e))&&e>-1&&e%1==0&&e<t}function Yo(e,t,n){if(!uu(n))return!1;var r=typeof t;return(r==`number`?Xl(n)&&Jo(t,n.length):r==`string`&&t in n)?Gl(n[t],e):!1}function Xo(e,t){if(Y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Tu(e)?!0:P.test(e)||!Me.test(e)||t!=null&&e in rt(t)}function Zo(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Qo(e){var t=jo(e),n=W[t];if(typeof n!=`function`||!(t in vr.prototype))return!1;if(e===n)return!0;var r=Ao(n);return!!r&&e===r[0]}function $o(e){return!!pt&&pt in e}var es=ut?su:Mf;function ts(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||lt)}function ns(e){return e===e&&!uu(e)}function rs(e,t){return function(r){return r!=null&&r[e]===t&&(t!==n||e in rt(r))}}function is(e){var t=Dl(e,function(e){return n.size===500&&n.clear(),e}),n=t.cache;return t}function as(e,t){var n=e[1],r=t[1],i=n|r,l=i<(o|s|f),u=r==f&&n==c||r==f&&n==p&&e[7].length<=t[8]||r==(f|p)&&t[7].length<=t[8]&&n==c;if(!(l||u))return e;r&o&&(e[2]=t[2],i|=n&o?0:4);var d=t[3];if(d){var m=e[3];e[3]=m?Wa(m,d,t[4]):d,e[4]=m?Qn(e[3],a):t[4]}return d=t[5],d&&(m=e[5],e[5]=m?Ga(m,d,t[6]):d,e[6]=m?Qn(e[5],a):t[6]),d=t[7],d&&(e[7]=d),r&f&&(e[8]=e[8]==null?t[8]:Ht(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e}function os(e){var t=[];if(e!=null)for(var n in rt(e))t.push(n);return t}function ss(e){return mt.call(e)}function cs(e,t,r){return t=Rt(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Rt(n.length-t,0),o=Le(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Le(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),cn(e,this,s)}}function ls(e,t){return t.length<2?e:wi(e,ga(t,0,-1))}function us(e,t){for(var r=e.length,i=Ht(t.length,r),a=Ka(e);i--;){var o=t[i];e[i]=Jo(o,r)?a[o]:n}return e}function ds(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var fs=gs(pa),ps=kt||function(e,t){return Xt.setTimeout(e,t)},ms=gs(ma);function hs(e,t,n){var r=t+``;return ms(e,Ko(r,xs(Vo(r),n)))}function gs(e){var t=0,r=0;return function(){var i=Ut(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function _s(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r<t;){var o=sa(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var vs=is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Ne,function(e,n,r,i){t.push(r?i.replace(Ue,`$1`):n||e)}),t});function ys(e){if(typeof e==`string`||Tu(e))return e;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function bs(e){if(e!=null){try{return dt.call(e)}catch{}try{return e+``}catch{}}return``}function xs(e,t){return H(ee,function(n){var r=`_.`+n[0];t&n[1]&&!pn(e,r)&&e.push(r)}),e.sort()}function Ss(e){if(e instanceof vr)return e.clone();var t=new _r(e.__wrapped__,e.__chain__);return t.__actions__=Ka(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Cs(e,t,r){t=(r?Yo(e,t,r):t===n)?1:Rt(X(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=Le(At(i/t));a<i;)s[o++]=ga(e,a,a+=t);return s}function ws(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function Ts(){var e=arguments.length;if(!e)return[];for(var t=Le(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return gn(Y(n)?Ka(n):[n],vi(t,1))}var Es=K(function(e,t){return Zl(e)?di(e,vi(t,1,Zl,!0)):[]}),Ds=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),q(r,2)):[]}),Os=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),n,r):[]});function ks(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),ga(e,t<0?0:t,i)):[]}function As(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,0,t<0?0:t)):[]}function js(e,t){return e&&e.length?Ea(e,q(t,3),!0,!0):[]}function Ms(e,t){return e&&e.length?Ea(e,q(t,3),!0):[]}function Ns(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!=`number`&&Yo(e,t,n)&&(n=0,r=i),gi(e,t,n,r)):[]}function Ps(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=Rt(r+i,0)),wn(e,q(t,3),i)}function Fs(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return r!==n&&(a=X(r),a=r<0?Rt(i+a,0):Ht(a,i-1)),wn(e,q(t,3),a,!0)}function Is(e){return e!=null&&e.length?vi(e,1):[]}function Ls(e){return e!=null&&e.length?vi(e,h):[]}function Rs(e,t){return e!=null&&e.length?(t=t===n?1:X(t),vi(e,t)):[]}function zs(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];ii(r,i[0],i[1])}return r}function Bs(e){return e&&e.length?e[0]:n}function Vs(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=Rt(r+i,0)),Tn(e,t,i)}function Hs(e){return e!=null&&e.length?ga(e,0,-1):[]}var Us=K(function(e){var t=hn(e,Aa);return t.length&&t[0]===e[0]?ji(t):[]}),Ws=K(function(e){var t=qs(e),r=hn(e,Aa);return t===qs(r)?t=n:r.pop(),r.length&&r[0]===e[0]?ji(r,q(t,2)):[]}),Gs=K(function(e){var t=qs(e),r=hn(e,Aa);return t=typeof t==`function`?t:n,t&&r.pop(),r.length&&r[0]===e[0]?ji(r,n,t):[]});function Ks(e,t){return e==null?``:z.call(e,t)}function qs(e){var t=e==null?0:e.length;return t?e[t-1]:n}function Js(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i;return r!==n&&(a=X(r),a=a<0?Rt(i+a,0):Ht(a,i-1)),t===t?nr(e,t,a):wn(e,Dn,a,!0)}function Ys(e,t){return e&&e.length?ea(e,X(t)):n}var Xs=K(Zs);function Zs(e,t){return e&&e.length&&t&&t.length?aa(e,t):e}function Qs(e,t,n){return e&&e.length&&t&&t.length?aa(e,t,q(n,2)):e}function $s(e,t,r){return e&&e.length&&t&&t.length?aa(e,t,n,r):e}var ec=Do(function(e,t){var n=e==null?0:e.length,r=ai(e,t);return oa(e,hn(t,function(e){return Jo(e,n)?+e:e}).sort(Ha)),r});function tc(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,i=[],a=e.length;for(t=q(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return oa(e,i),n}function nc(e){return e==null?e:Jt.call(e)}function rc(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!=`number`&&Yo(e,t,r)?(t=0,r=i):(t=t==null?0:X(t),r=r===n?i:X(r)),ga(e,t,r)):[]}function ic(e,t){return va(e,t)}function ac(e,t,n){return ya(e,t,q(n,2))}function oc(e,t){var n=e==null?0:e.length;if(n){var r=va(e,t);if(r<n&&Gl(e[r],t))return r}return-1}function sc(e,t){return va(e,t,!0)}function cc(e,t,n){return ya(e,t,q(n,2),!0)}function lc(e,t){if(e!=null&&e.length){var n=va(e,t,!0)-1;if(Gl(e[n],t))return n}return-1}function uc(e){return e&&e.length?ba(e):[]}function dc(e,t){return e&&e.length?ba(e,q(t,2)):[]}function J(e){var t=e==null?0:e.length;return t?ga(e,1,t):[]}function fc(e,t,r){return e&&e.length?(t=r||t===n?1:X(t),ga(e,0,t<0?0:t)):[]}function pc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,t<0?0:t,i)):[]}function mc(e,t){return e&&e.length?Ea(e,q(t,3),!1,!0):[]}function hc(e,t){return e&&e.length?Ea(e,q(t,3)):[]}var gc=K(function(e){return Ca(vi(e,1,Zl,!0))}),_c=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Ca(vi(e,1,Zl,!0),q(t,2))}),vc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Ca(vi(e,1,Zl,!0),n,t)});function yc(e){return e&&e.length?Ca(e):[]}function bc(e,t){return e&&e.length?Ca(e,q(t,2)):[]}function xc(e,t){return t=typeof t==`function`?t:n,e&&e.length?Ca(e,n,t):[]}function Sc(e){if(!(e&&e.length))return[];var t=0;return e=fn(e,function(e){if(Zl(e))return t=Rt(e.length,t),!0}),Pn(t,function(t){return hn(e,kn(t))})}function Cc(e,t){if(!(e&&e.length))return[];var r=Sc(e);return t==null?r:hn(r,function(e){return cn(t,n,e)})}var wc=K(function(e,t){return Zl(e)?di(e,t):[]}),Tc=K(function(e){return Oa(fn(e,Zl))}),Ec=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Oa(fn(e,Zl),q(t,2))}),Dc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Oa(fn(e,Zl),n,t)}),Oc=K(Sc);function kc(e,t){return ka(e||[],t||[],$r)}function Ac(e,t){return ka(e||[],t||[],fa)}var jc=K(function(e){var t=e.length,r=t>1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,Cc(e,r)});function Mc(e){var t=W(e);return t.__chain__=!0,t}function Nc(e,t){return t(e),e}function Pc(e,t){return t(e)}var Fc=Do(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return ai(t,e)};return t>1||this.__actions__.length||!(i instanceof vr)||!Jo(r)?this.thru(a):(i=i.slice(r,+r+ +!!t),i.__actions__.push({func:Pc,args:[a],thisArg:n}),new _r(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function Ic(){return Mc(this)}function Lc(){return new _r(this.value(),this.__chain__)}function Rc(){this.__values__===n&&(this.__values__=Mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}}function zc(){return this}function Bc(e){for(var t,r=this;r instanceof gr;){var i=Ss(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function Vc(){var e=this.__wrapped__;if(e instanceof vr){var t=e;return this.__actions__.length&&(t=new vr(this)),t=t.reverse(),t.__actions__.push({func:Pc,args:[nc],thisArg:n}),new _r(t,this.__chain__)}return this.thru(nc)}function Hc(){return Da(this.__wrapped__,this.__actions__)}var Uc=Xa(function(e,t,n){F.call(e,n)?++e[n]:ii(e,n,1)});function Wc(e,t,r){var i=Y(e)?dn:mi;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}function Gc(e,t){return(Y(e)?fn:_i)(e,q(t,3))}var Kc=ao(Ps),qc=ao(Fs);function Jc(e,t){return vi(rl(e,t),1)}function Yc(e,t){return vi(rl(e,t),h)}function Xc(e,t,r){return r=r===n?1:X(r),vi(rl(e,t),r)}function Zc(e,t){return(Y(e)?H:fi)(e,q(t,3))}function Qc(e,t){return(Y(e)?un:pi)(e,q(t,3))}var $c=Xa(function(e,t,n){F.call(e,n)?e[n].push(t):ii(e,n,[t])});function el(e,t,n,r){e=Xl(e)?e:Ed(e),n=n&&!r?X(n):0;var i=e.length;return n<0&&(n=Rt(i+n,0)),wu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Tn(e,t,n)>-1}var tl=K(function(e,t,n){var r=-1,i=typeof t==`function`,a=Xl(e)?Le(e.length):[];return fi(e,function(e){a[++r]=i?cn(t,e,n):Ni(e,t,n)}),a}),nl=Xa(function(e,t,n){ii(e,n,t)});function rl(e,t){return(Y(e)?hn:Yi)(e,q(t,3))}function il(e,t,r,i){return e==null?[]:(Y(t)||(t=t==null?[]:[t]),r=i?n:r,Y(r)||(r=r==null?[]:[r]),ta(e,t,r))}var al=Xa(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]});function ol(e,t,n){var r=Y(e)?_n:jn,i=arguments.length<3;return r(e,q(t,4),n,i,fi)}function sl(e,t,n){var r=Y(e)?vn:jn,i=arguments.length<3;return r(e,q(t,4),n,i,pi)}function cl(e,t){return(Y(e)?fn:_i)(e,Ol(q(t,3)))}function ll(e){return(Y(e)?Yr:ua)(e)}function ul(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),(Y(e)?Xr:da)(e,t)}function dl(e){return(Y(e)?Zr:ha)(e)}function fl(e){if(e==null)return 0;if(Xl(e))return wu(e)?rr(e):e.length;var t=zo(e);return t==ie||t==ce?e.size:Ki(e).length}function pl(e,t,r){var i=Y(e)?yn:_a;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}var ml=K(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Yo(e,t[0],t[1])?t=[]:n>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),ta(e,vi(t,1),[])}),hl=Ot||function(){return Xt.Date.now()};function gl(e,t){if(typeof t!=`function`)throw new ot(r);return e=X(e),function(){if(--e<1)return t.apply(this,arguments)}}function _l(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,bo(e,f,n,n,n,n,t)}function vl(e,t){var i;if(typeof t!=`function`)throw new ot(r);return e=X(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var yl=K(function(e,t,n){var r=o;if(n.length){var i=Qn(n,Mo(yl));r|=u}return bo(e,r,t,n,i)}),bl=K(function(e,t,n){var r=o|s;if(n.length){var i=Qn(n,Mo(bl));r|=u}return bo(t,r,e,n,i)});function xl(e,t,r){t=r?n:t;var i=bo(e,c,n,n,n,n,n,t);return i.placeholder=xl.placeholder,i}function Sl(e,t,r){t=r?n:t;var i=bo(e,l,n,n,n,n,n,t);return i.placeholder=Sl.placeholder,i}function Cl(e,t,i){var a,o,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new ot(r);t=Fu(t)||0,uu(i)&&(f=!!i.leading,p=`maxWait`in i,s=p?Rt(Fu(i.maxWait)||0,t):s,m=`trailing`in i?!!i.trailing:m);function h(t){var r=a,i=o;return a=o=n,d=t,c=e.apply(i,r),c}function g(e){return d=e,l=ps(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?Ht(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=hl();if(v(e))return b(e);l=ps(y,_(e))}function b(e){return l=n,m&&a?h(e):(a=o=n,c)}function x(){l!==n&&Fa(l),d=0,a=u=o=l=n}function ee(){return l===n?c:b(hl())}function S(){var e=hl(),r=v(e);if(a=arguments,o=this,u=e,r){if(l===n)return g(u);if(p)return Fa(l),l=ps(y,t),h(u)}return l===n&&(l=ps(y,t)),c}return S.cancel=x,S.flush=ee,S}var wl=K(function(e,t){return ui(e,1,t)}),Tl=K(function(e,t,n){return ui(e,Fu(t)||0,n)});function El(e){return bo(e,m)}function Dl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new ot(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Dl.Cache||Nr),n}Dl.Cache=Nr;function Ol(e){if(typeof e!=`function`)throw new ot(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function kl(e){return vl(2,e)}var Al=Na(function(e,t){t=t.length==1&&Y(t[0])?hn(t[0],Ln(q())):hn(vi(t,1),Ln(q()));var n=t.length;return K(function(r){for(var i=-1,a=Ht(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return cn(e,this,r)})}),jl=K(function(e,t){return bo(e,u,n,t,Qn(t,Mo(jl)))}),Ml=K(function(e,t){return bo(e,d,n,t,Qn(t,Mo(Ml)))}),Nl=Do(function(e,t){return bo(e,p,n,n,n,t)});function Pl(e,t){if(typeof e!=`function`)throw new ot(r);return t=t===n?t:X(t),K(e,t)}function Fl(e,t){if(typeof e!=`function`)throw new ot(r);return t=t==null?0:Rt(X(t),0),K(function(n){var r=n[t],i=Pa(n,0,t);return r&&gn(i,r),cn(e,this,i)})}function Il(e,t,n){var i=!0,a=!0;if(typeof e!=`function`)throw new ot(r);return uu(n)&&(i=`leading`in n?!!n.leading:i,a=`trailing`in n?!!n.trailing:a),Cl(e,t,{leading:i,maxWait:t,trailing:a})}function Ll(e){return _l(e,1)}function Rl(e,t){return jl(ja(t),e)}function zl(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function Bl(e){return si(e,4)}function Vl(e,t){return t=typeof t==`function`?t:n,si(e,4,t)}function Hl(e){return si(e,5)}function Ul(e,t){return t=typeof t==`function`?t:n,si(e,5,t)}function Wl(e,t){return t==null||li(e,t,sd(t))}function Gl(e,t){return e===t||e!==e&&t!==t}var Kl=ho(Di),ql=ho(function(e,t){return e>=t}),Jl=Pi(function(){return arguments}())?Pi:function(e){return du(e)&&F.call(e,`callee`)&&!Ct.call(e,`callee`)},Y=Le.isArray,Yl=tn?Ln(tn):Fi;function Xl(e){return e!=null&&lu(e.length)&&!su(e)}function Zl(e){return du(e)&&Xl(e)}function Ql(e){return e===!0||e===!1||du(e)&&Ei(e)==T}var $l=Nt||Mf,eu=nn?Ln(nn):Ii;function tu(e){return du(e)&&e.nodeType===1&&!bu(e)}function nu(e){if(e==null)return!0;if(Xl(e)&&(Y(e)||typeof e==`string`||typeof e.splice==`function`||$l(e)||Eu(e)||Jl(e)))return!e.length;var t=zo(e);if(t==ie||t==ce)return!e.size;if(ts(e))return!Ki(e).length;for(var n in e)if(F.call(e,n))return!1;return!0}function ru(e,t){return Li(e,t)}function iu(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?Li(e,t,n,r):!!i}function au(e){if(!du(e))return!1;var t=Ei(e);return t==D||t==E||typeof e.message==`string`&&typeof e.name==`string`&&!bu(e)}function ou(e){return typeof e==`number`&&It(e)}function su(e){if(!uu(e))return!1;var t=Ei(e);return t==ne||t==re||t==w||t==oe}function cu(e){return typeof e==`number`&&e==X(e)}function lu(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=g}function uu(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function du(e){return typeof e==`object`&&!!e}var fu=rn?Ln(rn):zi;function pu(e,t){return e===t||Bi(e,t,Po(t))}function mu(e,t,r){return r=typeof r==`function`?r:n,Bi(e,t,Po(t),r)}function hu(e){return yu(e)&&e!=+e}function gu(e){if(es(e))throw new et(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return Vi(e)}function _u(e){return e===null}function vu(e){return e==null}function yu(e){return typeof e==`number`||du(e)&&Ei(e)==O}function bu(e){if(!du(e)||Ei(e)!=A)return!1;var t=xt(e);if(t===null)return!0;var n=F.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&dt.call(n)==ht}var xu=an?Ln(an):Hi;function Su(e){return cu(e)&&e>=-g&&e<=g}var Cu=on?Ln(on):Ui;function wu(e){return typeof e==`string`||!Y(e)&&du(e)&&Ei(e)==le}function Tu(e){return typeof e==`symbol`||du(e)&&Ei(e)==ue}var Eu=sn?Ln(sn):Wi;function Du(e){return e===n}function Ou(e){return du(e)&&zo(e)==fe}function ku(e){return du(e)&&Ei(e)==pe}var Au=ho(Ji),ju=ho(function(e,t){return e<=t});function Mu(e){if(!e)return[];if(Xl(e))return wu(e)?ir(e):Ka(e);if(Et&&e[Et])return Yn(e[Et]());var t=zo(e);return(t==ie?Xn:t==ce?$n:Ed)(e)}function Nu(e){return e?(e=Fu(e),e===h||e===-1/0?(e<0?-1:1)*_:e===e?e:0):e===0?e:0}function X(e){var t=Nu(e),n=t%1;return t===t?n?t-n:t:0}function Pu(e){return e?oi(X(e),0,y):0}function Fu(e){if(typeof e==`number`)return e;if(Tu(e))return v;if(uu(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=uu(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=In(e);var n=qe.test(e);return n||Ye.test(e)?qt(e.slice(2),n?2:8):Ke.test(e)?v:+e}function Iu(e){return qa(e,cd(e))}function Lu(e){return e?oi(X(e),-g,g):e===0?e:0}function Ru(e){return e==null?``:Sa(e)}var zu=Za(function(e,t){if(ts(t)||Xl(t))qa(t,sd(t),e);else for(var n in t)F.call(t,n)&&$r(e,n,t[n])}),Bu=Za(function(e,t){qa(t,cd(t),e)}),Vu=Za(function(e,t,n,r){qa(t,cd(t),e,r)}),Hu=Za(function(e,t,n,r){qa(t,sd(t),e,r)}),Uu=Do(ai);function Wu(e,t){var n=hr(e);return t==null?n:ni(n,t)}var Gu=K(function(e,t){e=rt(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&Yo(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=cd(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===n||Gl(d,lt[u])&&!F.call(e,u))&&(e[u]=o[u])}return e}),Ku=K(function(e){return e.push(n,So),cn(fd,n,e)});function qu(e,t){return Cn(e,q(t,3),xi)}function Ju(e,t){return Cn(e,q(t,3),Si)}function Yu(e,t){return e==null?e:yi(e,q(t,3),cd)}function Xu(e,t){return e==null?e:bi(e,q(t,3),cd)}function Zu(e,t){return e&&xi(e,q(t,3))}function Qu(e,t){return e&&Si(e,q(t,3))}function $u(e){return e==null?[]:Ci(e,sd(e))}function ed(e){return e==null?[]:Ci(e,cd(e))}function td(e,t,r){var i=e==null?n:wi(e,t);return i===n?r:i}function nd(e,t){return e!=null&&Ho(e,t,Oi)}function rd(e,t){return e!=null&&Ho(e,t,ki)}var id=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=mt.call(t)),e[t]=n},uf(mf)),ad=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=mt.call(t)),F.call(e,t)?e[t].push(n):e[t]=[n]},q),od=K(Ni);function sd(e){return Xl(e)?Jr(e):Ki(e)}function cd(e){return Xl(e)?Jr(e,!0):qi(e)}function ld(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ii(n,t(e,r,i),e)}),n}function ud(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ii(n,r,t(e,r,i))}),n}var dd=Za(function(e,t,n){Qi(e,t,n)}),fd=Za(function(e,t,n,r){Qi(e,t,n,r)}),pd=Do(function(e,t){var n={};if(e==null)return n;var r=!1;t=hn(t,function(t){return t=Ma(t,e),r||=t.length>1,t}),qa(e,ko(e),n),r&&(n=si(n,7,Co));for(var i=t.length;i--;)wa(n,t[i]);return n});function md(e,t){return gd(e,Ol(q(t)))}var hd=Do(function(e,t){return e==null?{}:na(e,t)});function gd(e,t){if(e==null)return{};var n=hn(ko(e),function(e){return[e]});return t=q(t),ra(e,n,function(e,n){return t(e,n[0])})}function _d(e,t,r){t=Ma(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++i<a;){var o=e==null?n:e[ys(t[i])];o===n&&(i=a,o=r),e=su(o)?o.call(e):o}return e}function vd(e,t,n){return e==null?e:fa(e,t,n)}function yd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:fa(e,t,r,i)}var bd=yo(sd),xd=yo(cd);function Sd(e,t,n){var r=Y(e),i=r||$l(e)||Eu(e);if(t=q(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:uu(e)&&su(a)?hr(xt(e)):{}}return(i?H:xi)(e,function(e,r,i){return t(n,e,r,i)}),n}function Cd(e,t){return e==null||wa(e,t)}function wd(e,t,n){return e==null?e:Ta(e,t,ja(n))}function Td(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Ta(e,t,ja(r),i)}function Ed(e){return e==null?[]:Rn(e,sd(e))}function Dd(e){return e==null?[]:Rn(e,cd(e))}function Od(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=Fu(r),r=r===r?r:0),t!==n&&(t=Fu(t),t=t===t?t:0),oi(Fu(e),t,r)}function kd(e,t,r){return t=Nu(t),r===n?(r=t,t=0):r=Nu(r),e=Fu(e),Ai(e,t,r)}function Ad(e,t,r){if(r&&typeof r!=`boolean`&&Yo(e,t,r)&&(t=r=n),r===n&&(typeof t==`boolean`?(r=t,t=n):typeof e==`boolean`&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Nu(e),t===n?(t=e,e=0):t=Nu(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var a=Gt();return Ht(e+a*(t-e+Kt(`1e-`+((a+``).length-1))),t)}return sa(e,t)}var jd=no(function(e,t,n){return t=t.toLowerCase(),e+(n?Md(t):t)});function Md(e){return of(Ru(e).toLowerCase())}function Nd(e){return e=Ru(e),e&&e.replace(Ze,Un).replace(Ft,``)}function Pd(e,t,r){e=Ru(e),t=Sa(t);var i=e.length;r=r===n?i:oi(X(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function Fd(e){return e=Ru(e),e&&ke.test(e)?e.replace(j,Wn):e}function Id(e){return e=Ru(e),e&&Fe.test(e)?e.replace(Pe,`\\$&`):e}var Ld=no(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),Rd=no(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),zd=to(`toLowerCase`);function Bd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return fo(jt(i),n)+e+fo(At(i),n)}function Vd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;return t&&r<t?e+fo(t-r,n):e}function Hd(e,t,n){e=Ru(e),t=X(t);var r=t?rr(e):0;return t&&r<t?fo(t-r,n)+e:e}function Ud(e,t,n){return n||t==null?t=0:t&&=+t,Wt(Ru(e).replace(Ie,``),t||0)}function Wd(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),la(Ru(e),t)}function Gd(){var e=arguments,t=Ru(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Kd=no(function(e,t,n){return e+(n?`_`:``)+t.toLowerCase()});function qd(e,t,r){return r&&typeof r!=`number`&&Yo(e,t,r)&&(t=r=n),r=r===n?y:r>>>0,r?(e=Ru(e),e&&(typeof t==`string`||t!=null&&!xu(t))&&(t=Sa(t),!t&&qn(e))?Pa(ir(e),0,r):e.split(t,r)):[]}var Jd=no(function(e,t,n){return e+(n?` `:``)+of(t)});function Yd(e,t,n){return e=Ru(e),n=n==null?0:oi(X(n),0,e.length),t=Sa(t),e.slice(n,n+t.length)==t}function Xd(e,t,r){var i=W.templateSettings;r&&Yo(e,t,r)&&(t=n),e=Ru(e),t=Hu({},t,i,xo);var a=Hu({},t.imports,i.imports,xo),o=sd(a),s=Rn(a,o);H(o,function(e){if(He.test(e))throw new et("Invalid `imports` option passed into `_.template`")});var c,l,u=0,d=t.interpolate||Qe,f=`__p += '`,p=it((t.escape||Qe).source+`|`+d.source+`|`+(d===je?We:Qe).source+`|`+(t.evaluate||Qe).source+`|$`,`g`),m=`//# sourceURL=`+(F.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++Bt+`]`)+`
|
|
6
|
-
`;e.replace(p,function(t,n,r,i,a,o){return r||=i,f+=e.slice(u,o).replace(
|
|
5
|
+
`)}function qo(e){return Y(e)||Jl(e)||!!(Et&&e&&e[Et])}function Jo(e,t){var n=typeof e;return t??=g,!!t&&(n==`number`||n!=`symbol`&&Ze.test(e))&&e>-1&&e%1==0&&e<t}function Yo(e,t,n){if(!uu(n))return!1;var r=typeof t;return(r==`number`?Xl(n)&&Jo(t,n.length):r==`string`&&t in n)?Gl(n[t],e):!1}function Xo(e,t){if(Y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Tu(e)?!0:N.test(e)||!Ne.test(e)||t!=null&&e in it(t)}function Zo(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Qo(e){var t=jo(e),n=U[t];if(typeof n!=`function`||!(t in W.prototype))return!1;if(e===n)return!0;var r=Ao(n);return!!r&&e===r[0]}function $o(e){return!!mt&&mt in e}var es=dt?su:Mf;function ts(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ut)}function ns(e){return e===e&&!uu(e)}function rs(e,t){return function(r){return r!=null&&r[e]===t&&(t!==n||e in it(r))}}function is(e){var t=Dl(e,function(e){return n.size===500&&n.clear(),e}),n=t.cache;return t}function as(e,t){var n=e[1],r=t[1],i=n|r,l=i<(o|s|f),u=r==f&&n==c||r==f&&n==p&&e[7].length<=t[8]||r==(f|p)&&t[7].length<=t[8]&&n==c;if(!(l||u))return e;r&o&&(e[2]=t[2],i|=n&o?0:4);var d=t[3];if(d){var m=e[3];e[3]=m?Wa(m,d,t[4]):d,e[4]=m?$n(e[3],a):t[4]}return d=t[5],d&&(m=e[5],e[5]=m?Ga(m,d,t[6]):d,e[6]=m?$n(e[5],a):t[6]),d=t[7],d&&(e[7]=d),r&f&&(e[8]=e[8]==null?t[8]:Ut(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e}function os(e){var t=[];if(e!=null)for(var n in it(e))t.push(n);return t}function ss(e){return ht.call(e)}function cs(e,t,r){return t=zt(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=zt(n.length-t,0),o=Re(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Re(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),ln(e,this,s)}}function ls(e,t){return t.length<2?e:wi(e,ga(t,0,-1))}function us(e,t){for(var r=e.length,i=Ut(t.length,r),a=Ka(e);i--;){var o=t[i];e[i]=Jo(o,r)?a[o]:n}return e}function ds(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var fs=gs(pa),ps=At||function(e,t){return Zt.setTimeout(e,t)},ms=gs(ma);function hs(e,t,n){var r=t+``;return ms(e,Ko(r,xs(Vo(r),n)))}function gs(e){var t=0,r=0;return function(){var i=Wt(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function _s(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r<t;){var o=sa(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var vs=is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Pe,function(e,n,r,i){t.push(r?i.replace(We,`$1`):n||e)}),t});function ys(e){if(typeof e==`string`||Tu(e))return e;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function bs(e){if(e!=null){try{return ft.call(e)}catch{}try{return e+``}catch{}}return``}function xs(e,t){return V(ee,function(n){var r=`_.`+n[0];t&n[1]&&!mn(e,r)&&e.push(r)}),e.sort()}function Ss(e){if(e instanceof W)return e.clone();var t=new vr(e.__wrapped__,e.__chain__);return t.__actions__=Ka(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Cs(e,t,r){t=(r?Yo(e,t,r):t===n)?1:zt(X(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=Re(jt(i/t));a<i;)s[o++]=ga(e,a,a+=t);return s}function ws(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function Ts(){var e=arguments.length;if(!e)return[];for(var t=Re(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return _n(Y(n)?Ka(n):[n],vi(t,1))}var Es=K(function(e,t){return Zl(e)?di(e,vi(t,1,Zl,!0)):[]}),Ds=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),q(r,2)):[]}),Os=K(function(e,t){var r=qs(t);return Zl(r)&&(r=n),Zl(e)?di(e,vi(t,1,Zl,!0),n,r):[]});function ks(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),ga(e,t<0?0:t,i)):[]}function As(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,0,t<0?0:t)):[]}function js(e,t){return e&&e.length?Ea(e,q(t,3),!0,!0):[]}function Ms(e,t){return e&&e.length?Ea(e,q(t,3),!0):[]}function Ns(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!=`number`&&Yo(e,t,n)&&(n=0,r=i),gi(e,t,n,r)):[]}function Ps(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=zt(r+i,0)),Tn(e,q(t,3),i)}function Fs(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return r!==n&&(a=X(r),a=r<0?zt(i+a,0):Ut(a,i-1)),Tn(e,q(t,3),a,!0)}function Is(e){return e!=null&&e.length?vi(e,1):[]}function Ls(e){return e!=null&&e.length?vi(e,h):[]}function Rs(e,t){return e!=null&&e.length?(t=t===n?1:X(t),vi(e,t)):[]}function zs(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];ai(r,i[0],i[1])}return r}function Bs(e){return e&&e.length?e[0]:n}function Vs(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:X(n);return i<0&&(i=zt(r+i,0)),En(e,t,i)}function Hs(e){return e!=null&&e.length?ga(e,0,-1):[]}var Us=K(function(e){var t=gn(e,Aa);return t.length&&t[0]===e[0]?ji(t):[]}),Ws=K(function(e){var t=qs(e),r=gn(e,Aa);return t===qs(r)?t=n:r.pop(),r.length&&r[0]===e[0]?ji(r,q(t,2)):[]}),Gs=K(function(e){var t=qs(e),r=gn(e,Aa);return t=typeof t==`function`?t:n,t&&r.pop(),r.length&&r[0]===e[0]?ji(r,n,t):[]});function Ks(e,t){return e==null?``:R.call(e,t)}function qs(e){var t=e==null?0:e.length;return t?e[t-1]:n}function Js(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i;return r!==n&&(a=X(r),a=a<0?zt(i+a,0):Ut(a,i-1)),t===t?rr(e,t,a):Tn(e,On,a,!0)}function Ys(e,t){return e&&e.length?ea(e,X(t)):n}var Xs=K(Zs);function Zs(e,t){return e&&e.length&&t&&t.length?aa(e,t):e}function Qs(e,t,n){return e&&e.length&&t&&t.length?aa(e,t,q(n,2)):e}function $s(e,t,r){return e&&e.length&&t&&t.length?aa(e,t,n,r):e}var ec=Do(function(e,t){var n=e==null?0:e.length,r=oi(e,t);return oa(e,gn(t,function(e){return Jo(e,n)?+e:e}).sort(Ha)),r});function tc(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,i=[],a=e.length;for(t=q(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return oa(e,i),n}function nc(e){return e==null?e:Yt.call(e)}function rc(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!=`number`&&Yo(e,t,r)?(t=0,r=i):(t=t==null?0:X(t),r=r===n?i:X(r)),ga(e,t,r)):[]}function ic(e,t){return va(e,t)}function ac(e,t,n){return ya(e,t,q(n,2))}function oc(e,t){var n=e==null?0:e.length;if(n){var r=va(e,t);if(r<n&&Gl(e[r],t))return r}return-1}function sc(e,t){return va(e,t,!0)}function cc(e,t,n){return ya(e,t,q(n,2),!0)}function lc(e,t){if(e!=null&&e.length){var n=va(e,t,!0)-1;if(Gl(e[n],t))return n}return-1}function uc(e){return e&&e.length?ba(e):[]}function dc(e,t){return e&&e.length?ba(e,q(t,2)):[]}function fc(e){var t=e==null?0:e.length;return t?ga(e,1,t):[]}function pc(e,t,r){return e&&e.length?(t=r||t===n?1:X(t),ga(e,0,t<0?0:t)):[]}function mc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:X(t),t=i-t,ga(e,t<0?0:t,i)):[]}function hc(e,t){return e&&e.length?Ea(e,q(t,3),!1,!0):[]}function gc(e,t){return e&&e.length?Ea(e,q(t,3)):[]}var _c=K(function(e){return Ca(vi(e,1,Zl,!0))}),vc=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Ca(vi(e,1,Zl,!0),q(t,2))}),yc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Ca(vi(e,1,Zl,!0),n,t)});function bc(e){return e&&e.length?Ca(e):[]}function xc(e,t){return e&&e.length?Ca(e,q(t,2)):[]}function Sc(e,t){return t=typeof t==`function`?t:n,e&&e.length?Ca(e,n,t):[]}function Cc(e){if(!(e&&e.length))return[];var t=0;return e=pn(e,function(e){if(Zl(e))return t=zt(e.length,t),!0}),Fn(t,function(t){return gn(e,An(t))})}function wc(e,t){if(!(e&&e.length))return[];var r=Cc(e);return t==null?r:gn(r,function(e){return ln(t,n,e)})}var Tc=K(function(e,t){return Zl(e)?di(e,t):[]}),Ec=K(function(e){return Oa(pn(e,Zl))}),Dc=K(function(e){var t=qs(e);return Zl(t)&&(t=n),Oa(pn(e,Zl),q(t,2))}),Oc=K(function(e){var t=qs(e);return t=typeof t==`function`?t:n,Oa(pn(e,Zl),n,t)}),kc=K(Cc);function Ac(e,t){return ka(e||[],t||[],ei)}function jc(e,t){return ka(e||[],t||[],fa)}var Mc=K(function(e){var t=e.length,r=t>1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,wc(e,r)});function Nc(e){var t=U(e);return t.__chain__=!0,t}function Pc(e,t){return t(e),e}function J(e,t){return t(e)}var Fc=Do(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return oi(t,e)};return t>1||this.__actions__.length||!(i instanceof W)||!Jo(r)?this.thru(a):(i=i.slice(r,+r+ +!!t),i.__actions__.push({func:J,args:[a],thisArg:n}),new vr(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function Ic(){return Nc(this)}function Lc(){return new vr(this.value(),this.__chain__)}function Rc(){this.__values__===n&&(this.__values__=Mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}}function zc(){return this}function Bc(e){for(var t,r=this;r instanceof _r;){var i=Ss(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function Vc(){var e=this.__wrapped__;if(e instanceof W){var t=e;return this.__actions__.length&&(t=new W(this)),t=t.reverse(),t.__actions__.push({func:J,args:[nc],thisArg:n}),new vr(t,this.__chain__)}return this.thru(nc)}function Hc(){return Da(this.__wrapped__,this.__actions__)}var Uc=Xa(function(e,t,n){P.call(e,n)?++e[n]:ai(e,n,1)});function Wc(e,t,r){var i=Y(e)?fn:mi;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}function Gc(e,t){return(Y(e)?pn:_i)(e,q(t,3))}var Kc=ao(Ps),qc=ao(Fs);function Jc(e,t){return vi(rl(e,t),1)}function Yc(e,t){return vi(rl(e,t),h)}function Xc(e,t,r){return r=r===n?1:X(r),vi(rl(e,t),r)}function Zc(e,t){return(Y(e)?V:fi)(e,q(t,3))}function Qc(e,t){return(Y(e)?dn:pi)(e,q(t,3))}var $c=Xa(function(e,t,n){P.call(e,n)?e[n].push(t):ai(e,n,[t])});function el(e,t,n,r){e=Xl(e)?e:Ed(e),n=n&&!r?X(n):0;var i=e.length;return n<0&&(n=zt(i+n,0)),wu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&En(e,t,n)>-1}var tl=K(function(e,t,n){var r=-1,i=typeof t==`function`,a=Xl(e)?Re(e.length):[];return fi(e,function(e){a[++r]=i?ln(t,e,n):Ni(e,t,n)}),a}),nl=Xa(function(e,t,n){ai(e,n,t)});function rl(e,t){return(Y(e)?gn:Yi)(e,q(t,3))}function il(e,t,r,i){return e==null?[]:(Y(t)||(t=t==null?[]:[t]),r=i?n:r,Y(r)||(r=r==null?[]:[r]),ta(e,t,r))}var al=Xa(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]});function ol(e,t,n){var r=Y(e)?vn:Mn,i=arguments.length<3;return r(e,q(t,4),n,i,fi)}function sl(e,t,n){var r=Y(e)?yn:Mn,i=arguments.length<3;return r(e,q(t,4),n,i,pi)}function cl(e,t){return(Y(e)?pn:_i)(e,Ol(q(t,3)))}function ll(e){return(Y(e)?Xr:ua)(e)}function ul(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),(Y(e)?Zr:da)(e,t)}function dl(e){return(Y(e)?Qr:ha)(e)}function fl(e){if(e==null)return 0;if(Xl(e))return wu(e)?ir(e):e.length;var t=zo(e);return t==ae||t==le?e.size:Ki(e).length}function pl(e,t,r){var i=Y(e)?bn:_a;return r&&Yo(e,t,r)&&(t=n),i(e,q(t,3))}var ml=K(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Yo(e,t[0],t[1])?t=[]:n>2&&Yo(t[0],t[1],t[2])&&(t=[t[0]]),ta(e,vi(t,1),[])}),hl=kt||function(){return Zt.Date.now()};function gl(e,t){if(typeof t!=`function`)throw new st(r);return e=X(e),function(){if(--e<1)return t.apply(this,arguments)}}function _l(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,bo(e,f,n,n,n,n,t)}function vl(e,t){var i;if(typeof t!=`function`)throw new st(r);return e=X(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var yl=K(function(e,t,n){var r=o;if(n.length){var i=$n(n,Mo(yl));r|=u}return bo(e,r,t,n,i)}),bl=K(function(e,t,n){var r=o|s;if(n.length){var i=$n(n,Mo(bl));r|=u}return bo(t,r,e,n,i)});function xl(e,t,r){t=r?n:t;var i=bo(e,c,n,n,n,n,n,t);return i.placeholder=xl.placeholder,i}function Sl(e,t,r){t=r?n:t;var i=bo(e,l,n,n,n,n,n,t);return i.placeholder=Sl.placeholder,i}function Cl(e,t,i){var a,o,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new st(r);t=Fu(t)||0,uu(i)&&(f=!!i.leading,p=`maxWait`in i,s=p?zt(Fu(i.maxWait)||0,t):s,m=`trailing`in i?!!i.trailing:m);function h(t){var r=a,i=o;return a=o=n,d=t,c=e.apply(i,r),c}function g(e){return d=e,l=ps(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?Ut(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=hl();if(v(e))return b(e);l=ps(y,_(e))}function b(e){return l=n,m&&a?h(e):(a=o=n,c)}function x(){l!==n&&Fa(l),d=0,a=u=o=l=n}function ee(){return l===n?c:b(hl())}function S(){var e=hl(),r=v(e);if(a=arguments,o=this,u=e,r){if(l===n)return g(u);if(p)return Fa(l),l=ps(y,t),h(u)}return l===n&&(l=ps(y,t)),c}return S.cancel=x,S.flush=ee,S}var wl=K(function(e,t){return ui(e,1,t)}),Tl=K(function(e,t,n){return ui(e,Fu(t)||0,n)});function El(e){return bo(e,m)}function Dl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new st(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Dl.Cache||Pr),n}Dl.Cache=Pr;function Ol(e){if(typeof e!=`function`)throw new st(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function kl(e){return vl(2,e)}var Al=Na(function(e,t){t=t.length==1&&Y(t[0])?gn(t[0],Rn(q())):gn(vi(t,1),Rn(q()));var n=t.length;return K(function(r){for(var i=-1,a=Ut(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return ln(e,this,r)})}),jl=K(function(e,t){return bo(e,u,n,t,$n(t,Mo(jl)))}),Ml=K(function(e,t){return bo(e,d,n,t,$n(t,Mo(Ml)))}),Nl=Do(function(e,t){return bo(e,p,n,n,n,t)});function Pl(e,t){if(typeof e!=`function`)throw new st(r);return t=t===n?t:X(t),K(e,t)}function Fl(e,t){if(typeof e!=`function`)throw new st(r);return t=t==null?0:zt(X(t),0),K(function(n){var r=n[t],i=Pa(n,0,t);return r&&_n(i,r),ln(e,this,i)})}function Il(e,t,n){var i=!0,a=!0;if(typeof e!=`function`)throw new st(r);return uu(n)&&(i=`leading`in n?!!n.leading:i,a=`trailing`in n?!!n.trailing:a),Cl(e,t,{leading:i,maxWait:t,trailing:a})}function Ll(e){return _l(e,1)}function Rl(e,t){return jl(ja(t),e)}function zl(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function Bl(e){return ci(e,4)}function Vl(e,t){return t=typeof t==`function`?t:n,ci(e,4,t)}function Hl(e){return ci(e,5)}function Ul(e,t){return t=typeof t==`function`?t:n,ci(e,5,t)}function Wl(e,t){return t==null||G(e,t,sd(t))}function Gl(e,t){return e===t||e!==e&&t!==t}var Kl=ho(Di),ql=ho(function(e,t){return e>=t}),Jl=Pi(function(){return arguments}())?Pi:function(e){return du(e)&&P.call(e,`callee`)&&!wt.call(e,`callee`)},Y=Re.isArray,Yl=nn?Rn(nn):Fi;function Xl(e){return e!=null&&lu(e.length)&&!su(e)}function Zl(e){return du(e)&&Xl(e)}function Ql(e){return e===!0||e===!1||du(e)&&Ei(e)==te}var $l=Pt||Mf,eu=rn?Rn(rn):Ii;function tu(e){return du(e)&&e.nodeType===1&&!bu(e)}function nu(e){if(e==null)return!0;if(Xl(e)&&(Y(e)||typeof e==`string`||typeof e.splice==`function`||$l(e)||Eu(e)||Jl(e)))return!e.length;var t=zo(e);if(t==ae||t==le)return!e.size;if(ts(e))return!Ki(e).length;for(var n in e)if(P.call(e,n))return!1;return!0}function ru(e,t){return Li(e,t)}function iu(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?Li(e,t,n,r):!!i}function au(e){if(!du(e))return!1;var t=Ei(e);return t==E||t==T||typeof e.message==`string`&&typeof e.name==`string`&&!bu(e)}function ou(e){return typeof e==`number`&&Lt(e)}function su(e){if(!uu(e))return!1;var t=Ei(e);return t==re||t==ie||t==w||t==se}function cu(e){return typeof e==`number`&&e==X(e)}function lu(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=g}function uu(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function du(e){return typeof e==`object`&&!!e}var fu=an?Rn(an):zi;function pu(e,t){return e===t||Bi(e,t,Po(t))}function mu(e,t,r){return r=typeof r==`function`?r:n,Bi(e,t,Po(t),r)}function hu(e){return yu(e)&&e!=+e}function gu(e){if(es(e))throw new tt(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return Vi(e)}function _u(e){return e===null}function vu(e){return e==null}function yu(e){return typeof e==`number`||du(e)&&Ei(e)==D}function bu(e){if(!du(e)||Ei(e)!=k)return!1;var t=St(e);if(t===null)return!0;var n=P.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&ft.call(n)==gt}var xu=on?Rn(on):Hi;function Su(e){return cu(e)&&e>=-g&&e<=g}var Cu=sn?Rn(sn):Ui;function wu(e){return typeof e==`string`||!Y(e)&&du(e)&&Ei(e)==ue}function Tu(e){return typeof e==`symbol`||du(e)&&Ei(e)==de}var Eu=cn?Rn(cn):Wi;function Du(e){return e===n}function Ou(e){return du(e)&&zo(e)==pe}function ku(e){return du(e)&&Ei(e)==me}var Au=ho(Ji),ju=ho(function(e,t){return e<=t});function Mu(e){if(!e)return[];if(Xl(e))return wu(e)?ar(e):Ka(e);if(Dt&&e[Dt])return Xn(e[Dt]());var t=zo(e);return(t==ae?Zn:t==le?er:Ed)(e)}function Nu(e){return e?(e=Fu(e),e===h||e===-1/0?(e<0?-1:1)*_:e===e?e:0):e===0?e:0}function X(e){var t=Nu(e),n=t%1;return t===t?n?t-n:t:0}function Pu(e){return e?si(X(e),0,y):0}function Fu(e){if(typeof e==`number`)return e;if(Tu(e))return v;if(uu(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=uu(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Ln(e);var n=Je.test(e);return n||Xe.test(e)?Jt(e.slice(2),n?2:8):qe.test(e)?v:+e}function Iu(e){return qa(e,cd(e))}function Lu(e){return e?si(X(e),-g,g):e===0?e:0}function Ru(e){return e==null?``:Sa(e)}var zu=Za(function(e,t){if(ts(t)||Xl(t))qa(t,sd(t),e);else for(var n in t)P.call(t,n)&&ei(e,n,t[n])}),Bu=Za(function(e,t){qa(t,cd(t),e)}),Vu=Za(function(e,t,n,r){qa(t,cd(t),e,r)}),Hu=Za(function(e,t,n,r){qa(t,sd(t),e,r)}),Uu=Do(oi);function Wu(e,t){var n=gr(e);return t==null?n:ri(n,t)}var Gu=K(function(e,t){e=it(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&Yo(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=cd(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===n||Gl(d,ut[u])&&!P.call(e,u))&&(e[u]=o[u])}return e}),Ku=K(function(e){return e.push(n,So),ln(fd,n,e)});function qu(e,t){return wn(e,q(t,3),xi)}function Ju(e,t){return wn(e,q(t,3),Si)}function Yu(e,t){return e==null?e:yi(e,q(t,3),cd)}function Xu(e,t){return e==null?e:bi(e,q(t,3),cd)}function Zu(e,t){return e&&xi(e,q(t,3))}function Qu(e,t){return e&&Si(e,q(t,3))}function $u(e){return e==null?[]:Ci(e,sd(e))}function ed(e){return e==null?[]:Ci(e,cd(e))}function td(e,t,r){var i=e==null?n:wi(e,t);return i===n?r:i}function nd(e,t){return e!=null&&Ho(e,t,Oi)}function rd(e,t){return e!=null&&Ho(e,t,ki)}var id=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=ht.call(t)),e[t]=n},uf(mf)),ad=co(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=ht.call(t)),P.call(e,t)?e[t].push(n):e[t]=[n]},q),od=K(Ni);function sd(e){return Xl(e)?Yr(e):Ki(e)}function cd(e){return Xl(e)?Yr(e,!0):qi(e)}function ld(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ai(n,t(e,r,i),e)}),n}function ud(e,t){var n={};return t=q(t,3),xi(e,function(e,r,i){ai(n,r,t(e,r,i))}),n}var dd=Za(function(e,t,n){Qi(e,t,n)}),fd=Za(function(e,t,n,r){Qi(e,t,n,r)}),pd=Do(function(e,t){var n={};if(e==null)return n;var r=!1;t=gn(t,function(t){return t=Ma(t,e),r||=t.length>1,t}),qa(e,ko(e),n),r&&(n=ci(n,7,Co));for(var i=t.length;i--;)wa(n,t[i]);return n});function md(e,t){return gd(e,Ol(q(t)))}var hd=Do(function(e,t){return e==null?{}:na(e,t)});function gd(e,t){if(e==null)return{};var n=gn(ko(e),function(e){return[e]});return t=q(t),ra(e,n,function(e,n){return t(e,n[0])})}function _d(e,t,r){t=Ma(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++i<a;){var o=e==null?n:e[ys(t[i])];o===n&&(i=a,o=r),e=su(o)?o.call(e):o}return e}function vd(e,t,n){return e==null?e:fa(e,t,n)}function yd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:fa(e,t,r,i)}var bd=yo(sd),xd=yo(cd);function Sd(e,t,n){var r=Y(e),i=r||$l(e)||Eu(e);if(t=q(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:uu(e)&&su(a)?gr(St(e)):{}}return(i?V:xi)(e,function(e,r,i){return t(n,e,r,i)}),n}function Cd(e,t){return e==null||wa(e,t)}function wd(e,t,n){return e==null?e:Ta(e,t,ja(n))}function Td(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Ta(e,t,ja(r),i)}function Ed(e){return e==null?[]:zn(e,sd(e))}function Dd(e){return e==null?[]:zn(e,cd(e))}function Od(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=Fu(r),r=r===r?r:0),t!==n&&(t=Fu(t),t=t===t?t:0),si(Fu(e),t,r)}function kd(e,t,r){return t=Nu(t),r===n?(r=t,t=0):r=Nu(r),e=Fu(e),Ai(e,t,r)}function Ad(e,t,r){if(r&&typeof r!=`boolean`&&Yo(e,t,r)&&(t=r=n),r===n&&(typeof t==`boolean`?(r=t,t=n):typeof e==`boolean`&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Nu(e),t===n?(t=e,e=0):t=Nu(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var a=Kt();return Ut(e+a*(t-e+qt(`1e-`+((a+``).length-1))),t)}return sa(e,t)}var jd=no(function(e,t,n){return t=t.toLowerCase(),e+(n?Md(t):t)});function Md(e){return of(Ru(e).toLowerCase())}function Nd(e){return e=Ru(e),e&&e.replace(Qe,Wn).replace(It,``)}function Pd(e,t,r){e=Ru(e),t=Sa(t);var i=e.length;r=r===n?i:si(X(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function Fd(e){return e=Ru(e),e&&Ae.test(e)?e.replace(A,Gn):e}function Id(e){return e=Ru(e),e&&Ie.test(e)?e.replace(Fe,`\\$&`):e}var Ld=no(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),Rd=no(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),zd=to(`toLowerCase`);function Bd(e,t,n){e=Ru(e),t=X(t);var r=t?ir(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return fo(Mt(i),n)+e+fo(jt(i),n)}function Vd(e,t,n){e=Ru(e),t=X(t);var r=t?ir(e):0;return t&&r<t?e+fo(t-r,n):e}function Hd(e,t,n){e=Ru(e),t=X(t);var r=t?ir(e):0;return t&&r<t?fo(t-r,n)+e:e}function Ud(e,t,n){return n||t==null?t=0:t&&=+t,Gt(Ru(e).replace(Le,``),t||0)}function Wd(e,t,r){return t=(r?Yo(e,t,r):t===n)?1:X(t),la(Ru(e),t)}function Gd(){var e=arguments,t=Ru(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Kd=no(function(e,t,n){return e+(n?`_`:``)+t.toLowerCase()});function qd(e,t,r){return r&&typeof r!=`number`&&Yo(e,t,r)&&(t=r=n),r=r===n?y:r>>>0,r?(e=Ru(e),e&&(typeof t==`string`||t!=null&&!xu(t))&&(t=Sa(t),!t&&Jn(e))?Pa(ar(e),0,r):e.split(t,r)):[]}var Jd=no(function(e,t,n){return e+(n?` `:``)+of(t)});function Yd(e,t,n){return e=Ru(e),n=n==null?0:si(X(n),0,e.length),t=Sa(t),e.slice(n,n+t.length)==t}function Xd(e,t,r){var i=U.templateSettings;r&&Yo(e,t,r)&&(t=n),e=Ru(e),t=Hu({},t,i,xo);var a=Hu({},t.imports,i.imports,xo),o=sd(a),s=zn(a,o);V(o,function(e){if(Ue.test(e))throw new tt("Invalid `imports` option passed into `_.template`")});var c,l,u=0,d=t.interpolate||$e,f=`__p += '`,p=at((t.escape||$e).source+`|`+d.source+`|`+(d===Me?Ge:$e).source+`|`+(t.evaluate||$e).source+`|$`,`g`),m=`//# sourceURL=`+(P.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++Vt+`]`)+`
|
|
6
|
+
`;e.replace(p,function(t,n,r,i,a,o){return r||=i,f+=e.slice(u,o).replace(et,Kn),n&&(c=!0,f+=`' +
|
|
7
7
|
__e(`+n+`) +
|
|
8
8
|
'`),a&&(l=!0,f+=`';
|
|
9
9
|
`+a+`;
|
|
10
10
|
__p += '`),r&&(f+=`' +
|
|
11
11
|
((__t = (`+r+`)) == null ? '' : __t) +
|
|
12
12
|
'`),u=o+t.length,t}),f+=`';
|
|
13
|
-
`;var h=
|
|
13
|
+
`;var h=P.call(t,`variable`)&&t.variable;if(!h)f=`with (obj) {
|
|
14
14
|
`+f+`
|
|
15
15
|
}
|
|
16
|
-
`;else if(
|
|
16
|
+
`;else if(Ue.test(h))throw new tt("Invalid `variable` option passed into `_.template`");f=(l?f.replace(Ee,``):f).replace(De,`$1`).replace(Oe,`$1;`),f=`function(`+(h||`obj`)+`) {
|
|
17
17
|
`+(h?``:`obj || (obj = {});
|
|
18
18
|
`)+`var __t, __p = ''`+(c?`, __e = _.escape`:``)+(l?`, __j = Array.prototype.join;
|
|
19
19
|
function print() { __p += __j.call(arguments, '') }
|
|
20
20
|
`:`;
|
|
21
21
|
`)+f+`return __p
|
|
22
|
-
}`;var g=sf(function(){return tt(o,m+`return `+f).apply(n,s)});if(g.source=f,au(g))throw g;return g}function Zd(e){return Ru(e).toLowerCase()}function Qd(e){return Ru(e).toUpperCase()}function $d(e,t,r){if(e=Ru(e),e&&(r||t===n))return In(e);if(!e||!(t=Sa(t)))return e;var i=ir(e),a=ir(t);return Pa(i,Bn(i,a),Vn(i,a)+1).join(``)}function ef(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.slice(0,ar(e)+1);if(!e||!(t=Sa(t)))return e;var i=ir(e);return Pa(i,0,Vn(i,ir(t))+1).join(``)}function tf(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.replace(Ie,``);if(!e||!(t=Sa(t)))return e;var i=ir(e);return Pa(i,Bn(i,ir(t))).join(``)}function nf(e,t){var r=30,i=`...`;if(uu(t)){var a=`separator`in t?t.separator:a;r=`length`in t?X(t.length):r,i=`omission`in t?Sa(t.omission):i}e=Ru(e);var o=e.length;if(qn(e)){var s=ir(e);o=s.length}if(r>=o)return e;var c=r-rr(i);if(c<1)return i;var l=s?Pa(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),xu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=it(a.source,Ru(Ge.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Sa(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function rf(e){return e=Ru(e),e&&M.test(e)?e.replace(Oe,or):e}var af=no(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),of=to(`toUpperCase`);function Z(e,t,r){return e=Ru(e),t=r?n:t,t===n?Jn(e)?U(e):Sn(e):e.match(t)||[]}var sf=K(function(e,t){try{return cn(e,n,t)}catch(e){return au(e)?e:new et(e)}}),cf=Do(function(e,t){return H(t,function(t){t=ys(t),ii(e,t,yl(e[t],e))}),e});function Q(e){var t=e==null?0:e.length,n=q();return e=t?hn(e,function(e){if(typeof e[1]!=`function`)throw new ot(r);return[n(e[0]),e[1]]}):[],K(function(n){for(var r=-1;++r<t;){var i=e[r];if(cn(i[0],this,n))return cn(i[1],this,n)}})}function lf(e){return ci(si(e,1))}function uf(e){return function(){return e}}function df(e,t){return e==null||e!==e?t:e}var ff=oo(),pf=oo(!0);function mf(e){return e}function hf(e){return Gi(typeof e==`function`?e:si(e,1))}function gf(e){return Xi(si(e,1))}function _f(e,t){return Zi(e,si(t,1))}var vf=K(function(e,t){return function(n){return Ni(n,e,t)}}),yf=K(function(e,t){return function(n){return Ni(e,n,t)}});function bf(e,t,n){var r=sd(t),i=Ci(t,r);n==null&&(!uu(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ci(t,sd(t)));var a=!(uu(n)&&`chain`in n)||!!n.chain,o=su(e);return H(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Ka(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,gn([this.value()],arguments))})}),e}function xf(){return Xt._===this&&(Xt._=I),this}function Sf(){}function Cf(e){return e=X(e),K(function(t){return ea(t,e)})}var wf=uo(hn),Tf=uo(dn),Ef=uo(yn);function Df(e){return Xo(e)?kn(ys(e)):ia(e)}function Of(e){return function(t){return e==null?n:wi(e,t)}}var kf=mo(),Af=mo(!0);function jf(){return[]}function Mf(){return!1}function Nf(){return{}}function Pf(){return``}function Ff(){return!0}function If(e,t){if(e=X(e),e<1||e>g)return[];var n=y,r=Ht(e,y);t=q(t),e-=y;for(var i=Pn(r,t);++n<e;)t(n);return i}function Lf(e){return Y(e)?hn(e,ys):Tu(e)?[e]:Ka(vs(Ru(e)))}function Rf(e){var t=++ft;return Ru(e)+t}var zf=lo(function(e,t){return e+t},0),Bf=_o(`ceil`),Vf=lo(function(e,t){return e/t},1),Hf=_o(`floor`);function Uf(e){return e&&e.length?hi(e,mf,Di):n}function Wf(e,t){return e&&e.length?hi(e,q(t,2),Di):n}function Gf(e){return On(e,mf)}function Kf(e,t){return On(e,q(t,2))}function qf(e){return e&&e.length?hi(e,mf,Ji):n}function Jf(e,t){return e&&e.length?hi(e,q(t,2),Ji):n}var Yf=lo(function(e,t){return e*t},1),Xf=_o(`round`),Zf=lo(function(e,t){return e-t},0);function Qf(e){return e&&e.length?Nn(e,mf):0}function $f(e,t){return e&&e.length?Nn(e,q(t,2)):0}return W.after=gl,W.ary=_l,W.assign=zu,W.assignIn=Bu,W.assignInWith=Vu,W.assignWith=Hu,W.at=Uu,W.before=vl,W.bind=yl,W.bindAll=cf,W.bindKey=bl,W.castArray=zl,W.chain=Mc,W.chunk=Cs,W.compact=ws,W.concat=Ts,W.cond=Q,W.conforms=lf,W.constant=uf,W.countBy=Uc,W.create=Wu,W.curry=xl,W.curryRight=Sl,W.debounce=Cl,W.defaults=Gu,W.defaultsDeep=Ku,W.defer=wl,W.delay=Tl,W.difference=Es,W.differenceBy=Ds,W.differenceWith=Os,W.drop=ks,W.dropRight=As,W.dropRightWhile=js,W.dropWhile=Ms,W.fill=Ns,W.filter=Gc,W.flatMap=Jc,W.flatMapDeep=Yc,W.flatMapDepth=Xc,W.flatten=Is,W.flattenDeep=Ls,W.flattenDepth=Rs,W.flip=El,W.flow=ff,W.flowRight=pf,W.fromPairs=zs,W.functions=$u,W.functionsIn=ed,W.groupBy=$c,W.initial=Hs,W.intersection=Us,W.intersectionBy=Ws,W.intersectionWith=Gs,W.invert=id,W.invertBy=ad,W.invokeMap=tl,W.iteratee=hf,W.keyBy=nl,W.keys=sd,W.keysIn=cd,W.map=rl,W.mapKeys=ld,W.mapValues=ud,W.matches=gf,W.matchesProperty=_f,W.memoize=Dl,W.merge=dd,W.mergeWith=fd,W.method=vf,W.methodOf=yf,W.mixin=bf,W.negate=Ol,W.nthArg=Cf,W.omit=pd,W.omitBy=md,W.once=kl,W.orderBy=il,W.over=wf,W.overArgs=Al,W.overEvery=Tf,W.overSome=Ef,W.partial=jl,W.partialRight=Ml,W.partition=al,W.pick=hd,W.pickBy=gd,W.property=Df,W.propertyOf=Of,W.pull=Xs,W.pullAll=Zs,W.pullAllBy=Qs,W.pullAllWith=$s,W.pullAt=ec,W.range=kf,W.rangeRight=Af,W.rearg=Nl,W.reject=cl,W.remove=tc,W.rest=Pl,W.reverse=nc,W.sampleSize=ul,W.set=vd,W.setWith=yd,W.shuffle=dl,W.slice=rc,W.sortBy=ml,W.sortedUniq=uc,W.sortedUniqBy=dc,W.split=qd,W.spread=Fl,W.tail=J,W.take=fc,W.takeRight=pc,W.takeRightWhile=mc,W.takeWhile=hc,W.tap=Nc,W.throttle=Il,W.thru=Pc,W.toArray=Mu,W.toPairs=bd,W.toPairsIn=xd,W.toPath=Lf,W.toPlainObject=Iu,W.transform=Sd,W.unary=Ll,W.union=gc,W.unionBy=_c,W.unionWith=vc,W.uniq=yc,W.uniqBy=bc,W.uniqWith=xc,W.unset=Cd,W.unzip=Sc,W.unzipWith=Cc,W.update=wd,W.updateWith=Td,W.values=Ed,W.valuesIn=Dd,W.without=wc,W.words=Z,W.wrap=Rl,W.xor=Tc,W.xorBy=Ec,W.xorWith=Dc,W.zip=Oc,W.zipObject=kc,W.zipObjectDeep=Ac,W.zipWith=jc,W.entries=bd,W.entriesIn=xd,W.extend=Bu,W.extendWith=Vu,bf(W,W),W.add=zf,W.attempt=sf,W.camelCase=jd,W.capitalize=Md,W.ceil=Bf,W.clamp=Od,W.clone=Bl,W.cloneDeep=Hl,W.cloneDeepWith=Ul,W.cloneWith=Vl,W.conformsTo=Wl,W.deburr=Nd,W.defaultTo=df,W.divide=Vf,W.endsWith=Pd,W.eq=Gl,W.escape=Fd,W.escapeRegExp=Id,W.every=Wc,W.find=Kc,W.findIndex=Ps,W.findKey=qu,W.findLast=qc,W.findLastIndex=Fs,W.findLastKey=Ju,W.floor=Hf,W.forEach=Zc,W.forEachRight=Qc,W.forIn=Yu,W.forInRight=Xu,W.forOwn=Zu,W.forOwnRight=Qu,W.get=td,W.gt=Kl,W.gte=ql,W.has=nd,W.hasIn=rd,W.head=Bs,W.identity=mf,W.includes=el,W.indexOf=Vs,W.inRange=kd,W.invoke=od,W.isArguments=Jl,W.isArray=Y,W.isArrayBuffer=Yl,W.isArrayLike=Xl,W.isArrayLikeObject=Zl,W.isBoolean=Ql,W.isBuffer=$l,W.isDate=eu,W.isElement=tu,W.isEmpty=nu,W.isEqual=ru,W.isEqualWith=iu,W.isError=au,W.isFinite=ou,W.isFunction=su,W.isInteger=cu,W.isLength=lu,W.isMap=fu,W.isMatch=pu,W.isMatchWith=mu,W.isNaN=hu,W.isNative=gu,W.isNil=vu,W.isNull=_u,W.isNumber=yu,W.isObject=uu,W.isObjectLike=du,W.isPlainObject=bu,W.isRegExp=xu,W.isSafeInteger=Su,W.isSet=Cu,W.isString=wu,W.isSymbol=Tu,W.isTypedArray=Eu,W.isUndefined=Du,W.isWeakMap=Ou,W.isWeakSet=ku,W.join=Ks,W.kebabCase=Ld,W.last=qs,W.lastIndexOf=Js,W.lowerCase=Rd,W.lowerFirst=zd,W.lt=Au,W.lte=ju,W.max=Uf,W.maxBy=Wf,W.mean=Gf,W.meanBy=Kf,W.min=qf,W.minBy=Jf,W.stubArray=jf,W.stubFalse=Mf,W.stubObject=Nf,W.stubString=Pf,W.stubTrue=Ff,W.multiply=Yf,W.nth=Ys,W.noConflict=xf,W.noop=Sf,W.now=hl,W.pad=Bd,W.padEnd=Vd,W.padStart=Hd,W.parseInt=Ud,W.random=Ad,W.reduce=ol,W.reduceRight=sl,W.repeat=Wd,W.replace=Gd,W.result=_d,W.round=Xf,W.runInContext=e,W.sample=ll,W.size=fl,W.snakeCase=Kd,W.some=pl,W.sortedIndex=ic,W.sortedIndexBy=ac,W.sortedIndexOf=oc,W.sortedLastIndex=sc,W.sortedLastIndexBy=cc,W.sortedLastIndexOf=lc,W.startCase=Jd,W.startsWith=Yd,W.subtract=Zf,W.sum=Qf,W.sumBy=$f,W.template=Xd,W.times=If,W.toFinite=Nu,W.toInteger=X,W.toLength=Pu,W.toLower=Zd,W.toNumber=Fu,W.toSafeInteger=Lu,W.toString=Ru,W.toUpper=Qd,W.trim=$d,W.trimEnd=ef,W.trimStart=tf,W.truncate=nf,W.unescape=rf,W.uniqueId=Rf,W.upperCase=af,W.upperFirst=of,W.each=Zc,W.eachRight=Qc,W.first=Bs,bf(W,function(){var e={};return xi(W,function(t,n){F.call(W.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),W.VERSION=`4.18.1`,H([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){W[e].placeholder=W}),H([`drop`,`take`],function(e,t){vr.prototype[e]=function(r){r=r===n?1:Rt(X(r),0);var i=this.__filtered__&&!t?new vr(this):this.clone();return i.__filtered__?i.__takeCount__=Ht(r,i.__takeCount__):i.__views__.push({size:Ht(r,y),type:e+(i.__dir__<0?`Right`:``)}),i},vr.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),H([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==1||n==3;vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:q(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),H([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);vr.prototype[e]=function(){return this[n](1).value()[0]}}),H([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);vr.prototype[e]=function(){return this.__filtered__?new vr(this):this[n](1)}}),vr.prototype.compact=function(){return this.filter(mf)},vr.prototype.find=function(e){return this.filter(e).head()},vr.prototype.findLast=function(e){return this.reverse().find(e)},vr.prototype.invokeMap=K(function(e,t){return typeof e==`function`?new vr(this):this.map(function(n){return Ni(n,e,t)})}),vr.prototype.reject=function(e){return this.filter(Ol(q(e)))},vr.prototype.slice=function(e,t){e=X(e);var r=this;return r.__filtered__&&(e>0||t<0)?new vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=X(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vr.prototype.toArray=function(){return this.take(y)},xi(vr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=W[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(W.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof vr,l=s[0],u=c||Y(t),d=function(e){var t=a.apply(W,gn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new vr(this);var g=e.apply(t,s);return g.__actions__.push({func:Pc,args:[d],thisArg:n}),new _r(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),H([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);W.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Y(i)?i:[],e)}return this[n](function(n){return t.apply(Y(n)?n:[],e)})}}),xi(vr.prototype,function(e,t){var n=W[t];if(n){var r=n.name+``;F.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}}),An[so(n,s).name]=[{name:`wrapper`,func:n}],vr.prototype.clone=yr,vr.prototype.reverse=br,vr.prototype.value=xr,W.prototype.at=Fc,W.prototype.chain=Ic,W.prototype.commit=Lc,W.prototype.next=Rc,W.prototype.plant=Bc,W.prototype.reverse=Vc,W.prototype.toJSON=W.prototype.valueOf=W.prototype.value=Hc,W.prototype.first=W.prototype.head,Et&&(W.prototype[Et]=zc),W})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(Xt._=lr,define(function(){return lr})):Qt?((Qt.exports=lr)._=lr,Zt._=lr):Xt._=lr}).call(n)}))(),1).default.throttle((e,t)=>e(t),200),Ns=(e,t)=>{let n=t.find(t=>t.name===e);return{card:n,index:n?t.indexOf(n):-1}},Ps=(e,t,n,r,i,a)=>{let{card:o,index:s}=Ns(e,n);if(s!==t&&!(s<t&&i<a)&&!(s>t&&i>a)&&o&&s!==t){let e=JSON.parse(JSON.stringify(n));e.splice(s,1),e.splice(t,0,o),Ms(r,e)}},Fs={cursor:`move`},Is=({canDrag:e,setEndDrag:t,iconJSX:n,selected:r,compact:i,badgeContent:a,badgeColor:o,tab:s,tabs:c,setTabs:l,_id:u,children:d,name:f})=>{let p=F(null),[{handlerId:m},h]=ao({accept:`box`,collect(e){return{handlerId:e.getHandlerId()}},hover({_id:e},t){if(!p.current)return;let{index:n}=Ns(u,c),r=p.current.getBoundingClientRect(),i=(r.bottom-r.top)/2,a=t.getClientOffset();a&&Ps(e,n,c,l,a.y-r.top,i)}}),[{isDragging:g},_,v]=Xa({type:`box`,item:{_id:s.name,...s,iconJSX:n,selected:r,compact:i,badgeContent:a,badgeColor:o},canDrag:()=>e,end:()=>t(),collect:e=>({isDragging:e.isDragging()})});Yt(()=>{v(Po(),{captureDraggingState:!0})},[]);let y=+!g;return Yt(()=>{_(h(p))},[_,h]),E(`div`,{ref:p,style:{...Fs,opacity:y},"data-handler-id":m,children:E(`a`,{type:`box`,"data-handler-id":m,onClick:e=>e.preventDefault(),href:`/#${f}`,style:{...Fs,opacity:y,color:`inherit`,textDecoration:`none`},children:d})})},Ls=y(E(`path`,{d:`M20 9H4v2h16zM4 15h16v-2H4z`}),`DragHandle`),Rs=24,zs=e=>e.palette.mode===`light`?`white`:U.invertColor(e.palette.primary.main,!0),Bs={button:{mx:`4px`,borderRadius:`8px`,minHeight:40},selected:e=>({background:`linear-gradient(90deg, ${e.palette.primary.light} 0%, ${e.palette.primary.main} 100%)`,color:zs(e),"&:hover":{background:`linear-gradient(90deg, ${e.palette.primary.light} 0%, ${e.palette.primary.dark} 100%)`,color:zs(e)}}),selectedIcon:e=>({color:zs(e)}),compact:{px:`4px`},row:{display:`flex`,alignItems:`center`,flexWrap:`nowrap`,gap:`8px`,width:`100%`,minHeight:40},rowCompact:{justifyContent:`center`},badgeCompact:{"& .MuiBadge-badge:not(.MuiBadge-invisible)":{transform:`translate(-35%, -50%)`}},icon:{display:`flex`,alignItems:`center`,justifyContent:`center`},text:{m:0,"& .MuiTypography-root":{display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`center`,lineHeight:1.2}},secondary:{lineHeight:1.1,opacity:.75},warn:{backgroundColor:`#ffc107`},nativeItem:{border:`1px solid rgba(96, 189, 255, 0.16)`,background:`linear-gradient(180deg, rgba(13, 34, 53, 0.86), rgba(6, 19, 32, 0.92))`,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.04)`,transition:`transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease`,"&:hover":{transform:`translateY(-1px)`,borderColor:`rgba(0, 255, 136, 0.28)`,background:`linear-gradient(180deg, rgba(17, 44, 66, 0.94), rgba(7, 22, 36, 0.96))`,boxShadow:`0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,255,136,.06)`}},nativeSelected:{borderColor:`rgba(0, 255, 136, 0.48)`,background:`linear-gradient(135deg, rgba(0,255,136,.17), rgba(0,212,255,.10))`,boxShadow:`0 0 22px rgba(0,255,136,.09), inset 0 0 0 1px rgba(0,255,136,.11)`}},Vs=e=>{let{tabName:t,badgeColor:n,badgeContent:r,compact:i,icon:a,onClick:o,selected:s,text:c,editMenuList:l,visible:u,color:d,editListFunc:f,badgeAdditionalContent:p,badgeAdditionalColor:m,style:h}=e,g=c?c.replace(`>`,`>`):``;return(g===`Text->Kommandos`||g===`Text->Commands`)&&(g=`Text→Cmd`),N(`div`,{style:{display:`flex`,alignItems:`center`,...h||{}},children:[!!l&&E(Ls,{}),!!l&&E(Oe,{checked:u,onClick:()=>f==null?void 0:f(!0)}),!!l&&E(St,{value:d,noInputField:!0,onChange:e=>f==null?void 0:f(!1,e||null)}),E(en,{className:`nexowatt-native-nav-item`,"data-eos-tab":t,"aria-current":s?`page`:void 0,selected:s,sx:Ne.getStyle(e.theme,Bs.button,Bs.nativeItem,s&&Bs.nativeSelected,s&&Bs.selected,i&&Bs.compact),onClick:o,children:E(Lt,{title:i?g:``,slotProps:{popper:{sx:{pointerEvents:`none`}}},children:N(I,{sx:Ne.getStyle(e.theme,Bs.row,i&&Bs.rowCompact),children:[E(Mt,{className:`nexowatt-native-nav-icon-slot`,style:{minWidth:Rs,width:Rs,color:d},sx:Ne.getStyle(e.theme,Bs.icon,s&&Bs.selectedIcon),children:E(at,{badgeContent:r||0,color:(n===`warn`?`default`:n)||`primary`,anchorOrigin:i?{vertical:`top`,horizontal:`left`}:void 0,sx:Ne.getStyle(e.theme,n===`warn`&&{"& .MuiBadge-badge":Bs.warn},i&&Bs.badgeCompact),children:a})}),!i&&N(Jt,{style:{color:d},sx:Bs.text,children:[E(at,{badgeContent:p||0,color:(m===`warn`?`default`:m)||`primary`,sx:m===`warn`?{"& .MuiBadge-badge":Bs.warn}:void 0,children:g}),e.secondaryText?E(R,{component:`div`,variant:`caption`,color:`text.secondary`,sx:Bs.secondary,children:e.secondaryText}):null]})]})})})]})},Hs={position:`fixed`,pointerEvents:`none`,zIndex:100,left:0,top:0,width:`100%`,height:`100%`};function Us(e,t){return[Math.round(e/32)*32,Math.round(t/32)*32]}function Ws(e,t,n){if(!e||!t)return{display:`none`};let{x:r,y:i}=t;n&&(r-=e.x,i-=e.y,[r,i]=Us(r,i),r+=e.x,i+=e.y);let a=`translate(${r}px, ${i}px)`;return{transform:a,WebkitTransform:a}}var Gs={root:e=>({background:e.palette.background.default})};function Ks(e){let{itemType:t,isDragging:n,item:r,initialOffset:i,currentOffset:a}=Za(e=>({item:e.getItem(),itemType:e.getItemType(),initialOffset:e.getInitialSourceClientOffset(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()}));function o(){return t===`box`?E(I,{component:`div`,sx:Gs.root,style:{width:179},children:E(Vs,{visible:r.visible,editListFunc:()=>void 0,compact:r.compact,icon:r.iconJSX,text:r.title,selected:r.selected,badgeContent:r.badgeContent,badgeColor:r.badgeColor,theme:e.theme},r.name)}):null}return n?E(`div`,{style:Hs,children:E(`div`,{style:Ws(i,a),children:o()})}):null}var qs,Js=({editMenuList:e,onClick:t,size:n})=>{let[r,i]=Ht.useState(null),[a,o]=Ht.useState(!1),[s,c]=Ht.useState(void 0);return N(je,{children:[E(A,{size:n||`large`,style:e?{color:`red`}:void 0,onClick:n=>{t(),e?(o(!1),clearTimeout(qs)):(i(n.currentTarget),o(e=>s!==`right`||!e),c(`right`),qs=setTimeout(()=>o(!1),3e3))},title:j.t(`show/hide item`),children:E(Qe,{})}),E(ct,{style:{zIndex:2222},open:a,anchorEl:r,placement:s,transition:!0,children:({TransitionProps:e})=>E(fn,{...e,timeout:350,children:E(Dt,{children:E(R,{style:{padding:16},children:j.t(`You can drag and drop list items for reorder`)})})})})]})},Ys={cockpit:N(je,{children:[E(`rect`,{x:`3.5`,y:`3.5`,width:`7`,height:`7`,rx:`1.7`}),E(`rect`,{x:`13.5`,y:`3.5`,width:`7`,height:`7`,rx:`1.7`}),E(`rect`,{x:`3.5`,y:`13.5`,width:`7`,height:`7`,rx:`1.7`}),E(`rect`,{x:`13.5`,y:`13.5`,width:`7`,height:`7`,rx:`1.7`})]}),modules:N(je,{children:[E(`path`,{d:`M12 3.7 18.7 7.5v8.9L12 20.3 5.3 16.4V7.5L12 3.7Z`}),E(`path`,{d:`M12 3.7V12m6.7-4.5L12 12 5.3 7.5`})]}),services:N(je,{children:[E(`rect`,{x:`4`,y:`4.5`,width:`16`,height:`5`,rx:`2`}),E(`rect`,{x:`4`,y:`14.5`,width:`16`,height:`5`,rx:`2`}),E(`path`,{d:`M8 7h.01M8 17h.01M12 7h5M12 17h5`})]}),datapoints:N(je,{children:[E(`circle`,{cx:`6`,cy:`12`,r:`2.3`}),E(`circle`,{cx:`18`,cy:`6`,r:`2.3`}),E(`circle`,{cx:`18`,cy:`18`,r:`2.3`}),E(`path`,{d:`M8.2 11 15.7 7M8.2 13l7.5 4`})]}),structure:N(je,{children:[E(`rect`,{x:`3.5`,y:`4`,width:`7`,height:`4.5`,rx:`1.4`}),E(`rect`,{x:`13.5`,y:`4`,width:`7`,height:`4.5`,rx:`1.4`}),E(`rect`,{x:`8.5`,y:`15.5`,width:`7`,height:`4.5`,rx:`1.4`}),E(`path`,{d:`M7 8.5v3h10v-3M12 11.5v4`})]}),logs:N(je,{children:[E(`path`,{d:`M5 6.5h14M5 12h8M5 17.5h14`}),E(`path`,{d:`m15.2 10.3 2.1 2.2 3.2-4`})]}),rights:N(je,{children:[E(`path`,{d:`M12 3.5 18.5 6v5.1c0 4.2-2.7 7.3-6.5 9.4-3.8-2.1-6.5-5.2-6.5-9.4V6L12 3.5Z`}),E(`path`,{d:`M9.5 11.8 11 13.3l3.7-3.7`})]}),scripts:E(`path`,{d:`M8.8 7 4.5 12l4.3 5M15.2 7l4.3 5-4.3 5M13.2 5 10.8 19`}),hosts:N(je,{children:[E(`rect`,{x:`4`,y:`4.5`,width:`16`,height:`10`,rx:`2.2`}),E(`path`,{d:`M8 19.5h8M12 14.5v5M7.5 8.5h.01M11 8.5h6`})]}),files:E(`path`,{d:`M4 7.5A2.5 2.5 0 0 1 6.5 5H10l2 2h5.5A2.5 2.5 0 0 1 20 9.5v7a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5v-9Z`}),devices:N(je,{children:[E(`rect`,{x:`4`,y:`5`,width:`16`,height:`14`,rx:`2.4`}),E(`path`,{d:`M8 9h8M8 13h3M15.5 13h.01`})]}),backup:N(je,{children:[E(`path`,{d:`M6 6h10a3 3 0 0 1 3 3v7.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 5 16.5V8a2 2 0 0 1 2-2Z`}),E(`path`,{d:`M9 6V4.5h4V6M9 12.5h6M12 9.5v6`})]}),eos:N(je,{children:[E(`circle`,{cx:`12`,cy:`12`,r:`3.6`}),E(`path`,{d:`M12 3.5v4.2M12 16.3v4.2M3.5 12h4.2M16.3 12h4.2M5.9 5.9l3 3M15.1 15.1l3 3M5.9 18.1l3-3M15.1 8.9l3-3`})]}),default:N(je,{children:[E(`circle`,{cx:`12`,cy:`12`,r:`8`}),E(`path`,{d:`M12 8v4l2.7 2.7`})]})};function Xs({name:e}){return E(`span`,{className:`nexowatt-native-nav-icon eos-native-nav-icon eos-native-nav-icon-source`,"aria-hidden":`true`,children:E(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,children:Ys[e]||Ys.default})})}var Zs=`App.configManagerPinnedInstances`,Qs=`config-manager-pins-changed`;function $s(){return window._localStorage||window.localStorage}function ec(){try{let e=JSON.parse($s().getItem(`App.configManagerPinnedInstances`)||`[]`);return Array.isArray(e)?e.filter((t,n)=>typeof t==`string`&&e.indexOf(t)===n):[]}catch{return[]}}function tc(e){$s().setItem(Zs,JSON.stringify([...new Set(e)])),window.dispatchEvent(new CustomEvent(Qs))}function nc(e){return ec().includes(e)}function rc(e,t){let n=ec().filter(t=>t!==e);t&&n.push(e),tc(n)}var ic=[2e3,5e3,1e4];function ac(e){return ic[Math.min(Math.max(e,0),ic.length-1)]}function oc(e){return(e instanceof Error?e.message:String(e)).includes(`permissionError`)}x();var sc=10,cc=300,lc=2e3;function uc(e){return e.substring(0,1).toUpperCase()+e.substring(1).toLowerCase()}var dc={root:e=>({flexShrink:0,transition:e.transitions.create(`width`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),display:`flex`,flexDirection:`column`}),rootFullWidth:{width:180},rootEditWidth:{width:250},rootCompactWidth:{width:50},paper:{width:`inherit`,overflowX:`hidden`,overflowY:`hidden`},header:e=>({display:`flex`,flexDirection:`row`,alignItems:`center`,padding:`0 8px 0 8px`,...e.mixins.toolbar,justifyContent:`flex-end`,position:`sticky`,top:0,zIndex:2,background:`inherit`}),headerCompact:{padding:0},filterButton:{flexShrink:0,p:`4px`},filterField:{flexGrow:1,"& .MuiInputBase-input":{fontSize:14}},headerLogout:{justifyContent:`space-between`},list:{paddingTop:0,flex:`1 1 auto`,overflowY:`auto`,overflowX:`hidden`},footer:e=>({flexShrink:0,borderTop:`1px solid ${e.palette.divider}`}),editButton:{position:`sticky`,bottom:0,right:0,width:`fit-content`,marginLeft:`auto`,transition:`opacity 0.5s`},userAvatar:e=>({width:24,height:24,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,overflow:`hidden`,backgroundColor:Ge(e.palette.primary.main,.2),border:`1px solid ${Ge(e.palette.primary.main,.5)}`,color:e.palette.primary.main}),footerButtons:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,alignItems:`center`,p:`2px`},icon:{width:20,height:20},logoSize:{width:50,height:50},brandFrame:{minHeight:52,minWidth:138,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`4px 10px`,borderRadius:14,border:`1px solid rgba(0,255,136,0.22)`,background:`linear-gradient(180deg, rgba(4,14,22,0.96), rgba(3,10,18,0.98))`,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 18px rgba(0,0,0,0.24)`},brandImageWrap:{height:50,width:138,lineHeight:`50px`,display:`flex`,alignItems:`center`},avatarBlock:{width:`100%`,display:`flex`,marginTop:5,marginBottom:5,minWidth:0,overflow:`hidden`},avatarNotVisible:{opacity:0,transition:`opacity 0.3s`},avatarVisible:{opacity:1},styleVersion:e=>({fontSize:10,whiteSpace:`nowrap`,color:e.palette.mode===`dark`?`#ffffff5e`:`#0000005e`,alignSelf:`center`,ml:`5px`})},J={opened:0,closed:1,compact:2},fc={"tab-overview":`Systemstatus`,"tab-intro":`Übersicht`,"tab-adapters":`Module`,"tab-instances":`Dienste`,"tab-objects":`Datenpunkte`,"tab-enums":`Struktur`,"tab-logs":`Systemlogs`,"tab-users":`Zugänge & Rechte`,"tab-javascript":`Skripte`,"tab-hosts":`System-Hosts`,"tab-files":`Dateien`,"tab-devicemanager":`Geräte`},pc={"tab-intro":`cockpit`,"tab-adapters":`modules`,"tab-instances":`services`,"tab-objects":`datapoints`,"tab-enums":`structure`,"tab-logs":`logs`,"tab-users":`rights`,"tab-javascript":`scripts`,"tab-hosts":`hosts`,"tab-files":`files`,"tab-devicemanager":`devices`};function mc(e){let t=e.toLowerCase();return/^tab-(?:nexowatt-ui|nexowatt-eos|eos-cockpit)(?:-|$)/.test(t)?{title:`NexoWatt EOS`,icon:`eos`}:/^tab-backitup(?:-|$)/.test(t)?{title:`System-Notfallsicherung`,icon:`backup`}:/^tab-(?:nexowatt-backup|eos-backup|nexowatt-sicherung)(?:-|$)/.test(t)?{title:`NexoWatt Sicherung`,icon:`backup`}:/^tab-backup(?:-|$)/.test(t)?{title:`Sicherung`,icon:`backup`}:/^tab-(?:javascript)(?:-|$)/.test(t)?{title:`Skripte`,icon:`scripts`}:/^tab-(?:files)(?:-|$)/.test(t)?{title:`Dateien`,icon:`files`}:{}}function hc(e,t){return fc[e]||mc(e).title||t}function gc(e){let t=pc[e]||mc(e).icon;return t?E(Xs,{name:t}):void 0}var _c={"tab-overview":{order:2,icon:E(ws,{}),host:!0},"tab-intro":{order:1,icon:gc(`tab-intro`)},"tab-info":{order:5,host:!0},"tab-adapters":{order:10,icon:gc(`tab-adapters`),host:!0},"tab-instances":{order:15,icon:gc(`tab-instances`),host:!0},"tab-objects":{order:20,icon:gc(`tab-objects`)},"tab-enums":{order:25,icon:gc(`tab-enums`)},"tab-devices":{order:27,host:!0},"tab-logs":{order:30,icon:gc(`tab-logs`),host:!0},"tab-scenes":{order:35},"tab-events":{order:40},"tab-users":{order:45,icon:gc(`tab-users`)},"tab-javascript":{order:50,icon:gc(`tab-javascript`)},"tab-text2command-0":{order:55,instance:0},"tab-text2command-1":{order:56,instance:1},"tab-text2command-2":{order:57,instance:2},"tab-node-red-0":{order:60,instance:0},"tab-node-red-1":{order:61,instance:1},"tab-node-red-2":{order:62,instance:2},"tab-fullcalendar-0":{order:65,instance:0},"tab-fullcalendar-1":{order:66,instance:1},"tab-fullcalendar-2":{order:67,instance:2},"tab-echarts":{order:70,instance:2},"tab-eventlist-0":{order:80,instance:0},"tab-eventlist-1":{order:81,instance:1},"tab-eventlist-2":{order:82,instance:2},"tab-hosts":{order:100,icon:gc(`tab-hosts`)},"tab-files":{order:110,icon:gc(`tab-files`)},"tab-devicemanager":{order:120,icon:gc(`tab-devicemanager`)}},vc=class e extends Qt{static isTransientConnectionError(e){return/notconnected|not connected|connectionerror|close_abnormal|closed_no_status|websocket|timeout|networkerror/i.test(e instanceof Error?e.message:typeof e==`string`?e:``)}constructor(t){super(t),M(this,`logsHandlerRegistered`,!1),M(this,`refEditButton`,Ht.createRef()),M(this,`tabsRun`,0),M(this,`tabsFailures`,0),M(this,`tabsRetryTimer`,null),M(this,`instanceChangesTimer`,null),M(this,`instanceChangesSince`,0),M(this,`systemConfigFailed`,!1),M(this,`unmounted`,!1),M(this,`instanceChangedHandler`,()=>{let e=Date.now();this.instanceChangesTimer?clearTimeout(this.instanceChangesTimer):this.instanceChangesSince=e;let t=Math.min(cc,Math.max(0,this.instanceChangesSince+lc-e));this.instanceChangesTimer=setTimeout(()=>{this.instanceChangesTimer=null,this.getTabs(!0)},t)}),M(this,`connectionHandler`,e=>{e&&this.tabsFailures&&(this.tabsFailures=0,this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null),this.getTabs(!0,!0))}),M(this,`onNotificationsHandler`,()=>this.props.hostsWorker.getNotifications().then(e=>this.calculateWarning(e)).catch(t=>{e.isTransientConnectionError(t)||window.alert(`Cannot get notifications: ${t}`)})),M(this,`onErrorsUpdates`,e=>{this.setState({logErrors:e})}),M(this,`onWarningsUpdates`,e=>{this.setState({logWarnings:e})}),M(this,`calculateWarning`,e=>{if(!e)return;let t={warning:0,other:0};Object.keys(e).forEach(n=>{var r;if((r=e[n])!=null&&(r=r.result)!=null&&r.system&&Object.keys(e[n].result.system.categories).length){let r=e[n].result.system.categories;for(let e of Object.values(r))Object.keys(e.instances).forEach(()=>e.severity===`alert`?t.warning++:t.other++)}}),this.setState({hostNotifications:t})}),M(this,`pinsChangedHandler`,e=>{e instanceof StorageEvent&&e.key&&e.key!==`App.configManagerPinnedInstances`||this.getTabs()}),M(this,`closeFilter`,()=>this.setState({filterOpened:!1,filter:``})),M(this,`tabsEditSystemConfig`,async(e,t,n)=>{let r=JSON.parse(JSON.stringify(this.state.tabs));e!==void 0&&t&&(r[e].visible=!r[e].visible),e!==void 0&&n!==void 0&&(n===null?delete r[e].color:r[e].color=n);let i=JSON.stringify(r.map(({name:e,visible:t,color:n})=>({name:e,visible:t,color:n})));e!==void 0&&(t||n!==void 0)&&this.setState({tabs:r});try{await this.props.socket.setState(this.getTabsLayoutStateId(),i)}catch(r){window.alert(`Cannot save navigation layout: ${r}`),e!==void 0&&(t||n!==void 0)&&this.getTabs(!0)}}),M(this,`badge`,e=>{switch(e.name){case`tab-logs`:{let{logErrors:e,logWarnings:t}=this.state;return{content:e||t||0,color:e?`error`:`warn`}}case`tab-adapters`:return{content:this.state.adaptersUpdate||0,color:`primary`};case`tab-hosts`:return{content:this.state.hostsUpdate||0,color:`primary`,additionalContent:this.state.hostNotifications.warning+this.state.hostNotifications.other,additionalColor:this.state.hostNotifications.warning>0?`error`:`secondary`};default:return{content:0,color:``,additionalContent:0,additionalColor:``}}}),this.state={tabs:[],logErrors:0,logWarnings:0,hostNotifications:{other:0,warning:0},hostsUpdate:e.calculateHostUpdates(this.props.hosts,this.props.repository),adaptersUpdate:e.calculateAdapterUpdates(this.props.installed,this.props.repository),deviceManagerVisible:!1,userMenuAnchor:null,filterOpened:!1,filter:``}}static getDerivedStateFromProps(t,n){let r=e.calculateHostUpdates(t.hosts,t.repository),i=e.calculateAdapterUpdates(t.installed,t.repository);return r!==n.hostsUpdate||i!==n.adaptersUpdate?{hostsUpdate:r,adaptersUpdate:i}:null}static calculateHostUpdates(e,t){if(e&&t){var n;let r=((n=t[`js-controller`])==null?void 0:n.version)||``,i=0;return e.forEach(e=>{U.updateAvailable(e.common.installedVersion,r,`js-controller on ${e._id}`)&&i++}),i}return 0}static calculateAdapterUpdates(e,t){return U.countAdapterUpdates(e,t)}async isDeviceManagerVisible(){let e=await this.props.instancesWorker.getObjects()||{};return!!Object.values(e).find(e=>{var t;return e==null||(t=e.common)==null||(t=t.supportedMessages)==null?void 0:t.deviceManager})}componentDidMount(){this.props.instancesWorker.registerHandler(this.instanceChangedHandler,!0),this.props.socket.registerConnectionHandler(this.connectionHandler),this.getTabs(),window.addEventListener(Qs,this.pinsChangedHandler),window.addEventListener(`storage`,this.pinsChangedHandler),this.onNotificationsHandler().then(()=>{this.props.hostsWorker.registerNotificationHandler(this.onNotificationsHandler),this.logsHandlerRegistered||(this.logsHandlerRegistered=!0,this.props.logsWorker.registerErrorCountHandler(this.onErrorsUpdates),this.props.logsWorker.registerWarningCountHandler(this.onWarningsUpdates))})}componentWillUnmount(){this.unmounted=!0,this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null),this.instanceChangesTimer&&=(clearTimeout(this.instanceChangesTimer),null),this.props.socket.unregisterConnectionHandler(this.connectionHandler),this.props.instancesWorker.unregisterHandler(this.instanceChangedHandler),this.props.hostsWorker.unregisterNotificationHandler(this.onNotificationsHandler),window.removeEventListener(Qs,this.pinsChangedHandler),window.removeEventListener(`storage`,this.pinsChangedHandler),this.logsHandlerRegistered&&(this.logsHandlerRegistered=!1,this.props.logsWorker.unregisterErrorCountHandler(this.onErrorsUpdates),this.props.logsWorker.unregisterWarningCountHandler(this.onWarningsUpdates))}componentDidUpdate(){!this.isSwipeable()&&this.props.state!==J.opened&&this.props.editMenuList&&setTimeout(()=>this.props.setEditMenuList(!1)),this.state.filterOpened&&!this.isSwipeable()&&this.props.state!==J.opened&&this.closeFilter()}getTabsLayoutStateId(){return`${this.props.adminInstance}.info.uiTabsVisible`}static parseTabsLayout(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return null;let n=new Set;return t.filter(e=>e&&typeof e==`object`&&typeof e.name==`string`).map(e=>({name:String(e.name),visible:e.visible!==!1,...typeof e.color==`string`?{color:e.color}:{}})).filter(e=>!n.has(e.name)&&(n.add(e.name),!0))}catch{return null}}async getTabs(t,n){let r=++this.tabsRun;this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null);try{let i=await this.props.socket.getCompactInstances(t||n),a=[],o=new Set([`backitup`,`backup`,`nexowatt-backup`,`eos-backup`]);i&&Object.keys(i).forEach(e=>{let t=i[e],n=e.replace(/^system\.adapter\./,``).replace(/\.\d+$/,``).toLowerCase();if(o.has(n)&&t.enabled!==!0||!(t!=null&&t.adminTab))return;let r=`tab-${e.replace(`system.adapter.`,``).replace(/\.\d+$/,``)}`,s=t.adminTab.singleton,c;if(!s){let t=e.match(/\.(\d+)$/);t&&(c=parseInt(t[1],10),r+=`-${c}`)}let l=a.find(e=>e.name===r);if(l){var u;(u=l.adminTabInstances)==null||u.push(e.replace(`system.adapter.`,``));return}let d,f;t.adminTab.name?typeof t.adminTab.name==`object`?(f=t.adminTab.name.en||t.name,d=t.adminTab.name&&t.adminTab.name[this.props.lang]?t.adminTab.name[this.props.lang]:t.adminTab.name.en?this.props.t(t.adminTab.name.en):this.props.t(t.name)):(f=t.adminTab.name,d=this.props.t(t.adminTab.name)):(f=t.name,d=this.props.t(t.name));let p;p=_c[r]?{name:r,..._c[r]}:{name:r,order:t.adminTab.order===void 0?200:t.adminTab.order,icon:t.adminTab.icon,supportsLoadingMessage:t.adminTab.supportsLoadingMessage},p.icon?typeof p.icon!=`object`&&!p.icon.startsWith(`data:image`)&&!p.icon.includes(`/`)&&(p.icon=`adapter/${t.name}/${p.icon}`):p.icon=`adapter/${t.name}/${t.icon}`,p.title=hc(r,d||t.name),p.icon=gc(r)||p.icon,p.englishTitle=f,s||c&&(p.title+=` ${c}`,p.englishTitle+=` ${c}`),p.adminTabInstances=[e.replace(`system.adapter.`,``)],a.push(p)});let s=await this.props.instancesWorker.getObjects(n,!0);if(!s)throw Error(`instance objects not available`);let c=ec(),l=c.map(e=>{var t;return{instanceId:e,common:(t=s[`system.adapter.${e}`])==null?void 0:t.common}}).filter(e=>{var t;return!!((t=e.common)!=null&&(t=t.supportedMessages)!=null&&t.deviceManager)});l.length!==c.length&&tc(l.map(e=>e.instanceId));let u=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-logs`,`tab-files`,`tab-objects`,`tab-hosts`,`tab-users`];await this.isDeviceManagerVisible()&&u.push(`tab-devicemanager`);let d=Object.keys(_c).filter(e=>u.includes(e)).map(e=>{let t={name:e,..._c[e]};return t.englishTitle=uc(e.replace(`tab-`,``).replace(`-0`,``).replace(/-(\d+)$/,` $1`)),t.title=hc(e,j.t(t.englishTitle)),t.icon=gc(e)||t.icon,t.visible=!0,t});d=d.concat(a),l.forEach(({instanceId:e,common:t},n)=>{var r;let i=e.replace(/\.\d+$/,``),o=(r=e.match(/\.(\d+)$/))==null?void 0:r[1],s=t.titleLang||t.title||t.name||i,c=typeof s==`object`?s[this.props.lang]||s.en||i:this.props.t(s),u=typeof s==`object`?s.en||i:s;o&&(o!==`0`||l.some(t=>t.instanceId!==e&&t.instanceId.startsWith(`${i}.`)))&&(c+=` ${o}`,u+=` ${o}`),a.some(t=>{var n;return(n=t.adminTabInstances)==null?void 0:n.includes(e)})&&(c+=` (${this.props.t(`Devicemanager`)})`,u+=` (Config manager)`);let f;t.icon&&(f=t.icon.startsWith(`data:image`)||t.icon.includes(`/`)?t.icon:`adapter/${t.name}/${t.icon}`),d.push({name:`shortcut-devicemanager-${e}`,order:121+n,icon:f,title:c,englishTitle:u,visible:!0,configManagerInstance:e})}),d=d.filter(e=>!!e&&e.name!==`tab-enums`),d.forEach(e=>e.visible=!0),d.sort((e,t)=>e.order&&t.order?e.order-t.order:e.order?-1:t.order||e.name>t.name?1:e.name<t.name?-1:0);let f=null;try{let t=await this.props.socket.getState(this.getTabsLayoutStateId()),n=e.parseTabsLayout(t==null?void 0:t.val);if(!n){let t=await this.props.socket.getCompactSystemConfig(this.systemConfigFailed);n=e.parseTabsLayout(t.common.tabsVisible)||[]}this.systemConfigFailed=!1,d=e.applySavedTabs(d,n)}catch(e){this.systemConfigFailed=!0,f=e}if(r!==this.tabsRun||this.unmounted)return;this.setState({tabs:d},()=>this.props.provideTabsInfo(this.state.tabs)),f?this.scheduleNextAttempt(f,`Cannot read the saved order of the menu`):this.tabsFailures=0}catch(e){if(r!==this.tabsRun||this.unmounted)return;this.scheduleNextAttempt(e,`Cannot get instances`)}}static applySavedTabs(e,t){e.forEach(e=>{let n=t.find(t=>t.name===e.name);n&&(e.visible=n.visible,e.color=n.color)});let n={};t.forEach((e,t)=>n[e.name]=t);let r=e.filter(e=>n[e.name]!==void 0).sort((e,t)=>n[e.name]-n[t.name]);if(!r.length)return e;let i=new Map,a=null;return e.forEach(e=>{n[e.name]===void 0?i.set(a,[...i.get(a)||[],e]):a=e}),[...i.get(null)||[],...r.flatMap(e=>[e,...i.get(e)||[]])]}scheduleNextAttempt(e,t){if(oc(e)){this.tabsFailures=0,window.alert(`${t}: ${e}`);return}let n=ac(this.tabsFailures);this.tabsFailures++,this.props.socket.isConnected()?(console.warn(`${t}: ${e}. Next attempt in ${n/1e3} s`),this.tabsRetryTimer=setTimeout(()=>{this.tabsRetryTimer=null,this.getTabs(!0,!0)},n)):console.warn(`${t}: ${e}. Next attempt after the reconnect`)}renderSystemNavigation(){let e=this.props.eosAccessRole;if(![`admin`,`service`,`installer`,`enduser`].includes(e))return null;let t=[`admin`,`service`].includes(e);return N(I,{className:`eos-system-navigation`,children:[E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/`),text:`EOS Dashboard`,icon:E(ws,{})}),[`admin`,`service`,`installer`].includes(e)?E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/installer/`),text:`EOS Installer`,icon:E(Ts,{})}):null,e===`admin`?N(je,{children:[E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/devices/`),text:`Devices`,icon:E(Ts,{})}),E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/eebus/`),text:`EEBus`,icon:E(Es,{})}),E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/ocpp/`),text:`OCPP-Ladestationen`,icon:E(Ts,{})}),E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/backup/`),text:`Sicherung`,icon:E(Ds,{})}),E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/security/tls/`),text:`Zertifikate`,icon:E(Os,{})}),E(Vs,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/migration/`),text:`Bestandsübernahme`,icon:E(ks,{})})]}):null,t?N(je,{children:[E(js,{name:`admin.appBar.systemSettings`,config:this.props.adminGuiConfig,children:E(Vs,{theme:this.props.theme,compact:!1,tabName:`tab-system`,onClick:this.props.onSystemSettings,text:this.props.t(`System`),icon:E(De,{})})}),this.props.expertModeControl]}):null]})}renderFooter(){let e=!this.isSwipeable()&&this.props.state!==J.opened,t=this.props.user;return E(I,{className:`eos-drawer-account`,sx:dc.footer,children:this.props.isSecure?N(je,{children:[E(Vs,{theme:this.props.theme,compact:e,onClick:e=>this.setState({userMenuAnchor:e==null?void 0:e.currentTarget}),text:(t==null?void 0:t.name)||this.props.t(`Logout`),secondaryText:t==null?void 0:t.group,color:t==null?void 0:t.color,icon:E(I,{sx:dc.userAvatar,children:t!=null&&t.icon?E(tt,{src:t.icon,style:{width:22,height:22,borderRadius:`50%`}}):E(Wt,{sx:{fontSize:15}})})}),E(Ze,{anchorEl:this.state.userMenuAnchor,open:!!this.state.userMenuAnchor,onClose:()=>this.setState({userMenuAnchor:null}),anchorOrigin:{vertical:`center`,horizontal:`right`},transformOrigin:{vertical:`center`,horizontal:`left`},children:N(It,{onClick:()=>{this.setState({userMenuAnchor:null}),this.props.onLogout()},children:[E(Mt,{children:E(vt,{fontSize:`small`})}),E(Jt,{children:this.props.t(`ra_Logout`)})]})})]}):null})}renderEditButton(){var e;return((e=this.props.adminGuiConfig.admin)==null||(e=e.menu)==null?void 0:e.editable)===!1||this.props.state!==J.opened?null:E(I,{sx:dc.editButton,style:{opacity:+!!this.isSwipeable()},ref:this.refEditButton,children:E(Js,{size:`small`,editMenuList:this.props.editMenuList,onClick:()=>this.props.setEditMenuList(!this.props.editMenuList)})})}static matchesFilter(e,t){var n,r;return!!((n=e.title)!=null&&n.toLowerCase().includes(t))||!!((r=e.englishTitle)!=null&&r.toLowerCase().includes(t))||e.name.replace(`tab-`,``).toLowerCase().includes(t)}countVisibleTabs(){var e;let t=(e=this.props.adminGuiConfig.admin)==null?void 0:e.menu;return this.state.tabs.filter(e=>e.visible&&(t==null?void 0:t[e.name])!==!1).length}renderFilter(){return E(L,{variant:`standard`,autoFocus:!0,sx:dc.filterField,value:this.state.filter,placeholder:this.props.t(`Filter`),onChange:e=>this.setState({filter:e.target.value}),onKeyUp:t=>{if(t.key===`Escape`)this.closeFilter();else if(t.key===`Enter`){let t=this.state.filter.trim().toLowerCase(),n=this.state.tabs.find(n=>n.visible&&t&&e.matchesFilter(n,t));n&&(this.closeFilter(),this.props.handleNavigation(n.name))}},slotProps:{input:{endAdornment:E(A,{tabIndex:-1,size:`small`,title:this.props.t(`ra_Close`),onClick:this.closeFilter,children:E(k,{fontSize:`small`})})}}})}getHeader(){let e=!this.isSwipeable()&&this.props.state!==J.opened;return E(I,{component:`div`,"data-eos-drawer-header":`1`,sx:Ne.getStyle(this.props.theme,dc.header,this.props.state===J.opened&&this.props.isSecure&&dc.headerLogout,!this.isSwipeable()&&this.props.state!==J.opened&&dc.headerCompact),children:this.state.filterOpened?this.renderFilter():N(je,{children:[this.renderLogo(),!e&&this.countVisibleTabs()>sc?E(Lt,{title:this.props.t(`Filter menu`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(A,{size:`small`,sx:dc.filterButton,onClick:()=>this.setState({filterOpened:!0}),children:E(Be,{fontSize:`small`})})}):null,E(A,{size:`large`,onClick:()=>{this.isSwipeable()||this.props.state===J.compact?this.props.onStateChange(J.closed):this.props.onStateChange(J.compact)},children:E(Cs,{})})]})})}renderLogo(){let{state:e,handleNavigation:t}=this.props;return N(`div`,{style:{...dc.avatarBlock,...dc.avatarNotVisible,...e===0?dc.avatarVisible:{display:`none`}},children:[E(`a`,{href:`#tab-intro`,onClick:e=>{e.preventDefault(),t(`tab-intro`)},style:{color:`inherit`,textDecoration:`none`},children:this.props.adminGuiConfig.icon?E(`div`,{style:{height:50,width:102,lineHeight:`50px`},children:E(`img`,{src:this.props.adminGuiConfig.icon,alt:`NexoWatt EOS`,style:{maxWidth:`100%`,maxHeight:`100%`,verticalAlign:`middle`}})}):E(gt,{onClick:()=>t(`tab-intro`),style:dc.logoSize,alt:`NexoWatt EOS`,src:`img/eos/eos-logo.svg`})}),!this.props.adminGuiConfig.icon&&this.props.versionAdmin&&N(R,{sx:dc.styleVersion,children:[`v`,this.props.versionAdmin]})]})}isSwipeable(){return this.props.width===`xs`||this.props.width===`sm`}static tabIcon(e){var t;return(t=_c[e.name])!=null&&t.icon?_c[e.name].icon:!e.icon&&e.configManagerInstance?E(Ts,{}):E(tt,{style:dc.icon,src:e.icon})}getNavigationItems(){let{tabs:t,logErrors:n,logWarnings:r}=this.state,{currentTab:i,state:a,handleNavigation:o}=this.props,s={};this.props.hosts.forEach(e=>s[e._id]=e);let c=this.state.filter.trim().toLowerCase();return t.map((l,u)=>{var d,f,p;if(!this.props.editMenuList&&!l.visible||c&&!e.matchesFilter(l,c))return null;let m=(d=this.props.adminGuiConfig.admin)==null?void 0:d.menu;if(m&&m[l.name]===!1)return null;let h=l.configManagerInstance?i===`tab-devicemanager`&&this.props.currentTabId===l.configManagerInstance:i===l.name&&(l.name!==`tab-devicemanager`||!t.some(e=>e.configManagerInstance===this.props.currentTabId));return E(Is,{canDrag:this.props.editMenuList&&!c,name:l.name,iconJSX:e.tabIcon(l),_id:l.name,selected:h,tab:l,compact:!this.isSwipeable()&&a!==J.opened,badgeContent:n||r||0,badgeColor:n?`error`:r?`warn`:``,tabs:t,setEndDrag:()=>this.tabsEditSystemConfig(),setTabs:e=>this.setState({tabs:e}),children:E(Vs,{tabName:l.name,editMenuList:this.props.editMenuList,visible:l.visible,color:l.color,editListFunc:(e,t)=>this.tabsEditSystemConfig(u,e,t??void 0),compact:!this.isSwipeable()&&a!==J.opened,onClick:e=>{if(this.state.filterOpened&&this.closeFilter(),l.configManagerInstance){if(e!=null&&e.ctrlKey||e!=null&&e.shiftKey){var t;(t=window.open(`${window.location.pathname}#tab-devicemanager/tab/${l.configManagerInstance}`,l.name))==null||t.focus()}else o(`tab-devicemanager`,`tab`,l.configManagerInstance)}else e!=null&&e.ctrlKey||e!=null&&e.shiftKey?U.getHref(this.props.instancesWorker,l.name,this.props.hostname,s,this.props.adminInstance,this.props.themeType).then(e=>{if(e.href){var t;console.log(e.href),(t=window.open(sr(e.href),l.name))==null||t.focus()}else o(l.name)}):o(l.name)},icon:e.tabIcon(l),text:l.title||``,selected:h,badgeContent:this.badge(l).content,badgeColor:this.badge(l).color,badgeAdditionalContent:(f=this.badge(l))==null?void 0:f.additionalContent,badgeAdditionalColor:(p=this.badge(l))==null?void 0:p.additionalColor,theme:this.props.theme},l.name)},l.name)})}render(){return this.isSwipeable()?N(Pe,{sx:Ne.getStyle(this.props.theme,dc.root,{"&.MuiSwipeableDrawer-paper":dc.paper}),anchor:`left`,open:this.props.state!==J.closed,onClose:()=>this.props.onStateChange(J.closed),onOpen:()=>this.props.onStateChange(J.opened),children:[E(Ks,{theme:this.props.theme}),this.getHeader(),this.renderSystemNavigation(),N(be,{style:dc.list,children:[this.getNavigationItems(),this.renderEditButton()]}),this.renderFooter()]}):N(oe,{sx:Ne.getStyle(this.props.theme,dc.root,this.props.state===J.opened?this.props.editMenuList?dc.rootEditWidth:dc.rootFullWidth:dc.rootCompactWidth,{"& .MuiDrawer-paper":dc.paper}),variant:`persistent`,anchor:`left`,open:this.props.state!==J.closed,onMouseEnter:()=>this.refEditButton.current&&(this.refEditButton.current.style.opacity=`1`),onMouseLeave:()=>this.refEditButton.current&&(this.refEditButton.current.style.opacity=`0`),children:[E(Ks,{theme:this.props.theme}),this.getHeader(),this.renderSystemNavigation(),N(be,{style:dc.list,children:[this.getNavigationItems(),this.renderEditButton()]}),this.renderFooter()]})}};vc.contextType=_r;var yc=w()(vc),bc=187,xc={root:{left:0,top:0,width:`100%`,height:`100%`,position:`fixed`,background:`rgba(0, 0, 0, .3)`,zIndex:2e4},connecting:{left:`40%`,top:`40%`,width:`20%`,height:`20%`,position:`absolute`},spinner:{animation:`admin-connecting-rotator 1.4s linear infinite`},path:{strokeDasharray:187,strokeDashoffset:0,transformOrigin:`center`,animation:`admin-connecting-dash 1.4s ease-in-out infinite, $colors 5.6s ease-in-out infinite`},text:{position:`absolute`,top:`calc(60% + 16px)`,left:16,right:16,textAlign:`center`},textBox:{display:`inline-block`,padding:`8px 16px`,borderRadius:4,background:`rgba(0, 0, 0, .7)`,color:`#fff`,fontSize:16}};function Sc(e){return N(`div`,{style:xc.root,children:[E(`style`,{children:`
|
|
22
|
+
}`;var g=Z(function(){return nt(o,m+`return `+f).apply(n,s)});if(g.source=f,au(g))throw g;return g}function Zd(e){return Ru(e).toLowerCase()}function Qd(e){return Ru(e).toUpperCase()}function $d(e,t,r){if(e=Ru(e),e&&(r||t===n))return Ln(e);if(!e||!(t=Sa(t)))return e;var i=ar(e),a=ar(t);return Pa(i,Vn(i,a),Hn(i,a)+1).join(``)}function ef(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.slice(0,or(e)+1);if(!e||!(t=Sa(t)))return e;var i=ar(e);return Pa(i,0,Hn(i,ar(t))+1).join(``)}function tf(e,t,r){if(e=Ru(e),e&&(r||t===n))return e.replace(Le,``);if(!e||!(t=Sa(t)))return e;var i=ar(e);return Pa(i,Vn(i,ar(t))).join(``)}function nf(e,t){var r=30,i=`...`;if(uu(t)){var a=`separator`in t?t.separator:a;r=`length`in t?X(t.length):r,i=`omission`in t?Sa(t.omission):i}e=Ru(e);var o=e.length;if(Jn(e)){var s=ar(e);o=s.length}if(r>=o)return e;var c=r-ir(i);if(c<1)return i;var l=s?Pa(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),xu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=at(a.source,Ru(Ke.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Sa(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function rf(e){return e=Ru(e),e&&j.test(e)?e.replace(ke,sr):e}var af=no(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),of=to(`toUpperCase`);function sf(e,t,r){return e=Ru(e),t=r?n:t,t===n?Yn(e)?ur(e):Cn(e):e.match(t)||[]}var Z=K(function(e,t){try{return ln(e,n,t)}catch(e){return au(e)?e:new tt(e)}}),cf=Do(function(e,t){return V(t,function(t){t=ys(t),ai(e,t,yl(e[t],e))}),e});function lf(e){var t=e==null?0:e.length,n=q();return e=t?gn(e,function(e){if(typeof e[1]!=`function`)throw new st(r);return[n(e[0]),e[1]]}):[],K(function(n){for(var r=-1;++r<t;){var i=e[r];if(ln(i[0],this,n))return ln(i[1],this,n)}})}function Q(e){return li(ci(e,1))}function uf(e){return function(){return e}}function df(e,t){return e==null||e!==e?t:e}var ff=oo(),pf=oo(!0);function mf(e){return e}function hf(e){return Gi(typeof e==`function`?e:ci(e,1))}function gf(e){return Xi(ci(e,1))}function _f(e,t){return Zi(e,ci(t,1))}var vf=K(function(e,t){return function(n){return Ni(n,e,t)}}),yf=K(function(e,t){return function(n){return Ni(e,n,t)}});function bf(e,t,n){var r=sd(t),i=Ci(t,r);n==null&&(!uu(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ci(t,sd(t)));var a=!(uu(n)&&`chain`in n)||!!n.chain,o=su(e);return V(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Ka(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,_n([this.value()],arguments))})}),e}function xf(){return Zt._===this&&(Zt._=F),this}function Sf(){}function Cf(e){return e=X(e),K(function(t){return ea(t,e)})}var wf=uo(gn),Tf=uo(fn),Ef=uo(bn);function Df(e){return Xo(e)?An(ys(e)):ia(e)}function Of(e){return function(t){return e==null?n:wi(e,t)}}var kf=mo(),Af=mo(!0);function jf(){return[]}function Mf(){return!1}function Nf(){return{}}function Pf(){return``}function Ff(){return!0}function If(e,t){if(e=X(e),e<1||e>g)return[];var n=y,r=Ut(e,y);t=q(t),e-=y;for(var i=Fn(r,t);++n<e;)t(n);return i}function Lf(e){return Y(e)?gn(e,ys):Tu(e)?[e]:Ka(vs(Ru(e)))}function Rf(e){var t=++pt;return Ru(e)+t}var zf=lo(function(e,t){return e+t},0),Bf=_o(`ceil`),Vf=lo(function(e,t){return e/t},1),Hf=_o(`floor`);function Uf(e){return e&&e.length?hi(e,mf,Di):n}function Wf(e,t){return e&&e.length?hi(e,q(t,2),Di):n}function Gf(e){return kn(e,mf)}function Kf(e,t){return kn(e,q(t,2))}function qf(e){return e&&e.length?hi(e,mf,Ji):n}function Jf(e,t){return e&&e.length?hi(e,q(t,2),Ji):n}var Yf=lo(function(e,t){return e*t},1),Xf=_o(`round`),Zf=lo(function(e,t){return e-t},0);function Qf(e){return e&&e.length?Pn(e,mf):0}function $f(e,t){return e&&e.length?Pn(e,q(t,2)):0}return U.after=gl,U.ary=_l,U.assign=zu,U.assignIn=Bu,U.assignInWith=Vu,U.assignWith=Hu,U.at=Uu,U.before=vl,U.bind=yl,U.bindAll=cf,U.bindKey=bl,U.castArray=zl,U.chain=Nc,U.chunk=Cs,U.compact=ws,U.concat=Ts,U.cond=lf,U.conforms=Q,U.constant=uf,U.countBy=Uc,U.create=Wu,U.curry=xl,U.curryRight=Sl,U.debounce=Cl,U.defaults=Gu,U.defaultsDeep=Ku,U.defer=wl,U.delay=Tl,U.difference=Es,U.differenceBy=Ds,U.differenceWith=Os,U.drop=ks,U.dropRight=As,U.dropRightWhile=js,U.dropWhile=Ms,U.fill=Ns,U.filter=Gc,U.flatMap=Jc,U.flatMapDeep=Yc,U.flatMapDepth=Xc,U.flatten=Is,U.flattenDeep=Ls,U.flattenDepth=Rs,U.flip=El,U.flow=ff,U.flowRight=pf,U.fromPairs=zs,U.functions=$u,U.functionsIn=ed,U.groupBy=$c,U.initial=Hs,U.intersection=Us,U.intersectionBy=Ws,U.intersectionWith=Gs,U.invert=id,U.invertBy=ad,U.invokeMap=tl,U.iteratee=hf,U.keyBy=nl,U.keys=sd,U.keysIn=cd,U.map=rl,U.mapKeys=ld,U.mapValues=ud,U.matches=gf,U.matchesProperty=_f,U.memoize=Dl,U.merge=dd,U.mergeWith=fd,U.method=vf,U.methodOf=yf,U.mixin=bf,U.negate=Ol,U.nthArg=Cf,U.omit=pd,U.omitBy=md,U.once=kl,U.orderBy=il,U.over=wf,U.overArgs=Al,U.overEvery=Tf,U.overSome=Ef,U.partial=jl,U.partialRight=Ml,U.partition=al,U.pick=hd,U.pickBy=gd,U.property=Df,U.propertyOf=Of,U.pull=Xs,U.pullAll=Zs,U.pullAllBy=Qs,U.pullAllWith=$s,U.pullAt=ec,U.range=kf,U.rangeRight=Af,U.rearg=Nl,U.reject=cl,U.remove=tc,U.rest=Pl,U.reverse=nc,U.sampleSize=ul,U.set=vd,U.setWith=yd,U.shuffle=dl,U.slice=rc,U.sortBy=ml,U.sortedUniq=uc,U.sortedUniqBy=dc,U.split=qd,U.spread=Fl,U.tail=fc,U.take=pc,U.takeRight=mc,U.takeRightWhile=hc,U.takeWhile=gc,U.tap=Pc,U.throttle=Il,U.thru=J,U.toArray=Mu,U.toPairs=bd,U.toPairsIn=xd,U.toPath=Lf,U.toPlainObject=Iu,U.transform=Sd,U.unary=Ll,U.union=_c,U.unionBy=vc,U.unionWith=yc,U.uniq=bc,U.uniqBy=xc,U.uniqWith=Sc,U.unset=Cd,U.unzip=Cc,U.unzipWith=wc,U.update=wd,U.updateWith=Td,U.values=Ed,U.valuesIn=Dd,U.without=Tc,U.words=sf,U.wrap=Rl,U.xor=Ec,U.xorBy=Dc,U.xorWith=Oc,U.zip=kc,U.zipObject=Ac,U.zipObjectDeep=jc,U.zipWith=Mc,U.entries=bd,U.entriesIn=xd,U.extend=Bu,U.extendWith=Vu,bf(U,U),U.add=zf,U.attempt=Z,U.camelCase=jd,U.capitalize=Md,U.ceil=Bf,U.clamp=Od,U.clone=Bl,U.cloneDeep=Hl,U.cloneDeepWith=Ul,U.cloneWith=Vl,U.conformsTo=Wl,U.deburr=Nd,U.defaultTo=df,U.divide=Vf,U.endsWith=Pd,U.eq=Gl,U.escape=Fd,U.escapeRegExp=Id,U.every=Wc,U.find=Kc,U.findIndex=Ps,U.findKey=qu,U.findLast=qc,U.findLastIndex=Fs,U.findLastKey=Ju,U.floor=Hf,U.forEach=Zc,U.forEachRight=Qc,U.forIn=Yu,U.forInRight=Xu,U.forOwn=Zu,U.forOwnRight=Qu,U.get=td,U.gt=Kl,U.gte=ql,U.has=nd,U.hasIn=rd,U.head=Bs,U.identity=mf,U.includes=el,U.indexOf=Vs,U.inRange=kd,U.invoke=od,U.isArguments=Jl,U.isArray=Y,U.isArrayBuffer=Yl,U.isArrayLike=Xl,U.isArrayLikeObject=Zl,U.isBoolean=Ql,U.isBuffer=$l,U.isDate=eu,U.isElement=tu,U.isEmpty=nu,U.isEqual=ru,U.isEqualWith=iu,U.isError=au,U.isFinite=ou,U.isFunction=su,U.isInteger=cu,U.isLength=lu,U.isMap=fu,U.isMatch=pu,U.isMatchWith=mu,U.isNaN=hu,U.isNative=gu,U.isNil=vu,U.isNull=_u,U.isNumber=yu,U.isObject=uu,U.isObjectLike=du,U.isPlainObject=bu,U.isRegExp=xu,U.isSafeInteger=Su,U.isSet=Cu,U.isString=wu,U.isSymbol=Tu,U.isTypedArray=Eu,U.isUndefined=Du,U.isWeakMap=Ou,U.isWeakSet=ku,U.join=Ks,U.kebabCase=Ld,U.last=qs,U.lastIndexOf=Js,U.lowerCase=Rd,U.lowerFirst=zd,U.lt=Au,U.lte=ju,U.max=Uf,U.maxBy=Wf,U.mean=Gf,U.meanBy=Kf,U.min=qf,U.minBy=Jf,U.stubArray=jf,U.stubFalse=Mf,U.stubObject=Nf,U.stubString=Pf,U.stubTrue=Ff,U.multiply=Yf,U.nth=Ys,U.noConflict=xf,U.noop=Sf,U.now=hl,U.pad=Bd,U.padEnd=Vd,U.padStart=Hd,U.parseInt=Ud,U.random=Ad,U.reduce=ol,U.reduceRight=sl,U.repeat=Wd,U.replace=Gd,U.result=_d,U.round=Xf,U.runInContext=e,U.sample=ll,U.size=fl,U.snakeCase=Kd,U.some=pl,U.sortedIndex=ic,U.sortedIndexBy=ac,U.sortedIndexOf=oc,U.sortedLastIndex=sc,U.sortedLastIndexBy=cc,U.sortedLastIndexOf=lc,U.startCase=Jd,U.startsWith=Yd,U.subtract=Zf,U.sum=Qf,U.sumBy=$f,U.template=Xd,U.times=If,U.toFinite=Nu,U.toInteger=X,U.toLength=Pu,U.toLower=Zd,U.toNumber=Fu,U.toSafeInteger=Lu,U.toString=Ru,U.toUpper=Qd,U.trim=$d,U.trimEnd=ef,U.trimStart=tf,U.truncate=nf,U.unescape=rf,U.uniqueId=Rf,U.upperCase=af,U.upperFirst=of,U.each=Zc,U.eachRight=Qc,U.first=Bs,bf(U,function(){var e={};return xi(U,function(t,n){P.call(U.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),U.VERSION=`4.18.1`,V([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){U[e].placeholder=U}),V([`drop`,`take`],function(e,t){W.prototype[e]=function(r){r=r===n?1:zt(X(r),0);var i=this.__filtered__&&!t?new W(this):this.clone();return i.__filtered__?i.__takeCount__=Ut(r,i.__takeCount__):i.__views__.push({size:Ut(r,y),type:e+(i.__dir__<0?`Right`:``)}),i},W.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),V([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==1||n==3;W.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:q(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),V([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);W.prototype[e]=function(){return this[n](1).value()[0]}}),V([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);W.prototype[e]=function(){return this.__filtered__?new W(this):this[n](1)}}),W.prototype.compact=function(){return this.filter(mf)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=K(function(e,t){return typeof e==`function`?new W(this):this.map(function(n){return Ni(n,e,t)})}),W.prototype.reject=function(e){return this.filter(Ol(q(e)))},W.prototype.slice=function(e,t){e=X(e);var r=this;return r.__filtered__&&(e>0||t<0)?new W(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=X(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(y)},xi(W.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=U[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(U.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof W,l=s[0],u=c||Y(t),d=function(e){var t=a.apply(U,_n([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new W(this);var g=e.apply(t,s);return g.__actions__.push({func:J,args:[d],thisArg:n}),new vr(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),V([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=ct[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);U.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Y(i)?i:[],e)}return this[n](function(n){return t.apply(Y(n)?n:[],e)})}}),xi(W.prototype,function(e,t){var n=U[t];if(n){var r=n.name+``;P.call(jn,r)||(jn[r]=[]),jn[r].push({name:t,func:n})}}),jn[so(n,s).name]=[{name:`wrapper`,func:n}],W.prototype.clone=yr,W.prototype.reverse=br,W.prototype.value=xr,U.prototype.at=Fc,U.prototype.chain=Ic,U.prototype.commit=Lc,U.prototype.next=Rc,U.prototype.plant=Bc,U.prototype.reverse=Vc,U.prototype.toJSON=U.prototype.valueOf=U.prototype.value=Hc,U.prototype.first=U.prototype.head,Dt&&(U.prototype[Dt]=zc),U})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(Zt._=H,define(function(){return H})):$t?(($t.exports=H)._=H,Qt._=H):Zt._=H}).call(n)}))(),1).default.throttle((e,t)=>e(t),200),rc=(e,t)=>{let n=t.find(t=>t.name===e);return{card:n,index:n?t.indexOf(n):-1}},ic=(e,t,n,r,i,a)=>{let{card:o,index:s}=rc(e,n);if(s!==t&&!(s<t&&i<a)&&!(s>t&&i>a)&&o&&s!==t){let e=JSON.parse(JSON.stringify(n));e.splice(s,1),e.splice(t,0,o),nc(r,e)}},ac={cursor:`move`},oc=({canDrag:e,setEndDrag:t,iconJSX:n,selected:r,compact:i,badgeContent:a,badgeColor:o,tab:s,tabs:c,setTabs:l,_id:u,children:d,name:f})=>{let p=P(null),[{handlerId:m},h]=Uo({accept:`box`,collect(e){return{handlerId:e.getHandlerId()}},hover({_id:e},t){if(!p.current)return;let{index:n}=rc(u,c),r=p.current.getBoundingClientRect(),i=(r.bottom-r.top)/2,a=t.getClientOffset();a&&ic(e,n,c,l,a.y-r.top,i)}}),[{isDragging:g},_,v]=Po({type:`box`,item:{_id:s.name,...s,iconJSX:n,selected:r,compact:i,badgeContent:a,badgeColor:o},canDrag:()=>e,end:()=>t(),collect:e=>({isDragging:e.isDragging()})});Xt(()=>{v(vs(),{captureDraggingState:!0})},[]);let y=+!g;return Xt(()=>{_(h(p))},[_,h]),T(`div`,{ref:p,style:{...ac,opacity:y},"data-handler-id":m,children:T(`a`,{type:`box`,"data-handler-id":m,onClick:e=>e.preventDefault(),href:`/#${f}`,style:{...ac,opacity:y,color:`inherit`,textDecoration:`none`},children:d})})},sc=24,cc=e=>e.palette.mode===`light`?`white`:H.invertColor(e.palette.primary.main,!0),lc={button:{mx:`4px`,borderRadius:`8px`,minHeight:40},selected:e=>({background:`linear-gradient(90deg, ${e.palette.primary.light} 0%, ${e.palette.primary.main} 100%)`,color:cc(e),"&:hover":{background:`linear-gradient(90deg, ${e.palette.primary.light} 0%, ${e.palette.primary.dark} 100%)`,color:cc(e)}}),selectedIcon:e=>({color:cc(e)}),compact:{px:`4px`},row:{display:`flex`,alignItems:`center`,flexWrap:`nowrap`,gap:`8px`,width:`100%`,minHeight:40},rowCompact:{justifyContent:`center`},badgeCompact:{"& .MuiBadge-badge:not(.MuiBadge-invisible)":{transform:`translate(-35%, -50%)`}},icon:{display:`flex`,alignItems:`center`,justifyContent:`center`},text:{m:0,"& .MuiTypography-root":{display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`center`,lineHeight:1.2}},secondary:{lineHeight:1.1,opacity:.75},warn:{backgroundColor:`#ffc107`},nativeItem:{border:`1px solid rgba(96, 189, 255, 0.16)`,background:`linear-gradient(180deg, rgba(13, 34, 53, 0.86), rgba(6, 19, 32, 0.92))`,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.04)`,transition:`transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease`,"&:hover":{transform:`translateY(-1px)`,borderColor:`rgba(0, 255, 136, 0.28)`,background:`linear-gradient(180deg, rgba(17, 44, 66, 0.94), rgba(7, 22, 36, 0.96))`,boxShadow:`0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,255,136,.06)`}},nativeSelected:{borderColor:`rgba(0, 255, 136, 0.48)`,background:`linear-gradient(135deg, rgba(0,255,136,.17), rgba(0,212,255,.10))`,boxShadow:`0 0 22px rgba(0,255,136,.09), inset 0 0 0 1px rgba(0,255,136,.11)`}},uc=e=>{let{tabName:t,badgeColor:n,badgeContent:r,compact:i,icon:a,onClick:o,selected:s,text:c,editMenuList:l,visible:u,color:d,editListFunc:f,badgeAdditionalContent:p,badgeAdditionalColor:m,style:h}=e,g=c?c.replace(`>`,`>`):``;return(g===`Text->Kommandos`||g===`Text->Commands`)&&(g=`Text→Cmd`),M(`div`,{style:{display:`flex`,alignItems:`center`,...h||{}},children:[!!l&&T(Cr,{}),!!l&&T(ke,{checked:u,onClick:()=>f==null?void 0:f(!0)}),!!l&&T(Ct,{value:d,noInputField:!0,onChange:e=>f==null?void 0:f(!1,e||null)}),T(tn,{className:`nexowatt-native-nav-item`,"data-eos-tab":t,"aria-current":s?`page`:void 0,selected:s,sx:Pe.getStyle(e.theme,lc.button,lc.nativeItem,s&&lc.nativeSelected,s&&lc.selected,i&&lc.compact),onClick:o,children:T(Rt,{title:i?g:``,slotProps:{popper:{sx:{pointerEvents:`none`}}},children:M(F,{sx:Pe.getStyle(e.theme,lc.row,i&&lc.rowCompact),children:[T(Nt,{className:`nexowatt-native-nav-icon-slot`,style:{minWidth:sc,width:sc,color:d},sx:Pe.getStyle(e.theme,lc.icon,s&&lc.selectedIcon),children:T(ot,{badgeContent:r||0,color:(n===`warn`?`default`:n)||`primary`,anchorOrigin:i?{vertical:`top`,horizontal:`left`}:void 0,sx:Pe.getStyle(e.theme,n===`warn`&&{"& .MuiBadge-badge":lc.warn},i&&lc.badgeCompact),children:a})}),!i&&M(Yt,{style:{color:d},sx:lc.text,children:[T(ot,{badgeContent:p||0,color:(m===`warn`?`default`:m)||`primary`,sx:m===`warn`?{"& .MuiBadge-badge":lc.warn}:void 0,children:g}),e.secondaryText?T(L,{component:`div`,variant:`caption`,color:`text.secondary`,sx:lc.secondary,children:e.secondaryText}):null]})]})})})]})},dc={position:`fixed`,pointerEvents:`none`,zIndex:100,left:0,top:0,width:`100%`,height:`100%`};function fc(e,t){return[Math.round(e/32)*32,Math.round(t/32)*32]}function pc(e,t,n){if(!e||!t)return{display:`none`};let{x:r,y:i}=t;n&&(r-=e.x,i-=e.y,[r,i]=fc(r,i),r+=e.x,i+=e.y);let a=`translate(${r}px, ${i}px)`;return{transform:a,WebkitTransform:a}}var mc={root:e=>({background:e.palette.background.default})};function hc(e){let{itemType:t,isDragging:n,item:r,initialOffset:i,currentOffset:a}=Fo(e=>({item:e.getItem(),itemType:e.getItemType(),initialOffset:e.getInitialSourceClientOffset(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()}));function o(){return t===`box`?T(F,{component:`div`,sx:mc.root,style:{width:179},children:T(uc,{visible:r.visible,editListFunc:()=>void 0,compact:r.compact,icon:r.iconJSX,text:r.title,selected:r.selected,badgeContent:r.badgeContent,badgeColor:r.badgeColor,theme:e.theme},r.name)}):null}return n?T(`div`,{style:dc,children:T(`div`,{style:pc(i,a),children:o()})}):null}var gc,_c=({editMenuList:e,onClick:t,size:n})=>{let[r,i]=Ut.useState(null),[a,o]=Ut.useState(!1),[s,c]=Ut.useState(void 0);return M(Me,{children:[T(k,{size:n||`large`,style:e?{color:`red`}:void 0,onClick:n=>{t(),e?(o(!1),clearTimeout(gc)):(i(n.currentTarget),o(e=>s!==`right`||!e),c(`right`),gc=setTimeout(()=>o(!1),3e3))},title:A.t(`show/hide item`),children:T($e,{})}),T(lt,{style:{zIndex:2222},open:a,anchorEl:r,placement:s,transition:!0,children:({TransitionProps:e})=>T(pn,{...e,timeout:350,children:T(Ot,{children:T(L,{style:{padding:16},children:A.t(`You can drag and drop list items for reorder`)})})})})]})},vc={cockpit:M(Me,{children:[T(`rect`,{x:`3.5`,y:`3.5`,width:`7`,height:`7`,rx:`1.7`}),T(`rect`,{x:`13.5`,y:`3.5`,width:`7`,height:`7`,rx:`1.7`}),T(`rect`,{x:`3.5`,y:`13.5`,width:`7`,height:`7`,rx:`1.7`}),T(`rect`,{x:`13.5`,y:`13.5`,width:`7`,height:`7`,rx:`1.7`})]}),modules:M(Me,{children:[T(`path`,{d:`M12 3.7 18.7 7.5v8.9L12 20.3 5.3 16.4V7.5L12 3.7Z`}),T(`path`,{d:`M12 3.7V12m6.7-4.5L12 12 5.3 7.5`})]}),services:M(Me,{children:[T(`rect`,{x:`4`,y:`4.5`,width:`16`,height:`5`,rx:`2`}),T(`rect`,{x:`4`,y:`14.5`,width:`16`,height:`5`,rx:`2`}),T(`path`,{d:`M8 7h.01M8 17h.01M12 7h5M12 17h5`})]}),datapoints:M(Me,{children:[T(`circle`,{cx:`6`,cy:`12`,r:`2.3`}),T(`circle`,{cx:`18`,cy:`6`,r:`2.3`}),T(`circle`,{cx:`18`,cy:`18`,r:`2.3`}),T(`path`,{d:`M8.2 11 15.7 7M8.2 13l7.5 4`})]}),structure:M(Me,{children:[T(`rect`,{x:`3.5`,y:`4`,width:`7`,height:`4.5`,rx:`1.4`}),T(`rect`,{x:`13.5`,y:`4`,width:`7`,height:`4.5`,rx:`1.4`}),T(`rect`,{x:`8.5`,y:`15.5`,width:`7`,height:`4.5`,rx:`1.4`}),T(`path`,{d:`M7 8.5v3h10v-3M12 11.5v4`})]}),logs:M(Me,{children:[T(`path`,{d:`M5 6.5h14M5 12h8M5 17.5h14`}),T(`path`,{d:`m15.2 10.3 2.1 2.2 3.2-4`})]}),rights:M(Me,{children:[T(`path`,{d:`M12 3.5 18.5 6v5.1c0 4.2-2.7 7.3-6.5 9.4-3.8-2.1-6.5-5.2-6.5-9.4V6L12 3.5Z`}),T(`path`,{d:`M9.5 11.8 11 13.3l3.7-3.7`})]}),scripts:T(`path`,{d:`M8.8 7 4.5 12l4.3 5M15.2 7l4.3 5-4.3 5M13.2 5 10.8 19`}),hosts:M(Me,{children:[T(`rect`,{x:`4`,y:`4.5`,width:`16`,height:`10`,rx:`2.2`}),T(`path`,{d:`M8 19.5h8M12 14.5v5M7.5 8.5h.01M11 8.5h6`})]}),files:T(`path`,{d:`M4 7.5A2.5 2.5 0 0 1 6.5 5H10l2 2h5.5A2.5 2.5 0 0 1 20 9.5v7a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5v-9Z`}),devices:M(Me,{children:[T(`rect`,{x:`4`,y:`5`,width:`16`,height:`14`,rx:`2.4`}),T(`path`,{d:`M8 9h8M8 13h3M15.5 13h.01`})]}),backup:M(Me,{children:[T(`path`,{d:`M6 6h10a3 3 0 0 1 3 3v7.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 5 16.5V8a2 2 0 0 1 2-2Z`}),T(`path`,{d:`M9 6V4.5h4V6M9 12.5h6M12 9.5v6`})]}),eos:M(Me,{children:[T(`circle`,{cx:`12`,cy:`12`,r:`3.6`}),T(`path`,{d:`M12 3.5v4.2M12 16.3v4.2M3.5 12h4.2M16.3 12h4.2M5.9 5.9l3 3M15.1 15.1l3 3M5.9 18.1l3-3M15.1 8.9l3-3`})]}),default:M(Me,{children:[T(`circle`,{cx:`12`,cy:`12`,r:`8`}),T(`path`,{d:`M12 8v4l2.7 2.7`})]})};function yc({name:e}){return T(`span`,{className:`nexowatt-native-nav-icon eos-native-nav-icon eos-native-nav-icon-source`,"aria-hidden":`true`,children:T(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,children:vc[e]||vc.default})})}var bc=`App.configManagerPinnedInstances`,xc=`config-manager-pins-changed`;function Sc(){return window._localStorage||window.localStorage}function Cc(){try{let e=JSON.parse(Sc().getItem(`App.configManagerPinnedInstances`)||`[]`);return Array.isArray(e)?e.filter((t,n)=>typeof t==`string`&&e.indexOf(t)===n):[]}catch{return[]}}function wc(e){Sc().setItem(bc,JSON.stringify([...new Set(e)])),window.dispatchEvent(new CustomEvent(xc))}function Tc(e){return Cc().includes(e)}function Ec(e,t){let n=Cc().filter(t=>t!==e);t&&n.push(e),wc(n)}var Dc=[2e3,5e3,1e4];function Oc(e){return Dc[Math.min(Math.max(e,0),Dc.length-1)]}function kc(e){return(e instanceof Error?e.message:String(e)).includes(`permissionError`)}x();var Ac=10,jc=300,Mc=2e3;function Nc(e){return e.substring(0,1).toUpperCase()+e.substring(1).toLowerCase()}var Pc={root:e=>({flexShrink:0,transition:e.transitions.create(`width`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),display:`flex`,flexDirection:`column`}),rootFullWidth:{width:180},rootEditWidth:{width:250},rootCompactWidth:{width:50},paper:{width:`inherit`,overflowX:`hidden`,overflowY:`hidden`},header:e=>({display:`flex`,flexDirection:`row`,alignItems:`center`,padding:`0 8px 0 8px`,...e.mixins.toolbar,justifyContent:`flex-end`,position:`sticky`,top:0,zIndex:2,background:`inherit`}),headerCompact:{padding:0},filterButton:{flexShrink:0,p:`4px`},filterField:{flexGrow:1,"& .MuiInputBase-input":{fontSize:14}},headerLogout:{justifyContent:`space-between`},list:{paddingTop:0,flex:`1 1 auto`,overflowY:`auto`,overflowX:`hidden`},footer:e=>({flexShrink:0,borderTop:`1px solid ${e.palette.divider}`}),editButton:{position:`sticky`,bottom:0,right:0,width:`fit-content`,marginLeft:`auto`,transition:`opacity 0.5s`},userAvatar:e=>({width:24,height:24,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,overflow:`hidden`,backgroundColor:Ke(e.palette.primary.main,.2),border:`1px solid ${Ke(e.palette.primary.main,.5)}`,color:e.palette.primary.main}),footerButtons:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,alignItems:`center`,p:`2px`},icon:{width:20,height:20},logoSize:{width:50,height:50},brandFrame:{minHeight:52,minWidth:138,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`4px 10px`,borderRadius:14,border:`1px solid rgba(0,255,136,0.22)`,background:`linear-gradient(180deg, rgba(4,14,22,0.96), rgba(3,10,18,0.98))`,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 18px rgba(0,0,0,0.24)`},brandImageWrap:{height:50,width:138,lineHeight:`50px`,display:`flex`,alignItems:`center`},avatarBlock:{width:`100%`,display:`flex`,marginTop:5,marginBottom:5,minWidth:0,overflow:`hidden`},avatarNotVisible:{opacity:0,transition:`opacity 0.3s`},avatarVisible:{opacity:1},styleVersion:e=>({fontSize:10,whiteSpace:`nowrap`,color:e.palette.mode===`dark`?`#ffffff5e`:`#0000005e`,alignSelf:`center`,ml:`5px`})},J={opened:0,closed:1,compact:2},Fc={"tab-overview":`Systemstatus`,"tab-intro":`Übersicht`,"tab-adapters":`Module`,"tab-instances":`Dienste`,"tab-objects":`Datenpunkte`,"tab-enums":`Struktur`,"tab-logs":`Systemlogs`,"tab-users":`Zugänge & Rechte`,"tab-javascript":`Skripte`,"tab-hosts":`System-Hosts`,"tab-files":`Dateien`,"tab-devicemanager":`Geräte`},Ic={"tab-intro":`cockpit`,"tab-adapters":`modules`,"tab-instances":`services`,"tab-objects":`datapoints`,"tab-enums":`structure`,"tab-logs":`logs`,"tab-users":`rights`,"tab-javascript":`scripts`,"tab-hosts":`hosts`,"tab-files":`files`,"tab-devicemanager":`devices`};function Lc(e){let t=e.toLowerCase();return/^tab-(?:nexowatt-ui|nexowatt-eos|eos-cockpit)(?:-|$)/.test(t)?{title:`NexoWatt EOS`,icon:`eos`}:/^tab-backitup(?:-|$)/.test(t)?{title:`System-Notfallsicherung`,icon:`backup`}:/^tab-(?:nexowatt-backup|eos-backup|nexowatt-sicherung)(?:-|$)/.test(t)?{title:`NexoWatt Sicherung`,icon:`backup`}:/^tab-backup(?:-|$)/.test(t)?{title:`Sicherung`,icon:`backup`}:/^tab-(?:javascript)(?:-|$)/.test(t)?{title:`Skripte`,icon:`scripts`}:/^tab-(?:files)(?:-|$)/.test(t)?{title:`Dateien`,icon:`files`}:{}}function Rc(e,t){return Fc[e]||Lc(e).title||t}function zc(e){let t=Ic[e]||Lc(e).icon;return t?T(yc,{name:t}):void 0}var Bc={"tab-overview":{order:2,icon:T(Wr,{}),host:!0},"tab-intro":{order:1,icon:zc(`tab-intro`)},"tab-info":{order:5,host:!0},"tab-adapters":{order:10,icon:zc(`tab-adapters`),host:!0},"tab-instances":{order:15,icon:zc(`tab-instances`),host:!0},"tab-objects":{order:20,icon:zc(`tab-objects`)},"tab-enums":{order:25,icon:zc(`tab-enums`)},"tab-devices":{order:27,host:!0},"tab-logs":{order:30,icon:zc(`tab-logs`),host:!0},"tab-scenes":{order:35},"tab-events":{order:40},"tab-users":{order:45,icon:zc(`tab-users`)},"tab-javascript":{order:50,icon:zc(`tab-javascript`)},"tab-text2command-0":{order:55,instance:0},"tab-text2command-1":{order:56,instance:1},"tab-text2command-2":{order:57,instance:2},"tab-node-red-0":{order:60,instance:0},"tab-node-red-1":{order:61,instance:1},"tab-node-red-2":{order:62,instance:2},"tab-fullcalendar-0":{order:65,instance:0},"tab-fullcalendar-1":{order:66,instance:1},"tab-fullcalendar-2":{order:67,instance:2},"tab-echarts":{order:70,instance:2},"tab-eventlist-0":{order:80,instance:0},"tab-eventlist-1":{order:81,instance:1},"tab-eventlist-2":{order:82,instance:2},"tab-hosts":{order:100,icon:zc(`tab-hosts`)},"tab-files":{order:110,icon:zc(`tab-files`)},"tab-devicemanager":{order:120,icon:zc(`tab-devicemanager`)}},Vc=class e extends $t{static isTransientConnectionError(e){return/notconnected|not connected|connectionerror|close_abnormal|closed_no_status|websocket|timeout|networkerror/i.test(e instanceof Error?e.message:typeof e==`string`?e:``)}constructor(t){super(t),j(this,`logsHandlerRegistered`,!1),j(this,`refEditButton`,Ut.createRef()),j(this,`tabsRun`,0),j(this,`tabsFailures`,0),j(this,`tabsRetryTimer`,null),j(this,`instanceChangesTimer`,null),j(this,`instanceChangesSince`,0),j(this,`systemConfigFailed`,!1),j(this,`unmounted`,!1),j(this,`instanceChangedHandler`,()=>{let e=Date.now();this.instanceChangesTimer?clearTimeout(this.instanceChangesTimer):this.instanceChangesSince=e;let t=Math.min(jc,Math.max(0,this.instanceChangesSince+Mc-e));this.instanceChangesTimer=setTimeout(()=>{this.instanceChangesTimer=null,this.getTabs(!0)},t)}),j(this,`connectionHandler`,e=>{e&&this.tabsFailures&&(this.tabsFailures=0,this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null),this.getTabs(!0,!0))}),j(this,`onNotificationsHandler`,()=>this.props.hostsWorker.getNotifications().then(e=>this.calculateWarning(e)).catch(t=>{e.isTransientConnectionError(t)||window.alert(`Cannot get notifications: ${t}`)})),j(this,`onErrorsUpdates`,e=>{this.setState({logErrors:e})}),j(this,`onWarningsUpdates`,e=>{this.setState({logWarnings:e})}),j(this,`calculateWarning`,e=>{if(!e)return;let t={warning:0,other:0};Object.keys(e).forEach(n=>{var r;if((r=e[n])!=null&&(r=r.result)!=null&&r.system&&Object.keys(e[n].result.system.categories).length){let r=e[n].result.system.categories;for(let e of Object.values(r))Object.keys(e.instances).forEach(()=>e.severity===`alert`?t.warning++:t.other++)}}),this.setState({hostNotifications:t})}),j(this,`pinsChangedHandler`,e=>{e instanceof StorageEvent&&e.key&&e.key!==`App.configManagerPinnedInstances`||this.getTabs()}),j(this,`closeFilter`,()=>this.setState({filterOpened:!1,filter:``})),j(this,`tabsEditSystemConfig`,async(e,t,n)=>{let r=JSON.parse(JSON.stringify(this.state.tabs));e!==void 0&&t&&(r[e].visible=!r[e].visible),e!==void 0&&n!==void 0&&(n===null?delete r[e].color:r[e].color=n);let i=JSON.stringify(r.map(({name:e,visible:t,color:n})=>({name:e,visible:t,color:n})));e!==void 0&&(t||n!==void 0)&&this.setState({tabs:r});try{await this.props.socket.setState(this.getTabsLayoutStateId(),i)}catch(r){window.alert(`Cannot save navigation layout: ${r}`),e!==void 0&&(t||n!==void 0)&&this.getTabs(!0)}}),j(this,`badge`,e=>{switch(e.name){case`tab-logs`:{let{logErrors:e,logWarnings:t}=this.state;return{content:e||t||0,color:e?`error`:`warn`}}case`tab-adapters`:return{content:this.state.adaptersUpdate||0,color:`primary`};case`tab-hosts`:return{content:this.state.hostsUpdate||0,color:`primary`,additionalContent:this.state.hostNotifications.warning+this.state.hostNotifications.other,additionalColor:this.state.hostNotifications.warning>0?`error`:`secondary`};default:return{content:0,color:``,additionalContent:0,additionalColor:``}}}),this.state={tabs:[],logErrors:0,logWarnings:0,hostNotifications:{other:0,warning:0},hostsUpdate:e.calculateHostUpdates(this.props.hosts,this.props.repository),adaptersUpdate:e.calculateAdapterUpdates(this.props.installed,this.props.repository),deviceManagerVisible:!1,userMenuAnchor:null,filterOpened:!1,filter:``}}static getDerivedStateFromProps(t,n){let r=e.calculateHostUpdates(t.hosts,t.repository),i=e.calculateAdapterUpdates(t.installed,t.repository);return r!==n.hostsUpdate||i!==n.adaptersUpdate?{hostsUpdate:r,adaptersUpdate:i}:null}static calculateHostUpdates(e,t){if(e&&t){var n;let r=((n=t[`js-controller`])==null?void 0:n.version)||``,i=0;return e.forEach(e=>{H.updateAvailable(e.common.installedVersion,r,`js-controller on ${e._id}`)&&i++}),i}return 0}static calculateAdapterUpdates(e,t){return H.countAdapterUpdates(e,t)}async isDeviceManagerVisible(){let e=await this.props.instancesWorker.getObjects()||{};return!!Object.values(e).find(e=>{var t;return e==null||(t=e.common)==null||(t=t.supportedMessages)==null?void 0:t.deviceManager})}componentDidMount(){this.props.instancesWorker.registerHandler(this.instanceChangedHandler,!0),this.props.socket.registerConnectionHandler(this.connectionHandler),this.getTabs(),window.addEventListener(xc,this.pinsChangedHandler),window.addEventListener(`storage`,this.pinsChangedHandler),this.onNotificationsHandler().then(()=>{this.props.hostsWorker.registerNotificationHandler(this.onNotificationsHandler),this.logsHandlerRegistered||(this.logsHandlerRegistered=!0,this.props.logsWorker.registerErrorCountHandler(this.onErrorsUpdates),this.props.logsWorker.registerWarningCountHandler(this.onWarningsUpdates))})}componentWillUnmount(){this.unmounted=!0,this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null),this.instanceChangesTimer&&=(clearTimeout(this.instanceChangesTimer),null),this.props.socket.unregisterConnectionHandler(this.connectionHandler),this.props.instancesWorker.unregisterHandler(this.instanceChangedHandler),this.props.hostsWorker.unregisterNotificationHandler(this.onNotificationsHandler),window.removeEventListener(xc,this.pinsChangedHandler),window.removeEventListener(`storage`,this.pinsChangedHandler),this.logsHandlerRegistered&&(this.logsHandlerRegistered=!1,this.props.logsWorker.unregisterErrorCountHandler(this.onErrorsUpdates),this.props.logsWorker.unregisterWarningCountHandler(this.onWarningsUpdates))}componentDidUpdate(){!this.isSwipeable()&&this.props.state!==J.opened&&this.props.editMenuList&&setTimeout(()=>this.props.setEditMenuList(!1)),this.state.filterOpened&&!this.isSwipeable()&&this.props.state!==J.opened&&this.closeFilter()}getTabsLayoutStateId(){return`${this.props.adminInstance}.info.uiTabsVisible`}static parseTabsLayout(e){try{let t=typeof e==`string`?JSON.parse(e):e;if(!Array.isArray(t))return null;let n=new Set;return t.filter(e=>e&&typeof e==`object`&&typeof e.name==`string`).map(e=>({name:String(e.name),visible:e.visible!==!1,...typeof e.color==`string`?{color:e.color}:{}})).filter(e=>!n.has(e.name)&&(n.add(e.name),!0))}catch{return null}}async getTabs(t,n){let r=++this.tabsRun;this.tabsRetryTimer&&=(clearTimeout(this.tabsRetryTimer),null);try{let i=await this.props.socket.getCompactInstances(t||n),a=[],o=new Set([`backitup`,`backup`,`nexowatt-backup`,`eos-backup`]);i&&Object.keys(i).forEach(e=>{let t=i[e],n=e.replace(/^system\.adapter\./,``).replace(/\.\d+$/,``).toLowerCase();if(o.has(n)&&t.enabled!==!0||!(t!=null&&t.adminTab))return;let r=`tab-${e.replace(`system.adapter.`,``).replace(/\.\d+$/,``)}`,s=t.adminTab.singleton,c;if(!s){let t=e.match(/\.(\d+)$/);t&&(c=parseInt(t[1],10),r+=`-${c}`)}let l=a.find(e=>e.name===r);if(l){var u;(u=l.adminTabInstances)==null||u.push(e.replace(`system.adapter.`,``));return}let d,f;t.adminTab.name?typeof t.adminTab.name==`object`?(f=t.adminTab.name.en||t.name,d=t.adminTab.name&&t.adminTab.name[this.props.lang]?t.adminTab.name[this.props.lang]:t.adminTab.name.en?this.props.t(t.adminTab.name.en):this.props.t(t.name)):(f=t.adminTab.name,d=this.props.t(t.adminTab.name)):(f=t.name,d=this.props.t(t.name));let p;p=Bc[r]?{name:r,...Bc[r]}:{name:r,order:t.adminTab.order===void 0?200:t.adminTab.order,icon:t.adminTab.icon,supportsLoadingMessage:t.adminTab.supportsLoadingMessage},p.icon?typeof p.icon!=`object`&&!p.icon.startsWith(`data:image`)&&!p.icon.includes(`/`)&&(p.icon=`adapter/${t.name}/${p.icon}`):p.icon=`adapter/${t.name}/${t.icon}`,p.title=Rc(r,d||t.name),p.icon=zc(r)||p.icon,p.englishTitle=f,s||c&&(p.title+=` ${c}`,p.englishTitle+=` ${c}`),p.adminTabInstances=[e.replace(`system.adapter.`,``)],a.push(p)});let s=await this.props.instancesWorker.getObjects(n,!0);if(!s)throw Error(`instance objects not available`);let c=Cc(),l=c.map(e=>{var t;return{instanceId:e,common:(t=s[`system.adapter.${e}`])==null?void 0:t.common}}).filter(e=>{var t;return!!((t=e.common)!=null&&(t=t.supportedMessages)!=null&&t.deviceManager)});l.length!==c.length&&wc(l.map(e=>e.instanceId));let u=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-logs`,`tab-files`,`tab-objects`,`tab-hosts`,`tab-users`];await this.isDeviceManagerVisible()&&u.push(`tab-devicemanager`);let d=Object.keys(Bc).filter(e=>u.includes(e)).map(e=>{let t={name:e,...Bc[e]};return t.englishTitle=Nc(e.replace(`tab-`,``).replace(`-0`,``).replace(/-(\d+)$/,` $1`)),t.title=Rc(e,A.t(t.englishTitle)),t.icon=zc(e)||t.icon,t.visible=!0,t});d=d.concat(a),l.forEach(({instanceId:e,common:t},n)=>{var r;let i=e.replace(/\.\d+$/,``),o=(r=e.match(/\.(\d+)$/))==null?void 0:r[1],s=t.titleLang||t.title||t.name||i,c=typeof s==`object`?s[this.props.lang]||s.en||i:this.props.t(s),u=typeof s==`object`?s.en||i:s;o&&(o!==`0`||l.some(t=>t.instanceId!==e&&t.instanceId.startsWith(`${i}.`)))&&(c+=` ${o}`,u+=` ${o}`),a.some(t=>{var n;return(n=t.adminTabInstances)==null?void 0:n.includes(e)})&&(c+=` (${this.props.t(`Devicemanager`)})`,u+=` (Config manager)`);let f;t.icon&&(f=t.icon.startsWith(`data:image`)||t.icon.includes(`/`)?t.icon:`adapter/${t.name}/${t.icon}`),d.push({name:`shortcut-devicemanager-${e}`,order:121+n,icon:f,title:c,englishTitle:u,visible:!0,configManagerInstance:e})}),d=d.filter(e=>!!e&&e.name!==`tab-enums`),d.forEach(e=>e.visible=!0),d.sort((e,t)=>e.order&&t.order?e.order-t.order:e.order?-1:t.order||e.name>t.name?1:e.name<t.name?-1:0);let f=null;try{let t=await this.props.socket.getState(this.getTabsLayoutStateId()),n=e.parseTabsLayout(t==null?void 0:t.val);if(!n){let t=await this.props.socket.getCompactSystemConfig(this.systemConfigFailed);n=e.parseTabsLayout(t.common.tabsVisible)||[]}this.systemConfigFailed=!1,d=e.applySavedTabs(d,n)}catch(e){this.systemConfigFailed=!0,f=e}if(r!==this.tabsRun||this.unmounted)return;this.setState({tabs:d},()=>this.props.provideTabsInfo(this.state.tabs)),f?this.scheduleNextAttempt(f,`Cannot read the saved order of the menu`):this.tabsFailures=0}catch(e){if(r!==this.tabsRun||this.unmounted)return;this.scheduleNextAttempt(e,`Cannot get instances`)}}static applySavedTabs(e,t){e.forEach(e=>{let n=t.find(t=>t.name===e.name);n&&(e.visible=n.visible,e.color=n.color)});let n={};t.forEach((e,t)=>n[e.name]=t);let r=e.filter(e=>n[e.name]!==void 0).sort((e,t)=>n[e.name]-n[t.name]);if(!r.length)return e;let i=new Map,a=null;return e.forEach(e=>{n[e.name]===void 0?i.set(a,[...i.get(a)||[],e]):a=e}),[...i.get(null)||[],...r.flatMap(e=>[e,...i.get(e)||[]])]}scheduleNextAttempt(e,t){if(kc(e)){this.tabsFailures=0,window.alert(`${t}: ${e}`);return}let n=Oc(this.tabsFailures);this.tabsFailures++,this.props.socket.isConnected()?(console.warn(`${t}: ${e}. Next attempt in ${n/1e3} s`),this.tabsRetryTimer=setTimeout(()=>{this.tabsRetryTimer=null,this.getTabs(!0,!0)},n)):console.warn(`${t}: ${e}. Next attempt after the reconnect`)}renderSystemNavigation(){let e=this.props.eosAccessRole;if(![`admin`,`service`,`installer`,`enduser`].includes(e))return null;let t=[`admin`,`service`].includes(e);return M(F,{className:`eos-system-navigation`,children:[T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/`),text:`EOS Dashboard`,icon:T(Wr,{})}),[`admin`,`service`,`installer`].includes(e)?T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/installer/`),text:`EOS Installer`,icon:T(Sr,{})}):null,e===`admin`?M(Me,{children:[T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/devices/`),text:`Devices`,icon:T(Sr,{})}),T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/eebus/`),text:`EEBus`,icon:T(Er,{})}),T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/ocpp/`),text:`OCPP-Ladestationen`,icon:T(Sr,{})}),T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/modules/backup/`),text:`Sicherung`,icon:T(U,{})}),T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/security/tls/`),text:`Zertifikate`,icon:T(Tr,{})}),T(uc,{theme:this.props.theme,compact:!1,onClick:()=>window.location.assign(`/migration/`),text:`Bestandsübernahme`,icon:T(Nr,{})})]}):null,t?M(Me,{children:[T(tc,{name:`admin.appBar.systemSettings`,config:this.props.adminGuiConfig,children:T(uc,{theme:this.props.theme,compact:!1,tabName:`tab-system`,onClick:this.props.onSystemSettings,text:this.props.t(`System`),icon:T(Oe,{})})}),this.props.expertModeControl]}):null]})}renderFooter(){let e=!this.isSwipeable()&&this.props.state!==J.opened,t=this.props.user;return T(F,{className:`eos-drawer-account`,sx:Pc.footer,children:this.props.isSecure?M(Me,{children:[T(uc,{theme:this.props.theme,compact:e,onClick:e=>this.setState({userMenuAnchor:e==null?void 0:e.currentTarget}),text:(t==null?void 0:t.name)||this.props.t(`Logout`),secondaryText:t==null?void 0:t.group,color:t==null?void 0:t.color,icon:T(F,{sx:Pc.userAvatar,children:t!=null&&t.icon?T(nt,{src:t.icon,style:{width:22,height:22,borderRadius:`50%`}}):T(Gt,{sx:{fontSize:15}})})}),T(Qe,{anchorEl:this.state.userMenuAnchor,open:!!this.state.userMenuAnchor,onClose:()=>this.setState({userMenuAnchor:null}),anchorOrigin:{vertical:`center`,horizontal:`right`},transformOrigin:{vertical:`center`,horizontal:`left`},children:M(Lt,{onClick:()=>{this.setState({userMenuAnchor:null}),this.props.onLogout()},children:[T(Nt,{children:T(yt,{fontSize:`small`})}),T(Yt,{children:this.props.t(`ra_Logout`)})]})})]}):null})}renderEditButton(){var e;return((e=this.props.adminGuiConfig.admin)==null||(e=e.menu)==null?void 0:e.editable)===!1||this.props.state!==J.opened?null:T(F,{sx:Pc.editButton,style:{opacity:+!!this.isSwipeable()},ref:this.refEditButton,children:T(_c,{size:`small`,editMenuList:this.props.editMenuList,onClick:()=>this.props.setEditMenuList(!this.props.editMenuList)})})}static matchesFilter(e,t){var n,r;return!!((n=e.title)!=null&&n.toLowerCase().includes(t))||!!((r=e.englishTitle)!=null&&r.toLowerCase().includes(t))||e.name.replace(`tab-`,``).toLowerCase().includes(t)}countVisibleTabs(){var e;let t=(e=this.props.adminGuiConfig.admin)==null?void 0:e.menu;return this.state.tabs.filter(e=>e.visible&&(t==null?void 0:t[e.name])!==!1).length}renderFilter(){return T(I,{variant:`standard`,autoFocus:!0,sx:Pc.filterField,value:this.state.filter,placeholder:this.props.t(`Filter`),onChange:e=>this.setState({filter:e.target.value}),onKeyUp:t=>{if(t.key===`Escape`)this.closeFilter();else if(t.key===`Enter`){let t=this.state.filter.trim().toLowerCase(),n=this.state.tabs.find(n=>n.visible&&t&&e.matchesFilter(n,t));n&&(this.closeFilter(),this.props.handleNavigation(n.name))}},slotProps:{input:{endAdornment:T(k,{tabIndex:-1,size:`small`,title:this.props.t(`ra_Close`),onClick:this.closeFilter,children:T(O,{fontSize:`small`})})}}})}getHeader(){let e=!this.isSwipeable()&&this.props.state!==J.opened;return T(F,{component:`div`,"data-eos-drawer-header":`1`,sx:Pe.getStyle(this.props.theme,Pc.header,this.props.state===J.opened&&this.props.isSecure&&Pc.headerLogout,!this.isSwipeable()&&this.props.state!==J.opened&&Pc.headerCompact),children:this.state.filterOpened?this.renderFilter():M(Me,{children:[this.renderLogo(),!e&&this.countVisibleTabs()>Ac?T(Rt,{title:this.props.t(`Filter menu`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(k,{size:`small`,sx:Pc.filterButton,onClick:()=>this.setState({filterOpened:!0}),children:T(Ve,{fontSize:`small`})})}):null,T(k,{size:`large`,onClick:()=>{this.isSwipeable()||this.props.state===J.compact?this.props.onStateChange(J.closed):this.props.onStateChange(J.compact)},children:T(yr,{})})]})})}renderLogo(){let{state:e,handleNavigation:t}=this.props;return M(`div`,{style:{...Pc.avatarBlock,...Pc.avatarNotVisible,...e===0?Pc.avatarVisible:{display:`none`}},children:[T(`a`,{href:`#tab-intro`,onClick:e=>{e.preventDefault(),t(`tab-intro`)},style:{color:`inherit`,textDecoration:`none`},children:this.props.adminGuiConfig.icon?T(`div`,{style:{height:50,width:102,lineHeight:`50px`},children:T(`img`,{src:this.props.adminGuiConfig.icon,alt:`NexoWatt EOS`,style:{maxWidth:`100%`,maxHeight:`100%`,verticalAlign:`middle`}})}):T(_t,{onClick:()=>t(`tab-intro`),style:Pc.logoSize,alt:`NexoWatt EOS`,src:`img/eos/eos-logo.svg`})}),!this.props.adminGuiConfig.icon&&this.props.versionAdmin&&M(L,{sx:Pc.styleVersion,children:[`v`,this.props.versionAdmin]})]})}isSwipeable(){return this.props.width===`xs`||this.props.width===`sm`}static tabIcon(e){var t;return(t=Bc[e.name])!=null&&t.icon?Bc[e.name].icon:!e.icon&&e.configManagerInstance?T(Sr,{}):T(nt,{style:Pc.icon,src:e.icon})}getNavigationItems(){let{tabs:t,logErrors:n,logWarnings:r}=this.state,{currentTab:i,state:a,handleNavigation:o}=this.props,s={};this.props.hosts.forEach(e=>s[e._id]=e);let c=this.state.filter.trim().toLowerCase();return t.map((l,u)=>{var d,f,p;if(!this.props.editMenuList&&!l.visible||c&&!e.matchesFilter(l,c))return null;let m=(d=this.props.adminGuiConfig.admin)==null?void 0:d.menu;if(m&&m[l.name]===!1)return null;let h=l.configManagerInstance?i===`tab-devicemanager`&&this.props.currentTabId===l.configManagerInstance:i===l.name&&(l.name!==`tab-devicemanager`||!t.some(e=>e.configManagerInstance===this.props.currentTabId));return T(oc,{canDrag:this.props.editMenuList&&!c,name:l.name,iconJSX:e.tabIcon(l),_id:l.name,selected:h,tab:l,compact:!this.isSwipeable()&&a!==J.opened,badgeContent:n||r||0,badgeColor:n?`error`:r?`warn`:``,tabs:t,setEndDrag:()=>this.tabsEditSystemConfig(),setTabs:e=>this.setState({tabs:e}),children:T(uc,{tabName:l.name,editMenuList:this.props.editMenuList,visible:l.visible,color:l.color,editListFunc:(e,t)=>this.tabsEditSystemConfig(u,e,t??void 0),compact:!this.isSwipeable()&&a!==J.opened,onClick:e=>{if(this.state.filterOpened&&this.closeFilter(),l.configManagerInstance){if(e!=null&&e.ctrlKey||e!=null&&e.shiftKey){var t;(t=window.open(`${window.location.pathname}#tab-devicemanager/tab/${l.configManagerInstance}`,l.name))==null||t.focus()}else o(`tab-devicemanager`,`tab`,l.configManagerInstance)}else e!=null&&e.ctrlKey||e!=null&&e.shiftKey?H.getHref(this.props.instancesWorker,l.name,this.props.hostname,s,this.props.adminInstance,this.props.themeType).then(e=>{if(e.href){var t;console.log(e.href),(t=window.open(lr(e.href),l.name))==null||t.focus()}else o(l.name)}):o(l.name)},icon:e.tabIcon(l),text:l.title||``,selected:h,badgeContent:this.badge(l).content,badgeColor:this.badge(l).color,badgeAdditionalContent:(f=this.badge(l))==null?void 0:f.additionalContent,badgeAdditionalColor:(p=this.badge(l))==null?void 0:p.additionalColor,theme:this.props.theme},l.name)},l.name)})}render(){return this.isSwipeable()?M(Fe,{sx:Pe.getStyle(this.props.theme,Pc.root,{"&.MuiSwipeableDrawer-paper":Pc.paper}),anchor:`left`,open:this.props.state!==J.closed,onClose:()=>this.props.onStateChange(J.closed),onOpen:()=>this.props.onStateChange(J.opened),children:[T(hc,{theme:this.props.theme}),this.getHeader(),this.renderSystemNavigation(),M(xe,{style:Pc.list,children:[this.getNavigationItems(),this.renderEditButton()]}),this.renderFooter()]}):M(se,{sx:Pe.getStyle(this.props.theme,Pc.root,this.props.state===J.opened?this.props.editMenuList?Pc.rootEditWidth:Pc.rootFullWidth:Pc.rootCompactWidth,{"& .MuiDrawer-paper":Pc.paper}),variant:`persistent`,anchor:`left`,open:this.props.state!==J.closed,onMouseEnter:()=>this.refEditButton.current&&(this.refEditButton.current.style.opacity=`1`),onMouseLeave:()=>this.refEditButton.current&&(this.refEditButton.current.style.opacity=`0`),children:[T(hc,{theme:this.props.theme}),this.getHeader(),this.renderSystemNavigation(),M(xe,{style:Pc.list,children:[this.getNavigationItems(),this.renderEditButton()]}),this.renderFooter()]})}};Vc.contextType=ti;var Hc=w()(Vc),Uc=187,Wc={root:{left:0,top:0,width:`100%`,height:`100%`,position:`fixed`,background:`rgba(0, 0, 0, .3)`,zIndex:2e4},connecting:{left:`40%`,top:`40%`,width:`20%`,height:`20%`,position:`absolute`},spinner:{animation:`admin-connecting-rotator 1.4s linear infinite`},path:{strokeDasharray:187,strokeDashoffset:0,transformOrigin:`center`,animation:`admin-connecting-dash 1.4s ease-in-out infinite, $colors 5.6s ease-in-out infinite`},text:{position:`absolute`,top:`calc(60% + 16px)`,left:16,right:16,textAlign:`center`},textBox:{display:`inline-block`,padding:`8px 16px`,borderRadius:4,background:`rgba(0, 0, 0, .7)`,color:`#fff`,fontSize:16}};function Gc(e){return M(`div`,{style:Wc.root,children:[T(`style`,{children:`
|
|
23
23
|
' @keyframes admin-connecting-colors {
|
|
24
24
|
0% {
|
|
25
25
|
stroke: #4285F4;
|
|
@@ -39,14 +39,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
39
39
|
}
|
|
40
40
|
@keyframes admin-connecting-dash {
|
|
41
41
|
0% {
|
|
42
|
-
stroke-dashoffset: ${
|
|
42
|
+
stroke-dashoffset: ${Uc};
|
|
43
43
|
}
|
|
44
44
|
50% {
|
|
45
|
-
stroke-dashoffset: ${
|
|
45
|
+
stroke-dashoffset: ${Uc/4};
|
|
46
46
|
transform: rotate(135deg);
|
|
47
47
|
}
|
|
48
48
|
100% {
|
|
49
|
-
stroke-dashoffset: ${
|
|
49
|
+
stroke-dashoffset: ${Uc};
|
|
50
50
|
transform: 'rotate(450deg);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -58,7 +58,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
58
58
|
transform: rotate(270deg);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
`}),E(`div`,{style:xc.connecting,children:E(`svg`,{style:xc.spinner,width:`100%`,height:`100%`,viewBox:`0 0 66 66`,xmlns:`http://www.w3.org/2000/svg`,children:E(`circle`,{style:xc.path,fill:`none`,strokeWidth:`6`,strokeLinecap:`round`,cx:`33`,cy:`33`,r:`30`})})}),e.text?E(`div`,{style:xc.text,children:E(`span`,{style:xc.textBox,children:e.text})}):null]})}var Cc=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAACetAAAnrQFjVoFHAAAPG0lEQVR4nMWbe5DU1ZXHP+f2u3uG9wijQDRr0MijYFddZYaNRGSTLVEwiQmpSHzsRldLI2JKo9E1lMFSiTGwq65JGZVkYyQmQsi6mhhNZsRywUQXXVR0fQEBEXkM3dOP+d2zf9xfz3RPd/+65wH5VjVM/373dc499zxvC4cRytQojJ0K3qkYmYFyAjAZZDTYKIjxm1qQPLAP9D1E3sDal8FsgqZXhSdyh2uNcjgGVU6fhYS+DZEFEAF6AA9QwFogjyNa/R4ChIAIGOP+DAEGKACFDWjhFuGFF4d7rcPKADVtd6LRa93ifRqh2/1havSygNgaLw1oAkLGMdIDyX1X7MZrh2vNw8IANW0PoakljmgP0G5HVCPDBzKgdJYQSNIxNwqSWSO2c8mQFs4QGaCmfRmaWOnEtEdBMiVvD+MyNAkRgRBI5jqxG+8Y4ACDntlNz+kJJLQbYs1u1zXTd56PFFScRMSA7gy6f7zw6qGBjlLrYNaeltkXIE0ZCDVDLgeSZmDbPUwQBdJuDeEkcnSXMufCAY8ykMZq2tagya9AFp9wH3agQx0OpJxuyD8itmNxo50aXrXKnBcgeirkLJjuvjdF/dXgUKr45lD7+hrACAjIUBipCYgZyL0o2nlyIz0amk1lzisQmQr5HjD9nJKA3dcioVngkMIBIO1/H63QbBzxhyzsFYgCSYGRQJNAAgjJwJiiMYiGIf+aaOcn67WuO7JKewdE26GngNN4/VCFAapAVuGAwocKrcLnz4vw1c+G9OzZYQma95k/eqx5qsCPHivAmwpjBUYKJKTPcay76ihEI1B4QbTjtKCWgQxQ034PGvtnyFXZ+SJKGNBL+EcK+5XPXBzlgeujtI4NXLlFEX+MsgXleyyX3pHnwdV5iIljRrJBidAYxMJI7gGxnZfUalVzJOXv/gGJ/toRZDK12vUyQHsU9gMfWM75WpR1K+INrLLfIKXzu++9D69ZneV7t+ZhlMAYQYIFyR8lCUlB0+cKz62v1qI2A2SeQo5ybV+tocUx6QOFSYZ9/5VgVNOAzWvvcOWL0wpGTFyUZscmC+MblYYUxBD9bdWGVReqMuctF8AQsPPF1aYV3lfOWxJCO1OBxO/cY1nxcI72yzMkzzqEzOxCZnUR/XSaU/4xww0/yMvW9zzxCS4hvtd2sP2XKb51Swy2Wzio7k3gIjPQg0rbu9XeVnBFaV+EJH4B3QUwVZReKfFdCtstd62OsfSLsZptl3wny5p7C3BQYYRAyp+3KPlhf8CMrzijyvwlMdYujzMiSZF48f8TgCc3FfjMgm44ysBIqXMaIhCPornFQscjwQyQM9QFNAGi37vz71ge+kmCJX8fqdpuwfVZNtyThxaB0c6siRGnLzLK4kVhutLChnUFOMogxb3OKexT2K1MWxRmy4PJquO/9KbHrNlpOMbAiDpM0BREEP1dWasycVVz+jddtKXdZX2x/T5ZhZ3KTbfHqhL/3JYe5LguNqwtwCcNHGOQlCDGn9yD0EjDf9yc4Fe3x92u+xABiQtMMHCS4ZWNHjKhix/9Z6FinpnHh1j3eAL+bJ30BKIbBDWfurkmA9DECmfqTZXw1D+ZahX2KKecHWL5JZVi/y8P5Gg/M+NE/WhB4lUUlQfe/pIFV4lhRECiAhMEWoWLL+pm4Y3ZinbnzI5w2XUx2KVOsmpBLORAQ98ufdrLAKXd95+l3+6XQoEuIA7/fX+lWF5xVzfLr8/DZP9cmroqui5EBJoFjjWse6jAaZdVKuZ7l8aITjEuoxYkCJIBgzL7wuKTPgkQ/s3X/LWTE9qjsMvy7E8qiV+1tsA9txfgY+LEfRiDo95jMVF44VceS1ZUbtLeDQnYbZ3+qDmQQh7ErC4+KTkCydFgA7S+Ageg5W8Nn5oVKnv3/h7L16/odsoocfjCQom5Y7XmewU2bOwpe9eUMMy/KAr76phGm4OmJnXKzjHAKb8CYCoVTS88hQ8snfdW7v7kz3ZDi4Gm4d35qkgIHGNYsLhSCp5cGYe9CvkADpgeyIOZcyOAURA0fJVjQBDSwJQQUyaWK867Hik4LTx6iKFsgxABmoEQnH9zpVKcuTAMB+sMUgDlKnV5+dNHQ3wCQRxQgI+UVcvCFe+WXZuF8YKEjlxGRIwLjNbeXbnV/74sCh9aZ61qQfOQHAtnjjEQneo/rSP+XcqVnys3e79+vseJW2owZAwRCYHRIjf9oDxKPfWksEuuBEp0we1qbroBb7rz/EwAx7LAsZU7vHRVHlrMsJi7gUIEGCPcem9PxbvjzwgFhzEG39udbjB6fP2cZkaZd0alx7ftNwV3Hv9SSALbvIrVL54fchmoIHhg7CcMKpOqmn5VF+qqB3TB/FPKTd/+LuCQy82rbSAqq5igzvdGEBJIIE9vLpeC+SeHndIOggUNTTRAS3Xf55A67f6uBzs9Jo4vf732mYJLkL4F7PKDlwagigukSq3YIW0stO0HESAp/O4lr+z530yRYIcIHMO1xQDN1bmfh61PJ9H3R6A6isXzyo/AP50TQXUUuqsJ3dYM3Q2uPu8U6qb1fRmjLW81wX4bbL9rIQpvvFveLxE39c26Atps3AjVOCDwpVtqe4al+M7DjbUDIAtzz4tw8ol9JnXax0Oc9YVIuVQ0CgP7qom7V+VZGSxI1PiFSaEv1vWRgpfXFdi0tVLL9se3vpF10V8jsDCxpbJtcxzYPzhdEglVeV53OQJqjV/JLV8g4IqPrYZTvxy8LW2XZVy0lmyQAVFYs7aSqfcti7ljdGCATOiBYydUmbvSZ+sHAboNsL8qt8QAo4DdsPqx6inxnXssG3/WA2P9GKCBKjcJIKdIe5r71+VZ8WN38FtGG/60MeUUb9cAmNANJ59Y7p6/ud26kx0EA7DfIPLnmjVSMQLjhauurK5SJ38+Da0Gog2kqEvHHCeQVi79Ro4br86KzHQZkZnHh3j0ZwnY2UiGx0/OpJWzTy8/A51bvPpRqYDILgP6Tu0iscElMOMiC28oDzx++nQB7zVg1MCDIAkJMkKQVgMnGDiktJ7nmPCFuRFuWhGD7Ypm6zAhD8SF8WPKCfjlH7xgB83ip/7eMVh53X2x1akQAcYK6+7PcyDdJ+Nf/loWJvgFiv6DDwASFjhK2PVHZe6VjsnLL4lx7sUR2KlokGk8oJy2sNJDXf9EoS/zXAshsPqaAXnZl4CAYkZcYJxh+ledQrzuvqwzM/25PMiQQCIu9/fsYwUuXen0zeMr4kybG4Ld1XN92uOKMT+8voq2e1shsDDlX8SKvGxg71t+zbNGD+PTNRre32yZf02GO+4swLiAnN8ApQD8bM8xwv0rc6z6ufNitjycpGWacVXlEhSzU5xgmHpcOQOuuy/naoiBAVrcOUqJbQKg0vYkROaD7QJrKoXB+q5Sj/b5TJGA7I8yiMsnJW7y+5aOp1O0Tw/heZbwjAwyrm8yzSlss7z4fBN/PaV8IjmhC1KCNAcwQFLgPSvaOdd1VrnTiUQtinwpkIggUf8TRPwgIYI7u0cb5ixI8/gfPMJTM2U2XT2Xlp99friC+J/+tuBS7EH5CU8gCioroeTQqpypkPdAs9V3r85NkFK73XAdvwZ6JaE4ZsqvKFl1Ob8I6MuVal5O6HL3CEYG7L5NQMKI/kagjNLcBghX8yl91CBKFTSjznbvt7BX3S4NASIgTU6MpVn6iP9IIQO5zU0VfZauzrlqdr38RNhA5qnitz6qNHahL2rV63x9DUv+VFwo+65l2TURdEszpNRVaQYT2dWasseJPd3w4f80EY2U7/COPZa7l+eCFTOAF4EYaPbC4pPySwnS/h6EJoEGZBNKb4QcdKnyNQ8n+EpJuHzc+Rne6fCgVYaUKtdixXi3Ih8zajsrjLsrF0/rcmIzus5ckgJvl2hna/FJv9pgfp7zoW0dR7q4uR681JEqIx7g7UeT3PX9KOywsMOimYEFOKo4L3CXhf+zXL40ShXiASR5VtqZ8ZF1PFIbdbuv88r6V8wt7X8CMxNsOviCM6AHFEYq2lH14CkgF92W5cFVeafdR4lzN0zlTin03Sg76M77WRdE9anvxmvWvcednWbvVlvdI+2/3lAKvK2inSeVvql2QWIKknwdMv3uA1ZjgDpv7JgZhu0/r217tu+xXL06z2OPFGCHuogwJk7nCK4mmXMKjnHC3IURVl4RrTBzpTjj6xl+v94dM4nUOWNO86M904RnXg1kAIBK2y8gtgjyWTDBqRUt+AoqAbufTXHUmPo28Pn/7eGlbcqejyyehbEjDdM/LsydFW7InY59Ok3+bXdPSGL1iDcQTUB+g2jngv5va3ZWmaN+/jzgKBQbe+puiO2xXPnNGKuurn1dZij4/qMFrl6agxHad1MsCEXRB9HfV21bmzJtOsopRKlf9pGQwBiByYbVd+eRT3Rx//p6WcnGsWGjh8zq4uprsjAeaGmQeEk5pynTWqtVTQYIT+xBu77krqPbBpggIEmBSc70XXp5FpnUxZJbs+zeN/DoKJOFZf+aQ6Z0seBzGReuH+s7Rg3Z1RQkQDMXCJt21Vx2vVHUzFmOxm9yGVtTr9pQ0tH6uf+D6q7LjhBObA+xoC3E7OmGKZOEMSMMBvioC97aoWze2sOGjR6bn/WcXhnnW44kAyu/2STEBUnfJvb5G4JaNjSomrZVaPLKATOhdwCrLvxM4xybblwNoKhfQ7gkbAKXXE3hjp+pd/2tHywUd1667xXbeXm9Hg0P7yQhdpPzt7W+YjziKJ75GEjuNrEdgTtfxID4q7R9EUk+4v84qr6JPGKwBkIJX+FdIGz8caM9B+ykK7NakBEf+D+NC3CWjgQsQAKiBjzQTGuQwquGQdf1nbOUXORLQ87dvTlSsABhCMWcrsiuF+04dzAjDeligzL7r5DQKxCPO91AlgaKckODDYGJ+4Tn0ewMYfPrgx1tWG52KG3nILLOafE84AX8wGIwsAAxCIUd4TlQXSh0rBvqyMN6tUWZcyrCDyEx3S26AHgekAu+glNEmb8kOKJDLkdjgMyrKJcInS8M15oP290eDbUvwcoyiM1wCtPzP8UitFL8x61DcEQWfzQdxkWJ2VcwulK85x46HOs87JeblPkpyJwIzMAwBZiMynjQkfTWIiQHHEB0F/AeljdAt0Bqq/DUwB2vAeD/AZMAyL24M2VfAAAAAElFTkSuQmCC`;function wc(e){let{title:t,description:n,children:r,actions:i,secondaryActions:a,onBack:o,busy:s,wide:c,noPadding:l}=e;return N(Dt,{elevation:0,sx:{height:`100%`,display:`flex`,flexDirection:`column`,overflow:`hidden`,borderRadius:2},children:[E(I,{sx:{flex:1,minHeight:0,overflow:l?`hidden`:`auto`,px:l?0:{xs:2,md:3},py:l?0:{xs:2,md:3}},children:N(I,{sx:{height:`100%`,maxWidth:c?`100%`:900,mx:`auto`,textAlign:`left`,display:`flex`,flexDirection:`column`},children:[t?E(R,{variant:`h5`,component:`h2`,sx:{fontWeight:600,mb:n?.5:2},children:t}):null,n?E(R,{variant:`body2`,component:`div`,sx:{color:`text.secondary`,mb:2,whiteSpace:`pre-wrap`},children:n}):null,E(I,{sx:{flex:1,minHeight:0},children:r})]})}),E(S,{}),N(I,{sx:{display:`flex`,alignItems:`center`,gap:1,flexWrap:`wrap`,px:{xs:1.5,md:2},py:1.5},children:[o?E(H,{color:`grey`,disabled:s,onClick:o,startIcon:E(pe,{}),children:j.t(`Back`)}):null,a,E(I,{sx:{flexGrow:1}}),i]})]})}var Tc=`admin_password_repeat`,Ec=class extends Qt{constructor(e){super(e),this.state={password:e.password,passwordRepeat:e.password,errorPassword:``,errorPasswordRepeat:``,showPassword:!1}}checkPassword(e,t){if(!e&&!t)return``;let n=U.checkPassword(e,t);return n?this.props.t(n):``}isValid(){return!!this.state.password&&this.state.password===this.state.passwordRepeat&&!this.state.errorPassword&&!this.state.errorPasswordRepeat}renderVisibilityButton(){return E(B,{position:`end`,children:E(A,{tabIndex:-1,size:`small`,edge:`end`,disabled:this.props.requesting,"aria-label":this.props.t(`Show password`),onClick:()=>this.setState({showPassword:!this.state.showPassword}),children:this.state.showPassword?E(ht,{}):E(Ye,{})})})}render(){let e=this.state.showPassword?`text`:`password`;return E(wc,{title:this.props.t(`You must set the administrator password`),onBack:this.props.onBack,busy:this.props.requesting,secondaryActions:E(Lt,{title:this.props.t(`If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(`span`,{children:E(H,{variant:`outlined`,color:`grey`,disabled:this.props.requesting,onClick:()=>this.props.onDone(``,!0),startIcon:E(`img`,{src:Cc,style:{width:22},alt:`BackItUp`}),children:this.props.t(`Restore from backup`)})})}),actions:E(H,{color:`primary`,variant:`contained`,loading:this.props.requesting,onClick:()=>this.props.onDone(this.state.password),disabled:!this.isValid(),startIcon:E(Me,{}),children:this.props.t(`Set administrator password`)}),children:N(I,{component:`form`,noValidate:!0,autoComplete:`off`,sx:{display:`flex`,flexDirection:`column`,gap:2,maxWidth:440},children:[E(C,{severity:`info`,variant:`outlined`,children:this.props.t(`Password must be at least 8 characters long and have numbers, upper and lower case letters`)}),E(L,{disabled:!0,label:this.props.t(`Administrator name`),value:`admin`,slotProps:{input:{readOnly:!0}},helperText:this.props.t(`Administrator name cannot be changed`)}),E(L,{autoFocus:!0,disabled:this.props.requesting,label:this.props.t(`Administrator password`),type:e,value:this.state.password,error:!!this.state.errorPassword,helperText:this.state.errorPassword||` `,slotProps:{input:{autoComplete:`new-password`,endAdornment:this.renderVisibilityButton()},htmlInput:{autoComplete:`off`}},onKeyDown:e=>{if(e.key===`Enter`&&this.state.password&&!this.state.errorPassword){var t;(t=window.document.getElementById(Tc))==null||t.focus()}},onChange:e=>this.setState({password:e.target.value,errorPassword:this.checkPassword(e.target.value),errorPasswordRepeat:this.checkPassword(e.target.value,this.state.passwordRepeat)})}),E(L,{disabled:this.props.requesting,label:this.props.t(`Repeat administrator password`),type:e,value:this.state.passwordRepeat,error:!!this.state.errorPasswordRepeat,helperText:this.state.errorPasswordRepeat||` `,slotProps:{input:{autoComplete:`new-password`,endAdornment:this.renderVisibilityButton()},htmlInput:{autoComplete:`off`,id:Tc}},onKeyDown:e=>{e.key===`Enter`&&this.isValid()&&this.props.onDone(this.state.password)},onChange:e=>this.setState({passwordRepeat:e.target.value,errorPasswordRepeat:this.checkPassword(this.state.password,e.target.value)})})]})})}},Dc=class extends Qt{render(){return E(lr,{style:{border:`1px solid`,borderColor:this.props.error?`red`:`#00000000`,minHeight:200,...this.props.style},commands:this.props.onCtrlEnter?[{name:`writeValue`,bindKey:ur,exec:()=>{var e,t;return(e=(t=this.props).onCtrlEnter)==null?void 0:e.call(t)}}]:void 0,mode:this.props.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:this.props.editValueMode,showGutter:this.props.editValueMode,highlightActiveLine:this.props.editValueMode,defaultValue:this.props.defaultValue,theme:this.props.themeType===`dark`?`clouds_midnight`:`chrome`,value:this.props.value,readOnly:!this.props.onChange,onChange:e=>{var t,n;return(t=(n=this.props).onChange)==null?void 0:t.call(n,e)},name:this.props.name||`UNIQUE_ID_OF_DIV1`,fontSize:this.props.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:this.props.editValueMode,tabSize:this.props.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}},Oc={en:`The MIT License (MIT)
|
|
61
|
+
`}),T(`div`,{style:Wc.connecting,children:T(`svg`,{style:Wc.spinner,width:`100%`,height:`100%`,viewBox:`0 0 66 66`,xmlns:`http://www.w3.org/2000/svg`,children:T(`circle`,{style:Wc.path,fill:`none`,strokeWidth:`6`,strokeLinecap:`round`,cx:`33`,cy:`33`,r:`30`})})}),e.text?T(`div`,{style:Wc.text,children:T(`span`,{style:Wc.textBox,children:e.text})}):null]})}var Kc=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAACetAAAnrQFjVoFHAAAPG0lEQVR4nMWbe5DU1ZXHP+f2u3uG9wijQDRr0MijYFddZYaNRGSTLVEwiQmpSHzsRldLI2JKo9E1lMFSiTGwq65JGZVkYyQmQsi6mhhNZsRywUQXXVR0fQEBEXkM3dOP+d2zf9xfz3RPd/+65wH5VjVM/373dc499zxvC4cRytQojJ0K3qkYmYFyAjAZZDTYKIjxm1qQPLAP9D1E3sDal8FsgqZXhSdyh2uNcjgGVU6fhYS+DZEFEAF6AA9QwFogjyNa/R4ChIAIGOP+DAEGKACFDWjhFuGFF4d7rcPKADVtd6LRa93ifRqh2/1havSygNgaLw1oAkLGMdIDyX1X7MZrh2vNw8IANW0PoakljmgP0G5HVCPDBzKgdJYQSNIxNwqSWSO2c8mQFs4QGaCmfRmaWOnEtEdBMiVvD+MyNAkRgRBI5jqxG+8Y4ACDntlNz+kJJLQbYs1u1zXTd56PFFScRMSA7gy6f7zw6qGBjlLrYNaeltkXIE0ZCDVDLgeSZmDbPUwQBdJuDeEkcnSXMufCAY8ykMZq2tagya9AFp9wH3agQx0OpJxuyD8itmNxo50aXrXKnBcgeirkLJjuvjdF/dXgUKr45lD7+hrACAjIUBipCYgZyL0o2nlyIz0amk1lzisQmQr5HjD9nJKA3dcioVngkMIBIO1/H63QbBzxhyzsFYgCSYGRQJNAAgjJwJiiMYiGIf+aaOcn67WuO7JKewdE26GngNN4/VCFAapAVuGAwocKrcLnz4vw1c+G9OzZYQma95k/eqx5qsCPHivAmwpjBUYKJKTPcay76ihEI1B4QbTjtKCWgQxQ034PGvtnyFXZ+SJKGNBL+EcK+5XPXBzlgeujtI4NXLlFEX+MsgXleyyX3pHnwdV5iIljRrJBidAYxMJI7gGxnZfUalVzJOXv/gGJ/toRZDK12vUyQHsU9gMfWM75WpR1K+INrLLfIKXzu++9D69ZneV7t+ZhlMAYQYIFyR8lCUlB0+cKz62v1qI2A2SeQo5ybV+tocUx6QOFSYZ9/5VgVNOAzWvvcOWL0wpGTFyUZscmC+MblYYUxBD9bdWGVReqMuctF8AQsPPF1aYV3lfOWxJCO1OBxO/cY1nxcI72yzMkzzqEzOxCZnUR/XSaU/4xww0/yMvW9zzxCS4hvtd2sP2XKb51Swy2Wzio7k3gIjPQg0rbu9XeVnBFaV+EJH4B3QUwVZReKfFdCtstd62OsfSLsZptl3wny5p7C3BQYYRAyp+3KPlhf8CMrzijyvwlMdYujzMiSZF48f8TgCc3FfjMgm44ysBIqXMaIhCPornFQscjwQyQM9QFNAGi37vz71ge+kmCJX8fqdpuwfVZNtyThxaB0c6siRGnLzLK4kVhutLChnUFOMogxb3OKexT2K1MWxRmy4PJquO/9KbHrNlpOMbAiDpM0BREEP1dWasycVVz+jddtKXdZX2x/T5ZhZ3KTbfHqhL/3JYe5LguNqwtwCcNHGOQlCDGn9yD0EjDf9yc4Fe3x92u+xABiQtMMHCS4ZWNHjKhix/9Z6FinpnHh1j3eAL+bJ30BKIbBDWfurkmA9DECmfqTZXw1D+ZahX2KKecHWL5JZVi/y8P5Gg/M+NE/WhB4lUUlQfe/pIFV4lhRECiAhMEWoWLL+pm4Y3ZinbnzI5w2XUx2KVOsmpBLORAQ98ufdrLAKXd95+l3+6XQoEuIA7/fX+lWF5xVzfLr8/DZP9cmroqui5EBJoFjjWse6jAaZdVKuZ7l8aITjEuoxYkCJIBgzL7wuKTPgkQ/s3X/LWTE9qjsMvy7E8qiV+1tsA9txfgY+LEfRiDo95jMVF44VceS1ZUbtLeDQnYbZ3+qDmQQh7ErC4+KTkCydFgA7S+Ageg5W8Nn5oVKnv3/h7L16/odsoocfjCQom5Y7XmewU2bOwpe9eUMMy/KAr76phGm4OmJnXKzjHAKb8CYCoVTS88hQ8snfdW7v7kz3ZDi4Gm4d35qkgIHGNYsLhSCp5cGYe9CvkADpgeyIOZcyOAURA0fJVjQBDSwJQQUyaWK867Hik4LTx6iKFsgxABmoEQnH9zpVKcuTAMB+sMUgDlKnV5+dNHQ3wCQRxQgI+UVcvCFe+WXZuF8YKEjlxGRIwLjNbeXbnV/74sCh9aZ61qQfOQHAtnjjEQneo/rSP+XcqVnys3e79+vseJW2owZAwRCYHRIjf9oDxKPfWksEuuBEp0we1qbroBb7rz/EwAx7LAsZU7vHRVHlrMsJi7gUIEGCPcem9PxbvjzwgFhzEG39udbjB6fP2cZkaZd0alx7ftNwV3Hv9SSALbvIrVL54fchmoIHhg7CcMKpOqmn5VF+qqB3TB/FPKTd/+LuCQy82rbSAqq5igzvdGEBJIIE9vLpeC+SeHndIOggUNTTRAS3Xf55A67f6uBzs9Jo4vf732mYJLkL4F7PKDlwagigukSq3YIW0stO0HESAp/O4lr+z530yRYIcIHMO1xQDN1bmfh61PJ9H3R6A6isXzyo/AP50TQXUUuqsJ3dYM3Q2uPu8U6qb1fRmjLW81wX4bbL9rIQpvvFveLxE39c26Atps3AjVOCDwpVtqe4al+M7DjbUDIAtzz4tw8ol9JnXax0Oc9YVIuVQ0CgP7qom7V+VZGSxI1PiFSaEv1vWRgpfXFdi0tVLL9se3vpF10V8jsDCxpbJtcxzYPzhdEglVeV53OQJqjV/JLV8g4IqPrYZTvxy8LW2XZVy0lmyQAVFYs7aSqfcti7ljdGCATOiBYydUmbvSZ+sHAboNsL8qt8QAo4DdsPqx6inxnXssG3/WA2P9GKCBKjcJIKdIe5r71+VZ8WN38FtGG/60MeUUb9cAmNANJ59Y7p6/ud26kx0EA7DfIPLnmjVSMQLjhauurK5SJ38+Da0Gog2kqEvHHCeQVi79Ro4br86KzHQZkZnHh3j0ZwnY2UiGx0/OpJWzTy8/A51bvPpRqYDILgP6Tu0iscElMOMiC28oDzx++nQB7zVg1MCDIAkJMkKQVgMnGDiktJ7nmPCFuRFuWhGD7Ypm6zAhD8SF8WPKCfjlH7xgB83ip/7eMVh53X2x1akQAcYK6+7PcyDdJ+Nf/loWJvgFiv6DDwASFjhK2PVHZe6VjsnLL4lx7sUR2KlokGk8oJy2sNJDXf9EoS/zXAshsPqaAXnZl4CAYkZcYJxh+ledQrzuvqwzM/25PMiQQCIu9/fsYwUuXen0zeMr4kybG4Ld1XN92uOKMT+8voq2e1shsDDlX8SKvGxg71t+zbNGD+PTNRre32yZf02GO+4swLiAnN8ApQD8bM8xwv0rc6z6ufNitjycpGWacVXlEhSzU5xgmHpcOQOuuy/naoiBAVrcOUqJbQKg0vYkROaD7QJrKoXB+q5Sj/b5TJGA7I8yiMsnJW7y+5aOp1O0Tw/heZbwjAwyrm8yzSlss7z4fBN/PaV8IjmhC1KCNAcwQFLgPSvaOdd1VrnTiUQtinwpkIggUf8TRPwgIYI7u0cb5ixI8/gfPMJTM2U2XT2Xlp99friC+J/+tuBS7EH5CU8gCioroeTQqpypkPdAs9V3r85NkFK73XAdvwZ6JaE4ZsqvKFl1Ob8I6MuVal5O6HL3CEYG7L5NQMKI/kagjNLcBghX8yl91CBKFTSjznbvt7BX3S4NASIgTU6MpVn6iP9IIQO5zU0VfZauzrlqdr38RNhA5qnitz6qNHahL2rV63x9DUv+VFwo+65l2TURdEszpNRVaQYT2dWasseJPd3w4f80EY2U7/COPZa7l+eCFTOAF4EYaPbC4pPySwnS/h6EJoEGZBNKb4QcdKnyNQ8n+EpJuHzc+Rne6fCgVYaUKtdixXi3Ih8zajsrjLsrF0/rcmIzus5ckgJvl2hna/FJv9pgfp7zoW0dR7q4uR681JEqIx7g7UeT3PX9KOywsMOimYEFOKo4L3CXhf+zXL40ShXiASR5VtqZ8ZF1PFIbdbuv88r6V8wt7X8CMxNsOviCM6AHFEYq2lH14CkgF92W5cFVeafdR4lzN0zlTin03Sg76M77WRdE9anvxmvWvcednWbvVlvdI+2/3lAKvK2inSeVvql2QWIKknwdMv3uA1ZjgDpv7JgZhu0/r217tu+xXL06z2OPFGCHuogwJk7nCK4mmXMKjnHC3IURVl4RrTBzpTjj6xl+v94dM4nUOWNO86M904RnXg1kAIBK2y8gtgjyWTDBqRUt+AoqAbufTXHUmPo28Pn/7eGlbcqejyyehbEjDdM/LsydFW7InY59Ok3+bXdPSGL1iDcQTUB+g2jngv5va3ZWmaN+/jzgKBQbe+puiO2xXPnNGKuurn1dZij4/qMFrl6agxHad1MsCEXRB9HfV21bmzJtOsopRKlf9pGQwBiByYbVd+eRT3Rx//p6WcnGsWGjh8zq4uprsjAeaGmQeEk5pynTWqtVTQYIT+xBu77krqPbBpggIEmBSc70XXp5FpnUxZJbs+zeN/DoKJOFZf+aQ6Z0seBzGReuH+s7Rg3Z1RQkQDMXCJt21Vx2vVHUzFmOxm9yGVtTr9pQ0tH6uf+D6q7LjhBObA+xoC3E7OmGKZOEMSMMBvioC97aoWze2sOGjR6bn/WcXhnnW44kAyu/2STEBUnfJvb5G4JaNjSomrZVaPLKATOhdwCrLvxM4xybblwNoKhfQ7gkbAKXXE3hjp+pd/2tHywUd1667xXbeXm9Hg0P7yQhdpPzt7W+YjziKJ75GEjuNrEdgTtfxID4q7R9EUk+4v84qr6JPGKwBkIJX+FdIGz8caM9B+ykK7NakBEf+D+NC3CWjgQsQAKiBjzQTGuQwquGQdf1nbOUXORLQ87dvTlSsABhCMWcrsiuF+04dzAjDeligzL7r5DQKxCPO91AlgaKckODDYGJ+4Tn0ewMYfPrgx1tWG52KG3nILLOafE84AX8wGIwsAAxCIUd4TlQXSh0rBvqyMN6tUWZcyrCDyEx3S26AHgekAu+glNEmb8kOKJDLkdjgMyrKJcInS8M15oP290eDbUvwcoyiM1wCtPzP8UitFL8x61DcEQWfzQdxkWJ2VcwulK85x46HOs87JeblPkpyJwIzMAwBZiMynjQkfTWIiQHHEB0F/AeljdAt0Bqq/DUwB2vAeD/AZMAyL24M2VfAAAAAElFTkSuQmCC`;function qc(e){let{title:t,description:n,children:r,actions:i,secondaryActions:a,onBack:o,busy:s,wide:c,noPadding:l}=e;return M(Ot,{elevation:0,sx:{height:`100%`,display:`flex`,flexDirection:`column`,overflow:`hidden`,borderRadius:2},children:[T(F,{sx:{flex:1,minHeight:0,overflow:l?`hidden`:`auto`,px:l?0:{xs:2,md:3},py:l?0:{xs:2,md:3}},children:M(F,{sx:{height:`100%`,maxWidth:c?`100%`:900,mx:`auto`,textAlign:`left`,display:`flex`,flexDirection:`column`},children:[t?T(L,{variant:`h5`,component:`h2`,sx:{fontWeight:600,mb:n?.5:2},children:t}):null,n?T(L,{variant:`body2`,component:`div`,sx:{color:`text.secondary`,mb:2,whiteSpace:`pre-wrap`},children:n}):null,T(F,{sx:{flex:1,minHeight:0},children:r})]})}),T(S,{}),M(F,{sx:{display:`flex`,alignItems:`center`,gap:1,flexWrap:`wrap`,px:{xs:1.5,md:2},py:1.5},children:[o?T(V,{color:`grey`,disabled:s,onClick:o,startIcon:T(me,{}),children:A.t(`Back`)}):null,a,T(F,{sx:{flexGrow:1}}),i]})]})}var Jc=`admin_password_repeat`,Yc=class extends $t{constructor(e){super(e),this.state={password:e.password,passwordRepeat:e.password,errorPassword:``,errorPasswordRepeat:``,showPassword:!1}}checkPassword(e,t){if(!e&&!t)return``;let n=H.checkPassword(e,t);return n?this.props.t(n):``}isValid(){return!!this.state.password&&this.state.password===this.state.passwordRepeat&&!this.state.errorPassword&&!this.state.errorPasswordRepeat}renderVisibilityButton(){return T(z,{position:`end`,children:T(k,{tabIndex:-1,size:`small`,edge:`end`,disabled:this.props.requesting,"aria-label":this.props.t(`Show password`),onClick:()=>this.setState({showPassword:!this.state.showPassword}),children:this.state.showPassword?T(gt,{}):T(Xe,{})})})}render(){let e=this.state.showPassword?`text`:`password`;return T(qc,{title:this.props.t(`You must set the administrator password`),onBack:this.props.onBack,busy:this.props.requesting,secondaryActions:T(Rt,{title:this.props.t(`If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(`span`,{children:T(V,{variant:`outlined`,color:`grey`,disabled:this.props.requesting,onClick:()=>this.props.onDone(``,!0),startIcon:T(`img`,{src:Kc,style:{width:22},alt:`BackItUp`}),children:this.props.t(`Restore from backup`)})})}),actions:T(V,{color:`primary`,variant:`contained`,loading:this.props.requesting,onClick:()=>this.props.onDone(this.state.password),disabled:!this.isValid(),startIcon:T(Ne,{}),children:this.props.t(`Set administrator password`)}),children:M(F,{component:`form`,noValidate:!0,autoComplete:`off`,sx:{display:`flex`,flexDirection:`column`,gap:2,maxWidth:440},children:[T(C,{severity:`info`,variant:`outlined`,children:this.props.t(`Password must be at least 8 characters long and have numbers, upper and lower case letters`)}),T(I,{disabled:!0,label:this.props.t(`Administrator name`),value:`admin`,slotProps:{input:{readOnly:!0}},helperText:this.props.t(`Administrator name cannot be changed`)}),T(I,{autoFocus:!0,disabled:this.props.requesting,label:this.props.t(`Administrator password`),type:e,value:this.state.password,error:!!this.state.errorPassword,helperText:this.state.errorPassword||` `,slotProps:{input:{autoComplete:`new-password`,endAdornment:this.renderVisibilityButton()},htmlInput:{autoComplete:`off`}},onKeyDown:e=>{if(e.key===`Enter`&&this.state.password&&!this.state.errorPassword){var t;(t=window.document.getElementById(Jc))==null||t.focus()}},onChange:e=>this.setState({password:e.target.value,errorPassword:this.checkPassword(e.target.value),errorPasswordRepeat:this.checkPassword(e.target.value,this.state.passwordRepeat)})}),T(I,{disabled:this.props.requesting,label:this.props.t(`Repeat administrator password`),type:e,value:this.state.passwordRepeat,error:!!this.state.errorPasswordRepeat,helperText:this.state.errorPasswordRepeat||` `,slotProps:{input:{autoComplete:`new-password`,endAdornment:this.renderVisibilityButton()},htmlInput:{autoComplete:`off`,id:Jc}},onKeyDown:e=>{e.key===`Enter`&&this.isValid()&&this.props.onDone(this.state.password)},onChange:e=>this.setState({passwordRepeat:e.target.value,errorPasswordRepeat:this.checkPassword(this.state.password,e.target.value)})})]})})}},Xc=class extends $t{render(){return T(dr,{style:{border:`1px solid`,borderColor:this.props.error?`red`:`#00000000`,minHeight:200,...this.props.style},commands:this.props.onCtrlEnter?[{name:`writeValue`,bindKey:fr,exec:()=>{var e,t;return(e=(t=this.props).onCtrlEnter)==null?void 0:e.call(t)}}]:void 0,mode:this.props.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:this.props.editValueMode,showGutter:this.props.editValueMode,highlightActiveLine:this.props.editValueMode,defaultValue:this.props.defaultValue,theme:this.props.themeType===`dark`?`clouds_midnight`:`chrome`,value:this.props.value,readOnly:!this.props.onChange,onChange:e=>{var t,n;return(t=(n=this.props).onChange)==null?void 0:t.call(n,e)},name:this.props.name||`UNIQUE_ID_OF_DIV1`,fontSize:this.props.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:this.props.editValueMode,tabSize:this.props.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}},Zc={en:`The MIT License (MIT)
|
|
62
62
|
|
|
63
63
|
Copyright © 2014-2024 Denis Haev, 2014 hobbyquaker
|
|
64
64
|
|
|
@@ -131,21 +131,21 @@ Copyright © 2014-2024 Denis Haev, 2014 hobbyquaker
|
|
|
131
131
|
特此向任何得到本软件副本或相关文档的人授权:被授权人有权使用、复制、修改、 合并、出版、发布、散布、再授权和/或贩售软件及软件的副本,及授予被供应人 同等权利,只需服从以下义务:
|
|
132
132
|
在软件和软件的所有副本中都必须包含以上版权声明和本许可声明。
|
|
133
133
|
该软件是"按原样"提供的,没有任何形式的明示或暗示,包括但不限于为特定目的和 不侵权的适销性和适用性的保证担保。在任何情况下,作者或版权持有人,都无权要求 任何索赔,或有关损害赔偿的其他责任。无论在本软件的使用上或其他买卖交易中, 是否涉及合同,侵权或其他行为。
|
|
134
|
-
`},
|
|
135
|
-
`).map((e,t)=>E(R,{variant:`body2`,sx:{mb:1.5},children:e},t))})}render(){return N(wc,{title:this.props.t(`License terms`),onBack:this.props.onBack,busy:this.props.saving,actions:N(je,{children:[E(H,{variant:`outlined`,color:`grey`,disabled:this.props.saving,onClick:()=>this.setState({notAgree:!0}),startIcon:E(k,{}),children:this.props.t(`Not agree`)}),E(H,{variant:`contained`,color:`primary`,loading:this.props.saving,disabled:!this.state.statisticsAccepted,onClick:()=>this.props.onDone({lang:this.props.lang}),startIcon:E(Me,{}),children:this.props.t(`Agree`)})]}),children:[N(I,{sx:{height:`100%`,display:`flex`,flexDirection:`column`,gap:2},children:[N(p,{size:`small`,disabled:this.props.saving,sx:{minWidth:220},children:[E(O,{id:`wizard-language-label`,children:this.props.t(`Language`)}),E(zt,{labelId:`wizard-language-label`,label:this.props.t(`Language`),value:this.props.lang,startAdornment:E(c,{fontSize:`small`,sx:{mr:1,color:`text.secondary`}}),onChange:e=>this.props.onLanguageChange(e.target.value),children:kc.map(e=>E(It,{value:e.id,children:e.title},e.id))})]}),E(I,{sx:{flex:1,minHeight:100},children:this.renderLicenseText()}),N(Dt,{variant:`outlined`,sx:{p:2,borderRadius:2},children:[E(Ae,{control:E(Oe,{autoFocus:!0,disabled:this.props.saving,checked:this.state.statisticsAccepted,onChange:e=>this.setState({statisticsAccepted:e.target.checked})}),label:this.props.t(`I agree with the collection of anonymous statistics.`)}),N(I,{sx:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:2,ml:{xs:0,sm:4}},children:[E(R,{variant:`body2`,sx:{color:`text.secondary`},children:this.props.t(`(This can be disabled later in settings)`)}),E(H,{variant:`outlined`,size:`small`,onClick:()=>this.setState({showStatisticsDialog:!0,requesting:!0},()=>this.readStatistics()),children:this.props.t(`Show sent statistics data`)})]})]})]}),this.renderNotAgree(),this.renderStatisticsDialog()]})}},jc=new URL(`wizard-finish-B2y4teLv.jpg`,import.meta.url).href,Mc=new URL(`wizard-welcome-BhniCBF1.jpg`,import.meta.url).href,Nc=new URL(`logo-vO-KvdxW.svg`,import.meta.url).href,Pc=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgMTYwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik5leG9XYXR0IEVPUyI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImVvc0ciIHgxPSIwIiB5MT0iMCIgeDI9IjEiIHkyPSIxIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMDBmMDlhIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMC41NSIgc3RvcC1jb2xvcj0iIzE0ZDhmZiIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMTZjZmYiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8ZmlsdGVyIGlkPSJnbG93IiB4PSItNTAlIiB5PSItNTAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNCIgcmVzdWx0PSJibHVyIi8+CiAgICAgIDxmZU1lcmdlPjxmZU1lcmdlTm9kZSBpbj0iYmx1ciIvPjxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIvPjwvZmVNZXJnZT4KICAgIDwvZmlsdGVyPgogIDwvZGVmcz4KICA8cmVjdCB3aWR0aD0iNjQwIiBoZWlnaHQ9IjE2MCIgcng9IjI4IiBmaWxsPSIjMDIwOTE0Ii8+CiAgPGNpcmNsZSBjeD0iODAiIGN5PSI4MCIgcj0iNDgiIGZpbGw9InJnYmEoMCwyNDAsMTU0LC4xMikiIHN0cm9rZT0idXJsKCNlb3NHKSIgc3Ryb2tlLXdpZHRoPSI0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8cGF0aCBkPSJNODAgMzh2ODRNNDQgODBoNzJNNTUgNTVjMTQgMTggMzYgMzEgNjEgMzRNNTUgMTA1YzE0LTE4IDM2LTMxIDYxLTM0IiBmaWxsPSJub25lIiBzdHJva2U9InVybCgjZW9zRykiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CiAgPHRleHQgeD0iMTUwIiB5PSI3NiIgZmlsbD0iI2Y1ZmJmZiIgZm9udC1mYW1pbHk9IkludGVyLFNlZ29lIFVJLEFyaWFsLHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMzgiIGZvbnQtd2VpZ2h0PSI4MDAiIGxldHRlci1zcGFjaW5nPSIuNSI+TmV4b1dhdHQgRU9TPC90ZXh0PgogIDx0ZXh0IHg9IjE1MiIgeT0iMTEyIiBmaWxsPSIjN2VlOGMwIiBmb250LWZhbWlseT0iSW50ZXIsU2Vnb2UgVUksQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxOCIgZm9udC13ZWlnaHQ9IjYwMCIgbGV0dGVyLXNwYWNpbmc9IjEuMiI+RU5FUkdZIE9QRVJBVElPTiBTWVNURU08L3RleHQ+Cjwvc3ZnPgo=`;function Fc(e,t){let n=F(t);Yt(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function Ic(e){return Object.freeze({__version:1,map:e})}var Lc=Le(null);function Rc(){let e=Gt(Lc);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}function zc(e){function t(t,n){let{instance:r}=e(t).current;return it(n,()=>r),null}return s(t)}function Bc(e,t){let n=F(void 0);Yt(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function Vc(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}function Hc(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Uc(e,t){return t==null?function(t,n){let r=F(void 0);return r.current||=e(t,n),r}:function(n,r){let i=F(void 0);i.current||=e(n,r);let a=F(n),{instance:o}=i.current;return Yt(function(){a.current!==n&&(t(o,n,a.current),a.current=n)},[o,n,t]),i}}function Wc(e,t){Yt(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function Gc(e){return function(t){let n=Rc(),r=e(Vc(t,n),n);return Fc(n.map,t.attribution),Bc(r.current,t.eventHandlers),Wc(r.current,n),r}}function Kc(e,t){return zc(Gc(Uc(e,t)))}function qc(e,t,n){let{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Jc(){return Rc().map}function Yc({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:a,placeholder:o,style:s,whenReady:c,zoom:l,...u},d){let[f]=z({className:i,id:a,style:s}),[p,m]=z(null),h=F(void 0);it(d,()=>(p==null?void 0:p.map)??null,[p]);let g=_t(r=>{if(r!==null&&!h.current){let i=new ee(r,u);h.current=i,n!=null&&l!=null?i.setView(n,l):e!=null&&i.fitBounds(e,t),c!=null&&i.whenReady(c),m(Ic(i))}},[]);Yt(()=>()=>{p==null||p.map.remove()},[p]);let _=p?Ht.createElement(Lc,{value:p},r):o??null;return Ht.createElement(`div`,{...f,ref:g},_)}var Xc=s(Yc),Zc=Kc(function({url:e,...t},n){return Hc(new Re(e,Vc(t,n)),n)},function(e,t,n){qc(e,t,n);let{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),Qc=y(E(`path`,{d:`m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z`}),`ArrowForward`),$c=y(E(`path`,{d:`M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7`}),`MyLocation`),el=JSON.parse(`[{"name":"Afghanistan","code":"AF"},{"name":"Åland Islands","code":"AX"},{"name":"Albania","code":"AL"},{"name":"Algeria","code":"DZ"},{"name":"American Samoa","code":"AS"},{"name":"Andorra","code":"AD"},{"name":"Angola","code":"AO"},{"name":"Anguilla","code":"AI"},{"name":"Antarctica","code":"AQ"},{"name":"Antigua and Barbuda","code":"AG"},{"name":"Argentina","code":"AR"},{"name":"Armenia","code":"AM"},{"name":"Aruba","code":"AW"},{"name":"Australia","code":"AU"},{"name":"Austria","code":"AT"},{"name":"Azerbaijan","code":"AZ"},{"name":"Bahamas","code":"BS"},{"name":"Bahrain","code":"BH"},{"name":"Bangladesh","code":"BD"},{"name":"Barbados","code":"BB"},{"name":"Belarus","code":"BY"},{"name":"Belgium","code":"BE"},{"name":"Belize","code":"BZ"},{"name":"Benin","code":"BJ"},{"name":"Bermuda","code":"BM"},{"name":"Bhutan","code":"BT"},{"name":"Bolivia","code":"BO"},{"name":"Bosnia and Herzegovina","code":"BA"},{"name":"Botswana","code":"BW"},{"name":"Bouvet Island","code":"BV"},{"name":"Brazil","code":"BR"},{"name":"British Indian Ocean Territory","code":"IO"},{"name":"Brunei Darussalam","code":"BN"},{"name":"Bulgaria","code":"BG"},{"name":"Burkina Faso","code":"BF"},{"name":"Burundi","code":"BI"},{"name":"Cambodia","code":"KH"},{"name":"Cameroon","code":"CM"},{"name":"Canada","code":"CA"},{"name":"Cape Verde","code":"CV"},{"name":"Cayman Islands","code":"KY"},{"name":"Central African Republic","code":"CF"},{"name":"Chad","code":"TD"},{"name":"Chile","code":"CL"},{"name":"China","code":"CN"},{"name":"Christmas Island","code":"CX"},{"name":"Cocos (Keeling) Islands","code":"CC"},{"name":"Colombia","code":"CO"},{"name":"Comoros","code":"KM"},{"name":"Congo","code":"CG"},{"name":"Congo, The Democratic Republic of the","code":"CD"},{"name":"Cook Islands","code":"CK"},{"name":"Costa Rica","code":"CR"},{"name":"Cote D'Ivoire","code":"CI"},{"name":"Croatia","code":"HR"},{"name":"Cuba","code":"CU"},{"name":"Cyprus","code":"CY"},{"name":"Czech Republic","code":"CZ"},{"name":"Denmark","code":"DK"},{"name":"Djibouti","code":"DJ"},{"name":"Dominica","code":"DM"},{"name":"Dominican Republic","code":"DO"},{"name":"Ecuador","code":"EC"},{"name":"Egypt","code":"EG"},{"name":"El Salvador","code":"SV"},{"name":"Equatorial Guinea","code":"GQ"},{"name":"Eritrea","code":"ER"},{"name":"Estonia","code":"EE"},{"name":"Ethiopia","code":"ET"},{"name":"Falkland Islands (Malvinas)","code":"FK"},{"name":"Faroe Islands","code":"FO"},{"name":"Fiji","code":"FJ"},{"name":"Finland","code":"FI"},{"name":"France","code":"FR"},{"name":"French Guiana","code":"GF"},{"name":"French Polynesia","code":"PF"},{"name":"French Southern Territories","code":"TF"},{"name":"Gabon","code":"GA"},{"name":"Gambia","code":"GM"},{"name":"Georgia","code":"GE"},{"name":"Germany","code":"DE"},{"name":"Ghana","code":"GH"},{"name":"Gibraltar","code":"GI"},{"name":"Greece","code":"GR"},{"name":"Greenland","code":"GL"},{"name":"Grenada","code":"GD"},{"name":"Guadeloupe","code":"GP"},{"name":"Guam","code":"GU"},{"name":"Guatemala","code":"GT"},{"name":"Guernsey","code":"GG"},{"name":"Guinea","code":"GN"},{"name":"Guinea-Bissau","code":"GW"},{"name":"Guyana","code":"GY"},{"name":"Haiti","code":"HT"},{"name":"Heard Island and Mcdonald Islands","code":"HM"},{"name":"Holy See (Vatican City State)","code":"VA"},{"name":"Honduras","code":"HN"},{"name":"Hong Kong","code":"HK"},{"name":"Hungary","code":"HU"},{"name":"Iceland","code":"IS"},{"name":"India","code":"IN"},{"name":"Indonesia","code":"ID"},{"name":"Iran, Islamic Republic Of","code":"IR"},{"name":"Iraq","code":"IQ"},{"name":"Ireland","code":"IE"},{"name":"Isle of Man","code":"IM"},{"name":"Israel","code":"IL"},{"name":"Italy","code":"IT"},{"name":"Jamaica","code":"JM"},{"name":"Japan","code":"JP"},{"name":"Jersey","code":"JE"},{"name":"Jordan","code":"JO"},{"name":"Kazakhstan","code":"KZ"},{"name":"Kenya","code":"KE"},{"name":"Kiribati","code":"KI"},{"name":"Korea, Democratic People'S Republic of","code":"KP"},{"name":"Korea, Republic of","code":"KR"},{"name":"Kuwait","code":"KW"},{"name":"Kyrgyzstan","code":"KG"},{"name":"Lao People'S Democratic Republic","code":"LA"},{"name":"Latvia","code":"LV"},{"name":"Lebanon","code":"LB"},{"name":"Lesotho","code":"LS"},{"name":"Liberia","code":"LR"},{"name":"Libyan Arab Jamahiriya","code":"LY"},{"name":"Liechtenstein","code":"LI"},{"name":"Lithuania","code":"LT"},{"name":"Luxembourg","code":"LU"},{"name":"Macao","code":"MO"},{"name":"Macedonia, The Former Yugoslav Republic of","code":"MK"},{"name":"Madagascar","code":"MG"},{"name":"Malawi","code":"MW"},{"name":"Malaysia","code":"MY"},{"name":"Maldives","code":"MV"},{"name":"Mali","code":"ML"},{"name":"Malta","code":"MT"},{"name":"Marshall Islands","code":"MH"},{"name":"Martinique","code":"MQ"},{"name":"Mauritania","code":"MR"},{"name":"Mauritius","code":"MU"},{"name":"Mayotte","code":"YT"},{"name":"Mexico","code":"MX"},{"name":"Micronesia, Federated States of","code":"FM"},{"name":"Moldova, Republic of","code":"MD"},{"name":"Monaco","code":"MC"},{"name":"Mongolia","code":"MN"},{"name":"Montserrat","code":"MS"},{"name":"Morocco","code":"MA"},{"name":"Mozambique","code":"MZ"},{"name":"Myanmar","code":"MM"},{"name":"Namibia","code":"NA"},{"name":"Nauru","code":"NR"},{"name":"Nepal","code":"NP"},{"name":"Netherlands","code":"NL"},{"name":"Netherlands Antilles","code":"AN"},{"name":"New Caledonia","code":"NC"},{"name":"New Zealand","code":"NZ"},{"name":"Nicaragua","code":"NI"},{"name":"Niger","code":"NE"},{"name":"Nigeria","code":"NG"},{"name":"Niue","code":"NU"},{"name":"Norfolk Island","code":"NF"},{"name":"Northern Mariana Islands","code":"MP"},{"name":"Norway","code":"NO"},{"name":"Oman","code":"OM"},{"name":"Pakistan","code":"PK"},{"name":"Palau","code":"PW"},{"name":"Palestinian Territory, Occupied","code":"PS"},{"name":"Panama","code":"PA"},{"name":"Papua New Guinea","code":"PG"},{"name":"Paraguay","code":"PY"},{"name":"Peru","code":"PE"},{"name":"Philippines","code":"PH"},{"name":"Pitcairn","code":"PN"},{"name":"Poland","code":"PL"},{"name":"Portugal","code":"PT"},{"name":"Puerto Rico","code":"PR"},{"name":"Qatar","code":"QA"},{"name":"Reunion","code":"RE"},{"name":"Romania","code":"RO"},{"name":"Russian Federation","code":"RU"},{"name":"RWANDA","code":"RW"},{"name":"Saint Helena","code":"SH"},{"name":"Saint Kitts and Nevis","code":"KN"},{"name":"Saint Lucia","code":"LC"},{"name":"Saint Pierre and Miquelon","code":"PM"},{"name":"Saint Vincent and the Grenadines","code":"VC"},{"name":"Samoa","code":"WS"},{"name":"San Marino","code":"SM"},{"name":"Sao Tome and Principe","code":"ST"},{"name":"Saudi Arabia","code":"SA"},{"name":"Senegal","code":"SN"},{"name":"Serbia and Montenegro","code":"CS"},{"name":"Seychelles","code":"SC"},{"name":"Sierra Leone","code":"SL"},{"name":"Singapore","code":"SG"},{"name":"Slovakia","code":"SK"},{"name":"Slovenia","code":"SI"},{"name":"Solomon Islands","code":"SB"},{"name":"Somalia","code":"SO"},{"name":"South Africa","code":"ZA"},{"name":"South Georgia and the South Sandwich Islands","code":"GS"},{"name":"Spain","code":"ES"},{"name":"Sri Lanka","code":"LK"},{"name":"Sudan","code":"SD"},{"name":"Suriname","code":"SR"},{"name":"Svalbard and Jan Mayen","code":"SJ"},{"name":"Swaziland","code":"SZ"},{"name":"Sweden","code":"SE"},{"name":"Switzerland","code":"CH"},{"name":"Syrian Arab Republic","code":"SY"},{"name":"Taiwan, Province of China","code":"TW"},{"name":"Tajikistan","code":"TJ"},{"name":"Tanzania, United Republic of","code":"TZ"},{"name":"Thailand","code":"TH"},{"name":"Timor-Leste","code":"TL"},{"name":"Togo","code":"TG"},{"name":"Tokelau","code":"TK"},{"name":"Tonga","code":"TO"},{"name":"Trinidad and Tobago","code":"TT"},{"name":"Tunisia","code":"TN"},{"name":"Turkey","code":"TR"},{"name":"Turkmenistan","code":"TM"},{"name":"Turks and Caicos Islands","code":"TC"},{"name":"Tuvalu","code":"TV"},{"name":"Uganda","code":"UG"},{"name":"Ukraine","code":"UA"},{"name":"United Arab Emirates","code":"AE"},{"name":"United Kingdom","code":"GB"},{"name":"United States","code":"US"},{"name":"United States Minor Outlying Islands","code":"UM"},{"name":"Uruguay","code":"UY"},{"name":"Uzbekistan","code":"UZ"},{"name":"Vanuatu","code":"VU"},{"name":"Venezuela","code":"VE"},{"name":"Viet Nam","code":"VN"},{"name":"Virgin Islands, British","code":"VG"},{"name":"Virgin Islands, U.S.","code":"VI"},{"name":"Wallis and Futuna","code":"WF"},{"name":"Western Sahara","code":"EH"},{"name":"Yemen","code":"YE"},{"name":"Zambia","code":"ZM"},{"name":"Zimbabwe","code":"ZW"}]`),tl=[`Germany`,`Austria`,`Switzerland`],nl=`---------`,rl=null;function il(e){let t=j.getLanguage();if((rl==null?void 0:rl.lang)!==t){let n=new Intl.Collator(t),r=el.map(e=>e.name).filter(e=>!tl.includes(e)).sort((t,r)=>n.compare(e(t),e(r)));rl={lang:t,names:[...tl,nl,...r]}}return rl.names}x();var al=[`€`,`$`,`₽`,`₤`,`CHF`],ol=18;function sl(e,t){return e?E(B,{position:`end`,children:E(A,{tabIndex:-1,size:`small`,onClick:t,children:E(k,{fontSize:`small`})})}):null}var cl=class extends Qt{constructor(e){var t,n,r,i,a,o,s,c,l,u;super(e),M(this,`marker`,null),M(this,`map`,null),M(this,`cityTimer`,null),M(this,`latLongTimer`,null),M(this,`positionTimer`,null),M(this,`addressRequestId`,0),M(this,`countries`,void 0),M(this,`onMap`,e=>{e&&this.map!==e&&(this.map=e,this.marker=new D(this.getPosition(),{draggable:!0,title:j.t(`ioBroker location`),alt:j.t(`ioBroker location`),riseOnHover:!0}).addTo(e).on({dragend:e=>{let t=e.target.getLatLng();this.setState({latitude:t.lat,longitude:t.lng})}}),this.positionTimer=setTimeout(()=>{this.positionTimer=null,e.invalidateSize(),this.changeMapPosition(!0)},300))}),this.state={tempUnit:((t=e.settings)==null?void 0:t.tempUnit)||`°C`,currency:((n=e.settings)==null?void 0:n.currency)||`€`,dateFormat:((r=e.settings)==null?void 0:r.dateFormat)||`DD.MM.YYYY`,isFloatComma:((i=e.settings)==null?void 0:i.isFloatComma)??!0,country:((a=e.settings)==null?void 0:a.country)||``,city:((o=e.settings)==null?void 0:o.city)||``,address:((s=e.settings)==null?void 0:s.address)||``,longitude:((c=e.settings)==null?void 0:c.longitude)??``,latitude:((l=e.settings)==null?void 0:l.latitude)??``,firstDayOfWeek:((u=e.settings)==null?void 0:u.firstDayOfWeek)||`monday`,zoom:14},this.countries=il(e.t)}async componentDidMount(){if(!this.props.settings)try{let e=await this.props.socket.getCompactSystemConfig(!0);this.setState({tempUnit:e.common.tempUnit||`°C`,currency:e.common.currency||`€`,dateFormat:e.common.dateFormat||`DD.MM.YYYY`,isFloatComma:e.common.isFloatComma??!0,country:e.common.country||``,city:e.common.city||``,longitude:e.common.longitude??``,latitude:e.common.latitude??``,firstDayOfWeek:e.common.firstDayOfWeek||`monday`},()=>this.getBrowserCoordinates());return}catch(e){console.error(`Cannot read system configuration: ${e.message}`)}this.changeMapPosition(!0)}componentDidUpdate(e){if(e.requesting!==this.props.requesting){if(this.props.requesting){var t;(t=this.marker)==null||(t=t.dragging)==null||t.disable()}else{var n;(n=this.marker)==null||(n=n.dragging)==null||n.enable()}}}componentWillUnmount(){var e;this.cityTimer&&=(clearTimeout(this.cityTimer),null),this.latLongTimer&&=(clearTimeout(this.latLongTimer),null),this.positionTimer&&=(clearTimeout(this.positionTimer),null),(e=this.marker)==null||e.remove(),this.marker=null,this.map=null}getBrowserCoordinates(){window.navigator.geolocation&&(!this.state.longitude||!this.state.latitude)?window.navigator.geolocation.getCurrentPosition(e=>{let t=parseFloat(e.coords.latitude.toFixed(8)),n=parseFloat(e.coords.longitude.toFixed(8));this.setState({latitude:isNaN(t)?``:t,longitude:isNaN(n)?``:n},()=>this.changeMapPosition())},e=>console.warn(`Cannot detect the position: ${e.message}`)):this.changeMapPosition()}getPosition(){let e=parseFloat(this.state.latitude),t=parseFloat(this.state.longitude);return[isNaN(e)?50:e,isNaN(t)?10:t]}changeMapPosition(e){this.latLongTimer&&clearTimeout(this.latLongTimer),this.latLongTimer=setTimeout(()=>{var e,t;this.latLongTimer=null;let n=this.getPosition();(e=this.map)==null||e.flyTo(n,Math.min(this.state.zoom,ol)),(t=this.marker)==null||t.setLatLng(n)},e?0:500)}onChangePosition(e,t){t===`latitude`?this.setState({latitude:e},()=>this.changeMapPosition()):this.setState({longitude:e},()=>this.changeMapPosition())}addressToPosition(e){this.cityTimer&&clearTimeout(this.cityTimer),this.cityTimer=setTimeout(()=>{this.cityTimer=null;let e=`${this.state.country} ${this.state.city}, ${this.state.address}`.trim();if(e===`,`)return;let t=++this.addressRequestId;new qe().search({query:e}).then(e=>{e[0]&&t===this.addressRequestId&&this.setState({latitude:e[0].y,longitude:e[0].x,zoom:ol},()=>this.changeMapPosition(!0))}).catch(e=>console.warn(`Cannot detect the position: ${e}`))},e?0:800)}onChangeAddress(e,t){t===`city`?this.setState({city:e},()=>this.addressToPosition()):t===`address`?this.setState({address:e},()=>this.addressToPosition()):this.setState({country:e},()=>this.addressToPosition())}renderSettings(){let e=this.props.requesting;return N(I,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[N(p,{fullWidth:!0,size:`small`,disabled:e,children:[E(O,{id:`wizard-temp-unit`,children:this.props.t(`Temperature unit`)}),N(zt,{labelId:`wizard-temp-unit`,label:this.props.t(`Temperature unit`),value:this.state.tempUnit,onChange:e=>this.setState({tempUnit:e.target.value}),children:[E(It,{value:`°C`,children:`°C`}),E(It,{value:`°F`,children:`°F`})]})]}),E(ot,{freeSolo:!0,size:`small`,disabled:e,options:al,inputValue:this.state.currency,onInputChange:(e,t)=>this.setState({currency:t}),renderInput:e=>E(L,{...e,label:this.props.t(`Currency`)})}),N(p,{fullWidth:!0,size:`small`,disabled:e,children:[E(O,{id:`wizard-date-format`,children:this.props.t(`Date format`)}),N(zt,{labelId:`wizard-date-format`,label:this.props.t(`Date format`),value:this.state.dateFormat,onChange:e=>this.setState({dateFormat:e.target.value}),children:[E(It,{value:`DD.MM.YYYY`,children:`DD.MM.YYYY`}),E(It,{value:`YYYY.MM.DD`,children:`YYYY.MM.DD`}),E(It,{value:`MM/DD/YYYY`,children:`MM/DD/YYYY`})]})]}),N(p,{fullWidth:!0,size:`small`,disabled:e,children:[E(O,{id:`wizard-float-divider`,children:this.props.t(`Float divider`)}),N(zt,{labelId:`wizard-float-divider`,label:this.props.t(`Float divider`),value:this.state.isFloatComma?`true`:`false`,onChange:e=>this.setState({isFloatComma:e.target.value===`true`}),children:[E(It,{value:`true`,children:`${this.props.t(`comma`)} - 3,14`}),E(It,{value:`false`,children:`${this.props.t(`point`)} - 3.14`})]})]}),N(p,{fullWidth:!0,size:`small`,disabled:e,children:[E(O,{id:`wizard-first-day`,children:this.props.t(`Week starts with`)}),N(zt,{labelId:`wizard-first-day`,label:this.props.t(`Week starts with`),value:this.state.firstDayOfWeek,onChange:e=>this.setState({firstDayOfWeek:e.target.value}),children:[E(It,{value:`monday`,children:this.props.t(`monday`)}),E(It,{value:`sunday`,children:this.props.t(`sunday`)})]})]})]})}renderLocation(){let e=this.props.requesting;return N(I,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[E(ot,{size:`small`,disabled:e,options:this.countries,value:this.state.country||null,getOptionDisabled:e=>e===nl,getOptionLabel:e=>e===`---------`?e:this.props.t(e),onChange:(e,t)=>this.onChangeAddress(t||``,`country`),renderInput:e=>E(L,{...e,label:this.props.t(`Country`)})}),E(L,{size:`small`,disabled:e,label:this.props.t(`City`),value:this.state.city,onChange:e=>this.onChangeAddress(e.target.value,`city`),slotProps:{input:{endAdornment:e?null:sl(this.state.city,()=>this.setState({city:``}))}}}),N(I,{sx:{display:`flex`,alignItems:`flex-start`,gap:1},children:[E(L,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Address`),value:this.state.address,onChange:e=>this.onChangeAddress(e.target.value,`address`),helperText:this.props.t(`Used only to calculate position.`),slotProps:{input:{endAdornment:e?null:sl(this.state.address,()=>this.setState({address:``}))}}}),E(Lt,{title:this.props.t(`Used only to calculate position.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(`span`,{children:E(A,{color:`primary`,disabled:e,onClick:()=>this.addressToPosition(!0),children:E(an,{})})})})]}),N(I,{sx:{display:`flex`,alignItems:`flex-start`,gap:1},children:[E(L,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Longitude`),value:this.state.longitude??``,onChange:e=>this.onChangePosition(e.target.value,`longitude`)}),E(L,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Latitude`),value:this.state.latitude??``,onChange:e=>this.onChangePosition(e.target.value,`latitude`)}),E(Lt,{title:this.props.t(`ioBroker location`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(`span`,{children:E(A,{color:`primary`,disabled:e,onClick:()=>this.setState({latitude:``,longitude:``},()=>this.getBrowserCoordinates()),children:E($c,{})})})})]})]})}render(){return E(wc,{wide:!0,title:this.props.t(`Important main settings`),onBack:this.props.onBack,busy:this.props.requesting,actions:E(H,{variant:`contained`,color:`primary`,loading:this.props.requesting,onClick:()=>this.props.onDone({tempUnit:this.state.tempUnit,currency:this.state.currency,dateFormat:this.state.dateFormat,isFloatComma:this.state.isFloatComma,address:this.state.address,firstDayOfWeek:this.state.firstDayOfWeek,country:this.state.country,city:this.state.city,longitude:parseFloat(this.state.longitude)||0,latitude:parseFloat(this.state.latitude)||0}),startIcon:E(Qc,{}),children:this.props.t(`Next`)}),children:N(I,{sx:{display:`flex`,flexDirection:{xs:`column`,md:`row`},gap:2,height:{xs:`auto`,md:`100%`}},children:[N(I,{sx:{width:{xs:`100%`,md:360},flexShrink:0,overflow:{xs:`visible`,md:`auto`},pr:{xs:0,md:1},pt:1,display:`flex`,flexDirection:`column`,gap:3},children:[this.renderSettings(),this.renderLocation()]}),E(Dt,{variant:`outlined`,sx:{flexGrow:1,height:{xs:320,md:`100%`},minHeight:240,overflow:`hidden`,borderRadius:2},children:E(Xc,{style:{height:`100%`,width:`100%`},center:this.getPosition(),zoom:this.state.zoom,maxZoom:ol,attributionControl:!0,zoomControl:!0,doubleClickZoom:!0,scrollWheelZoom:!0,dragging:!0,easeLinearity:.35,ref:this.onMap,children:E(Zc,{url:`https://{s}.tile.osm.org/{z}/{x}/{y}.png`})})})]})})}},ll=class extends Qt{constructor(e){super(e),this.state={auth:!!e.auth,secure:!!e.secure}}render(){return E(wc,{title:this.props.t(`It is suggested to enable the authentication in admin`),onBack:this.props.onBack,actions:E(H,{color:`primary`,variant:`contained`,onClick:()=>this.props.onDone({auth:this.state.auth,secure:this.state.secure}),startIcon:E(Qc,{}),children:this.props.t(`Next`)}),children:N(I,{sx:{display:`flex`,flexDirection:`column`,gap:2,maxWidth:560},children:[N(Dt,{variant:`outlined`,sx:{p:2,borderRadius:2},children:[E(Ae,{control:E(Ue,{checked:this.state.auth,onChange:()=>this.setState({auth:!this.state.auth})}),label:this.props.t(`Authentication in Admin`)}),E(ke,{children:this.props.t(`Activate the check of password in admin if you plan to access your ioBroker is not in "Demilitarized Zone"`)})]}),E(Dt,{variant:`outlined`,sx:{p:2,borderRadius:2},children:N(p,{fullWidth:!0,size:`small`,children:[E(O,{id:`wizard-certificates-label`,children:this.props.t(`Certificates`)}),N(zt,{labelId:`wizard-certificates-label`,label:this.props.t(`Certificates`),value:this.state.secure?`true`:`false`,onChange:e=>this.setState({secure:e.target.value===`true`}),children:[E(It,{value:`false`,children:this.props.t(`No SSL`)}),E(It,{value:`true`,children:this.props.t(`Use self signed certificates`)})]}),E(ke,{children:this.state.secure?this.props.t(`Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.`):this.props.t(`Your communication with admin is not encrypted`)})]})})]})})}},ul=class extends Qt{render(){let e,t;return this.props.auth?this.props.secure?(e=`info`,t=this.props.t(`Information`)):(e=`warning`,t=this.props.t(`Be aware!`)):(e=`error`,t=this.props.t(`Warning!`)),E(wc,{title:this.props.t(`Important information about port forwarding`),onBack:this.props.onBack,actions:E(H,{color:`primary`,variant:`contained`,onClick:()=>this.props.onDone(),startIcon:E(Me,{}),children:this.props.t(`Understand`)}),children:N(I,{sx:{display:`flex`,flexDirection:`column`,gap:3,maxWidth:700},children:[N(C,{severity:e,children:[E(Ve,{children:t}),this.props.t(`Do not expose iobroker Admin or Web interfaces to the internet directly via the port forwarding!`)]}),N(I,{children:[E(R,{sx:{mb:2},children:this.props.t(`The Cloud services from iobroker.net/pro can help here to do that securely:`)}),N(I,{sx:{display:`flex`,gap:2,flexWrap:`wrap`},children:[E(H,{color:`secondary`,variant:`contained`,onClick:()=>window.open(`https://iobroker.pro`,`help`),startIcon:E(c,{}),children:`ioBroker.pro`}),E(H,{color:`secondary`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net`,`help`),startIcon:E(Fe,{}),children:`ioBroker.net`})]})]})]})})}};async function dl(e,t,n,r,i){try{return await e.getReducedRepository(t,n,r,i)}catch(e){if((e==null?void 0:e.message)!==Ee.NOT_SUPPORTED)throw e}return e.getRepository(t,{repo:n.repo,update:n.update},r,i)}async function fl(e,t,n,r,i,a){let o=r.filter(e=>e!==`hosts`&&n[e]&&!n[e].news);if(!o.length||!await e.checkFeatureSupported(`REDUCED_REPOSITORY`))return;let s=await e.getReducedRepository(t,{repo:i.repo,lang:i.lang,adapters:o},!1,a);for(let e of o){var c;(c=s[e])!=null&&c.news&&(n[e]={...n[e],news:s[e].news})}}var pl=[{name:`Cloud`,description:`cloud wizard category`,adapters:[`iot`,`cloud`]},{name:`Logic`,description:`logic wizard category`,adapters:[`javascript`,`scenes`]},{name:`Notifications`,description:`notifications wizard category`,adapters:[`notification-manager`,`telegram`,`email`,`pushover`,`signal-cmb`]},{name:`History data`,description:`history wizard category`,adapters:[`history`,`sql`]},{name:`Weather`,description:`weather wizard category`,adapters:[`weatherunderground`]},{name:`Visualization`,description:`visualization wizard category`,adapters:[`vis-2`]}],ml=class extends Ht.Component{constructor(e){super(e),this.state={repository:{},loading:!0,selectedAdapters:[...e.adapters]}}async componentDidMount(){try{var e;let t=await dl(this.props.socket,this.props.host,{repo:(e=this.props.socket.systemConfig)==null?void 0:e.common.activeRepo,lang:this.props.socket.systemLang,adapters:pl.flatMap(e=>e.adapters)});this.setState({repository:t,loading:!1})}catch(e){this.setState({loading:!1}),console.error(`Could not read repository: ${e.message}`)}}async onDone(){let{selectedAdapters:e}=this.state;this.props.onDone(e);for(let t of e)await new Promise(e=>{this.props.executeCommand(`add ${t}`,this.props.host,e)})}toggleAdapter(e){let t=[...this.state.selectedAdapters],n=t.indexOf(e);n===-1?t.push(e):t.splice(n,1),this.setState({selectedAdapters:t})}renderAdapter(e){var t,n;let r=this.state.repository[e];if(!r)return null;let i=this.props.socket.systemLang,a=((t=r.titleLang)==null?void 0:t[i])||((n=r.titleLang)==null?void 0:n.en)||e,o=this.state.selectedAdapters.includes(e);return N(Bt,{disableGutters:!0,elevation:0,sx:{border:`1px solid`,borderColor:o?`primary.main`:`divider`,borderRadius:2,"&::before":{display:`none`},"&:not(:last-child)":{mb:1}},children:[N(re,{expandIcon:E(l,{}),"aria-controls":`${e}-content`,id:`${e}-header`,sx:{"& .MuiAccordionSummary-content":{alignItems:`center`,gap:1,my:1}},children:[E(Oe,{checked:o,onClick:e=>e.stopPropagation(),onChange:()=>this.toggleAdapter(e),slotProps:{input:{"aria-label":a}}}),E(I,{component:`img`,alt:``,src:r.extIcon,sx:{width:40,height:40,objectFit:`contain`}}),E(R,{sx:{fontWeight:500},children:a})]}),E(he,{sx:{backgroundColor:`action.hover`},children:E(R,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:j.t(`${e} wizard description`)})})]},e)}renderContent(){return E(I,{sx:{display:`flex`,flexDirection:`column`,gap:3},children:pl.map(e=>{let t=e.adapters.map(e=>this.renderAdapter(e)).filter(e=>e!==null);return t.length?N(I,{children:[E(R,{variant:`h6`,sx:{fontWeight:600},children:j.t(e.name)}),E(R,{variant:`body2`,sx:{color:`text.secondary`,mb:1.5},children:j.t(e.description)}),t]},e.name):null})})}render(){let{selectedAdapters:e}=this.state;return E(wc,{title:j.t(`Adapters`),description:j.t(`wizard adapter general description`),onBack:this.props.onBack,actions:E(H,{color:`primary`,variant:`contained`,onClick:()=>this.onDone(),startIcon:e.length?E(Me,{}):E(Qc,{}),children:e.length?`${j.t(`Install selected adapters`)} (${e.length})`:j.t(`Next`)}),children:this.state.loading?E(Ie,{}):this.renderContent()})}},hl=y(E(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z`}),`CheckCircle`);x();var gl=[`living_room`,`bedroom`,`bathroom`,`kitchen`,`dining`,`guest_room`,`guest_bathroom`,`anteroom`,`playroom`,`laundry_room`,`boiler_room`,`dressing_room`,`equipment_room`,`locker_room`,`storeroom`,`washroom`],_l=[`living_room`,`bedroom`,`bathroom`,`kitchen`];function vl(e,t){return typeof e==`string`?e:e[t]||e.en||``}var yl=class extends Qt{constructor(e){super(e),M(this,`rooms`,[]),M(this,`importantRooms`,[...gl]),M(this,`toggleRoom`,e=>{let t=[...this.state.selectedRooms],n=t.indexOf(e);n===-1?(t.push(e),t.sort()):t.splice(n,1),this.setState({selectedRooms:t})}),M(this,`createRoomEnums`,async()=>{let{selectedRooms:e}=this.state;this.setState({creating:!0});for(let t of e){let e=this.rooms.find(e=>e._id===t);if(!e)continue;let n=`enum.rooms.${t}`;try{await this.props.socket.getObject(n)||await this.props.socket.setObject(n,{_id:n,type:`enum`,common:{name:e.name,members:[],icon:e.icon},native:{}})}catch(e){console.error(`Error creating room enum ${n}:`,e),this.props.onError(e.message||e.toString())}}this.setState({creating:!1}),this.props.onDone(e)}),this.state={selectedRooms:e.rooms||[..._l],loading:!0,preSelected:JSON.stringify(e.rooms||[]),showMore:!1,creating:!1}}async componentDidMount(){try{this.rooms=Te(`rooms`);let e=[...this.state.selectedRooms],t=await this.props.socket.getObjectViewSystem(`enum`),n=Object.keys(t||{}).filter(e=>e.startsWith(`enum.rooms.`));if(n.length){e=[];for(let r of n){let n=r.replace(`enum.rooms.`,``);if(e.push(n),this.rooms.find(e=>e._id===n))continue;let i=this.rooms.findIndex(e=>vl(e.name,this.props.lang)===vl(t[r].common.name,this.props.lang));i===-1?this.rooms.push({_id:n,name:t[r].common.name||n,icon:t[r].common.icon||``,translatedName:vl(t[r].common.name,this.props.lang)}):(this.importantRooms=this.importantRooms.filter(e=>e!==this.rooms[i]._id),this.rooms[i].icon=t[r].common.icon||this.rooms[i].icon,this.rooms[i]._id=n,this.rooms[i].translatedName=vl(t[r].common.name,this.props.lang)),this.importantRooms.includes(n)||this.importantRooms.push(n)}e.sort()}for(let e of this.rooms)e.translatedName||=vl(e.name,this.props.lang);this.setState({loading:!1,selectedRooms:e,preSelected:this.props.rooms?this.state.preSelected:JSON.stringify(e)})}catch(e){this.setState({loading:!1}),this.props.onError(e.message||e.toString())}}isUnchanged(){return this.state.preSelected===JSON.stringify(this.state.selectedRooms)}renderRoom(e){let t=this.rooms.find(t=>t._id===e);if(!t)return null;let n=this.state.selectedRooms.includes(e);return N(et,{disabled:this.state.creating,onClick:()=>this.toggleRoom(e),sx:{position:`relative`,display:`flex`,flexDirection:`column`,justifyContent:`center`,gap:1,p:1,height:150,borderRadius:2,border:`2px solid`,borderColor:n?`primary.main`:`divider`,backgroundColor:n?`action.selected`:`transparent`,transition:`border-color 0.2s, background-color 0.2s`,"&:hover":{borderColor:n?`primary.main`:`text.disabled`}},children:[n?E(hl,{color:`primary`,sx:{position:`absolute`,top:6,right:6,fontSize:20}}):null,E(tt,{src:t.icon,alt:t.translatedName,style:{width:72,height:72,opacity:n?1:.7}}),E(R,{variant:`body2`,sx:{textAlign:`center`,lineHeight:1.2},children:t.translatedName})]},e)}render(){let e=this.state.showMore?this.rooms.map(e=>e._id).sort((e,t)=>{let n=this.rooms.find(t=>t._id===e),r=this.rooms.find(e=>e._id===t);return((n==null?void 0:n.translatedName)||e).localeCompare((r==null?void 0:r.translatedName)||t,this.props.lang)}):this.importantRooms,t=this.isUnchanged();return E(wc,{title:this.props.t(`Select the rooms in your home`),description:`${this.props.t(`Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.`)}${this.state.showMore?`\n${this.props.t(`If you do not see the room you want to add, please add it in the categories tab.`)}`:``}`,onBack:this.props.onBack,busy:this.state.creating,actions:E(H,{variant:`contained`,color:`primary`,loading:this.state.creating,onClick:this.createRoomEnums,startIcon:E(t?Qc:Me,{}),children:t?this.props.t(`Next`):this.props.t(`Create rooms`)}),children:this.state.loading?E(Ie,{}):N(I,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:1.5},children:[e.map(e=>this.renderRoom(e)),E(et,{disabled:this.state.creating,onClick:()=>this.setState({showMore:!this.state.showMore}),sx:{height:150,borderRadius:2,border:`2px dashed`,borderColor:`divider`,color:`text.secondary`,"&:hover":{borderColor:`text.disabled`}},children:E(R,{variant:`body2`,children:this.state.showMore?this.props.t(`Show less`):this.props.t(`Show more`)})})]})})}};x();var bl=[`welcome`,`license`,`password`,`auth`,`forwarding`,`settings`,`rooms`,`adapters`,`finish`],xl={welcome:`Welcome`,license:`License agreement`,password:`Password`,auth:`Authentication`,forwarding:`Port forwarding`,settings:`Settings`,rooms:`Rooms`,adapters:`Adapters`,finish:`Finish`},Sl=class extends Qt{constructor(e){super(e),M(this,`adminInstance`,null),M(this,`goNext`,()=>{this.setState(e=>({activeStep:Math.min(e.activeStep+1,e.steps.length-1),errorText:``}))}),M(this,`goBack`,()=>{this.setState(e=>({activeStep:Math.max(e.activeStep-1,0),errorText:``}))}),this.state={steps:[...bl],activeStep:0,auth:!1,secure:!1,lang:e.lang||j.getLanguage(),password:``,settings:null,rooms:null,adapters:[],errorText:``,requesting:!1}}async componentDidMount(){try{let e=await this.props.socket.getCurrentInstance(),t=await this.props.socket.getObject(`system.adapter.${e}`);this.adminInstance=t||null;let n=await this.props.socket.getCompactSystemConfig(!0),r=bl.filter(e=>{var t;return e!==`license`||!(n!=null&&(t=n.common)!=null&&t.licenseConfirmed)});this.setState(e=>({auth:!!(t!=null&&t.native.auth),secure:!!(t!=null&&t.native.secure),steps:r,activeStep:Math.min(e.activeStep,r.length-1)}))}catch(e){this.setState({errorText:e.message||e.toString()})}}renderWelcome(){return N(I,{sx:{position:`relative`,height:`100%`,borderRadius:2,overflow:`hidden`,display:`flex`,backgroundImage:`url(${Mc})`,backgroundRepeat:`no-repeat`,backgroundSize:`cover`,backgroundPosition:`center`},children:[E(I,{sx:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(0, 12, 26, 0.35) 0%, rgba(0, 12, 26, 0.85) 100%)`}}),N(I,{sx:{position:`relative`,m:`auto`,p:{xs:2,md:4},maxWidth:680,textAlign:`center`,color:`#fff`},children:[E(I,{component:`img`,src:Pc,alt:`ioBroker`,sx:{width:{xs:200,md:280},maxWidth:`100%`,filter:`brightness(0) invert(1)`,opacity:.95}}),E(R,{variant:`body1`,sx:{mt:3,color:`rgba(255, 255, 255, 0.85)`},children:j.t(`wizard welcome description`)}),E(H,{variant:`contained`,color:`primary`,size:`large`,sx:{mt:4},onClick:this.goNext,endIcon:E(ne,{}),children:j.t(`Start wizard`)})]})]})}renderLicense(){return E(Ac,{t:j.t,socket:this.props.socket,themeType:this.props.themeType,lang:this.state.lang,onLanguageChange:e=>{j.setLanguage(e),this.setState({lang:e})},saving:this.state.requesting,onBack:this.state.activeStep?this.goBack:void 0,onDone:async e=>{this.setState({requesting:!0});try{let t=await this.props.socket.getSystemConfig(!0);t.common.licenseConfirmed=!0,t.common.diag=`extended`,e.lang&&(t.common.language=e.lang),await this.props.socket.setSystemConfig(t),e.lang&&(this.props.socket.systemLang=e.lang),this.setState({lang:e.lang||t.common.language||j.getLanguage(),requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}})}renderPassword(){return E(Ec,{t:j.t,password:this.state.password,requesting:this.state.requesting,onBack:this.state.activeStep?this.goBack:void 0,onDone:async(e,t)=>{if(t)this.props.onNavigate(`tab-backitup-0`);else{this.setState({requesting:!0});try{await this.props.socket.changePassword(`admin`,e),this.setState({password:e,requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}}})}renderSettings(){return E(cl,{t:j.t,socket:this.props.socket,settings:this.state.settings,requesting:this.state.requesting,onBack:this.goBack,onDone:async e=>{this.setState({requesting:!0});try{let t=await this.props.socket.getSystemConfig(!0);Object.assign(t.common,e),await this.props.socket.setSystemConfig(t),this.setState({settings:e,requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}})}renderAuthentication(){return E(ll,{t:j.t,auth:this.state.auth,secure:this.state.secure,onBack:this.goBack,onDone:e=>this.setState(e,()=>this.goNext())})}renderPortForwarding(){return E(ul,{t:j.t,auth:this.state.auth,secure:this.state.secure,onBack:this.goBack,onDone:this.goNext})}renderRooms(){return E(yl,{t:j.t,lang:this.state.lang,socket:this.props.socket,rooms:this.state.rooms,onBack:this.goBack,onError:e=>this.setState({errorText:e}),onDone:e=>this.setState({rooms:e},()=>this.goNext())})}renderAdapters(){return E(ml,{host:this.props.host,socket:this.props.socket,adapters:this.state.adapters,executeCommand:this.props.executeCommand,onBack:this.goBack,onDone:e=>this.setState({adapters:e},()=>this.goNext())})}async onClose(){let e;try{e=await this.props.socket.getState(`system.adapter.discovery.0.alive`)}catch{}let t=`#tab-adapters${e!=null&&e.val?`/discovery`:``}`;if(!this.adminInstance){d.doNavigate(`tab-adapters`,e!=null&&e.val?`discovery`:void 0),this.props.onClose();return}let n=!!this.adminInstance.native.language&&this.adminInstance.native.language!==this.state.lang;if(this.adminInstance.native.secure===this.state.secure&&this.adminInstance.native.auth===this.state.auth&&!n){d.doNavigate(`tab-adapters`,e!=null&&e.val?`discovery`:void 0),this.props.onClose();return}let r,i;if(this.state.secure&&(!this.adminInstance.native.certPublic||!this.adminInstance.native.certPrivate))try{var a,o;let e=await this.props.socket.getCertificates();r=e==null||(a=e.find(e=>e.type===`public`))==null?void 0:a.name,i=e==null||(o=e.find(e=>e.type===`private`))==null?void 0:o.name}catch(e){this.setState({errorText:j.t(`Cannot read certificates: %s`,e.message||e)});return}if(this.state.secure&&(!r||!i))this.setState({secure:!1,errorText:j.t(`Cannot enable authentication as no certificates found!`)});else{this.adminInstance.native.auth=this.state.auth,this.adminInstance.native.secure=this.state.secure,n&&(this.adminInstance.native.language=this.state.lang),this.state.secure&&(this.adminInstance.native.certPublic=this.adminInstance.native.certPublic||r,this.adminInstance.native.certPrivate=this.adminInstance.native.certPrivate||i);try{await this.props.socket.setObject(this.adminInstance._id,this.adminInstance)}catch(e){this.setState({errorText:e.message||e.toString()});return}this.props.onClose(`${this.adminInstance.native.secure?`https`:`http`}://${window.location.host}${sr(t)}`)}}renderFinish(){return N(I,{sx:{position:`relative`,height:`100%`,borderRadius:2,overflow:`hidden`,display:`flex`,backgroundImage:`url(${jc})`,backgroundRepeat:`no-repeat`,backgroundSize:`cover`,backgroundPosition:`center`},children:[E(I,{sx:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.8) 100%)`}}),N(I,{sx:{position:`relative`,m:`auto`,p:{xs:2,md:4},maxWidth:680,textAlign:`center`},children:[E(R,{component:`div`,sx:{fontSize:{xs:24,sm:32,md:40},fontWeight:700,color:`#265063`},children:j.t(`Have fun automating your home with`)}),E(I,{component:`img`,src:Pc,alt:`ioBroker`,sx:{width:{xs:240,md:380},maxWidth:`100%`,mt:2}}),E(I,{children:E(H,{variant:`contained`,color:`primary`,size:`large`,sx:{mt:2},onClick:()=>this.onClose(),startIcon:E(Me,{}),children:j.t(`Finish`)})})]})]})}renderStep(){switch(this.state.steps[this.state.activeStep]){case`welcome`:return this.renderWelcome();case`license`:return this.renderLicense();case`password`:return this.renderPassword();case`auth`:return this.renderAuthentication();case`forwarding`:return this.renderPortForwarding();case`settings`:return this.renderSettings();case`rooms`:return this.renderRooms();case`adapters`:return this.renderAdapters();case`finish`:return this.renderFinish();default:return null}}renderHeader(){return N(I,{sx:{display:`flex`,alignItems:`center`,gap:1,px:{xs:1.5,md:3},py:1.5},children:[E(I,{component:`img`,src:Nc,alt:`logo`,sx:{width:32,height:32,borderRadius:`50%`,background:`#fff`,p:`2px`}}),E(R,{variant:`h6`,component:`h1`,sx:{fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:j.t(`Initial ioBroker setup`)}),E(I,{sx:{flexGrow:1}}),E(te,{t:j.t,toggleTheme:this.props.toggleTheme,themeName:this.props.themeName,size:`small`})]})}renderProgress(){let{steps:e,activeStep:t}=this.state;return N(je,{children:[E(I,{sx:{display:{xs:`none`,md:`block`},px:3,pb:2},children:E(ze,{activeStep:t,alternativeLabel:!0,children:e.map((e,n)=>E(dn,{completed:n<t,children:n<t?E(nt,{onClick:()=>this.setState({activeStep:n,errorText:``}),children:j.t(xl[e])}):E(ie,{children:j.t(xl[e])})},e))})}),N(I,{sx:{display:{xs:`block`,md:`none`},px:2,pb:1.5},children:[N(I,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:1},children:[E(R,{variant:`subtitle2`,sx:{fontWeight:600},children:j.t(xl[e[t]])}),E(R,{variant:`caption`,sx:{color:`text.secondary`,whiteSpace:`nowrap`},children:j.t(`Step %s of %s`,t+1,e.length)})]}),E(Ie,{variant:`determinate`,sx:{mt:.5,borderRadius:1},value:t/(e.length-1)*100})]})]})}render(){return N(u,{open:!0,onClose:()=>{},fullWidth:!0,fullScreen:!0,"aria-labelledby":`wizard-dialog-title`,slotProps:{paper:{sx:{backgroundColor:`background.default`,backgroundImage:`none`}}},children:[N(ce,{id:`wizard-dialog-title`,sx:{p:0,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[this.renderHeader(),this.renderProgress(),E(I,{sx:{flex:1,minHeight:0,px:{xs:1,md:3},pb:{xs:1,md:3}},children:this.renderStep()})]}),E(Ke,{open:!!this.state.errorText,autoHideDuration:1e4,anchorOrigin:{vertical:`bottom`,horizontal:`center`},onClose:()=>this.setState({errorText:``}),children:E(C,{severity:`error`,variant:`filled`,onClose:()=>this.setState({errorText:``}),children:this.state.errorText})})]})}},Cl=y(E(`path`,{d:`m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z`}),`AutoAwesome`),wl=y(E(`path`,{d:`M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z`}),`BarChart`),Tl=y(E(`path`,{d:`M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2m0 13H4v-2h16zm0-5H4V4h16z`}),`CardMembership`),El=y(E(`path`,{d:`M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-5 12H9v-2h6zm5-7H4V4h16z`}),`Inventory2`),Dl=y([E(`path`,{d:`M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z`},`0`),E(`path`,{d:`M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32`},`1`)],`LockPerson`),Ol=y(E(`path`,{d:`M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z`}),`VerifiedUser`),kl=class extends Ht.Component{};x();var Al={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},formControl:{marginRight:8,minWidth:`100%`},selectEmpty:{marginTop:16},map:{borderRadius:5},itemWithIcon:{display:`flex`,alignItems:`center`,gap:8},itemIcon:{width:20,height:20,flexShrink:0}},jl=e=>{var t;let n=Jc();return(t=e.addMap)==null||t.call(e,n),null},Ml=class extends kl{constructor(e){super(e),M(this,`marker`,null),M(this,`map`,null),M(this,`cityTimer`,null),M(this,`latLongTimer`,null),M(this,`onMap`,e=>{if(!this.props.saving&&(!this.map||this.map!==e)){this.map=e;let t=[parseFloat(this.props.data.common.latitude===void 0?`50`:this.props.data.common.latitude)||0,parseFloat(this.props.data.common.longitude===void 0?`10`:this.props.data.common.longitude)||0];this.marker=new D(t,{draggable:this.state.saving,title:j.t(`Resource location`),alt:j.t(`Resource Location`),riseOnHover:!0}).addTo(e).bindPopup(`Popup for any custom information.`).on({dragend:e=>this.onMarkerDragend(e)})}}),M(this,`getCounters`,()=>{let e=il(this.props.t).map(e=>E(It,{value:e,disabled:e===nl,children:e===`---------`?e:this.props.t(e)},e));return N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`country-label`,children:this.props.t(`Country:`)}),E(zt,{disabled:this.props.saving,variant:`standard`,style:Al.formControl,id:`country`,value:this.props.data.common.country,onChange:this.handleChangeCountry,displayEmpty:!0,children:e})]})}),M(this,`handleChangeCountry`,e=>{let t=e.target.value;this.doChange(`country`,t)}),M(this,`onChangeText`,(e,t)=>{let n=e.target.value;this.onChangeInput(n,t),(t===`longitude`||t===`latitude`)&&(this.latLongTimer&&clearTimeout(this.latLongTimer),this.latLongTimer=setTimeout(()=>{var e,t;this.latLongTimer=null,(e=this.map)==null||e.flyTo([parseFloat(this.props.data.common.latitude),parseFloat(this.props.data.common.longitude)]),(t=this.marker)==null||t.setLatLng([parseFloat(this.props.data.common.latitude),parseFloat(this.props.data.common.longitude)])},500))}),M(this,`onChangeInput`,(e,t,n)=>this.doChange(t,e,n)),M(this,`onChangeCity`,e=>{this.onChangeText(e,`city`),this.cityTimer&&clearTimeout(this.cityTimer),this.cityTimer=setTimeout(()=>{this.cityTimer=null,new qe().search({query:e.target.value}).then(e=>{e[0]&&setTimeout(()=>this.onChangeInput(e[0].y,`latitude`,()=>this.onChangeInput(e[0].x,`longitude`,()=>this.onChangeInput(23,`zoom`,()=>{var t,n;(t=this.map)==null||t.flyTo([e[0].y,e[0].x]),(n=this.marker)==null||n.setLatLng([e[0].y,e[0].x])}))),1200)})},500)}),M(this,`handleChange`,(e,t)=>{let n=e.target.value,r=this.getSettings()[t].id;r===`activeRepo`&&!n.toLowerCase().startsWith(`stable`)&&!n.toLowerCase().includes(`default`)?this.setState({confirm:!0,confirmValue:n}):this.doChange(r,n)}),M(this,`doChange`,(e,t,n)=>{let r=U.clone(this.props.data);r.common[e]=t,this.props.onChange(r,null,()=>n&&n())}),M(this,`onMarkerDragend`,e=>{if(!this.props.saving){let t=JSON.parse(JSON.stringify(e.target._latlng));this.doChange(`latitude`,t.lat,()=>this.doChange(`longitude`,t.lng))}}),this.state={zoom:14,confirm:!1,confirmValue:``,saving:this.props.saving}}getSettings(){return[{id:`language`,title:`System language:`,translate:!1,values:[{id:`en`,title:`English`},{id:`de`,title:`Deutsch`},{id:`ru`,title:`русский`},{id:`uk`,title:`український`},{id:`pt`,title:`Portugues`},{id:`nl`,title:`Nederlands`},{id:`fr`,title:`français`},{id:`it`,title:`Italiano`},{id:`es`,title:`Espanol`},{id:`pl`,title:`Polski`},{id:`zh-cn`,title:`简体中文`}]},{id:`tempUnit`,title:`Temperature units`,translate:!1,values:[{id:`°C`,title:`°C`},{id:`°F`,title:`°F`}]},{id:`currency`,title:`Currency sign`,translate:!1,allowText:!0,autocomplete:!0,values:[{id:`€`,title:`€`},{id:`$`,title:`$`},{id:`₽`,title:`₽`},{id:`₤`,title:`₤`},{id:`CHF`,title:`CHF`}]},{id:`dateFormat`,title:`Date format`,translate:!0,values:[{id:`DD.MM.YYYY`,title:`DD.MM.YYYY`},{id:`YYYY.MM.DD`,title:`YYYY.MM.DD`},{id:`MM/DD/YYYY`,title:`MM/DD/YYYY`}]},{id:`isFloatComma`,title:`Float divider sign`,translate:!0,values:[{id:!0,title:`comma`},{id:!1,title:`point`}]},{id:`defaultHistory`,title:`Default History`,values:[{id:``,title:this.props.t(`None`)},...this.props.histories.map(e=>{var t;return{id:e,title:e,icon:(t=this.props.historyIcons)==null?void 0:t[e]}})]},{id:`activeRepo`,title:`Default Repository`,translate:!1,values:U.objectMap(this.props.dataAux.native.repositories,(e,t)=>({id:t,title:t}))},{id:`expertMode`,title:`Expert mode`,values:[{id:!0,title:`on`},{id:!1,title:`off (default)`}]},{id:`tipsDisabled`,title:`Tips at start`,translate:!0,values:[{id:!1,title:`show (default)`},{id:!0,title:`do not show`}]},{id:`defaultLogLevel`,title:`Default log level`,help:`for new instances`,translate:!1,values:[{id:`debug`,title:`debug`},{id:`info`,title:`info`},{id:`warn`,title:`warn`},{id:`error`,title:`error`}]},{id:`firstDayOfWeek`,title:`First day of week`,translate:!0,values:[{id:`monday`,title:`Monday`},{id:`sunday`,title:`Sunday`}]}]}getSelect(e,t){var n;let r=this.props.data.common[e.id];if(e.id===`defaultLogLevel`&&!r&&(r=`info`),e.id===`activeRepo`&&this.props.multipleRepos||(n=this.props.adminGuiConfig.admin)!=null&&n.settings&&this.props.adminGuiConfig.admin.settings[e.id]===!1)return null;if(e.autocomplete&&e.values)return E(P,{size:{sm:6,xs:12},children:E(ot,{freeSolo:!0,disabled:this.props.saving,options:e.values,inputValue:r.toString(),onChange:(e,n)=>{let r=this.getSettings()[t].id;typeof n==`string`?this.doChange(r,n):this.doChange(r,n?n.id:``)},onInputChange:(e,n)=>{let r=this.getSettings()[t].id;this.doChange(r,n)},getOptionLabel:t=>typeof t==`string`?t:e.translate?this.props.t(t.title||t.id.toString()):t.title||t.id.toString(),renderOption:(t,n)=>E(`li`,{...t,children:e.translate?this.props.t(n.title||n.id.toString()):n.title||n.id}),renderInput:t=>E(L,{...t,variant:`standard`,label:this.props.t(e.title)})})},t);if(e.allowText&&r&&!e.values.find(e=>e.id===r))return E(P,{size:{sm:6,xs:12},children:N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`${e.id}-label`,children:this.props.t(e.title)}),E(L,{disabled:this.props.saving,variant:`standard`,id:e.id,value:r.toString(),onChange:e=>this.handleChange(e,t),helperText:e.help?this.props.t(e.help):``,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:r.toString()?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.handleChange({target:{value:``}},t),children:E(k,{})})}):null}}})]})},t);let i=t=>e.translate?this.props.t(t.title||t.id.toString()):t.title||t.id.toString(),a=e.values.some(e=>e.icon),o=e.values.map((e,t)=>E(It,{value:e.id,children:a?N(`span`,{style:Al.itemWithIcon,children:[e.icon?E(tt,{src:e.icon,style:Al.itemIcon}):E(`span`,{style:Al.itemIcon}),i(e)]}):i(e)},t));return E(P,{size:{sm:6,xs:12},children:N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`${e.id}-label`,children:this.props.t(e.title)}),E(zt,{disabled:this.props.saving,variant:`standard`,style:Al.formControl,id:e.id,value:r!==void 0&&r,onChange:e=>this.handleChange(e,t),displayEmpty:!0,renderValue:a?t=>{let n=e.values.find(e=>e.id===t);return n?N(`span`,{style:Al.itemWithIcon,children:[n.icon?E(tt,{src:n.icon,style:Al.itemIcon}):null,i(n)]}):String(t??``)}:void 0,children:o}),e.help?E(ke,{children:this.props.t(e.help)}):null]})},t)}renderDialogConfirm(){return this.state.confirm?E(Zt,{text:this.props.t(`confirm_change_repo`),onClose:e=>{let t=this.state.confirmValue;this.setState({confirm:!1,confirmValue:``},()=>{e&&this.doChange(`activeRepo`,t)})}}):null}render(){let e=this.getSettings().map((e,t)=>this.getSelect(e,t)),t=[parseFloat(this.props.data.common.latitude===void 0?`50`:this.props.data.common.latitude)||0,parseFloat(this.props.data.common.longitude===void 0?`10`:this.props.data.common.longitude)||0],{zoom:n}=this.state;return this.state.saving!==this.props.saving&&setTimeout(()=>{this.setState({saving:this.props.saving},()=>{if(this.state.saving){var e;(e=this.marker)==null||(e=e.dragging)==null||e.disable()}else{var t;(t=this.marker)==null||(t=t.dragging)==null||t.enable()}})},50),N(`div`,{style:Al.tabPanel,children:[this.renderDialogConfirm(),N(P,{container:!0,spacing:3,children:[E(P,{size:{lg:6,md:12},children:N(P,{container:!0,spacing:3,children:[E(P,{size:{xs:12},children:E(L,{disabled:this.props.saving,fullWidth:!0,variant:`standard`,id:`siteName`,label:j.getLanguage()===`de`?`Kunden- / Anlagenname`:`Customer / site name`,value:this.props.data.common.siteName||``,onChange:e=>this.doChange(`siteName`,e.target.value),helperText:this.props.t(`This name will be shown in admin's header. Just to identify the whole installation`),slotProps:{input:{endAdornment:this.props.data.common.siteName?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.doChange(`siteName`,``),children:E(k,{})})}):null}}})}),e]})}),E(P,{size:{lg:6,md:12},children:N(Xc,{style:Al.map,center:t,zoom:n,maxZoom:18,attributionControl:!this.props.saving,zoomControl:!this.props.saving,doubleClickZoom:!this.props.saving,scrollWheelZoom:!this.props.saving,dragging:!this.props.saving,easeLinearity:.35,children:[E(Zc,{url:`https://{s}.tile.osm.org/{z}/{x}/{y}.png`}),E(jl,{addMap:e=>this.onMap(e)})]})})]}),N(P,{container:!0,spacing:6,children:[E(P,{size:{sm:6,xs:12,md:3},children:this.getCounters()}),E(P,{size:{sm:6,xs:12,md:3},children:N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`city-label`,children:this.props.t(`City:`)}),E(L,{disabled:this.props.saving,variant:`standard`,id:`city`,label:this.props.t(`City:`),value:this.props.data.common.city,onChange:e=>this.onChangeCity(e),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:this.props.data.common.city?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeCity({target:{value:``}}),children:E(k,{})})}):null}}})]})}),E(P,{size:{sm:6,xs:12,md:3},children:N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`latitude-label`,children:this.props.t(`Latitude:`)}),E(L,{disabled:this.props.saving,variant:`standard`,id:`latitude`,label:this.props.t(`Latitude:`),value:this.props.data.common.latitude||0,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1}},onChange:e=>this.onChangeText(e,`latitude`)})]})}),E(P,{size:{sm:6,xs:12,md:3},children:N(p,{style:Al.formControl,variant:`standard`,children:[E(O,{shrink:!0,id:`longitude-label`,children:this.props.t(`Longitude:`)}),E(L,{disabled:this.props.saving,variant:`standard`,id:`longitude`,label:this.props.t(`Longitude:`),value:this.props.data.common.longitude||0,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1}},onChange:e=>this.onChangeText(e,`longitude`)})]})})]})]})}},Nl=y(E(`path`,{d:`M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9`}),`SettingsBackupRestore`);x();var Pl={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},table:{display:`flex`,flexDirection:`column`,width:`100%`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`},dragColumn:{width:32},enableColumn:{width:110},stableColumn:{width:80},upgradePolicyColumn:{width:190,textAlign:`center`},buttonColumn:{width:80},nameRow:{width:220},input:{width:`100%`},checkboxError:{"& span:first-child":{border:`2px solid #FF0000`,borderRadius:4}},fabButton:{marginRight:8,width:44,height:44},tooltip:{pointerEvents:`none`}};function Fl(e){return U.objectMap(e,(e,t)=>({title:t,link:e.link}))}function Il(e){let t={};for(let n of e)t[n.title]={link:n.link};return t}var Ll=`repo-row`;function Rl({index:e,disabled:t,dragTitle:n,onMove:r,children:i}){let a=F(null),o=F(null),[,s]=ao({accept:Ll,hover(t,n){if(!a.current||t.index===e)return;let i=t.index,o=e,s=a.current.getBoundingClientRect(),c=(s.bottom-s.top)/2,l=n.getClientOffset();if(!l)return;let u=l.y-s.top;i<o&&u<c||i>o&&u>c||(r(i,o),t.index=o)}}),[{isDragging:c},l,u]=Xa({type:Ll,item:()=>({index:e}),canDrag:()=>!t,collect:e=>({isDragging:e.isDragging()})});return Yt(()=>{l(o),u(s(a))},[l,s,u]),N(Xe,{ref:a,className:`float_row`,style:{opacity:+!c},children:[E(V,{style:Pl.dragColumn,className:`float_cell`,title:n,children:E(`span`,{ref:o,style:{display:`inline-flex`,cursor:t?`default`:`grab`},children:E(bt,{style:{marginTop:8}})})}),i]})}var zl=class extends kl{constructor(e){super(e),M(this,`onAdd`,()=>{let e=U.clone(this.props.data),t=Fl(e.native.repositories);t.push({title:`__`,link:``}),e.native.repositories=Il(t),this.props.onChange(e)}),M(this,`onRestore`,()=>{let e=U.clone(this.props.data);e.native.repositories={stable:{link:`http://download.iobroker.net/sources-dist.json`},beta:{link:`http://download.iobroker.net/sources-dist-latest.json`}};let t=Object.keys(this.props.data.native.repositories).find(t=>this.props.data.native.repositories[t].link===e.native.repositories.stable.link);t&&(e.native.repositories.stable.json&&(e.native.repositories.stable.json=this.props.data.native.repositories[t].json),e.native.repositories.stable.hash&&(e.native.repositories.stable.hash=this.props.data.native.repositories[t].hash),e.native.repositories.stable.time&&(e.native.repositories.stable.time=this.props.data.native.repositories[t].time));let n=Object.keys(this.props.data.native.repositories).find(t=>this.props.data.native.repositories[t].link===e.native.repositories.beta.link);n&&(e.native.repositories.beta.json&&(e.native.repositories.beta.json=this.props.data.native.repositories[n].json),e.native.repositories.beta.hash&&(e.native.repositories.beta.hash=this.props.data.native.repositories[n].hash),e.native.repositories.beta.time&&(e.native.repositories.beta.time=this.props.data.native.repositories[n].time));let r=U.clone(this.props.dataAux);this.props.multipleRepos?(r.common.activeRepo=[`stable`],r.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`},this.props.onChange(e,r)):(r.common.activeRepo=`stable`,this.props.onChange(e,r))}),M(this,`getUpdateDefaultRepo`,(e,t,n,r)=>{let i=U.clone(this.props.dataAux);if(!this.props.multipleRepos)return i.common.activeRepo=e,i;if(t||=U.clone(this.props.data),n!==void 0&&r!==void 0&&typeof i.common.activeRepo!=`string`){let e=i.common.activeRepo.indexOf(n);e!==-1&&(i.common.activeRepo[e]=r)}if(typeof i.common.activeRepo==`string`&&i.common.activeRepo&&(i.common.activeRepo=[i.common.activeRepo]),i.common.activeRepo=i.common.activeRepo||[],typeof i.common.activeRepo!=`string`&&!i.common.activeRepo.includes(e)){let e=Fl(t.native.repositories);i.common.activeRepo.sort((t,n)=>e.findIndex(e=>e.title===t)-e.findIndex(e=>e.title===n))}return i}),M(this,`onMove`,(e,t)=>{let n=U.clone(this.props.data),r=Fl(n.native.repositories),[i]=r.splice(e,1);r.splice(t,0,i),n.native.repositories=Il(r);let a=U.clone(this.props.dataAux);typeof a.common.activeRepo==`string`&&(a.common.activeRepo=[a.common.activeRepo]),a.common.activeRepo.sort((e,t)=>r.findIndex(t=>t.title===e)-r.findIndex(e=>e.title===t)),this.props.onChange(n,a)});let t=(typeof this.props.dataAux.common.activeRepo==`string`?[this.props.dataAux.common.activeRepo]:this.props.dataAux.common.activeRepo).filter(e=>e);this.state={error:!t.length,confirm:!1,confirmValue:null}}onValueChanged(e,t,n){let r=U.clone(this.props.data),i=Fl(r.native.repositories),a=i.find(e=>e.title===t),o=a==null?void 0:a.title;a&&(a[n]=e),r.native.repositories=Il(i);let s;(typeof this.props.dataAux.common.activeRepo==`string`&&this.props.dataAux.common.activeRepo===t||typeof this.props.dataAux.common.activeRepo!=`string`&&this.props.dataAux.common.activeRepo.includes(t))&&n===`title`&&(s=this.getUpdateDefaultRepo(e,r,o,e)),this.props.onChange(r,s)}onDelete(e){let t=U.clone(this.props.data),n=Fl(t.native.repositories),r=n.findIndex(t=>t.title===e);n.splice(r,1),t.native.repositories=Il(n),this.props.dataAux.common.activeRepo===e?Object.keys(t.native.repositories).length?this.props.onChange(t,this.getUpdateDefaultRepo(Object.keys(t.native.repositories)[0])):this.props.onChange(t,this.getUpdateDefaultRepo(``)):this.props.onChange(t)}onChangeActiveRepo(e,t,n){n?this.setState({confirm:!0,confirmValue:{newData:e,error:t}}):this.setState({error:t},()=>this.props.onChange(void 0,e))}renderDialogConfirm(){return this.state.confirm?E(Zt,{text:this.props.t(`confirm_change_repo`),onClose:e=>{let t=this.state.confirmValue;this.setState({confirm:!1,confirmValue:null},()=>{e&&this.setState({error:!!(t!=null&&t.error)},()=>this.props.onChange(void 0,t==null?void 0:t.newData))})}}):null}renderSortableItem(e,t){var n,r,i;let a=!e.title||e.title.trimStart()!==e.title||e.title.length<3&&!!e.title.match(/^\d+$/);return N(Rl,{index:t,disabled:this.props.saving,dragTitle:this.props.t(`Drag and drop to reorder`),onMove:this.onMove,children:[N(V,{style:Pl.enableColumn,className:`float_cell`,children:[t+1,this.props.multipleRepos?E(Oe,{disabled:((n=this.props.adminGuiConfig.admin)==null||(n=n.settings)==null?void 0:n.activeRepo)===!1||this.props.saving,sx:this.state.error?Pl.checkboxError:void 0,title:this.state.error?j.t(`At least one repo must be selected`):``,checked:typeof this.props.dataAux.common.activeRepo==`string`?this.props.dataAux.common.activeRepo===e.title:this.props.dataAux.common.activeRepo.includes(e.title),onChange:()=>{let t=!1,n=U.clone(this.props.dataAux);typeof n.common.activeRepo==`string`&&(n.common.activeRepo=[n.common.activeRepo]);let r=n.common.activeRepo.indexOf(e.title);if(r===-1){n.common.activeRepo.push(e.title);let r=Fl(this.props.data.native.repositories);n.common.activeRepo.sort((e,t)=>r.findIndex(t=>t.title===e)-r.findIndex(e=>e.title===t)),t=e.title.toLowerCase().startsWith(`beta`)}else n.common.activeRepo.splice(r,1);e.title.toLowerCase().startsWith(`beta`)&&n.common.activeRepo.find(e=>e.toLowerCase().startsWith(`stable`))?(r=n.common.activeRepo.findIndex(e=>e.toLowerCase().startsWith(`stable`)),n.common.activeRepo.splice(r,1)):e.title.toLowerCase().startsWith(`stable`)&&n.common.activeRepo.find(e=>e.toLowerCase().startsWith(`beta`))&&(r=n.common.activeRepo.findIndex(e=>e.toLowerCase().startsWith(`beta`)),n.common.activeRepo.splice(r,1));let i=!n.common.activeRepo.length;this.onChangeActiveRepo(n,i,t)}}):null]}),E(V,{style:Pl.stableColumn,className:`float_cell`,children:E(Lt,{title:j.t(`Flag will be automatically detected as repository will be read for the first time`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(`span`,{children:E(Oe,{disabled:!0,checked:(r=this.props.repoInfo[e.title])==null?void 0:r.stable,indeterminate:!this.props.repoInfo[e.title]})})})}),E(V,{style:Pl.upgradePolicyColumn,className:`float_cell`,children:E(Lt,{title:j.t(`Allow automatic adapter upgrades for this repository`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:E(`span`,{children:E(Oe,{disabled:this.props.saving,checked:(i=this.props.dataAux.common)==null||(i=i.adapterAutoUpgrade)==null?void 0:i.repositories[e.title],onChange:t=>{let n=U.clone(this.props.dataAux);n.common.adapterAutoUpgrade||(n.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`}),n.common.adapterAutoUpgrade.repositories[e.title]=t.target.checked,this.props.onChange(this.props.data,n)}})})})}),E(V,{style:Pl.nameRow,className:`float_cell`,children:E(L,{variant:`standard`,disabled:this.props.saving,value:e.title,style:Pl.input,className:`xs-centered`,onChange:t=>this.onValueChanged(t.target.value,e.title,`title`),slotProps:{inputLabel:{shrink:!0},input:{endAdornment:e.title?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onValueChanged(``,e.title,`title`),children:E(k,{})})}):null}},error:a,helperText:a?j.t(`Invalid name`):void 0})}),E(V,{className:`grow_cell float_cell`,children:E(L,{disabled:this.props.saving,variant:`standard`,id:`default_${t}`,value:e.link,style:Pl.input,className:`xs-centered`,onChange:t=>this.onValueChanged(t.target.value,e.title,`link`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:e.link?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onValueChanged(``,e.title,`link`),children:E(k,{})})}):null}}})}),E(V,{style:Pl.buttonColumn,className:`float_cell`,children:E(xe,{disabled:this.props.saving,size:`small`,color:`secondary`,"aria-label":`add`,onClick:()=>this.onDelete(e.title),children:E(T,{})})})]},t)}renderSortableList(e){return N(i,{style:Pl.table,children:[E(qt,{children:N(Xe,{className:`float_row`,children:[E(V,{style:Pl.dragColumn,className:`float_cell`}),E(V,{style:Pl.enableColumn,className:`float_cell`,children:this.props.multipleRepos?j.t(`Active`):``}),E(V,{style:Pl.stableColumn,className:`float_cell`,children:j.t(`Stable`)}),E(V,{style:Pl.upgradePolicyColumn,className:`float_cell`,children:j.t(`Auto-Upgrade`)}),E(V,{style:Pl.nameRow,className:`float_cell`,children:this.props.t(`name`)}),E(V,{className:`grow_cell float_cell`,children:this.props.t(`link`)}),E(V,{style:Pl.buttonColumn,className:`float_cell`,children:` `})]})}),E(dt,{children:e.map((e,t)=>this.renderSortableItem(e,t))})]})}renderAutoUpgradePolicy(){var e,t;let n=((e=this.props.dataAux.common.adapterAutoUpgrade)==null?void 0:e.defaultPolicy)||`none`,r=((t=this.props.dataAux.common.adapterAutoUpgrade)==null?void 0:t.repositories)||{};return N(`div`,{style:{display:`flex`,marginLeft:20,flexDirection:`column`},children:[N(`div`,{style:{display:`flex`,alignItems:`baseline`},children:[E(R,{children:j.t(`Allow only the following upgrades to be performed automatically:`)}),E(zt,{variant:`standard`,sx:{marginLeft:1,marginBottom:1},value:n,disabled:this.props.saving,onChange:e=>{let t=U.clone(this.props.dataAux);t.common.adapterAutoUpgrade||(t.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`}),t.common.adapterAutoUpgrade.defaultPolicy=e.target.value,this.props.onChange(this.props.data,t)},children:cr.map(e=>E(It,{value:e,children:or[e]},e))})]}),E(js,{value:!!(r.beta||r[`Beta (latest)`])&&n!==`none`,children:E(Tt,{type:`warning`,children:j.t(`repo_update_hint`)})}),E(js,{value:n===`major`,children:E(Tt,{type:`warning`,children:j.t(`The current selected configuration will allow to automatically pull in incompatible changes of this adapter!`)})})]})}render(){let e=Fl(this.props.data.native.repositories);return N(`div`,{style:Pl.tabPanel,children:[this.renderDialogConfirm(),N(`div`,{style:Pl.buttonPanel,children:[E(xe,{size:`small`,color:`primary`,disabled:this.props.saving,"aria-label":`add`,onClick:this.onAdd,style:Pl.fabButton,title:this.props.t(`Add new line to the repository list`),children:E(h,{})}),E(xe,{size:`small`,disabled:this.props.saving,onClick:this.onRestore,style:Pl.fabButton,title:this.props.t(`Restore repository list to default`),children:E(Nl,{})}),this.renderAutoUpgradePolicy()]}),E(ma,{backend:U.isTouchDevice()?Qo:Fo,children:E(At,{children:this.renderSortableList(e)})})]})}};x();var Bl={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},table:{display:`flex`,flexDirection:`column`,width:`100%`},input:{width:250,marginRight:16},button:{marginTop:16},uuidGreen:{color:`green`},uuidGrey:{color:`grey`},tableName:{width:200},tableDate:{width:150,textAlign:`right`},tableUuid:{width:300},tableValid:{width:100},tableVersion:{width:50},tableUsedIn:{width:100},tableDiv:{overflow:`auto`,height:`calc(100% - 75px)`},tableCommercial:{width:100},licenseId:{fontSize:10,opacity:.5,fontStyle:`italic`}},Vl=class extends kl{constructor(e){super(e),M(this,`onLicensesChanged`,(e,t)=>{e===`system.licenses`&&(t||={},t.native=t.native||{},t.native.licenses=t.native.licenses||[],JSON.stringify(t.native.licenses)===JSON.stringify(this.state.licenses)?window.alert(this.props.t(`Licenses have not changed`)):(window.alert(this.props.t(`New licenses were stored`)),this.setState({licenses:t.native.licenses})))}),this.state={uuid:``,requesting:!1,licenses:this.props.data.native.licenses||[]}}componentDidMount(){this.props.socket.getObject(`system.meta.uuid`).then(e=>{this.props.socket.subscribeObject(`system.licenses`,this.onLicensesChanged).catch(e=>window.alert(`Cannot subscribe on system.licenses: ${e}`)),this.setState({uuid:e==null?void 0:e.native.uuid})})}componentWillUnmount(){this.props.socket.unsubscribeObject(`system.licenses`,this.onLicensesChanged)}doChange(e,t){let n=Ne.clone(this.props.data);n.native[e]=t,this.props.onChange(n)}async requestLicenses(){this.setState({requesting:!0});try{let e=this.props.data.native.password;if(e===`__SOME_PASSWORD__`){let t=await this.props.socket.getObject(`system.licenses`);e=(t==null?void 0:t.native.login)===this.props.data.native.login?``:await this.props.socket.decrypt(t==null?void 0:t.native.password)}let t=await this.props.socket.updateLicenses(e?this.props.data.native.login:``,e);t==null?this.setState({requesting:!1}):(e&&window.alert(this.props.t(`Licenses were not stored. They will be stored after the settings will be saved`)),this.setState({licenses:t,requesting:!1}))}catch(e){this.setState({requesting:!1}),e===`permissionError`?window.alert(this.props.t(`May not trigger "updateLicenses"`)):e===`Authentication required`?window.alert(this.props.t(`Cannot update licenses: %s`,this.props.t(`Authentication required`))):window.alert(this.props.t(`Cannot update licenses: %s`,e.toString()))}}renderLicenses(){return E(`div`,{style:Bl.tableDiv,children:E(At,{children:N(i,{stickyHeader:!0,size:`small`,children:[E(qt,{children:N(Xe,{children:[E(V,{style:Bl.tableName,children:this.props.t(`Product`)}),E(V,{style:Bl.tableDate,children:this.props.t(`Ordered at`)}),E(V,{style:Bl.tableUuid,children:this.props.t(`UUID`)}),E(V,{style:Bl.tableValid,children:this.props.t(`Valid till`)}),E(V,{style:Bl.tableVersion,children:this.props.t(`V`)}),E(V,{style:Bl.tableUsedIn,children:this.props.t(`Used by`)}),E(V,{style:Bl.tableCommercial,children:this.props.t(`Invoice number`)})]})}),E(dt,{children:this.state.licenses&&this.state.licenses.map(e=>N(Xe,{children:[N(V,{style:Bl.tableName,children:[E(`div`,{children:e.product}),E(`div`,{style:Bl.licenseId,children:e.id})]}),E(V,{style:Bl.tableDate,children:new Date(e.time).toLocaleDateString()}),E(V,{style:{...Bl.tableUuid,...e.uuid&&this.state.uuid===e.uuid?Bl.uuidGreen:e.uuid?Bl.uuidGrey:void 0},children:e.uuid||``}),E(V,{style:Bl.tableValid,children:e.validTill===`0000-00-00 00:00:00`?``:e.validTill||``}),E(V,{style:Bl.tableVersion,children:e.version||``}),E(V,{style:Bl.tableUsedIn,children:e.usedBy||``}),E(V,{style:Bl.tableCommercial,children:e.invoice===`free`?`-`:e.invoice===`MANUALLY_CREATED`?`✓`:e.invoice})]},e.id))})]})})})}render(){return N(`div`,{style:Bl.tabPanel,children:[E(L,{variant:`standard`,style:Bl.input,disabled:this.props.saving||this.state.requesting,value:this.props.data.native.login,helperText:this.props.t(`for ioBroker.net portal`),label:this.props.t(`Login/Email`),onChange:e=>this.doChange(`login`,e.target.value),slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`off`}}}),E(L,{variant:`standard`,disabled:this.props.saving||this.state.requesting,style:Bl.input,type:`password`,value:this.props.data.native.password,helperText:this.props.t(`for ioBroker.net portal`),label:this.props.t(`Password`),onChange:e=>this.doChange(`password`,e.target.value),slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`off`}}}),E(H,{variant:`contained`,startIcon:E(tn,{}),disabled:this.state.requesting||this.props.saving||!this.props.host||!this.props.data.native.password||!this.props.data.native.login,onClick:()=>this.requestLicenses(),style:Bl.button,color:`grey`,children:this.props.t(`Check`)}),this.renderLicenses()]})}},Hl=65536,Ul=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Wl=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0,Gl=e=>typeof e==`string`&&/^[A-Z][A-Z0-9_]{0,79}$/.test(e),Kl=e=>typeof e==`string`&&/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(e);function ql(e){return e instanceof Error&&e.name===`AbortError`?`SERVICE_TIMEOUT`:e instanceof Error&&Gl(e.message)?e.message:`SERVICE_UNAVAILABLE`}function Jl(e){if(!Ul(e)||e.v!==1||typeof e.valid!=`boolean`||!Gl(e.code)||!(e.uuid===null||typeof e.uuid==`string`&&/^(?:[a-z]{2})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e.uuid))||e.edition!==null&&e.edition!==`home`&&e.edition!==`pro`||!(e.expiresAt===null||typeof e.expiresAt==`number`&&Number.isSafeInteger(e.expiresAt)&&e.expiresAt>0&&e.expiresAt<=864e13)||!Ul(e.limits)||!Array.isArray(e.features)||e.features.length>64||!e.features.every(e=>typeof e==`string`&&/^[A-Za-z][A-Za-z0-9]{0,79}$/.test(e))||e.tokenVersion!==null&&e.tokenVersion!==2&&e.tokenVersion!==3||e.scope!==null&&e.scope!==`system`&&e.scope!==`adapters`||typeof e.coreEnabled!=`boolean`||e.valid&&(e.code!==`LICENSE_VALID`||!e.uuid||!e.edition||!Wl(e.limits.chargePoints)||!Wl(e.limits.batteries)||(e.tokenVersion===3?e.scope!==`system`||!e.coreEnabled:e.tokenVersion!==2||e.scope!==`adapters`))||!e.valid&&(e.coreEnabled||e.tokenVersion!==null||e.scope!==null))throw Error(`LICENSE_RESPONSE`);return{valid:e.valid,code:e.code,uuid:e.uuid,edition:e.edition,expiresAt:e.expiresAt,limits:e.valid?{chargePoints:e.limits.chargePoints,batteries:e.limits.batteries}:{},features:e.valid?e.features:[],tokenVersion:e.tokenVersion,scope:e.scope,coreEnabled:e.coreEnabled}}function Y(e,t,n){if(!Array.isArray(e)||e.length>n)throw Error(`TRUST_RESPONSE`);let r=new Set;return e.map(e=>{if(!Ul(e)||!Kl(e.kid)||r.has(e.kid)||typeof e.fingerprint!=`string`||!/^[a-f0-9]{64}$/.test(e.fingerprint)||typeof e.source!=`string`)throw Error(`TRUST_RESPONSE`);let n=t.find(t=>t===e.source);if(!n)throw Error(`TRUST_RESPONSE`);return r.add(e.kid),{kid:e.kid,fingerprint:e.fingerprint,source:n}})}function Yl(e){if(!Ul(e)||e.v!==1||typeof e.ready!=`boolean`||!Gl(e.code)||typeof e.canImport!=`boolean`||e.source!==`os`&&e.source!==`restored`&&e.source!==`combined`&&e.source!==`none`)throw Error(`TRUST_RESPONSE`);let t=Y(e.keys,[`os`,`restored`,`os+restored`],32),n=Y(e.allowedKeys,[`release`,`os`,`release+os`],64);if(e.ready&&(e.code!==`TRUST_READY`||!t.length||e.source===`none`)||!e.ready&&(t.length>0||e.code===`TRUST_READY`)||e.source===`none`&&t.length>0)throw Error(`TRUST_RESPONSE`);return{ready:e.ready,code:e.code,canImport:e.canImport,source:e.source,keys:t,allowedKeys:n}}function Xl(e){if(!Ul(e))throw Error(`TRUST_INVALID`);let t=Object.entries(e);if(t.some(([e,t])=>/private|vault|cipher|kdf|passphrase/i.test(e)&&typeof t!=`string`)||t.some(([,e])=>typeof e==`string`&&/PRIVATE KEY/.test(e)))throw Error(`TRUST_PRIVATE_MATERIAL`);if(!t.length||t.length>32)throw Error(`TRUST_INVALID`);let n={};for(let[e,r]of t){if(!Kl(e)||typeof r!=`string`||r.length>1024||!/^-----BEGIN PUBLIC KEY-----\r?\n[A-Za-z0-9+/=\r\n]+\r?\n-----END PUBLIC KEY-----\r?\n?$/.test(r))throw Error(`TRUST_INVALID`);let t=r.replace(/-----BEGIN PUBLIC KEY-----|-----END PUBLIC KEY-----|\s/g,``),i;try{i=atob(t)}catch{throw Error(`TRUST_INVALID`)}if(i.length!==44||![48,42,48,5,6,3,43,101,112,3,33,0].every((e,t)=>i.charCodeAt(t)===e)||btoa(i)!==t)throw Error(`TRUST_INVALID`);Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0})}if(new TextEncoder().encode(JSON.stringify(n)).byteLength>32768)throw Error(`TRUST_FILE_SIZE`);return n}async function Zl(e){if(!Number.isSafeInteger(e.size)||e.size<=0||e.size>32768)throw Error(`TRUST_FILE_SIZE`);let t=new Uint8Array(await e.arrayBuffer());if(t.byteLength!==e.size||t.byteLength>32768)throw Error(`TRUST_FILE_SIZE`);let n;try{n=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(t))}catch{throw Error(`TRUST_INVALID`)}return Xl(n)}async function Ql(e){var t;let n=(t=e.body)==null?void 0:t.getReader();if(!n)throw Error(`LICENSE_RESPONSE`);let r=[],i=0;try{for(;;){let e=await n.read();if(e.done)break;if(i+=e.value.byteLength,i>Hl)throw Error(`LICENSE_RESPONSE`);r.push(e.value)}let e=new Uint8Array(i),t=0;for(let n of r)e.set(n,t),t+=n.byteLength;try{return JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e))}catch{throw Error(`LICENSE_RESPONSE`)}}finally{await n.cancel().catch(()=>void 0),n.releaseLock()}}function $l(e,t){let n=`/nexowatt/license/${e}`;return t?new URL(n,t).href:n}async function eu(e,t,n){if(t.aborted)throw new DOMException(`Request aborted`,`AbortError`);let r=new AbortController,i=()=>r.abort();t.addEventListener(`abort`,i,{once:!0}),t.aborted&&r.abort();let a=setTimeout(()=>r.abort(),5e3);try{var o;let t=n!==void 0,i=await fetch($l(e,(o=globalThis.location)==null?void 0:o.href),{method:t?`POST`:`GET`,credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:r.signal,headers:t?{Accept:`application/json`,"Content-Type":`application/json`,"X-EOS-License":`1`}:{Accept:`application/json`},...t?{body:JSON.stringify(n)}:{}}),a=await Ql(i);if(!i.ok)throw Error(Ul(a)&&Gl(a.error)?a.error:`SERVICE_UNAVAILABLE`);return a}finally{clearTimeout(a),t.removeEventListener(`abort`,i)}}async function tu(e,t,n){if(e!==`status`&&e!==`activate`&&e!==`remove`)throw Error(`LICENSE_REQUEST`);if(e===`activate`&&(typeof n!=`string`||!n.trim()||n.length>16384))throw Error(`LICENSE_FORMAT`);let r=Jl(await eu(e,t,e===`activate`?{token:n==null?void 0:n.trim()}:e===`remove`?{}:void 0));if(e===`activate`&&!r.valid||e===`remove`&&r.valid)throw Error(`LICENSE_RESPONSE`);return r}async function nu(e){return Yl(await eu(`trust/status`,e))}async function ru(e,t,n){if(e!==`import`&&e!==`recheck`)throw Error(`LICENSE_REQUEST`);let r=e===`import`?{keys:Xl(n)}:{},i=await eu(`trust/${e}`,t,r),a=Yl(i);if(!Ul(i))throw Error(`TRUST_RESPONSE`);return{trust:a,license:Jl(i.licenseStatus)}}async function iu(e){return Xl(await eu(`trust/export`,e))}function au(){let e=j.getLanguage()===`de`,t=(t,n)=>e?t:n,[n,r]=z(null),[i,a]=z(null),[o,s]=z(0),[c,l]=z(!1),[d,f]=z(``),[p,m]=z(null),[h,_]=z(``),[v,y]=z(``),[x,ee]=z(!1),S=F(null),w=F(!1),T=e=>{let n={LICENSE_MISSING:t(`Keine Lizenz aktiviert. Prüfschlüssel prüfen und den für diese UUID ausgestellten Code eingeben.`,`No license activated. Check verification keys and enter the code issued for this UUID.`),LICENSE_VALID:t(`Lizenz gültig.`,`License valid.`),LICENSE_EXPIRED:t(`Lizenz abgelaufen. Einen erneuerten Lizenzcode anfordern.`,`License expired. Request a renewed license code.`),LICENSE_UUID_MISMATCH:t(`Die Lizenz gehört zu einer anderen System-UUID. Einen passenden Lizenzcode anfordern.`,`The license belongs to another system UUID. Request a matching license code.`),LICENSE_UUID_CHANGED:t(`Die System-UUID hat sich geändert. Sicherung und Systemzuordnung mit dem Service prüfen.`,`The system UUID changed. Check the backup and system assignment with support.`),LICENSE_SIGNATURE_INVALID:t(`Die Signatur ist ungültig. Unveränderten Code und Prüfschlüssel des Ausstellers prüfen.`,`The signature is invalid. Check the unchanged code and issuer verification key.`),LICENSE_KEY_UNKNOWN:t(`Der öffentliche Schlüssel des Ausstellers fehlt. Im Reiter „Öffentliche Prüfschlüssel & Wiederherstellung“ einen freigegebenen öffentlichen Schlüssel importieren oder den Service kontaktieren.`,`The issuer public key is missing. Import an approved public key in the verification keys tab or contact support.`),LICENSE_FORMAT:t(`Bitte den vollständigen EOS-Lizenzcode eingeben.`,`Enter the complete EOS license code.`),LICENSE_FORMAT_INVALID:t(`Das Lizenzformat ist ungültig. Vollständigen NWL3- oder vorhandenen NWL2-Code prüfen.`,`The license format is invalid. Check the complete NWL3 or existing NWL2 code.`),LICENSE_CLAIMS_INVALID:t(`Der signierte Lizenzumfang ist ungültig. Ersatzcode beim Aussteller anfordern.`,`The signed license scope is invalid. Request a replacement code from the issuer.`),LICENSE_ADMIN_REQUIRED:t(`Mit einem Administrator-Konto anmelden.`,`Sign in with an administrator account.`),LICENSE_HTTPS_REQUIRED:t(`NexoWatt EOS über HTTPS öffnen.`,`Open NexoWatt EOS over HTTPS.`),LICENSE_ORIGIN:t(`Diese Seite über dieselbe EOS-Adresse erneut öffnen und anmelden.`,`Reopen this page using the same EOS address and sign in.`),LICENSE_CLOCK_ROLLBACK:t(`Systemdatum und Uhrzeit prüfen. Bei einer wiederhergestellten Sicherung den Service kontaktieren.`,`Check the system date and time. Contact support after restoring a backup.`),LICENSE_RATE_LIMIT:t(`Zu viele Anfragen. Kurz warten und Status erneut prüfen.`,`Too many requests. Wait briefly and refresh the status.`),TRUST_READY:t(`Öffentliche Prüfschlüssel sind eingerichtet.`,`Public verification keys are configured.`),TRUST_MISSING:t(`Keine aktiven Prüfschlüssel. Eine freigegebene öffentliche JSON-Datei importieren oder die OS-Vertrauensdatei durch den zuständigen Administrator einrichten lassen.`,`No active verification keys. Import an approved public JSON file or have the responsible administrator configure the OS trust file.`),TRUST_IMPORT_UNKNOWN_KEY:t(`Mindestens ein Schlüssel ist nicht freigegeben. Es wurde nichts übernommen. Der Aussteller benötigt eine autorisierte OS-Bereitstellung oder eine neue Herstellerfreigabe im Adapter.`,`At least one key is not approved. Nothing was imported. The issuer requires authorized OS provisioning or a new manufacturer approval in the adapter.`),TRUST_KEY_CONFLICT:t(`Eine Schlüssel-ID bezeichnet unterschiedliche Schlüssel. Es wurde nichts übernommen. Mit dem Aussteller die passende Datei prüfen; vorhandene Schlüssel nicht löschen.`,`A key ID refers to different keys. Nothing was imported. Check the correct file with the issuer; do not delete existing keys.`),TRUST_INVALID:t(`Ungültige öffentliche Schlüsseldatei. Erwartet wird eine JSON-Zuordnung von Schlüssel-ID zu öffentlichem Ed25519-SPKI-PEM, ohne Zusatzfelder.`,`Invalid public key file. Expected JSON mapping key IDs to public Ed25519 SPKI PEM values, without extra fields.`),TRUST_PRIVATE_MATERIAL:t(`Privater Schlüssel oder Tresor erkannt. Diese Datei gehört ausschließlich in den Key-Generator und wird nicht an EOS übertragen.`,`Private key or vault detected. This file belongs only in the key generator and is not sent to EOS.`),TRUST_FILE_SIZE:t(`Die öffentliche JSON-Datei muss 1 bis 32768 Byte enthalten, mit höchstens 32 Schlüsseln.`,`The public JSON file must contain 1 to 32768 bytes, with at most 32 keys.`),TRUST_FILE_MISSING:t(`Die konfigurierte OS-Vertrauensdatei fehlt. Den zuständigen Administrator die Datei wiederherstellen lassen; anschließend erneut prüfen.`,`The configured OS trust file is missing. Ask the responsible administrator to restore it, then recheck.`),TRUST_READ_DENIED:t(`Die OS-Vertrauensdatei ist nicht lesbar. Leserechte und Eigentümer durch den zuständigen Administrator prüfen lassen; anschließend erneut prüfen.`,`The OS trust file cannot be read. Ask the responsible administrator to check read access and ownership, then recheck.`),TRUST_KEY_LIMIT:t(`Zusammen wären mehr als 32 Prüfschlüssel aktiv. Mit dem Aussteller einen zulässigen Schlüsselbestand planen; vorhandene Schlüssel nicht unkontrolliert entfernen.`,`More than 32 verification keys would be active. Plan an allowed key set with the issuer; do not remove existing keys without review.`),TRUST_RELEASE_METADATA:t(`Die Herstellerfreigaben dieser Adapterversion sind ungültig. Das geprüfte Adapterpaket wiederherstellen und den Service kontaktieren.`,`Manufacturer approvals in this adapter release are invalid. Restore the verified adapter package and contact support.`),TRUST_STARTING:t(`Die Prüfschlüsselverwaltung wird noch gestartet. Kurz warten und den Status erneut prüfen.`,`Verification key management is still starting. Wait briefly and refresh the status.`),SERVICE_DIRECTORY:t(`Das geschützte Datenverzeichnis ist nicht verfügbar. Einrichtung, Rechte und Sicherung mit dem Service prüfen; keine Dateien löschen.`,`The protected data directory is unavailable. Check setup, permissions and backup with support; do not delete files.`),TRUST_PERMISSIONS:t(`OS-Vertrauensdatei oder Pfadrechte sind unsicher. Den zuständigen Administrator die Eigentümer und Schreibrechte prüfen lassen; anschließend erneut prüfen.`,`The OS trust file or path permissions are unsafe. Ask the responsible administrator to check ownership and write permissions, then recheck.`),LICENSE_RESPONSE:t(`Die Serverantwort konnte nicht bestätigt werden. Status erneut prüfen; bei Wiederholung den Fehlercode an den Service geben.`,`The server response could not be confirmed. Refresh the status; contact support with the code if repeated.`),TRUST_RESPONSE:t(`Die Prüfschlüssel-Antwort konnte nicht bestätigt werden. Status erneut prüfen und bei Wiederholung den Service kontaktieren.`,`The verification key response could not be confirmed. Refresh the status and contact support if repeated.`),SERVICE_TIMEOUT:t(`Zeitüberschreitung. Der aktuelle Status ist unbestätigt; eine gespeicherte Lizenz wurde dadurch nicht als ungültig erkannt. Verbindung prüfen und Status aktualisieren.`,`Request timed out. The current status is unconfirmed; this does not identify a stored license as invalid. Check the connection and refresh.`),SERVICE_STALE:t(`Die Lizenzprüfung ist nicht aktuell. Dienstzustand prüfen und den Status neu abrufen.`,`The license check is not current. Check service health and refresh the status.`),SERVICE_UNAVAILABLE:t(`Lizenzverwaltung derzeit nicht bereit. Verbindung, Dienstzustand und Prüfschlüssel prüfen; anschließend Status aktualisieren.`,`License management is not ready. Check the connection, service health and verification keys, then refresh.`)};return n[e]?n[e]:e.startsWith(`STORAGE_`)?t(`Der geschützte Lizenzspeicher konnte nicht sicher gelesen oder geschrieben werden. Datenverzeichnis, Rechte und vollständige Sicherung mit dem Service prüfen. Keine Speicherdateien löschen; anschließend erneut prüfen.`,`The protected license store could not be read or written safely. Check the data directory, permissions and complete backup with support. Do not delete store files; then recheck.`):e.startsWith(`TRUST_`)?t(`Die Prüfschlüssel konnten nicht sicher geladen werden. Öffentliche Datei, Freigabe und OS-Dateirechte prüfen; anschließend „Erneut prüfen“ wählen.`,`Verification keys could not be loaded safely. Check the public file, approval and OS file permissions, then choose Recheck.`):t(`Anfrage nicht bestätigt. Den angezeigten Fehlercode mit dem Service prüfen und den Status erneut abrufen.`,`Request unconfirmed. Check the displayed error code with support and refresh the status.`)},te=async(e,n,i)=>{if(S.current)return;let o=new AbortController;S.current=o,l(!0),y(``),_(``),r(null),a(null);let s=()=>w.current&&S.current===o&&!o.signal.aborted;try{let c,l;if(e===`import`||e===`recheck`){if(e===`import`&&!i)throw Error(`TRUST_INVALID`);let t=i?await Zl(i):void 0;if(!s())return;let n=await ru(e,o.signal,t);c=n.license,l=n.trust}else{if(e===`export`){let e=await iu(o.signal);if(!s())return;let t=URL.createObjectURL(new Blob([`${JSON.stringify(e,null,2)}\n`],{type:`application/json`})),n=document.createElement(`a`);n.href=t,n.download=`nexowatt-license-public-trust.json`,document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}[c,l]=await Promise.all([tu(e===`activate`||e===`remove`?e:`status`,o.signal,n),nu(o.signal)])}if(!s())return;if(c.valid&&!l.ready)throw Error(l.code);r(c),a(l),e===`activate`&&_(c.coreEnabled?t(`EOS-Systemlizenz geprüft und verschlüsselt gespeichert. Die gemeinsame Aktivierung gilt auch nach Neustarts.`,`EOS system license verified and stored encrypted. The shared activation persists after restarts.`):t(`Lizenz gespeichert. Diese NWL2-Lizenz umfasst nur die signierten Erweiterungen und schaltet den EOS-Kern nicht frei.`,`License stored. This NWL2 license covers only its signed extensions and does not enable the EOS core.`)),e===`remove`&&_(t(`Lizenz entfernt.`,`License removed.`)),e===`import`&&_(t(`Freigegebene öffentliche Prüfschlüssel gespeichert; Lizenzstatus neu geprüft. Der gespeicherte Lizenzcode wurde nicht ersetzt.`,`Approved public verification keys stored and license status rechecked. The stored license code was not replaced.`)),e===`recheck`&&_(t(`Prüfschlüssel und Lizenzstatus neu eingelesen. Keine Dateien gelöscht.`,`Verification keys and license status reloaded. No files were deleted.`)),e===`export`&&_(t(`Nur öffentliche Prüfschlüssel als JSON exportiert. Dies ist keine Sicherung des privaten Key-Generator-Tresors.`,`Only public verification keys exported as JSON. This is not a backup of the private key generator vault.`))}catch(e){if(!w.current||S.current!==o||o.signal.aborted)return;o.abort(),r(null),a(null),y(ql(e))}finally{S.current===o&&(S.current=null,w.current&&l(!1))}},D=F(te);Yt(()=>(w.current=!0,D.current(`refresh`),()=>{var e;w.current=!1,(e=S.current)==null||e.abort(),S.current=null}),[]);let ne={energy:t(`Energiemanagement`,`Energy management`),wallet:t(`Energie-Wertkonto`,`Energy wallet`),smartHome:`Smart Home`,microgridSlave:`Microgrid Slave`,microgridMaster:`Microgrid Master`,multisite:t(`Mehrere Standorte`,`Multiple sites`),billing:t(`Abrechnung`,`Billing`)},re=[[t(`System-UUID`,`System UUID`),(n==null?void 0:n.uuid)||`–`],[t(`Edition`,`Edition`),(n==null?void 0:n.edition)===`home`?`EOS Home`:(n==null?void 0:n.edition)===`pro`?`EOS Pro`:`–`],[t(`Gültig bis`,`Valid until`),n!=null&&n.valid?n.expiresAt===null?t(`Dauerhaft`,`Perpetual`):new Date(n.expiresAt).toLocaleString():`–`],[t(`Ladepunkte / Speicher`,`Charge points / batteries`),n!=null&&n.valid?`${n.limits.chargePoints} / ${n.limits.batteries}`:`–`],[t(`Funktionen`,`Features`),(n==null?void 0:n.features.map(e=>ne[e]||e).join(`, `))||`–`],[t(`Freigabe`,`Authorization`),n!=null&&n.valid?n.coreEnabled?t(`EOS-Kern freigegeben`,`EOS core enabled`):t(`Nur signierte Erweiterungen; EOS-Kern nicht freigegeben`,`Signed extensions only; EOS core not enabled`):`–`]],ie=e=>({os:t(`OS-Vertrauensdatei`,`OS trust file`),restored:t(`Lokal wiederhergestellte Kopie`,`Locally restored copy`),"os+restored":t(`OS-Vertrauensdatei und lokale Kopie`,`OS trust file and local copy`),release:t(`Herstellerfreigabe dieser Adapterversion`,`Manufacturer approval in this adapter release`),"release+os":t(`Herstellerfreigabe und OS-Vertrauensdatei`,`Manufacturer approval and OS trust file`)})[e]||e,O=v||(n==null?void 0:n.code),k=O?N(C,{severity:v||!(n!=null&&n.valid)?`warning`:`success`,role:v?`alert`:`status`,children:[E(`strong`,{children:O}),`: `,T(O)]}):null;return N(I,{sx:{height:`100%`,overflow:`auto`,p:3,boxSizing:`border-box`},"data-eos-license-panel":`1`,children:[N(rn,{spacing:2,sx:{maxWidth:960,mx:`auto`},children:[E(R,{variant:`h5`,children:t(`NexoWatt EOS Lizenzverwaltung`,`NexoWatt EOS license management`)}),E(R,{children:t(`Eine gemeinsame Systemlizenz für Dashboard und Systemverwaltung. Einmalige Aktivierung nach der Erstanmeldung; keine zweite Lizenz pro Oberfläche.`,`One shared system license for the dashboard and system management. Activate once after the first sign-in; no separate license for each interface.`)}),E(cn,{variant:`outlined`,children:N(g,{children:[N(rn,{direction:`row`,spacing:2,sx:{mb:2,alignItems:`center`,flexWrap:`wrap`},children:[E(R,{variant:`h6`,children:t(`Aktueller Status`,`Current status`)}),E(b,{label:c?t(`Wird geprüft …`,`Checking …`):n?T(n.code):t(`Status unbestätigt`,`Status unconfirmed`),color:n!=null&&n.valid&&!c?`success`:`default`})]}),k,E(I,{component:`dl`,sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,sm:`190px 1fr`},gap:1,"& dd":{m:0,overflowWrap:`anywhere`},"& dt":{fontWeight:600}},children:re.map(([e,t])=>N(Ht.Fragment,{children:[E(I,{component:`dt`,children:e}),E(I,{component:`dd`,children:t})]},e))}),E(H,{"data-eos-license-refresh":`1`,disabled:c,onClick:()=>void te(`refresh`),children:t(`Status aktualisieren`,`Refresh status`)})]})}),h?E(C,{severity:`success`,role:`status`,children:h}):null,N(Xt,{value:o,onChange:(e,t)=>s(t),variant:`scrollable`,scrollButtons:`auto`,"aria-label":t(`Lizenzverwaltung`,`License management`),children:[E(ve,{id:`eos-license-tab`,"aria-controls":`eos-license-content`,label:t(`Lizenz`,`License`)}),E(ve,{id:`eos-trust-tab`,"aria-controls":`eos-trust-content`,label:t(`Öffentliche Prüfschlüssel & Wiederherstellung`,`Public verification keys & recovery`)})]}),E(I,{role:`tabpanel`,id:`eos-license-content`,"aria-labelledby":`eos-license-tab`,hidden:o!==0,children:E(cn,{variant:`outlined`,children:N(g,{children:[E(R,{variant:`h6`,gutterBottom:!0,children:t(`Lizenz aktivieren`,`Activate license`)}),E(R,{sx:{mb:2},children:t(`Den für diese System-UUID ausgestellten NWL3-Lizenzcode einfügen. Bestehende NWL2-Lizenzen behalten ihren signierten Umfang. Die Prüfung und verschlüsselte Speicherung erfolgen auf dem Gerät.`,`Enter the NWL3 license code issued for this system UUID. Existing NWL2 licenses retain their signed scope. Verification and encrypted storage take place on this device.`)}),k,E(L,{id:`eos-license-code`,fullWidth:!0,multiline:!0,minRows:3,disabled:c,label:t(`Neuer Lizenzcode`,`New license code`),value:d,onChange:e=>f(e.target.value),autoComplete:`off`,sx:{mt:2},slotProps:{htmlInput:{maxLength:16384,spellCheck:!1}}}),N(rn,{direction:{xs:`column`,sm:`row`},spacing:1,sx:{my:2},children:[E(H,{"data-eos-license-activate":`1`,variant:`contained`,disabled:c||!d.trim(),onClick:()=>{let e=d;f(``),te(`activate`,e)},children:t(`Prüfen und aktivieren`,`Verify and activate`)}),E(H,{"data-eos-license-remove":`1`,color:`error`,disabled:c,onClick:()=>ee(!0),children:t(`Lizenz entfernen`,`Remove license`)})]}),E(R,{variant:`body2`,children:t(`Ein ungültiger Code ersetzt keine gültige Lizenz. Der gespeicherte Code wird nicht zurück angezeigt. Lizenzaktionen wirken sofort und benötigen kein „Speichern und schließen“.`,`An invalid code does not replace a valid license. Stored codes are never displayed. License actions take effect immediately and do not require Save & Close.`)})]})})}),E(I,{role:`tabpanel`,id:`eos-trust-content`,"aria-labelledby":`eos-trust-tab`,hidden:o!==1,children:N(rn,{spacing:2,children:[E(cn,{variant:`outlined`,children:N(g,{children:[E(R,{variant:`h6`,gutterBottom:!0,children:t(`Aktive öffentliche Prüfschlüssel`,`Active public verification keys`)}),E(R,{children:i?`${i.code}: ${T(i.code)}`:t(`Prüfschlüsselstatus unbestätigt. Status aktualisieren.`,`Verification key status unconfirmed. Refresh the status.`)}),i==null?void 0:i.keys.map(e=>N(I,{sx:{my:2,overflowWrap:`anywhere`},children:[N(R,{component:`h3`,variant:`subtitle1`,children:[e.kid,` · `,ie(e.source)]}),N(R,{component:`code`,variant:`body2`,children:[`SHA-256: `,e.fingerprint]})]},e.kid)),E(R,{sx:{mt:2},children:t(`Eine lokale Kopie ersetzt keine Freigabe des Ausstellers. Nur Schlüssel mit passender Herstellerfreigabe oder gültiger OS-Vertrauensquelle werden akzeptiert.`,`A local copy does not replace issuer approval. Only keys matching manufacturer approval or a valid OS trust source are accepted.`)}),E(H,{disabled:c,onClick:()=>void te(`recheck`),children:t(`Vertrauen und Lizenz erneut prüfen`,`Recheck trust and license`)}),E(H,{disabled:c||!(i!=null&&i.ready),onClick:()=>void te(`export`),children:t(`Öffentliche Schlüssel exportieren`,`Export public keys`)})]})}),E(cn,{variant:`outlined`,children:N(g,{children:[E(R,{variant:`h6`,gutterBottom:!0,children:t(`Öffentliche JSON-Datei importieren`,`Import public JSON file`)}),E(R,{children:t(`Höchstens 32768 Byte und 32 öffentliche Ed25519-Schlüssel. Der Dateiname ist beliebig. Nur die flache Zuordnung Schlüssel-ID → PUBLIC KEY ist erlaubt. Ein unbekannter oder widersprüchlicher Schlüssel weist den gesamten Import zurück.`,`At most 32768 bytes and 32 public Ed25519 keys. Any filename is accepted. Only a flat key ID → PUBLIC KEY mapping is allowed. An unknown or conflicting key rejects the whole import.`)}),E(I,{component:`input`,type:`file`,disabled:c||!(i!=null&&i.canImport),"aria-label":t(`Öffentliche Schlüsseldatei`,`Public key file`),sx:{display:`block`,my:2,maxWidth:`100%`},onChange:e=>{var t;m(((t=e.target.files)==null?void 0:t[0])||null),e.target.value=``}}),E(R,{variant:`body2`,children:p?p.name:t(`Keine Datei ausgewählt.`,`No file selected.`)}),E(H,{variant:`contained`,disabled:c||!p||!(i!=null&&i.canImport),onClick:()=>{let e=p;m(null),e&&te(`import`,void 0,e)},children:t(`Öffentliche Schlüssel prüfen und importieren`,`Verify and import public keys`)}),i&&!i.canImport?E(C,{severity:`warning`,sx:{mt:2},children:t(`Import derzeit nicht freigegeben. Angezeigten Prüfschlüsselstatus und OS-Vertrauenskonfiguration mit dem zuständigen Administrator prüfen.`,`Import is not currently allowed. Check the displayed verification key status and OS trust configuration with the responsible administrator.`)}):null,E(R,{variant:`h6`,sx:{mt:3},children:t(`Für Import zugelassene Schlüssel`,`Keys approved for import`)}),i==null?void 0:i.allowedKeys.map(e=>N(I,{sx:{my:2,overflowWrap:`anywhere`},children:[N(R,{children:[e.kid,` · `,ie(e.source)]}),N(R,{component:`code`,variant:`body2`,children:[`SHA-256: `,e.fingerprint]})]},e.kid)),E(R,{variant:`body2`,children:t(`Eine angezeigte Herstellerfreigabe allein aktiviert keinen Schlüssel. Ohne OS-Vertrauensdatei ist der ausdrückliche Import erforderlich.`,`A displayed manufacturer approval alone does not activate a key. Without an OS trust file, explicit import is required.`)})]})}),N(C,{severity:`info`,children:[E(`strong`,{children:t(`Key-Generator auf einem neuen PC`,`Key generator on a new PC`)}),E(`br`,{}),t(`Für die Wiederherstellung wird die verschlüsselte Sicherung des privaten Key-Generator-Tresors mit der zugehörigen Passphrase im Key-Generator benötigt. Tresor, private Schlüssel und Passphrase niemals in EOS hochladen. Die öffentliche JSON-Datei dient nur der Lizenzprüfung und kann den privaten Signierschlüssel nicht wiederherstellen.`,`Recovery requires the encrypted backup of the private key generator vault and its passphrase in the key generator. Never upload the vault, private keys or passphrase to EOS. The public JSON file serves only for license verification and cannot recover the private signing key.`)]})]})}),E(C,{severity:`info`,children:t(`Lizenzverwaltung, Diagnose und Sicherheitswartung bleiben ohne gültige Lizenz erreichbar. Angebundene Adapter prüfen ihre Freigabe zentral.`,`License management, diagnostics and security maintenance remain accessible without a valid license. Integrated adapters check their authorization centrally.`)})]}),N(u,{open:x,onClose:()=>ee(!1),children:[E(_e,{children:t(`Lizenz entfernen?`,`Remove license?`)}),E(ce,{children:t(`Angebundene Adapter verlieren ihre Betriebsfreigabe. Stelle vorher den sicheren Anlagenzustand her.`,`Integrated adapters lose their operating authorization. Establish a safe plant state before continuing.`)}),N(xt,{children:[E(H,{onClick:()=>ee(!1),children:t(`Abbrechen`,`Cancel`)}),E(H,{color:`error`,onClick:()=>{ee(!1),te(`remove`)},children:t(`Entfernen`,`Remove`)})]})]})]})}x();var ou={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15,position:`relative`},tableContainer:{zIndex:100},table:{display:`flex`,flexDirection:`column`,width:`100%`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`},littleRow:{width:110},nameRow:{width:220},input:{width:`100%`}},su=class e extends kl{constructor(t){super(t),M(this,`onChangeText`,(t,n,r)=>{let i=U.clone(this.props.data),a=e.certToArray(i.native.certificates),o=a.find(e=>e.title===n);o&&(o[r]=t),i.native.certificates=e.arrayToCert(a),this.props.onChange(i)}),M(this,`onDelete`,t=>{let n=U.clone(this.props.data),r=e.certToArray(n.native.certificates),i=r.findIndex(e=>e.title===t);r.splice(i,1),n.native.certificates=e.arrayToCert(r),this.props.onChange(n)}),M(this,`onAdd`,(t,n)=>{let r=U.clone(this.props.data),i=e.certToArray(r.native.certificates),a=this.props.t(`certificate`);if(!t){for(let e=1;;e++)if(!i.find(t=>t.title===`${a}_${e}`)){t=`${a}_${e}`;break}}i.push({title:t||`__`,data:n||``}),r.native.certificates=e.arrayToCert(i),this.props.onChange(r)}),this.state={chClass:!1}}static certToArray(e){return U.objectMap(e,(e,t)=>({title:t,data:e}))}static arrayToCert(e){let t={};return e.forEach(e=>{t[e.title]=e.data}),t}static detectType(e){return e=e.toLowerCase(),e.includes(`public`)||e.includes(`cert`)?`public`:e.includes(`priv`)||e.includes(`key`)?`private`:e.includes(`chain`)||e.includes(`ca`)?`chained`:``}render(){let t=e.certToArray(this.props.data.native.certificates).map((t,n)=>{let r=e.detectType(t.title);return N(Xe,{className:`float_row`,children:[E(V,{style:ou.littleRow,className:`float_cell`,children:n+1}),E(V,{style:ou.nameRow,className:`float_cell`,children:E(L,{disabled:this.props.saving,variant:`standard`,value:t.title,style:ou.input,className:`xs-centered`,onChange:e=>this.onChangeText(e.target.value,t.title,`title`),error:!r,helperText:r||j.t(`Unknown type: use in name "private", "public" or "chained" to define the certificate type`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t.title?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText(``,t.title,`title`),children:E(k,{})})}):null}}})}),E(V,{className:`grow_cell float_cell`,children:E(L,{disabled:this.props.saving,variant:`standard`,id:`default_${n}`,value:t.data,style:ou.input,className:`xs-centered`,onChange:e=>{let n=e.target.value.replace(/\r/g,``).replace(/\n/g,``);if(n.startsWith(`--`)){let e=n.split(`-----`);e[2]=e[2].replace(/\s/g,``),n=`-----${e[1]}-----\r\n${e[2]}\r\n-----${e[3]}-----`}this.onChangeText(n,t.title,`data`)},slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t.data?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,size:`small`,tabIndex:-1,onClick:()=>this.onChangeText(``,t.title,`data`),children:E(k,{})})}):null}}})}),E(V,{style:ou.littleRow,className:`float_cell`,children:E(xe,{disabled:this.props.saving,size:`small`,color:`secondary`,"aria-label":`add`,onClick:()=>this.onDelete(t.title),children:E(T,{})})})]},n)});return N(`div`,{style:ou.tabPanel,children:[E(Ct,{noClick:!0,disabled:this.props.saving,multiple:!0,children:({getRootProps:e,getInputProps:t,acceptedFiles:n,fileRejections:r})=>E(`div`,{...e({className:this.state.chClass?`drop-container drop-dop`:`drop-container`,onDragEnter:()=>this.setState({chClass:!0}),onDragLeave:()=>this.setState({chClass:!1}),onDrop:()=>{if(!this.props.saving){if(r.length){let e=[];r.forEach(t=>{let n=`${t.file.name}: `,r=[];t.errors.forEach(e=>r.push(e.message)),e.push(n+r.join(`,`))}),alert(e.join(`, `))}n.length?n.forEach(e=>{let t=new FileReader;t.onload=t=>{var n;return this.onAdd(e.name,(n=t.target)==null?void 0:n.result)},t.readAsText(e)}):r.length||alert(this.props.t(`No files exists`)),this.setState({chClass:!1})}}}),children:E(`input`,{...t()})})}),N(`div`,{style:ou.buttonPanel,children:[E(xe,{disabled:this.props.saving,size:`small`,className:`small_size`,color:`primary`,"aria-label":`add`,onClick:()=>this.onAdd(),children:E(h,{})}),E(Dt,{variant:`outlined`,style:ou.descriptionPanel,children:this.props.t(`certs_hint`)})]}),E(At,{style:ou.tableContainer,children:N(i,{style:ou.table,"aria-label":`customized table`,children:[E(qt,{children:N(Xe,{className:`float_row`,children:[E(V,{style:ou.littleRow,className:`float_cell`,children:` `}),E(V,{style:ou.nameRow,className:`float_cell`,children:this.props.t(`name`)}),E(V,{className:`grow_cell float_cell`,children:this.props.t(`Certificate`)}),E(V,{style:ou.littleRow,className:`float_cell`,children:` `})]})}),E(dt,{children:t})]})})]})}},cu=y(E(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96`}),`Cloud`),lu=y(E(`path`,{d:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z`}),`Email`),uu=y(E(`path`,{d:`M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13`}),`SmartToy`),du=`system.credentials.`,fu=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],pu={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]};function mu(e){return typeof e.form==`string`&&pu[e.form]?e.form:e.key===void 0?`login`:`key`}var hu={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,deepseek:`M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function gu(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}var _u={anthropic:gu(hu.anthropic,`#d97757`),chatgpt:gu(hu.chatgpt,`#74aa9c`),gemini:gu(hu.gemini,`#8e75b2`),deepseek:gu(hu.deepseek,`#5786FE`),email:gu(hu.email,`#2196f3`),login:gu(hu.login,`#9e9e9e`),key:gu(hu.key,`#ffc107`),aws:gu(hu.aws,`#ff9900`),azure:gu(hu.azure,`#0089d6`)},vu=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_AI_MAX_TOKENS=e.MIN_AI_MAX_TOKENS=e.DEFAULT_AI_MAX_TOKENS=e.AI_MODELS_TIMEOUT_MS=e.MIN_AI_REQUEST_TIMEOUT_MS=e.MAX_AI_REQUEST_TIMEOUT_MS=void 0,e.resolveRequestTimeout=t,e.resolveMaxTokens=n,e.MAX_AI_REQUEST_TIMEOUT_MS=6e5,e.MIN_AI_REQUEST_TIMEOUT_MS=1e3,e.AI_MODELS_TIMEOUT_MS=3e4,e.DEFAULT_AI_MAX_TOKENS=8192,e.MIN_AI_MAX_TOKENS=1024,e.MAX_AI_MAX_TOKENS=2e5;function t(t){let n=parseInt(t,10);return isNaN(n)||n<=0?e.MAX_AI_REQUEST_TIMEOUT_MS:Math.min(Math.max(n,e.MIN_AI_REQUEST_TIMEOUT_MS),e.MAX_AI_REQUEST_TIMEOUT_MS)}function n(t){let n=parseInt(t,10);return isNaN(n)||n<=0?e.DEFAULT_AI_MAX_TOKENS:Math.min(Math.max(n,e.MIN_AI_MAX_TOKENS),e.MAX_AI_MAX_TOKENS)}}))(),yu=`system.ai`,bu={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15,position:`relative`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`,padding:`0 8px`},littleRow:{width:170,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},iconRow:{width:40},actionsRow:{width:110,whiteSpace:`nowrap`},input:{width:`100%`},field:{width:`100%`,marginBottom:16},templateItem:{display:`flex`,alignItems:`center`,gap:8}},xu=20,Su=/^script\.[^.]+\./;function Cu(e){return E(`img`,{src:e.src,width:xu,height:xu,alt:``})}async function wu(e){if(_u[e])return _u[e];if(e===`iobroker.pro`||e===`iobroker.net`)try{let e=await(await fetch(Nc)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}catch(e){console.error(`Cannot read ioBroker logo: ${e}`)}}var Tu={anthropic:{label:`Anthropic`,icon:E(Cu,{src:_u.anthropic}),form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:E(Cu,{src:_u.chatgpt}),form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:E(Cu,{src:_u.gemini}),form:`key`,type:`ai`,name:`gemini`},deepseek:{label:`DeepSeek`,icon:E(Cu,{src:_u.deepseek}),form:`key`,type:`ai`,name:`deepseek`},aws:{label:`AWS`,icon:E(Cu,{src:_u.aws}),form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:E(Cu,{src:_u.azure}),form:`azure`,type:`azure`,name:`azure`},email:{label:`credential_type_email`,translate:!0,icon:E(Cu,{src:_u.email}),form:`login`,type:`email`},"iobroker.pro":{label:`iobroker.pro`,icon:E(Cu,{src:Nc}),form:`login`,type:`cloud`,name:`iobroker-pro`,fixedName:!0},"iobroker.net":{label:`iobroker.net`,icon:E(Cu,{src:Nc}),form:`login`,type:`cloud`,name:`iobroker-net`,fixedName:!0},login:{label:`Login/password`,translate:!0,icon:E(Cu,{src:_u.login}),form:`login`,type:null},key:{label:`Key`,translate:!0,icon:E(Cu,{src:_u.key}),form:`key`,type:null}},Eu={email:E(lu,{fontSize:`small`}),cloud:E(cu,{fontSize:`small`}),ai:E(uu,{fontSize:`small`}),aws:E(Cu,{src:_u.aws}),azure:E(Cu,{src:_u.azure}),custom:E(Kt,{fontSize:`small`})};function Du(e){var t;if(typeof((t=e.common)==null?void 0:t.icon)==`string`&&e.common.icon)return E(Cu,{src:e.common.icon});let n=Object.values(Tu).find(t=>t.name&&e._id===`system.credentials.${t.name}`);return n?n.icon:e.native.type===`email`?E(lu,{fontSize:`small`}):mu(e.native)===`key`?E(ye,{fontSize:`small`}):E(Vt,{fontSize:`small`})}function Ou(e){let t=/\bSECRETS\s*\??\s*(?:\.\s*([A-Za-z_$][\w$]*)|\[\s*(['"`])([^'"`]+)\2\s*\])/g,n=new Set,r=t.exec(e);for(;r;)n.add(r[1]||r[3]),r=t.exec(e);return[...n]}var ku=class e extends kl{constructor(e){super(e),this.state={editIndex:null,addOpen:!1,addTemplate:`login`,addType:`email`,addName:``,deleteIndex:null,usage:{},visibleSecrets:{}}}componentDidMount(){this.detectUsage()}componentDidUpdate(e,t){t.editIndex!==this.state.editIndex&&Object.keys(this.state.visibleSecrets).length&&this.setState({visibleSecrets:{}})}async detectUsage(){let e={},t=(t,n)=>{e[t]=e[t]||[],e[t].push(n)},n={};try{(await this.props.socket.getAdapterInstances(!0)).forEach(e=>{var r;let i=(r=e.common)==null?void 0:r.icon;i&&!i.startsWith(`data:image`)&&!i.includes(`/`)&&(i=`adapter/${e.common.name}/${i}`),i&&(n[e._id.replace(`system.adapter.`,``)]=i);let a=JSON.stringify(e.native||{}).match(/system\.credentials\.[0-9A-Za-z_.-]+/g);if(a){let n=e._id.replace(`system.adapter.`,``);[...new Set(a)].forEach(e=>t(e,{instance:n,key:n,icon:i}))}})}catch(e){console.error(`Cannot read instances: ${e}`)}try{let e=await this.props.socket.getObjectViewSystem(`script`,`script.`,`script.香`);Object.values(e).forEach(e=>{var r,i;let a=e==null||(r=e.common)==null?void 0:r.source;if(!a||typeof a!=`string`)return;let o=(((i=e.common)==null?void 0:i.engine)||``).replace(`system.adapter.`,``);Ou(a).forEach(r=>t(`${du}${r}`,{instance:e._id.replace(Su,``),key:e._id,icon:n[o],title:e._id}))})}catch(e){console.error(`Cannot read scripts: ${e}`)}try{var r;let e=await this.props.socket.getObject(yu),n=e==null||(r=e.native)==null?void 0:r.credentialId;typeof n==`string`&&n.startsWith(`system.credentials.`)&&t(n,{instance:this.props.t(`AI assistant`),key:yu,icon:`img/admin.svg`})}catch{}this.setState({usage:e})}onChangeCredential(e,t){let n=U.clone(this.props.data);n[e]=t,this.props.onChange(n)}getTemplateLabel(e){let t=Tu[e];return t.translate?this.props.t(t.label):t.label}async onAdd(){let e=Tu[this.state.addTemplate],t=e.type||this.state.addType,n=`${du}${((e.fixedName?e.name:this.state.addName.trim())||``).replace(Ne.FORBIDDEN_CHARS,`_`)}`,r=pu[e.form],i={type:t,form:e.form,version:1,encryptedFields:r.filter(e=>e.encrypted).map(e=>e.name)};r.forEach(e=>{i[e.name]=``});let a={_id:n,type:`config`,common:{name:e.fixedName?this.getTemplateLabel(this.state.addTemplate):this.state.addName.trim(),icon:await wu(this.state.addTemplate)},native:i,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}},o=U.clone(this.props.data);o.push(a),this.setState({addOpen:!1,editIndex:o.length-1},()=>this.props.onChange(o))}onDelete(e){let t=U.clone(this.props.data);t.splice(e,1),this.setState({deleteIndex:null},()=>this.props.onChange(t))}static getName(e){var t;let n=(t=e.common)==null?void 0:t.name;return n&&typeof n==`object`?n.en||Object.values(n)[0]||``:n||``}renderVisibilityButton(e,t){let n=!!this.state.visibleSecrets[e];return E(B,{position:`end`,children:E(A,{tabIndex:-1,size:`small`,edge:`end`,disabled:t||this.props.saving,"aria-label":this.props.t(n?`Hide password`:`Show password`),title:this.props.t(n?`Hide password`:`Show password`),onClick:()=>this.setState({visibleSecrets:{...this.state.visibleSecrets,[e]:!n}}),children:E(n?ht:Ye,{})})})}renderTypedField(e,t,n,r){let i=e.native[t.name];if(t.type===`select`){let r=i==null?``:String(i),a=t.options?[...t.options]:[];return r&&!a.find(e=>e.value===r)&&a.unshift({value:r}),E(L,{id:`credential_${t.name}`,select:!0,variant:`standard`,style:bu.field,label:this.props.t(t.label),value:r,disabled:this.props.saving,required:t.required,error:t.required&&!r,slotProps:{inputLabel:{shrink:!0}},onChange:r=>{let i=U.clone(e);i.native[t.name]=r.target.value,this.onChangeCredential(n,i)},children:a.map(e=>E(It,{value:e.value,children:e.label||e.value},e.value))},t.name)}let a=t.type===`password`,o=a&&!this.state.visibleSecrets[t.name];return E(L,{id:`credential_${t.name}`,variant:`standard`,style:bu.field,type:`text`,label:this.props.t(t.label),value:i??``,disabled:this.props.saving,required:t.required,error:t.required&&!i,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,style:o?ar:void 0},input:a?{endAdornment:this.renderVisibilityButton(t.name,!i||i===`__SOME_PASSWORD__`)}:void 0},onChange:r=>{let i=U.clone(e);i.native[t.name]=r.target.value,this.onChangeCredential(n,i)},onFocus:a&&i===`__SOME_PASSWORD__`?e=>e.target.select():void 0,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),r){var t;(t=document.getElementById(`credential_${r}`))==null||t.focus()}else this.setState({editIndex:null})}}},t.name)}renderEditDialog(){if(this.state.editIndex===null)return null;let t=this.state.editIndex,n=this.props.data[t];if(!n)return null;let r=pu[mu(n.native)];return N(u,{open:!0,maxWidth:`md`,fullWidth:!0,onClose:()=>this.setState({editIndex:null}),children:[E(_e,{children:`${this.props.t(`Edit credential`)}: ${n._id}`}),N(ce,{children:[E(L,{variant:`standard`,style:bu.field,label:this.props.t(`Display name`),value:e.getName(n),disabled:this.props.saving,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>{let r=U.clone(n);r.common.name=e.target.value,this.onChangeCredential(t,r)},onKeyDown:e=>{if(e.key===`Enter`){var t;e.preventDefault(),(t=document.getElementById(`credential_${r[0].name}`))==null||t.focus()}}}),r.map((e,i)=>{var a;return this.renderTypedField(n,e,t,((a=r[i+1])==null?void 0:a.name)||null)})]}),E(xt,{children:E(H,{variant:`contained`,color:`primary`,startIcon:E(Me,{}),onClick:()=>this.setState({editIndex:null}),children:this.props.t(`Ok`)})})]})}getAvailableTemplates(){return Object.keys(Tu).filter(e=>{let t=Tu[e];if(!t.fixedName)return!0;let n=`${du}${t.name}`;return!this.props.data.find(e=>e._id===n)})}renderAddDialog(){if(!this.state.addOpen)return null;let e=Tu[this.state.addTemplate],t=e.type||this.state.addType,n=(e.fixedName?e.name:this.state.addName.trim())||``,r=`${du}${n.replace(Ne.FORBIDDEN_CHARS,`_`)}`,i=n&&this.props.data.find(e=>e._id===r)?this.props.t(`A credential with this name already exists`):``;return N(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1}),children:[E(_e,{children:this.props.t(`Add credential`)}),N(ce,{children:[N(p,{variant:`standard`,style:bu.field,children:[E(O,{shrink:!0,children:this.props.t(`Template`)}),E(zt,{variant:`standard`,value:this.state.addTemplate,onChange:e=>this.setState({addTemplate:e.target.value,addName:Tu[e.target.value].name||``}),children:this.getAvailableTemplates().map(e=>E(It,{value:e,children:N(`span`,{style:bu.templateItem,children:[Tu[e].icon,this.getTemplateLabel(e)]})},e))})]}),N(p,{variant:`standard`,style:bu.field,children:[E(O,{shrink:!0,children:this.props.t(`Credential type`)}),E(zt,{variant:`standard`,value:t,disabled:!!e.type,onChange:e=>this.setState({addType:e.target.value}),children:fu.map(e=>E(It,{value:e,children:N(`span`,{style:bu.templateItem,children:[Eu[e],this.props.t(`credential_type_${e}`)]})},e))})]}),E(L,{variant:`standard`,style:bu.field,label:this.props.t(`Unique name`),value:e.fixedName?e.name:this.state.addName,disabled:!!e.fixedName,error:!!i,helperText:i||(n?r:``),slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&n&&!i&&(e.preventDefault(),this.onAdd())}})]}),N(xt,{children:[E(H,{variant:`contained`,color:`primary`,disabled:!n||!!i,startIcon:E(Me,{}),onClick:()=>void this.onAdd(),children:this.props.t(`Create`)}),E(H,{variant:`contained`,color:`grey`,startIcon:E(k,{}),onClick:()=>this.setState({addOpen:!1}),children:this.props.t(`Cancel`)})]})]})}renderDeleteDialog(){if(this.state.deleteIndex===null)return null;let e=this.props.data[this.state.deleteIndex],t=this.state.usage[e._id];return E(Zt,{title:this.props.t(`Delete credential`),text:this.props.t(`Really delete credential %s?`,e._id)+(t?` ${this.props.t(`This credential is used by`)}: ${t.map(e=>e.instance).join(`, `)}`:``),onClose:e=>{e?this.state.deleteIndex!==null&&this.onDelete(this.state.deleteIndex):this.setState({deleteIndex:null})}})}render(){let t=this.props.data.map((t,n)=>{let r=this.state.usage[t._id];return N(Xe,{children:[E(V,{style:bu.iconRow,children:Du(t)}),E(V,{style:bu.littleRow,title:this.props.t(`credential_type_${t.native.type}`),children:this.props.t(`credential_type_${t.native.type}`)}),E(V,{children:t._id.substring(du.length)}),E(V,{children:e.getName(t)}),E(V,{children:r?E(`span`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:r.map(e=>N(`span`,{style:bu.templateItem,title:e.title,children:[e.icon?E(`img`,{src:e.icon,width:xu,height:xu,alt:``}):null,e.instance]},e.key))}):null}),N(V,{style:bu.actionsRow,children:[E(A,{disabled:this.props.saving,onClick:()=>this.setState({editIndex:n}),children:E(Qe,{})}),E(A,{disabled:this.props.saving,onClick:()=>this.setState({deleteIndex:n}),children:E(T,{})})]})]},t._id)});return N(`div`,{style:bu.tabPanel,children:[N(`div`,{style:bu.buttonPanel,children:[E(xe,{disabled:this.props.saving,size:`small`,className:`small_size`,color:`primary`,"aria-label":`add`,onClick:()=>this.setState({addOpen:!0,addName:``,addTemplate:`login`}),children:E(h,{})}),E(Dt,{variant:`outlined`,style:bu.descriptionPanel,children:this.props.t(`credentials_hint`)})]}),E(At,{children:N(i,{"aria-label":`credentials table`,style:{tableLayout:`fixed`,width:`100%`},children:[E(qt,{children:N(Xe,{children:[E(V,{style:bu.iconRow,children:` `}),E(V,{style:bu.littleRow,children:this.props.t(`Credential type`)}),E(V,{children:this.props.t(`ID`)}),E(V,{children:this.props.t(`Name`)}),E(V,{children:this.props.t(`Used by`)}),E(V,{style:bu.actionsRow,children:` `})]})}),E(dt,{children:t})]})}),this.renderEditDialog(),this.renderAddDialog(),this.renderDeleteDialog()]})}},Au=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChatModel=n;var t=`embedding.text-embedding.textembedding.embeddinggemma.embed-.-embed.bge-.mxbai-embed.nomic-embed.arctic-embed.snowflake-arctic-embed.all-minilm.multilingual-e5.jina-embed.voyage-.gecko.paraphrase-multilingual.dall-e.gpt-image.image-edit.-image-preview.-image-latest.flash-image.nano-banana.stable-diffusion.sdxl.midjourney.flux-.imagen.sora.veo-.cogvideo.runway-.lumiere.lyria.whisper.tts-.-tts.speech-.audio-preview.mini-tts.mini-transcribe.-transcribe.native-audio.flash-live.gpt-audio.realtime.bark-.xtts.voicebox.moderation.omni-moderation.llama-guard.shieldgemma.prompt-guard.-guardian.safeguard.rerank.reranker.babbage-.davinci-.curie-.text-ada-.text-davinci.text-curie.text-babbage.instructgpt.code-davinci.code-cushman.-turbo-instruct.-search-preview.-search-api.code-search.text-search.similarity-.computer-use-preview.deep-research.robotics.aqa.reader-lm.-nsql.minicheck`.split(`.`);function n(e){let n=e.toLowerCase();return!(t.some(e=>n.includes(e))||n.startsWith(`claude-1`)||n.startsWith(`claude-instant`))}}))(),ju=`pushedAnswer`,Mu=6e5,Nu=new Map,X=new Map,Pu=0;function Fu(){Nu.clear(),X.clear()}async function Iu(e,t){let n=Nu.get(t);if(n)return n;let r=X.get(t);return r||(r=(async()=>{let n={session:``,pending:new Map};try{let r=await e.subscribeOnInstance(t,ju,null,e=>{let t=e;if(!(t!=null&&t.requestId))return;let r=n.pending.get(t.requestId);r&&(n.pending.delete(t.requestId),r(t))});return n.session=r.session||``,!(r!=null&&r.accepted)||!n.session?null:(e.registerConnectionHandler(function t(n){n||(e.unregisterConnectionHandler(t),Fu())}),Nu.set(t,n),n)}catch(e){return console.warn(`[push] cannot subscribe for pushed answers, falling back to the callback`,e),null}finally{X.delete(t)}})(),X.set(t,r)),r}async function Lu(e,t,n,r,i=Mu){let a=await Iu(e,t),o=a?`req-${++Pu}-${Date.now().toString(36)}`:``,s=await e.sendTo(t,n,{...r,timeout:i,...a?{uiSession:a.session,requestId:o}:{}});return!a||!(s!=null&&s.accepted)?s:new Promise(e=>{let t=setTimeout(()=>{a.pending.delete(o),Fu(),e({error:j.t(`No answer within %s s`,String(Math.round(i/1e3)))})},i);a.pending.set(o,n=>{clearTimeout(t),e(n)})})}function Ru(e){let t=e.provider.icon||_u.key,[n,r]=z(e.provider.credentialName),[i,a]=z(``),[o,s]=z(!1),c=n.trim().replace(Ne.FORBIDDEN_CHARS,`_`),l=`${du}${c}`,d=!!c&&e.existingIds.includes(l),f=!!c&&!d&&!!i.trim(),p=()=>{if(!f)return;let n=pu.key;e.onClose({_id:l,type:`config`,common:{name:c,icon:t},native:{type:`ai`,form:`key`,version:1,encryptedFields:n.filter(e=>e.encrypted).map(e=>e.name),key:i.trim()},acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}})};return N(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>e.onClose(),children:[E(_e,{children:j.t(`Add credential`)}),N(ce,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8},children:[E(L,{variant:`standard`,fullWidth:!0,label:j.t(`Unique name`),value:n,error:d,helperText:d?j.t(`A credential with this name already exists`):c?l:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`},input:{startAdornment:E(B,{position:`start`,children:E(tt,{src:t,style:{width:20,height:20}})})}},onChange:e=>r(e.target.value)}),E(L,{variant:`standard`,fullWidth:!0,type:`text`,required:!0,label:j.t(`API key`),value:i,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,style:o?void 0:ar},input:{endAdornment:E(B,{position:`end`,children:E(A,{tabIndex:-1,size:`small`,edge:`end`,disabled:!i,"aria-label":j.t(o?`Hide password`:`Show password`),title:j.t(o?`Hide password`:`Show password`),onClick:()=>s(!o),children:E(o?ht:Ye,{})})})}},onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f&&(e.preventDefault(),p())}})]}),N(xt,{children:[E(H,{variant:`contained`,color:`primary`,disabled:!f,startIcon:E(Me,{}),onClick:p,children:j.t(`Create`)}),E(H,{color:`grey`,startIcon:E(k,{}),onClick:()=>e.onClose(),children:j.t(`Cancel`)})]})]})}var zu=[{value:`openai`,label:`OpenAI (ChatGPT)`,icon:_u.chatgpt,credentialName:`chatgpt`,keyUrl:`https://platform.openai.com/api-keys`},{value:`anthropic`,label:`Anthropic (Claude)`,icon:_u.anthropic,credentialName:`anthropic`,keyUrl:`https://console.anthropic.com/settings/keys`},{value:`gemini`,label:`Google Gemini`,icon:_u.gemini,credentialName:`gemini`,keyUrl:`https://aistudio.google.com/apikey`},{value:`deepseek`,label:`DeepSeek`,icon:_u.deepseek,credentialName:`deepseek`,keyUrl:`https://platform.deepseek.com/api_keys`},{value:`custom`,label:`Custom (OpenAI-compatible)`,credentialName:`custom`}];function Bu(e){return zu.find(t=>t.value===e)}var Vu=`tabAi`,Hu=[{value:``,label:`Endpoint default`},{value:`none`,label:`Off (local models)`},{value:`minimal`,label:`Minimal`},{value:`low`,label:`Low`},{value:`medium`,label:`Medium`},{value:`high`,label:`High`}],Uu=20,Wu={tabPanel:{width:`100%`,height:`100%`,overflow:`auto`,overflowX:`hidden`,padding:15,boxSizing:`border-box`},content:{maxWidth:960,display:`flex`,flexDirection:`column`,gap:16},providerTitle:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},row:{display:`flex`,flexWrap:`wrap`,alignItems:`flex-start`,columnGap:8,rowGap:4},field:{flex:`1 1 220px`,minWidth:0},rowButton:{marginTop:12},credentialItem:{display:`flex`,alignItems:`center`,gap:8}};function Gu(){}function Ku(e){let t=Bu(e.provider);return t?e.credentialId?t.value:t.value===`custom`&&e.baseUrl?`custom`:``:``}function qu(e){return e.info.icon?E(tt,{src:e.info.icon,style:{width:Uu,height:Uu}}):E(Kt,{style:{width:Uu,height:Uu}})}function Ju(e){var t;let n=(t=e.common)==null?void 0:t.name;return typeof n==`string`&&n?n:e._id.replace(du,``)}function Yu(e){var t,n;let r=((t=e.data)==null?void 0:t.native)||{},i=e.dataAux||[],a=i.filter(e=>{var t;return((t=e.native)==null?void 0:t.type)===`ai`}),[o,s]=z([]),[c,l]=z(!1),[u,d]=z(``),[f,g]=z(``),[_,y]=z(null),b=F(0),x=Ku(r),ee=Bu(x),S=e.saving,w=(t,n)=>e.onChange({...e.data,native:{...r,...t}},n||null,Gu),te=e=>e===r.provider?{provider:e}:{provider:e,model:``},D=()=>{s([]),d(``),g(``),w({provider:``,credentialId:``,baseUrl:``,model:``})},ne=a.find(e=>e._id===r.credentialId),re=typeof(ne==null||(n=ne.native)==null?void 0:n.key)==`string`&&ne.native.key!==`__SOME_PASSWORD__`?ne.native.key:``,ie=!!x&&!!e.instance,k=()=>{if(!ie||!e.instance)return;let t=++b.current;l(!0),d(``),g(``),Lu(e.socket,e.instance,`chat:testConnection`,{provider:x,credentialId:re?``:r.credentialId,apiKey:re||void 0,baseUrl:x===`custom`?r.baseUrl:``,allowSelfSignedCerts:!!r.allowSelfSignedCerts},6e4).then(n=>{if(t===b.current){if(n!=null&&n.error)d(n.error),s([]);else{let t=((n==null?void 0:n.models)||[]).filter(Au.isChatModel);s(t),g(e.t(`Connection OK: %s models`,String(t.length)))}}}).catch(e=>{t===b.current&&d(String(e))}).finally(()=>{t===b.current&&l(!1)})};Yt(()=>{if(!ie)return;let e=setTimeout(()=>k(),500);return()=>clearTimeout(e)},[x,r.credentialId,r.baseUrl,r.allowSelfSignedCerts,re,e.instance]);let ae=t=>{let n=r.provider===t.value&&r.credentialId||``,i=!!n&&!a.find(e=>e._id===n),o=t.value===`custom`;return N(p,{variant:`standard`,style:Wu.field,error:i,disabled:S,children:[E(O,{shrink:!0,children:e.t(`API key (credential)`)}),N(zt,{value:n,displayEmpty:!0,onChange:e=>{let n=e.target.value;w(n?{...te(t.value),credentialId:n}:{credentialId:``})},children:[E(It,{value:``,children:E(`em`,{children:e.t(`none`)})}),a.map(e=>{var t;return E(It,{value:e._id,children:N(`span`,{style:Wu.credentialItem,children:[typeof((t=e.common)==null?void 0:t.icon)==`string`&&e.common.icon?E(tt,{src:e.common.icon,style:{width:Uu,height:Uu}}):null,Ju(e)]})},e._id)}),i?N(It,{value:n,children:[n.replace(du,``),` (`,e.t(`Credential not found`),`)`]}):null]}),E(ke,{children:i?e.t(`Credential not found`):t.keyUrl?E(`a`,{href:t.keyUrl,target:`_blank`,rel:`noreferrer`,style:{color:`inherit`},children:new URL(t.keyUrl).host}):o?e.t(`Optional`):null})]})},oe=t=>{let n=t.value===`custom`,i=x===t.value;return N(`div`,{children:[N(R,{component:`div`,style:Wu.providerTitle,children:[E(qu,{info:t}),t.label]}),N(`div`,{style:Wu.row,children:[n?E(L,{variant:`standard`,style:Wu.field,disabled:S,label:e.t(`Base URL`),placeholder:`http://127.0.0.1:11434/v1`,value:r.provider===`custom`&&r.baseUrl||``,slotProps:{inputLabel:{shrink:!0}},onChange:e=>w({...te(`custom`),baseUrl:e.target.value})}):null,ae(t),E(Lt,{title:e.t(`Add credential`),children:E(`span`,{style:Wu.rowButton,children:E(A,{disabled:S,onClick:()=>y(t),children:E(h,{})})})}),E(H,{variant:`outlined`,style:Wu.rowButton,disabled:S||!i||!ie||c,startIcon:i&&c?E(v,{size:16}):E(m,{}),onClick:k,children:e.t(`Test`)}),i?E(Lt,{title:e.t(`Remove provider`),children:E(`span`,{style:Wu.rowButton,children:E(A,{disabled:S,onClick:D,children:E(T,{})})})}):null]})]},t.value)};return N(`div`,{style:Wu.tabPanel,children:[N(`div`,{style:Wu.content,children:[E(R,{variant:`body2`,children:e.t(`Set up the AI once for the whole system. The AI assistant of admin uses these settings.`)}),ee?oe(ee):zu.map(e=>oe(e)),ee?N(je,{children:[E(C,{severity:`info`,children:e.t(`Only one AI provider can be active. To use another one, remove this one first.`)}),u?E(C,{severity:`error`,children:u}):null,f?E(C,{severity:`success`,children:f}):null,E(ot,{freeSolo:!0,disabled:S,options:o,value:r.model||``,onInputChange:(e,t)=>{(t||``)!==(r.model||``)&&w({model:t||``})},renderInput:t=>E(L,{...t,variant:`standard`,label:e.t(`Model`),placeholder:`claude-..., gpt-...`})}),x===`custom`?E(Ae,{disabled:S,control:E(Ue,{checked:!!r.allowSelfSignedCerts,onChange:e=>w({allowSelfSignedCerts:e.target.checked})}),label:e.t(`Allow self-signed certificates`)}):null,x===`custom`||x===`openai`?N(p,{variant:`standard`,disabled:S,children:[E(O,{children:e.t(`Reasoning effort`)}),E(zt,{value:r.reasoningEffort||``,onChange:e=>w({reasoningEffort:e.target.value}),children:Hu.map(t=>E(It,{value:t.value,children:e.t(t.label)},t.value||`default`))})]}):null,x===`anthropic`?E(L,{variant:`standard`,type:`number`,disabled:S,label:e.t(`Maximum answer length`),helperText:e.t(`A longer answer is cut off when the limit is reached.`),value:r.maxTokens||``,placeholder:String(vu.DEFAULT_AI_MAX_TOKENS),slotProps:{htmlInput:{min:vu.MIN_AI_MAX_TOKENS,max:vu.MAX_AI_MAX_TOKENS,step:1024}},onChange:e=>w({maxTokens:parseInt(e.target.value,10)||0})}):null,E(C,{severity:`warning`,children:e.t(`The objects, states and logs will be processed by your AI provider.`)})]}):null]}),_?E(Ru,{provider:_,existingIds:i.map(e=>e._id),onClose:e=>{let t=_.value;y(null),e&&w({...te(t),credentialId:e._id},[...i,e])}}):null]})}var Xu={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},buttonPanel:{paddingBottom:50,display:`flex`},descriptionPanel:e=>({width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`,"& a":{paddingLeft:3,color:e.palette.mode===`dark`?`#EEE`:`#111`}}),formControl:{margin:8,minWidth:`100%`}},Zu=class extends kl{render(){let{data:e}=this.props,{letsEncrypt:t}=e.native||{};return N(`div`,{style:Xu.tabPanel,children:[E(`div`,{style:{width:`100%`,overflow:`auto`,overflowX:`hidden`,padding:15,fontSize:20,color:`#ff4949`},children:this.props.t(`ra_Use iobroker.acme adapter for letsencrypt certificates`)}),E(`div`,{style:Xu.buttonPanel,children:E(Dt,{variant:`outlined`,sx:Xu.descriptionPanel,dangerouslySetInnerHTML:{__html:this.props.t(`letsnecrypt_help`)}})}),N(P,{container:!0,spacing:6,children:[E(P,{size:{md:3,xs:12},children:E(p,{variant:`standard`,style:Xu.formControl,children:E(L,{variant:`standard`,id:`email`,disabled:this.props.saving,label:this.props.t(`Email for account:`),value:(t==null?void 0:t.email)||``,onChange:e=>this.onChangeText(e,`email`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.email?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`email`),children:E(k,{})})}):null}}})})}),E(P,{size:{md:3,xs:12},children:E(p,{variant:`standard`,style:Xu.formControl,children:E(L,{disabled:this.props.saving,variant:`standard`,id:`domains`,label:this.props.t(`Domains:`),value:(t==null?void 0:t.domains)||``,onChange:e=>this.onChangeText(e,`domains`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.domains?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`domains`),children:E(k,{})})}):null}}})})}),E(P,{size:{md:3,xs:12},children:E(p,{variant:`standard`,style:Xu.formControl,children:E(L,{variant:`standard`,id:`path`,disabled:this.props.saving,label:this.props.t(`Path to storage:`),value:(t==null?void 0:t.path)||``,onChange:e=>this.onChangeText(e,`path`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.path?E(B,{position:`end`,children:E(A,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`path`),children:E(k,{})})}):null}}})})})]})]})}onChangeText(e,t){let n=e.target.value;this.doChange(t,n)}doChange(e,t){let n=U.clone(this.props.data);n.native.letsEncrypt=n.native.letsEncrypt||{},n.native.letsEncrypt[e]=t,this.props.onChange(n)}};x();var Qu={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},buttonPanel:{paddingBottom:40,display:`flex`},formControl:{margin:8,minWidth:`100%`},tableCell:{textAlign:`center`,border:`1px solid #AAA`,paddingLeft:0,paddingRight:0}},$u=class e extends kl{static getTypes(){return[{type:`object`,title:`Object rights`},{type:`state`,title:`States rights`},{type:`file`,title:`File rights`}]}getRights(t){let n=this.props.data.common.defaultNewAcl[t];return e.permBits.map(e=>e.map(e=>n&e))}getTable(e){let t=this.getRights(e).map((t,n)=>N(Nt,{children:[E(V,{style:Qu.tableCell,children:E(Oe,{disabled:this.props.saving,checked:!!t[0],color:`primary`,onChange:()=>this.handleCheck(e,n,0)})}),E(V,{style:Qu.tableCell,children:E(Oe,{disabled:this.props.saving,checked:!!t[1],color:`primary`,onChange:()=>this.handleCheck(e,n,1)})})]},n));return E(At,{children:N(i,{style:Qu.table,"aria-label":`customized table`,children:[E(qt,{children:N(Xe,{children:[E(V,{colSpan:2,style:Qu.tableCell,children:this.props.t(`Owner`)}),E(V,{colSpan:2,style:Qu.tableCell,children:this.props.t(`Group`)}),E(V,{colSpan:2,style:Qu.tableCell,children:this.props.t(`Everyone`)})]})}),N(dt,{children:[N(Xe,{children:[E(V,{style:Qu.tableCell,children:this.props.t(`read`)}),E(V,{style:Qu.tableCell,children:this.props.t(`write`)}),E(V,{style:Qu.tableCell,children:this.props.t(`read`)}),E(V,{style:Qu.tableCell,children:this.props.t(`write`)}),E(V,{style:Qu.tableCell,children:this.props.t(`read`)}),E(V,{style:Qu.tableCell,children:this.props.t(`write`)})]}),E(Xe,{children:t})]})]})})}doChange(e,t){let n=U.clone(this.props.data);e===`owner`?n.common.defaultNewAcl.owner=t:e===`ownerGroup`&&(n.common.defaultNewAcl.ownerGroup=t),this.props.onChange(n)}handleCheck(t,n,r){let i=U.clone(this.props.data);i.common.defaultNewAcl[t]^=e.permBits[n][r],this.props.onChange(i)}static getText(e,t){return typeof e==`object`?e[t]||e.en||``:e||``}render(){let t=j.getLanguage(),n=this.props.users.map((n,r)=>E(It,{value:n._id,children:e.getText(n.common.name,t)},r)),r=this.props.groups.map((n,r)=>E(It,{value:n._id,children:e.getText(n.common.name,t)},r)),i=e.getTypes().map((e,t)=>N(P,{size:{lg:4,xs:12,md:6},children:[E(R,{variant:`h6`,component:`div`,children:this.props.t(e.title)}),this.getTable(e.type)]},t));return N(`div`,{style:Qu.tabPanel,children:[E(R,{variant:`h5`,component:`div`,children:this.props.t(`Access control list`)}),N(P,{container:!0,spacing:3,children:[E(P,{size:{lg:3,xs:12,md:6},children:N(p,{variant:`standard`,style:Qu.formControl,children:[E(O,{shrink:!0,id:`owner-label`,children:this.props.t(`Owner user`)}),E(zt,{disabled:this.props.saving,variant:`standard`,style:Qu.formControl,id:`owner`,value:this.props.data.common.defaultNewAcl.owner,onChange:e=>this.doChange(`owner`,e.target.value),displayEmpty:!0,inputProps:{"aria-label":`users`},children:n})]})}),E(P,{size:{lg:3,xs:12,md:6},children:N(p,{variant:`standard`,style:Qu.formControl,children:[E(O,{shrink:!0,id:`ownerGroup-label`,children:this.props.t(`Owner group`)}),E(zt,{disabled:this.props.saving,variant:`standard`,style:Qu.formControl,id:`ownerGroup`,value:this.props.data.common.defaultNewAcl.ownerGroup,onChange:e=>this.doChange(`ownerGroup`,e.target.value),displayEmpty:!0,inputProps:{"aria-label":`ownerGroup`},children:r})]})})]}),E(P,{container:!0,spacing:3,children:i})]})}};M($u,`permBits`,[[1024,512],[64,32],[4,2]]),x(),window.ace.config.set(`basePath`,`lib/js/ace`);var ed={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,padding:15},note:{padding:15,backgroundColor:`#607d8b`,color:`#FFF`,overflow:`auto`,flex:`none`},sentData:{padding:15},formControl:{margin:8,minWidth:`100%`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,border:`none`,overflow:`auto`},selectEmpty:{marginTop:16}},td=class e extends kl{constructor(...e){super(...e),M(this,`handleChangeType`,e=>{this.doChange(`diag`,e),this.props.handle&&this.props.handle(e)})}static getTypes(){return[{id:`none`,title:`none`},{id:`normal`,title:`normal`},{id:`no-city`,title:`no-city`},{id:`extended`,title:`extended`}]}getTypesSelector(){let{common:t}=this.props.data,n=e.getTypes().map((e,t)=>E(It,{value:e.title,children:this.props.t(e.title)},t));return N(p,{variant:`standard`,fullWidth:!0,style:{marginTop:8},children:[E(O,{shrink:!0,id:`statistics-label`,children:this.props.t(`Statistics`)}),E(zt,{disabled:this.props.saving,variant:`standard`,id:`statistics`,value:t.diag,displayEmpty:!0,onChange:e=>this.handleChangeType(e.target.value),children:n})]})}doChange(e,t){let n=U.clone(this.props.data);n.common[e]=t,this.props.onChange(n)}render(){return E(`div`,{style:{...ed.tabPanel,height:`100%`},children:N(P,{container:!0,spacing:3,className:`sendData-grid`,style:{height:`100%`},children:[N(P,{size:{lg:4,md:4,xs:12},style:{display:`flex`,flexDirection:`column`},children:[N(cn,{style:ed.note,children:[E(R,{gutterBottom:!0,variant:`h6`,component:`div`,children:this.props.t(`Note:`)}),E(R,{variant:`body2`,component:`div`,dangerouslySetInnerHTML:{__html:this.props.t(`diag-note`)}})]}),this.getTypesSelector(),this.props.dataAux?E(Dt,{variant:`outlined`,style:ed.descriptionPanel,children:E(`ul`,{children:Object.keys(this.props.dataAux).map(e=>E(`li`,{children:e},e))})}):null]}),N(P,{size:{lg:8,md:4,xs:12},className:`sendData-grid`,style:{height:`100%`,display:`flex`,flexDirection:`column`},children:[E(Dt,{style:ed.sentData,children:E(R,{gutterBottom:!0,variant:`h6`,component:`div`,children:this.props.dataAux?this.props.t(`Sent data:`):this.props.t(`No data will be sent`)})}),E(Dc,{editValueMode:!0,themeType:this.props.themeType,value:JSON.stringify(this.props.dataAux,null,2)})]})]})})}};x();var nd=`__SOME_PASSWORD__`,rd=`SystemSettings.tab`,id={tabPanel:{flex:1,minWidth:0,height:`100%`,overflow:`hidden`},body:{flex:1,minHeight:0,display:`flex`},verticalTabs:e=>({flexShrink:0,borderRight:`1px solid ${e.palette.divider}`,"& .MuiTab-root":{justifyContent:`flex-start`,textAlign:`left`,minHeight:44}}),horizontalTabs:{flex:1,minWidth:0,"& .MuiTab-root":{minHeight:48}},dialogTitle:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8,padding:`0 0 0 20px`,minHeight:56},dialog:{width:`100%`,height:`100%`,maxWidth:`100%`},content:{padding:`0 !important`,display:`flex`,flexDirection:`column`},selected:e=>({color:e.palette.mode===`dark`?`#FFF !important`:`#222 !important`})},ad=class e extends Qt{constructor(e){super(e),M(this,`originalCertificates`,``),M(this,`originalConfig`,``),M(this,`originalRepositories`,``),M(this,`originalLicenses`,``),M(this,`originalCredentials`,``),M(this,`originalAi`,``),M(this,`originalCredentialObjects`,{}),M(this,`onChangeDiagType`,e=>{let t=this.state.systemConfig;t&&this.props.socket.getDiagData(this.props.currentHost,e).then(n=>this.setState({diagData:n,systemConfig:{...t,common:{...t.common,diag:e}}}))}),this.state={loading:!0,loadError:!1,saveError:!1,confirmExit:!1,systemConfig:null,systemCertificates:null,systemCredentials:null,systemRepositories:null,systemLicenses:null,systemAi:null,multipleRepos:!1,licenseManager:!1,host:``,instance:``,repoInfo:{}},this.getSettings()}async componentDidMount(){try{let e=await this.props.socket.checkFeatureSupported(`CONTROLLER_MULTI_REPO`),t=await this.props.socket.checkFeatureSupported(`CONTROLLER_LICENSE_MANAGER`),n=await this.props.socket.getCurrentInstance(),r=await this.props.socket.getObject(`system.adapter.${n}`);this.setState({host:r.common.host,instance:n,multipleRepos:e,licenseManager:t})}catch{this.setState({host:this.props.currentHost})}}async getSettings(){let e={loading:!1,loadError:!1};try{let t=await this.props.socket.getObject(`system.repositories`);t=U.clone(t),t||={},t.native=t.native||{},t.native.repositories=t.native.repositories||{};let n={};e.repoInfo=n,Object.keys(t.native.repositories).forEach(e=>{t.native.repositories[e]&&(t.native.repositories[e].json&&(n[e]=t.native.repositories[e].json._repoInfo,delete t.native.repositories[e].json),t.native.repositories[e].hash&&delete t.native.repositories[e].hash,t.native.repositories[e].time&&delete t.native.repositories[e].time)}),this.originalRepositories=JSON.stringify(t),e.systemRepositories=t;let r=await this.props.socket.getSystemConfig(!0);this.originalConfig=JSON.stringify(r||{}),e.systemConfig=r||{},r.common=r.common||{},r.native=r.native||{},r.common.defaultNewAcl=r.common.defaultNewAcl||{object:1636,state:1636,file:1632,owner:`system.user.admin`,ownerGroup:`system.group.administrator`},r.common.firstDayOfWeek=r.common.firstDayOfWeek||`monday`,e.diagData=await this.props.socket.getDiagData(this.props.currentHost,r.common.diag),e.users=await this.props.socket.getUsers(),e.groups=await this.props.socket.getGroups();let i=await this.props.socket.getAdapterInstances(!0),a=[],o={};for(let e of Object.values(i)){if(!e.common.getHistory)continue;let t=e._id.split(`.`),n=`${t[t.length-2]}.${t[t.length-1]}`;a.push(n);let r=e.common.icon;r&&!r.startsWith(`data:image`)&&!r.includes(`/`)&&(r=`adapter/${e.common.name}/${r}`),r&&(o[n]=r)}e.histories=a,e.historyIcons=o;let s=await this.props.socket.getObject(`system.certificates`);this.originalCertificates=JSON.stringify(s),e.systemCertificates=s||null;let c=await this.props.socket.getObjectViewSystem(`config`,du,`${du}香`);this.originalCredentialObjects={};let l=Object.values(c).filter(e=>!!e).sort((e,t)=>e._id.localeCompare(t._id)).map(e=>{var t;this.originalCredentialObjects[e._id]=U.clone(e);let n=U.clone(e);return(((t=n.native)==null?void 0:t.encryptedFields)||[]).forEach(e=>{n.native[e]&&(n.native[e]=nd)}),n});this.originalCredentials=JSON.stringify(l),e.systemCredentials=l;let u=null;try{u=await this.props.socket.getObject(yu)}catch{}u=u?U.clone(u):{_id:yu,type:`config`,common:{name:`AI settings`,expert:!0},native:{}},u.native=u.native||{},this.originalAi=JSON.stringify(u),e.systemAi=u;let d=await this.props.socket.getObject(`system.licenses`);d||={common:{name:`Licenses from iobroker.net`},native:{login:``,password:``,licenses:[]},type:`config`},d.native.password&&(d.native.password=nd),this.originalLicenses=JSON.stringify({login:d.native.login,password:d.native.password}),e.systemLicenses=d,this.setState(e)}catch{this.setState({loading:!1,loadError:!0})}}renderDialogConfirm(){return this.state.confirmExit?E(Zt,{text:this.props.t(`Discard unsaved changes?`),onClose:e=>this.setState({confirmExit:!1},()=>e&&this.props.onClose())}):null}onSave(){let e=!1,t=this.state.systemConfig,n=this.state.systemCertificates,r=this.state.systemCredentials,i=this.state.systemRepositories,a=this.state.systemLicenses;t&&n&&r&&i&&a&&this.setState({saving:!0,saveError:!1},async()=>{try{let c=await this.props.socket.getSystemConfig(!0);if(c||={},JSON.stringify(c.common)!==JSON.stringify(t.common)&&await this.props.socket.setSystemConfig(t),await this.props.socket.setObject(`system.certificates`,n),JSON.stringify(r)!==this.originalCredentials){for(let e of Object.keys(this.originalCredentialObjects))r.find(t=>t._id===e)||await this.props.socket.delObject(e);for(let e of r){var o;let t=U.clone(e),n=this.originalCredentialObjects[t._id],r=((o=t.native)==null?void 0:o.encryptedFields)||[];for(let e of r){let r=t.native[e];if(r===nd){var s;t.native[e]=(n==null||(s=n.native)==null?void 0:s[e])||``}else r&&(t.native[e]=await this.props.socket.encrypt(r))}n&&JSON.stringify(t)===JSON.stringify(n)||await this.props.socket.setObject(t._id,t)}}let l=this.state.systemAi;if(l&&JSON.stringify(l)!==this.originalAi){let e=null;try{e=await this.props.socket.getObject(yu)}catch{}await this.props.socket.setObject(yu,{...e||l,native:{...(e==null?void 0:e.native)||{},...l.native}})}let u=await this.props.socket.getObject(`system.repositories`);u||={},u.native=u.native||{},u.native.repositories=u.native.repositories||{};let d=JSON.parse(JSON.stringify(i.native.repositories));Object.keys(d).forEach(e=>{u.native.repositories[e]&&(u.native.repositories[e].json&&(d[e].json=u.native.repositories[e].json),u.native.repositories[e].hash&&(d[e].hash=u.native.repositories[e].hash),u.native.repositories[e].time&&(d[e].time=u.native.repositories[e].time))}),JSON.stringify(i.native.repositories)!==JSON.stringify(d)&&(u.native.repositories=d,e=!0,await this.props.socket.setObject(`system.repositories`,u));let f=await this.props.socket.getObject(`system.licenses`);f||={},f.type=f.type||`config`,f.name=f.name||`Licenses from iobroker.net`,f.common=f.common||{},f.native=f.native||{},f.native.licenses=f.native.licenses||[],f.native.password=f.native.password||``,f.native.login=f.native.login||``;let p=f.native.password?nd:``;(a.native.password!==p||f.native.login!==a.native.login)&&(f.native.login=a.native.login,a.native.password!==nd&&a.native.password?f.native.password=await this.props.socket.encrypt(a.native.password):a.native.password||(f.native.password=``),await this.props.socket.setObject(`system.licenses`,f),await this.props.socket.updateLicenses(``,``)),alert(this.props.t(`Settings saved`)),this.props.onClose(e),t.common.expertMode!==JSON.parse(this.originalConfig).common.expertMode&&this.props.expertModeFunc(!!t.common.expertMode),(t.common.language!==JSON.parse(this.originalConfig).common.language||JSON.stringify(t.common.activeRepo)!==JSON.stringify(JSON.parse(this.originalConfig).common.activeRepo))&&window.location.reload(),this.setState({saving:!1})}catch{this.setState({saveError:!0})}finally{this.setState({saving:!1})}})}getTabs(){return[{id:0,title:`System settings`,icon:E(De,{}),component:Ml,data:`systemConfig`,name:`tabConfig`,dataAux:`systemRepositories`,handle:void 0},{id:9,title:`EOS Home / Pro`,icon:E(Tl,{}),component:au,data:``,name:`tabEosLicenses`,dataAux:``},{id:1,title:`Repositories`,icon:E(El,{}),component:zl,data:`systemRepositories`,name:`tabRepositories`,dataAux:`systemConfig`,handle:void 0,socket:this.props.socket},{id:2,title:`Adapter licenses`,icon:E(Tl,{}),component:Vl,data:`systemLicenses`,name:`tabLicenses`,dataAux:``,handle:void 0,socket:this.props.socket},{id:3,title:`Certificates`,icon:E(Ol,{}),component:su,data:`systemCertificates`,name:`tabCertificates`,dataAux:``,handle:void 0},{id:4,title:`Credentials`,icon:E(ye,{}),component:ku,data:`systemCredentials`,name:`tabCredentials`,dataAux:``,handle:void 0,socket:this.props.socket},{id:5,title:`AI`,icon:E(Cl,{}),component:Yu,data:`systemAi`,name:Vu,dataAux:`systemCredentials`,handle:void 0},{id:6,title:`Let's encrypt SSL`,icon:E(Os,{}),component:Zu,data:`systemCertificates`,name:`tabLetsEncrypt`,dataAux:``,handle:void 0},{id:7,title:`Default ACL`,icon:E(Dl,{}),component:$u,data:`systemConfig`,name:`tabDefaultACL`,dataAux:``,handle:void 0},{id:8,title:`Statistics`,icon:E(wl,{}),component:td,data:`systemConfig`,dataAux:`diagData`,name:`tabStatistics`,handle:e=>this.onChangeDiagType(e)}]}getCurrentTabId(e){var t;let n=this.props.currentTab.id||(window._localStorage||window.localStorage).getItem(rd)||``;return e.find(e=>e.name===n)?n:((t=e[0])==null?void 0:t.name)||`tabConfig`}getDialogContent(e,t){var n;if(t===`tabEosLicenses`&&this.props.eosAccessRole===`admin`)return E(au,{});if(this.state.loadError)return N(I,{sx:{p:3},children:[E(C,{severity:`error`,children:this.props.t(`Cannot read settings`)}),E(H,{onClick:()=>this.setState({loading:!0,loadError:!1},()=>void this.getSettings()),children:this.props.t(`Retry`)})]});if(this.state.loading)return E(I,{sx:id.tabPanel,children:E(Ie,{})});let r=e.find(e=>e.name===t)||e[0],i=r.component,{groups:a,users:o,histories:s,historyIcons:c}=this.state;return E(I,{component:`div`,sx:id.tabPanel,children:E(i,{adminGuiConfig:this.props.adminGuiConfig,onChange:(e,t,n)=>this.onChangedTab(r.data,e,r.dataAux,t,n),data:this.state[r.data],dataAux:this.state[r.dataAux],handle:r.handle,users:o,groups:a,multipleRepos:this.state.multipleRepos,activeRepo:(n=this.state.systemConfig)==null?void 0:n.common.activeRepo,repoInfo:this.state.repoInfo,histories:s,historyIcons:c,themeName:this.props.themeName,themeType:this.props.themeType,host:this.state.host,t:this.props.t,socket:this.props.socket,instance:this.state.instance,saving:!!this.state.saving})})}onChangedTab(e,t,n,r,i){if(t||r){let a={...this.state};t&&(a[e]=t),r&&(a[n]=r),this.setState(a,()=>i==null?void 0:i())}}static ifRepoError(e){var t;return e!=null&&(t=e.native)!=null&&t.repositories?Object.keys(e.native.repositories).find(e=>!e||e.trimStart()!==e||e.length<3&&!!e.match(/^\d+$/))!==void 0:!1}render(){var t,n;let r=!this.state.loading&&!this.state.loadError&&(JSON.stringify(this.state.systemRepositories)!==this.originalRepositories||JSON.stringify(this.state.systemConfig)!==this.originalConfig||JSON.stringify(this.state.systemCertificates)!==this.originalCertificates||JSON.stringify(this.state.systemCredentials)!==this.originalCredentials||JSON.stringify(this.state.systemAi)!==this.originalAi||JSON.stringify({login:(t=this.state.systemLicenses)==null?void 0:t.native.login,password:(n=this.state.systemLicenses)==null?void 0:n.native.password})!==this.originalLicenses),i=this.getTabs().filter(e=>{var t;if(e.name===`tabEosLicenses`)return this.props.eosAccessRole===`admin`;if(!this.state.licenseManager&&e.name===`tabLicenses`)return!1;let n=(t=this.props.adminGuiConfig.admin)==null?void 0:t.settings;return(n==null?void 0:n[e.name])!==!1}),a=this.getCurrentTabId(i),o=!1;a===`tabRepositories`&&(o=!!this.state.systemRepositories&&e.ifRepoError(this.state.systemRepositories));let s=i.map(e=>E(ve,{label:this.props.t(e.title),icon:e.icon,iconPosition:`start`,value:e.name,disabled:o&&e.name!==a,sx:{"&.Mui-selected":id.selected}},e.title)),c=this.props.width===`xs`||this.props.width===`sm`,l=this.props.width===`xs`,d=E(Xt,{orientation:c?`horizontal`:`vertical`,indicatorColor:`secondary`,value:a,onChange:(t,n)=>e.onTabChanged(n),variant:`scrollable`,scrollButtons:`auto`,allowScrollButtonsMobile:!0,sx:c?id.horizontalTabs:id.verticalTabs,children:s});return N(u,{sx:{"&.MuiDialog-root":id.dialog,...l?{}:{"& .MuiDialog-paper":{height:`calc(100% - 64px)`,width:`calc(100% - 64px)`,maxWidth:`calc(100% - 64px)`}}},open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&(r?this.setState({confirmExit:!0}):this.props.onClose())},fullWidth:!0,fullScreen:l,"aria-labelledby":`system-settings-dialog-title`,children:[N(ce,{style:id.content,children:[E(yt,{position:`static`,color:`default`,children:N(`div`,{style:id.dialogTitle,children:[c?d:E(R,{className:`dialogName`,children:this.props.t(`Base settings`)}),E(A,{size:`large`,disabled:this.state.saving,edge:`start`,color:`inherit`,onClick:()=>r?this.setState({confirmExit:!0}):this.props.onClose(),"aria-label":`close`,children:E(k,{})})]})}),N(I,{style:id.body,children:[c?null:d,this.getDialogContent(i,a)]}),this.renderDialogConfirm()]}),this.state.saveError?N(C,{severity:`error`,"data-eos-system-save-error":`1`,children:[this.props.t(`Cannot save system configuration`),`. `,this.props.t(`Please try again`)]}):null,N(xt,{children:[E(H,{variant:`contained`,disabled:!r||this.state.saving||o||this.state.loadError,onClick:()=>this.onSave(),color:`primary`,startIcon:this.state.saving?E(v,{size:20}):E(Me,{}),children:this.props.t(`Save & Close`)}),E(H,{variant:`contained`,disabled:this.state.saving,onClick:()=>r?this.setState({confirmExit:!0}):this.props.onClose(),startIcon:E(k,{}),color:`grey`,children:r?this.props.t(`Cancel`):this.props.t(`Close`)})]})]})}};M(ad,`onTabChanged`,e=>{(window._localStorage||window.localStorage).setItem(rd,e),d.doNavigate(null,`system`,e)});var od=w()(ad);x();var sd=`0 4px 7px 5px rgb(0 0 0 / 14%), 0 3px 1px 1px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%)`,cd={root:{padding:10,margin:`auto`,display:`flex`,height:`100%`,alignItems:`center`,borderRadius:0,justifyContent:`center`},paper:e=>({backgroundColor:e.palette.background.paper+(e.palette.background.paper.length<7?`d`:`dd`),p:`30px 32px 28px`,overflowY:`visible`,display:`flex`,flexDirection:`column`,height:`auto`,minHeight:0,width:`calc(100% - 48px)`,maxHeight:`none`,maxWidth:400,boxShadow:sd}),avatar:e=>({m:1,backgroundColor:e.palette.mode===`dark`?`#111`:`#eee`,width:100,height:100,"& .MuiAvatar-img":{width:`calc(100% - 4px)`,height:`calc(100% - 4px)`,padding:2}}),submit:{margin:8},alert:{marginTop:16,backgroundColor:`#f44336`,padding:8,color:`#fff`,borderRadius:4,fontSize:16},ioBrokerLink:{textTransform:`inherit`},marginTop:{marginTop:28},progress:{textAlign:`center`}},ld=class e extends Qt{constructor(e){super(e),M(this,`passwordRef`,void 0),M(this,`firstLoginCheckTimer`,null);let t=this.authenticateWithRefreshToken();this.state={inProcess:!1,stayLoggedIn:!1,showPassword:!1,username:``,password:``,error:``,loggingIn:t,firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:``};let n=window.document.body;n.style.backgroundColor=window.loginBackgroundColor,n.style.backgroundImage=window.loginBackgroundImage,n.style.backgroundSize=`cover`,this.passwordRef=Ht.createRef()}static async processTokenAnswer(t,n,r){if(n.ok){let r=await n.json();if(r!=null&&r.access_token)return st.saveTokensStatic(r,t),e.redirectBack(),!0}if(r){let t=st.readTokens();if(t!=null&&t.refresh_token&&t.refresh_token!==r)return e.redirectBack(),!0}return st.deleteTokensStatic(),!1}static redirectBack(){let e=new URL(window.location.href).searchParams.get(`href`),t;e?(t=e,t.startsWith(`#`)&&(t=`./${t}`)):t=`./`,window.location.href=t}authenticateWithRefreshToken(){let t=st.readTokens();return t!=null&&t.refresh_token?(fetch(sr(`oauth/token`),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`grant_type=refresh_token&refresh_token=${t.refresh_token}&stayloggedin=${t.stayLoggedIn}&client_id=ioBroker`}).then(async n=>{await e.processTokenAnswer(t.stayLoggedIn,n,t.refresh_token)||this.setState({inProcess:!1,loggingIn:!1})}).catch(e=>{console.error(`Cannot fetch access token: ${e}`),this.setState({inProcess:!1,loggingIn:!1})}),!0):!1}getManagedFirstLoginAccount(){return this.state.username.trim().toLowerCase().replace(/^system\.user\./,``)}isManagedFirstLoginAccount(){return[`installer`,`guest`,`user`].includes(this.getManagedFirstLoginAccount())}isManagedFirstLogin(){let e=this.getManagedFirstLoginAccount();return!this.state.password&&this.isManagedFirstLoginAccount()&&this.state.firstLoginEligible&&this.state.firstLoginCheckedAccount===e}scheduleFirstLoginEligibilityCheck(){this.firstLoginCheckTimer&&clearTimeout(this.firstLoginCheckTimer);let e=this.getManagedFirstLoginAccount();this.state.password||!this.isManagedFirstLoginAccount()?this.setState({firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:e}):(this.setState({firstLoginEligible:!1,firstLoginChecking:!0,firstLoginCheckedAccount:e}),this.firstLoginCheckTimer=setTimeout(async()=>{if(!(this.getManagedFirstLoginAccount()!==e||this.state.password))try{var t;let n=(t=window.NEXOWATT_EOS_FIRST_LOGIN)==null?void 0:t.check,r=n?!!await n(e):!1;this.getManagedFirstLoginAccount()===e&&!this.state.password&&this.setState({firstLoginEligible:r,firstLoginChecking:!1,firstLoginCheckedAccount:e})}catch{this.setState({firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:e})}},120))}componentDidMount(){[80,300,900].forEach(e=>setTimeout(()=>this.scheduleFirstLoginEligibilityCheck(),e))}componentWillUnmount(){this.firstLoginCheckTimer&&clearTimeout(this.firstLoginCheckTimer)}onLoginAction(){var e;this.isManagedFirstLogin()&&(e=window.NEXOWATT_EOS_FIRST_LOGIN)!=null&&e.start?window.NEXOWATT_EOS_FIRST_LOGIN.start(this.state.username):this.onLogin()}onLogin(){this.setState({inProcess:!0,error:``},async()=>{let t=await fetch(sr(`oauth/token`),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`grant_type=password&username=${encodeURIComponent(this.state.username)}&password=${encodeURIComponent(this.state.password)}&stayloggedin=${this.state.stayLoggedIn}&client_id=ioBroker`});await e.processTokenAnswer(this.state.stayLoggedIn,t)||this.setState({inProcess:!1,error:j.t(`wrongPassword`)})})}render(){let e=window.loginLink&&window.loginLink!==`@@loginLink@@`?window.loginLink:`#`,t=window.loginMotto&&window.loginMotto!==`@@loginMotto@@`?window.loginMotto:`Energy Operation System`;window.login!==`true`&&window.login!==`@@auth@@`&&(window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}`);let n=window.loginBackgroundColor&&window.loginBackgroundColor!==`inherit`||window.loginBackgroundImage?{background:`#00000000`}:{},r;return r=this.state.loggingIn?E(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:`...`}):N(Dt,{className:`eos-login-card-modern${this.isManagedFirstLogin()?` eos-login-first-ready`:``}${this.state.firstLoginChecking&&this.isManagedFirstLoginAccount()?` eos-login-first-checking`:``}`,sx:cd.paper,children:[N(P,{container:!0,sx:{flexDirection:`column`,alignItems:`center`},children:[window.loginLogo&&window.loginLogo!==`@@loginLogo@@`?E(I,{sx:{width:100,height:100,borderRadius:`5px`,padding:`5px`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:E(`img`,{src:window.loginLogo,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):(window.loginHideLogo===`false`||window.loginHideLogo===`@@loginHideLogo@@`)&&E(gt,{sx:cd.avatar,src:`img/admin.svg`}),E(R,{component:`h1`,variant:`h5`,children:window.loginTitle&&window.loginTitle!==`@@loginTitle@@`?window.loginTitle:j.t(`loginTitle`)}),window.location.search.includes(`error`)||this.state.error?E(`div`,{style:cd.alert,children:this.state.error||j.t(`wrongPassword`)}):null,E(L,{variant:`outlined`,margin:`normal`,disabled:this.state.inProcess,required:!0,value:this.state.username,onChange:e=>this.setState({username:e.target.value,firstLoginEligible:!1,firstLoginChecking:!1},()=>this.scheduleFirstLoginEligibilityCheck()),onKeyUp:e=>{if(e.key===`Enter`&&this.state.username){var t;e.preventDefault(),(t=this.passwordRef.current)==null||t.focus()}},fullWidth:!0,size:`small`,id:`username`,placeholder:`${j.t(`enterLogin`)} *`,slotProps:{htmlInput:{"aria-label":j.t(`enterLogin`)}},name:`username`,autoComplete:`username`,autoFocus:!0}),E(L,{variant:`outlined`,margin:`normal`,disabled:this.state.inProcess,required:!this.isManagedFirstLogin(),fullWidth:!0,ref:this.passwordRef,value:this.state.password,onChange:e=>this.setState({password:e.target.value,firstLoginEligible:!1,firstLoginChecking:!1},()=>this.scheduleFirstLoginEligibilityCheck()),onKeyUp:e=>{e.key===`Enter`&&this.state.username&&(this.state.password||this.isManagedFirstLogin())&&this.onLoginAction()},slotProps:{htmlInput:{"aria-label":j.t(`enterPassword`)},input:{endAdornment:this.state.password?E(A,{tabIndex:-1,"aria-label":`toggle password visibility`,onClick:()=>{this.setState({showPassword:!this.state.showPassword},()=>{setTimeout(()=>{var e;return(e=this.passwordRef.current)==null?void 0:e.focus()},50)})},children:E(Ye,{})}):null}},size:`small`,name:`password`,placeholder:`${j.t(`enterPassword`)} *`,type:this.state.showPassword?`text`:`password`,id:`password`,autoComplete:`current-password`}),E(`div`,{className:`eos-login-first-status eos-login-first-status-native`,"aria-live":`polite`}),E(Ae,{control:E(Oe,{id:`stayloggedin`,name:`stayloggedin`,value:`on`,checked:this.state.stayLoggedIn,onChange:e=>this.setState({stayLoggedIn:e.target.checked}),color:`primary`,disabled:this.state.inProcess}),label:j.t(`Stay signed in`)}),E(H,{type:`submit`,disabled:this.state.inProcess||!this.state.username||!this.state.password&&!this.isManagedFirstLogin(),onClick:()=>this.onLoginAction(),fullWidth:!0,variant:`contained`,color:`primary`,style:cd.submit,children:this.state.inProcess?E(v,{size:24}):j.t(`login`)}),window.ssoActive===`true`?E(H,{onClick:()=>{window.location.href=sr(`sso?redirectUrl=${encodeURIComponent(`${window.origin}${sr(`#tab-intro`)}`)}&method=login`)},fullWidth:!0,variant:`contained`,color:`secondary`,children:j.t(`Use Single-Sign On`)}):null]}),E(I,{style:cd.marginTop,children:N(R,{variant:`body2`,color:`textSecondary`,align:`center`,children:[window.loginLink&&window.loginLink!==`@@loginLink@@`?E(We,{style:cd.ioBrokerLink,color:`inherit`,href:e,rel:`noopener noreferrer`,target:`_blank`,children:t}):null,!window.loginLink||window.loginLink===`@@loginLink@@`?t:null,!window.loginLink||window.loginLink===`@@loginLink@@`?E(We,{style:cd.ioBrokerLink,color:`inherit`,href:e,rel:`noopener noreferrer`,target:`_blank`,children:`NexoWatt EOS`}):null]})})]}),E(Dt,{component:`main`,style:{...cd.root,...n},children:r})}};async function ud(e=fetch){let t=new AbortController,n=setTimeout(()=>t.abort(),5e3);try{let n=await e(`/api/auth/status`,{credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:t.signal,headers:{Accept:`application/json`}});if(n.status===401)return;if(!n.ok)throw Error(`SESSION_STATUS_UNAVAILABLE`);let r=await n.json();if(!r||typeof r!=`object`||Array.isArray(r))throw Error(`SESSION_STATUS_INVALID`);if(`authenticated`in r&&r.authenticated===!1)return;if(!(`csrfToken`in r)||typeof r.csrfToken!=`string`||!/^[A-Za-z0-9_-]{16,256}$/.test(r.csrfToken))throw Error(`SESSION_CSRF_INVALID`);let i=await e(`/api/auth/logout`,{method:`POST`,credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:t.signal,headers:{Accept:`application/json`,"Content-Type":`application/json`,"X-NW-CSRF":r.csrfToken},body:`{}`});if(!i.ok&&i.status!==401)throw Error(`SESSION_LOGOUT_UNCONFIRMED`)}finally{clearTimeout(n)}}x();var dd={imgDiv:{"& svg:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`},"& img:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`},"@media screen and (max-width: 710px)":{"& img,svg":{marginRight:0}}},img:{width:30,height:30,margin:`auto 0`,position:`relative`,borderRadius:3,background:`#FFFFFF`,padding:2},notAlive:{opacity:.3},button:{maxWidth:300},name:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 710px)":{display:`none`},marginLeft:`8px`},width:{width:`100%`,"@media screen and (max-width: 710px)":{width:`auto`}},selector:{width:15,display:`inline-block`},tooltip:{pointerEvents:`none`}},fd=class extends Qt{constructor(e){super(e),M(this,`failures`,0),M(this,`retryTimer`,null),M(this,`readRun`,0),M(this,`unmounted`,!1),M(this,`connectionHandler`,e=>{e&&!this.state.hosts.length&&(this.failures=0,this.retryTimer&&=(clearTimeout(this.retryTimer),null),this.readHosts())}),M(this,`onAliveChanged`,e=>{let t=JSON.parse(JSON.stringify(this.state.alive)),n=!1;e.forEach(e=>{e.type===`deleted`?t[e.id]!==void 0&&(delete t[e.id],n=!0):!!t[e.id]!=!!e.alive&&(t[e.id]=e.alive,n=!0)}),n&&this.setState({alive:t},()=>{if(!t[this.props.currentHost]){let n=Object.keys(t).find(e=>t[e]);if(n){let t=this.state.hosts.find(e=>e._id===n);if(t){var e;this.props.setCurrentHost(((e=t.common)==null?void 0:e.name)||n.replace(`system.host.`,``),n)}else this.props.setCurrentHost(n.replace(`system.host.`,``),n)}}})}),M(this,`onHostsObjectChange`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts)),n=JSON.parse(JSON.stringify(this.state.alive)),r=!1;Promise.all(e.map(async e=>{let i=t.find(t=>t._id===e.id);if(e.type===`deleted`||!e.obj){if(i){let a=t.indexOf(i);a!==-1&&(delete n[e.id],t.splice(a),r=!0)}}else if(i){var a,o,s;if(i.common.name!==((a=e.obj.common)==null?void 0:a.name)){var c;i.common.name=((c=e.obj.common)==null?void 0:c.name)||``,r=!0}if(i.common.color!==((o=e.obj.common)==null?void 0:o.color)){var l;i.common.color=((l=e.obj.common)==null?void 0:l.color)||``,r=!0}if(i.common.icon!==((s=e.obj.common)==null?void 0:s.icon)){var u;i.common.icon=((u=e.obj.common)==null?void 0:u.icon)||``,r=!0}}else{var d,f,p;r=!0,t.push({_id:e.id,common:{name:((d=e.obj.common)==null?void 0:d.name)||``,color:((f=e.obj.common)==null?void 0:f.color)||``,icon:((p=e.obj.common)==null?void 0:p.icon)||``,installedVersion:`ignored`},native:{hardware:{networkInterfaces:{}}}});let i=await this.props.socket.getState(`${e.id}.alive`);n[e.id]=!!(i!=null&&i.val)}})).then(()=>{r&&this.setState({hosts:t,alive:n},()=>{if(!n[this.props.currentHost]){let t=Object.keys(n).find(e=>n[e]);if(t){let n=this.state.hosts.find(e=>e._id===t);if(n){var e;this.props.setCurrentHost(((e=n.common)==null?void 0:e.name)||t.replace(`system.host.`,``),t)}else this.props.setCurrentHost(t.replace(`system.host.`,``),t)}}})})}),this.state={anchorEl:null,alive:{},hosts:[]}}componentDidMount(){this.props.socket.registerConnectionHandler(this.connectionHandler),this.readHosts()}componentWillUnmount(){this.unmounted=!0,this.retryTimer&&=(clearTimeout(this.retryTimer),null),this.props.socket.unregisterConnectionHandler(this.connectionHandler),this.props.hostsWorker.unregisterHandler(this.onHostsObjectChange),this.props.hostsWorker.unregisterAliveHandler(this.onAliveChanged)}async readHosts(){let e=++this.readRun;this.retryTimer&&=(clearTimeout(this.retryTimer),null);try{let t=await this.props.socket.getCompactHosts(!0);if(e!==this.readRun||this.unmounted)return;let n={};for(let e=0;e<t.length;e++){let r=await this.props.socket.getState(`${t[e]._id}.alive`);r?n[t[e]._id]=!!r.val:n[t[e]._id]=!1}if(e!==this.readRun||this.unmounted)return;if(this.failures=0,!n[this.props.currentHost]){let e=Object.keys(n).find(e=>n[e]);e&&setTimeout(()=>{let t=this.state.hosts.find(t=>t._id===e);if(t){var n;this.props.setCurrentHost(((n=t.common)==null?void 0:n.name)||e.replace(`system.host.`,``),e)}else this.props.setCurrentHost(e.replace(`system.host.`,``),e)},100)}this.setState({hosts:t,alive:n},()=>{this.props.hostsWorker.registerHandler(this.onHostsObjectChange),this.props.hostsWorker.registerAliveHandler(this.onAliveChanged)})}catch(t){if(e!==this.readRun||this.unmounted)return;if(oc(t)){this.failures=0,window.alert(`Cannot get hosts: ${t}`);return}let n=ac(this.failures);if(this.failures++,!this.props.socket.isConnected()){console.warn(`Cannot get hosts: ${t}. Next attempt after the reconnect`);return}console.warn(`Cannot get hosts: ${t}. Next attempt in ${n/1e3} s`),this.retryTimer=setTimeout(()=>{this.retryTimer=null,this.readHosts()},n)}}render(){var e,t,n,r,i;if(!this.props.expertMode&&this.state.hosts.length<2)return null;let a;return this.state.hosts.length&&(a=this.state.hosts.find(e=>e._id===this.props.currentHost||e._id===`system.host.${this.props.currentHost}`)),N(I,{children:[E(Lt,{title:this.props.tooltip||j.t(`Change current host`),slotProps:{popper:{sx:dd.tooltip}},children:E(`span`,{children:E(H,{color:this.props.themeType===`dark`?`primary`:`secondary`,style:{...dd.button,background:(a==null||(e=a.common)==null?void 0:e.color)||`none`,borderColor:a!=null&&(t=a.common)!=null&&t.color?Ne.invertColor(a.common.color,!1):`none`},variant:this.props.disabled||this.state.hosts.length<2?`text`:`outlined`,disabled:!!this.props.disabled||this.state.hosts.length<2,"aria-haspopup":`true`,onClick:e=>this.setState({anchorEl:e.currentTarget}),children:N(I,{component:`div`,sx:{...dd.width,...this.state.alive[this.props.currentHost]?void 0:dd.notAlive,...dd.imgDiv},style:{display:`flex`,color:a!=null&&(n=a.common)!=null&&n.color?Ne.invertColor(a.common.color,!0):`none`,alignItems:`center`},children:[E(tt,{style:dd.img,src:(a==null||(r=a.common)==null?void 0:r.icon)||`img/no-image.svg`}),E(I,{component:`div`,sx:dd.name,children:a==null||(i=a.common)==null?void 0:i.name})]})})})}),E(Ze,{anchorEl:this.state.anchorEl,keepMounted:!0,open:!!this.state.anchorEl,onClose:()=>this.setState({anchorEl:null}),children:this.state.hosts.map(({_id:e,common:{name:t,icon:n,color:r}},i)=>E(It,{disabled:!this.state.alive[e],selected:e===this.props.currentHost,style:{background:r||`inherit`},onClick:()=>{this.props.currentHost!==this.state.hosts[i]._id&&this.props.setCurrentHost(this.state.hosts[i].common.name,this.state.hosts[i]._id),this.setState({anchorEl:null})},children:N(I,{component:`div`,sx:dd.imgDiv,style:{display:`flex`,color:r&&Ne.invertColor(r,!0)||`inherit`,alignItems:`center`,gap:8},children:[E(`div`,{style:dd.selector,children:e===this.props.currentHost?`ᐅ`:``}),E(tt,{style:dd.img,src:n||`img/no-image.svg`}),t]})},e))})]})}},pd={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:4,fontSize:16,fontFamily:`"Roboto", "Helvetica", "Arial", sans-serif`}),paper:{maxWidth:800},overflowHidden:{display:`flex`},pre:{overflow:`auto`,margin:20},text:{fontSize:16},textBold:{fontSize:16,fontWeight:`bold`},width100:{width:`100%`}},md=({expertMode:e,onClose:t})=>{let[n,r]=z(!1);return N(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":pd.paper},children:[N(_e,{children:[E(jt,{style:{marginRight:8}}),j.t(`Expert mode`)]}),E(ce,{style:pd.overflowHidden,dividers:!0,children:N(P,{container:!0,children:[E(P,{style:pd.width100,children:E(I,{component:`div`,sx:pd.root,children:N(`div`,{style:pd.pre,children:[E(R,{style:pd.text,variant:`body2`,component:`p`,children:e?j.t(`Now the expert mode will be deactivated only during this browser session.`):j.t(`Now the expert mode will be active only during this browser session.`)}),e?null:E(R,{style:pd.textBold,variant:`body2`,component:`p`,children:j.t(`The expert mode allows you to view and edit system internal details.`)}),e?null:E(R,{style:pd.textBold,variant:`body2`,component:`p`,children:j.t(`Please make sure you know what you are doing!`)}),E(R,{style:pd.text,variant:`body2`,component:`p`,children:j.t(`If you need to save the mode all the time, you can do this in the system settings.`)}),j.t(`Use this button:`),E(A,{color:`primary`,size:`small`,onClick:()=>t(`openSettings`),children:E(we,{})})]})})}),E(P,{children:E(Ae,{control:E(Oe,{id:`expert-mode-do-not-show`,checked:n,onChange:e=>r(e.target.checked)}),label:j.t(`Do not show this dialog in this browser session any more`)})})]})}),E(xt,{children:E(H,{id:`expert-mode-dialog-ok`,variant:`contained`,autoFocus:!0,onClick:()=>{n&&(window._sessionStorage||window.sessionStorage).setItem(`App.doNotShowExpertDialog`,`true`),t(!0)},color:`primary`,startIcon:E(Me,{}),children:j.t(`Ok`)})})]})};function hd(e,t){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<0||typeof t!=`string`||t.length>64)return!1;let n=/^(<=|>=|===|!==|==|!=|<|>)\s*(0|[1-9][0-9]{0,15})$/.exec(t.trim());if(!n)return!1;let r=Number(n[2]);if(!Number.isSafeInteger(r))return!1;switch(n[1]){case`<`:return e<r;case`<=`:return e<=r;case`>`:return e>r;case`>=`:return e>=r;case`==`:case`===`:return e===r;case`!=`:case`!==`:return e!==r;default:return!1}}var gd={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`}),paper:{maxWidth:1e3,width:`100%`},overflowHidden:{display:`flex`},pre:{overflow:`auto`,m:`20px`,"& p":{fontSize:18}},blockInfo:{right:20,top:10,position:`absolute`,display:`flex`,alignItems:`center`,color:`silver`},img:{"& .news-admin-dialog-img":{marginLeft:10,width:45,height:45,margin:`auto 0`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}}},img2:{width:70,height:70,m:`10px 0`,borderRadius:`4px`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},link:{margin:`10px 0`}},_d=({name:e})=>{switch(e){case`warning`:return E(Pt,{className:`news-admin-dialog-img`,style:{color:`#ffca00`}});case`info`:return E(lt,{className:`news-admin-dialog-img`,style:{color:`#007cff`}});case`danger`:return E(o,{className:`news-admin-dialog-img`,style:{color:`#ff2f2f`}});default:return E(lt,{className:`news-admin-dialog-img`,style:{color:`#007cff`}})}};function vd(e,t){return!!Object.keys(t).filter(t=>t.startsWith(`adapter.system.${e}.`)).find(e=>t[e].enabled)}function yd(e,t){if(e.startsWith(`equals`))return t===e.substring(7,e.length-1).trim();if(e.startsWith(`bigger`)||e.startsWith(`greater`)){let n=e.substring(7,e.length-1).trim();try{return Ut.gt(n,t)}catch{return!1}}if(e.startsWith(`smaller`)){let n=e.substring(8,e.length-1).trim();try{return Ut.lt(t,n)}catch{return!1}}if(e.startsWith(`between`)){let n=e.substring(8,e.indexOf(`,`)).trim(),r=e.substring(e.indexOf(`,`)+1,e.length-1).trim();try{return Ut.gte(t,n)&&Ut.lte(t,r)}catch{return!1}}return!0}var bd=(e,t,n)=>{let r=[];try{let i=Date.now();for(let a of e){if(!a)continue;if(a.id===t)break;let e=!0;if(e&&a[`date-start`]&&new Date(a[`date-start`]).getTime()>i)e=!1;else if(e&&a[`date-end`]&&new Date(a[`date-end`]).getTime()<i)e=!1;else if(e&&a.conditions&&Object.keys(a.conditions).length>0){let t=!0;a.conditions.or===`true`&&(t=!1);let r=Object.keys(a.conditions).filter(e=>e!==`or`),i=!0;for(let e=0;e<r.length;e++){let o=n.adapters[r[e]],s=a.conditions[r[e]];if(s&&(r[e]===`js-controller`?s===`!installed`||s===`!active`?i=!1:s===`installed`||s===`active`?i=!0:n.jsControllerVersion&&(i=yd(s,n.jsControllerVersion)):!o&&s!==`!installed`||o&&s===`!installed`?i=!1:o&&s===`active`?i=vd(r[e],n.instances):o&&s===`!active`?i=!vd(r[e],n.instances):o&&(i=yd(s,o.v))),t&&!i||!t&&i)break}e=i}e&&a[`node-version`]&&n.nodeVersion&&(e=yd(a[`node-version`],n.nodeVersion)),e&&a[`npm-version`]&&n.npmVersion&&(e=yd(a[`npm-version`],n.npmVersion)),e&&a.os&&n.os&&(e=n.os===a.os),e&&a.repo&&(e=Array.isArray(n.activeRepo)?n.activeRepo.includes(a.repo):n.activeRepo===a.repo),e&&a.uuid&&(e=Array.isArray(a.uuid)?n.uuid&&a.uuid.find(e=>n.uuid===e):!!(n.uuid&&n.uuid===a.uuid)),e&&a[`number-of-objects`]!==void 0&&(e=hd(n.noObjects,a[`number-of-objects`])),e&&a[`objects-db-type`]&&(a[`objects-db-type`].includes(n.objectsDbType)||(e=!1)),e&&r.push({id:a.id,title:a.title[n.lang]||a.title.en,content:a.content[n.lang]||a.content.en,class:a.class,created:a.created,link:a.link,linkTitle:(typeof a.linkTitle==`object`?a.linkTitle[n.lang]||a.linkTitle.en:a.linkTitle)||``,img:a.img})}}catch{}return r};function xd({newsArr:e,current:t,onSetLastNewsId:n}){var r,i;let[a]=z(()=>{let n=e.find(e=>e.id===t);if(!n)return 0;let r=e.indexOf(n);return r+1<e.length?r+1:-1}),[o,s]=z(a<0?0:a);Yt(()=>{a<0&&n()},[]);let c=()=>{n(e[o].id),o+1<e.length?s(o+1):n()},l=j.getLanguage(),d=e[o].content.replace(/='([^']*)'/g,`="$1"`),f=e[o].title,p=e[o].link,m=e[o].linkTitle;return N(u,{onClose:c,open:!0,sx:{"& .MuiDialog-paper":gd.paper},children:[N(I,{component:`div`,sx:{...gd.blockInfo,...gd.img},children:[new Date(e[o].created).toLocaleDateString(l),E(_d,{name:e[o].class})]}),E(_e,{children:j.t(`You have unread news!`)}),E(_e,{children:f}),E(ce,{style:gd.overflowHidden,dividers:!0,children:E(I,{component:`div`,sx:gd.root,children:N(I,{component:`div`,sx:gd.pre,children:[((r=e[o])==null?void 0:r.img)&&E(on,{sx:gd.img2,component:`img`,image:e[o].img}),E(R,{variant:`body2`,component:`p`,children:Ne.renderTextWithA(d.replace(/\n/g,`<br />`))}),((i=e[o])==null?void 0:i.link)&&E(H,{variant:`contained`,style:gd.link,onClick:()=>window.open(e[o].link,`_blank`),color:`primary`,children:m||j.t(`Link`)})]})})}),N(xt,{children:[p?E(H,{id:`news-admin-dialog-more-info`,variant:`contained`,onClick:()=>{let e=window.open(p,`_blank`);e==null||e.focus()},color:`secondary`,startIcon:E(Fe,{}),children:m||j.t(`Show more info`)}):null,E(H,{id:`news-admin-dialog-acknowledge`,variant:`contained`,autoFocus:!0,onClick:c,color:`primary`,startIcon:E(Me,{}),children:j.t(`Acknowledge`)})]})]})}var Sd=y(E(`path`,{d:`M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1m-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05M12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0`}),`SettingsRemote`),Cd=y([E(`path`,{d:`M21 19.1H3V5h18zM21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2`},`0`),E(`path`,{d:`M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41z`},`1`)],`CancelPresentation`),wd=y(E(`path`,{d:`M13 7h-2v2h2zm0 4h-2v6h2zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99M17 19H7V5h10z`}),`PermDeviceInformation`),Td=y(E(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),Ed=y(E(`path`,{d:`M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z`}),`Memory`),Dd={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`,flexDirection:`column`}),paper:{maxWidth:1e3,width:`100%`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},message:{justifyContent:`space-between`,display:`flex`,width:`100%`,alignItems:`center`,"@media screen and (max-width: 550px)":{flexWrap:`wrap`}},column:{flexDirection:`column`},headerText:e=>({fontWeight:`bold`,fontSize:20,color:e.palette.mode===`dark`?`#DDD`:`#111`}),descriptionHeaderText:e=>({margin:`18px 0`,color:e.palette.mode===`dark`?`#CCC`:`#222`}),silver:{color:`silver`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},button:{paddingTop:18,paddingBottom:5,position:`sticky`,bottom:0,background:`white`,zIndex:3},terminal:{fontFamily:`monospace`,fontSize:14,ml:`20px`,whiteSpace:`pre-wrap`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`,marginLeft:0}},img2:{width:25,height:25,mr:`10px`,margin:`auto 0`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},heading:{display:`flex`,alignItems:`center`,overflow:`hidden`},headingTop:{display:`flex`,alignItems:`center`},classNameBox:{margin:8,p:`24px`,"@media screen and (max-width: 550px)":{p:`10px`}},textStyle:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},content:{overflow:`hidden`},buttonStyle:{margin:`3px`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}}},Od=({name:e,severity:t,...n})=>{switch(e){case`restartLoop`:return E($o,{style:{color:`#ffca00`},...n});case`memIssues`:return E(Ed,{style:{color:`#ffca00`},...n});case`fsIoErrors`:return E(Td,{style:{color:`#ffca00`},...n});case`noDiskSpace`:return E(wd,{style:{color:`#ffca00`},...n});case`accessErrors`:return E(Cd,{style:{color:`#ffca00`},...n});case`nonExistingFileErrors`:return E(o,{style:{color:`#ffca00`},...n});case`remoteHostErrors`:return E(Sd,{style:{color:`#ffca00`},...n});case`heading`:return E(rs,{sx:{fontSize:36,marginLeft:4,marginRight:2},...n});default:return t===`notify`?E(rs,{color:`primary`,...n}):t===`info`?E(lt,{color:`info`,...n}):E(Pt,{style:{color:`#ffca00`},...n})}};function kd(e){return{id:`scrollable-force-tab-${e}`,"aria-controls":`scrollable-force-tabpanel-${e}`}}var Ad=({children:e,value:t,index:n,styleDiv:r,sxBox:i,...a})=>E(`div`,{role:`tabpanel`,hidden:t!==n,id:`scrollable-force-tabpanel-${n}`,"aria-labelledby":`scrollable-force-tab-${n}`,style:r,...a,children:t===n&&E(I,{style:i,children:E(R,{component:`div`,children:e})})}),jd=({messages:e,onClose:t,ackCallback:n,dateFormat:r,themeType:i,instances:a})=>{let[o,s]=z(0),[c,d]=z([]),[f,p]=z(``),[m,h]=z(!0),g=(e,t)=>{h(!0),s(t),p(``)},_=e=>(t,n)=>p(n?e:``),v=i===`dark`,y=Object.keys(e).sort((t,n)=>cs(e[t].severity,e[n].severity));return N(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":Dd.paper},children:[N(`h2`,{style:Dd.headingTop,children:[E(Od,{name:`heading`}),j.t(`Host-specific notifications`)]}),E(ce,{style:{...Dd.flex,...Dd.overflowHidden},dividers:!0,children:N(I,{component:`div`,sx:Dd.root,children:[E(yt,{position:`static`,color:`default`,children:E(Xt,{value:o,onChange:g,variant:`scrollable`,scrollButtons:!0,indicatorColor:v?`primary`:`secondary`,textColor:`primary`,children:y.map((t,n)=>E(ve,{style:v?{color:`white`}:{color:`black`},disabled:c.includes(t),label:e[t].name[j.getLanguage()],icon:E(Od,{name:t,severity:e[t].severity}),...kd(n)},t))})}),y.map((i,s)=>E(Ad,{sxBox:Dd.classNameBox,styleDiv:{...Dd.overflowAuto,color:v?`black`:void 0},value:o,index:s,children:N(`div`,{children:[E(I,{component:`div`,sx:Dd.headerText,style:{fontWeight:`bold`},children:e[i].name[j.getLanguage()]}),E(I,{component:`div`,sx:Dd.descriptionHeaderText,children:e[i].description[j.getLanguage()]}),E(`div`,{children:e[i].instances?Object.keys(e[i].instances).map(t=>{var n,c;m&&o===s&&(_(`${i}-${t}`)(``,!0),h(!1));let u=a&&a[t],d=`img/no-image.svg`;return u!=null&&(n=u.common)!=null&&n.icon&&u!=null&&(c=u.common)!=null&&c.name&&(d=`adapter/${u.common.name}/${u.common.icon}`),N(Bt,{style:v?void 0:{background:`#c0c0c052`},expanded:f===`${i}-${t}`,onChange:_(`${i}-${t}`),children:[E(re,{expandIcon:E(l,{}),sx:{"& .MuiAccordionSummary-content":Dd.content},"aria-controls":`panel1bh-content`,id:`panel1bh-header`,children:N(R,{style:Dd.heading,children:[E(on,{sx:Dd.img2,component:`img`,image:d}),E(I,{component:`div`,sx:Dd.textStyle,style:{marginLeft:8},children:t.replace(/^system\.adapter\./,``)})]})}),E(he,{style:Dd.column,children:e[i].instances[t].messages.map(e=>N(R,{component:`div`,sx:Dd.message,children:[E(I,{component:`div`,sx:Dd.terminal,children:Ne.renderTextWithA(e.message)}),E(I,{component:`div`,sx:Dd.silver,children:Ne.formatDate(new Date(e.ts),r)})]},e.ts))})]},t)}):null}),N(`div`,{style:Dd.button,children:[E(H,{variant:`contained`,autoFocus:Object.keys(e).length!==1,disabled:c.includes(i),style:c.includes(i)?{background:`silver`}:void 0,sx:Dd.buttonStyle,onClick:()=>{n(i),d([...c,i])},color:Object.keys(e).length===1?`grey`:`primary`,startIcon:E(Me,{}),children:j.t(`Acknowledge`)}),Object.keys(e).length===1&&E(H,{variant:`contained`,disabled:c.includes(i),sx:Dd.buttonStyle,style:c.includes(i)?{background:`silver`}:void 0,onClick:()=>{d([...c,i]),n(i),t()},startIcon:N(je,{children:[E(Me,{}),E(k,{})]}),color:`primary`,children:j.t(`Acknowledge & close`)})]})]})},`tabPanel-${i}`))]})}),E(xt,{children:E(H,{id:`host-warning-dialog-ok`,variant:`contained`,onClick:()=>t(),startIcon:E(k,{}),color:`grey`,children:j.t(`Ok`)})})]})};x();var Md=5e3,Nd=typeof navigator<`u`&&!!navigator.vendor&&navigator.vendor.includes(`Apple`)&&!!navigator.userAgent&&!navigator.userAgent.includes(`CriOS`)&&!navigator.userAgent.includes(`FxiOS`);function Pd(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})\.(\d{3})/);if(!t)return null;let n;if(Nd)n=new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),parseInt(t[6],10),parseInt(t[7],10)).getTime();else{let e=t[0].split(` `);n=new Date(`${e[0]}T${e[1]}`).getTime()}let r=e.match(/: (host\..+? |[-\w]+\.\d+ \()/),i=e.match(/\d+m(silly|debug|info|warn|error)/)||e.match(/ - (silly|debug|info|warn|error):/),a=e.match(/\[\d+m: ([\s\S]*)$/)||e.match(/ - (?:silly|debug|info|warn|error): ([\s\S]*)$/);return{key:n,from:r?r[0].replace(/[ :(]/g,``):``,message:a?a[1]:``,severity:i?i[1]:`info`,ts:n,_id:0}}var Fd=class{constructor(e,t){M(this,`socket`,void 0),M(this,`handlers`,void 0),M(this,`promise`,void 0),M(this,`connected`,void 0),M(this,`logs`,void 0),M(this,`newLogs`,null),M(this,`errorCountHandlers`,void 0),M(this,`warningCountHandlers`,void 0),M(this,`countErrors`,void 0),M(this,`countWarnings`,void 0),M(this,`errors`,void 0),M(this,`warnings`,void 0),M(this,`currentHost`,void 0),M(this,`maxLogs`,void 0),M(this,`logTimeout`,null),M(this,`logSize`,0),M(this,`logLevelFilterSupported`,new Map),M(this,`lastLogLevel`,void 0),M(this,`logHandler`,e=>{let t=this._processLine(e);t!=null&&t.objLine&&(this.newLogs=this.newLogs||[],this.newLogs.push(t.objLine),this.logTimeout||=setTimeout(()=>{this.logTimeout=null;let t=this.newLogs||[];this.newLogs=null,this.handlers.forEach(n=>n&&n(t,JSON.stringify(e).length-65))},200),t.isNew&&(t.objLine.severity===`error`&&this.countErrors?(this.errors++,this.errorCountHandlers.forEach(e=>e&&e(this.errors))):t.objLine.severity===`warn`&&this.countWarnings&&(this.warnings++,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))))}),M(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.logLevelFilterSupported.clear(),this.getLogs(!0)):!e&&this.connected&&(this.connected=!1)}),this.socket=e,this.handlers=[],this.promise=null,this.errorCountHandlers=[],this.warningCountHandlers=[],this.countErrors=!0,this.countWarnings=!0,this.errors=0,this.warnings=0,this.currentHost=``,this.connected=this.socket.isConnected(),this.maxLogs=t||1e3,this.logs=null,e.registerLogHandler(this.logHandler),e.registerConnectionHandler(this.connectionHandler)}setCurrentHost(e){e!==this.currentHost&&(this.currentHost=e,this.getLogs(!0))}enableCountErrors(e){if(this.countErrors!==e&&(this.countErrors=e,!this.countErrors)){let e=this.errors;this.errors=0,e&&this.errorCountHandlers.forEach(t=>t&&t(e))}}enableCountWarnings(e){if(this.countWarnings!==e&&(this.countWarnings=e,!this.countWarnings)){let e=this.warnings;this.warnings=0,e&&this.warningCountHandlers.forEach(t=>t&&t(e))}}resetErrors(){this.errors&&(this.errors=0,this.errorCountHandlers.forEach(e=>e&&e(this.errors)))}resetWarnings(){this.warnings&&(this.warnings=0,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))}registerHandler(e){this.handlers.includes(e)||this.handlers.push(e)}unregisterHandler(e){let t=this.handlers.indexOf(e);t!==-1&&this.handlers.splice(t,1)}registerErrorCountHandler(e){this.errorCountHandlers.includes(e)||this.errorCountHandlers.push(e)}unregisterErrorCountHandler(e){let t=this.errorCountHandlers.indexOf(e);t!==-1&&this.errorCountHandlers.splice(t,1)}registerWarningCountHandler(e){this.warningCountHandlers.includes(e)||this.warningCountHandlers.push(e)}unregisterWarningCountHandler(e){let t=this.warningCountHandlers.indexOf(e);t!==-1&&this.warningCountHandlers.splice(t,1)}_processLine(e,t){if(!this.logs||!e)return null;let n=this.logs,r,i=!0,a=n.length;if(t=t||a&&n[a-1].key||0,typeof e==`object`)r=e,t&&t<=r.ts?r.key=t+1:r.key=r.ts;else{let o=Pd(e);o?(r=o,t&&t<=o.ts&&(r.key=t+1)):(i=!1,a&&(r=n[a-1],r&&(typeof r.message==`object`?r.message=U.parseColorMessage(r.message.original+e):r.message+=e)))}if(!r)return null;if(typeof r.message!=`object`&&(r.message=U.parseColorMessage(r.message)),i){let e=r.key||0;if(a&&(n[a-1].key||0)>e){let t;for(t=a-1;t>=0&&!((n[t].key||0)<e);t--);t===-1?n.unshift(r):n.splice(t+1,0,r)}else n.push(r);a+1===this.maxLogs&&n.shift()}return{objLine:r,isNew:i}}sendToHost(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`timeout`)),Md);try{this.socket.getRawSocket().emit(`sendToHost`,e,t,n,e=>{clearTimeout(a),r(e)})}catch(e){clearTimeout(a),i(e instanceof Error?e:Error(String(e)))}})}async askHostForLogLevelFilter(e){var t;let n=await this.socket.getObject(e),r=n==null||(t=n.common)==null||(t=t.installedVersion)==null?void 0:t.match(/^(\d+)\.(\d+)/);if(!r)return!1;let[i,a]=[parseInt(r[1],10),parseInt(r[2],10)];if(i<7||i===7&&a<2)return!1;let o=await this.sendToHost(e,`checkFeatureSupported`,`CONTROLLER_GET_LOGS_LOG_LEVEL`);return(o==null?void 0:o.result)===!0}isLogLevelFilterSupported(e){let t=this.logLevelFilterSupported.get(e);return t||(t=this.askHostForLogLevelFilter(e).catch(()=>!1),this.logLevelFilterSupported.set(e,t)),t}async readLogLines(e){let t=this.currentHost;return e&&await this.isLogLevelFilterSupported(t)?this.socket.getLogs(t,{lines:200,logLevel:e}):this.socket.getLogs(t,200)}getLogs(e,t){if(!this.currentHost)return Promise.resolve({logs:[],logSize:0});if(t!==this.lastLogLevel&&(this.lastLogLevel=t,e=!0),!e&&this.promise instanceof Promise)return this.promise;let n=this.errors,r=this.warnings;this.errors=0,this.warnings=0;let i=t!==`error`;return this.promise=this.readLogLines(t).then(e=>{if(e===`permissionError`||(e==null?void 0:e.error)!==void 0){let e=[];return this.logs=e,window.alert(`Cannot get logs: no permission`),{logs:e,logSize:0}}if(!Array.isArray(e)){let t=[];return this.logs=t,console.warn(`Cannot get logs: unexpected answer ${JSON.stringify(e)}`),{logs:t,logSize:0}}let t=e.pop(),a=0;typeof t==`string`&&(a=parseInt(t,10));let o=[];this.logs=o;let s;return e.forEach(e=>{let t=this._processLine(e,s);t!=null&&t.objLine&&(s=t.objLine.key,t.isNew&&t.objLine.severity===`error`&&this.countErrors&&this.errors++,t.isNew&&t.objLine.severity===`warn`&&this.countWarnings&&this.warnings++)}),o.length&&o[0].ts&&o.sort((e,t)=>e.ts>t.ts?1:e.ts<t.ts?-1:0),this.logSize=a,this.handlers.forEach(e=>e&&e(o,a)),n!==this.errors&&this.errorCountHandlers.forEach(e=>e&&e(this.errors)),i?r!==this.warnings&&this.warningCountHandlers.forEach(e=>e&&e(this.warnings)):this.warnings=r,{logs:o,logSize:a}}).catch(e=>(window.alert(`Cannot get logs: ${e}`),{logs:this.logs||[],logSize:0})),this.promise}clearLines(){this.logs=[],this.logSize=0,this.errors&&(this.errors=0,this.errorCountHandlers.forEach(e=>e&&e(this.errors))),this.warnings&&(this.warnings=0,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))}};x();var Id=class e{static isTransientConnectionError(e){return/notconnected|not connected|connectionerror|close_abnormal|closed_no_status|websocket|timeout|networkerror/i.test(e instanceof Error?e.message:typeof e==`string`?e:``)}reportConnectionError(t,n){this.forceUpdate=!0,this.promise=null,e.isTransientConnectionError(n)?console.warn(`${t}: ${String(n)}`):console.error(`${t}: ${String(n)}`)}constructor(e,t,n){M(this,`socket`,void 0),M(this,`handlers`,[]),M(this,`promise`,null),M(this,`connected`,void 0),M(this,`objects`,null),M(this,`root`,void 0),M(this,`objectType`,void 0),M(this,`forceUpdate`,!1),M(this,`objectChangeHandler`,(e,t)=>{let n=e,r=t;if(this.objects=this.objects||{},this.checkObjectId(n,r)){let e,t;if(r){if((this.objectType===`adapter`||this.objectType===`instance`)&&U.fixAdminUI(r),this.objects[n]){if(JSON.stringify(this.objects[n])!==JSON.stringify(r))e=`changed`,this.objects[n]=r;else return}else e=`new`,this.objects[n]=r}else if(this.objects[n])e=`deleted`,t=this.objects[n],delete this.objects[n];else return;this.forceUpdate=!0,this.postProcessing(n,r),this.handlers.forEach(i=>i([{id:n,obj:r||void 0,type:e,oldObj:t}]))}}),M(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.handlers.length&&this.socket.subscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).then(()=>{this.getObjects(!0).then(e=>{e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))})}).catch(e=>this.reportConnectionError(`Cannot subscribe on object "${this.root}"`,e)),this.connectionPostHandler(!0)):!e&&this.connected&&(this.connected=!1,this.connectionPostHandler(!1))}),this.socket=e,this.root=t,this.objectType=n,e.registerConnectionHandler(this.connectionHandler),this.connected=this.socket.isConnected(),this.connected&&this.connectionHandler(!0)}checkObjectId(e,t){return e.startsWith(`${this.root}.`)&&(!t||t.type===this.objectType)}postProcessing(e,t){}isForceUpdate(){return this.forceUpdate}getObjects(e,t){if(e||=this.forceUpdate,this.forceUpdate=!1,!e&&this.promise instanceof Promise)return this.promise;let n=this.socket.getObjectViewSystem(this.objectType,this.root?`${this.root}.`:``,this.root?`${this.root}.\u9999`:`香`).then(e=>{let t=e;return this.objects=t,(this.objectType===`adapter`||this.objectType===`instance`)&&Object.keys(t).forEach(e=>U.fixAdminUI(t[e])),t}).catch(e=>{let r=`Cannot get objects of type ${this.objectType}, with root "${this.root}": ${e}`;return t?(console.warn(r),this.promise===n&&(this.promise=null)):this.reportConnectionError(`Cannot get objects of type ${this.objectType}, with root "${this.root}"`,e),null});return this.promise=n,n}connectionPostHandler(e){}registerHandler(e,t){this.handlers.includes(e)||(this.handlers.push(e),this.handlers.length===1&&this.connected&&this.socket.subscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).then(()=>{t||this.getObjects(!0).then(e=>{e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))})}).catch(e=>this.reportConnectionError(`Cannot subscribe on objects "${this.root}"`,e)))}unregisterHandler(e){let t=this.handlers.indexOf(e);t!==-1&&(this.handlers.splice(t,1),!this.handlers.length&&this.connected&&this.socket.unsubscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).catch(e=>this.reportConnectionError(`Cannot unsubscribe from objects "${this.root}"`,e)))}destroy(){this.handlers.forEach(e=>this.unregisterHandler(e)),this.socket.unregisterConnectionHandler(this.connectionHandler)}},Ld=class extends Id{constructor(e){super(e,`system.adapter`,`instance`)}};x();var Rd=class extends Id{constructor(e){super(e,`system.host`,`host`),M(this,`aliveHandlers`,[]),M(this,`notificationsHandlers`,[]),M(this,`aliveStates`,{}),M(this,`notificationPromises`,{}),M(this,`notificationTimer`,null),M(this,`subscribeTs`,void 0),M(this,`aliveChangeHandler`,(e,t)=>{if(e.startsWith(`system.host.`)&&e.endsWith(`.alive`)){let n;if(e=e.replace(/\.alive$/,``),t){if(this.aliveStates[e]!==void 0){if(!!this.aliveStates[e]!=!!(t!=null&&t.val))n=`changed`,this.aliveStates[e]=!!(t!=null&&t.val);else return}else n=`new`,this.aliveStates[e]=!!(t!=null&&t.val)}else if(this.aliveStates[e])n=`deleted`,delete this.aliveStates[e];else return;this.aliveHandlers.forEach(t=>t&&t([{id:e,alive:this.aliveStates[e],type:n}]))}}),M(this,`onNotificationHandler`,e=>{let t=e.replace(/\.notifications\..+$/,``);(!this.subscribeTs||Date.now()-this.subscribeTs>500)&&(this.notificationTimer&&clearTimeout(this.notificationTimer),this.notificationTimer=setTimeout(e=>{this.notificationTimer=null,this.notificationPromises[e]=this._getNotificationsFromHosts(e,!0),this.notificationPromises[e].then(e=>e&&this.notificationsHandlers.forEach(t=>t(e)))},300,t))}),this.aliveHandlers=[],this.notificationsHandlers=[],this.notificationPromises={},this.aliveStates={}}connectionPostHandler(e){e?this.aliveHandlers.length&&this.socket.subscribeState(`system.host.*.alive`,this.aliveChangeHandler):Object.keys(this.aliveStates).forEach(e=>this.aliveStates[e]=!1)}registerAliveHandler(e){this.aliveHandlers.includes(e)||(this.aliveHandlers.push(e),this.aliveHandlers.length===1&&this.connected&&this.socket.subscribeState(`system.host.*.alive`,this.aliveChangeHandler))}unregisterAliveHandler(e){let t=this.aliveHandlers.indexOf(e);t!==-1&&(this.aliveHandlers.splice(t,1),!this.aliveHandlers.length&&this.connected&&this.socket.unsubscribeState(`system.host.*.alive`,this.aliveChangeHandler))}_getNotificationsFromHosts(e,t){return!t&&this.notificationPromises[e]instanceof Promise||(this.notificationPromises[e]=this.socket.getState(`${e}.alive`).then(t=>t!=null&&t.val?this.socket.getNotifications(e,``).then(t=>({[e]:t||null})).catch(t=>(console.warn(`Cannot read notifications from "${e}": ${t}`),{[e]:null})):Promise.resolve({[e]:null}))),this.notificationPromises[e]}async getNotifications(e,t){if(e)return this._getNotificationsFromHosts(e,t);let n=(await this.socket.getCompactHosts(t)).map(e=>this._getNotificationsFromHosts(e._id,t)),r=await Promise.all(n),i={};return r.forEach(e=>Object.assign(i,e)),i}registerNotificationHandler(e){this.notificationsHandlers.includes(e)||(this.notificationsHandlers.push(e),this.notificationsHandlers.length===1&&this.connected&&(this.subscribeTs=Date.now(),this.socket.subscribeState(`system.host.*.notifications.*`,this.onNotificationHandler)))}unregisterNotificationHandler(e){let t=this.notificationsHandlers.indexOf(e);t!==-1&&(this.notificationsHandlers.splice(t,1),!this.notificationsHandlers.length&&this.connected&&this.socket.unsubscribeState(`system.host.*.notifications.*`,this.onNotificationHandler))}};x();var zd=class extends Id{constructor(e){super(e,`system.adapter`,`adapter`),M(this,`repositoryHandlers`,void 0),M(this,`repoTimer`,null),M(this,`lastActiveRepo`,void 0),M(this,`repoChangeHandler`,()=>{this.repoTimer&&clearTimeout(this.repoTimer),this.repoTimer=setTimeout(()=>{this.repoTimer=null,this.repositoryHandlers.forEach(e=>e())},500)}),M(this,`systemConfigChangeHandler`,(e,t)=>{if(e!==`system.config`||!(t!=null&&t.common))return;let n=t.common.activeRepo;JSON.stringify(this.lastActiveRepo)!==JSON.stringify(n)&&(this.lastActiveRepo=n,this.repoChangeHandler())}),this.repositoryHandlers=[],this.lastActiveRepo=void 0}checkObjectId(e,t){return!!e.match(/^system\.adapter\.[^.]+$/)&&(!t||t.type===this.objectType)}postProcessing(e,t){this.socket.getAdaptersResetCache(),this.socket.getInstalledResetCache(``),this.socket.getRepositoryResetCache(``)}registerRepositoryHandler(e){this.repositoryHandlers.includes(e)||(this.repositoryHandlers.push(e),this.repositoryHandlers.length===1&&this.connected&&(this.socket.subscribeObject(`system.repositories`,this.repoChangeHandler).catch(e=>window.alert(`Cannot subscribe on object: ${e}`)),this.socket.subscribeObject(`system.config`,this.systemConfigChangeHandler).catch(e=>window.alert(`Cannot subscribe on system.config: ${e}`)),this.socket.getCompactSystemConfig().then(e=>{this.lastActiveRepo=e.common.activeRepo}).catch(e=>console.warn(`Cannot get initial system config: ${e}`))))}unregisterRepositoryHandler(e){let t=this.repositoryHandlers.indexOf(e);t!==-1&&this.repositoryHandlers.splice(t,1),!this.repositoryHandlers.length&&this.connected&&(this.socket.unsubscribeObject(`system.repositories`,this.repoChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on object: ${e}`)),this.socket.unsubscribeObject(`system.config`,this.systemConfigChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on system.config: ${e}`)))}};x();var Bd=class{constructor(e){M(this,`socket`,void 0),M(this,`handlers`,void 0),M(this,`promise`,void 0),M(this,`connected`,void 0),M(this,`objects`,void 0),M(this,`objectChangeHandler`,(e,t)=>{this.objects=this.objects||{};let n,r;if(t){if((t.type===`instance`||t.type===`adapter`)&&U.fixAdminUI(t),this.objects[e]){if(n=this.objects[e],this.objects[e]===t||JSON.stringify(this.objects[e])===JSON.stringify(t))return;r=`changed`,this.objects[e]=t}else r=`new`,this.objects[e]=t}else this.objects[e]?(n=this.objects[e],r=`deleted`,delete this.objects[e]):r=`deleted`;this.handlers.forEach(i=>i([{id:e,obj:t||void 0,type:r,oldObj:n}]))}),M(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.handlers.length&&(this.socket.subscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot subscribe on objects: ${e}`)),this.getObjects(!0).then(e=>e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))))):!e&&this.connected&&(this.connected=!1)}),this.socket=e,this.handlers=[],this.promise=null,e.registerConnectionHandler(this.connectionHandler),this.connected=this.socket.isConnected(),this.objects=null}getObjects(e){return!e&&this.promise instanceof Promise||(this.promise=this.socket.getObjects(!0,!0).then(e=>(this.objects=e,this.objects)).catch(e=>window.alert(`Cannot get objects: ${e}`))),this.promise}registerHandler(e){this.handlers.includes(e)||(this.handlers.push(e),this.handlers.length===1&&this.connected&&this.socket.subscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot subscribe on object: ${e}`)))}unregisterHandler(e,t){let n=this.handlers.indexOf(e);n!==-1&&this.handlers.splice(n,1),!this.handlers.length&&this.connected&&!t&&this.socket.unsubscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on object: ${e}`))}},Vd=y(E(`path`,{d:`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`NavigateBefore`),Hd=y(E(`path`,{d:`M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 9h-4v4h-2v-4H9V9h4V5h2v4h4z`}),`LibraryAdd`),Ud=y(E(`path`,{d:`M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m-2 14-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z`}),`AssignmentTurnedIn`),Wd=y(E(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`ReportProblem`);function Gd(){}function Kd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var qd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yd={};function Xd(e,t){return((t||Yd).jsx?Jd:qd).test(e)}var Zd=/[ \t\n\f\r]/g;function Qd(e){return typeof e==`object`?e.type===`text`&&$d(e.value):$d(e)}function $d(e){return e.replace(Zd,``)===``}var ef=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ef.prototype.normal={},ef.prototype.property={},ef.prototype.space=void 0;function tf(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ef(n,r,t)}function nf(e){return e.toLowerCase()}var rf=class{constructor(e,t){this.attribute=t,this.property=e}};rf.prototype.attribute=``,rf.prototype.booleanish=!1,rf.prototype.boolean=!1,rf.prototype.commaOrSpaceSeparated=!1,rf.prototype.commaSeparated=!1,rf.prototype.defined=!1,rf.prototype.mustUseProperty=!1,rf.prototype.number=!1,rf.prototype.overloadedBoolean=!1,rf.prototype.property=``,rf.prototype.spaceSeparated=!1,rf.prototype.space=void 0;var af=t({boolean:()=>Z,booleanish:()=>sf,commaOrSpaceSeparated:()=>df,commaSeparated:()=>uf,number:()=>Q,overloadedBoolean:()=>cf,spaceSeparated:()=>lf}),of=0,Z=ff(),sf=ff(),cf=ff(),Q=ff(),lf=ff(),uf=ff(),df=ff();function ff(){return 2**++of}var pf=Object.keys(af),mf=class extends rf{constructor(e,t,n,r){let i=-1;if(super(e,t),hf(this,`space`,r),typeof n==`number`)for(;++i<pf.length;){let e=pf[i];hf(this,pf[i],(n&af[e])===af[e])}}};mf.prototype.defined=!0;function hf(e,t,n){n&&(e[t]=n)}function gf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new mf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nf(r)]=r,n[nf(a.attribute)]=r}return new ef(t,n,e.space)}var _f=gf({properties:{ariaActiveDescendant:null,ariaAtomic:sf,ariaAutoComplete:null,ariaBusy:sf,ariaChecked:sf,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:lf,ariaCurrent:null,ariaDescribedBy:lf,ariaDetails:null,ariaDisabled:sf,ariaDropEffect:lf,ariaErrorMessage:null,ariaExpanded:sf,ariaFlowTo:lf,ariaGrabbed:sf,ariaHasPopup:null,ariaHidden:sf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lf,ariaLevel:Q,ariaLive:null,ariaModal:sf,ariaMultiLine:sf,ariaMultiSelectable:sf,ariaOrientation:null,ariaOwns:lf,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:sf,ariaReadOnly:sf,ariaRelevant:null,ariaRequired:sf,ariaRoleDescription:lf,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:sf,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function vf(e,t){return t in e?e[t]:t}function yf(e,t){return vf(e,t.toLowerCase())}var bf=gf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:uf,acceptCharset:lf,accessKey:lf,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:lf,autoFocus:Z,autoPlay:Z,blocking:lf,capture:null,charSet:null,checked:Z,cite:null,className:lf,cols:Q,colSpan:null,content:null,contentEditable:sf,controls:Z,controlsList:lf,coords:Q|uf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:cf,draggable:sf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:lf,height:Q,hidden:cf,high:Q,href:null,hrefLang:null,htmlFor:lf,httpEquiv:lf,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:lf,itemRef:lf,itemScope:Z,itemType:lf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:lf,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:lf,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:lf,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:sf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:sf,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lf,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:sf,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:yf}),xf=gf({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:df,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:lf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:uf,g2:uf,glyphName:uf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:df,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:df,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:df,rev:df,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:df,requiredFeatures:df,requiredFonts:df,requiredFormats:df,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:df,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:df,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:df,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:vf}),Sf=gf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Cf=gf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:yf}),wf=gf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Tf={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Ef=/[A-Z]/g,Df=/-[a-z]/g,Of=/^data[-\w.:]+$/i;function kf(e,t){let n=nf(t),r=t,i=rf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Of.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Df,jf);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Df.test(e)){let n=e.replace(Ef,Af);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=mf}return new i(r,t)}function Af(e){return`-`+e.toLowerCase()}function jf(e){return e.charAt(1).toUpperCase()}var Mf=tf([_f,bf,Sf,Cf,wf],`html`),Nf=tf([_f,xf,Sf,Cf,wf],`svg`);function Pf(e){return e.join(` `).trim()}var Ff=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,d=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
136
|
-
`);d=~n?e.length-n:d+e.length}function p(){var e={line:l,column:d};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function g(n){var r=Error(t.source+`:`+l+`:`+d+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=d,r.source=e,t.silent)h.push(r);else throw r}function _(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function v(){_(i)}function y(e){var t;for(e||=[];t=b();)t!==!1&&e.push(t);return e}function b(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return g(`End of comment missing`);var r=e.slice(2,n-2);return d+=2,f(r),e=e.slice(n),d+=2,t({type:`comment`,comment:r})}}function x(){var e=p(),t=_(a);if(t){if(b(),!_(o))return g(`property missing ':'`);var r=_(s),i=e({type:`declaration`,property:u(t[0].replace(n,``)),value:r?u(r[0].replace(n,``)):``});return _(c),i}}function ee(){var e=[];y(e);for(var t;t=x();)t!==!1&&(e.push(t),y(e));return e}return v(),ee()};function u(e){return e?e.replace(l,``):``}})),If=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(Ff());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Lf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Rf=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(If()),i=Lf();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),zf=Vf(`end`),Bf=Vf(`start`);function Vf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Hf(e){let t=Bf(e),n=zf(e);if(t&&n)return{start:t,end:n}}function Uf(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Gf(e.position):`start`in e||`end`in e?Gf(e):`line`in e||`column`in e?Wf(e):``}function Wf(e){return Kf(e&&e.line)+`:`+Kf(e&&e.column)}function Gf(e){return Wf(e&&e.start)+`-`+Wf(e&&e.end)}function Kf(e){return e&&typeof e==`number`?e:1}var qf=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Uf(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};qf.prototype.file=``,qf.prototype.name=``,qf.prototype.reason=``,qf.prototype.message=``,qf.prototype.stack=``,qf.prototype.column=void 0,qf.prototype.line=void 0,qf.prototype.ancestors=void 0,qf.prototype.cause=void 0,qf.prototype.fatal=void 0,qf.prototype.place=void 0,qf.prototype.ruleId=void 0,qf.prototype.source=void 0;var Jf=e(Rf(),1),Yf={}.hasOwnProperty,Xf=new Map,Zf=/[A-Z]/g,Qf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),$f=new Set([`td`,`th`]),ep=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function tp(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=fp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=dp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Nf:Mf,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=np(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function np(e,t,n){if(t.type===`element`)return rp(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ip(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return op(e,t,n);if(t.type===`mdxjsEsm`)return ap(e,t);if(t.type===`root`)return sp(e,t,n);if(t.type===`text`)return cp(e,t)}function rp(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Nf,e.schema=i),e.ancestors.push(t);let a=vp(e,t.tagName,!1),o=pp(e,t),s=hp(e,t);return Qf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Qd(e)})),lp(e,o,a,t),up(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ip(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}yp(e,t.position)}function ap(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yp(e,t.position)}function op(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Nf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:vp(e,t.name,!0),o=mp(e,t),s=hp(e,t);return lp(e,o,a,t),up(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function sp(e,t,n){let r={};return up(r,hp(e,t)),e.create(t,e.Fragment,r,n)}function cp(e,t){return t.value}function lp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function up(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function dp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function fp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Bf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function pp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Yf.call(t.properties,i)){let a=gp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&$f.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function mp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else yp(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else yp(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function hp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Xf;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=np(e,a,o);s!==void 0&&n.push(s)}return n}function gp(e,t,n){let r=kf(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Kd(n):Pf(n)),r.property===`style`){let t=typeof n==`object`?n:_p(e,String(n));return e.stylePropertyNameCase===`css`&&(t=bp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Tf[r.property]||r.property:r.attribute,n]}}function _p(e,t){try{return(0,Jf.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new qf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ep+`#cannot-parse-style-attribute`,r}}function vp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Xd(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Xd(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Yf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);yp(e)}function yp(e,t){let n=new qf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=ep+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function bp(e){let t={},n;for(n in e)Yf.call(e,n)&&(t[xp(n)]=e[n]);return t}function xp(e){let t=e.replace(Zf,Sp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Sp(e){return`-`+e.toLowerCase()}var Cp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},wp={};function Tp(e,t){let n=t||wp;return Ep(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Ep(e,t,n){if(Op(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Dp(e.children,t,n)}return Array.isArray(e)?Dp(e,t,n):``}function Dp(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Ep(e[i],t,n);return r.join(``)}function Op(e){return!!(e&&typeof e==`object`)}var kp=document.createElement(`i`);function Ap(e){let t=`&`+e+`;`;kp.innerHTML=t;let n=kp.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function jp(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Mp(e,t){return e.length>0?(jp(e,e.length,0,t),e):t}var Np={}.hasOwnProperty;function Pp(e){let t={},n=-1;for(;++n<e.length;)Fp(t,e[n]);return t}function Fp(e,t){let n;for(n in t){let r=(Np.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Np.call(r,a)||(r[a]=[]);let e=i[a];Ip(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ip(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);jp(e,0,0,r)}function Lp(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Rp(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var zp=Xp(/[A-Za-z]/),Bp=Xp(/[\dA-Za-z]/),Vp=Xp(/[#-'*+\--9=?A-Z^-~]/);function Hp(e){return e!==null&&(e<32||e===127)}var Up=Xp(/\d/),Wp=Xp(/[\dA-Fa-f]/),Gp=Xp(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function Kp(e){return e!==null&&(e<0||e===32)}function qp(e){return e===-2||e===-1||e===32}var Jp=Xp(/\p{P}|\p{S}/u),Yp=Xp(/\s/);function Xp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Zp(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Bp(e.charCodeAt(n+1))&&Bp(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Qp(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return qp(r)?(e.enter(n),s(r)):t(r)}function s(r){return qp(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var $p={tokenize:em};function em(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Qp(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var tm={tokenize:rm},nm={tokenize:im};function rm(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return jp(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nm,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(nm,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;jp(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function im(e,t,n){return Qp(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function am(e){if(e===null||Kp(e)||Yp(e))return 1;if(Jp(e))return 2}function om(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var sm={name:`attention`,resolveAll:cm,tokenize:lm};function cm(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};um(d,-c),um(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mp(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Mp(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Mp(l,om(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mp(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mp(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,jp(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function lm(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=am(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=am(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function um(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var dm={name:`autolink`,tokenize:fm};function fm(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return zp(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Bp(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Bp(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Hp(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Vp(t)?(e.consume(t),l):n(t)}function u(e){return Bp(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Bp(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var pm={partial:!0,tokenize:mm};function mm(e,t,n){return r;function r(t){return qp(t)?Qp(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var hm={continuation:{tokenize:_m},exit:vm,name:`blockQuote`,tokenize:gm};function gm(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return qp(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function _m(e,t,n){let r=this;return i;function i(t){return qp(t)?Qp(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(hm,t,n)(r)}}function vm(e){e.exit(`blockQuote`)}var ym={name:`characterEscape`,tokenize:bm};function bm(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Gp(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var xm={name:`characterReference`,tokenize:Sm};function Sm(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Bp,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Wp,u):(e.enter(`characterReferenceValue`),a=7,o=Up,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Bp&&!Ap(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Cm={partial:!0,tokenize:Em},wm={concrete:!0,name:`codeFenced`,tokenize:Tm};function Tm(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),qp(t)?Qp(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Cm,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):qp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Qp(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&qp(t)?Qp(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(Cm,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),qp(t)?Qp(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),qp(t)?Qp(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Em(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Dm={name:`codeIndented`,tokenize:km},Om={partial:!0,tokenize:Am};function km(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Qp(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(Om,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Am(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Qp(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var jm={name:`codeText`,previous:Nm,resolve:Mm,tokenize:Pm};function Mm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Nm(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Pm(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Fm=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Im(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Im(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Im(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Im(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Im(this.left,t.reverse())}}}};function Im(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Lm(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Fm(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Rm(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return jp(e,0,1/0,u.slice(0)),!l}function Rm(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var zm={resolve:Vm,tokenize:Hm},Bm={partial:!0,tokenize:Um};function Vm(e){return Lm(e),e}function Hm(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(Bm,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Um(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Qp(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Wm(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Hp(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Kp(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Hp(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Gm(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!qp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Km(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Qp(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function qm(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):qp(i)?Qp(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Jm={name:`definition`,tokenize:Xm},Ym={partial:!0,tokenize:Zm};function Xm(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Gm.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Rp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Kp(t)?qm(e,l)(t):l(t)}function l(t){return Wm(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ym,d,d)(t)}function d(t){return qp(t)?Qp(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Zm(e,t,n){return r;function r(t){return Kp(t)?qm(e,i)(t):n(t)}function i(t){return Km(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return qp(t)?Qp(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var Qm={name:`hardBreakEscape`,tokenize:$m};function $m(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var eh={name:`headingAtx`,resolve:th,tokenize:nh};function th(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},jp(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function nh(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Kp(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):qp(n)?Qp(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Kp(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var rh=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ih=[`pre`,`script`,`style`,`textarea`],ah={concrete:!0,name:`htmlFlow`,resolveTo:ch,tokenize:lh},oh={partial:!0,tokenize:dh},sh={partial:!0,tokenize:uh};function ch(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lh(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ae):zp(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):zp(a)?(e.consume(a),i=4,r.interrupt?t:ae):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ae):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:E:m):n(i)}function h(t){return zp(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Kp(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ih.includes(l)?(i=1,r.interrupt?t(s):E(s)):rh.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Bp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:E):n(i)}function v(t){return qp(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||zp(t)?(e.consume(t),b):qp(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||Bp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),ee):qp(t)?(e.consume(t),x):y(t)}function ee(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):qp(t)?(e.consume(t),ee):C(t)}function S(t){return t===c?(e.consume(t),c=null,w):t===null||$(t)?n(t):(e.consume(t),S)}function C(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Kp(t)?x(t):(e.consume(t),C)}function w(e){return e===47||e===62||qp(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),te):n(t)}function te(t){return t===null||$(t)?E(t):qp(t)?(e.consume(t),te):n(t)}function E(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),ae):t===93&&i===5?(e.consume(t),A):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(oh,se,D)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),D(t)):(e.consume(t),E)}function D(t){return e.check(sh,ne,se)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||$(t)?D(t):(e.enter(`htmlFlowData`),E(t))}function ie(t){return t===45?(e.consume(t),ae):E(t)}function O(t){return t===47?(e.consume(t),o=``,k):E(t)}function k(t){if(t===62){let n=o.toLowerCase();return ih.includes(n)?(e.consume(t),oe):E(t)}return zp(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),k):E(t)}function A(t){return t===93?(e.consume(t),ae):E(t)}function ae(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),ae):E(t)}function oe(t){return t===null||$(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function uh(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function dh(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(pm,t,n)}}var fh={name:`htmlText`,tokenize:ph};function ph(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):zp(t)?(e.consume(t),C):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):zp(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):$(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return zp(t)?(e.consume(t),ee):n(t)}function ee(t){return t===45||Bp(t)?(e.consume(t),ee):S(t)}function S(t){return $(t)?(o=S,O(t)):qp(t)?(e.consume(t),S):ie(t)}function C(t){return t===45||Bp(t)?(e.consume(t),C):t===47||t===62||Kp(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ie):t===58||t===95||zp(t)?(e.consume(t),T):$(t)?(o=w,O(t)):qp(t)?(e.consume(t),w):ie(t)}function T(t){return t===45||t===46||t===58||t===95||Bp(t)?(e.consume(t),T):te(t)}function te(t){return t===61?(e.consume(t),E):$(t)?(o=te,O(t)):qp(t)?(e.consume(t),te):w(t)}function E(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,D):$(t)?(o=E,O(t)):qp(t)?(e.consume(t),E):(e.consume(t),ne)}function D(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):$(t)?(o=D,O(t)):(e.consume(t),D)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Kp(t)?w(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Kp(e)?w(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return qp(t)?Qp(e,A,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):A(t)}function A(t){return e.enter(`htmlTextData`),o(t)}}var mh={name:`labelEnd`,resolveAll:vh,resolveTo:yh,tokenize:bh},hh={tokenize:xh},gh={tokenize:Sh},_h={tokenize:Ch};function vh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&jp(e,0,e.length,n),e}function yh(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Mp(s,e.slice(a+1,a+r+3)),s=Mp(s,[[`enter`,u,t]]),s=Mp(s,om(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Mp(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Mp(s,e.slice(o+1)),s=Mp(s,[[`exit`,c,t]]),jp(e,a,e.length,s),e}function bh(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Rp(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(hh,u,o?u:d)(t):t===91?e.attempt(gh,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(_h,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function xh(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Kp(t)?qm(e,a)(t):a(t)}function a(t){return t===41?u(t):Wm(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Kp(t)?qm(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Km(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Kp(t)?qm(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Sh(e,t,n){let r=this;return i;function i(t){return Gm.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Rp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ch(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var wh={name:`labelStartImage`,resolveAll:mh.resolveAll,tokenize:Th};function Th(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Eh={name:`labelStartLink`,resolveAll:mh.resolveAll,tokenize:Dh};function Dh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Oh={name:`lineEnding`,tokenize:kh};function kh(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Qp(e,t,`linePrefix`)}}var Ah={name:`thematicBreak`,tokenize:jh};function jh(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),qp(t)?Qp(e,s,`whitespace`)(t):s(t))}}var Mh={continuation:{tokenize:Ih},exit:Rh,name:`list`,tokenize:Fh},Nh={partial:!0,tokenize:zh},Ph={partial:!0,tokenize:Lh};function Fh(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Up(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Ah,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Up(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(pm,r.interrupt?n:u,e.attempt(Nh,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return qp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ih(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(pm,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qp(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!qp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ph,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qp(e,e.attempt(Mh,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Lh(e,t,n){let r=this;return Qp(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Rh(e){e.exit(this.containerState.type)}function zh(e,t,n){let r=this;return Qp(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!qp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Bh={name:`setextUnderline`,resolveTo:Vh,tokenize:Hh};function Vh(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Hh(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),qp(t)?Qp(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Uh={tokenize:Wh};function Wh(e){let t=this,n=e.attempt(pm,r,e.attempt(this.parser.constructs.flowInitial,i,Qp(e,e.attempt(this.parser.constructs.flow,i,e.attempt(zm,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Gh={resolveAll:Yh()},Kh=Jh(`string`),qh=Jh(`text`);function Jh(e){return{resolveAll:Yh(e===`text`?Xh:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Yh(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Xh(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Zh=t({attentionMarkers:()=>ag,contentInitial:()=>$h,disable:()=>og,document:()=>Qh,flow:()=>tg,flowInitial:()=>eg,insideSpan:()=>ig,string:()=>ng,text:()=>rg}),Qh={42:Mh,43:Mh,45:Mh,48:Mh,49:Mh,50:Mh,51:Mh,52:Mh,53:Mh,54:Mh,55:Mh,56:Mh,57:Mh,62:hm},$h={91:Jm},eg={[-2]:Dm,[-1]:Dm,32:Dm},tg={35:eh,42:Ah,45:[Bh,Ah],60:ah,61:Bh,95:Ah,96:wm,126:wm},ng={38:xm,92:ym},rg={[-5]:Oh,[-4]:Oh,[-3]:Oh,33:wh,38:xm,42:sm,60:[dm,fh],91:Eh,92:[Qm,ym],93:mh,95:sm,96:jm},ig={null:[sm,Gh]},ag={null:[42,95]},og={null:[]};function sg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(x),check:S(ee),consume:v,enter:y,exit:b,interrupt:S(ee,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Mp(o,e),g(),o[o.length-1]===null?(C(t,0),l.events=om(a,l.events,l),l.events):[]}function f(e,t){return lg(p(e),t)}function p(e){return cg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,T()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){C(e,t.from)}function ee(e,t){t.restore()}function S(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=w(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function C(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&jp(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function w(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function cg(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function lg(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
134
|
+
`},Qc=[{id:`en`,title:`English`},{id:`de`,title:`Deutsch`},{id:`ru`,title:`русский`},{id:`pt`,title:`Portugues`},{id:`nl`,title:`Nederlands`},{id:`fr`,title:`français`},{id:`it`,title:`Italiano`},{id:`es`,title:`Espanol`},{id:`pl`,title:`Polski`},{id:`uk`,title:`Українська`},{id:`zh-cn`,title:`简体中文`}],$c=class extends $t{constructor(e){super(e),this.state={statisticsAccepted:!1,notAgree:!1,diagData:null,requesting:!1,showStatisticsDialog:!1}}async readStatistics(){try{let e=await this.props.socket.getCurrentInstance(),t=await this.props.socket.getObject(`system.adapter.${e}`),n=await this.props.socket.getDiagData(t.common.host,`extended`);this.setState({diagData:n,requesting:!1})}catch(e){this.setState({diagData:{error:e.message||e.toString()},requesting:!1})}}renderStatisticsDialog(){return this.state.showStatisticsDialog?M(u,{open:!0,maxWidth:`lg`,fullWidth:!0,sx:{"& .MuiDialog-paper":{maxHeight:`calc(100% - 96px)`,height:`calc(100% - 96px)`}},onClose:()=>this.setState({showStatisticsDialog:!1}),children:[T(ve,{children:this.props.t(`Sent data:`)}),T(le,{children:this.state.requesting?M(Me,{children:[T(Le,{}),T(`div`,{children:this.props.t(`Requesting data...`)})]}):M(Me,{children:[T(L,{variant:`body2`,sx:{mb:1,color:`text.secondary`},children:this.props.t(`The sent data will only be processed by ioBroker GmbH for statistical purposes and will not be shared with any third parties.`)}),T(Xc,{style:{height:`calc(100% - 41px)`},editValueMode:!0,themeType:this.props.themeType,value:JSON.stringify(this.state.diagData,null,2)})]})}),T(St,{children:T(V,{variant:`contained`,onClick:()=>this.setState({showStatisticsDialog:!1}),color:`primary`,autoFocus:!0,startIcon:T(O,{}),children:this.props.t(`Close`)})})]}):null}renderNotAgree(){return this.state.notAgree?M(u,{open:!0,onClose:()=>this.setState({notAgree:!1}),children:[T(ve,{children:this.props.t(`Message`)}),T(le,{children:M(fe,{children:[T(`span`,{role:`img`,"aria-label":`unhappy`,children:`😒`}),` `,this.props.t(`Sorry, you cannot use ioBroker.`)]})}),T(St,{children:T(V,{variant:`contained`,onClick:()=>this.setState({notAgree:!1}),color:`primary`,startIcon:T(Ne,{}),children:this.props.t(`Understand`)})})]}):null}renderLicenseText(){let e=Zc[this.props.lang]||Zc.en;return T(Ot,{variant:`outlined`,sx:{height:`100%`,minHeight:120,overflow:`auto`,p:2,backgroundColor:`action.hover`},children:e.split(`
|
|
135
|
+
`).map((e,t)=>T(L,{variant:`body2`,sx:{mb:1.5},children:e},t))})}render(){return M(qc,{title:this.props.t(`License terms`),onBack:this.props.onBack,busy:this.props.saving,actions:M(Me,{children:[T(V,{variant:`outlined`,color:`grey`,disabled:this.props.saving,onClick:()=>this.setState({notAgree:!0}),startIcon:T(O,{}),children:this.props.t(`Not agree`)}),T(V,{variant:`contained`,color:`primary`,loading:this.props.saving,disabled:!this.state.statisticsAccepted,onClick:()=>this.props.onDone({lang:this.props.lang}),startIcon:T(Ne,{}),children:this.props.t(`Agree`)})]}),children:[M(F,{sx:{height:`100%`,display:`flex`,flexDirection:`column`,gap:2},children:[M(p,{size:`small`,disabled:this.props.saving,sx:{minWidth:220},children:[T(D,{id:`wizard-language-label`,children:this.props.t(`Language`)}),T(Bt,{labelId:`wizard-language-label`,label:this.props.t(`Language`),value:this.props.lang,startAdornment:T(c,{fontSize:`small`,sx:{mr:1,color:`text.secondary`}}),onChange:e=>this.props.onLanguageChange(e.target.value),children:Qc.map(e=>T(Lt,{value:e.id,children:e.title},e.id))})]}),T(F,{sx:{flex:1,minHeight:100},children:this.renderLicenseText()}),M(Ot,{variant:`outlined`,sx:{p:2,borderRadius:2},children:[T(je,{control:T(ke,{autoFocus:!0,disabled:this.props.saving,checked:this.state.statisticsAccepted,onChange:e=>this.setState({statisticsAccepted:e.target.checked})}),label:this.props.t(`I agree with the collection of anonymous statistics.`)}),M(F,{sx:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:2,ml:{xs:0,sm:4}},children:[T(L,{variant:`body2`,sx:{color:`text.secondary`},children:this.props.t(`(This can be disabled later in settings)`)}),T(V,{variant:`outlined`,size:`small`,onClick:()=>this.setState({showStatisticsDialog:!0,requesting:!0},()=>this.readStatistics()),children:this.props.t(`Show sent statistics data`)})]})]})]}),this.renderNotAgree(),this.renderStatisticsDialog()]})}},el=new URL(`wizard-finish-B2y4teLv.jpg`,import.meta.url).href,tl=new URL(`wizard-welcome-BhniCBF1.jpg`,import.meta.url).href,nl=new URL(`logo-vO-KvdxW.svg`,import.meta.url).href,rl=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgMTYwIiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik5leG9XYXR0IEVPUyI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImVvc0ciIHgxPSIwIiB5MT0iMCIgeDI9IjEiIHkyPSIxIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMDBmMDlhIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMC41NSIgc3RvcC1jb2xvcj0iIzE0ZDhmZiIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMTZjZmYiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8ZmlsdGVyIGlkPSJnbG93IiB4PSItNTAlIiB5PSItNTAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNCIgcmVzdWx0PSJibHVyIi8+CiAgICAgIDxmZU1lcmdlPjxmZU1lcmdlTm9kZSBpbj0iYmx1ciIvPjxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIvPjwvZmVNZXJnZT4KICAgIDwvZmlsdGVyPgogIDwvZGVmcz4KICA8cmVjdCB3aWR0aD0iNjQwIiBoZWlnaHQ9IjE2MCIgcng9IjI4IiBmaWxsPSIjMDIwOTE0Ii8+CiAgPGNpcmNsZSBjeD0iODAiIGN5PSI4MCIgcj0iNDgiIGZpbGw9InJnYmEoMCwyNDAsMTU0LC4xMikiIHN0cm9rZT0idXJsKCNlb3NHKSIgc3Ryb2tlLXdpZHRoPSI0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8cGF0aCBkPSJNODAgMzh2ODRNNDQgODBoNzJNNTUgNTVjMTQgMTggMzYgMzEgNjEgMzRNNTUgMTA1YzE0LTE4IDM2LTMxIDYxLTM0IiBmaWxsPSJub25lIiBzdHJva2U9InVybCgjZW9zRykiIHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CiAgPHRleHQgeD0iMTUwIiB5PSI3NiIgZmlsbD0iI2Y1ZmJmZiIgZm9udC1mYW1pbHk9IkludGVyLFNlZ29lIFVJLEFyaWFsLHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMzgiIGZvbnQtd2VpZ2h0PSI4MDAiIGxldHRlci1zcGFjaW5nPSIuNSI+TmV4b1dhdHQgRU9TPC90ZXh0PgogIDx0ZXh0IHg9IjE1MiIgeT0iMTEyIiBmaWxsPSIjN2VlOGMwIiBmb250LWZhbWlseT0iSW50ZXIsU2Vnb2UgVUksQXJpYWwsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxOCIgZm9udC13ZWlnaHQ9IjYwMCIgbGV0dGVyLXNwYWNpbmc9IjEuMiI+RU5FUkdZIE9QRVJBVElPTiBTWVNURU08L3RleHQ+Cjwvc3ZnPgo=`;function il(e,t){let n=P(t);Xt(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function al(e){return Object.freeze({__version:1,map:e})}var ol=Re(null);function sl(){let e=Kt(ol);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}function cl(e){function t(t,n){let{instance:r}=e(t).current;return at(n,()=>r),null}return s(t)}function ll(e,t){let n=P(void 0);Xt(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function ul(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}function dl(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function fl(e,t){return t==null?function(t,n){let r=P(void 0);return r.current||=e(t,n),r}:function(n,r){let i=P(void 0);i.current||=e(n,r);let a=P(n),{instance:o}=i.current;return Xt(function(){a.current!==n&&(t(o,n,a.current),a.current=n)},[o,n,t]),i}}function pl(e,t){Xt(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var n;(n=t.layerContainer)==null||n.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function ml(e){return function(t){let n=sl(),r=e(ul(t,n),n);return il(n.map,t.attribution),ll(r.current,t.eventHandlers),pl(r.current,n),r}}function hl(e,t){return cl(ml(fl(e,t)))}function gl(e,t,n){let{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function _l(){return sl().map}function vl({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:a,placeholder:o,style:s,whenReady:c,zoom:l,...u},d){let[f]=R({className:i,id:a,style:s}),[p,m]=R(null),h=P(void 0);at(d,()=>(p==null?void 0:p.map)??null,[p]);let g=vt(r=>{if(r!==null&&!h.current){let i=new ee(r,u);h.current=i,n!=null&&l!=null?i.setView(n,l):e!=null&&i.fitBounds(e,t),c!=null&&i.whenReady(c),m(al(i))}},[]);Xt(()=>()=>{p==null||p.map.remove()},[p]);let _=p?Ut.createElement(ol,{value:p},r):o??null;return Ut.createElement(`div`,{...f,ref:g},_)}var yl=s(vl),bl=hl(function({url:e,...t},n){return dl(new ze(e,ul(t,n)),n)},function(e,t,n){gl(e,t,n);let{url:r}=t;r!=null&&r!==n.url&&e.setUrl(r)}),xl=JSON.parse(`[{"name":"Afghanistan","code":"AF"},{"name":"Åland Islands","code":"AX"},{"name":"Albania","code":"AL"},{"name":"Algeria","code":"DZ"},{"name":"American Samoa","code":"AS"},{"name":"Andorra","code":"AD"},{"name":"Angola","code":"AO"},{"name":"Anguilla","code":"AI"},{"name":"Antarctica","code":"AQ"},{"name":"Antigua and Barbuda","code":"AG"},{"name":"Argentina","code":"AR"},{"name":"Armenia","code":"AM"},{"name":"Aruba","code":"AW"},{"name":"Australia","code":"AU"},{"name":"Austria","code":"AT"},{"name":"Azerbaijan","code":"AZ"},{"name":"Bahamas","code":"BS"},{"name":"Bahrain","code":"BH"},{"name":"Bangladesh","code":"BD"},{"name":"Barbados","code":"BB"},{"name":"Belarus","code":"BY"},{"name":"Belgium","code":"BE"},{"name":"Belize","code":"BZ"},{"name":"Benin","code":"BJ"},{"name":"Bermuda","code":"BM"},{"name":"Bhutan","code":"BT"},{"name":"Bolivia","code":"BO"},{"name":"Bosnia and Herzegovina","code":"BA"},{"name":"Botswana","code":"BW"},{"name":"Bouvet Island","code":"BV"},{"name":"Brazil","code":"BR"},{"name":"British Indian Ocean Territory","code":"IO"},{"name":"Brunei Darussalam","code":"BN"},{"name":"Bulgaria","code":"BG"},{"name":"Burkina Faso","code":"BF"},{"name":"Burundi","code":"BI"},{"name":"Cambodia","code":"KH"},{"name":"Cameroon","code":"CM"},{"name":"Canada","code":"CA"},{"name":"Cape Verde","code":"CV"},{"name":"Cayman Islands","code":"KY"},{"name":"Central African Republic","code":"CF"},{"name":"Chad","code":"TD"},{"name":"Chile","code":"CL"},{"name":"China","code":"CN"},{"name":"Christmas Island","code":"CX"},{"name":"Cocos (Keeling) Islands","code":"CC"},{"name":"Colombia","code":"CO"},{"name":"Comoros","code":"KM"},{"name":"Congo","code":"CG"},{"name":"Congo, The Democratic Republic of the","code":"CD"},{"name":"Cook Islands","code":"CK"},{"name":"Costa Rica","code":"CR"},{"name":"Cote D'Ivoire","code":"CI"},{"name":"Croatia","code":"HR"},{"name":"Cuba","code":"CU"},{"name":"Cyprus","code":"CY"},{"name":"Czech Republic","code":"CZ"},{"name":"Denmark","code":"DK"},{"name":"Djibouti","code":"DJ"},{"name":"Dominica","code":"DM"},{"name":"Dominican Republic","code":"DO"},{"name":"Ecuador","code":"EC"},{"name":"Egypt","code":"EG"},{"name":"El Salvador","code":"SV"},{"name":"Equatorial Guinea","code":"GQ"},{"name":"Eritrea","code":"ER"},{"name":"Estonia","code":"EE"},{"name":"Ethiopia","code":"ET"},{"name":"Falkland Islands (Malvinas)","code":"FK"},{"name":"Faroe Islands","code":"FO"},{"name":"Fiji","code":"FJ"},{"name":"Finland","code":"FI"},{"name":"France","code":"FR"},{"name":"French Guiana","code":"GF"},{"name":"French Polynesia","code":"PF"},{"name":"French Southern Territories","code":"TF"},{"name":"Gabon","code":"GA"},{"name":"Gambia","code":"GM"},{"name":"Georgia","code":"GE"},{"name":"Germany","code":"DE"},{"name":"Ghana","code":"GH"},{"name":"Gibraltar","code":"GI"},{"name":"Greece","code":"GR"},{"name":"Greenland","code":"GL"},{"name":"Grenada","code":"GD"},{"name":"Guadeloupe","code":"GP"},{"name":"Guam","code":"GU"},{"name":"Guatemala","code":"GT"},{"name":"Guernsey","code":"GG"},{"name":"Guinea","code":"GN"},{"name":"Guinea-Bissau","code":"GW"},{"name":"Guyana","code":"GY"},{"name":"Haiti","code":"HT"},{"name":"Heard Island and Mcdonald Islands","code":"HM"},{"name":"Holy See (Vatican City State)","code":"VA"},{"name":"Honduras","code":"HN"},{"name":"Hong Kong","code":"HK"},{"name":"Hungary","code":"HU"},{"name":"Iceland","code":"IS"},{"name":"India","code":"IN"},{"name":"Indonesia","code":"ID"},{"name":"Iran, Islamic Republic Of","code":"IR"},{"name":"Iraq","code":"IQ"},{"name":"Ireland","code":"IE"},{"name":"Isle of Man","code":"IM"},{"name":"Israel","code":"IL"},{"name":"Italy","code":"IT"},{"name":"Jamaica","code":"JM"},{"name":"Japan","code":"JP"},{"name":"Jersey","code":"JE"},{"name":"Jordan","code":"JO"},{"name":"Kazakhstan","code":"KZ"},{"name":"Kenya","code":"KE"},{"name":"Kiribati","code":"KI"},{"name":"Korea, Democratic People'S Republic of","code":"KP"},{"name":"Korea, Republic of","code":"KR"},{"name":"Kuwait","code":"KW"},{"name":"Kyrgyzstan","code":"KG"},{"name":"Lao People'S Democratic Republic","code":"LA"},{"name":"Latvia","code":"LV"},{"name":"Lebanon","code":"LB"},{"name":"Lesotho","code":"LS"},{"name":"Liberia","code":"LR"},{"name":"Libyan Arab Jamahiriya","code":"LY"},{"name":"Liechtenstein","code":"LI"},{"name":"Lithuania","code":"LT"},{"name":"Luxembourg","code":"LU"},{"name":"Macao","code":"MO"},{"name":"Macedonia, The Former Yugoslav Republic of","code":"MK"},{"name":"Madagascar","code":"MG"},{"name":"Malawi","code":"MW"},{"name":"Malaysia","code":"MY"},{"name":"Maldives","code":"MV"},{"name":"Mali","code":"ML"},{"name":"Malta","code":"MT"},{"name":"Marshall Islands","code":"MH"},{"name":"Martinique","code":"MQ"},{"name":"Mauritania","code":"MR"},{"name":"Mauritius","code":"MU"},{"name":"Mayotte","code":"YT"},{"name":"Mexico","code":"MX"},{"name":"Micronesia, Federated States of","code":"FM"},{"name":"Moldova, Republic of","code":"MD"},{"name":"Monaco","code":"MC"},{"name":"Mongolia","code":"MN"},{"name":"Montserrat","code":"MS"},{"name":"Morocco","code":"MA"},{"name":"Mozambique","code":"MZ"},{"name":"Myanmar","code":"MM"},{"name":"Namibia","code":"NA"},{"name":"Nauru","code":"NR"},{"name":"Nepal","code":"NP"},{"name":"Netherlands","code":"NL"},{"name":"Netherlands Antilles","code":"AN"},{"name":"New Caledonia","code":"NC"},{"name":"New Zealand","code":"NZ"},{"name":"Nicaragua","code":"NI"},{"name":"Niger","code":"NE"},{"name":"Nigeria","code":"NG"},{"name":"Niue","code":"NU"},{"name":"Norfolk Island","code":"NF"},{"name":"Northern Mariana Islands","code":"MP"},{"name":"Norway","code":"NO"},{"name":"Oman","code":"OM"},{"name":"Pakistan","code":"PK"},{"name":"Palau","code":"PW"},{"name":"Palestinian Territory, Occupied","code":"PS"},{"name":"Panama","code":"PA"},{"name":"Papua New Guinea","code":"PG"},{"name":"Paraguay","code":"PY"},{"name":"Peru","code":"PE"},{"name":"Philippines","code":"PH"},{"name":"Pitcairn","code":"PN"},{"name":"Poland","code":"PL"},{"name":"Portugal","code":"PT"},{"name":"Puerto Rico","code":"PR"},{"name":"Qatar","code":"QA"},{"name":"Reunion","code":"RE"},{"name":"Romania","code":"RO"},{"name":"Russian Federation","code":"RU"},{"name":"RWANDA","code":"RW"},{"name":"Saint Helena","code":"SH"},{"name":"Saint Kitts and Nevis","code":"KN"},{"name":"Saint Lucia","code":"LC"},{"name":"Saint Pierre and Miquelon","code":"PM"},{"name":"Saint Vincent and the Grenadines","code":"VC"},{"name":"Samoa","code":"WS"},{"name":"San Marino","code":"SM"},{"name":"Sao Tome and Principe","code":"ST"},{"name":"Saudi Arabia","code":"SA"},{"name":"Senegal","code":"SN"},{"name":"Serbia and Montenegro","code":"CS"},{"name":"Seychelles","code":"SC"},{"name":"Sierra Leone","code":"SL"},{"name":"Singapore","code":"SG"},{"name":"Slovakia","code":"SK"},{"name":"Slovenia","code":"SI"},{"name":"Solomon Islands","code":"SB"},{"name":"Somalia","code":"SO"},{"name":"South Africa","code":"ZA"},{"name":"South Georgia and the South Sandwich Islands","code":"GS"},{"name":"Spain","code":"ES"},{"name":"Sri Lanka","code":"LK"},{"name":"Sudan","code":"SD"},{"name":"Suriname","code":"SR"},{"name":"Svalbard and Jan Mayen","code":"SJ"},{"name":"Swaziland","code":"SZ"},{"name":"Sweden","code":"SE"},{"name":"Switzerland","code":"CH"},{"name":"Syrian Arab Republic","code":"SY"},{"name":"Taiwan, Province of China","code":"TW"},{"name":"Tajikistan","code":"TJ"},{"name":"Tanzania, United Republic of","code":"TZ"},{"name":"Thailand","code":"TH"},{"name":"Timor-Leste","code":"TL"},{"name":"Togo","code":"TG"},{"name":"Tokelau","code":"TK"},{"name":"Tonga","code":"TO"},{"name":"Trinidad and Tobago","code":"TT"},{"name":"Tunisia","code":"TN"},{"name":"Turkey","code":"TR"},{"name":"Turkmenistan","code":"TM"},{"name":"Turks and Caicos Islands","code":"TC"},{"name":"Tuvalu","code":"TV"},{"name":"Uganda","code":"UG"},{"name":"Ukraine","code":"UA"},{"name":"United Arab Emirates","code":"AE"},{"name":"United Kingdom","code":"GB"},{"name":"United States","code":"US"},{"name":"United States Minor Outlying Islands","code":"UM"},{"name":"Uruguay","code":"UY"},{"name":"Uzbekistan","code":"UZ"},{"name":"Vanuatu","code":"VU"},{"name":"Venezuela","code":"VE"},{"name":"Viet Nam","code":"VN"},{"name":"Virgin Islands, British","code":"VG"},{"name":"Virgin Islands, U.S.","code":"VI"},{"name":"Wallis and Futuna","code":"WF"},{"name":"Western Sahara","code":"EH"},{"name":"Yemen","code":"YE"},{"name":"Zambia","code":"ZM"},{"name":"Zimbabwe","code":"ZW"}]`),Sl=[`Germany`,`Austria`,`Switzerland`],Cl=`---------`,wl=null;function Tl(e){let t=A.getLanguage();if((wl==null?void 0:wl.lang)!==t){let n=new Intl.Collator(t),r=xl.map(e=>e.name).filter(e=>!Sl.includes(e)).sort((t,r)=>n.compare(e(t),e(r)));wl={lang:t,names:[...Sl,Cl,...r]}}return wl.names}x();var El=[`€`,`$`,`₽`,`₤`,`CHF`],Dl=18;function Ol(e,t){return e?T(z,{position:`end`,children:T(k,{tabIndex:-1,size:`small`,onClick:t,children:T(O,{fontSize:`small`})})}):null}var kl=class extends $t{constructor(e){var t,n,r,i,a,o,s,c,l,u;super(e),j(this,`marker`,null),j(this,`map`,null),j(this,`cityTimer`,null),j(this,`latLongTimer`,null),j(this,`positionTimer`,null),j(this,`addressRequestId`,0),j(this,`countries`,void 0),j(this,`onMap`,e=>{e&&this.map!==e&&(this.map=e,this.marker=new E(this.getPosition(),{draggable:!0,title:A.t(`ioBroker location`),alt:A.t(`ioBroker location`),riseOnHover:!0}).addTo(e).on({dragend:e=>{let t=e.target.getLatLng();this.setState({latitude:t.lat,longitude:t.lng})}}),this.positionTimer=setTimeout(()=>{this.positionTimer=null,e.invalidateSize(),this.changeMapPosition(!0)},300))}),this.state={tempUnit:((t=e.settings)==null?void 0:t.tempUnit)||`°C`,currency:((n=e.settings)==null?void 0:n.currency)||`€`,dateFormat:((r=e.settings)==null?void 0:r.dateFormat)||`DD.MM.YYYY`,isFloatComma:((i=e.settings)==null?void 0:i.isFloatComma)??!0,country:((a=e.settings)==null?void 0:a.country)||``,city:((o=e.settings)==null?void 0:o.city)||``,address:((s=e.settings)==null?void 0:s.address)||``,longitude:((c=e.settings)==null?void 0:c.longitude)??``,latitude:((l=e.settings)==null?void 0:l.latitude)??``,firstDayOfWeek:((u=e.settings)==null?void 0:u.firstDayOfWeek)||`monday`,zoom:14},this.countries=Tl(e.t)}async componentDidMount(){if(!this.props.settings)try{let e=await this.props.socket.getCompactSystemConfig(!0);this.setState({tempUnit:e.common.tempUnit||`°C`,currency:e.common.currency||`€`,dateFormat:e.common.dateFormat||`DD.MM.YYYY`,isFloatComma:e.common.isFloatComma??!0,country:e.common.country||``,city:e.common.city||``,longitude:e.common.longitude??``,latitude:e.common.latitude??``,firstDayOfWeek:e.common.firstDayOfWeek||`monday`},()=>this.getBrowserCoordinates());return}catch(e){console.error(`Cannot read system configuration: ${e.message}`)}this.changeMapPosition(!0)}componentDidUpdate(e){if(e.requesting!==this.props.requesting){if(this.props.requesting){var t;(t=this.marker)==null||(t=t.dragging)==null||t.disable()}else{var n;(n=this.marker)==null||(n=n.dragging)==null||n.enable()}}}componentWillUnmount(){var e;this.cityTimer&&=(clearTimeout(this.cityTimer),null),this.latLongTimer&&=(clearTimeout(this.latLongTimer),null),this.positionTimer&&=(clearTimeout(this.positionTimer),null),(e=this.marker)==null||e.remove(),this.marker=null,this.map=null}getBrowserCoordinates(){window.navigator.geolocation&&(!this.state.longitude||!this.state.latitude)?window.navigator.geolocation.getCurrentPosition(e=>{let t=parseFloat(e.coords.latitude.toFixed(8)),n=parseFloat(e.coords.longitude.toFixed(8));this.setState({latitude:isNaN(t)?``:t,longitude:isNaN(n)?``:n},()=>this.changeMapPosition())},e=>console.warn(`Cannot detect the position: ${e.message}`)):this.changeMapPosition()}getPosition(){let e=parseFloat(this.state.latitude),t=parseFloat(this.state.longitude);return[isNaN(e)?50:e,isNaN(t)?10:t]}changeMapPosition(e){this.latLongTimer&&clearTimeout(this.latLongTimer),this.latLongTimer=setTimeout(()=>{var e,t;this.latLongTimer=null;let n=this.getPosition();(e=this.map)==null||e.flyTo(n,Math.min(this.state.zoom,Dl)),(t=this.marker)==null||t.setLatLng(n)},e?0:500)}onChangePosition(e,t){t===`latitude`?this.setState({latitude:e},()=>this.changeMapPosition()):this.setState({longitude:e},()=>this.changeMapPosition())}addressToPosition(e){this.cityTimer&&clearTimeout(this.cityTimer),this.cityTimer=setTimeout(()=>{this.cityTimer=null;let e=`${this.state.country} ${this.state.city}, ${this.state.address}`.trim();if(e===`,`)return;let t=++this.addressRequestId;new Je().search({query:e}).then(e=>{e[0]&&t===this.addressRequestId&&this.setState({latitude:e[0].y,longitude:e[0].x,zoom:Dl},()=>this.changeMapPosition(!0))}).catch(e=>console.warn(`Cannot detect the position: ${e}`))},e?0:800)}onChangeAddress(e,t){t===`city`?this.setState({city:e},()=>this.addressToPosition()):t===`address`?this.setState({address:e},()=>this.addressToPosition()):this.setState({country:e},()=>this.addressToPosition())}renderSettings(){let e=this.props.requesting;return M(F,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[M(p,{fullWidth:!0,size:`small`,disabled:e,children:[T(D,{id:`wizard-temp-unit`,children:this.props.t(`Temperature unit`)}),M(Bt,{labelId:`wizard-temp-unit`,label:this.props.t(`Temperature unit`),value:this.state.tempUnit,onChange:e=>this.setState({tempUnit:e.target.value}),children:[T(Lt,{value:`°C`,children:`°C`}),T(Lt,{value:`°F`,children:`°F`})]})]}),T(st,{freeSolo:!0,size:`small`,disabled:e,options:El,inputValue:this.state.currency,onInputChange:(e,t)=>this.setState({currency:t}),renderInput:e=>T(I,{...e,label:this.props.t(`Currency`)})}),M(p,{fullWidth:!0,size:`small`,disabled:e,children:[T(D,{id:`wizard-date-format`,children:this.props.t(`Date format`)}),M(Bt,{labelId:`wizard-date-format`,label:this.props.t(`Date format`),value:this.state.dateFormat,onChange:e=>this.setState({dateFormat:e.target.value}),children:[T(Lt,{value:`DD.MM.YYYY`,children:`DD.MM.YYYY`}),T(Lt,{value:`YYYY.MM.DD`,children:`YYYY.MM.DD`}),T(Lt,{value:`MM/DD/YYYY`,children:`MM/DD/YYYY`})]})]}),M(p,{fullWidth:!0,size:`small`,disabled:e,children:[T(D,{id:`wizard-float-divider`,children:this.props.t(`Float divider`)}),M(Bt,{labelId:`wizard-float-divider`,label:this.props.t(`Float divider`),value:this.state.isFloatComma?`true`:`false`,onChange:e=>this.setState({isFloatComma:e.target.value===`true`}),children:[T(Lt,{value:`true`,children:`${this.props.t(`comma`)} - 3,14`}),T(Lt,{value:`false`,children:`${this.props.t(`point`)} - 3.14`})]})]}),M(p,{fullWidth:!0,size:`small`,disabled:e,children:[T(D,{id:`wizard-first-day`,children:this.props.t(`Week starts with`)}),M(Bt,{labelId:`wizard-first-day`,label:this.props.t(`Week starts with`),value:this.state.firstDayOfWeek,onChange:e=>this.setState({firstDayOfWeek:e.target.value}),children:[T(Lt,{value:`monday`,children:this.props.t(`monday`)}),T(Lt,{value:`sunday`,children:this.props.t(`sunday`)})]})]})]})}renderLocation(){let e=this.props.requesting;return M(F,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[T(st,{size:`small`,disabled:e,options:this.countries,value:this.state.country||null,getOptionDisabled:e=>e===Cl,getOptionLabel:e=>e===`---------`?e:this.props.t(e),onChange:(e,t)=>this.onChangeAddress(t||``,`country`),renderInput:e=>T(I,{...e,label:this.props.t(`Country`)})}),T(I,{size:`small`,disabled:e,label:this.props.t(`City`),value:this.state.city,onChange:e=>this.onChangeAddress(e.target.value,`city`),slotProps:{input:{endAdornment:e?null:Ol(this.state.city,()=>this.setState({city:``}))}}}),M(F,{sx:{display:`flex`,alignItems:`flex-start`,gap:1},children:[T(I,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Address`),value:this.state.address,onChange:e=>this.onChangeAddress(e.target.value,`address`),helperText:this.props.t(`Used only to calculate position.`),slotProps:{input:{endAdornment:e?null:Ol(this.state.address,()=>this.setState({address:``}))}}}),T(Rt,{title:this.props.t(`Used only to calculate position.`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(`span`,{children:T(k,{color:`primary`,disabled:e,onClick:()=>this.addressToPosition(!0),children:T(on,{})})})})]}),M(F,{sx:{display:`flex`,alignItems:`flex-start`,gap:1},children:[T(I,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Longitude`),value:this.state.longitude??``,onChange:e=>this.onChangePosition(e.target.value,`longitude`)}),T(I,{size:`small`,fullWidth:!0,disabled:e,label:this.props.t(`Latitude`),value:this.state.latitude??``,onChange:e=>this.onChangePosition(e.target.value,`latitude`)}),T(Rt,{title:this.props.t(`ioBroker location`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(`span`,{children:T(k,{color:`primary`,disabled:e,onClick:()=>this.setState({latitude:``,longitude:``},()=>this.getBrowserCoordinates()),children:T(Pr,{})})})})]})]})}render(){return T(qc,{wide:!0,title:this.props.t(`Important main settings`),onBack:this.props.onBack,busy:this.props.requesting,actions:T(V,{variant:`contained`,color:`primary`,loading:this.props.requesting,onClick:()=>this.props.onDone({tempUnit:this.state.tempUnit,currency:this.state.currency,dateFormat:this.state.dateFormat,isFloatComma:this.state.isFloatComma,address:this.state.address,firstDayOfWeek:this.state.firstDayOfWeek,country:this.state.country,city:this.state.city,longitude:parseFloat(this.state.longitude)||0,latitude:parseFloat(this.state.latitude)||0}),startIcon:T(pr,{}),children:this.props.t(`Next`)}),children:M(F,{sx:{display:`flex`,flexDirection:{xs:`column`,md:`row`},gap:2,height:{xs:`auto`,md:`100%`}},children:[M(F,{sx:{width:{xs:`100%`,md:360},flexShrink:0,overflow:{xs:`visible`,md:`auto`},pr:{xs:0,md:1},pt:1,display:`flex`,flexDirection:`column`,gap:3},children:[this.renderSettings(),this.renderLocation()]}),T(Ot,{variant:`outlined`,sx:{flexGrow:1,height:{xs:320,md:`100%`},minHeight:240,overflow:`hidden`,borderRadius:2},children:T(yl,{style:{height:`100%`,width:`100%`},center:this.getPosition(),zoom:this.state.zoom,maxZoom:Dl,attributionControl:!0,zoomControl:!0,doubleClickZoom:!0,scrollWheelZoom:!0,dragging:!0,easeLinearity:.35,ref:this.onMap,children:T(bl,{url:`https://{s}.tile.osm.org/{z}/{x}/{y}.png`})})})]})})}},Al=class extends $t{constructor(e){super(e),this.state={auth:!!e.auth,secure:!!e.secure}}render(){return T(qc,{title:this.props.t(`It is suggested to enable the authentication in admin`),onBack:this.props.onBack,actions:T(V,{color:`primary`,variant:`contained`,onClick:()=>this.props.onDone({auth:this.state.auth,secure:this.state.secure}),startIcon:T(pr,{}),children:this.props.t(`Next`)}),children:M(F,{sx:{display:`flex`,flexDirection:`column`,gap:2,maxWidth:560},children:[M(Ot,{variant:`outlined`,sx:{p:2,borderRadius:2},children:[T(je,{control:T(We,{checked:this.state.auth,onChange:()=>this.setState({auth:!this.state.auth})}),label:this.props.t(`Authentication in Admin`)}),T(Ae,{children:this.props.t(`Activate the check of password in admin if you plan to access your ioBroker is not in "Demilitarized Zone"`)})]}),T(Ot,{variant:`outlined`,sx:{p:2,borderRadius:2},children:M(p,{fullWidth:!0,size:`small`,children:[T(D,{id:`wizard-certificates-label`,children:this.props.t(`Certificates`)}),M(Bt,{labelId:`wizard-certificates-label`,label:this.props.t(`Certificates`),value:this.state.secure?`true`:`false`,onChange:e=>this.setState({secure:e.target.value===`true`}),children:[T(Lt,{value:`false`,children:this.props.t(`No SSL`)}),T(Lt,{value:`true`,children:this.props.t(`Use self signed certificates`)})]}),T(Ae,{children:this.state.secure?this.props.t(`Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.`):this.props.t(`Your communication with admin is not encrypted`)})]})})]})})}},jl=class extends $t{render(){let e,t;return this.props.auth?this.props.secure?(e=`info`,t=this.props.t(`Information`)):(e=`warning`,t=this.props.t(`Be aware!`)):(e=`error`,t=this.props.t(`Warning!`)),T(qc,{title:this.props.t(`Important information about port forwarding`),onBack:this.props.onBack,actions:T(V,{color:`primary`,variant:`contained`,onClick:()=>this.props.onDone(),startIcon:T(Ne,{}),children:this.props.t(`Understand`)}),children:M(F,{sx:{display:`flex`,flexDirection:`column`,gap:3,maxWidth:700},children:[M(C,{severity:e,children:[T(He,{children:t}),this.props.t(`Do not expose iobroker Admin or Web interfaces to the internet directly via the port forwarding!`)]}),M(F,{children:[T(L,{sx:{mb:2},children:this.props.t(`The Cloud services from iobroker.net/pro can help here to do that securely:`)}),M(F,{sx:{display:`flex`,gap:2,flexWrap:`wrap`},children:[T(V,{color:`secondary`,variant:`contained`,onClick:()=>window.open(`https://iobroker.pro`,`help`),startIcon:T(c,{}),children:`ioBroker.pro`}),T(V,{color:`secondary`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net`,`help`),startIcon:T(Ie,{}),children:`ioBroker.net`})]})]})]})})}};async function Ml(e,t,n,r,i){try{return await e.getReducedRepository(t,n,r,i)}catch(e){if((e==null?void 0:e.message)!==De.NOT_SUPPORTED)throw e}return e.getRepository(t,{repo:n.repo,update:n.update},r,i)}async function Nl(e,t,n,r,i,a){let o=r.filter(e=>e!==`hosts`&&n[e]&&!n[e].news);if(!o.length||!await e.checkFeatureSupported(`REDUCED_REPOSITORY`))return;let s=await e.getReducedRepository(t,{repo:i.repo,lang:i.lang,adapters:o},!1,a);for(let e of o){var c;(c=s[e])!=null&&c.news&&(n[e]={...n[e],news:s[e].news})}}var Pl=[{name:`Cloud`,description:`cloud wizard category`,adapters:[`iot`,`cloud`]},{name:`Logic`,description:`logic wizard category`,adapters:[`javascript`,`scenes`]},{name:`Notifications`,description:`notifications wizard category`,adapters:[`notification-manager`,`telegram`,`email`,`pushover`,`signal-cmb`]},{name:`History data`,description:`history wizard category`,adapters:[`history`,`sql`]},{name:`Weather`,description:`weather wizard category`,adapters:[`weatherunderground`]},{name:`Visualization`,description:`visualization wizard category`,adapters:[`vis-2`]}],Fl=class extends Ut.Component{constructor(e){super(e),this.state={repository:{},loading:!0,selectedAdapters:[...e.adapters]}}async componentDidMount(){try{var e;let t=await Ml(this.props.socket,this.props.host,{repo:(e=this.props.socket.systemConfig)==null?void 0:e.common.activeRepo,lang:this.props.socket.systemLang,adapters:Pl.flatMap(e=>e.adapters)});this.setState({repository:t,loading:!1})}catch(e){this.setState({loading:!1}),console.error(`Could not read repository: ${e.message}`)}}async onDone(){let{selectedAdapters:e}=this.state;this.props.onDone(e);for(let t of e)await new Promise(e=>{this.props.executeCommand(`add ${t}`,this.props.host,e)})}toggleAdapter(e){let t=[...this.state.selectedAdapters],n=t.indexOf(e);n===-1?t.push(e):t.splice(n,1),this.setState({selectedAdapters:t})}renderAdapter(e){var t,n;let r=this.state.repository[e];if(!r)return null;let i=this.props.socket.systemLang,a=((t=r.titleLang)==null?void 0:t[i])||((n=r.titleLang)==null?void 0:n.en)||e,o=this.state.selectedAdapters.includes(e);return M(Vt,{disableGutters:!0,elevation:0,sx:{border:`1px solid`,borderColor:o?`primary.main`:`divider`,borderRadius:2,"&::before":{display:`none`},"&:not(:last-child)":{mb:1}},children:[M(ie,{expandIcon:T(l,{}),"aria-controls":`${e}-content`,id:`${e}-header`,sx:{"& .MuiAccordionSummary-content":{alignItems:`center`,gap:1,my:1}},children:[T(ke,{checked:o,onClick:e=>e.stopPropagation(),onChange:()=>this.toggleAdapter(e),slotProps:{input:{"aria-label":a}}}),T(F,{component:`img`,alt:``,src:r.extIcon,sx:{width:40,height:40,objectFit:`contain`}}),T(L,{sx:{fontWeight:500},children:a})]}),T(ge,{sx:{backgroundColor:`action.hover`},children:T(L,{variant:`body2`,sx:{whiteSpace:`pre-wrap`},children:A.t(`${e} wizard description`)})})]},e)}renderContent(){return T(F,{sx:{display:`flex`,flexDirection:`column`,gap:3},children:Pl.map(e=>{let t=e.adapters.map(e=>this.renderAdapter(e)).filter(e=>e!==null);return t.length?M(F,{children:[T(L,{variant:`h6`,sx:{fontWeight:600},children:A.t(e.name)}),T(L,{variant:`body2`,sx:{color:`text.secondary`,mb:1.5},children:A.t(e.description)}),t]},e.name):null})})}render(){let{selectedAdapters:e}=this.state;return T(qc,{title:A.t(`Adapters`),description:A.t(`wizard adapter general description`),onBack:this.props.onBack,actions:T(V,{color:`primary`,variant:`contained`,onClick:()=>this.onDone(),startIcon:e.length?T(Ne,{}):T(pr,{}),children:e.length?`${A.t(`Install selected adapters`)} (${e.length})`:A.t(`Next`)}),children:this.state.loading?T(Le,{}):this.renderContent()})}};x();var Il=[`living_room`,`bedroom`,`bathroom`,`kitchen`,`dining`,`guest_room`,`guest_bathroom`,`anteroom`,`playroom`,`laundry_room`,`boiler_room`,`dressing_room`,`equipment_room`,`locker_room`,`storeroom`,`washroom`],Ll=[`living_room`,`bedroom`,`bathroom`,`kitchen`];function Rl(e,t){return typeof e==`string`?e:e[t]||e.en||``}var zl=class extends $t{constructor(e){super(e),j(this,`rooms`,[]),j(this,`importantRooms`,[...Il]),j(this,`toggleRoom`,e=>{let t=[...this.state.selectedRooms],n=t.indexOf(e);n===-1?(t.push(e),t.sort()):t.splice(n,1),this.setState({selectedRooms:t})}),j(this,`createRoomEnums`,async()=>{let{selectedRooms:e}=this.state;this.setState({creating:!0});for(let t of e){let e=this.rooms.find(e=>e._id===t);if(!e)continue;let n=`enum.rooms.${t}`;try{await this.props.socket.getObject(n)||await this.props.socket.setObject(n,{_id:n,type:`enum`,common:{name:e.name,members:[],icon:e.icon},native:{}})}catch(e){console.error(`Error creating room enum ${n}:`,e),this.props.onError(e.message||e.toString())}}this.setState({creating:!1}),this.props.onDone(e)}),this.state={selectedRooms:e.rooms||[...Ll],loading:!0,preSelected:JSON.stringify(e.rooms||[]),showMore:!1,creating:!1}}async componentDidMount(){try{this.rooms=Ee(`rooms`);let e=[...this.state.selectedRooms],t=await this.props.socket.getObjectViewSystem(`enum`),n=Object.keys(t||{}).filter(e=>e.startsWith(`enum.rooms.`));if(n.length){e=[];for(let r of n){let n=r.replace(`enum.rooms.`,``);if(e.push(n),this.rooms.find(e=>e._id===n))continue;let i=this.rooms.findIndex(e=>Rl(e.name,this.props.lang)===Rl(t[r].common.name,this.props.lang));i===-1?this.rooms.push({_id:n,name:t[r].common.name||n,icon:t[r].common.icon||``,translatedName:Rl(t[r].common.name,this.props.lang)}):(this.importantRooms=this.importantRooms.filter(e=>e!==this.rooms[i]._id),this.rooms[i].icon=t[r].common.icon||this.rooms[i].icon,this.rooms[i]._id=n,this.rooms[i].translatedName=Rl(t[r].common.name,this.props.lang)),this.importantRooms.includes(n)||this.importantRooms.push(n)}e.sort()}for(let e of this.rooms)e.translatedName||=Rl(e.name,this.props.lang);this.setState({loading:!1,selectedRooms:e,preSelected:this.props.rooms?this.state.preSelected:JSON.stringify(e)})}catch(e){this.setState({loading:!1}),this.props.onError(e.message||e.toString())}}isUnchanged(){return this.state.preSelected===JSON.stringify(this.state.selectedRooms)}renderRoom(e){let t=this.rooms.find(t=>t._id===e);if(!t)return null;let n=this.state.selectedRooms.includes(e);return M(tt,{disabled:this.state.creating,onClick:()=>this.toggleRoom(e),sx:{position:`relative`,display:`flex`,flexDirection:`column`,justifyContent:`center`,gap:1,p:1,height:150,borderRadius:2,border:`2px solid`,borderColor:n?`primary.main`:`divider`,backgroundColor:n?`action.selected`:`transparent`,transition:`border-color 0.2s, background-color 0.2s`,"&:hover":{borderColor:n?`primary.main`:`text.disabled`}},children:[n?T(W,{color:`primary`,sx:{position:`absolute`,top:6,right:6,fontSize:20}}):null,T(nt,{src:t.icon,alt:t.translatedName,style:{width:72,height:72,opacity:n?1:.7}}),T(L,{variant:`body2`,sx:{textAlign:`center`,lineHeight:1.2},children:t.translatedName})]},e)}render(){let e=this.state.showMore?this.rooms.map(e=>e._id).sort((e,t)=>{let n=this.rooms.find(t=>t._id===e),r=this.rooms.find(e=>e._id===t);return((n==null?void 0:n.translatedName)||e).localeCompare((r==null?void 0:r.translatedName)||t,this.props.lang)}):this.importantRooms,t=this.isUnchanged();return T(qc,{title:this.props.t(`Select the rooms in your home`),description:`${this.props.t(`Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.`)}${this.state.showMore?`\n${this.props.t(`If you do not see the room you want to add, please add it in the categories tab.`)}`:``}`,onBack:this.props.onBack,busy:this.state.creating,actions:T(V,{variant:`contained`,color:`primary`,loading:this.state.creating,onClick:this.createRoomEnums,startIcon:T(t?pr:Ne,{}),children:t?this.props.t(`Next`):this.props.t(`Create rooms`)}),children:this.state.loading?T(Le,{}):M(F,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(130px, 1fr))`,gap:1.5},children:[e.map(e=>this.renderRoom(e)),T(tt,{disabled:this.state.creating,onClick:()=>this.setState({showMore:!this.state.showMore}),sx:{height:150,borderRadius:2,border:`2px dashed`,borderColor:`divider`,color:`text.secondary`,"&:hover":{borderColor:`text.disabled`}},children:T(L,{variant:`body2`,children:this.state.showMore?this.props.t(`Show less`):this.props.t(`Show more`)})})]})})}};x();var Bl=[`welcome`,`license`,`password`,`auth`,`forwarding`,`settings`,`rooms`,`adapters`,`finish`],Vl={welcome:`Welcome`,license:`License agreement`,password:`Password`,auth:`Authentication`,forwarding:`Port forwarding`,settings:`Settings`,rooms:`Rooms`,adapters:`Adapters`,finish:`Finish`},Hl=class extends $t{constructor(e){super(e),j(this,`adminInstance`,null),j(this,`goNext`,()=>{this.setState(e=>({activeStep:Math.min(e.activeStep+1,e.steps.length-1),errorText:``}))}),j(this,`goBack`,()=>{this.setState(e=>({activeStep:Math.max(e.activeStep-1,0),errorText:``}))}),this.state={steps:[...Bl],activeStep:0,auth:!1,secure:!1,lang:e.lang||A.getLanguage(),password:``,settings:null,rooms:null,adapters:[],errorText:``,requesting:!1}}async componentDidMount(){try{let e=await this.props.socket.getCurrentInstance(),t=await this.props.socket.getObject(`system.adapter.${e}`);this.adminInstance=t||null;let n=await this.props.socket.getCompactSystemConfig(!0),r=Bl.filter(e=>{var t;return e!==`license`||!(n!=null&&(t=n.common)!=null&&t.licenseConfirmed)});this.setState(e=>({auth:!!(t!=null&&t.native.auth),secure:!!(t!=null&&t.native.secure),steps:r,activeStep:Math.min(e.activeStep,r.length-1)}))}catch(e){this.setState({errorText:e.message||e.toString()})}}renderWelcome(){return M(F,{sx:{position:`relative`,height:`100%`,borderRadius:2,overflow:`hidden`,display:`flex`,backgroundImage:`url(${tl})`,backgroundRepeat:`no-repeat`,backgroundSize:`cover`,backgroundPosition:`center`},children:[T(F,{sx:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(0, 12, 26, 0.35) 0%, rgba(0, 12, 26, 0.85) 100%)`}}),M(F,{sx:{position:`relative`,m:`auto`,p:{xs:2,md:4},maxWidth:680,textAlign:`center`,color:`#fff`},children:[T(F,{component:`img`,src:rl,alt:`ioBroker`,sx:{width:{xs:200,md:280},maxWidth:`100%`,filter:`brightness(0) invert(1)`,opacity:.95}}),T(L,{variant:`body1`,sx:{mt:3,color:`rgba(255, 255, 255, 0.85)`},children:A.t(`wizard welcome description`)}),T(V,{variant:`contained`,color:`primary`,size:`large`,sx:{mt:4},onClick:this.goNext,endIcon:T(re,{}),children:A.t(`Start wizard`)})]})]})}renderLicense(){return T($c,{t:A.t,socket:this.props.socket,themeType:this.props.themeType,lang:this.state.lang,onLanguageChange:e=>{A.setLanguage(e),this.setState({lang:e})},saving:this.state.requesting,onBack:this.state.activeStep?this.goBack:void 0,onDone:async e=>{this.setState({requesting:!0});try{let t=await this.props.socket.getSystemConfig(!0);t.common.licenseConfirmed=!0,t.common.diag=`extended`,e.lang&&(t.common.language=e.lang),await this.props.socket.setSystemConfig(t),e.lang&&(this.props.socket.systemLang=e.lang),this.setState({lang:e.lang||t.common.language||A.getLanguage(),requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}})}renderPassword(){return T(Yc,{t:A.t,password:this.state.password,requesting:this.state.requesting,onBack:this.state.activeStep?this.goBack:void 0,onDone:async(e,t)=>{if(t)this.props.onNavigate(`tab-backitup-0`);else{this.setState({requesting:!0});try{await this.props.socket.changePassword(`admin`,e),this.setState({password:e,requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}}})}renderSettings(){return T(kl,{t:A.t,socket:this.props.socket,settings:this.state.settings,requesting:this.state.requesting,onBack:this.goBack,onDone:async e=>{this.setState({requesting:!0});try{let t=await this.props.socket.getSystemConfig(!0);Object.assign(t.common,e),await this.props.socket.setSystemConfig(t),this.setState({settings:e,requesting:!1},()=>this.goNext())}catch(e){this.setState({requesting:!1,errorText:e.message||e.toString()})}}})}renderAuthentication(){return T(Al,{t:A.t,auth:this.state.auth,secure:this.state.secure,onBack:this.goBack,onDone:e=>this.setState(e,()=>this.goNext())})}renderPortForwarding(){return T(jl,{t:A.t,auth:this.state.auth,secure:this.state.secure,onBack:this.goBack,onDone:this.goNext})}renderRooms(){return T(zl,{t:A.t,lang:this.state.lang,socket:this.props.socket,rooms:this.state.rooms,onBack:this.goBack,onError:e=>this.setState({errorText:e}),onDone:e=>this.setState({rooms:e},()=>this.goNext())})}renderAdapters(){return T(Fl,{host:this.props.host,socket:this.props.socket,adapters:this.state.adapters,executeCommand:this.props.executeCommand,onBack:this.goBack,onDone:e=>this.setState({adapters:e},()=>this.goNext())})}async onClose(){let e;try{e=await this.props.socket.getState(`system.adapter.discovery.0.alive`)}catch{}let t=`#tab-adapters${e!=null&&e.val?`/discovery`:``}`;if(!this.adminInstance){d.doNavigate(`tab-adapters`,e!=null&&e.val?`discovery`:void 0),this.props.onClose();return}let n=!!this.adminInstance.native.language&&this.adminInstance.native.language!==this.state.lang;if(this.adminInstance.native.secure===this.state.secure&&this.adminInstance.native.auth===this.state.auth&&!n){d.doNavigate(`tab-adapters`,e!=null&&e.val?`discovery`:void 0),this.props.onClose();return}let r,i;if(this.state.secure&&(!this.adminInstance.native.certPublic||!this.adminInstance.native.certPrivate))try{var a,o;let e=await this.props.socket.getCertificates();r=e==null||(a=e.find(e=>e.type===`public`))==null?void 0:a.name,i=e==null||(o=e.find(e=>e.type===`private`))==null?void 0:o.name}catch(e){this.setState({errorText:A.t(`Cannot read certificates: %s`,e.message||e)});return}if(this.state.secure&&(!r||!i))this.setState({secure:!1,errorText:A.t(`Cannot enable authentication as no certificates found!`)});else{this.adminInstance.native.auth=this.state.auth,this.adminInstance.native.secure=this.state.secure,n&&(this.adminInstance.native.language=this.state.lang),this.state.secure&&(this.adminInstance.native.certPublic=this.adminInstance.native.certPublic||r,this.adminInstance.native.certPrivate=this.adminInstance.native.certPrivate||i);try{await this.props.socket.setObject(this.adminInstance._id,this.adminInstance)}catch(e){this.setState({errorText:e.message||e.toString()});return}this.props.onClose(`${this.adminInstance.native.secure?`https`:`http`}://${window.location.host}${lr(t)}`)}}renderFinish(){return M(F,{sx:{position:`relative`,height:`100%`,borderRadius:2,overflow:`hidden`,display:`flex`,backgroundImage:`url(${el})`,backgroundRepeat:`no-repeat`,backgroundSize:`cover`,backgroundPosition:`center`},children:[T(F,{sx:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.8) 100%)`}}),M(F,{sx:{position:`relative`,m:`auto`,p:{xs:2,md:4},maxWidth:680,textAlign:`center`},children:[T(L,{component:`div`,sx:{fontSize:{xs:24,sm:32,md:40},fontWeight:700,color:`#265063`},children:A.t(`Have fun automating your home with`)}),T(F,{component:`img`,src:rl,alt:`ioBroker`,sx:{width:{xs:240,md:380},maxWidth:`100%`,mt:2}}),T(F,{children:T(V,{variant:`contained`,color:`primary`,size:`large`,sx:{mt:2},onClick:()=>this.onClose(),startIcon:T(Ne,{}),children:A.t(`Finish`)})})]})]})}renderStep(){switch(this.state.steps[this.state.activeStep]){case`welcome`:return this.renderWelcome();case`license`:return this.renderLicense();case`password`:return this.renderPassword();case`auth`:return this.renderAuthentication();case`forwarding`:return this.renderPortForwarding();case`settings`:return this.renderSettings();case`rooms`:return this.renderRooms();case`adapters`:return this.renderAdapters();case`finish`:return this.renderFinish();default:return null}}renderHeader(){return M(F,{sx:{display:`flex`,alignItems:`center`,gap:1,px:{xs:1.5,md:3},py:1.5},children:[T(F,{component:`img`,src:nl,alt:`logo`,sx:{width:32,height:32,borderRadius:`50%`,background:`#fff`,p:`2px`}}),T(L,{variant:`h6`,component:`h1`,sx:{fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:A.t(`Initial ioBroker setup`)}),T(F,{sx:{flexGrow:1}}),T(ne,{t:A.t,toggleTheme:this.props.toggleTheme,themeName:this.props.themeName,size:`small`})]})}renderProgress(){let{steps:e,activeStep:t}=this.state;return M(Me,{children:[T(F,{sx:{display:{xs:`none`,md:`block`},px:3,pb:2},children:T(Be,{activeStep:t,alternativeLabel:!0,children:e.map((e,n)=>T(fn,{completed:n<t,children:n<t?T(rt,{onClick:()=>this.setState({activeStep:n,errorText:``}),children:A.t(Vl[e])}):T(ae,{children:A.t(Vl[e])})},e))})}),M(F,{sx:{display:{xs:`block`,md:`none`},px:2,pb:1.5},children:[M(F,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:1},children:[T(L,{variant:`subtitle2`,sx:{fontWeight:600},children:A.t(Vl[e[t]])}),T(L,{variant:`caption`,sx:{color:`text.secondary`,whiteSpace:`nowrap`},children:A.t(`Step %s of %s`,t+1,e.length)})]}),T(Le,{variant:`determinate`,sx:{mt:.5,borderRadius:1},value:t/(e.length-1)*100})]})]})}render(){return M(u,{open:!0,onClose:()=>{},fullWidth:!0,fullScreen:!0,"aria-labelledby":`wizard-dialog-title`,slotProps:{paper:{sx:{backgroundColor:`background.default`,backgroundImage:`none`}}},children:[M(le,{id:`wizard-dialog-title`,sx:{p:0,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[this.renderHeader(),this.renderProgress(),T(F,{sx:{flex:1,minHeight:0,px:{xs:1,md:3},pb:{xs:1,md:3}},children:this.renderStep()})]}),T(qe,{open:!!this.state.errorText,autoHideDuration:1e4,anchorOrigin:{vertical:`bottom`,horizontal:`center`},onClose:()=>this.setState({errorText:``}),children:T(C,{severity:`error`,variant:`filled`,onClose:()=>this.setState({errorText:``}),children:this.state.errorText})})]})}},Ul=class extends Ut.Component{};x();var Wl={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},formControl:{marginRight:8,minWidth:`100%`},selectEmpty:{marginTop:16},map:{borderRadius:5},itemWithIcon:{display:`flex`,alignItems:`center`,gap:8},itemIcon:{width:20,height:20,flexShrink:0}},Gl=e=>{var t;let n=_l();return(t=e.addMap)==null||t.call(e,n),null},Kl=class extends Ul{constructor(e){super(e),j(this,`marker`,null),j(this,`map`,null),j(this,`cityTimer`,null),j(this,`latLongTimer`,null),j(this,`onMap`,e=>{if(!this.props.saving&&(!this.map||this.map!==e)){this.map=e;let t=[parseFloat(this.props.data.common.latitude===void 0?`50`:this.props.data.common.latitude)||0,parseFloat(this.props.data.common.longitude===void 0?`10`:this.props.data.common.longitude)||0];this.marker=new E(t,{draggable:this.state.saving,title:A.t(`Resource location`),alt:A.t(`Resource Location`),riseOnHover:!0}).addTo(e).bindPopup(`Popup for any custom information.`).on({dragend:e=>this.onMarkerDragend(e)})}}),j(this,`getCounters`,()=>{let e=Tl(this.props.t).map(e=>T(Lt,{value:e,disabled:e===Cl,children:e===`---------`?e:this.props.t(e)},e));return M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`country-label`,children:this.props.t(`Country:`)}),T(Bt,{disabled:this.props.saving,variant:`standard`,style:Wl.formControl,id:`country`,value:this.props.data.common.country,onChange:this.handleChangeCountry,displayEmpty:!0,children:e})]})}),j(this,`handleChangeCountry`,e=>{let t=e.target.value;this.doChange(`country`,t)}),j(this,`onChangeText`,(e,t)=>{let n=e.target.value;this.onChangeInput(n,t),(t===`longitude`||t===`latitude`)&&(this.latLongTimer&&clearTimeout(this.latLongTimer),this.latLongTimer=setTimeout(()=>{var e,t;this.latLongTimer=null,(e=this.map)==null||e.flyTo([parseFloat(this.props.data.common.latitude),parseFloat(this.props.data.common.longitude)]),(t=this.marker)==null||t.setLatLng([parseFloat(this.props.data.common.latitude),parseFloat(this.props.data.common.longitude)])},500))}),j(this,`onChangeInput`,(e,t,n)=>this.doChange(t,e,n)),j(this,`onChangeCity`,e=>{this.onChangeText(e,`city`),this.cityTimer&&clearTimeout(this.cityTimer),this.cityTimer=setTimeout(()=>{this.cityTimer=null,new Je().search({query:e.target.value}).then(e=>{e[0]&&setTimeout(()=>this.onChangeInput(e[0].y,`latitude`,()=>this.onChangeInput(e[0].x,`longitude`,()=>this.onChangeInput(23,`zoom`,()=>{var t,n;(t=this.map)==null||t.flyTo([e[0].y,e[0].x]),(n=this.marker)==null||n.setLatLng([e[0].y,e[0].x])}))),1200)})},500)}),j(this,`handleChange`,(e,t)=>{let n=e.target.value,r=this.getSettings()[t].id;r===`activeRepo`&&!n.toLowerCase().startsWith(`stable`)&&!n.toLowerCase().includes(`default`)?this.setState({confirm:!0,confirmValue:n}):this.doChange(r,n)}),j(this,`doChange`,(e,t,n)=>{let r=H.clone(this.props.data);r.common[e]=t,this.props.onChange(r,null,()=>n&&n())}),j(this,`onMarkerDragend`,e=>{if(!this.props.saving){let t=JSON.parse(JSON.stringify(e.target._latlng));this.doChange(`latitude`,t.lat,()=>this.doChange(`longitude`,t.lng))}}),this.state={zoom:14,confirm:!1,confirmValue:``,saving:this.props.saving}}getSettings(){return[{id:`language`,title:`System language:`,translate:!1,values:[{id:`en`,title:`English`},{id:`de`,title:`Deutsch`},{id:`ru`,title:`русский`},{id:`uk`,title:`український`},{id:`pt`,title:`Portugues`},{id:`nl`,title:`Nederlands`},{id:`fr`,title:`français`},{id:`it`,title:`Italiano`},{id:`es`,title:`Espanol`},{id:`pl`,title:`Polski`},{id:`zh-cn`,title:`简体中文`}]},{id:`tempUnit`,title:`Temperature units`,translate:!1,values:[{id:`°C`,title:`°C`},{id:`°F`,title:`°F`}]},{id:`currency`,title:`Currency sign`,translate:!1,allowText:!0,autocomplete:!0,values:[{id:`€`,title:`€`},{id:`$`,title:`$`},{id:`₽`,title:`₽`},{id:`₤`,title:`₤`},{id:`CHF`,title:`CHF`}]},{id:`dateFormat`,title:`Date format`,translate:!0,values:[{id:`DD.MM.YYYY`,title:`DD.MM.YYYY`},{id:`YYYY.MM.DD`,title:`YYYY.MM.DD`},{id:`MM/DD/YYYY`,title:`MM/DD/YYYY`}]},{id:`isFloatComma`,title:`Float divider sign`,translate:!0,values:[{id:!0,title:`comma`},{id:!1,title:`point`}]},{id:`defaultHistory`,title:`Default History`,values:[{id:``,title:this.props.t(`None`)},...this.props.histories.map(e=>{var t;return{id:e,title:e,icon:(t=this.props.historyIcons)==null?void 0:t[e]}})]},{id:`activeRepo`,title:`Default Repository`,translate:!1,values:H.objectMap(this.props.dataAux.native.repositories,(e,t)=>({id:t,title:t}))},{id:`expertMode`,title:`Expert mode`,values:[{id:!0,title:`on`},{id:!1,title:`off (default)`}]},{id:`tipsDisabled`,title:`Tips at start`,translate:!0,values:[{id:!1,title:`show (default)`},{id:!0,title:`do not show`}]},{id:`defaultLogLevel`,title:`Default log level`,help:`for new instances`,translate:!1,values:[{id:`debug`,title:`debug`},{id:`info`,title:`info`},{id:`warn`,title:`warn`},{id:`error`,title:`error`}]},{id:`firstDayOfWeek`,title:`First day of week`,translate:!0,values:[{id:`monday`,title:`Monday`},{id:`sunday`,title:`Sunday`}]}]}getSelect(e,t){var n;let r=this.props.data.common[e.id];if(e.id===`defaultLogLevel`&&!r&&(r=`info`),e.id===`activeRepo`&&this.props.multipleRepos||(n=this.props.adminGuiConfig.admin)!=null&&n.settings&&this.props.adminGuiConfig.admin.settings[e.id]===!1)return null;if(e.autocomplete&&e.values)return T(N,{size:{sm:6,xs:12},children:T(st,{freeSolo:!0,disabled:this.props.saving,options:e.values,inputValue:r.toString(),onChange:(e,n)=>{let r=this.getSettings()[t].id;typeof n==`string`?this.doChange(r,n):this.doChange(r,n?n.id:``)},onInputChange:(e,n)=>{let r=this.getSettings()[t].id;this.doChange(r,n)},getOptionLabel:t=>typeof t==`string`?t:e.translate?this.props.t(t.title||t.id.toString()):t.title||t.id.toString(),renderOption:(t,n)=>T(`li`,{...t,children:e.translate?this.props.t(n.title||n.id.toString()):n.title||n.id}),renderInput:t=>T(I,{...t,variant:`standard`,label:this.props.t(e.title)})})},t);if(e.allowText&&r&&!e.values.find(e=>e.id===r))return T(N,{size:{sm:6,xs:12},children:M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`${e.id}-label`,children:this.props.t(e.title)}),T(I,{disabled:this.props.saving,variant:`standard`,id:e.id,value:r.toString(),onChange:e=>this.handleChange(e,t),helperText:e.help?this.props.t(e.help):``,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:r.toString()?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.handleChange({target:{value:``}},t),children:T(O,{})})}):null}}})]})},t);let i=t=>e.translate?this.props.t(t.title||t.id.toString()):t.title||t.id.toString(),a=e.values.some(e=>e.icon),o=e.values.map((e,t)=>T(Lt,{value:e.id,children:a?M(`span`,{style:Wl.itemWithIcon,children:[e.icon?T(nt,{src:e.icon,style:Wl.itemIcon}):T(`span`,{style:Wl.itemIcon}),i(e)]}):i(e)},t));return T(N,{size:{sm:6,xs:12},children:M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`${e.id}-label`,children:this.props.t(e.title)}),T(Bt,{disabled:this.props.saving,variant:`standard`,style:Wl.formControl,id:e.id,value:r!==void 0&&r,onChange:e=>this.handleChange(e,t),displayEmpty:!0,renderValue:a?t=>{let n=e.values.find(e=>e.id===t);return n?M(`span`,{style:Wl.itemWithIcon,children:[n.icon?T(nt,{src:n.icon,style:Wl.itemIcon}):null,i(n)]}):String(t??``)}:void 0,children:o}),e.help?T(Ae,{children:this.props.t(e.help)}):null]})},t)}renderDialogConfirm(){return this.state.confirm?T(Qt,{text:this.props.t(`confirm_change_repo`),onClose:e=>{let t=this.state.confirmValue;this.setState({confirm:!1,confirmValue:``},()=>{e&&this.doChange(`activeRepo`,t)})}}):null}render(){let e=this.getSettings().map((e,t)=>this.getSelect(e,t)),t=[parseFloat(this.props.data.common.latitude===void 0?`50`:this.props.data.common.latitude)||0,parseFloat(this.props.data.common.longitude===void 0?`10`:this.props.data.common.longitude)||0],{zoom:n}=this.state;return this.state.saving!==this.props.saving&&setTimeout(()=>{this.setState({saving:this.props.saving},()=>{if(this.state.saving){var e;(e=this.marker)==null||(e=e.dragging)==null||e.disable()}else{var t;(t=this.marker)==null||(t=t.dragging)==null||t.enable()}})},50),M(`div`,{style:Wl.tabPanel,children:[this.renderDialogConfirm(),M(N,{container:!0,spacing:3,children:[T(N,{size:{lg:6,md:12},children:M(N,{container:!0,spacing:3,children:[T(N,{size:{xs:12},children:T(I,{disabled:this.props.saving,fullWidth:!0,variant:`standard`,id:`siteName`,label:A.getLanguage()===`de`?`Kunden- / Anlagenname`:`Customer / site name`,value:this.props.data.common.siteName||``,onChange:e=>this.doChange(`siteName`,e.target.value),helperText:this.props.t(`This name will be shown in admin's header. Just to identify the whole installation`),slotProps:{input:{endAdornment:this.props.data.common.siteName?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.doChange(`siteName`,``),children:T(O,{})})}):null}}})}),e]})}),T(N,{size:{lg:6,md:12},children:M(yl,{style:Wl.map,center:t,zoom:n,maxZoom:18,attributionControl:!this.props.saving,zoomControl:!this.props.saving,doubleClickZoom:!this.props.saving,scrollWheelZoom:!this.props.saving,dragging:!this.props.saving,easeLinearity:.35,children:[T(bl,{url:`https://{s}.tile.osm.org/{z}/{x}/{y}.png`}),T(Gl,{addMap:e=>this.onMap(e)})]})})]}),M(N,{container:!0,spacing:6,children:[T(N,{size:{sm:6,xs:12,md:3},children:this.getCounters()}),T(N,{size:{sm:6,xs:12,md:3},children:M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`city-label`,children:this.props.t(`City:`)}),T(I,{disabled:this.props.saving,variant:`standard`,id:`city`,label:this.props.t(`City:`),value:this.props.data.common.city,onChange:e=>this.onChangeCity(e),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:this.props.data.common.city?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeCity({target:{value:``}}),children:T(O,{})})}):null}}})]})}),T(N,{size:{sm:6,xs:12,md:3},children:M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`latitude-label`,children:this.props.t(`Latitude:`)}),T(I,{disabled:this.props.saving,variant:`standard`,id:`latitude`,label:this.props.t(`Latitude:`),value:this.props.data.common.latitude||0,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1}},onChange:e=>this.onChangeText(e,`latitude`)})]})}),T(N,{size:{sm:6,xs:12,md:3},children:M(p,{style:Wl.formControl,variant:`standard`,children:[T(D,{shrink:!0,id:`longitude-label`,children:this.props.t(`Longitude:`)}),T(I,{disabled:this.props.saving,variant:`standard`,id:`longitude`,label:this.props.t(`Longitude:`),value:this.props.data.common.longitude||0,slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1}},onChange:e=>this.onChangeText(e,`longitude`)})]})})]})]})}};x();var ql={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},table:{display:`flex`,flexDirection:`column`,width:`100%`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`},dragColumn:{width:32},enableColumn:{width:110},stableColumn:{width:80},upgradePolicyColumn:{width:190,textAlign:`center`},buttonColumn:{width:80},nameRow:{width:220},input:{width:`100%`},checkboxError:{"& span:first-child":{border:`2px solid #FF0000`,borderRadius:4}},fabButton:{marginRight:8,width:44,height:44},tooltip:{pointerEvents:`none`}};function Jl(e){return H.objectMap(e,(e,t)=>({title:t,link:e.link}))}function Y(e){let t={};for(let n of e)t[n.title]={link:n.link};return t}var Yl=`repo-row`;function Xl({index:e,disabled:t,dragTitle:n,onMove:r,children:i}){let a=P(null),o=P(null),[,s]=Uo({accept:Yl,hover(t,n){if(!a.current||t.index===e)return;let i=t.index,o=e,s=a.current.getBoundingClientRect(),c=(s.bottom-s.top)/2,l=n.getClientOffset();if(!l)return;let u=l.y-s.top;i<o&&u<c||i>o&&u>c||(r(i,o),t.index=o)}}),[{isDragging:c},l,u]=Po({type:Yl,item:()=>({index:e}),canDrag:()=>!t,collect:e=>({isDragging:e.isDragging()})});return Xt(()=>{l(o),u(s(a))},[l,s,u]),M(Ze,{ref:a,className:`float_row`,style:{opacity:+!c},children:[T(B,{style:ql.dragColumn,className:`float_cell`,title:n,children:T(`span`,{ref:o,style:{display:`inline-flex`,cursor:t?`default`:`grab`},children:T(xt,{style:{marginTop:8}})})}),i]})}var Zl=class extends Ul{constructor(e){super(e),j(this,`onAdd`,()=>{let e=H.clone(this.props.data),t=Jl(e.native.repositories);t.push({title:`__`,link:``}),e.native.repositories=Y(t),this.props.onChange(e)}),j(this,`onRestore`,()=>{let e=H.clone(this.props.data);e.native.repositories={stable:{link:`http://download.iobroker.net/sources-dist.json`},beta:{link:`http://download.iobroker.net/sources-dist-latest.json`}};let t=Object.keys(this.props.data.native.repositories).find(t=>this.props.data.native.repositories[t].link===e.native.repositories.stable.link);t&&(e.native.repositories.stable.json&&(e.native.repositories.stable.json=this.props.data.native.repositories[t].json),e.native.repositories.stable.hash&&(e.native.repositories.stable.hash=this.props.data.native.repositories[t].hash),e.native.repositories.stable.time&&(e.native.repositories.stable.time=this.props.data.native.repositories[t].time));let n=Object.keys(this.props.data.native.repositories).find(t=>this.props.data.native.repositories[t].link===e.native.repositories.beta.link);n&&(e.native.repositories.beta.json&&(e.native.repositories.beta.json=this.props.data.native.repositories[n].json),e.native.repositories.beta.hash&&(e.native.repositories.beta.hash=this.props.data.native.repositories[n].hash),e.native.repositories.beta.time&&(e.native.repositories.beta.time=this.props.data.native.repositories[n].time));let r=H.clone(this.props.dataAux);this.props.multipleRepos?(r.common.activeRepo=[`stable`],r.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`},this.props.onChange(e,r)):(r.common.activeRepo=`stable`,this.props.onChange(e,r))}),j(this,`getUpdateDefaultRepo`,(e,t,n,r)=>{let i=H.clone(this.props.dataAux);if(!this.props.multipleRepos)return i.common.activeRepo=e,i;if(t||=H.clone(this.props.data),n!==void 0&&r!==void 0&&typeof i.common.activeRepo!=`string`){let e=i.common.activeRepo.indexOf(n);e!==-1&&(i.common.activeRepo[e]=r)}if(typeof i.common.activeRepo==`string`&&i.common.activeRepo&&(i.common.activeRepo=[i.common.activeRepo]),i.common.activeRepo=i.common.activeRepo||[],typeof i.common.activeRepo!=`string`&&!i.common.activeRepo.includes(e)){let e=Jl(t.native.repositories);i.common.activeRepo.sort((t,n)=>e.findIndex(e=>e.title===t)-e.findIndex(e=>e.title===n))}return i}),j(this,`onMove`,(e,t)=>{let n=H.clone(this.props.data),r=Jl(n.native.repositories),[i]=r.splice(e,1);r.splice(t,0,i),n.native.repositories=Y(r);let a=H.clone(this.props.dataAux);typeof a.common.activeRepo==`string`&&(a.common.activeRepo=[a.common.activeRepo]),a.common.activeRepo.sort((e,t)=>r.findIndex(t=>t.title===e)-r.findIndex(e=>e.title===t)),this.props.onChange(n,a)});let t=(typeof this.props.dataAux.common.activeRepo==`string`?[this.props.dataAux.common.activeRepo]:this.props.dataAux.common.activeRepo).filter(e=>e);this.state={error:!t.length,confirm:!1,confirmValue:null}}onValueChanged(e,t,n){let r=H.clone(this.props.data),i=Jl(r.native.repositories),a=i.find(e=>e.title===t),o=a==null?void 0:a.title;a&&(a[n]=e),r.native.repositories=Y(i);let s;(typeof this.props.dataAux.common.activeRepo==`string`&&this.props.dataAux.common.activeRepo===t||typeof this.props.dataAux.common.activeRepo!=`string`&&this.props.dataAux.common.activeRepo.includes(t))&&n===`title`&&(s=this.getUpdateDefaultRepo(e,r,o,e)),this.props.onChange(r,s)}onDelete(e){let t=H.clone(this.props.data),n=Jl(t.native.repositories),r=n.findIndex(t=>t.title===e);n.splice(r,1),t.native.repositories=Y(n),this.props.dataAux.common.activeRepo===e?Object.keys(t.native.repositories).length?this.props.onChange(t,this.getUpdateDefaultRepo(Object.keys(t.native.repositories)[0])):this.props.onChange(t,this.getUpdateDefaultRepo(``)):this.props.onChange(t)}onChangeActiveRepo(e,t,n){n?this.setState({confirm:!0,confirmValue:{newData:e,error:t}}):this.setState({error:t},()=>this.props.onChange(void 0,e))}renderDialogConfirm(){return this.state.confirm?T(Qt,{text:this.props.t(`confirm_change_repo`),onClose:e=>{let t=this.state.confirmValue;this.setState({confirm:!1,confirmValue:null},()=>{e&&this.setState({error:!!(t!=null&&t.error)},()=>this.props.onChange(void 0,t==null?void 0:t.newData))})}}):null}renderSortableItem(e,t){var n,r,i;let a=!e.title||e.title.trimStart()!==e.title||e.title.length<3&&!!e.title.match(/^\d+$/);return M(Xl,{index:t,disabled:this.props.saving,dragTitle:this.props.t(`Drag and drop to reorder`),onMove:this.onMove,children:[M(B,{style:ql.enableColumn,className:`float_cell`,children:[t+1,this.props.multipleRepos?T(ke,{disabled:((n=this.props.adminGuiConfig.admin)==null||(n=n.settings)==null?void 0:n.activeRepo)===!1||this.props.saving,sx:this.state.error?ql.checkboxError:void 0,title:this.state.error?A.t(`At least one repo must be selected`):``,checked:typeof this.props.dataAux.common.activeRepo==`string`?this.props.dataAux.common.activeRepo===e.title:this.props.dataAux.common.activeRepo.includes(e.title),onChange:()=>{let t=!1,n=H.clone(this.props.dataAux);typeof n.common.activeRepo==`string`&&(n.common.activeRepo=[n.common.activeRepo]);let r=n.common.activeRepo.indexOf(e.title);if(r===-1){n.common.activeRepo.push(e.title);let r=Jl(this.props.data.native.repositories);n.common.activeRepo.sort((e,t)=>r.findIndex(t=>t.title===e)-r.findIndex(e=>e.title===t)),t=e.title.toLowerCase().startsWith(`beta`)}else n.common.activeRepo.splice(r,1);e.title.toLowerCase().startsWith(`beta`)&&n.common.activeRepo.find(e=>e.toLowerCase().startsWith(`stable`))?(r=n.common.activeRepo.findIndex(e=>e.toLowerCase().startsWith(`stable`)),n.common.activeRepo.splice(r,1)):e.title.toLowerCase().startsWith(`stable`)&&n.common.activeRepo.find(e=>e.toLowerCase().startsWith(`beta`))&&(r=n.common.activeRepo.findIndex(e=>e.toLowerCase().startsWith(`beta`)),n.common.activeRepo.splice(r,1));let i=!n.common.activeRepo.length;this.onChangeActiveRepo(n,i,t)}}):null]}),T(B,{style:ql.stableColumn,className:`float_cell`,children:T(Rt,{title:A.t(`Flag will be automatically detected as repository will be read for the first time`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(`span`,{children:T(ke,{disabled:!0,checked:(r=this.props.repoInfo[e.title])==null?void 0:r.stable,indeterminate:!this.props.repoInfo[e.title]})})})}),T(B,{style:ql.upgradePolicyColumn,className:`float_cell`,children:T(Rt,{title:A.t(`Allow automatic adapter upgrades for this repository`),slotProps:{popper:{sx:{pointerEvents:`none`}}},children:T(`span`,{children:T(ke,{disabled:this.props.saving,checked:(i=this.props.dataAux.common)==null||(i=i.adapterAutoUpgrade)==null?void 0:i.repositories[e.title],onChange:t=>{let n=H.clone(this.props.dataAux);n.common.adapterAutoUpgrade||(n.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`}),n.common.adapterAutoUpgrade.repositories[e.title]=t.target.checked,this.props.onChange(this.props.data,n)}})})})}),T(B,{style:ql.nameRow,className:`float_cell`,children:T(I,{variant:`standard`,disabled:this.props.saving,value:e.title,style:ql.input,className:`xs-centered`,onChange:t=>this.onValueChanged(t.target.value,e.title,`title`),slotProps:{inputLabel:{shrink:!0},input:{endAdornment:e.title?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onValueChanged(``,e.title,`title`),children:T(O,{})})}):null}},error:a,helperText:a?A.t(`Invalid name`):void 0})}),T(B,{className:`grow_cell float_cell`,children:T(I,{disabled:this.props.saving,variant:`standard`,id:`default_${t}`,value:e.link,style:ql.input,className:`xs-centered`,onChange:t=>this.onValueChanged(t.target.value,e.title,`link`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:e.link?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onValueChanged(``,e.title,`link`),children:T(O,{})})}):null}}})}),T(B,{style:ql.buttonColumn,className:`float_cell`,children:T(Se,{disabled:this.props.saving,size:`small`,color:`secondary`,"aria-label":`add`,onClick:()=>this.onDelete(e.title),children:T(te,{})})})]},t)}renderSortableList(e){return M(i,{style:ql.table,children:[T(Jt,{children:M(Ze,{className:`float_row`,children:[T(B,{style:ql.dragColumn,className:`float_cell`}),T(B,{style:ql.enableColumn,className:`float_cell`,children:this.props.multipleRepos?A.t(`Active`):``}),T(B,{style:ql.stableColumn,className:`float_cell`,children:A.t(`Stable`)}),T(B,{style:ql.upgradePolicyColumn,className:`float_cell`,children:A.t(`Auto-Upgrade`)}),T(B,{style:ql.nameRow,className:`float_cell`,children:this.props.t(`name`)}),T(B,{className:`grow_cell float_cell`,children:this.props.t(`link`)}),T(B,{style:ql.buttonColumn,className:`float_cell`,children:` `})]})}),T(ft,{children:e.map((e,t)=>this.renderSortableItem(e,t))})]})}renderAutoUpgradePolicy(){var e,t;let n=((e=this.props.dataAux.common.adapterAutoUpgrade)==null?void 0:e.defaultPolicy)||`none`,r=((t=this.props.dataAux.common.adapterAutoUpgrade)==null?void 0:t.repositories)||{};return M(`div`,{style:{display:`flex`,marginLeft:20,flexDirection:`column`},children:[M(`div`,{style:{display:`flex`,alignItems:`baseline`},children:[T(L,{children:A.t(`Allow only the following upgrades to be performed automatically:`)}),T(Bt,{variant:`standard`,sx:{marginLeft:1,marginBottom:1},value:n,disabled:this.props.saving,onChange:e=>{let t=H.clone(this.props.dataAux);t.common.adapterAutoUpgrade||(t.common.adapterAutoUpgrade={repositories:{},defaultPolicy:`none`}),t.common.adapterAutoUpgrade.defaultPolicy=e.target.value,this.props.onChange(this.props.data,t)},children:ur.map(e=>T(Lt,{value:e,children:cr[e]},e))})]}),T(tc,{value:!!(r.beta||r[`Beta (latest)`])&&n!==`none`,children:T(Et,{type:`warning`,children:A.t(`repo_update_hint`)})}),T(tc,{value:n===`major`,children:T(Et,{type:`warning`,children:A.t(`The current selected configuration will allow to automatically pull in incompatible changes of this adapter!`)})})]})}render(){let e=Jl(this.props.data.native.repositories);return M(`div`,{style:ql.tabPanel,children:[this.renderDialogConfirm(),M(`div`,{style:ql.buttonPanel,children:[T(Se,{size:`small`,color:`primary`,disabled:this.props.saving,"aria-label":`add`,onClick:this.onAdd,style:ql.fabButton,title:this.props.t(`Add new line to the repository list`),children:T(h,{})}),T(Se,{size:`small`,disabled:this.props.saving,onClick:this.onRestore,style:ql.fabButton,title:this.props.t(`Restore repository list to default`),children:T(Vr,{})}),this.renderAutoUpgradePolicy()]}),T(Qa,{backend:H.isTouchDevice()?Is:ys,children:T(jt,{children:this.renderSortableList(e)})})]})}};x();var Ql={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},table:{display:`flex`,flexDirection:`column`,width:`100%`},input:{width:250,marginRight:16},button:{marginTop:16},uuidGreen:{color:`green`},uuidGrey:{color:`grey`},tableName:{width:200},tableDate:{width:150,textAlign:`right`},tableUuid:{width:300},tableValid:{width:100},tableVersion:{width:50},tableUsedIn:{width:100},tableDiv:{overflow:`auto`,height:`calc(100% - 75px)`},tableCommercial:{width:100},licenseId:{fontSize:10,opacity:.5,fontStyle:`italic`}},$l=class extends Ul{constructor(e){super(e),j(this,`onLicensesChanged`,(e,t)=>{e===`system.licenses`&&(t||={},t.native=t.native||{},t.native.licenses=t.native.licenses||[],JSON.stringify(t.native.licenses)===JSON.stringify(this.state.licenses)?window.alert(this.props.t(`Licenses have not changed`)):(window.alert(this.props.t(`New licenses were stored`)),this.setState({licenses:t.native.licenses})))}),this.state={uuid:``,requesting:!1,licenses:this.props.data.native.licenses||[]}}componentDidMount(){this.props.socket.getObject(`system.meta.uuid`).then(e=>{this.props.socket.subscribeObject(`system.licenses`,this.onLicensesChanged).catch(e=>window.alert(`Cannot subscribe on system.licenses: ${e}`)),this.setState({uuid:e==null?void 0:e.native.uuid})})}componentWillUnmount(){this.props.socket.unsubscribeObject(`system.licenses`,this.onLicensesChanged)}doChange(e,t){let n=Pe.clone(this.props.data);n.native[e]=t,this.props.onChange(n)}async requestLicenses(){this.setState({requesting:!0});try{let e=this.props.data.native.password;if(e===`__SOME_PASSWORD__`){let t=await this.props.socket.getObject(`system.licenses`);e=(t==null?void 0:t.native.login)===this.props.data.native.login?``:await this.props.socket.decrypt(t==null?void 0:t.native.password)}let t=await this.props.socket.updateLicenses(e?this.props.data.native.login:``,e);t==null?this.setState({requesting:!1}):(e&&window.alert(this.props.t(`Licenses were not stored. They will be stored after the settings will be saved`)),this.setState({licenses:t,requesting:!1}))}catch(e){this.setState({requesting:!1}),e===`permissionError`?window.alert(this.props.t(`May not trigger "updateLicenses"`)):e===`Authentication required`?window.alert(this.props.t(`Cannot update licenses: %s`,this.props.t(`Authentication required`))):window.alert(this.props.t(`Cannot update licenses: %s`,e.toString()))}}renderLicenses(){return T(`div`,{style:Ql.tableDiv,children:T(jt,{children:M(i,{stickyHeader:!0,size:`small`,children:[T(Jt,{children:M(Ze,{children:[T(B,{style:Ql.tableName,children:this.props.t(`Product`)}),T(B,{style:Ql.tableDate,children:this.props.t(`Ordered at`)}),T(B,{style:Ql.tableUuid,children:this.props.t(`UUID`)}),T(B,{style:Ql.tableValid,children:this.props.t(`Valid till`)}),T(B,{style:Ql.tableVersion,children:this.props.t(`V`)}),T(B,{style:Ql.tableUsedIn,children:this.props.t(`Used by`)}),T(B,{style:Ql.tableCommercial,children:this.props.t(`Invoice number`)})]})}),T(ft,{children:this.state.licenses&&this.state.licenses.map(e=>M(Ze,{children:[M(B,{style:Ql.tableName,children:[T(`div`,{children:e.product}),T(`div`,{style:Ql.licenseId,children:e.id})]}),T(B,{style:Ql.tableDate,children:new Date(e.time).toLocaleDateString()}),T(B,{style:{...Ql.tableUuid,...e.uuid&&this.state.uuid===e.uuid?Ql.uuidGreen:e.uuid?Ql.uuidGrey:void 0},children:e.uuid||``}),T(B,{style:Ql.tableValid,children:e.validTill===`0000-00-00 00:00:00`?``:e.validTill||``}),T(B,{style:Ql.tableVersion,children:e.version||``}),T(B,{style:Ql.tableUsedIn,children:e.usedBy||``}),T(B,{style:Ql.tableCommercial,children:e.invoice===`free`?`-`:e.invoice===`MANUALLY_CREATED`?`✓`:e.invoice})]},e.id))})]})})})}render(){return M(`div`,{style:Ql.tabPanel,children:[T(I,{variant:`standard`,style:Ql.input,disabled:this.props.saving||this.state.requesting,value:this.props.data.native.login,helperText:this.props.t(`for ioBroker.net portal`),label:this.props.t(`Login/Email`),onChange:e=>this.doChange(`login`,e.target.value),slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`off`}}}),T(I,{variant:`standard`,disabled:this.props.saving||this.state.requesting,style:Ql.input,type:`password`,value:this.props.data.native.password,helperText:this.props.t(`for ioBroker.net portal`),label:this.props.t(`Password`),onChange:e=>this.doChange(`password`,e.target.value),slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`off`}}}),T(V,{variant:`contained`,startIcon:T(nn,{}),disabled:this.state.requesting||this.props.saving||!this.props.host||!this.props.data.native.password||!this.props.data.native.login,onClick:()=>this.requestLicenses(),style:Ql.button,color:`grey`,children:this.props.t(`Check`)}),this.renderLicenses()]})}},eu=65536,tu=e=>typeof e==`object`&&!!e&&!Array.isArray(e),nu=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0,ru=e=>typeof e==`string`&&/^[A-Z][A-Z0-9_]{0,79}$/.test(e),iu=e=>typeof e==`string`&&/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(e);function au(e){return e instanceof Error&&e.name===`AbortError`?`SERVICE_TIMEOUT`:e instanceof Error&&ru(e.message)?e.message:`SERVICE_UNAVAILABLE`}function ou(e){if(!tu(e)||e.v!==1||typeof e.valid!=`boolean`||!ru(e.code)||!(e.uuid===null||typeof e.uuid==`string`&&/^(?:[a-z]{2})?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e.uuid))||e.edition!==null&&e.edition!==`home`&&e.edition!==`pro`||!(e.expiresAt===null||typeof e.expiresAt==`number`&&Number.isSafeInteger(e.expiresAt)&&e.expiresAt>0&&e.expiresAt<=864e13)||!tu(e.limits)||!Array.isArray(e.features)||e.features.length>64||!e.features.every(e=>typeof e==`string`&&/^[A-Za-z][A-Za-z0-9]{0,79}$/.test(e))||e.tokenVersion!==null&&e.tokenVersion!==2&&e.tokenVersion!==3||e.scope!==null&&e.scope!==`system`&&e.scope!==`adapters`||typeof e.coreEnabled!=`boolean`||e.valid&&(e.code!==`LICENSE_VALID`||!e.uuid||!e.edition||!nu(e.limits.chargePoints)||!nu(e.limits.batteries)||(e.tokenVersion===3?e.scope!==`system`||!e.coreEnabled:e.tokenVersion!==2||e.scope!==`adapters`))||!e.valid&&(e.coreEnabled||e.tokenVersion!==null||e.scope!==null))throw Error(`LICENSE_RESPONSE`);return{valid:e.valid,code:e.code,uuid:e.uuid,edition:e.edition,expiresAt:e.expiresAt,limits:e.valid?{chargePoints:e.limits.chargePoints,batteries:e.limits.batteries}:{},features:e.valid?e.features:[],tokenVersion:e.tokenVersion,scope:e.scope,coreEnabled:e.coreEnabled}}function su(e,t,n){if(!Array.isArray(e)||e.length>n)throw Error(`TRUST_RESPONSE`);let r=new Set;return e.map(e=>{if(!tu(e)||!iu(e.kid)||r.has(e.kid)||typeof e.fingerprint!=`string`||!/^[a-f0-9]{64}$/.test(e.fingerprint)||typeof e.source!=`string`)throw Error(`TRUST_RESPONSE`);let n=t.find(t=>t===e.source);if(!n)throw Error(`TRUST_RESPONSE`);return r.add(e.kid),{kid:e.kid,fingerprint:e.fingerprint,source:n}})}function cu(e){if(!tu(e)||e.v!==1||typeof e.ready!=`boolean`||!ru(e.code)||typeof e.canImport!=`boolean`||e.source!==`os`&&e.source!==`restored`&&e.source!==`combined`&&e.source!==`none`)throw Error(`TRUST_RESPONSE`);let t=su(e.keys,[`os`,`restored`,`os+restored`],32),n=su(e.allowedKeys,[`release`,`os`,`release+os`],64);if(e.ready&&(e.code!==`TRUST_READY`||!t.length||e.source===`none`)||!e.ready&&(t.length>0||e.code===`TRUST_READY`)||e.source===`none`&&t.length>0)throw Error(`TRUST_RESPONSE`);return{ready:e.ready,code:e.code,canImport:e.canImport,source:e.source,keys:t,allowedKeys:n}}function lu(e){if(!tu(e))throw Error(`TRUST_INVALID`);let t=Object.entries(e);if(t.some(([e,t])=>/private|vault|cipher|kdf|passphrase/i.test(e)&&typeof t!=`string`)||t.some(([,e])=>typeof e==`string`&&/PRIVATE KEY/.test(e)))throw Error(`TRUST_PRIVATE_MATERIAL`);if(!t.length||t.length>32)throw Error(`TRUST_INVALID`);let n={};for(let[e,r]of t){if(!iu(e)||typeof r!=`string`||r.length>1024||!/^-----BEGIN PUBLIC KEY-----\r?\n[A-Za-z0-9+/=\r\n]+\r?\n-----END PUBLIC KEY-----\r?\n?$/.test(r))throw Error(`TRUST_INVALID`);let t=r.replace(/-----BEGIN PUBLIC KEY-----|-----END PUBLIC KEY-----|\s/g,``),i;try{i=atob(t)}catch{throw Error(`TRUST_INVALID`)}if(i.length!==44||![48,42,48,5,6,3,43,101,112,3,33,0].every((e,t)=>i.charCodeAt(t)===e)||btoa(i)!==t)throw Error(`TRUST_INVALID`);Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0})}if(new TextEncoder().encode(JSON.stringify(n)).byteLength>32768)throw Error(`TRUST_FILE_SIZE`);return n}async function uu(e){if(!Number.isSafeInteger(e.size)||e.size<=0||e.size>32768)throw Error(`TRUST_FILE_SIZE`);let t=new Uint8Array(await e.arrayBuffer());if(t.byteLength!==e.size||t.byteLength>32768)throw Error(`TRUST_FILE_SIZE`);let n;try{n=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(t))}catch{throw Error(`TRUST_INVALID`)}return lu(n)}async function du(e){var t;let n=(t=e.body)==null?void 0:t.getReader();if(!n)throw Error(`LICENSE_RESPONSE`);let r=[],i=0;try{for(;;){let e=await n.read();if(e.done)break;if(i+=e.value.byteLength,i>eu)throw Error(`LICENSE_RESPONSE`);r.push(e.value)}let e=new Uint8Array(i),t=0;for(let n of r)e.set(n,t),t+=n.byteLength;try{return JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e))}catch{throw Error(`LICENSE_RESPONSE`)}}finally{await n.cancel().catch(()=>void 0),n.releaseLock()}}function fu(e,t){let n=`/nexowatt/license/${e}`;return t?new URL(n,t).href:n}async function pu(e,t,n){if(t.aborted)throw new DOMException(`Request aborted`,`AbortError`);let r=new AbortController,i=()=>r.abort();t.addEventListener(`abort`,i,{once:!0}),t.aborted&&r.abort();let a=setTimeout(()=>r.abort(),5e3);try{var o;let t=n!==void 0,i=await fetch(fu(e,(o=globalThis.location)==null?void 0:o.href),{method:t?`POST`:`GET`,credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:r.signal,headers:t?{Accept:`application/json`,"Content-Type":`application/json`,"X-EOS-License":`1`}:{Accept:`application/json`},...t?{body:JSON.stringify(n)}:{}}),a=await du(i);if(!i.ok)throw Error(tu(a)&&ru(a.error)?a.error:`SERVICE_UNAVAILABLE`);return a}finally{clearTimeout(a),t.removeEventListener(`abort`,i)}}async function mu(e,t,n){if(e!==`status`&&e!==`activate`&&e!==`remove`)throw Error(`LICENSE_REQUEST`);if(e===`activate`&&(typeof n!=`string`||!n.trim()||n.length>16384))throw Error(`LICENSE_FORMAT`);let r=ou(await pu(e,t,e===`activate`?{token:n==null?void 0:n.trim()}:e===`remove`?{}:void 0));if(e===`activate`&&!r.valid||e===`remove`&&r.valid)throw Error(`LICENSE_RESPONSE`);return r}async function hu(e){return cu(await pu(`trust/status`,e))}async function gu(e,t,n){if(e!==`import`&&e!==`recheck`)throw Error(`LICENSE_REQUEST`);let r=e===`import`?{keys:lu(n)}:{},i=await pu(`trust/${e}`,t,r),a=cu(i);if(!tu(i))throw Error(`TRUST_RESPONSE`);return{trust:a,license:ou(i.licenseStatus)}}async function _u(e){return lu(await pu(`trust/export`,e))}function vu(){let e=A.getLanguage()===`de`,t=(t,n)=>e?t:n,[n,r]=R(null),[i,a]=R(null),[o,s]=R(0),[c,l]=R(!1),[d,f]=R(``),[p,m]=R(null),[h,_]=R(``),[v,y]=R(``),[x,ee]=R(!1),S=P(null),w=P(!1),te=e=>{let n={LICENSE_MISSING:t(`Keine Lizenz aktiviert. Prüfschlüssel prüfen und den für diese UUID ausgestellten Code eingeben.`,`No license activated. Check verification keys and enter the code issued for this UUID.`),LICENSE_VALID:t(`Lizenz gültig.`,`License valid.`),LICENSE_EXPIRED:t(`Lizenz abgelaufen. Einen erneuerten Lizenzcode anfordern.`,`License expired. Request a renewed license code.`),LICENSE_UUID_MISMATCH:t(`Die Lizenz gehört zu einer anderen System-UUID. Einen passenden Lizenzcode anfordern.`,`The license belongs to another system UUID. Request a matching license code.`),LICENSE_UUID_CHANGED:t(`Die System-UUID hat sich geändert. Sicherung und Systemzuordnung mit dem Service prüfen.`,`The system UUID changed. Check the backup and system assignment with support.`),LICENSE_SIGNATURE_INVALID:t(`Die Signatur ist ungültig. Unveränderten Code und Prüfschlüssel des Ausstellers prüfen.`,`The signature is invalid. Check the unchanged code and issuer verification key.`),LICENSE_KEY_UNKNOWN:t(`Der öffentliche Schlüssel des Ausstellers fehlt. Im Reiter „Öffentliche Prüfschlüssel & Wiederherstellung“ einen freigegebenen öffentlichen Schlüssel importieren oder den Service kontaktieren.`,`The issuer public key is missing. Import an approved public key in the verification keys tab or contact support.`),LICENSE_FORMAT:t(`Bitte den vollständigen EOS-Lizenzcode eingeben.`,`Enter the complete EOS license code.`),LICENSE_FORMAT_INVALID:t(`Das Lizenzformat ist ungültig. Vollständigen NWL3- oder vorhandenen NWL2-Code prüfen.`,`The license format is invalid. Check the complete NWL3 or existing NWL2 code.`),LICENSE_CLAIMS_INVALID:t(`Der signierte Lizenzumfang ist ungültig. Ersatzcode beim Aussteller anfordern.`,`The signed license scope is invalid. Request a replacement code from the issuer.`),LICENSE_ADMIN_REQUIRED:t(`Mit einem Administrator-Konto anmelden.`,`Sign in with an administrator account.`),LICENSE_HTTPS_REQUIRED:t(`NexoWatt EOS über HTTPS öffnen.`,`Open NexoWatt EOS over HTTPS.`),LICENSE_ORIGIN:t(`Diese Seite über dieselbe EOS-Adresse erneut öffnen und anmelden.`,`Reopen this page using the same EOS address and sign in.`),LICENSE_CLOCK_ROLLBACK:t(`Systemdatum und Uhrzeit prüfen. Bei einer wiederhergestellten Sicherung den Service kontaktieren.`,`Check the system date and time. Contact support after restoring a backup.`),LICENSE_RATE_LIMIT:t(`Zu viele Anfragen. Kurz warten und Status erneut prüfen.`,`Too many requests. Wait briefly and refresh the status.`),TRUST_READY:t(`Öffentliche Prüfschlüssel sind eingerichtet.`,`Public verification keys are configured.`),TRUST_MISSING:t(`Keine aktiven Prüfschlüssel. Eine freigegebene öffentliche JSON-Datei importieren oder die OS-Vertrauensdatei durch den zuständigen Administrator einrichten lassen.`,`No active verification keys. Import an approved public JSON file or have the responsible administrator configure the OS trust file.`),TRUST_IMPORT_UNKNOWN_KEY:t(`Mindestens ein Schlüssel ist nicht freigegeben. Es wurde nichts übernommen. Der Aussteller benötigt eine autorisierte OS-Bereitstellung oder eine neue Herstellerfreigabe im Adapter.`,`At least one key is not approved. Nothing was imported. The issuer requires authorized OS provisioning or a new manufacturer approval in the adapter.`),TRUST_KEY_CONFLICT:t(`Eine Schlüssel-ID bezeichnet unterschiedliche Schlüssel. Es wurde nichts übernommen. Mit dem Aussteller die passende Datei prüfen; vorhandene Schlüssel nicht löschen.`,`A key ID refers to different keys. Nothing was imported. Check the correct file with the issuer; do not delete existing keys.`),TRUST_INVALID:t(`Ungültige öffentliche Schlüsseldatei. Erwartet wird eine JSON-Zuordnung von Schlüssel-ID zu öffentlichem Ed25519-SPKI-PEM, ohne Zusatzfelder.`,`Invalid public key file. Expected JSON mapping key IDs to public Ed25519 SPKI PEM values, without extra fields.`),TRUST_PRIVATE_MATERIAL:t(`Privater Schlüssel oder Tresor erkannt. Diese Datei gehört ausschließlich in den Key-Generator und wird nicht an EOS übertragen.`,`Private key or vault detected. This file belongs only in the key generator and is not sent to EOS.`),TRUST_FILE_SIZE:t(`Die öffentliche JSON-Datei muss 1 bis 32768 Byte enthalten, mit höchstens 32 Schlüsseln.`,`The public JSON file must contain 1 to 32768 bytes, with at most 32 keys.`),TRUST_FILE_MISSING:t(`Die konfigurierte OS-Vertrauensdatei fehlt. Den zuständigen Administrator die Datei wiederherstellen lassen; anschließend erneut prüfen.`,`The configured OS trust file is missing. Ask the responsible administrator to restore it, then recheck.`),TRUST_READ_DENIED:t(`Die OS-Vertrauensdatei ist nicht lesbar. Leserechte und Eigentümer durch den zuständigen Administrator prüfen lassen; anschließend erneut prüfen.`,`The OS trust file cannot be read. Ask the responsible administrator to check read access and ownership, then recheck.`),TRUST_KEY_LIMIT:t(`Zusammen wären mehr als 32 Prüfschlüssel aktiv. Mit dem Aussteller einen zulässigen Schlüsselbestand planen; vorhandene Schlüssel nicht unkontrolliert entfernen.`,`More than 32 verification keys would be active. Plan an allowed key set with the issuer; do not remove existing keys without review.`),TRUST_RELEASE_METADATA:t(`Die Herstellerfreigaben dieser Adapterversion sind ungültig. Das geprüfte Adapterpaket wiederherstellen und den Service kontaktieren.`,`Manufacturer approvals in this adapter release are invalid. Restore the verified adapter package and contact support.`),TRUST_STARTING:t(`Die Prüfschlüsselverwaltung wird noch gestartet. Kurz warten und den Status erneut prüfen.`,`Verification key management is still starting. Wait briefly and refresh the status.`),SERVICE_DIRECTORY:t(`Das geschützte Datenverzeichnis ist nicht verfügbar. Einrichtung, Rechte und Sicherung mit dem Service prüfen; keine Dateien löschen.`,`The protected data directory is unavailable. Check setup, permissions and backup with support; do not delete files.`),TRUST_PERMISSIONS:t(`OS-Vertrauensdatei oder Pfadrechte sind unsicher. Den zuständigen Administrator die Eigentümer und Schreibrechte prüfen lassen; anschließend erneut prüfen.`,`The OS trust file or path permissions are unsafe. Ask the responsible administrator to check ownership and write permissions, then recheck.`),LICENSE_RESPONSE:t(`Die Serverantwort konnte nicht bestätigt werden. Status erneut prüfen; bei Wiederholung den Fehlercode an den Service geben.`,`The server response could not be confirmed. Refresh the status; contact support with the code if repeated.`),TRUST_RESPONSE:t(`Die Prüfschlüssel-Antwort konnte nicht bestätigt werden. Status erneut prüfen und bei Wiederholung den Service kontaktieren.`,`The verification key response could not be confirmed. Refresh the status and contact support if repeated.`),SERVICE_TIMEOUT:t(`Zeitüberschreitung. Der aktuelle Status ist unbestätigt; eine gespeicherte Lizenz wurde dadurch nicht als ungültig erkannt. Verbindung prüfen und Status aktualisieren.`,`Request timed out. The current status is unconfirmed; this does not identify a stored license as invalid. Check the connection and refresh.`),SERVICE_STALE:t(`Die Lizenzprüfung ist nicht aktuell. Dienstzustand prüfen und den Status neu abrufen.`,`The license check is not current. Check service health and refresh the status.`),SERVICE_UNAVAILABLE:t(`Lizenzverwaltung derzeit nicht bereit. Verbindung, Dienstzustand und Prüfschlüssel prüfen; anschließend Status aktualisieren.`,`License management is not ready. Check the connection, service health and verification keys, then refresh.`)};return n[e]?n[e]:e.startsWith(`STORAGE_`)?t(`Der geschützte Lizenzspeicher konnte nicht sicher gelesen oder geschrieben werden. Datenverzeichnis, Rechte und vollständige Sicherung mit dem Service prüfen. Keine Speicherdateien löschen; anschließend erneut prüfen.`,`The protected license store could not be read or written safely. Check the data directory, permissions and complete backup with support. Do not delete store files; then recheck.`):e.startsWith(`TRUST_`)?t(`Die Prüfschlüssel konnten nicht sicher geladen werden. Öffentliche Datei, Freigabe und OS-Dateirechte prüfen; anschließend „Erneut prüfen“ wählen.`,`Verification keys could not be loaded safely. Check the public file, approval and OS file permissions, then choose Recheck.`):t(`Anfrage nicht bestätigt. Den angezeigten Fehlercode mit dem Service prüfen und den Status erneut abrufen.`,`Request unconfirmed. Check the displayed error code with support and refresh the status.`)},ne=async(e,n,i)=>{if(S.current)return;let o=new AbortController;S.current=o,l(!0),y(``),_(``),r(null),a(null);let s=()=>w.current&&S.current===o&&!o.signal.aborted;try{let c,l;if(e===`import`||e===`recheck`){if(e===`import`&&!i)throw Error(`TRUST_INVALID`);let t=i?await uu(i):void 0;if(!s())return;let n=await gu(e,o.signal,t);c=n.license,l=n.trust}else{if(e===`export`){let e=await _u(o.signal);if(!s())return;let t=URL.createObjectURL(new Blob([`${JSON.stringify(e,null,2)}\n`],{type:`application/json`})),n=document.createElement(`a`);n.href=t,n.download=`nexowatt-license-public-trust.json`,document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}[c,l]=await Promise.all([mu(e===`activate`||e===`remove`?e:`status`,o.signal,n),hu(o.signal)])}if(!s())return;if(c.valid&&!l.ready)throw Error(l.code);r(c),a(l),e===`activate`&&_(c.coreEnabled?t(`EOS-Systemlizenz geprüft und verschlüsselt gespeichert. Die gemeinsame Aktivierung gilt auch nach Neustarts.`,`EOS system license verified and stored encrypted. The shared activation persists after restarts.`):t(`Lizenz gespeichert. Diese NWL2-Lizenz umfasst nur die signierten Erweiterungen und schaltet den EOS-Kern nicht frei.`,`License stored. This NWL2 license covers only its signed extensions and does not enable the EOS core.`)),e===`remove`&&_(t(`Lizenz entfernt.`,`License removed.`)),e===`import`&&_(t(`Freigegebene öffentliche Prüfschlüssel gespeichert; Lizenzstatus neu geprüft. Der gespeicherte Lizenzcode wurde nicht ersetzt.`,`Approved public verification keys stored and license status rechecked. The stored license code was not replaced.`)),e===`recheck`&&_(t(`Prüfschlüssel und Lizenzstatus neu eingelesen. Keine Dateien gelöscht.`,`Verification keys and license status reloaded. No files were deleted.`)),e===`export`&&_(t(`Nur öffentliche Prüfschlüssel als JSON exportiert. Dies ist keine Sicherung des privaten Key-Generator-Tresors.`,`Only public verification keys exported as JSON. This is not a backup of the private key generator vault.`))}catch(e){if(!w.current||S.current!==o||o.signal.aborted)return;o.abort(),r(null),a(null),y(au(e))}finally{S.current===o&&(S.current=null,w.current&&l(!1))}},E=P(ne);Xt(()=>(w.current=!0,E.current(`refresh`),()=>{var e;w.current=!1,(e=S.current)==null||e.abort(),S.current=null}),[]);let re={energy:t(`Energiemanagement`,`Energy management`),wallet:t(`Energie-Wertkonto`,`Energy wallet`),smartHome:`Smart Home`,microgridSlave:`Microgrid Slave`,microgridMaster:`Microgrid Master`,multisite:t(`Mehrere Standorte`,`Multiple sites`),billing:t(`Abrechnung`,`Billing`)},ie=[[t(`System-UUID`,`System UUID`),(n==null?void 0:n.uuid)||`–`],[t(`Edition`,`Edition`),(n==null?void 0:n.edition)===`home`?`EOS Home`:(n==null?void 0:n.edition)===`pro`?`EOS Pro`:`–`],[t(`Gültig bis`,`Valid until`),n!=null&&n.valid?n.expiresAt===null?t(`Dauerhaft`,`Perpetual`):new Date(n.expiresAt).toLocaleString():`–`],[t(`Ladepunkte / Speicher`,`Charge points / batteries`),n!=null&&n.valid?`${n.limits.chargePoints} / ${n.limits.batteries}`:`–`],[t(`Funktionen`,`Features`),(n==null?void 0:n.features.map(e=>re[e]||e).join(`, `))||`–`],[t(`Freigabe`,`Authorization`),n!=null&&n.valid?n.coreEnabled?t(`EOS-Kern freigegeben`,`EOS core enabled`):t(`Nur signierte Erweiterungen; EOS-Kern nicht freigegeben`,`Signed extensions only; EOS core not enabled`):`–`]],ae=e=>({os:t(`OS-Vertrauensdatei`,`OS trust file`),restored:t(`Lokal wiederhergestellte Kopie`,`Locally restored copy`),"os+restored":t(`OS-Vertrauensdatei und lokale Kopie`,`OS trust file and local copy`),release:t(`Herstellerfreigabe dieser Adapterversion`,`Manufacturer approval in this adapter release`),"release+os":t(`Herstellerfreigabe und OS-Vertrauensdatei`,`Manufacturer approval and OS trust file`)})[e]||e,D=v||(n==null?void 0:n.code),O=D?M(C,{severity:v||!(n!=null&&n.valid)?`warning`:`success`,role:v?`alert`:`status`,children:[T(`strong`,{children:D}),`: `,te(D)]}):null;return M(F,{sx:{height:`100%`,overflow:`auto`,p:3,boxSizing:`border-box`},"data-eos-license-panel":`1`,children:[M(an,{spacing:2,sx:{maxWidth:960,mx:`auto`},children:[T(L,{variant:`h5`,children:t(`NexoWatt EOS Lizenzverwaltung`,`NexoWatt EOS license management`)}),T(L,{children:t(`Eine gemeinsame Systemlizenz für Dashboard und Systemverwaltung. Einmalige Aktivierung nach der Erstanmeldung; keine zweite Lizenz pro Oberfläche.`,`One shared system license for the dashboard and system management. Activate once after the first sign-in; no separate license for each interface.`)}),T(ln,{variant:`outlined`,children:M(g,{children:[M(an,{direction:`row`,spacing:2,sx:{mb:2,alignItems:`center`,flexWrap:`wrap`},children:[T(L,{variant:`h6`,children:t(`Aktueller Status`,`Current status`)}),T(b,{label:c?t(`Wird geprüft …`,`Checking …`):n?te(n.code):t(`Status unbestätigt`,`Status unconfirmed`),color:n!=null&&n.valid&&!c?`success`:`default`})]}),O,T(F,{component:`dl`,sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,sm:`190px 1fr`},gap:1,"& dd":{m:0,overflowWrap:`anywhere`},"& dt":{fontWeight:600}},children:ie.map(([e,t])=>M(Ut.Fragment,{children:[T(F,{component:`dt`,children:e}),T(F,{component:`dd`,children:t})]},e))}),T(V,{"data-eos-license-refresh":`1`,disabled:c,onClick:()=>void ne(`refresh`),children:t(`Status aktualisieren`,`Refresh status`)})]})}),h?T(C,{severity:`success`,role:`status`,children:h}):null,M(Zt,{value:o,onChange:(e,t)=>s(t),variant:`scrollable`,scrollButtons:`auto`,"aria-label":t(`Lizenzverwaltung`,`License management`),children:[T(ye,{id:`eos-license-tab`,"aria-controls":`eos-license-content`,label:t(`Lizenz`,`License`)}),T(ye,{id:`eos-trust-tab`,"aria-controls":`eos-trust-content`,label:t(`Öffentliche Prüfschlüssel & Wiederherstellung`,`Public verification keys & recovery`)})]}),T(F,{role:`tabpanel`,id:`eos-license-content`,"aria-labelledby":`eos-license-tab`,hidden:o!==0,children:T(ln,{variant:`outlined`,children:M(g,{children:[T(L,{variant:`h6`,gutterBottom:!0,children:t(`Lizenz aktivieren`,`Activate license`)}),T(L,{sx:{mb:2},children:t(`Den für diese System-UUID ausgestellten NWL3-Lizenzcode einfügen. Bestehende NWL2-Lizenzen behalten ihren signierten Umfang. Die Prüfung und verschlüsselte Speicherung erfolgen auf dem Gerät.`,`Enter the NWL3 license code issued for this system UUID. Existing NWL2 licenses retain their signed scope. Verification and encrypted storage take place on this device.`)}),O,T(I,{id:`eos-license-code`,fullWidth:!0,multiline:!0,minRows:3,disabled:c,label:t(`Neuer Lizenzcode`,`New license code`),value:d,onChange:e=>f(e.target.value),autoComplete:`off`,sx:{mt:2},slotProps:{htmlInput:{maxLength:16384,spellCheck:!1}}}),M(an,{direction:{xs:`column`,sm:`row`},spacing:1,sx:{my:2},children:[T(V,{"data-eos-license-activate":`1`,variant:`contained`,disabled:c||!d.trim(),onClick:()=>{let e=d;f(``),ne(`activate`,e)},children:t(`Prüfen und aktivieren`,`Verify and activate`)}),T(V,{"data-eos-license-remove":`1`,color:`error`,disabled:c,onClick:()=>ee(!0),children:t(`Lizenz entfernen`,`Remove license`)})]}),T(L,{variant:`body2`,children:t(`Ein ungültiger Code ersetzt keine gültige Lizenz. Der gespeicherte Code wird nicht zurück angezeigt. Lizenzaktionen wirken sofort und benötigen kein „Speichern und schließen“.`,`An invalid code does not replace a valid license. Stored codes are never displayed. License actions take effect immediately and do not require Save & Close.`)})]})})}),T(F,{role:`tabpanel`,id:`eos-trust-content`,"aria-labelledby":`eos-trust-tab`,hidden:o!==1,children:M(an,{spacing:2,children:[T(ln,{variant:`outlined`,children:M(g,{children:[T(L,{variant:`h6`,gutterBottom:!0,children:t(`Aktive öffentliche Prüfschlüssel`,`Active public verification keys`)}),T(L,{children:i?`${i.code}: ${te(i.code)}`:t(`Prüfschlüsselstatus unbestätigt. Status aktualisieren.`,`Verification key status unconfirmed. Refresh the status.`)}),i==null?void 0:i.keys.map(e=>M(F,{sx:{my:2,overflowWrap:`anywhere`},children:[M(L,{component:`h3`,variant:`subtitle1`,children:[e.kid,` · `,ae(e.source)]}),M(L,{component:`code`,variant:`body2`,children:[`SHA-256: `,e.fingerprint]})]},e.kid)),T(L,{sx:{mt:2},children:t(`Eine lokale Kopie ersetzt keine Freigabe des Ausstellers. Nur Schlüssel mit passender Herstellerfreigabe oder gültiger OS-Vertrauensquelle werden akzeptiert.`,`A local copy does not replace issuer approval. Only keys matching manufacturer approval or a valid OS trust source are accepted.`)}),T(V,{disabled:c,onClick:()=>void ne(`recheck`),children:t(`Vertrauen und Lizenz erneut prüfen`,`Recheck trust and license`)}),T(V,{disabled:c||!(i!=null&&i.ready),onClick:()=>void ne(`export`),children:t(`Öffentliche Schlüssel exportieren`,`Export public keys`)})]})}),T(ln,{variant:`outlined`,children:M(g,{children:[T(L,{variant:`h6`,gutterBottom:!0,children:t(`Öffentliche JSON-Datei importieren`,`Import public JSON file`)}),T(L,{children:t(`Höchstens 32768 Byte und 32 öffentliche Ed25519-Schlüssel. Der Dateiname ist beliebig. Nur die flache Zuordnung Schlüssel-ID → PUBLIC KEY ist erlaubt. Ein unbekannter oder widersprüchlicher Schlüssel weist den gesamten Import zurück.`,`At most 32768 bytes and 32 public Ed25519 keys. Any filename is accepted. Only a flat key ID → PUBLIC KEY mapping is allowed. An unknown or conflicting key rejects the whole import.`)}),T(F,{component:`input`,type:`file`,disabled:c||!(i!=null&&i.canImport),"aria-label":t(`Öffentliche Schlüsseldatei`,`Public key file`),sx:{display:`block`,my:2,maxWidth:`100%`},onChange:e=>{var t;m(((t=e.target.files)==null?void 0:t[0])||null),e.target.value=``}}),T(L,{variant:`body2`,children:p?p.name:t(`Keine Datei ausgewählt.`,`No file selected.`)}),T(V,{variant:`contained`,disabled:c||!p||!(i!=null&&i.canImport),onClick:()=>{let e=p;m(null),e&&ne(`import`,void 0,e)},children:t(`Öffentliche Schlüssel prüfen und importieren`,`Verify and import public keys`)}),i&&!i.canImport?T(C,{severity:`warning`,sx:{mt:2},children:t(`Import derzeit nicht freigegeben. Angezeigten Prüfschlüsselstatus und OS-Vertrauenskonfiguration mit dem zuständigen Administrator prüfen.`,`Import is not currently allowed. Check the displayed verification key status and OS trust configuration with the responsible administrator.`)}):null,T(L,{variant:`h6`,sx:{mt:3},children:t(`Für Import zugelassene Schlüssel`,`Keys approved for import`)}),i==null?void 0:i.allowedKeys.map(e=>M(F,{sx:{my:2,overflowWrap:`anywhere`},children:[M(L,{children:[e.kid,` · `,ae(e.source)]}),M(L,{component:`code`,variant:`body2`,children:[`SHA-256: `,e.fingerprint]})]},e.kid)),T(L,{variant:`body2`,children:t(`Eine angezeigte Herstellerfreigabe allein aktiviert keinen Schlüssel. Ohne OS-Vertrauensdatei ist der ausdrückliche Import erforderlich.`,`A displayed manufacturer approval alone does not activate a key. Without an OS trust file, explicit import is required.`)})]})}),M(C,{severity:`info`,children:[T(`strong`,{children:t(`Key-Generator auf einem neuen PC`,`Key generator on a new PC`)}),T(`br`,{}),t(`Für die Wiederherstellung wird die verschlüsselte Sicherung des privaten Key-Generator-Tresors mit der zugehörigen Passphrase im Key-Generator benötigt. Tresor, private Schlüssel und Passphrase niemals in EOS hochladen. Die öffentliche JSON-Datei dient nur der Lizenzprüfung und kann den privaten Signierschlüssel nicht wiederherstellen.`,`Recovery requires the encrypted backup of the private key generator vault and its passphrase in the key generator. Never upload the vault, private keys or passphrase to EOS. The public JSON file serves only for license verification and cannot recover the private signing key.`)]})]})}),T(C,{severity:`info`,children:t(`Lizenzverwaltung, Diagnose und Sicherheitswartung bleiben ohne gültige Lizenz erreichbar. Angebundene Adapter prüfen ihre Freigabe zentral.`,`License management, diagnostics and security maintenance remain accessible without a valid license. Integrated adapters check their authorization centrally.`)})]}),M(u,{open:x,onClose:()=>ee(!1),children:[T(ve,{children:t(`Lizenz entfernen?`,`Remove license?`)}),T(le,{children:t(`Angebundene Adapter verlieren ihre Betriebsfreigabe. Stelle vorher den sicheren Anlagenzustand her.`,`Integrated adapters lose their operating authorization. Establish a safe plant state before continuing.`)}),M(St,{children:[T(V,{onClick:()=>ee(!1),children:t(`Abbrechen`,`Cancel`)}),T(V,{color:`error`,onClick:()=>{ee(!1),ne(`remove`)},children:t(`Entfernen`,`Remove`)})]})]})]})}x();var yu={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15,position:`relative`},tableContainer:{zIndex:100},table:{display:`flex`,flexDirection:`column`,width:`100%`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`},littleRow:{width:110},nameRow:{width:220},input:{width:`100%`}},bu=class e extends Ul{constructor(t){super(t),j(this,`onChangeText`,(t,n,r)=>{let i=H.clone(this.props.data),a=e.certToArray(i.native.certificates),o=a.find(e=>e.title===n);o&&(o[r]=t),i.native.certificates=e.arrayToCert(a),this.props.onChange(i)}),j(this,`onDelete`,t=>{let n=H.clone(this.props.data),r=e.certToArray(n.native.certificates),i=r.findIndex(e=>e.title===t);r.splice(i,1),n.native.certificates=e.arrayToCert(r),this.props.onChange(n)}),j(this,`onAdd`,(t,n)=>{let r=H.clone(this.props.data),i=e.certToArray(r.native.certificates),a=this.props.t(`certificate`);if(!t){for(let e=1;;e++)if(!i.find(t=>t.title===`${a}_${e}`)){t=`${a}_${e}`;break}}i.push({title:t||`__`,data:n||``}),r.native.certificates=e.arrayToCert(i),this.props.onChange(r)}),this.state={chClass:!1}}static certToArray(e){return H.objectMap(e,(e,t)=>({title:t,data:e}))}static arrayToCert(e){let t={};return e.forEach(e=>{t[e.title]=e.data}),t}static detectType(e){return e=e.toLowerCase(),e.includes(`public`)||e.includes(`cert`)?`public`:e.includes(`priv`)||e.includes(`key`)?`private`:e.includes(`chain`)||e.includes(`ca`)?`chained`:``}render(){let t=e.certToArray(this.props.data.native.certificates).map((t,n)=>{let r=e.detectType(t.title);return M(Ze,{className:`float_row`,children:[T(B,{style:yu.littleRow,className:`float_cell`,children:n+1}),T(B,{style:yu.nameRow,className:`float_cell`,children:T(I,{disabled:this.props.saving,variant:`standard`,value:t.title,style:yu.input,className:`xs-centered`,onChange:e=>this.onChangeText(e.target.value,t.title,`title`),error:!r,helperText:r||A.t(`Unknown type: use in name "private", "public" or "chained" to define the certificate type`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t.title?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText(``,t.title,`title`),children:T(O,{})})}):null}}})}),T(B,{className:`grow_cell float_cell`,children:T(I,{disabled:this.props.saving,variant:`standard`,id:`default_${n}`,value:t.data,style:yu.input,className:`xs-centered`,onChange:e=>{let n=e.target.value.replace(/\r/g,``).replace(/\n/g,``);if(n.startsWith(`--`)){let e=n.split(`-----`);e[2]=e[2].replace(/\s/g,``),n=`-----${e[1]}-----\r\n${e[2]}\r\n-----${e[3]}-----`}this.onChangeText(n,t.title,`data`)},slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t.data?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,size:`small`,tabIndex:-1,onClick:()=>this.onChangeText(``,t.title,`data`),children:T(O,{})})}):null}}})}),T(B,{style:yu.littleRow,className:`float_cell`,children:T(Se,{disabled:this.props.saving,size:`small`,color:`secondary`,"aria-label":`add`,onClick:()=>this.onDelete(t.title),children:T(te,{})})})]},n)});return M(`div`,{style:yu.tabPanel,children:[T(wt,{noClick:!0,disabled:this.props.saving,multiple:!0,children:({getRootProps:e,getInputProps:t,acceptedFiles:n,fileRejections:r})=>T(`div`,{...e({className:this.state.chClass?`drop-container drop-dop`:`drop-container`,onDragEnter:()=>this.setState({chClass:!0}),onDragLeave:()=>this.setState({chClass:!1}),onDrop:()=>{if(!this.props.saving){if(r.length){let e=[];r.forEach(t=>{let n=`${t.file.name}: `,r=[];t.errors.forEach(e=>r.push(e.message)),e.push(n+r.join(`,`))}),alert(e.join(`, `))}n.length?n.forEach(e=>{let t=new FileReader;t.onload=t=>{var n;return this.onAdd(e.name,(n=t.target)==null?void 0:n.result)},t.readAsText(e)}):r.length||alert(this.props.t(`No files exists`)),this.setState({chClass:!1})}}}),children:T(`input`,{...t()})})}),M(`div`,{style:yu.buttonPanel,children:[T(Se,{disabled:this.props.saving,size:`small`,className:`small_size`,color:`primary`,"aria-label":`add`,onClick:()=>this.onAdd(),children:T(h,{})}),T(Ot,{variant:`outlined`,style:yu.descriptionPanel,children:this.props.t(`certs_hint`)})]}),T(jt,{style:yu.tableContainer,children:M(i,{style:yu.table,"aria-label":`customized table`,children:[T(Jt,{children:M(Ze,{className:`float_row`,children:[T(B,{style:yu.littleRow,className:`float_cell`,children:` `}),T(B,{style:yu.nameRow,className:`float_cell`,children:this.props.t(`name`)}),T(B,{className:`grow_cell float_cell`,children:this.props.t(`Certificate`)}),T(B,{style:yu.littleRow,className:`float_cell`,children:` `})]})}),T(ft,{children:t})]})})]})}},xu=`system.credentials.`,Su=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],Cu={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]};function wu(e){return typeof e.form==`string`&&Cu[e.form]?e.form:e.key===void 0?`login`:`key`}var Tu={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,deepseek:`M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function Eu(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}var Du={anthropic:Eu(Tu.anthropic,`#d97757`),chatgpt:Eu(Tu.chatgpt,`#74aa9c`),gemini:Eu(Tu.gemini,`#8e75b2`),deepseek:Eu(Tu.deepseek,`#5786FE`),email:Eu(Tu.email,`#2196f3`),login:Eu(Tu.login,`#9e9e9e`),key:Eu(Tu.key,`#ffc107`),aws:Eu(Tu.aws,`#ff9900`),azure:Eu(Tu.azure,`#0089d6`)},Ou=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_AI_MAX_TOKENS=e.MIN_AI_MAX_TOKENS=e.DEFAULT_AI_MAX_TOKENS=e.AI_MODELS_TIMEOUT_MS=e.MIN_AI_REQUEST_TIMEOUT_MS=e.MAX_AI_REQUEST_TIMEOUT_MS=void 0,e.resolveRequestTimeout=t,e.resolveMaxTokens=n,e.MAX_AI_REQUEST_TIMEOUT_MS=6e5,e.MIN_AI_REQUEST_TIMEOUT_MS=1e3,e.AI_MODELS_TIMEOUT_MS=3e4,e.DEFAULT_AI_MAX_TOKENS=8192,e.MIN_AI_MAX_TOKENS=1024,e.MAX_AI_MAX_TOKENS=2e5;function t(t){let n=parseInt(t,10);return isNaN(n)||n<=0?e.MAX_AI_REQUEST_TIMEOUT_MS:Math.min(Math.max(n,e.MIN_AI_REQUEST_TIMEOUT_MS),e.MAX_AI_REQUEST_TIMEOUT_MS)}function n(t){let n=parseInt(t,10);return isNaN(n)||n<=0?e.DEFAULT_AI_MAX_TOKENS:Math.min(Math.max(n,e.MIN_AI_MAX_TOKENS),e.MAX_AI_MAX_TOKENS)}}))(),ku=`system.ai`,Au={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15,position:`relative`},buttonPanel:{paddingBottom:20,display:`flex`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`,padding:`0 8px`},littleRow:{width:170,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},iconRow:{width:40},actionsRow:{width:110,whiteSpace:`nowrap`},input:{width:`100%`},field:{width:`100%`,marginBottom:16},templateItem:{display:`flex`,alignItems:`center`,gap:8}},ju=20,Mu=/^script\.[^.]+\./;function Nu(e){return T(`img`,{src:e.src,width:ju,height:ju,alt:``})}async function X(e){if(Du[e])return Du[e];if(e===`iobroker.pro`||e===`iobroker.net`)try{let e=await(await fetch(nl)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}catch(e){console.error(`Cannot read ioBroker logo: ${e}`)}}var Pu={anthropic:{label:`Anthropic`,icon:T(Nu,{src:Du.anthropic}),form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:T(Nu,{src:Du.chatgpt}),form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:T(Nu,{src:Du.gemini}),form:`key`,type:`ai`,name:`gemini`},deepseek:{label:`DeepSeek`,icon:T(Nu,{src:Du.deepseek}),form:`key`,type:`ai`,name:`deepseek`},aws:{label:`AWS`,icon:T(Nu,{src:Du.aws}),form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:T(Nu,{src:Du.azure}),form:`azure`,type:`azure`,name:`azure`},email:{label:`credential_type_email`,translate:!0,icon:T(Nu,{src:Du.email}),form:`login`,type:`email`},"iobroker.pro":{label:`iobroker.pro`,icon:T(Nu,{src:nl}),form:`login`,type:`cloud`,name:`iobroker-pro`,fixedName:!0},"iobroker.net":{label:`iobroker.net`,icon:T(Nu,{src:nl}),form:`login`,type:`cloud`,name:`iobroker-net`,fixedName:!0},login:{label:`Login/password`,translate:!0,icon:T(Nu,{src:Du.login}),form:`login`,type:null},key:{label:`Key`,translate:!0,icon:T(Nu,{src:Du.key}),form:`key`,type:null}},Fu={email:T(wr,{fontSize:`small`}),cloud:T(br,{fontSize:`small`}),ai:T(Ur,{fontSize:`small`}),aws:T(Nu,{src:Du.aws}),azure:T(Nu,{src:Du.azure}),custom:T(qt,{fontSize:`small`})};function Iu(e){var t;if(typeof((t=e.common)==null?void 0:t.icon)==`string`&&e.common.icon)return T(Nu,{src:e.common.icon});let n=Object.values(Pu).find(t=>t.name&&e._id===`system.credentials.${t.name}`);return n?n.icon:e.native.type===`email`?T(wr,{fontSize:`small`}):wu(e.native)===`key`?T(be,{fontSize:`small`}):T(Ht,{fontSize:`small`})}function Lu(e){let t=/\bSECRETS\s*\??\s*(?:\.\s*([A-Za-z_$][\w$]*)|\[\s*(['"`])([^'"`]+)\2\s*\])/g,n=new Set,r=t.exec(e);for(;r;)n.add(r[1]||r[3]),r=t.exec(e);return[...n]}var Ru=class e extends Ul{constructor(e){super(e),this.state={editIndex:null,addOpen:!1,addTemplate:`login`,addType:`email`,addName:``,deleteIndex:null,usage:{},visibleSecrets:{}}}componentDidMount(){this.detectUsage()}componentDidUpdate(e,t){t.editIndex!==this.state.editIndex&&Object.keys(this.state.visibleSecrets).length&&this.setState({visibleSecrets:{}})}async detectUsage(){let e={},t=(t,n)=>{e[t]=e[t]||[],e[t].push(n)},n={};try{(await this.props.socket.getAdapterInstances(!0)).forEach(e=>{var r;let i=(r=e.common)==null?void 0:r.icon;i&&!i.startsWith(`data:image`)&&!i.includes(`/`)&&(i=`adapter/${e.common.name}/${i}`),i&&(n[e._id.replace(`system.adapter.`,``)]=i);let a=JSON.stringify(e.native||{}).match(/system\.credentials\.[0-9A-Za-z_.-]+/g);if(a){let n=e._id.replace(`system.adapter.`,``);[...new Set(a)].forEach(e=>t(e,{instance:n,key:n,icon:i}))}})}catch(e){console.error(`Cannot read instances: ${e}`)}try{let e=await this.props.socket.getObjectViewSystem(`script`,`script.`,`script.香`);Object.values(e).forEach(e=>{var r,i;let a=e==null||(r=e.common)==null?void 0:r.source;if(!a||typeof a!=`string`)return;let o=(((i=e.common)==null?void 0:i.engine)||``).replace(`system.adapter.`,``);Lu(a).forEach(r=>t(`${xu}${r}`,{instance:e._id.replace(Mu,``),key:e._id,icon:n[o],title:e._id}))})}catch(e){console.error(`Cannot read scripts: ${e}`)}try{var r;let e=await this.props.socket.getObject(ku),n=e==null||(r=e.native)==null?void 0:r.credentialId;typeof n==`string`&&n.startsWith(`system.credentials.`)&&t(n,{instance:this.props.t(`AI assistant`),key:ku,icon:`img/admin.svg`})}catch{}this.setState({usage:e})}onChangeCredential(e,t){let n=H.clone(this.props.data);n[e]=t,this.props.onChange(n)}getTemplateLabel(e){let t=Pu[e];return t.translate?this.props.t(t.label):t.label}async onAdd(){let e=Pu[this.state.addTemplate],t=e.type||this.state.addType,n=`${xu}${((e.fixedName?e.name:this.state.addName.trim())||``).replace(Pe.FORBIDDEN_CHARS,`_`)}`,r=Cu[e.form],i={type:t,form:e.form,version:1,encryptedFields:r.filter(e=>e.encrypted).map(e=>e.name)};r.forEach(e=>{i[e.name]=``});let a={_id:n,type:`config`,common:{name:e.fixedName?this.getTemplateLabel(this.state.addTemplate):this.state.addName.trim(),icon:await X(this.state.addTemplate)},native:i,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}},o=H.clone(this.props.data);o.push(a),this.setState({addOpen:!1,editIndex:o.length-1},()=>this.props.onChange(o))}onDelete(e){let t=H.clone(this.props.data);t.splice(e,1),this.setState({deleteIndex:null},()=>this.props.onChange(t))}static getName(e){var t;let n=(t=e.common)==null?void 0:t.name;return n&&typeof n==`object`?n.en||Object.values(n)[0]||``:n||``}renderVisibilityButton(e,t){let n=!!this.state.visibleSecrets[e];return T(z,{position:`end`,children:T(k,{tabIndex:-1,size:`small`,edge:`end`,disabled:t||this.props.saving,"aria-label":this.props.t(n?`Hide password`:`Show password`),title:this.props.t(n?`Hide password`:`Show password`),onClick:()=>this.setState({visibleSecrets:{...this.state.visibleSecrets,[e]:!n}}),children:T(n?gt:Xe,{})})})}renderTypedField(e,t,n,r){let i=e.native[t.name];if(t.type===`select`){let r=i==null?``:String(i),a=t.options?[...t.options]:[];return r&&!a.find(e=>e.value===r)&&a.unshift({value:r}),T(I,{id:`credential_${t.name}`,select:!0,variant:`standard`,style:Au.field,label:this.props.t(t.label),value:r,disabled:this.props.saving,required:t.required,error:t.required&&!r,slotProps:{inputLabel:{shrink:!0}},onChange:r=>{let i=H.clone(e);i.native[t.name]=r.target.value,this.onChangeCredential(n,i)},children:a.map(e=>T(Lt,{value:e.value,children:e.label||e.value},e.value))},t.name)}let a=t.type===`password`,o=a&&!this.state.visibleSecrets[t.name];return T(I,{id:`credential_${t.name}`,variant:`standard`,style:Au.field,type:`text`,label:this.props.t(t.label),value:i??``,disabled:this.props.saving,required:t.required,error:t.required&&!i,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,style:o?sr:void 0},input:a?{endAdornment:this.renderVisibilityButton(t.name,!i||i===`__SOME_PASSWORD__`)}:void 0},onChange:r=>{let i=H.clone(e);i.native[t.name]=r.target.value,this.onChangeCredential(n,i)},onFocus:a&&i===`__SOME_PASSWORD__`?e=>e.target.select():void 0,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),r){var t;(t=document.getElementById(`credential_${r}`))==null||t.focus()}else this.setState({editIndex:null})}}},t.name)}renderEditDialog(){if(this.state.editIndex===null)return null;let t=this.state.editIndex,n=this.props.data[t];if(!n)return null;let r=Cu[wu(n.native)];return M(u,{open:!0,maxWidth:`md`,fullWidth:!0,onClose:()=>this.setState({editIndex:null}),children:[T(ve,{children:`${this.props.t(`Edit credential`)}: ${n._id}`}),M(le,{children:[T(I,{variant:`standard`,style:Au.field,label:this.props.t(`Display name`),value:e.getName(n),disabled:this.props.saving,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>{let r=H.clone(n);r.common.name=e.target.value,this.onChangeCredential(t,r)},onKeyDown:e=>{if(e.key===`Enter`){var t;e.preventDefault(),(t=document.getElementById(`credential_${r[0].name}`))==null||t.focus()}}}),r.map((e,i)=>{var a;return this.renderTypedField(n,e,t,((a=r[i+1])==null?void 0:a.name)||null)})]}),T(St,{children:T(V,{variant:`contained`,color:`primary`,startIcon:T(Ne,{}),onClick:()=>this.setState({editIndex:null}),children:this.props.t(`Ok`)})})]})}getAvailableTemplates(){return Object.keys(Pu).filter(e=>{let t=Pu[e];if(!t.fixedName)return!0;let n=`${xu}${t.name}`;return!this.props.data.find(e=>e._id===n)})}renderAddDialog(){if(!this.state.addOpen)return null;let e=Pu[this.state.addTemplate],t=e.type||this.state.addType,n=(e.fixedName?e.name:this.state.addName.trim())||``,r=`${xu}${n.replace(Pe.FORBIDDEN_CHARS,`_`)}`,i=n&&this.props.data.find(e=>e._id===r)?this.props.t(`A credential with this name already exists`):``;return M(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1}),children:[T(ve,{children:this.props.t(`Add credential`)}),M(le,{children:[M(p,{variant:`standard`,style:Au.field,children:[T(D,{shrink:!0,children:this.props.t(`Template`)}),T(Bt,{variant:`standard`,value:this.state.addTemplate,onChange:e=>this.setState({addTemplate:e.target.value,addName:Pu[e.target.value].name||``}),children:this.getAvailableTemplates().map(e=>T(Lt,{value:e,children:M(`span`,{style:Au.templateItem,children:[Pu[e].icon,this.getTemplateLabel(e)]})},e))})]}),M(p,{variant:`standard`,style:Au.field,children:[T(D,{shrink:!0,children:this.props.t(`Credential type`)}),T(Bt,{variant:`standard`,value:t,disabled:!!e.type,onChange:e=>this.setState({addType:e.target.value}),children:Su.map(e=>T(Lt,{value:e,children:M(`span`,{style:Au.templateItem,children:[Fu[e],this.props.t(`credential_type_${e}`)]})},e))})]}),T(I,{variant:`standard`,style:Au.field,label:this.props.t(`Unique name`),value:e.fixedName?e.name:this.state.addName,disabled:!!e.fixedName,error:!!i,helperText:i||(n?r:``),slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&n&&!i&&(e.preventDefault(),this.onAdd())}})]}),M(St,{children:[T(V,{variant:`contained`,color:`primary`,disabled:!n||!!i,startIcon:T(Ne,{}),onClick:()=>void this.onAdd(),children:this.props.t(`Create`)}),T(V,{variant:`contained`,color:`grey`,startIcon:T(O,{}),onClick:()=>this.setState({addOpen:!1}),children:this.props.t(`Cancel`)})]})]})}renderDeleteDialog(){if(this.state.deleteIndex===null)return null;let e=this.props.data[this.state.deleteIndex],t=this.state.usage[e._id];return T(Qt,{title:this.props.t(`Delete credential`),text:this.props.t(`Really delete credential %s?`,e._id)+(t?` ${this.props.t(`This credential is used by`)}: ${t.map(e=>e.instance).join(`, `)}`:``),onClose:e=>{e?this.state.deleteIndex!==null&&this.onDelete(this.state.deleteIndex):this.setState({deleteIndex:null})}})}render(){let t=this.props.data.map((t,n)=>{let r=this.state.usage[t._id];return M(Ze,{children:[T(B,{style:Au.iconRow,children:Iu(t)}),T(B,{style:Au.littleRow,title:this.props.t(`credential_type_${t.native.type}`),children:this.props.t(`credential_type_${t.native.type}`)}),T(B,{children:t._id.substring(xu.length)}),T(B,{children:e.getName(t)}),T(B,{children:r?T(`span`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:r.map(e=>M(`span`,{style:Au.templateItem,title:e.title,children:[e.icon?T(`img`,{src:e.icon,width:ju,height:ju,alt:``}):null,e.instance]},e.key))}):null}),M(B,{style:Au.actionsRow,children:[T(k,{disabled:this.props.saving,onClick:()=>this.setState({editIndex:n}),children:T($e,{})}),T(k,{disabled:this.props.saving,onClick:()=>this.setState({deleteIndex:n}),children:T(te,{})})]})]},t._id)});return M(`div`,{style:Au.tabPanel,children:[M(`div`,{style:Au.buttonPanel,children:[T(Se,{disabled:this.props.saving,size:`small`,className:`small_size`,color:`primary`,"aria-label":`add`,onClick:()=>this.setState({addOpen:!0,addName:``,addTemplate:`login`}),children:T(h,{})}),T(Ot,{variant:`outlined`,style:Au.descriptionPanel,children:this.props.t(`credentials_hint`)})]}),T(jt,{children:M(i,{"aria-label":`credentials table`,style:{tableLayout:`fixed`,width:`100%`},children:[T(Jt,{children:M(Ze,{children:[T(B,{style:Au.iconRow,children:` `}),T(B,{style:Au.littleRow,children:this.props.t(`Credential type`)}),T(B,{children:this.props.t(`ID`)}),T(B,{children:this.props.t(`Name`)}),T(B,{children:this.props.t(`Used by`)}),T(B,{style:Au.actionsRow,children:` `})]})}),T(ft,{children:t})]})}),this.renderEditDialog(),this.renderAddDialog(),this.renderDeleteDialog()]})}},zu=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChatModel=n;var t=`embedding.text-embedding.textembedding.embeddinggemma.embed-.-embed.bge-.mxbai-embed.nomic-embed.arctic-embed.snowflake-arctic-embed.all-minilm.multilingual-e5.jina-embed.voyage-.gecko.paraphrase-multilingual.dall-e.gpt-image.image-edit.-image-preview.-image-latest.flash-image.nano-banana.stable-diffusion.sdxl.midjourney.flux-.imagen.sora.veo-.cogvideo.runway-.lumiere.lyria.whisper.tts-.-tts.speech-.audio-preview.mini-tts.mini-transcribe.-transcribe.native-audio.flash-live.gpt-audio.realtime.bark-.xtts.voicebox.moderation.omni-moderation.llama-guard.shieldgemma.prompt-guard.-guardian.safeguard.rerank.reranker.babbage-.davinci-.curie-.text-ada-.text-davinci.text-curie.text-babbage.instructgpt.code-davinci.code-cushman.-turbo-instruct.-search-preview.-search-api.code-search.text-search.similarity-.computer-use-preview.deep-research.robotics.aqa.reader-lm.-nsql.minicheck`.split(`.`);function n(e){let n=e.toLowerCase();return!(t.some(e=>n.includes(e))||n.startsWith(`claude-1`)||n.startsWith(`claude-instant`))}}))(),Bu=`pushedAnswer`,Vu=6e5,Hu=new Map,Uu=new Map,Wu=0;function Gu(){Hu.clear(),Uu.clear()}async function Ku(e,t){let n=Hu.get(t);if(n)return n;let r=Uu.get(t);return r||(r=(async()=>{let n={session:``,pending:new Map};try{let r=await e.subscribeOnInstance(t,Bu,null,e=>{let t=e;if(!(t!=null&&t.requestId))return;let r=n.pending.get(t.requestId);r&&(n.pending.delete(t.requestId),r(t))});return n.session=r.session||``,!(r!=null&&r.accepted)||!n.session?null:(e.registerConnectionHandler(function t(n){n||(e.unregisterConnectionHandler(t),Gu())}),Hu.set(t,n),n)}catch(e){return console.warn(`[push] cannot subscribe for pushed answers, falling back to the callback`,e),null}finally{Uu.delete(t)}})(),Uu.set(t,r)),r}async function qu(e,t,n,r,i=Vu){let a=await Ku(e,t),o=a?`req-${++Wu}-${Date.now().toString(36)}`:``,s=await e.sendTo(t,n,{...r,timeout:i,...a?{uiSession:a.session,requestId:o}:{}});return!a||!(s!=null&&s.accepted)?s:new Promise(e=>{let t=setTimeout(()=>{a.pending.delete(o),Gu(),e({error:A.t(`No answer within %s s`,String(Math.round(i/1e3)))})},i);a.pending.set(o,n=>{clearTimeout(t),e(n)})})}function Ju(e){let t=e.provider.icon||Du.key,[n,r]=R(e.provider.credentialName),[i,a]=R(``),[o,s]=R(!1),c=n.trim().replace(Pe.FORBIDDEN_CHARS,`_`),l=`${xu}${c}`,d=!!c&&e.existingIds.includes(l),f=!!c&&!d&&!!i.trim(),p=()=>{if(!f)return;let n=Cu.key;e.onClose({_id:l,type:`config`,common:{name:c,icon:t},native:{type:`ai`,form:`key`,version:1,encryptedFields:n.filter(e=>e.encrypted).map(e=>e.name),key:i.trim()},acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}})};return M(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>e.onClose(),children:[T(ve,{children:A.t(`Add credential`)}),M(le,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8},children:[T(I,{variant:`standard`,fullWidth:!0,label:A.t(`Unique name`),value:n,error:d,helperText:d?A.t(`A credential with this name already exists`):c?l:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`},input:{startAdornment:T(z,{position:`start`,children:T(nt,{src:t,style:{width:20,height:20}})})}},onChange:e=>r(e.target.value)}),T(I,{variant:`standard`,fullWidth:!0,type:`text`,required:!0,label:A.t(`API key`),value:i,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,style:o?void 0:sr},input:{endAdornment:T(z,{position:`end`,children:T(k,{tabIndex:-1,size:`small`,edge:`end`,disabled:!i,"aria-label":A.t(o?`Hide password`:`Show password`),title:A.t(o?`Hide password`:`Show password`),onClick:()=>s(!o),children:T(o?gt:Xe,{})})})}},onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f&&(e.preventDefault(),p())}})]}),M(St,{children:[T(V,{variant:`contained`,color:`primary`,disabled:!f,startIcon:T(Ne,{}),onClick:p,children:A.t(`Create`)}),T(V,{color:`grey`,startIcon:T(O,{}),onClick:()=>e.onClose(),children:A.t(`Cancel`)})]})]})}var Yu=[{value:`openai`,label:`OpenAI (ChatGPT)`,icon:Du.chatgpt,credentialName:`chatgpt`,keyUrl:`https://platform.openai.com/api-keys`},{value:`anthropic`,label:`Anthropic (Claude)`,icon:Du.anthropic,credentialName:`anthropic`,keyUrl:`https://console.anthropic.com/settings/keys`},{value:`gemini`,label:`Google Gemini`,icon:Du.gemini,credentialName:`gemini`,keyUrl:`https://aistudio.google.com/apikey`},{value:`deepseek`,label:`DeepSeek`,icon:Du.deepseek,credentialName:`deepseek`,keyUrl:`https://platform.deepseek.com/api_keys`},{value:`custom`,label:`Custom (OpenAI-compatible)`,credentialName:`custom`}];function Xu(e){return Yu.find(t=>t.value===e)}var Zu=`tabAi`,Qu=[{value:``,label:`Endpoint default`},{value:`none`,label:`Off (local models)`},{value:`minimal`,label:`Minimal`},{value:`low`,label:`Low`},{value:`medium`,label:`Medium`},{value:`high`,label:`High`}],$u=20,ed={tabPanel:{width:`100%`,height:`100%`,overflow:`auto`,overflowX:`hidden`,padding:15,boxSizing:`border-box`},content:{maxWidth:960,display:`flex`,flexDirection:`column`,gap:16},providerTitle:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},row:{display:`flex`,flexWrap:`wrap`,alignItems:`flex-start`,columnGap:8,rowGap:4},field:{flex:`1 1 220px`,minWidth:0},rowButton:{marginTop:12},credentialItem:{display:`flex`,alignItems:`center`,gap:8}};function td(){}function nd(e){let t=Xu(e.provider);return t?e.credentialId?t.value:t.value===`custom`&&e.baseUrl?`custom`:``:``}function rd(e){return e.info.icon?T(nt,{src:e.info.icon,style:{width:$u,height:$u}}):T(qt,{style:{width:$u,height:$u}})}function id(e){var t;let n=(t=e.common)==null?void 0:t.name;return typeof n==`string`&&n?n:e._id.replace(xu,``)}function ad(e){var t,n;let r=((t=e.data)==null?void 0:t.native)||{},i=e.dataAux||[],a=i.filter(e=>{var t;return((t=e.native)==null?void 0:t.type)===`ai`}),[o,s]=R([]),[c,l]=R(!1),[u,d]=R(``),[f,g]=R(``),[_,y]=R(null),b=P(0),x=nd(r),ee=Xu(x),S=e.saving,w=(t,n)=>e.onChange({...e.data,native:{...r,...t}},n||null,td),ne=e=>e===r.provider?{provider:e}:{provider:e,model:``},E=()=>{s([]),d(``),g(``),w({provider:``,credentialId:``,baseUrl:``,model:``})},re=a.find(e=>e._id===r.credentialId),ie=typeof(re==null||(n=re.native)==null?void 0:n.key)==`string`&&re.native.key!==`__SOME_PASSWORD__`?re.native.key:``,ae=!!x&&!!e.instance,O=()=>{if(!ae||!e.instance)return;let t=++b.current;l(!0),d(``),g(``),qu(e.socket,e.instance,`chat:testConnection`,{provider:x,credentialId:ie?``:r.credentialId,apiKey:ie||void 0,baseUrl:x===`custom`?r.baseUrl:``,allowSelfSignedCerts:!!r.allowSelfSignedCerts},6e4).then(n=>{if(t===b.current){if(n!=null&&n.error)d(n.error),s([]);else{let t=((n==null?void 0:n.models)||[]).filter(zu.isChatModel);s(t),g(e.t(`Connection OK: %s models`,String(t.length)))}}}).catch(e=>{t===b.current&&d(String(e))}).finally(()=>{t===b.current&&l(!1)})};Xt(()=>{if(!ae)return;let e=setTimeout(()=>O(),500);return()=>clearTimeout(e)},[x,r.credentialId,r.baseUrl,r.allowSelfSignedCerts,ie,e.instance]);let oe=t=>{let n=r.provider===t.value&&r.credentialId||``,i=!!n&&!a.find(e=>e._id===n),o=t.value===`custom`;return M(p,{variant:`standard`,style:ed.field,error:i,disabled:S,children:[T(D,{shrink:!0,children:e.t(`API key (credential)`)}),M(Bt,{value:n,displayEmpty:!0,onChange:e=>{let n=e.target.value;w(n?{...ne(t.value),credentialId:n}:{credentialId:``})},children:[T(Lt,{value:``,children:T(`em`,{children:e.t(`none`)})}),a.map(e=>{var t;return T(Lt,{value:e._id,children:M(`span`,{style:ed.credentialItem,children:[typeof((t=e.common)==null?void 0:t.icon)==`string`&&e.common.icon?T(nt,{src:e.common.icon,style:{width:$u,height:$u}}):null,id(e)]})},e._id)}),i?M(Lt,{value:n,children:[n.replace(xu,``),` (`,e.t(`Credential not found`),`)`]}):null]}),T(Ae,{children:i?e.t(`Credential not found`):t.keyUrl?T(`a`,{href:t.keyUrl,target:`_blank`,rel:`noreferrer`,style:{color:`inherit`},children:new URL(t.keyUrl).host}):o?e.t(`Optional`):null})]})},se=t=>{let n=t.value===`custom`,i=x===t.value;return M(`div`,{children:[M(L,{component:`div`,style:ed.providerTitle,children:[T(rd,{info:t}),t.label]}),M(`div`,{style:ed.row,children:[n?T(I,{variant:`standard`,style:ed.field,disabled:S,label:e.t(`Base URL`),placeholder:`http://127.0.0.1:11434/v1`,value:r.provider===`custom`&&r.baseUrl||``,slotProps:{inputLabel:{shrink:!0}},onChange:e=>w({...ne(`custom`),baseUrl:e.target.value})}):null,oe(t),T(Rt,{title:e.t(`Add credential`),children:T(`span`,{style:ed.rowButton,children:T(k,{disabled:S,onClick:()=>y(t),children:T(h,{})})})}),T(V,{variant:`outlined`,style:ed.rowButton,disabled:S||!i||!ae||c,startIcon:i&&c?T(v,{size:16}):T(m,{}),onClick:O,children:e.t(`Test`)}),i?T(Rt,{title:e.t(`Remove provider`),children:T(`span`,{style:ed.rowButton,children:T(k,{disabled:S,onClick:E,children:T(te,{})})})}):null]})]},t.value)};return M(`div`,{style:ed.tabPanel,children:[M(`div`,{style:ed.content,children:[T(L,{variant:`body2`,children:e.t(`Set up the AI once for the whole system. The AI assistant of admin uses these settings.`)}),ee?se(ee):Yu.map(e=>se(e)),ee?M(Me,{children:[T(C,{severity:`info`,children:e.t(`Only one AI provider can be active. To use another one, remove this one first.`)}),u?T(C,{severity:`error`,children:u}):null,f?T(C,{severity:`success`,children:f}):null,T(st,{freeSolo:!0,disabled:S,options:o,value:r.model||``,onInputChange:(e,t)=>{(t||``)!==(r.model||``)&&w({model:t||``})},renderInput:t=>T(I,{...t,variant:`standard`,label:e.t(`Model`),placeholder:`claude-..., gpt-...`})}),x===`custom`?T(je,{disabled:S,control:T(We,{checked:!!r.allowSelfSignedCerts,onChange:e=>w({allowSelfSignedCerts:e.target.checked})}),label:e.t(`Allow self-signed certificates`)}):null,x===`custom`||x===`openai`?M(p,{variant:`standard`,disabled:S,children:[T(D,{children:e.t(`Reasoning effort`)}),T(Bt,{value:r.reasoningEffort||``,onChange:e=>w({reasoningEffort:e.target.value}),children:Qu.map(t=>T(Lt,{value:t.value,children:e.t(t.label)},t.value||`default`))})]}):null,x===`anthropic`?T(I,{variant:`standard`,type:`number`,disabled:S,label:e.t(`Maximum answer length`),helperText:e.t(`A longer answer is cut off when the limit is reached.`),value:r.maxTokens||``,placeholder:String(Ou.DEFAULT_AI_MAX_TOKENS),slotProps:{htmlInput:{min:Ou.MIN_AI_MAX_TOKENS,max:Ou.MAX_AI_MAX_TOKENS,step:1024}},onChange:e=>w({maxTokens:parseInt(e.target.value,10)||0})}):null,T(C,{severity:`warning`,children:e.t(`The objects, states and logs will be processed by your AI provider.`)})]}):null]}),_?T(Ju,{provider:_,existingIds:i.map(e=>e._id),onClose:e=>{let t=_.value;y(null),e&&w({...ne(t),credentialId:e._id},[...i,e])}}):null]})}var od={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},buttonPanel:{paddingBottom:50,display:`flex`},descriptionPanel:e=>({width:`100%`,backgroundColor:`transparent`,marginLeft:40,border:`none`,display:`flex`,alignItems:`center`,"& a":{paddingLeft:3,color:e.palette.mode===`dark`?`#EEE`:`#111`}}),formControl:{margin:8,minWidth:`100%`}},sd=class extends Ul{render(){let{data:e}=this.props,{letsEncrypt:t}=e.native||{};return M(`div`,{style:od.tabPanel,children:[T(`div`,{style:{width:`100%`,overflow:`auto`,overflowX:`hidden`,padding:15,fontSize:20,color:`#ff4949`},children:this.props.t(`ra_Use iobroker.acme adapter for letsencrypt certificates`)}),T(`div`,{style:od.buttonPanel,children:T(Ot,{variant:`outlined`,sx:od.descriptionPanel,dangerouslySetInnerHTML:{__html:this.props.t(`letsnecrypt_help`)}})}),M(N,{container:!0,spacing:6,children:[T(N,{size:{md:3,xs:12},children:T(p,{variant:`standard`,style:od.formControl,children:T(I,{variant:`standard`,id:`email`,disabled:this.props.saving,label:this.props.t(`Email for account:`),value:(t==null?void 0:t.email)||``,onChange:e=>this.onChangeText(e,`email`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.email?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`email`),children:T(O,{})})}):null}}})})}),T(N,{size:{md:3,xs:12},children:T(p,{variant:`standard`,style:od.formControl,children:T(I,{disabled:this.props.saving,variant:`standard`,id:`domains`,label:this.props.t(`Domains:`),value:(t==null?void 0:t.domains)||``,onChange:e=>this.onChangeText(e,`domains`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.domains?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`domains`),children:T(O,{})})}):null}}})})}),T(N,{size:{md:3,xs:12},children:T(p,{variant:`standard`,style:od.formControl,children:T(I,{variant:`standard`,id:`path`,disabled:this.props.saving,label:this.props.t(`Path to storage:`),value:(t==null?void 0:t.path)||``,onChange:e=>this.onChangeText(e,`path`),slotProps:{inputLabel:{shrink:!0},input:{readOnly:!1,endAdornment:t!=null&&t.path?T(z,{position:`end`,children:T(k,{disabled:this.props.saving,tabIndex:-1,size:`small`,onClick:()=>this.onChangeText({target:{value:``}},`path`),children:T(O,{})})}):null}}})})})]})]})}onChangeText(e,t){let n=e.target.value;this.doChange(t,n)}doChange(e,t){let n=H.clone(this.props.data);n.native.letsEncrypt=n.native.letsEncrypt||{},n.native.letsEncrypt[e]=t,this.props.onChange(n)}};x();var cd={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,overflowX:`hidden`,padding:15},buttonPanel:{paddingBottom:40,display:`flex`},formControl:{margin:8,minWidth:`100%`},tableCell:{textAlign:`center`,border:`1px solid #AAA`,paddingLeft:0,paddingRight:0}},ld=class e extends Ul{static getTypes(){return[{type:`object`,title:`Object rights`},{type:`state`,title:`States rights`},{type:`file`,title:`File rights`}]}getRights(t){let n=this.props.data.common.defaultNewAcl[t];return e.permBits.map(e=>e.map(e=>n&e))}getTable(e){let t=this.getRights(e).map((t,n)=>M(Pt,{children:[T(B,{style:cd.tableCell,children:T(ke,{disabled:this.props.saving,checked:!!t[0],color:`primary`,onChange:()=>this.handleCheck(e,n,0)})}),T(B,{style:cd.tableCell,children:T(ke,{disabled:this.props.saving,checked:!!t[1],color:`primary`,onChange:()=>this.handleCheck(e,n,1)})})]},n));return T(jt,{children:M(i,{style:cd.table,"aria-label":`customized table`,children:[T(Jt,{children:M(Ze,{children:[T(B,{colSpan:2,style:cd.tableCell,children:this.props.t(`Owner`)}),T(B,{colSpan:2,style:cd.tableCell,children:this.props.t(`Group`)}),T(B,{colSpan:2,style:cd.tableCell,children:this.props.t(`Everyone`)})]})}),M(ft,{children:[M(Ze,{children:[T(B,{style:cd.tableCell,children:this.props.t(`read`)}),T(B,{style:cd.tableCell,children:this.props.t(`write`)}),T(B,{style:cd.tableCell,children:this.props.t(`read`)}),T(B,{style:cd.tableCell,children:this.props.t(`write`)}),T(B,{style:cd.tableCell,children:this.props.t(`read`)}),T(B,{style:cd.tableCell,children:this.props.t(`write`)})]}),T(Ze,{children:t})]})]})})}doChange(e,t){let n=H.clone(this.props.data);e===`owner`?n.common.defaultNewAcl.owner=t:e===`ownerGroup`&&(n.common.defaultNewAcl.ownerGroup=t),this.props.onChange(n)}handleCheck(t,n,r){let i=H.clone(this.props.data);i.common.defaultNewAcl[t]^=e.permBits[n][r],this.props.onChange(i)}static getText(e,t){return typeof e==`object`?e[t]||e.en||``:e||``}render(){let t=A.getLanguage(),n=this.props.users.map((n,r)=>T(Lt,{value:n._id,children:e.getText(n.common.name,t)},r)),r=this.props.groups.map((n,r)=>T(Lt,{value:n._id,children:e.getText(n.common.name,t)},r)),i=e.getTypes().map((e,t)=>M(N,{size:{lg:4,xs:12,md:6},children:[T(L,{variant:`h6`,component:`div`,children:this.props.t(e.title)}),this.getTable(e.type)]},t));return M(`div`,{style:cd.tabPanel,children:[T(L,{variant:`h5`,component:`div`,children:this.props.t(`Access control list`)}),M(N,{container:!0,spacing:3,children:[T(N,{size:{lg:3,xs:12,md:6},children:M(p,{variant:`standard`,style:cd.formControl,children:[T(D,{shrink:!0,id:`owner-label`,children:this.props.t(`Owner user`)}),T(Bt,{disabled:this.props.saving,variant:`standard`,style:cd.formControl,id:`owner`,value:this.props.data.common.defaultNewAcl.owner,onChange:e=>this.doChange(`owner`,e.target.value),displayEmpty:!0,inputProps:{"aria-label":`users`},children:n})]})}),T(N,{size:{lg:3,xs:12,md:6},children:M(p,{variant:`standard`,style:cd.formControl,children:[T(D,{shrink:!0,id:`ownerGroup-label`,children:this.props.t(`Owner group`)}),T(Bt,{disabled:this.props.saving,variant:`standard`,style:cd.formControl,id:`ownerGroup`,value:this.props.data.common.defaultNewAcl.ownerGroup,onChange:e=>this.doChange(`ownerGroup`,e.target.value),displayEmpty:!0,inputProps:{"aria-label":`ownerGroup`},children:r})]})})]}),T(N,{container:!0,spacing:3,children:i})]})}};j(ld,`permBits`,[[1024,512],[64,32],[4,2]]),x(),window.ace.config.set(`basePath`,`lib/js/ace`);var ud={tabPanel:{width:`100%`,height:`100% `,overflow:`auto`,padding:15},note:{padding:15,backgroundColor:`#607d8b`,color:`#FFF`,overflow:`auto`,flex:`none`},sentData:{padding:15},formControl:{margin:8,minWidth:`100%`},descriptionPanel:{width:`100%`,backgroundColor:`transparent`,border:`none`,overflow:`auto`},selectEmpty:{marginTop:16}},dd=class e extends Ul{constructor(...e){super(...e),j(this,`handleChangeType`,e=>{this.doChange(`diag`,e),this.props.handle&&this.props.handle(e)})}static getTypes(){return[{id:`none`,title:`none`},{id:`normal`,title:`normal`},{id:`no-city`,title:`no-city`},{id:`extended`,title:`extended`}]}getTypesSelector(){let{common:t}=this.props.data,n=e.getTypes().map((e,t)=>T(Lt,{value:e.title,children:this.props.t(e.title)},t));return M(p,{variant:`standard`,fullWidth:!0,style:{marginTop:8},children:[T(D,{shrink:!0,id:`statistics-label`,children:this.props.t(`Statistics`)}),T(Bt,{disabled:this.props.saving,variant:`standard`,id:`statistics`,value:t.diag,displayEmpty:!0,onChange:e=>this.handleChangeType(e.target.value),children:n})]})}doChange(e,t){let n=H.clone(this.props.data);n.common[e]=t,this.props.onChange(n)}render(){return T(`div`,{style:{...ud.tabPanel,height:`100%`},children:M(N,{container:!0,spacing:3,className:`sendData-grid`,style:{height:`100%`},children:[M(N,{size:{lg:4,md:4,xs:12},style:{display:`flex`,flexDirection:`column`},children:[M(ln,{style:ud.note,children:[T(L,{gutterBottom:!0,variant:`h6`,component:`div`,children:this.props.t(`Note:`)}),T(L,{variant:`body2`,component:`div`,dangerouslySetInnerHTML:{__html:this.props.t(`diag-note`)}})]}),this.getTypesSelector(),this.props.dataAux?T(Ot,{variant:`outlined`,style:ud.descriptionPanel,children:T(`ul`,{children:Object.keys(this.props.dataAux).map(e=>T(`li`,{children:e},e))})}):null]}),M(N,{size:{lg:8,md:4,xs:12},className:`sendData-grid`,style:{height:`100%`,display:`flex`,flexDirection:`column`},children:[T(Ot,{style:ud.sentData,children:T(L,{gutterBottom:!0,variant:`h6`,component:`div`,children:this.props.dataAux?this.props.t(`Sent data:`):this.props.t(`No data will be sent`)})}),T(Xc,{editValueMode:!0,themeType:this.props.themeType,value:JSON.stringify(this.props.dataAux,null,2)})]})]})})}};x();var fd=`__SOME_PASSWORD__`,pd=`SystemSettings.tab`,md={tabPanel:{flex:1,minWidth:0,height:`100%`,overflow:`hidden`},body:{flex:1,minHeight:0,display:`flex`},verticalTabs:e=>({flexShrink:0,borderRight:`1px solid ${e.palette.divider}`,"& .MuiTab-root":{justifyContent:`flex-start`,textAlign:`left`,minHeight:44}}),horizontalTabs:{flex:1,minWidth:0,"& .MuiTab-root":{minHeight:48}},dialogTitle:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8,padding:`0 0 0 20px`,minHeight:56},dialog:{width:`100%`,height:`100%`,maxWidth:`100%`},content:{padding:`0 !important`,display:`flex`,flexDirection:`column`},selected:e=>({color:e.palette.mode===`dark`?`#FFF !important`:`#222 !important`})},hd=class e extends $t{constructor(e){super(e),j(this,`originalCertificates`,``),j(this,`originalConfig`,``),j(this,`originalRepositories`,``),j(this,`originalLicenses`,``),j(this,`originalCredentials`,``),j(this,`originalAi`,``),j(this,`originalCredentialObjects`,{}),j(this,`onChangeDiagType`,e=>{let t=this.state.systemConfig;t&&this.props.socket.getDiagData(this.props.currentHost,e).then(n=>this.setState({diagData:n,systemConfig:{...t,common:{...t.common,diag:e}}}))}),this.state={loading:!0,loadError:!1,saveError:!1,confirmExit:!1,systemConfig:null,systemCertificates:null,systemCredentials:null,systemRepositories:null,systemLicenses:null,systemAi:null,multipleRepos:!1,licenseManager:!1,host:``,instance:``,repoInfo:{}},this.getSettings()}async componentDidMount(){try{let e=await this.props.socket.checkFeatureSupported(`CONTROLLER_MULTI_REPO`),t=await this.props.socket.checkFeatureSupported(`CONTROLLER_LICENSE_MANAGER`),n=await this.props.socket.getCurrentInstance(),r=await this.props.socket.getObject(`system.adapter.${n}`);this.setState({host:r.common.host,instance:n,multipleRepos:e,licenseManager:t})}catch{this.setState({host:this.props.currentHost})}}async getSettings(){let e={loading:!1,loadError:!1};try{let t=await this.props.socket.getObject(`system.repositories`);t=H.clone(t),t||={},t.native=t.native||{},t.native.repositories=t.native.repositories||{};let n={};e.repoInfo=n,Object.keys(t.native.repositories).forEach(e=>{t.native.repositories[e]&&(t.native.repositories[e].json&&(n[e]=t.native.repositories[e].json._repoInfo,delete t.native.repositories[e].json),t.native.repositories[e].hash&&delete t.native.repositories[e].hash,t.native.repositories[e].time&&delete t.native.repositories[e].time)}),this.originalRepositories=JSON.stringify(t),e.systemRepositories=t;let r=await this.props.socket.getSystemConfig(!0);this.originalConfig=JSON.stringify(r||{}),e.systemConfig=r||{},r.common=r.common||{},r.native=r.native||{},r.common.defaultNewAcl=r.common.defaultNewAcl||{object:1636,state:1636,file:1632,owner:`system.user.admin`,ownerGroup:`system.group.administrator`},r.common.firstDayOfWeek=r.common.firstDayOfWeek||`monday`,e.diagData=await this.props.socket.getDiagData(this.props.currentHost,r.common.diag),e.users=await this.props.socket.getUsers(),e.groups=await this.props.socket.getGroups();let i=await this.props.socket.getAdapterInstances(!0),a=[],o={};for(let e of Object.values(i)){if(!e.common.getHistory)continue;let t=e._id.split(`.`),n=`${t[t.length-2]}.${t[t.length-1]}`;a.push(n);let r=e.common.icon;r&&!r.startsWith(`data:image`)&&!r.includes(`/`)&&(r=`adapter/${e.common.name}/${r}`),r&&(o[n]=r)}e.histories=a,e.historyIcons=o;let s=await this.props.socket.getObject(`system.certificates`);this.originalCertificates=JSON.stringify(s),e.systemCertificates=s||null;let c=await this.props.socket.getObjectViewSystem(`config`,xu,`${xu}香`);this.originalCredentialObjects={};let l=Object.values(c).filter(e=>!!e).sort((e,t)=>e._id.localeCompare(t._id)).map(e=>{var t;this.originalCredentialObjects[e._id]=H.clone(e);let n=H.clone(e);return(((t=n.native)==null?void 0:t.encryptedFields)||[]).forEach(e=>{n.native[e]&&(n.native[e]=fd)}),n});this.originalCredentials=JSON.stringify(l),e.systemCredentials=l;let u=null;try{u=await this.props.socket.getObject(ku)}catch{}u=u?H.clone(u):{_id:ku,type:`config`,common:{name:`AI settings`,expert:!0},native:{}},u.native=u.native||{},this.originalAi=JSON.stringify(u),e.systemAi=u;let d=await this.props.socket.getObject(`system.licenses`);d||={common:{name:`Licenses from iobroker.net`},native:{login:``,password:``,licenses:[]},type:`config`},d.native.password&&(d.native.password=fd),this.originalLicenses=JSON.stringify({login:d.native.login,password:d.native.password}),e.systemLicenses=d,this.setState(e)}catch{this.setState({loading:!1,loadError:!0})}}renderDialogConfirm(){return this.state.confirmExit?T(Qt,{text:this.props.t(`Discard unsaved changes?`),onClose:e=>this.setState({confirmExit:!1},()=>e&&this.props.onClose())}):null}onSave(){let e=!1,t=this.state.systemConfig,n=this.state.systemCertificates,r=this.state.systemCredentials,i=this.state.systemRepositories,a=this.state.systemLicenses;t&&n&&r&&i&&a&&this.setState({saving:!0,saveError:!1},async()=>{try{let c=await this.props.socket.getSystemConfig(!0);if(c||={},JSON.stringify(c.common)!==JSON.stringify(t.common)&&await this.props.socket.setSystemConfig(t),await this.props.socket.setObject(`system.certificates`,n),JSON.stringify(r)!==this.originalCredentials){for(let e of Object.keys(this.originalCredentialObjects))r.find(t=>t._id===e)||await this.props.socket.delObject(e);for(let e of r){var o;let t=H.clone(e),n=this.originalCredentialObjects[t._id],r=((o=t.native)==null?void 0:o.encryptedFields)||[];for(let e of r){let r=t.native[e];if(r===fd){var s;t.native[e]=(n==null||(s=n.native)==null?void 0:s[e])||``}else r&&(t.native[e]=await this.props.socket.encrypt(r))}n&&JSON.stringify(t)===JSON.stringify(n)||await this.props.socket.setObject(t._id,t)}}let l=this.state.systemAi;if(l&&JSON.stringify(l)!==this.originalAi){let e=null;try{e=await this.props.socket.getObject(ku)}catch{}await this.props.socket.setObject(ku,{...e||l,native:{...(e==null?void 0:e.native)||{},...l.native}})}let u=await this.props.socket.getObject(`system.repositories`);u||={},u.native=u.native||{},u.native.repositories=u.native.repositories||{};let d=JSON.parse(JSON.stringify(i.native.repositories));Object.keys(d).forEach(e=>{u.native.repositories[e]&&(u.native.repositories[e].json&&(d[e].json=u.native.repositories[e].json),u.native.repositories[e].hash&&(d[e].hash=u.native.repositories[e].hash),u.native.repositories[e].time&&(d[e].time=u.native.repositories[e].time))}),JSON.stringify(i.native.repositories)!==JSON.stringify(d)&&(u.native.repositories=d,e=!0,await this.props.socket.setObject(`system.repositories`,u));let f=await this.props.socket.getObject(`system.licenses`);f||={},f.type=f.type||`config`,f.name=f.name||`Licenses from iobroker.net`,f.common=f.common||{},f.native=f.native||{},f.native.licenses=f.native.licenses||[],f.native.password=f.native.password||``,f.native.login=f.native.login||``;let p=f.native.password?fd:``;(a.native.password!==p||f.native.login!==a.native.login)&&(f.native.login=a.native.login,a.native.password!==fd&&a.native.password?f.native.password=await this.props.socket.encrypt(a.native.password):a.native.password||(f.native.password=``),await this.props.socket.setObject(`system.licenses`,f),await this.props.socket.updateLicenses(``,``)),alert(this.props.t(`Settings saved`)),this.props.onClose(e),t.common.expertMode!==JSON.parse(this.originalConfig).common.expertMode&&this.props.expertModeFunc(!!t.common.expertMode),(t.common.language!==JSON.parse(this.originalConfig).common.language||JSON.stringify(t.common.activeRepo)!==JSON.stringify(JSON.parse(this.originalConfig).common.activeRepo))&&window.location.reload(),this.setState({saving:!1})}catch{this.setState({saveError:!0})}finally{this.setState({saving:!1})}})}getTabs(){return[{id:0,title:`System settings`,icon:T(Oe,{}),component:Kl,data:`systemConfig`,name:`tabConfig`,dataAux:`systemRepositories`,handle:void 0},{id:9,title:`EOS Home / Pro`,icon:T(vr,{}),component:vu,data:``,name:`tabEosLicenses`,dataAux:``},{id:1,title:`Repositories`,icon:T(Or,{}),component:Zl,data:`systemRepositories`,name:`tabRepositories`,dataAux:`systemConfig`,handle:void 0,socket:this.props.socket},{id:2,title:`Adapter licenses`,icon:T(vr,{}),component:$l,data:`systemLicenses`,name:`tabLicenses`,dataAux:``,handle:void 0,socket:this.props.socket},{id:3,title:`Certificates`,icon:T(qr,{}),component:bu,data:`systemCertificates`,name:`tabCertificates`,dataAux:``,handle:void 0},{id:4,title:`Credentials`,icon:T(be,{}),component:Ru,data:`systemCredentials`,name:`tabCredentials`,dataAux:``,handle:void 0,socket:this.props.socket},{id:5,title:`AI`,icon:T(hr,{}),component:ad,data:`systemAi`,name:Zu,dataAux:`systemCredentials`,handle:void 0},{id:6,title:`Let's encrypt SSL`,icon:T(Tr,{}),component:sd,data:`systemCertificates`,name:`tabLetsEncrypt`,dataAux:``,handle:void 0},{id:7,title:`Default ACL`,icon:T(Ar,{}),component:ld,data:`systemConfig`,name:`tabDefaultACL`,dataAux:``,handle:void 0},{id:8,title:`Statistics`,icon:T(gr,{}),component:dd,data:`systemConfig`,dataAux:`diagData`,name:`tabStatistics`,handle:e=>this.onChangeDiagType(e)}]}getCurrentTabId(e){var t;let n=this.props.currentTab.id||(window._localStorage||window.localStorage).getItem(pd)||``;return e.find(e=>e.name===n)?n:((t=e[0])==null?void 0:t.name)||`tabConfig`}getDialogContent(e,t){var n;if(t===`tabEosLicenses`&&this.props.eosAccessRole===`admin`)return T(vu,{});if(this.state.loadError)return M(F,{sx:{p:3},children:[T(C,{severity:`error`,children:this.props.t(`Cannot read settings`)}),T(V,{onClick:()=>this.setState({loading:!0,loadError:!1},()=>void this.getSettings()),children:this.props.t(`Retry`)})]});if(this.state.loading)return T(F,{sx:md.tabPanel,children:T(Le,{})});let r=e.find(e=>e.name===t)||e[0],i=r.component,{groups:a,users:o,histories:s,historyIcons:c}=this.state;return T(F,{component:`div`,sx:md.tabPanel,children:T(i,{adminGuiConfig:this.props.adminGuiConfig,onChange:(e,t,n)=>this.onChangedTab(r.data,e,r.dataAux,t,n),data:this.state[r.data],dataAux:this.state[r.dataAux],handle:r.handle,users:o,groups:a,multipleRepos:this.state.multipleRepos,activeRepo:(n=this.state.systemConfig)==null?void 0:n.common.activeRepo,repoInfo:this.state.repoInfo,histories:s,historyIcons:c,themeName:this.props.themeName,themeType:this.props.themeType,host:this.state.host,t:this.props.t,socket:this.props.socket,instance:this.state.instance,saving:!!this.state.saving})})}onChangedTab(e,t,n,r,i){if(t||r){let a={...this.state};t&&(a[e]=t),r&&(a[n]=r),this.setState(a,()=>i==null?void 0:i())}}static ifRepoError(e){var t;return e!=null&&(t=e.native)!=null&&t.repositories?Object.keys(e.native.repositories).find(e=>!e||e.trimStart()!==e||e.length<3&&!!e.match(/^\d+$/))!==void 0:!1}render(){var t,n;let r=!this.state.loading&&!this.state.loadError&&(JSON.stringify(this.state.systemRepositories)!==this.originalRepositories||JSON.stringify(this.state.systemConfig)!==this.originalConfig||JSON.stringify(this.state.systemCertificates)!==this.originalCertificates||JSON.stringify(this.state.systemCredentials)!==this.originalCredentials||JSON.stringify(this.state.systemAi)!==this.originalAi||JSON.stringify({login:(t=this.state.systemLicenses)==null?void 0:t.native.login,password:(n=this.state.systemLicenses)==null?void 0:n.native.password})!==this.originalLicenses),i=this.getTabs().filter(e=>{var t;if(e.name===`tabEosLicenses`)return this.props.eosAccessRole===`admin`;if(!this.state.licenseManager&&e.name===`tabLicenses`)return!1;let n=(t=this.props.adminGuiConfig.admin)==null?void 0:t.settings;return(n==null?void 0:n[e.name])!==!1}),a=this.getCurrentTabId(i),o=!1;a===`tabRepositories`&&(o=!!this.state.systemRepositories&&e.ifRepoError(this.state.systemRepositories));let s=i.map(e=>T(ye,{label:this.props.t(e.title),icon:e.icon,iconPosition:`start`,value:e.name,disabled:o&&e.name!==a,sx:{"&.Mui-selected":md.selected}},e.title)),c=this.props.width===`xs`||this.props.width===`sm`,l=this.props.width===`xs`,d=T(Zt,{orientation:c?`horizontal`:`vertical`,indicatorColor:`secondary`,value:a,onChange:(t,n)=>e.onTabChanged(n),variant:`scrollable`,scrollButtons:`auto`,allowScrollButtonsMobile:!0,sx:c?md.horizontalTabs:md.verticalTabs,children:s});return M(u,{sx:{"&.MuiDialog-root":md.dialog,...l?{}:{"& .MuiDialog-paper":{height:`calc(100% - 64px)`,width:`calc(100% - 64px)`,maxWidth:`calc(100% - 64px)`}}},open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&(r?this.setState({confirmExit:!0}):this.props.onClose())},fullWidth:!0,fullScreen:l,"aria-labelledby":`system-settings-dialog-title`,children:[M(le,{style:md.content,children:[T(bt,{position:`static`,color:`default`,children:M(`div`,{style:md.dialogTitle,children:[c?d:T(L,{className:`dialogName`,children:this.props.t(`Base settings`)}),T(k,{size:`large`,disabled:this.state.saving,edge:`start`,color:`inherit`,onClick:()=>r?this.setState({confirmExit:!0}):this.props.onClose(),"aria-label":`close`,children:T(O,{})})]})}),M(F,{style:md.body,children:[c?null:d,this.getDialogContent(i,a)]}),this.renderDialogConfirm()]}),this.state.saveError?M(C,{severity:`error`,"data-eos-system-save-error":`1`,children:[this.props.t(`Cannot save system configuration`),`. `,this.props.t(`Please try again`)]}):null,M(St,{children:[T(V,{variant:`contained`,disabled:!r||this.state.saving||o||this.state.loadError,onClick:()=>this.onSave(),color:`primary`,startIcon:this.state.saving?T(v,{size:20}):T(Ne,{}),children:this.props.t(`Save & Close`)}),T(V,{variant:`contained`,disabled:this.state.saving,onClick:()=>r?this.setState({confirmExit:!0}):this.props.onClose(),startIcon:T(O,{}),color:`grey`,children:r?this.props.t(`Cancel`):this.props.t(`Close`)})]})]})}};j(hd,`onTabChanged`,e=>{(window._localStorage||window.localStorage).setItem(pd,e),d.doNavigate(null,`system`,e)});var gd=w()(hd);x();var _d=`0 4px 7px 5px rgb(0 0 0 / 14%), 0 3px 1px 1px rgb(0 0 0 / 12%), 0 1px 5px 0 rgb(0 0 0 / 20%)`,vd={root:{padding:10,margin:`auto`,display:`flex`,height:`100%`,alignItems:`center`,borderRadius:0,justifyContent:`center`},paper:e=>({backgroundColor:e.palette.background.paper+(e.palette.background.paper.length<7?`d`:`dd`),p:`30px 32px 28px`,overflowY:`visible`,display:`flex`,flexDirection:`column`,height:`auto`,minHeight:0,width:`calc(100% - 48px)`,maxHeight:`none`,maxWidth:400,boxShadow:_d}),avatar:e=>({m:1,backgroundColor:e.palette.mode===`dark`?`#111`:`#eee`,width:100,height:100,"& .MuiAvatar-img":{width:`calc(100% - 4px)`,height:`calc(100% - 4px)`,padding:2}}),submit:{margin:8},alert:{marginTop:16,backgroundColor:`#f44336`,padding:8,color:`#fff`,borderRadius:4,fontSize:16},ioBrokerLink:{textTransform:`inherit`},marginTop:{marginTop:28},progress:{textAlign:`center`}},yd=class e extends $t{constructor(e){super(e),j(this,`passwordRef`,void 0),j(this,`firstLoginCheckTimer`,null);let t=this.authenticateWithRefreshToken();this.state={inProcess:!1,stayLoggedIn:!1,showPassword:!1,username:``,password:``,error:``,loggingIn:t,firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:``};let n=window.document.body;n.style.backgroundColor=window.loginBackgroundColor,n.style.backgroundImage=window.loginBackgroundImage,n.style.backgroundSize=`cover`,this.passwordRef=Ut.createRef()}static async processTokenAnswer(t,n,r){if(n.ok){let r=await n.json();if(r!=null&&r.access_token)return ct.saveTokensStatic(r,t),e.redirectBack(),!0}if(r){let t=ct.readTokens();if(t!=null&&t.refresh_token&&t.refresh_token!==r)return e.redirectBack(),!0}return ct.deleteTokensStatic(),!1}static redirectBack(){let e=new URL(window.location.href).searchParams.get(`href`),t;e?(t=e,t.startsWith(`#`)&&(t=`./${t}`)):t=`./`,window.location.href=t}authenticateWithRefreshToken(){let t=ct.readTokens();return t!=null&&t.refresh_token?(fetch(lr(`oauth/token`),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`grant_type=refresh_token&refresh_token=${t.refresh_token}&stayloggedin=${t.stayLoggedIn}&client_id=ioBroker`}).then(async n=>{await e.processTokenAnswer(t.stayLoggedIn,n,t.refresh_token)||this.setState({inProcess:!1,loggingIn:!1})}).catch(e=>{console.error(`Cannot fetch access token: ${e}`),this.setState({inProcess:!1,loggingIn:!1})}),!0):!1}getManagedFirstLoginAccount(){return this.state.username.trim().toLowerCase().replace(/^system\.user\./,``)}isManagedFirstLoginAccount(){return[`installer`,`guest`,`user`].includes(this.getManagedFirstLoginAccount())}isManagedFirstLogin(){let e=this.getManagedFirstLoginAccount();return!this.state.password&&this.isManagedFirstLoginAccount()&&this.state.firstLoginEligible&&this.state.firstLoginCheckedAccount===e}scheduleFirstLoginEligibilityCheck(){this.firstLoginCheckTimer&&clearTimeout(this.firstLoginCheckTimer);let e=this.getManagedFirstLoginAccount();this.state.password||!this.isManagedFirstLoginAccount()?this.setState({firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:e}):(this.setState({firstLoginEligible:!1,firstLoginChecking:!0,firstLoginCheckedAccount:e}),this.firstLoginCheckTimer=setTimeout(async()=>{if(!(this.getManagedFirstLoginAccount()!==e||this.state.password))try{var t;let n=(t=window.NEXOWATT_EOS_FIRST_LOGIN)==null?void 0:t.check,r=n?!!await n(e):!1;this.getManagedFirstLoginAccount()===e&&!this.state.password&&this.setState({firstLoginEligible:r,firstLoginChecking:!1,firstLoginCheckedAccount:e})}catch{this.setState({firstLoginEligible:!1,firstLoginChecking:!1,firstLoginCheckedAccount:e})}},120))}componentDidMount(){[80,300,900].forEach(e=>setTimeout(()=>this.scheduleFirstLoginEligibilityCheck(),e))}componentWillUnmount(){this.firstLoginCheckTimer&&clearTimeout(this.firstLoginCheckTimer)}onLoginAction(){var e;this.isManagedFirstLogin()&&(e=window.NEXOWATT_EOS_FIRST_LOGIN)!=null&&e.start?window.NEXOWATT_EOS_FIRST_LOGIN.start(this.state.username):this.onLogin()}onLogin(){this.setState({inProcess:!0,error:``},async()=>{let t=await fetch(lr(`oauth/token`),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`grant_type=password&username=${encodeURIComponent(this.state.username)}&password=${encodeURIComponent(this.state.password)}&stayloggedin=${this.state.stayLoggedIn}&client_id=ioBroker`});await e.processTokenAnswer(this.state.stayLoggedIn,t)||this.setState({inProcess:!1,error:A.t(`wrongPassword`)})})}render(){let e=window.loginLink&&window.loginLink!==`@@loginLink@@`?window.loginLink:`#`,t=window.loginMotto&&window.loginMotto!==`@@loginMotto@@`?window.loginMotto:`Energy Operation System`;window.login!==`true`&&window.login!==`@@auth@@`&&(window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}`);let n=window.loginBackgroundColor&&window.loginBackgroundColor!==`inherit`||window.loginBackgroundImage?{background:`#00000000`}:{},r;return r=this.state.loggingIn?T(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:`...`}):M(Ot,{className:`eos-login-card-modern${this.isManagedFirstLogin()?` eos-login-first-ready`:``}${this.state.firstLoginChecking&&this.isManagedFirstLoginAccount()?` eos-login-first-checking`:``}`,sx:vd.paper,children:[M(N,{container:!0,sx:{flexDirection:`column`,alignItems:`center`},children:[window.loginLogo&&window.loginLogo!==`@@loginLogo@@`?T(F,{sx:{width:100,height:100,borderRadius:`5px`,padding:`5px`,display:`flex`,justifyContent:`center`,alignItems:`center`},children:T(`img`,{src:window.loginLogo,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):(window.loginHideLogo===`false`||window.loginHideLogo===`@@loginHideLogo@@`)&&T(_t,{sx:vd.avatar,src:`img/admin.svg`}),T(L,{component:`h1`,variant:`h5`,children:window.loginTitle&&window.loginTitle!==`@@loginTitle@@`?window.loginTitle:A.t(`loginTitle`)}),window.location.search.includes(`error`)||this.state.error?T(`div`,{style:vd.alert,children:this.state.error||A.t(`wrongPassword`)}):null,T(I,{variant:`outlined`,margin:`normal`,disabled:this.state.inProcess,required:!0,value:this.state.username,onChange:e=>this.setState({username:e.target.value,firstLoginEligible:!1,firstLoginChecking:!1},()=>this.scheduleFirstLoginEligibilityCheck()),onKeyUp:e=>{if(e.key===`Enter`&&this.state.username){var t;e.preventDefault(),(t=this.passwordRef.current)==null||t.focus()}},fullWidth:!0,size:`small`,id:`username`,placeholder:`${A.t(`enterLogin`)} *`,slotProps:{htmlInput:{"aria-label":A.t(`enterLogin`)}},name:`username`,autoComplete:`username`,autoFocus:!0}),T(I,{variant:`outlined`,margin:`normal`,disabled:this.state.inProcess,required:!this.isManagedFirstLogin(),fullWidth:!0,ref:this.passwordRef,value:this.state.password,onChange:e=>this.setState({password:e.target.value,firstLoginEligible:!1,firstLoginChecking:!1},()=>this.scheduleFirstLoginEligibilityCheck()),onKeyUp:e=>{e.key===`Enter`&&this.state.username&&(this.state.password||this.isManagedFirstLogin())&&this.onLoginAction()},slotProps:{htmlInput:{"aria-label":A.t(`enterPassword`)},input:{endAdornment:this.state.password?T(k,{tabIndex:-1,"aria-label":`toggle password visibility`,onClick:()=>{this.setState({showPassword:!this.state.showPassword},()=>{setTimeout(()=>{var e;return(e=this.passwordRef.current)==null?void 0:e.focus()},50)})},children:T(Xe,{})}):null}},size:`small`,name:`password`,placeholder:`${A.t(`enterPassword`)} *`,type:this.state.showPassword?`text`:`password`,id:`password`,autoComplete:`current-password`}),T(`div`,{className:`eos-login-first-status eos-login-first-status-native`,"aria-live":`polite`}),T(je,{control:T(ke,{id:`stayloggedin`,name:`stayloggedin`,value:`on`,checked:this.state.stayLoggedIn,onChange:e=>this.setState({stayLoggedIn:e.target.checked}),color:`primary`,disabled:this.state.inProcess}),label:A.t(`Stay signed in`)}),T(V,{type:`submit`,disabled:this.state.inProcess||!this.state.username||!this.state.password&&!this.isManagedFirstLogin(),onClick:()=>this.onLoginAction(),fullWidth:!0,variant:`contained`,color:`primary`,style:vd.submit,children:this.state.inProcess?T(v,{size:24}):A.t(`login`)}),window.ssoActive===`true`?T(V,{onClick:()=>{window.location.href=lr(`sso?redirectUrl=${encodeURIComponent(`${window.origin}${lr(`#tab-intro`)}`)}&method=login`)},fullWidth:!0,variant:`contained`,color:`secondary`,children:A.t(`Use Single-Sign On`)}):null]}),T(F,{style:vd.marginTop,children:M(L,{variant:`body2`,color:`textSecondary`,align:`center`,children:[window.loginLink&&window.loginLink!==`@@loginLink@@`?T(Ge,{style:vd.ioBrokerLink,color:`inherit`,href:e,rel:`noopener noreferrer`,target:`_blank`,children:t}):null,!window.loginLink||window.loginLink===`@@loginLink@@`?t:null,!window.loginLink||window.loginLink===`@@loginLink@@`?T(Ge,{style:vd.ioBrokerLink,color:`inherit`,href:e,rel:`noopener noreferrer`,target:`_blank`,children:`NexoWatt EOS`}):null]})})]}),T(Ot,{component:`main`,style:{...vd.root,...n},children:r})}};async function bd(e=fetch){let t=new AbortController,n=setTimeout(()=>t.abort(),5e3);try{let n=await e(`/api/auth/status`,{credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:t.signal,headers:{Accept:`application/json`}});if(n.status===401)return;if(!n.ok)throw Error(`SESSION_STATUS_UNAVAILABLE`);let r=await n.json();if(!r||typeof r!=`object`||Array.isArray(r))throw Error(`SESSION_STATUS_INVALID`);if(`authenticated`in r&&r.authenticated===!1)return;if(!(`csrfToken`in r)||typeof r.csrfToken!=`string`||!/^[A-Za-z0-9_-]{16,256}$/.test(r.csrfToken))throw Error(`SESSION_CSRF_INVALID`);let i=await e(`/api/auth/logout`,{method:`POST`,credentials:`same-origin`,cache:`no-store`,redirect:`error`,signal:t.signal,headers:{Accept:`application/json`,"Content-Type":`application/json`,"X-NW-CSRF":r.csrfToken},body:`{}`});if(!i.ok&&i.status!==401)throw Error(`SESSION_LOGOUT_UNCONFIRMED`)}finally{clearTimeout(n)}}x();var xd={imgDiv:{"& svg:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`},"& img:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`},"@media screen and (max-width: 710px)":{"& img,svg":{marginRight:0}}},img:{width:30,height:30,margin:`auto 0`,position:`relative`,borderRadius:3,background:`#FFFFFF`,padding:2},notAlive:{opacity:.3},button:{maxWidth:300},name:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 710px)":{display:`none`},marginLeft:`8px`},width:{width:`100%`,"@media screen and (max-width: 710px)":{width:`auto`}},selector:{width:15,display:`inline-block`},tooltip:{pointerEvents:`none`}},Sd=class extends $t{constructor(e){super(e),j(this,`failures`,0),j(this,`retryTimer`,null),j(this,`readRun`,0),j(this,`unmounted`,!1),j(this,`connectionHandler`,e=>{e&&!this.state.hosts.length&&(this.failures=0,this.retryTimer&&=(clearTimeout(this.retryTimer),null),this.readHosts())}),j(this,`onAliveChanged`,e=>{let t=JSON.parse(JSON.stringify(this.state.alive)),n=!1;e.forEach(e=>{e.type===`deleted`?t[e.id]!==void 0&&(delete t[e.id],n=!0):!!t[e.id]!=!!e.alive&&(t[e.id]=e.alive,n=!0)}),n&&this.setState({alive:t},()=>{if(!t[this.props.currentHost]){let n=Object.keys(t).find(e=>t[e]);if(n){let t=this.state.hosts.find(e=>e._id===n);if(t){var e;this.props.setCurrentHost(((e=t.common)==null?void 0:e.name)||n.replace(`system.host.`,``),n)}else this.props.setCurrentHost(n.replace(`system.host.`,``),n)}}})}),j(this,`onHostsObjectChange`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts)),n=JSON.parse(JSON.stringify(this.state.alive)),r=!1;Promise.all(e.map(async e=>{let i=t.find(t=>t._id===e.id);if(e.type===`deleted`||!e.obj){if(i){let a=t.indexOf(i);a!==-1&&(delete n[e.id],t.splice(a),r=!0)}}else if(i){var a,o,s;if(i.common.name!==((a=e.obj.common)==null?void 0:a.name)){var c;i.common.name=((c=e.obj.common)==null?void 0:c.name)||``,r=!0}if(i.common.color!==((o=e.obj.common)==null?void 0:o.color)){var l;i.common.color=((l=e.obj.common)==null?void 0:l.color)||``,r=!0}if(i.common.icon!==((s=e.obj.common)==null?void 0:s.icon)){var u;i.common.icon=((u=e.obj.common)==null?void 0:u.icon)||``,r=!0}}else{var d,f,p;r=!0,t.push({_id:e.id,common:{name:((d=e.obj.common)==null?void 0:d.name)||``,color:((f=e.obj.common)==null?void 0:f.color)||``,icon:((p=e.obj.common)==null?void 0:p.icon)||``,installedVersion:`ignored`},native:{hardware:{networkInterfaces:{}}}});let i=await this.props.socket.getState(`${e.id}.alive`);n[e.id]=!!(i!=null&&i.val)}})).then(()=>{r&&this.setState({hosts:t,alive:n},()=>{if(!n[this.props.currentHost]){let t=Object.keys(n).find(e=>n[e]);if(t){let n=this.state.hosts.find(e=>e._id===t);if(n){var e;this.props.setCurrentHost(((e=n.common)==null?void 0:e.name)||t.replace(`system.host.`,``),t)}else this.props.setCurrentHost(t.replace(`system.host.`,``),t)}}})})}),this.state={anchorEl:null,alive:{},hosts:[]}}componentDidMount(){this.props.socket.registerConnectionHandler(this.connectionHandler),this.readHosts()}componentWillUnmount(){this.unmounted=!0,this.retryTimer&&=(clearTimeout(this.retryTimer),null),this.props.socket.unregisterConnectionHandler(this.connectionHandler),this.props.hostsWorker.unregisterHandler(this.onHostsObjectChange),this.props.hostsWorker.unregisterAliveHandler(this.onAliveChanged)}async readHosts(){let e=++this.readRun;this.retryTimer&&=(clearTimeout(this.retryTimer),null);try{let t=await this.props.socket.getCompactHosts(!0);if(e!==this.readRun||this.unmounted)return;let n={};for(let e=0;e<t.length;e++){let r=await this.props.socket.getState(`${t[e]._id}.alive`);r?n[t[e]._id]=!!r.val:n[t[e]._id]=!1}if(e!==this.readRun||this.unmounted)return;if(this.failures=0,!n[this.props.currentHost]){let e=Object.keys(n).find(e=>n[e]);e&&setTimeout(()=>{let t=this.state.hosts.find(t=>t._id===e);if(t){var n;this.props.setCurrentHost(((n=t.common)==null?void 0:n.name)||e.replace(`system.host.`,``),e)}else this.props.setCurrentHost(e.replace(`system.host.`,``),e)},100)}this.setState({hosts:t,alive:n},()=>{this.props.hostsWorker.registerHandler(this.onHostsObjectChange),this.props.hostsWorker.registerAliveHandler(this.onAliveChanged)})}catch(t){if(e!==this.readRun||this.unmounted)return;if(kc(t)){this.failures=0,window.alert(`Cannot get hosts: ${t}`);return}let n=Oc(this.failures);if(this.failures++,!this.props.socket.isConnected()){console.warn(`Cannot get hosts: ${t}. Next attempt after the reconnect`);return}console.warn(`Cannot get hosts: ${t}. Next attempt in ${n/1e3} s`),this.retryTimer=setTimeout(()=>{this.retryTimer=null,this.readHosts()},n)}}render(){var e,t,n,r,i;if(!this.props.expertMode&&this.state.hosts.length<2)return null;let a;return this.state.hosts.length&&(a=this.state.hosts.find(e=>e._id===this.props.currentHost||e._id===`system.host.${this.props.currentHost}`)),M(F,{children:[T(Rt,{title:this.props.tooltip||A.t(`Change current host`),slotProps:{popper:{sx:xd.tooltip}},children:T(`span`,{children:T(V,{color:this.props.themeType===`dark`?`primary`:`secondary`,style:{...xd.button,background:(a==null||(e=a.common)==null?void 0:e.color)||`none`,borderColor:a!=null&&(t=a.common)!=null&&t.color?Pe.invertColor(a.common.color,!1):`none`},variant:this.props.disabled||this.state.hosts.length<2?`text`:`outlined`,disabled:!!this.props.disabled||this.state.hosts.length<2,"aria-haspopup":`true`,onClick:e=>this.setState({anchorEl:e.currentTarget}),children:M(F,{component:`div`,sx:{...xd.width,...this.state.alive[this.props.currentHost]?void 0:xd.notAlive,...xd.imgDiv},style:{display:`flex`,color:a!=null&&(n=a.common)!=null&&n.color?Pe.invertColor(a.common.color,!0):`none`,alignItems:`center`},children:[T(nt,{style:xd.img,src:(a==null||(r=a.common)==null?void 0:r.icon)||`img/no-image.svg`}),T(F,{component:`div`,sx:xd.name,children:a==null||(i=a.common)==null?void 0:i.name})]})})})}),T(Qe,{anchorEl:this.state.anchorEl,keepMounted:!0,open:!!this.state.anchorEl,onClose:()=>this.setState({anchorEl:null}),children:this.state.hosts.map(({_id:e,common:{name:t,icon:n,color:r}},i)=>T(Lt,{disabled:!this.state.alive[e],selected:e===this.props.currentHost,style:{background:r||`inherit`},onClick:()=>{this.props.currentHost!==this.state.hosts[i]._id&&this.props.setCurrentHost(this.state.hosts[i].common.name,this.state.hosts[i]._id),this.setState({anchorEl:null})},children:M(F,{component:`div`,sx:xd.imgDiv,style:{display:`flex`,color:r&&Pe.invertColor(r,!0)||`inherit`,alignItems:`center`,gap:8},children:[T(`div`,{style:xd.selector,children:e===this.props.currentHost?`ᐅ`:``}),T(nt,{style:xd.img,src:n||`img/no-image.svg`}),t]})},e))})]})}},Cd={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:4,fontSize:16,fontFamily:`"Roboto", "Helvetica", "Arial", sans-serif`}),paper:{maxWidth:800},overflowHidden:{display:`flex`},pre:{overflow:`auto`,margin:20},text:{fontSize:16},textBold:{fontSize:16,fontWeight:`bold`},width100:{width:`100%`}},wd=({expertMode:e,onClose:t})=>{let[n,r]=R(!1);return M(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":Cd.paper},children:[M(ve,{children:[T(Mt,{style:{marginRight:8}}),A.t(`Expert mode`)]}),T(le,{style:Cd.overflowHidden,dividers:!0,children:M(N,{container:!0,children:[T(N,{style:Cd.width100,children:T(F,{component:`div`,sx:Cd.root,children:M(`div`,{style:Cd.pre,children:[T(L,{style:Cd.text,variant:`body2`,component:`p`,children:e?A.t(`Now the expert mode will be deactivated only during this browser session.`):A.t(`Now the expert mode will be active only during this browser session.`)}),e?null:T(L,{style:Cd.textBold,variant:`body2`,component:`p`,children:A.t(`The expert mode allows you to view and edit system internal details.`)}),e?null:T(L,{style:Cd.textBold,variant:`body2`,component:`p`,children:A.t(`Please make sure you know what you are doing!`)}),T(L,{style:Cd.text,variant:`body2`,component:`p`,children:A.t(`If you need to save the mode all the time, you can do this in the system settings.`)}),A.t(`Use this button:`),T(k,{color:`primary`,size:`small`,onClick:()=>t(`openSettings`),children:T(Te,{})})]})})}),T(N,{children:T(je,{control:T(ke,{id:`expert-mode-do-not-show`,checked:n,onChange:e=>r(e.target.checked)}),label:A.t(`Do not show this dialog in this browser session any more`)})})]})}),T(St,{children:T(V,{id:`expert-mode-dialog-ok`,variant:`contained`,autoFocus:!0,onClick:()=>{n&&(window._sessionStorage||window.sessionStorage).setItem(`App.doNotShowExpertDialog`,`true`),t(!0)},color:`primary`,startIcon:T(Ne,{}),children:A.t(`Ok`)})})]})};function Td(e,t){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<0||typeof t!=`string`||t.length>64)return!1;let n=/^(<=|>=|===|!==|==|!=|<|>)\s*(0|[1-9][0-9]{0,15})$/.exec(t.trim());if(!n)return!1;let r=Number(n[2]);if(!Number.isSafeInteger(r))return!1;switch(n[1]){case`<`:return e<r;case`<=`:return e<=r;case`>`:return e>r;case`>=`:return e>=r;case`==`:case`===`:return e===r;case`!=`:case`!==`:return e!==r;default:return!1}}var Ed={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`}),paper:{maxWidth:1e3,width:`100%`},overflowHidden:{display:`flex`},pre:{overflow:`auto`,m:`20px`,"& p":{fontSize:18}},blockInfo:{right:20,top:10,position:`absolute`,display:`flex`,alignItems:`center`,color:`silver`},img:{"& .news-admin-dialog-img":{marginLeft:10,width:45,height:45,margin:`auto 0`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}}},img2:{width:70,height:70,m:`10px 0`,borderRadius:`4px`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},link:{margin:`10px 0`}},Dd=({name:e})=>{switch(e){case`warning`:return T(Ft,{className:`news-admin-dialog-img`,style:{color:`#ffca00`}});case`info`:return T(ut,{className:`news-admin-dialog-img`,style:{color:`#007cff`}});case`danger`:return T(o,{className:`news-admin-dialog-img`,style:{color:`#ff2f2f`}});default:return T(ut,{className:`news-admin-dialog-img`,style:{color:`#007cff`}})}};function Od(e,t){return!!Object.keys(t).filter(t=>t.startsWith(`adapter.system.${e}.`)).find(e=>t[e].enabled)}function kd(e,t){if(e.startsWith(`equals`))return t===e.substring(7,e.length-1).trim();if(e.startsWith(`bigger`)||e.startsWith(`greater`)){let n=e.substring(7,e.length-1).trim();try{return Wt.gt(n,t)}catch{return!1}}if(e.startsWith(`smaller`)){let n=e.substring(8,e.length-1).trim();try{return Wt.lt(t,n)}catch{return!1}}if(e.startsWith(`between`)){let n=e.substring(8,e.indexOf(`,`)).trim(),r=e.substring(e.indexOf(`,`)+1,e.length-1).trim();try{return Wt.gte(t,n)&&Wt.lte(t,r)}catch{return!1}}return!0}var Ad=(e,t,n)=>{let r=[];try{let i=Date.now();for(let a of e){if(!a)continue;if(a.id===t)break;let e=!0;if(e&&a[`date-start`]&&new Date(a[`date-start`]).getTime()>i)e=!1;else if(e&&a[`date-end`]&&new Date(a[`date-end`]).getTime()<i)e=!1;else if(e&&a.conditions&&Object.keys(a.conditions).length>0){let t=!0;a.conditions.or===`true`&&(t=!1);let r=Object.keys(a.conditions).filter(e=>e!==`or`),i=!0;for(let e=0;e<r.length;e++){let o=n.adapters[r[e]],s=a.conditions[r[e]];if(s&&(r[e]===`js-controller`?s===`!installed`||s===`!active`?i=!1:s===`installed`||s===`active`?i=!0:n.jsControllerVersion&&(i=kd(s,n.jsControllerVersion)):!o&&s!==`!installed`||o&&s===`!installed`?i=!1:o&&s===`active`?i=Od(r[e],n.instances):o&&s===`!active`?i=!Od(r[e],n.instances):o&&(i=kd(s,o.v))),t&&!i||!t&&i)break}e=i}e&&a[`node-version`]&&n.nodeVersion&&(e=kd(a[`node-version`],n.nodeVersion)),e&&a[`npm-version`]&&n.npmVersion&&(e=kd(a[`npm-version`],n.npmVersion)),e&&a.os&&n.os&&(e=n.os===a.os),e&&a.repo&&(e=Array.isArray(n.activeRepo)?n.activeRepo.includes(a.repo):n.activeRepo===a.repo),e&&a.uuid&&(e=Array.isArray(a.uuid)?n.uuid&&a.uuid.find(e=>n.uuid===e):!!(n.uuid&&n.uuid===a.uuid)),e&&a[`number-of-objects`]!==void 0&&(e=Td(n.noObjects,a[`number-of-objects`])),e&&a[`objects-db-type`]&&(a[`objects-db-type`].includes(n.objectsDbType)||(e=!1)),e&&r.push({id:a.id,title:a.title[n.lang]||a.title.en,content:a.content[n.lang]||a.content.en,class:a.class,created:a.created,link:a.link,linkTitle:(typeof a.linkTitle==`object`?a.linkTitle[n.lang]||a.linkTitle.en:a.linkTitle)||``,img:a.img})}}catch{}return r};function jd({newsArr:e,current:t,onSetLastNewsId:n}){var r,i;let[a]=R(()=>{let n=e.find(e=>e.id===t);if(!n)return 0;let r=e.indexOf(n);return r+1<e.length?r+1:-1}),[o,s]=R(a<0?0:a);Xt(()=>{a<0&&n()},[]);let c=()=>{n(e[o].id),o+1<e.length?s(o+1):n()},l=A.getLanguage(),d=e[o].content.replace(/='([^']*)'/g,`="$1"`),f=e[o].title,p=e[o].link,m=e[o].linkTitle;return M(u,{onClose:c,open:!0,sx:{"& .MuiDialog-paper":Ed.paper},children:[M(F,{component:`div`,sx:{...Ed.blockInfo,...Ed.img},children:[new Date(e[o].created).toLocaleDateString(l),T(Dd,{name:e[o].class})]}),T(ve,{children:A.t(`You have unread news!`)}),T(ve,{children:f}),T(le,{style:Ed.overflowHidden,dividers:!0,children:T(F,{component:`div`,sx:Ed.root,children:M(F,{component:`div`,sx:Ed.pre,children:[((r=e[o])==null?void 0:r.img)&&T(sn,{sx:Ed.img2,component:`img`,image:e[o].img}),T(L,{variant:`body2`,component:`p`,children:Pe.renderTextWithA(d.replace(/\n/g,`<br />`))}),((i=e[o])==null?void 0:i.link)&&T(V,{variant:`contained`,style:Ed.link,onClick:()=>window.open(e[o].link,`_blank`),color:`primary`,children:m||A.t(`Link`)})]})})}),M(St,{children:[p?T(V,{id:`news-admin-dialog-more-info`,variant:`contained`,onClick:()=>{let e=window.open(p,`_blank`);e==null||e.focus()},color:`secondary`,startIcon:T(Ie,{}),children:m||A.t(`Show more info`)}):null,T(V,{id:`news-admin-dialog-acknowledge`,variant:`contained`,autoFocus:!0,onClick:c,color:`primary`,startIcon:T(Ne,{}),children:A.t(`Acknowledge`)})]})]})}var Md={root:e=>({backgroundColor:e.palette.background.paper,width:`100%`,height:`auto`,display:`flex`,borderRadius:`4px`,flexDirection:`column`}),paper:{maxWidth:1e3,width:`100%`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},message:{justifyContent:`space-between`,display:`flex`,width:`100%`,alignItems:`center`,"@media screen and (max-width: 550px)":{flexWrap:`wrap`}},column:{flexDirection:`column`},headerText:e=>({fontWeight:`bold`,fontSize:20,color:e.palette.mode===`dark`?`#DDD`:`#111`}),descriptionHeaderText:e=>({margin:`18px 0`,color:e.palette.mode===`dark`?`#CCC`:`#222`}),silver:{color:`silver`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},button:{paddingTop:18,paddingBottom:5,position:`sticky`,bottom:0,background:`white`,zIndex:3},terminal:{fontFamily:`monospace`,fontSize:14,ml:`20px`,whiteSpace:`pre-wrap`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`,marginLeft:0}},img2:{width:25,height:25,mr:`10px`,margin:`auto 0`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},heading:{display:`flex`,alignItems:`center`,overflow:`hidden`},headingTop:{display:`flex`,alignItems:`center`},classNameBox:{margin:8,p:`24px`,"@media screen and (max-width: 550px)":{p:`10px`}},textStyle:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}},content:{overflow:`hidden`},buttonStyle:{margin:`3px`,"@media screen and (max-width: 550px)":{fontSize:`2.9vw`}}},Nd=({name:e,severity:t,...n})=>{switch(e){case`restartLoop`:return T(Kr,{style:{color:`#ffca00`},...n});case`memIssues`:return T(Mr,{style:{color:`#ffca00`},...n});case`fsIoErrors`:return T(Dr,{style:{color:`#ffca00`},...n});case`noDiskSpace`:return T(Rr,{style:{color:`#ffca00`},...n});case`accessErrors`:return T(_r,{style:{color:`#ffca00`},...n});case`nonExistingFileErrors`:return T(o,{style:{color:`#ffca00`},...n});case`remoteHostErrors`:return T(Hr,{style:{color:`#ffca00`},...n});case`heading`:return T(Ir,{sx:{fontSize:36,marginLeft:4,marginRight:2},...n});default:return t===`notify`?T(Ir,{color:`primary`,...n}):t===`info`?T(ut,{color:`info`,...n}):T(Ft,{style:{color:`#ffca00`},...n})}};function Pd(e){return{id:`scrollable-force-tab-${e}`,"aria-controls":`scrollable-force-tabpanel-${e}`}}var Fd=({children:e,value:t,index:n,styleDiv:r,sxBox:i,...a})=>T(`div`,{role:`tabpanel`,hidden:t!==n,id:`scrollable-force-tabpanel-${n}`,"aria-labelledby":`scrollable-force-tab-${n}`,style:r,...a,children:t===n&&T(F,{style:i,children:T(L,{component:`div`,children:e})})}),Id=({messages:e,onClose:t,ackCallback:n,dateFormat:r,themeType:i,instances:a})=>{let[o,s]=R(0),[c,d]=R([]),[f,p]=R(``),[m,h]=R(!0),g=(e,t)=>{h(!0),s(t),p(``)},_=e=>(t,n)=>p(n?e:``),v=i===`dark`,y=Object.keys(e).sort((t,n)=>Bs(e[t].severity,e[n].severity));return M(u,{onClose:()=>t(),open:!0,sx:{"& .MuiDialog-paper":Md.paper},children:[M(`h2`,{style:Md.headingTop,children:[T(Nd,{name:`heading`}),A.t(`Host-specific notifications`)]}),T(le,{style:{...Md.flex,...Md.overflowHidden},dividers:!0,children:M(F,{component:`div`,sx:Md.root,children:[T(bt,{position:`static`,color:`default`,children:T(Zt,{value:o,onChange:g,variant:`scrollable`,scrollButtons:!0,indicatorColor:v?`primary`:`secondary`,textColor:`primary`,children:y.map((t,n)=>T(ye,{style:v?{color:`white`}:{color:`black`},disabled:c.includes(t),label:e[t].name[A.getLanguage()],icon:T(Nd,{name:t,severity:e[t].severity}),...Pd(n)},t))})}),y.map((i,s)=>T(Fd,{sxBox:Md.classNameBox,styleDiv:{...Md.overflowAuto,color:v?`black`:void 0},value:o,index:s,children:M(`div`,{children:[T(F,{component:`div`,sx:Md.headerText,style:{fontWeight:`bold`},children:e[i].name[A.getLanguage()]}),T(F,{component:`div`,sx:Md.descriptionHeaderText,children:e[i].description[A.getLanguage()]}),T(`div`,{children:e[i].instances?Object.keys(e[i].instances).map(t=>{var n,c;m&&o===s&&(_(`${i}-${t}`)(``,!0),h(!1));let u=a&&a[t],d=`img/no-image.svg`;return u!=null&&(n=u.common)!=null&&n.icon&&u!=null&&(c=u.common)!=null&&c.name&&(d=`adapter/${u.common.name}/${u.common.icon}`),M(Vt,{style:v?void 0:{background:`#c0c0c052`},expanded:f===`${i}-${t}`,onChange:_(`${i}-${t}`),children:[T(ie,{expandIcon:T(l,{}),sx:{"& .MuiAccordionSummary-content":Md.content},"aria-controls":`panel1bh-content`,id:`panel1bh-header`,children:M(L,{style:Md.heading,children:[T(sn,{sx:Md.img2,component:`img`,image:d}),T(F,{component:`div`,sx:Md.textStyle,style:{marginLeft:8},children:t.replace(/^system\.adapter\./,``)})]})}),T(ge,{style:Md.column,children:e[i].instances[t].messages.map(e=>M(L,{component:`div`,sx:Md.message,children:[T(F,{component:`div`,sx:Md.terminal,children:Pe.renderTextWithA(e.message)}),T(F,{component:`div`,sx:Md.silver,children:Pe.formatDate(new Date(e.ts),r)})]},e.ts))})]},t)}):null}),M(`div`,{style:Md.button,children:[T(V,{variant:`contained`,autoFocus:Object.keys(e).length!==1,disabled:c.includes(i),style:c.includes(i)?{background:`silver`}:void 0,sx:Md.buttonStyle,onClick:()=>{n(i),d([...c,i])},color:Object.keys(e).length===1?`grey`:`primary`,startIcon:T(Ne,{}),children:A.t(`Acknowledge`)}),Object.keys(e).length===1&&T(V,{variant:`contained`,disabled:c.includes(i),sx:Md.buttonStyle,style:c.includes(i)?{background:`silver`}:void 0,onClick:()=>{d([...c,i]),n(i),t()},startIcon:M(Me,{children:[T(Ne,{}),T(O,{})]}),color:`primary`,children:A.t(`Acknowledge & close`)})]})]})},`tabPanel-${i}`))]})}),T(St,{children:T(V,{id:`host-warning-dialog-ok`,variant:`contained`,onClick:()=>t(),startIcon:T(O,{}),color:`grey`,children:A.t(`Ok`)})})]})};x();var Ld=5e3,Rd=typeof navigator<`u`&&!!navigator.vendor&&navigator.vendor.includes(`Apple`)&&!!navigator.userAgent&&!navigator.userAgent.includes(`CriOS`)&&!navigator.userAgent.includes(`FxiOS`);function zd(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})\.(\d{3})/);if(!t)return null;let n;if(Rd)n=new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),parseInt(t[6],10),parseInt(t[7],10)).getTime();else{let e=t[0].split(` `);n=new Date(`${e[0]}T${e[1]}`).getTime()}let r=e.match(/: (host\..+? |[-\w]+\.\d+ \()/),i=e.match(/\d+m(silly|debug|info|warn|error)/)||e.match(/ - (silly|debug|info|warn|error):/),a=e.match(/\[\d+m: ([\s\S]*)$/)||e.match(/ - (?:silly|debug|info|warn|error): ([\s\S]*)$/);return{key:n,from:r?r[0].replace(/[ :(]/g,``):``,message:a?a[1]:``,severity:i?i[1]:`info`,ts:n,_id:0}}var Bd=class{constructor(e,t){j(this,`socket`,void 0),j(this,`handlers`,void 0),j(this,`promise`,void 0),j(this,`connected`,void 0),j(this,`logs`,void 0),j(this,`newLogs`,null),j(this,`errorCountHandlers`,void 0),j(this,`warningCountHandlers`,void 0),j(this,`countErrors`,void 0),j(this,`countWarnings`,void 0),j(this,`errors`,void 0),j(this,`warnings`,void 0),j(this,`currentHost`,void 0),j(this,`maxLogs`,void 0),j(this,`logTimeout`,null),j(this,`logSize`,0),j(this,`logLevelFilterSupported`,new Map),j(this,`lastLogLevel`,void 0),j(this,`logHandler`,e=>{let t=this._processLine(e);t!=null&&t.objLine&&(this.newLogs=this.newLogs||[],this.newLogs.push(t.objLine),this.logTimeout||=setTimeout(()=>{this.logTimeout=null;let t=this.newLogs||[];this.newLogs=null,this.handlers.forEach(n=>n&&n(t,JSON.stringify(e).length-65))},200),t.isNew&&(t.objLine.severity===`error`&&this.countErrors?(this.errors++,this.errorCountHandlers.forEach(e=>e&&e(this.errors))):t.objLine.severity===`warn`&&this.countWarnings&&(this.warnings++,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))))}),j(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.logLevelFilterSupported.clear(),this.getLogs(!0)):!e&&this.connected&&(this.connected=!1)}),this.socket=e,this.handlers=[],this.promise=null,this.errorCountHandlers=[],this.warningCountHandlers=[],this.countErrors=!0,this.countWarnings=!0,this.errors=0,this.warnings=0,this.currentHost=``,this.connected=this.socket.isConnected(),this.maxLogs=t||1e3,this.logs=null,e.registerLogHandler(this.logHandler),e.registerConnectionHandler(this.connectionHandler)}setCurrentHost(e){e!==this.currentHost&&(this.currentHost=e,this.getLogs(!0))}enableCountErrors(e){if(this.countErrors!==e&&(this.countErrors=e,!this.countErrors)){let e=this.errors;this.errors=0,e&&this.errorCountHandlers.forEach(t=>t&&t(e))}}enableCountWarnings(e){if(this.countWarnings!==e&&(this.countWarnings=e,!this.countWarnings)){let e=this.warnings;this.warnings=0,e&&this.warningCountHandlers.forEach(t=>t&&t(e))}}resetErrors(){this.errors&&(this.errors=0,this.errorCountHandlers.forEach(e=>e&&e(this.errors)))}resetWarnings(){this.warnings&&(this.warnings=0,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))}registerHandler(e){this.handlers.includes(e)||this.handlers.push(e)}unregisterHandler(e){let t=this.handlers.indexOf(e);t!==-1&&this.handlers.splice(t,1)}registerErrorCountHandler(e){this.errorCountHandlers.includes(e)||this.errorCountHandlers.push(e)}unregisterErrorCountHandler(e){let t=this.errorCountHandlers.indexOf(e);t!==-1&&this.errorCountHandlers.splice(t,1)}registerWarningCountHandler(e){this.warningCountHandlers.includes(e)||this.warningCountHandlers.push(e)}unregisterWarningCountHandler(e){let t=this.warningCountHandlers.indexOf(e);t!==-1&&this.warningCountHandlers.splice(t,1)}_processLine(e,t){if(!this.logs||!e)return null;let n=this.logs,r,i=!0,a=n.length;if(t=t||a&&n[a-1].key||0,typeof e==`object`)r=e,t&&t<=r.ts?r.key=t+1:r.key=r.ts;else{let o=zd(e);o?(r=o,t&&t<=o.ts&&(r.key=t+1)):(i=!1,a&&(r=n[a-1],r&&(typeof r.message==`object`?r.message=H.parseColorMessage(r.message.original+e):r.message+=e)))}if(!r)return null;if(typeof r.message!=`object`&&(r.message=H.parseColorMessage(r.message)),i){let e=r.key||0;if(a&&(n[a-1].key||0)>e){let t;for(t=a-1;t>=0&&!((n[t].key||0)<e);t--);t===-1?n.unshift(r):n.splice(t+1,0,r)}else n.push(r);a+1===this.maxLogs&&n.shift()}return{objLine:r,isNew:i}}sendToHost(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`timeout`)),Ld);try{this.socket.getRawSocket().emit(`sendToHost`,e,t,n,e=>{clearTimeout(a),r(e)})}catch(e){clearTimeout(a),i(e instanceof Error?e:Error(String(e)))}})}async askHostForLogLevelFilter(e){var t;let n=await this.socket.getObject(e),r=n==null||(t=n.common)==null||(t=t.installedVersion)==null?void 0:t.match(/^(\d+)\.(\d+)/);if(!r)return!1;let[i,a]=[parseInt(r[1],10),parseInt(r[2],10)];if(i<7||i===7&&a<2)return!1;let o=await this.sendToHost(e,`checkFeatureSupported`,`CONTROLLER_GET_LOGS_LOG_LEVEL`);return(o==null?void 0:o.result)===!0}isLogLevelFilterSupported(e){let t=this.logLevelFilterSupported.get(e);return t||(t=this.askHostForLogLevelFilter(e).catch(()=>!1),this.logLevelFilterSupported.set(e,t)),t}async readLogLines(e){let t=this.currentHost;return e&&await this.isLogLevelFilterSupported(t)?this.socket.getLogs(t,{lines:200,logLevel:e}):this.socket.getLogs(t,200)}getLogs(e,t){if(!this.currentHost)return Promise.resolve({logs:[],logSize:0});if(t!==this.lastLogLevel&&(this.lastLogLevel=t,e=!0),!e&&this.promise instanceof Promise)return this.promise;let n=this.errors,r=this.warnings;this.errors=0,this.warnings=0;let i=t!==`error`;return this.promise=this.readLogLines(t).then(e=>{if(e===`permissionError`||(e==null?void 0:e.error)!==void 0){let e=[];return this.logs=e,window.alert(`Cannot get logs: no permission`),{logs:e,logSize:0}}if(!Array.isArray(e)){let t=[];return this.logs=t,console.warn(`Cannot get logs: unexpected answer ${JSON.stringify(e)}`),{logs:t,logSize:0}}let t=e.pop(),a=0;typeof t==`string`&&(a=parseInt(t,10));let o=[];this.logs=o;let s;return e.forEach(e=>{let t=this._processLine(e,s);t!=null&&t.objLine&&(s=t.objLine.key,t.isNew&&t.objLine.severity===`error`&&this.countErrors&&this.errors++,t.isNew&&t.objLine.severity===`warn`&&this.countWarnings&&this.warnings++)}),o.length&&o[0].ts&&o.sort((e,t)=>e.ts>t.ts?1:e.ts<t.ts?-1:0),this.logSize=a,this.handlers.forEach(e=>e&&e(o,a)),n!==this.errors&&this.errorCountHandlers.forEach(e=>e&&e(this.errors)),i?r!==this.warnings&&this.warningCountHandlers.forEach(e=>e&&e(this.warnings)):this.warnings=r,{logs:o,logSize:a}}).catch(e=>(window.alert(`Cannot get logs: ${e}`),{logs:this.logs||[],logSize:0})),this.promise}clearLines(){this.logs=[],this.logSize=0,this.errors&&(this.errors=0,this.errorCountHandlers.forEach(e=>e&&e(this.errors))),this.warnings&&(this.warnings=0,this.warningCountHandlers.forEach(e=>e&&e(this.warnings)))}};x();var Vd=class e{static isTransientConnectionError(e){return/notconnected|not connected|connectionerror|close_abnormal|closed_no_status|websocket|timeout|networkerror/i.test(e instanceof Error?e.message:typeof e==`string`?e:``)}reportConnectionError(t,n){this.forceUpdate=!0,this.promise=null,e.isTransientConnectionError(n)?console.warn(`${t}: ${String(n)}`):console.error(`${t}: ${String(n)}`)}constructor(e,t,n){j(this,`socket`,void 0),j(this,`handlers`,[]),j(this,`promise`,null),j(this,`connected`,void 0),j(this,`objects`,null),j(this,`root`,void 0),j(this,`objectType`,void 0),j(this,`forceUpdate`,!1),j(this,`objectChangeHandler`,(e,t)=>{let n=e,r=t;if(this.objects=this.objects||{},this.checkObjectId(n,r)){let e,t;if(r){if((this.objectType===`adapter`||this.objectType===`instance`)&&H.fixAdminUI(r),this.objects[n]){if(JSON.stringify(this.objects[n])!==JSON.stringify(r))e=`changed`,this.objects[n]=r;else return}else e=`new`,this.objects[n]=r}else if(this.objects[n])e=`deleted`,t=this.objects[n],delete this.objects[n];else return;this.forceUpdate=!0,this.postProcessing(n,r),this.handlers.forEach(i=>i([{id:n,obj:r||void 0,type:e,oldObj:t}]))}}),j(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.handlers.length&&this.socket.subscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).then(()=>{this.getObjects(!0).then(e=>{e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))})}).catch(e=>this.reportConnectionError(`Cannot subscribe on object "${this.root}"`,e)),this.connectionPostHandler(!0)):!e&&this.connected&&(this.connected=!1,this.connectionPostHandler(!1))}),this.socket=e,this.root=t,this.objectType=n,e.registerConnectionHandler(this.connectionHandler),this.connected=this.socket.isConnected(),this.connected&&this.connectionHandler(!0)}checkObjectId(e,t){return e.startsWith(`${this.root}.`)&&(!t||t.type===this.objectType)}postProcessing(e,t){}isForceUpdate(){return this.forceUpdate}getObjects(e,t){if(e||=this.forceUpdate,this.forceUpdate=!1,!e&&this.promise instanceof Promise)return this.promise;let n=this.socket.getObjectViewSystem(this.objectType,this.root?`${this.root}.`:``,this.root?`${this.root}.\u9999`:`香`).then(e=>{let t=e;return this.objects=t,(this.objectType===`adapter`||this.objectType===`instance`)&&Object.keys(t).forEach(e=>H.fixAdminUI(t[e])),t}).catch(e=>{let r=`Cannot get objects of type ${this.objectType}, with root "${this.root}": ${e}`;return t?(console.warn(r),this.promise===n&&(this.promise=null)):this.reportConnectionError(`Cannot get objects of type ${this.objectType}, with root "${this.root}"`,e),null});return this.promise=n,n}connectionPostHandler(e){}registerHandler(e,t){this.handlers.includes(e)||(this.handlers.push(e),this.handlers.length===1&&this.connected&&this.socket.subscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).then(()=>{t||this.getObjects(!0).then(e=>{e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))})}).catch(e=>this.reportConnectionError(`Cannot subscribe on objects "${this.root}"`,e)))}unregisterHandler(e){let t=this.handlers.indexOf(e);t!==-1&&(this.handlers.splice(t,1),!this.handlers.length&&this.connected&&this.socket.unsubscribeObject(this.root?`${this.root}.*`:`*`,this.objectChangeHandler).catch(e=>this.reportConnectionError(`Cannot unsubscribe from objects "${this.root}"`,e)))}destroy(){this.handlers.forEach(e=>this.unregisterHandler(e)),this.socket.unregisterConnectionHandler(this.connectionHandler)}},Hd=class extends Vd{constructor(e){super(e,`system.adapter`,`instance`)}};x();var Ud=class extends Vd{constructor(e){super(e,`system.host`,`host`),j(this,`aliveHandlers`,[]),j(this,`notificationsHandlers`,[]),j(this,`aliveStates`,{}),j(this,`notificationPromises`,{}),j(this,`notificationTimer`,null),j(this,`subscribeTs`,void 0),j(this,`aliveChangeHandler`,(e,t)=>{if(e.startsWith(`system.host.`)&&e.endsWith(`.alive`)){let n;if(e=e.replace(/\.alive$/,``),t){if(this.aliveStates[e]!==void 0){if(!!this.aliveStates[e]!=!!(t!=null&&t.val))n=`changed`,this.aliveStates[e]=!!(t!=null&&t.val);else return}else n=`new`,this.aliveStates[e]=!!(t!=null&&t.val)}else if(this.aliveStates[e])n=`deleted`,delete this.aliveStates[e];else return;this.aliveHandlers.forEach(t=>t&&t([{id:e,alive:this.aliveStates[e],type:n}]))}}),j(this,`onNotificationHandler`,e=>{let t=e.replace(/\.notifications\..+$/,``);(!this.subscribeTs||Date.now()-this.subscribeTs>500)&&(this.notificationTimer&&clearTimeout(this.notificationTimer),this.notificationTimer=setTimeout(e=>{this.notificationTimer=null,this.notificationPromises[e]=this._getNotificationsFromHosts(e,!0),this.notificationPromises[e].then(e=>e&&this.notificationsHandlers.forEach(t=>t(e)))},300,t))}),this.aliveHandlers=[],this.notificationsHandlers=[],this.notificationPromises={},this.aliveStates={}}connectionPostHandler(e){e?this.aliveHandlers.length&&this.socket.subscribeState(`system.host.*.alive`,this.aliveChangeHandler):Object.keys(this.aliveStates).forEach(e=>this.aliveStates[e]=!1)}registerAliveHandler(e){this.aliveHandlers.includes(e)||(this.aliveHandlers.push(e),this.aliveHandlers.length===1&&this.connected&&this.socket.subscribeState(`system.host.*.alive`,this.aliveChangeHandler))}unregisterAliveHandler(e){let t=this.aliveHandlers.indexOf(e);t!==-1&&(this.aliveHandlers.splice(t,1),!this.aliveHandlers.length&&this.connected&&this.socket.unsubscribeState(`system.host.*.alive`,this.aliveChangeHandler))}_getNotificationsFromHosts(e,t){return!t&&this.notificationPromises[e]instanceof Promise||(this.notificationPromises[e]=this.socket.getState(`${e}.alive`).then(t=>t!=null&&t.val?this.socket.getNotifications(e,``).then(t=>({[e]:t||null})).catch(t=>(console.warn(`Cannot read notifications from "${e}": ${t}`),{[e]:null})):Promise.resolve({[e]:null}))),this.notificationPromises[e]}async getNotifications(e,t){if(e)return this._getNotificationsFromHosts(e,t);let n=(await this.socket.getCompactHosts(t)).map(e=>this._getNotificationsFromHosts(e._id,t)),r=await Promise.all(n),i={};return r.forEach(e=>Object.assign(i,e)),i}registerNotificationHandler(e){this.notificationsHandlers.includes(e)||(this.notificationsHandlers.push(e),this.notificationsHandlers.length===1&&this.connected&&(this.subscribeTs=Date.now(),this.socket.subscribeState(`system.host.*.notifications.*`,this.onNotificationHandler)))}unregisterNotificationHandler(e){let t=this.notificationsHandlers.indexOf(e);t!==-1&&(this.notificationsHandlers.splice(t,1),!this.notificationsHandlers.length&&this.connected&&this.socket.unsubscribeState(`system.host.*.notifications.*`,this.onNotificationHandler))}};x();var Wd=class extends Vd{constructor(e){super(e,`system.adapter`,`adapter`),j(this,`repositoryHandlers`,void 0),j(this,`repoTimer`,null),j(this,`lastActiveRepo`,void 0),j(this,`repoChangeHandler`,()=>{this.repoTimer&&clearTimeout(this.repoTimer),this.repoTimer=setTimeout(()=>{this.repoTimer=null,this.repositoryHandlers.forEach(e=>e())},500)}),j(this,`systemConfigChangeHandler`,(e,t)=>{if(e!==`system.config`||!(t!=null&&t.common))return;let n=t.common.activeRepo;JSON.stringify(this.lastActiveRepo)!==JSON.stringify(n)&&(this.lastActiveRepo=n,this.repoChangeHandler())}),this.repositoryHandlers=[],this.lastActiveRepo=void 0}checkObjectId(e,t){return!!e.match(/^system\.adapter\.[^.]+$/)&&(!t||t.type===this.objectType)}postProcessing(e,t){this.socket.getAdaptersResetCache(),this.socket.getInstalledResetCache(``),this.socket.getRepositoryResetCache(``)}registerRepositoryHandler(e){this.repositoryHandlers.includes(e)||(this.repositoryHandlers.push(e),this.repositoryHandlers.length===1&&this.connected&&(this.socket.subscribeObject(`system.repositories`,this.repoChangeHandler).catch(e=>window.alert(`Cannot subscribe on object: ${e}`)),this.socket.subscribeObject(`system.config`,this.systemConfigChangeHandler).catch(e=>window.alert(`Cannot subscribe on system.config: ${e}`)),this.socket.getCompactSystemConfig().then(e=>{this.lastActiveRepo=e.common.activeRepo}).catch(e=>console.warn(`Cannot get initial system config: ${e}`))))}unregisterRepositoryHandler(e){let t=this.repositoryHandlers.indexOf(e);t!==-1&&this.repositoryHandlers.splice(t,1),!this.repositoryHandlers.length&&this.connected&&(this.socket.unsubscribeObject(`system.repositories`,this.repoChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on object: ${e}`)),this.socket.unsubscribeObject(`system.config`,this.systemConfigChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on system.config: ${e}`)))}};x();var Gd=class{constructor(e){j(this,`socket`,void 0),j(this,`handlers`,void 0),j(this,`promise`,void 0),j(this,`connected`,void 0),j(this,`objects`,void 0),j(this,`objectChangeHandler`,(e,t)=>{this.objects=this.objects||{};let n,r;if(t){if((t.type===`instance`||t.type===`adapter`)&&H.fixAdminUI(t),this.objects[e]){if(n=this.objects[e],this.objects[e]===t||JSON.stringify(this.objects[e])===JSON.stringify(t))return;r=`changed`,this.objects[e]=t}else r=`new`,this.objects[e]=t}else this.objects[e]?(n=this.objects[e],r=`deleted`,delete this.objects[e]):r=`deleted`;this.handlers.forEach(i=>i([{id:e,obj:t||void 0,type:r,oldObj:n}]))}),j(this,`connectionHandler`,e=>{e&&!this.connected?(this.connected=!0,this.handlers.length&&(this.socket.subscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot subscribe on objects: ${e}`)),this.getObjects(!0).then(e=>e&&Object.keys(e).forEach(t=>this.objectChangeHandler(t,e[t]))))):!e&&this.connected&&(this.connected=!1)}),this.socket=e,this.handlers=[],this.promise=null,e.registerConnectionHandler(this.connectionHandler),this.connected=this.socket.isConnected(),this.objects=null}getObjects(e){return!e&&this.promise instanceof Promise||(this.promise=this.socket.getObjects(!0,!0).then(e=>(this.objects=e,this.objects)).catch(e=>window.alert(`Cannot get objects: ${e}`))),this.promise}registerHandler(e){this.handlers.includes(e)||(this.handlers.push(e),this.handlers.length===1&&this.connected&&this.socket.subscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot subscribe on object: ${e}`)))}unregisterHandler(e,t){let n=this.handlers.indexOf(e);n!==-1&&this.handlers.splice(n,1),!this.handlers.length&&this.connected&&!t&&this.socket.unsubscribeObject(`*`,this.objectChangeHandler).catch(e=>window.alert(`Cannot unsubscribe on object: ${e}`))}};function Kd(){}function qd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Jd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xd={};function Zd(e,t){return((t||Xd).jsx?Yd:Jd).test(e)}var Qd=/[ \t\n\f\r]/g;function $d(e){return typeof e==`object`?e.type===`text`&&ef(e.value):ef(e)}function ef(e){return e.replace(Qd,``)===``}var tf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};tf.prototype.normal={},tf.prototype.property={},tf.prototype.space=void 0;function nf(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tf(n,r,t)}function rf(e){return e.toLowerCase()}var af=class{constructor(e,t){this.attribute=t,this.property=e}};af.prototype.attribute=``,af.prototype.booleanish=!1,af.prototype.boolean=!1,af.prototype.commaOrSpaceSeparated=!1,af.prototype.commaSeparated=!1,af.prototype.defined=!1,af.prototype.mustUseProperty=!1,af.prototype.number=!1,af.prototype.overloadedBoolean=!1,af.prototype.property=``,af.prototype.spaceSeparated=!1,af.prototype.space=void 0;var of=t({boolean:()=>Z,booleanish:()=>cf,commaOrSpaceSeparated:()=>ff,commaSeparated:()=>df,number:()=>Q,overloadedBoolean:()=>lf,spaceSeparated:()=>uf}),sf=0,Z=pf(),cf=pf(),lf=pf(),Q=pf(),uf=pf(),df=pf(),ff=pf();function pf(){return 2**++sf}var mf=Object.keys(of),hf=class extends af{constructor(e,t,n,r){let i=-1;if(super(e,t),gf(this,`space`,r),typeof n==`number`)for(;++i<mf.length;){let e=mf[i];gf(this,mf[i],(n&of[e])===of[e])}}};hf.prototype.defined=!0;function gf(e,t,n){n&&(e[t]=n)}function _f(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new hf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rf(r)]=r,n[rf(a.attribute)]=r}return new tf(t,n,e.space)}var vf=_f({properties:{ariaActiveDescendant:null,ariaAtomic:cf,ariaAutoComplete:null,ariaBusy:cf,ariaChecked:cf,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:uf,ariaCurrent:null,ariaDescribedBy:uf,ariaDetails:null,ariaDisabled:cf,ariaDropEffect:uf,ariaErrorMessage:null,ariaExpanded:cf,ariaFlowTo:uf,ariaGrabbed:cf,ariaHasPopup:null,ariaHidden:cf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:uf,ariaLevel:Q,ariaLive:null,ariaModal:cf,ariaMultiLine:cf,ariaMultiSelectable:cf,ariaOrientation:null,ariaOwns:uf,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:cf,ariaReadOnly:cf,ariaRelevant:null,ariaRequired:cf,ariaRoleDescription:uf,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:cf,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function yf(e,t){return t in e?e[t]:t}function bf(e,t){return yf(e,t.toLowerCase())}var xf=_f({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:df,acceptCharset:uf,accessKey:uf,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:uf,autoFocus:Z,autoPlay:Z,blocking:uf,capture:null,charSet:null,checked:Z,cite:null,className:uf,cols:Q,colSpan:null,content:null,contentEditable:cf,controls:Z,controlsList:uf,coords:Q|df,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:lf,draggable:cf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:uf,height:Q,hidden:lf,high:Q,href:null,hrefLang:null,htmlFor:uf,httpEquiv:uf,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:uf,itemRef:uf,itemScope:Z,itemType:uf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:uf,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:uf,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:uf,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:cf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:cf,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:uf,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:cf,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:bf}),Sf=_f({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:ff,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:uf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:df,g2:df,glyphName:df,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:ff,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:uf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ff,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ff,rev:ff,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ff,requiredFeatures:ff,requiredFonts:ff,requiredFormats:ff,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:ff,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ff,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ff,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:yf}),Cf=_f({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),wf=_f({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:bf}),Tf=_f({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ef={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Df=/[A-Z]/g,Of=/-[a-z]/g,kf=/^data[-\w.:]+$/i;function Af(e,t){let n=rf(t),r=t,i=af;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&kf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Of,Mf);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Of.test(e)){let n=e.replace(Df,jf);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=hf}return new i(r,t)}function jf(e){return`-`+e.toLowerCase()}function Mf(e){return e.charAt(1).toUpperCase()}var Nf=nf([vf,xf,Cf,wf,Tf],`html`),Pf=nf([vf,Sf,Cf,wf,Tf],`svg`);function Ff(e){return e.join(` `).trim()}var If=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,d=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
136
|
+
`);d=~n?e.length-n:d+e.length}function p(){var e={line:l,column:d};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function g(n){var r=Error(t.source+`:`+l+`:`+d+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=d,r.source=e,t.silent)h.push(r);else throw r}function _(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function v(){_(i)}function y(e){var t;for(e||=[];t=b();)t!==!1&&e.push(t);return e}function b(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return g(`End of comment missing`);var r=e.slice(2,n-2);return d+=2,f(r),e=e.slice(n),d+=2,t({type:`comment`,comment:r})}}function x(){var e=p(),t=_(a);if(t){if(b(),!_(o))return g(`property missing ':'`);var r=_(s),i=e({type:`declaration`,property:u(t[0].replace(n,``)),value:r?u(r[0].replace(n,``)):``});return _(c),i}}function ee(){var e=[];y(e);for(var t;t=x();)t!==!1&&(e.push(t),y(e));return e}return v(),ee()};function u(e){return e?e.replace(l,``):``}})),Lf=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(If());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Rf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),zf=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Lf()),i=Rf();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Bf=Hf(`end`),Vf=Hf(`start`);function Hf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Uf(e){let t=Vf(e),n=Bf(e);if(t&&n)return{start:t,end:n}}function Wf(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Kf(e.position):`start`in e||`end`in e?Kf(e):`line`in e||`column`in e?Gf(e):``}function Gf(e){return qf(e&&e.line)+`:`+qf(e&&e.column)}function Kf(e){return Gf(e&&e.start)+`-`+Gf(e&&e.end)}function qf(e){return e&&typeof e==`number`?e:1}var Jf=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Wf(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Jf.prototype.file=``,Jf.prototype.name=``,Jf.prototype.reason=``,Jf.prototype.message=``,Jf.prototype.stack=``,Jf.prototype.column=void 0,Jf.prototype.line=void 0,Jf.prototype.ancestors=void 0,Jf.prototype.cause=void 0,Jf.prototype.fatal=void 0,Jf.prototype.place=void 0,Jf.prototype.ruleId=void 0,Jf.prototype.source=void 0;var Yf=e(zf(),1),Xf={}.hasOwnProperty,Zf=new Map,Qf=/[A-Z]/g,$f=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ep=new Set([`td`,`th`]),tp=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function np(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=pp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=fp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Pf:Nf,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rp(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function rp(e,t,n){if(t.type===`element`)return ip(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ap(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return sp(e,t,n);if(t.type===`mdxjsEsm`)return op(e,t);if(t.type===`root`)return cp(e,t,n);if(t.type===`text`)return lp(e,t)}function ip(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Pf,e.schema=i),e.ancestors.push(t);let a=yp(e,t.tagName,!1),o=mp(e,t),s=gp(e,t);return $f.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!$d(e)})),up(e,o,a,t),dp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ap(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}bp(e,t.position)}function op(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bp(e,t.position)}function sp(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Pf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:yp(e,t.name,!0),o=hp(e,t),s=gp(e,t);return up(e,o,a,t),dp(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cp(e,t,n){let r={};return dp(r,gp(e,t)),e.create(t,e.Fragment,r,n)}function lp(e,t){return t.value}function up(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function dp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function pp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Vf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function mp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Xf.call(t.properties,i)){let a=_p(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ep.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function hp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else bp(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else bp(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function gp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Zf;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=rp(e,a,o);s!==void 0&&n.push(s)}return n}function _p(e,t,n){let r=Af(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?qd(n):Ff(n)),r.property===`style`){let t=typeof n==`object`?n:vp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=xp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ef[r.property]||r.property:r.attribute,n]}}function vp(e,t){try{return(0,Yf.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Jf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=tp+`#cannot-parse-style-attribute`,r}}function yp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Zd(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Zd(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Xf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);bp(e)}function bp(e,t){let n=new Jf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=tp+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function xp(e){let t={},n;for(n in e)Xf.call(e,n)&&(t[Sp(n)]=e[n]);return t}function Sp(e){let t=e.replace(Qf,Cp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Cp(e){return`-`+e.toLowerCase()}var wp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Tp={};function Ep(e,t){let n=t||Tp;return Dp(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Dp(e,t,n){if(kp(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Op(e.children,t,n)}return Array.isArray(e)?Op(e,t,n):``}function Op(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Dp(e[i],t,n);return r.join(``)}function kp(e){return!!(e&&typeof e==`object`)}var Ap=document.createElement(`i`);function jp(e){let t=`&`+e+`;`;Ap.innerHTML=t;let n=Ap.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Mp(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Np(e,t){return e.length>0?(Mp(e,e.length,0,t),e):t}var Pp={}.hasOwnProperty;function Fp(e){let t={},n=-1;for(;++n<e.length;)Ip(t,e[n]);return t}function Ip(e,t){let n;for(n in t){let r=(Pp.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Pp.call(r,a)||(r[a]=[]);let e=i[a];Lp(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Lp(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Mp(e,0,0,r)}function Rp(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function zp(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Bp=Zp(/[A-Za-z]/),Vp=Zp(/[\dA-Za-z]/),Hp=Zp(/[#-'*+\--9=?A-Z^-~]/);function Up(e){return e!==null&&(e<32||e===127)}var Wp=Zp(/\d/),Gp=Zp(/[\dA-Fa-f]/),Kp=Zp(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function qp(e){return e!==null&&(e<0||e===32)}function Jp(e){return e===-2||e===-1||e===32}var Yp=Zp(/\p{P}|\p{S}/u),Xp=Zp(/\s/);function Zp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Qp(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Vp(e.charCodeAt(n+1))&&Vp(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $p(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Jp(r)?(e.enter(n),s(r)):t(r)}function s(r){return Jp(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var em={tokenize:tm};function tm(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$p(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var nm={tokenize:im},rm={tokenize:am};function im(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Mp(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rm,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(rm,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Mp(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function am(e,t,n){return $p(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function om(e){if(e===null||qp(e)||Xp(e))return 1;if(Yp(e))return 2}function sm(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var cm={name:`attention`,resolveAll:lm,tokenize:um};function lm(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};dm(d,-c),dm(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Np(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Np(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Np(l,sm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Np(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Np(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Mp(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function um(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=om(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=om(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function dm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var fm={name:`autolink`,tokenize:pm};function pm(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Bp(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Vp(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Vp(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Up(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Hp(t)?(e.consume(t),l):n(t)}function u(e){return Vp(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Vp(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var mm={partial:!0,tokenize:hm};function hm(e,t,n){return r;function r(t){return Jp(t)?$p(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var gm={continuation:{tokenize:vm},exit:ym,name:`blockQuote`,tokenize:_m};function _m(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Jp(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function vm(e,t,n){let r=this;return i;function i(t){return Jp(t)?$p(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(gm,t,n)(r)}}function ym(e){e.exit(`blockQuote`)}var bm={name:`characterEscape`,tokenize:xm};function xm(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Kp(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Sm={name:`characterReference`,tokenize:Cm};function Cm(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Vp,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Gp,u):(e.enter(`characterReferenceValue`),a=7,o=Wp,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Vp&&!jp(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var wm={partial:!0,tokenize:Dm},Tm={concrete:!0,name:`codeFenced`,tokenize:Em};function Em(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Jp(t)?$p(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(wm,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Jp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$p(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Jp(t)?$p(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(wm,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Jp(t)?$p(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Jp(t)?$p(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Dm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Om={name:`codeIndented`,tokenize:Am},km={partial:!0,tokenize:jm};function Am(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$p(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(km,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function jm(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$p(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var Mm={name:`codeText`,previous:Pm,resolve:Nm,tokenize:Fm};function Nm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Pm(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Fm(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Im=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Lm(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Lm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Lm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Lm(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Lm(this.left,t.reverse())}}}};function Lm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rm(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Im(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,zm(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Mp(e,0,1/0,u.slice(0)),!l}function zm(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Bm={resolve:Hm,tokenize:Um},Vm={partial:!0,tokenize:Wm};function Hm(e){return Rm(e),e}function Um(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(Vm,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Wm(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$p(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Gm(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Up(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||qp(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Up(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Km(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Jp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function qm(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$p(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Jm(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Jp(i)?$p(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ym={name:`definition`,tokenize:Zm},Xm={partial:!0,tokenize:Qm};function Zm(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Km.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return qp(t)?Jm(e,l)(t):l(t)}function l(t){return Gm(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Xm,d,d)(t)}function d(t){return Jp(t)?$p(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Qm(e,t,n){return r;function r(t){return qp(t)?Jm(e,i)(t):n(t)}function i(t){return qm(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Jp(t)?$p(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var $m={name:`hardBreakEscape`,tokenize:eh};function eh(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var th={name:`headingAtx`,resolve:nh,tokenize:rh};function nh(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Mp(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function rh(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||qp(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):Jp(n)?$p(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||qp(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var ih=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ah=[`pre`,`script`,`style`,`textarea`],oh={concrete:!0,name:`htmlFlow`,resolveTo:lh,tokenize:uh},sh={partial:!0,tokenize:fh},ch={partial:!0,tokenize:dh};function lh(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function uh(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:oe):Bp(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Bp(a)?(e.consume(a),i=4,r.interrupt?t:oe):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:oe):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:T:m):n(i)}function h(t){return Bp(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||qp(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ah.includes(l)?(i=1,r.interrupt?t(s):T(s)):ih.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):T(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Vp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:T):n(i)}function v(t){return Jp(t)?(e.consume(t),v):te(t)}function y(t){return t===47?(e.consume(t),te):t===58||t===95||Bp(t)?(e.consume(t),b):Jp(t)?(e.consume(t),y):te(t)}function b(t){return t===45||t===46||t===58||t===95||Vp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),ee):Jp(t)?(e.consume(t),x):y(t)}function ee(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):Jp(t)?(e.consume(t),ee):C(t)}function S(t){return t===c?(e.consume(t),c=null,w):t===null||$(t)?n(t):(e.consume(t),S)}function C(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||qp(t)?x(t):(e.consume(t),C)}function w(e){return e===47||e===62||Jp(e)?y(e):n(e)}function te(t){return t===62?(e.consume(t),ne):n(t)}function ne(t){return t===null||$(t)?T(t):Jp(t)?(e.consume(t),ne):n(t)}function T(t){return t===45&&i===2?(e.consume(t),ae):t===60&&i===1?(e.consume(t),D):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),oe):t===93&&i===5?(e.consume(t),k):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(sh,ce,E)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),E(t)):(e.consume(t),T)}function E(t){return e.check(ch,re,ce)(t)}function re(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return t===null||$(t)?E(t):(e.enter(`htmlFlowData`),T(t))}function ae(t){return t===45?(e.consume(t),oe):T(t)}function D(t){return t===47?(e.consume(t),o=``,O):T(t)}function O(t){if(t===62){let n=o.toLowerCase();return ah.includes(n)?(e.consume(t),se):T(t)}return Bp(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),O):T(t)}function k(t){return t===93?(e.consume(t),oe):T(t)}function oe(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),oe):T(t)}function se(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function dh(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function fh(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(mm,t,n)}}var ph={name:`htmlText`,tokenize:mh};function mh(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Bp(t)?(e.consume(t),C):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Bp(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,D(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ae(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,D(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ae(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ae(t):$(t)?(o=v,D(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,D(t)):(e.consume(t),y)}function b(e){return e===62?ae(e):y(e)}function x(t){return Bp(t)?(e.consume(t),ee):n(t)}function ee(t){return t===45||Vp(t)?(e.consume(t),ee):S(t)}function S(t){return $(t)?(o=S,D(t)):Jp(t)?(e.consume(t),S):ae(t)}function C(t){return t===45||Vp(t)?(e.consume(t),C):t===47||t===62||qp(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ae):t===58||t===95||Bp(t)?(e.consume(t),te):$(t)?(o=w,D(t)):Jp(t)?(e.consume(t),w):ae(t)}function te(t){return t===45||t===46||t===58||t===95||Vp(t)?(e.consume(t),te):ne(t)}function ne(t){return t===61?(e.consume(t),T):$(t)?(o=ne,D(t)):Jp(t)?(e.consume(t),ne):w(t)}function T(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,E):$(t)?(o=T,D(t)):Jp(t)?(e.consume(t),T):(e.consume(t),re)}function E(t){return t===i?(e.consume(t),i=void 0,ie):t===null?n(t):$(t)?(o=E,D(t)):(e.consume(t),E)}function re(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||qp(t)?w(t):(e.consume(t),re)}function ie(e){return e===47||e===62||qp(e)?w(e):n(e)}function ae(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function D(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),O}function O(t){return Jp(t)?$p(e,k,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):k(t)}function k(t){return e.enter(`htmlTextData`),o(t)}}var hh={name:`labelEnd`,resolveAll:yh,resolveTo:bh,tokenize:xh},gh={tokenize:Sh},_h={tokenize:Ch},vh={tokenize:wh};function yh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Mp(e,0,e.length,n),e}function bh(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Np(s,e.slice(a+1,a+r+3)),s=Np(s,[[`enter`,u,t]]),s=Np(s,sm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Np(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Np(s,e.slice(o+1)),s=Np(s,[[`exit`,c,t]]),Mp(e,a,e.length,s),e}function xh(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(zp(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(gh,u,o?u:d)(t):t===91?e.attempt(_h,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(vh,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Sh(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return qp(t)?Jm(e,a)(t):a(t)}function a(t){return t===41?u(t):Gm(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return qp(t)?Jm(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?qm(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return qp(t)?Jm(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ch(e,t,n){let r=this;return i;function i(t){return Km.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function wh(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Th={name:`labelStartImage`,resolveAll:hh.resolveAll,tokenize:Eh};function Eh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Dh={name:`labelStartLink`,resolveAll:hh.resolveAll,tokenize:Oh};function Oh(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var kh={name:`lineEnding`,tokenize:Ah};function Ah(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$p(e,t,`linePrefix`)}}var jh={name:`thematicBreak`,tokenize:Mh};function Mh(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Jp(t)?$p(e,s,`whitespace`)(t):s(t))}}var Nh={continuation:{tokenize:Lh},exit:zh,name:`list`,tokenize:Ih},Ph={partial:!0,tokenize:Bh},Fh={partial:!0,tokenize:Rh};function Ih(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Wp(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(jh,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Wp(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(mm,r.interrupt?n:u,e.attempt(Ph,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Jp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Lh(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(mm,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$p(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Jp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Fh,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$p(e,e.attempt(Nh,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Rh(e,t,n){let r=this;return $p(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function zh(e){e.exit(this.containerState.type)}function Bh(e,t,n){let r=this;return $p(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Jp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Vh={name:`setextUnderline`,resolveTo:Hh,tokenize:Uh};function Hh(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Uh(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Jp(t)?$p(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Wh={tokenize:Gh};function Gh(e){let t=this,n=e.attempt(mm,r,e.attempt(this.parser.constructs.flowInitial,i,$p(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Bm,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Kh={resolveAll:Xh()},qh=Yh(`string`),Jh=Yh(`text`);function Yh(e){return{resolveAll:Xh(e===`text`?Zh:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Xh(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Zh(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Qh=t({attentionMarkers:()=>og,contentInitial:()=>eg,disable:()=>sg,document:()=>$h,flow:()=>ng,flowInitial:()=>tg,insideSpan:()=>ag,string:()=>rg,text:()=>ig}),$h={42:Nh,43:Nh,45:Nh,48:Nh,49:Nh,50:Nh,51:Nh,52:Nh,53:Nh,54:Nh,55:Nh,56:Nh,57:Nh,62:gm},eg={91:Ym},tg={[-2]:Om,[-1]:Om,32:Om},ng={35:th,42:jh,45:[Vh,jh],60:oh,61:Vh,95:jh,96:Tm,126:Tm},rg={38:Sm,92:bm},ig={[-5]:kh,[-4]:kh,[-3]:kh,33:Th,38:Sm,42:cm,60:[fm,ph],91:Dh,92:[$m,bm],93:hh,95:cm,96:Mm},ag={null:[cm,Kh]},og={null:[42,95]},sg={null:[]};function cg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(x),check:S(ee),consume:v,enter:y,exit:b,interrupt:S(ee,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Np(o,e),g(),o[o.length-1]===null?(C(t,0),l.events=sm(a,l.events,l),l.events):[]}function f(e,t){return ug(p(e),t)}function p(e){return lg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,te()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,te()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){C(e,t.from)}function ee(e,t){t.restore()}function S(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=w(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function C(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Mp(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function w(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,te()}}function te(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lg(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ug(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
137
137
|
`;break;case-3:o=`\r
|
|
138
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ug(e){let t={constructs:Pp([Zh,...(e||{}).extensions||[]]),content:n($p),defined:[],document:n(tm),flow:n(Uh),lazy:{},string:n(Kh),text:n(qh)};return t;function n(e){return n;function n(n){return sg(t,e,n)}}}function dg(e){for(;!Lm(e););return e}var fg=/[\0\t\n\r]/g;function pg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(fg.lastIndex=u,c=fg.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var mg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hg(e){return e.replace(mg,gg)}function gg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Lp(n.slice(t?2:1),t?16:10)}return Ap(n)||e}var _g={}.hasOwnProperty;function vg(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),yg(n)(dg(ug(n).document().write(pg()(e,t,!0))))}function yg(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(we),autolinkProtocol:w,autolinkEmail:w,atxHeading:a(be),blockQuote:a(he),characterEscape:w,characterReference:w,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:w,data:w,codeFlowValue:w,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ye),hardBreakEscape:a(xe),hardBreakTrailing:a(xe),htmlFlow:a(Se,o),htmlFlowData:w,htmlText:a(Se,o),htmlTextData:w,image:a(Ce),label:o,link:a(we),listItem:a(Ee),listItemValue:f,listOrdered:a(Te,d),listUnordered:a(Te),paragraph:a(De),reference:ce,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(be),strong:a(Oe),thematicBreak:a(M)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:c(_),codeText:c(re),codeTextData:T,data:T,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(E),hardBreakTrailing:c(E),htmlFlow:c(D),htmlFlowData:T,htmlText:c(ne),htmlTextData:T,image:c(O),label:A,labelText:k,lineEnding:te,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:ae,resourceTitleString:oe,resource:se,setextHeading:c(C),setextHeadingLineSequence:S,setextHeadingText:ee,strong:c(),thematicBreak:c()}};xg(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];_g.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Cg).call(a,void 0,e[0])}for(r.position={start:bg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:bg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:bg(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Cg).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Uf({start:e.start,end:e.end})+`): it’s not open`);n.position.end=bg(e.end)}function u(){return Tp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Rp(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function ee(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function w(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=j(),n.position={start:bg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=bg(e.end)}function te(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=bg(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(w.call(this,e),T.call(this,e))}function E(){this.data.atHardBreak=!0}function D(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function k(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=hg(t),n.identifier=Rp(t).toLowerCase()}function A(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function se(){this.data.inReference=void 0}function ce(){this.data.referenceType=`collapsed`}function le(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Rp(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ue(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Lp(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Ap(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=bg(e.end)}function pe(e){T.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){T.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function ve(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ye(){return{type:`emphasis`,children:[]}}function be(){return{type:`heading`,depth:0,children:[]}}function xe(){return{type:`break`}}function Se(){return{type:`html`,value:``}}function Ce(){return{type:`image`,title:null,url:``,alt:null}}function we(){return{type:`link`,title:null,url:``,children:[]}}function Te(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ee(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function De(){return{type:`paragraph`,children:[]}}function Oe(){return{type:`strong`,children:[]}}function j(){return{type:`text`,value:``}}function M(){return{type:`thematicBreak`}}}function bg(e){return{line:e.line,column:e.column,offset:e.offset}}function xg(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?xg(e,r):Sg(e,r)}}function Sg(e,t){let n;for(n in t)if(_g.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Cg(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Uf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Uf({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Uf({start:t.start,end:t.end})+`) is still open`)}function wg(e){let t=this;t.parser=n;function n(n){return vg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Tg(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Eg(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
139
|
-
`}]}function
|
|
140
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
138
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function dg(e){let t={constructs:Fp([Qh,...(e||{}).extensions||[]]),content:n(em),defined:[],document:n(nm),flow:n(Wh),lazy:{},string:n(qh),text:n(Jh)};return t;function n(e){return n;function n(n){return cg(t,e,n)}}}function fg(e){for(;!Rm(e););return e}var pg=/[\0\t\n\r]/g;function mg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(pg.lastIndex=u,c=pg.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var hg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gg(e){return e.replace(hg,_g)}function _g(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Rp(n.slice(t?2:1),t?16:10)}return jp(n)||e}var vg={}.hasOwnProperty;function yg(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),bg(n)(fg(dg(n).document().write(mg()(e,t,!0))))}function bg(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Te),autolinkProtocol:w,autolinkEmail:w,atxHeading:a(xe),blockQuote:a(ge),characterEscape:w,characterReference:w,codeFenced:a(_e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(_e,o),codeText:a(ve,o),codeTextData:w,data:w,codeFlowValue:w,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(be),hardBreakEscape:a(Se),hardBreakTrailing:a(Se),htmlFlow:a(Ce,o),htmlFlowData:w,htmlText:a(Ce,o),htmlTextData:w,image:a(we),label:o,link:a(Te),listItem:a(De),listItemValue:f,listOrdered:a(Ee,d),listUnordered:a(Ee),paragraph:a(Oe),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(ke),thematicBreak:a(j)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:he,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:te,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:te,codeIndented:c(_),codeText:c(ie),codeTextData:te,data:te,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(T),hardBreakTrailing:c(T),htmlFlow:c(E),htmlFlowData:te,htmlText:c(re),htmlTextData:te,image:c(D),label:k,labelText:O,lineEnding:ne,link:c(ae),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:oe,resourceTitleString:se,resource:ce,setextHeading:c(C),setextHeadingLineSequence:S,setextHeadingText:ee,strong:c(),thematicBreak:c()}};Sg(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];vg.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||wg).call(a,void 0,e[0])}for(r.position={start:xg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:xg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:xg(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||wg).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Wf({start:e.start,end:e.end})+`): it’s not open`);n.position.end=xg(e.end)}function u(){return Ep(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function ee(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function w(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=A(),n.position={start:xg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function te(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=xg(e.end)}function ne(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=xg(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(w.call(this,e),te.call(this,e))}function T(){this.data.atHardBreak=!0}function E(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=gg(t),n.identifier=zp(t).toLowerCase()}function k(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Rp(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=jp(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=xg(e.end)}function me(e){te.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){te.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[]}}function _e(){return{type:`code`,lang:null,meta:null,value:``}}function ve(){return{type:`inlineCode`,value:``}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function be(){return{type:`emphasis`,children:[]}}function xe(){return{type:`heading`,depth:0,children:[]}}function Se(){return{type:`break`}}function Ce(){return{type:`html`,value:``}}function we(){return{type:`image`,title:null,url:``,alt:null}}function Te(){return{type:`link`,title:null,url:``,children:[]}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Oe(){return{type:`paragraph`,children:[]}}function ke(){return{type:`strong`,children:[]}}function A(){return{type:`text`,value:``}}function j(){return{type:`thematicBreak`}}}function xg(e){return{line:e.line,column:e.column,offset:e.offset}}function Sg(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Sg(e,r):Cg(e,r)}}function Cg(e,t){let n;for(n in t)if(vg.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function wg(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Wf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wf({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Wf({start:t.start,end:t.end})+`) is still open`)}function Tg(e){let t=this;t.parser=n;function n(n){return yg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Eg(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Dg(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
139
|
+
`}]}function Og(e,t){let n=t.value?t.value+`
|
|
140
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function kg(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ag(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jg(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Qp(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Mg(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ng(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Pg(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Fg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Pg(e,t);let i={src:Qp(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ig(e,t){let n={src:Qp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Lg(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Rg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Pg(e,t);let i={href:Qp(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zg(e,t){let n={href:Qp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Bg(e,t,n){let r=e.all(t),i=n?Vg(n):Hg(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
141
141
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
142
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
142
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Vg(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Hg(n[r])}return t}function Hg(e){return e.spread??e.children.length>1}function Ug(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Wg(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Gg(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Kg(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qg(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Vf(t.children[1]),o=Bf(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Jg(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Yg(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Xg=9,Zg=32;function Qg(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push($g(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push($g(t.slice(i),i>0,!1)),a.join(``)}function $g(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Xg||t===Zg;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Xg||t===Zg;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function e_(e,t){let n={type:`text`,value:Qg(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function t_(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var n_={blockquote:Eg,break:Dg,code:Og,delete:kg,emphasis:Ag,footnoteReference:jg,heading:Mg,html:Ng,imageReference:Fg,image:Ig,inlineCode:Lg,linkReference:Rg,link:zg,listItem:Bg,list:Ug,paragraph:Wg,root:Gg,strong:Kg,table:qg,tableCell:Yg,tableRow:Jg,text:e_,thematicBreak:t_,toml:r_,yaml:r_,definition:r_,footnoteDefinition:r_};function r_(){}var i_=typeof self==`object`?self:globalThis,a_=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new i_[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new i_[a](o),i)};return r},o_=e=>a_(new Map,e)(0),s_=``,{toString:c_}={},{keys:l_}=Object,u_=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=c_.call(e).slice(8,-1);switch(n){case`Array`:return[1,s_];case`Object`:return[2,s_];case`Date`:return[3,s_];case`RegExp`:return[4,s_];case`Map`:return[5,s_];case`Set`:return[6,s_];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},d_=([e,t])=>e===0&&(t===`function`||t===`symbol`),f_=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=u_(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of l_(r))(e||!d_(u_(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(d_(u_(n))||d_(u_(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!d_(u_(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},p_=(e,{json:t,lossy:n}={})=>{let r=[];return f_(!(t||n),!!t,new Map,r)(e),r},m_=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?o_(p_(e,t)):structuredClone(e):(e,t)=>o_(p_(e,t));function h_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function g_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function __(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||h_,r=e.options.footnoteBackLabel||g_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Qp(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...m_(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
143
143
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
144
|
-
`}]}}var
|
|
144
|
+
`}]}}var v_=(function(e){if(e==null)return C_;if(typeof e==`function`)return S_(e);if(typeof e==`object`)return Array.isArray(e)?y_(e):b_(e);if(typeof e==`string`)return x_(e);throw Error(`Expected function, string, or object as test`)});function y_(e){let t=[],n=-1;for(;++n<e.length;)t[n]=v_(e[n]);return S_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function b_(e){let t=e;return S_(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function x_(e){return S_(t);function t(t){return t&&t.type===e}}function S_(e){return t;function t(t,n,r){return!!(w_(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function C_(){return!0}function w_(e){return typeof e==`object`&&!!e&&`type`in e}function T_(e){return e}var E_=[];function D_(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=v_(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+T_(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=E_,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=O_(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function O_(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?E_:[e]}function k_(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),D_(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var A_={}.hasOwnProperty,j_={};function M_(e,t){let n=t||j_,r=new Map,i=new Map,a={all:s,applyData:P_,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...n_,...n.handlers},one:o,options:n,patch:N_,wrap:I_};return k_(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(A_.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=m_(n);return r.children=a.all(e),r}return m_(e)}return(a.options.unknownHandler||F_)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=L_(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=L_(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function N_(e,t){e.position&&(t.position=Uf(e))}function P_(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,m_(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function F_(e,t){let n=t.data||{},r=`value`in t&&!(A_.call(n,`hProperties`)||A_.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function I_(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
145
145
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
146
146
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
147
|
-
`}),n}function
|
|
148
|
-
`},i)),a}function R_(e,t){return e&&`run`in e?async function(n,r){let i=L_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return L_(n,{file:r,...e||t})}}function z_(e){if(e)throw e}var B_=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function V_(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function H_(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?U_(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function U_(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var W_={basename:G_,dirname:K_,extname:q_,join:J_,sep:`/`};function G_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Z_(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function K_(e){if(Z_(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function q_(e){Z_(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function J_(...e){let t=-1,n;for(;++t<e.length;)Z_(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Y_(n)}function Y_(e){Z_(e);let t=e.codePointAt(0)===47,n=X_(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function X_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Z_(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Q_={cwd:$_};function $_(){return`/`}function ev(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function tv(e){if(typeof e==`string`)e=new URL(e);else if(!ev(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return nv(e)}function nv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var rv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],iv=class{constructor(e){let t;t=e?ev(e)?{path:e}:typeof e==`string`||cv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Q_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<rv.length;){let e=rv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)rv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?W_.basename(this.path):void 0}set basename(e){ov(e,`basename`),av(e,`basename`),this.path=W_.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?W_.dirname(this.path):void 0}set dirname(e){sv(this.basename,`dirname`),this.path=W_.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?W_.extname(this.path):void 0}set extname(e){if(av(e,`extname`),sv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=W_.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ev(e)&&(e=tv(e)),ov(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?W_.basename(this.path,this.extname):void 0}set stem(e){ov(e,`stem`),av(e,`stem`),this.path=W_.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new qf(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function av(e,t){if(e&&e.includes(W_.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+W_.sep+"`")}function ov(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function sv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function cv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var lv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),uv=e(B_(),1),dv={}.hasOwnProperty,fv=new class e extends lv{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=H_()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,uv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(hv(`data`,this.frozen),this.namespace[e]=t,this):dv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(hv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=vv(e),n=this.parser||this.Parser;return pv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),pv(`process`,this.parser||this.Parser),mv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=vv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);bv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),pv(`processSync`,this.parser||this.Parser),mv(`processSync`,this.compiler||this.Compiler),this.process(e,r),_v(`processSync`,`process`,t),n;function r(e,r){t=!0,z_(e),n=r}}run(e,t,n){gv(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=vv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),_v(`runSync`,`run`,n),r;function i(e,t){z_(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=vv(t),r=this.compiler||this.Compiler;return mv(`stringify`,r),gv(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(hv(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,uv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];V_(o)&&V_(r)&&(r=(0,uv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function pv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function mv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function hv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gv(e){if(!V_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function _v(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vv(e){return yv(e)?e:new iv(e)}function yv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function bv(e){return typeof e==`string`||xv(e)}function xv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Sv=[],Cv={allowDangerousHtml:!0},wv=/^(https?|ircs?|mailto|xmpp)$/i,Tv=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ev(e){let t=Dv(e),n=Ov(e);return kv(t.runSync(t.parse(n),n),e)}function Dv(e){let t=e.rehypePlugins||Sv,n=e.remarkPlugins||Sv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cv}:Cv;return fv().use(wg).use(n).use(R_,r).use(t)}function Ov(e){let t=e.children||``,n=new iv;return typeof t==`string`?n.value=t:``+t,n}function kv(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Av;for(let e of Tv)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return O_(e,l),tp(e,{Fragment:je,components:i,ignoreInvalidStyle:!0,jsx:E,jsxs:N,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Cp)if(Object.hasOwn(Cp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Cp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Av(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||wv.test(e.slice(0,t))?e:``}var jv={root:{backgroundColor:`background.paper`,width:`100%`,height:`auto`,display:`flex`,"& .markdown":{margin:0,p:`10px`,width:`100%`,height:`100%`,overflow:`auto`}},paper:{maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},pre:{overflow:`auto`,whiteSpace:`pre-wrap`,margin:0,padding:10,width:`100%`},header1:{backgroundColor:`primary.main`,color:`primary.contrastText`,borderRadius:`2px`,pl:1,pr:1,pb:`4px`},header2:{backgroundColor:`secondary.main`,color:`secondary.contrastText`,borderRadius:`2px`,pl:1,pr:1,pb:`4px`}};function Mv({url:e,link:t,onClose:n,licenseType:r}){let[i,a]=z(``),[o,s]=z(!0),[c,l]=z(!1),[d,f]=z(!1),p=Ht.useRef(null),m=Ht.useRef(null),h=Ht.useRef(void 0),[g,_]=z(e);g!==e&&(_(e),s(!0),l(!1),f(!1),a(``)),Yt(()=>{let t=e;t.startsWith(`https://github.com/`)&&(t=t.replace(`https://github.com/`,`https://raw.githubusercontent.com/`).replace(`/blob/`,`/`));let n=()=>{l(!0),f(!0),s(!1)};if(!t){n();return}let r=()=>fetch(t).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()});r().then(e=>{a(e),s(!1)}).catch(e=>{console.error(`Cannot read license 1 from "${t}": ${e}`),r().then(e=>{a(e),s(!1)}).catch(e=>{console.error(`Cannot read license 2 "${t}": ${e}`),n()})})},[e]),Yt(()=>{let e=()=>{var e;let t=((e=m.current)==null?void 0:e.querySelector(`.markdown`))||null;return t?t.scrollHeight<=t.clientHeight?(f(!0),!0):(h.current&&=(clearInterval(h.current),null),t.onscroll=e=>{let t=e.target,n=t.scrollTop+t.clientHeight>=t.scrollHeight-10;!d&&n&&f(n)},!0):!1};return!o&&i&&(i.startsWith(`#`)?e()||(h.current=h.current||setInterval(()=>e(),100)):p.current?p.current.scrollHeight-10<=p.current.clientHeight&&f(!0):setTimeout(()=>{p.current?p.current.scrollHeight-10<=p.current.clientHeight&&f(!0):f(!0)},100)),()=>{h.current&&=(clearInterval(h.current),null);let e=p.current;if(e){let t=e.querySelector(`.markdown`);t&&(t.onscroll=null)}}},[o,d,i]);let v=null;return!o&&i?v=i.startsWith(`#`)?E(`div`,{className:`markdown`,children:E(Ev,{components:{h1:e=>E(I,{component:`h1`,sx:jv.header1,children:e.children}),h2:e=>E(I,{component:`h2`,sx:jv.header2,children:e.children})},children:i})}):E(`pre`,{style:jv.pre,ref:p,onScroll:()=>{if(p.current){let e=p.current.scrollTop+p.current.clientHeight>=p.current.scrollHeight-10;!d&&e&&f(e)}},children:i}):!o&&c&&(v=N(I,{sx:{p:`10px`},children:[j.t(`The license text could not be loaded.`),e?E(`div`,{children:E(We,{href:e,target:`_blank`,rel:`noopener`,children:e})}):null]})),N(u,{onClose:()=>n(),open:!0,maxWidth:`lg`,fullWidth:!0,sx:{"& .MuiDialog-paper":jv.paper},children:[N(_e,{children:[j.t(`License agreement`),`:`,E(`span`,{style:{marginLeft:16,fontWeight:`bold`},children:r})]}),E(ce,{style:jv.overflowHidden,dividers:!0,children:E(I,{component:`div`,sx:jv.root,ref:m,children:o?E(Ie,{}):v})}),N(xt,{children:[t&&t!==e?E(We,{href:t,target:`_blank`,rel:`noopener`,sx:{ml:1,mr:`auto`},children:j.t(`More about this license`)}):null,E(H,{id:`license-dialog-accept`,variant:`contained`,disabled:o||!d,autoFocus:!0,onClick:()=>n(!0),startIcon:E(d?Me:me,{}),color:`primary`,children:d?j.t(`Accept`):j.t(`Read to the end for accept`)}),E(H,{id:`license-dialog-close`,variant:`contained`,onClick:()=>n(),startIcon:E(k,{}),color:`grey`,children:j.t(`Close`)})]})]})}var Nv={root:{width:`100%`,height:`auto`,display:`flex`,borderRadius:4,flexDirection:`column`},paper:{maxWidth:1e3,width:`100%`,maxHeight:800,height:`calc(100% - 32px)`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},heading:{display:`flex`,alignItems:`center`},headerBlock:{backgroundColor:`#272727`,padding:13,fontSize:16},paperTable:{width:`100%`,marginBottom:16}},Pv=({children:e,value:t,index:n,title:r,custom:i,...a})=>i?E(`div`,{...a,children:t===n&&e}):E(`div`,{...a,children:t===n&&N(je,{children:[E(yt,{position:`static`,color:`default`,children:E(`div`,{style:Nv.headerBlock,children:r})}),E(I,{sx:{p:3},children:E(R,{component:`div`,children:e})})]})}),Fv={password:`password`,checkbox:`checkbox`,select:`select`,link:`staticText`,comment:`staticText`,text:`text`,name:`staticText`,title:`staticText`};function Iv(e,t,n){let r=t.unshift();t.length?(e[r]=e[r]||{},Iv(e[r],t,n)):e[r]=n}function Lv(e,t,n){Iv(e,t.split(`.`),n)}var Rv=({theme:e,themeType:t,themeName:n,socket:r,newInstance:i,onClose:a,systemConfig:o})=>{let[s,c]=z({}),{schema:l,initialData:d}=nn(()=>{var e,t;let n={},r={};if(i!=null&&(e=i.comment)!=null&&e.add&&Array.isArray(i==null||(t=i.comment)==null?void 0:t.add)){var a;i.comment.add.forEach((e,t)=>n[t]={type:`header`,text:e}),(a=i.comment.inputs)==null||a.forEach((e,t)=>{n[t+1]={...e,type:Fv[e.type],label:e.title,text:e.def?e.def.toString():``,href:e.def?e.def.toString():``,sm:6,newLine:!0},e.type===`link`&&(n[t+1].button=!0,n[t+1].variant=`contained`,n[t+1].href=e.def?e.def.toString():``,n[t+1].text=e.title,n[t+1].icon=`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTExLjk5IDJDNi40NyAyIDIgNi40OCAyIDEyczQuNDcgMTAgOS45OSAxMEMxNy41MiAyMiAyMiAxNy41MiAyMiAxMlMxNy41MiAyIDExLjk5IDJ6bTYuOTMgNmgtMi45NWMtLjMyLTEuMjUtLjc4LTIuNDUtMS4zOC0zLjU2IDEuODQuNjMgMy4zNyAxLjkxIDQuMzMgMy41NnpNMTIgNC4wNGMuODMgMS4yIDEuNDggMi41MyAxLjkxIDMuOTZoLTMuODJjLjQzLTEuNDMgMS4wOC0yLjc2IDEuOTEtMy45NnpNNC4yNiAxNEM0LjEgMTMuMzYgNCAxMi42OSA0IDEycy4xLTEuMzYuMjYtMmgzLjM4Yy0uMDguNjYtLjE0IDEuMzItLjE0IDIgMCAuNjguMDYgMS4zNC4xNCAySDQuMjZ6bS44MiAyaDIuOTVjLjMyIDEuMjUuNzggMi40NSAxLjM4IDMuNTYtMS44NC0uNjMtMy4zNy0xLjktNC4zMy0zLjU2em0yLjk1LThINS4wOGMuOTYtMS42NiAyLjQ5LTIuOTMgNC4zMy0zLjU2QzguODEgNS41NSA4LjM1IDYuNzUgOC4wMyA4ek0xMiAxOS45NmMtLjgzLTEuMi0xLjQ4LTIuNTMtMS45MS0zLjk2aDMuODJjLS40MyAxLjQzLTEuMDggMi43Ni0xLjkxIDMuOTZ6TTE0LjM0IDE0SDkuNjZjLS4wOS0uNjYtLjE2LTEuMzItLjE2LTIgMC0uNjguMDctMS4zNS4xNi0yaDQuNjhjLjA5LjY1LjE2IDEuMzIuMTYgMiAwIC42OC0uMDcgMS4zNC0uMTYgMnptLjI1IDUuNTZjLjYtMS4xMSAxLjA2LTIuMzEgMS4zOC0zLjU2aDIuOTVjLS45NiAxLjY1LTIuNDkgMi45My00LjMzIDMuNTZ6TTE2LjM2IDE0Yy4wOC0uNjYuMTQtMS4zMi4xNC0yIDAtLjY4LS4wNi0xLjM0LS4xNC0yaDMuMzhjLjE2LjY0LjI2IDEuMzEuMjYgMnMtLjEgMS4zNi0uMjYgMmgtMy4zOHoiPjwvcGF0aD48L3N2Zz4=`),e.type===`password`&&(n[t+1].repeat=!0),e.def!==void 0&&(r[t+1]=``),e.type===`checkbox`&&(r[t+1]=!1)})}return{schema:{type:`panel`,items:n},initialData:r}},[i]),[f,p]=z(d),[m,h]=z(i);return m!==i&&(h(i),p(d)),N(u,{onClose:()=>a(),open:!0,sx:{"& .MuiDialog-paper":Nv.paper},children:[N(`h2`,{style:Nv.heading,children:[E(De,{style:{color:`rgb(77 171 245)`,fontSize:36,marginLeft:25,marginRight:10}}),j.t(`Instance parameters for %s`,i._id.replace(`system.adapter.`,``))]}),E(ce,{style:{...Nv.flex,...Nv.overflowHidden},dividers:!0,children:E(`div`,{style:Nv.root,children:E(Pv,{value:1,index:1,custom:!0,title:j.t(`Test`),children:E(Dt,{style:Nv.paperTable,children:E(Se,{oContext:{socket:r,themeType:t,theme:e,isFloatComma:!0,instance:0,dateFormat:`YYYY.MM.DD`,forceUpdate:()=>{},onCommandRunning:()=>{},adapterName:`dummy`,_themeName:n,systemConfig:o,AceEditor:lr},data:f,themeName:n,onChange:e=>p(e),onError:(e,t)=>c({...s,[e||``]:t||``}),schema:l,alive:!0,changed:!1,originalData:f,common:{}})})})})}),N(xt,{children:[E(H,{id:`inputs-modal-dialog-apply`,variant:`contained`,autoFocus:!0,disabled:!!Object.keys(s).find(e=>s[e]),onClick:()=>{let e={native:{}},t=!1;Object.keys(l.items).forEach(n=>{l.items[n].required?!f[n]&&l.items[n].type!==`checkbox`?(t=!0,alert(`no data ${l.items[n].label}`)):Lv(e,l.items[n].name||``,f[n]):l.items[n].name&&(t=!1,Lv(e,l.items[n].name,f[n]))}),t||a(e)},color:`primary`,startIcon:E(Me,{}),children:j.t(`Apply`)}),E(H,{id:`inputs-modal-dialog-close`,variant:`contained`,onClick:()=>a(),color:`grey`,startIcon:E(k,{}),children:j.t(`Close`)})]})]})};function zv(e,t){let n=(window._localStorage||window.localStorage).getItem(t);if(n)try{e=JSON.parse(n)}catch{}let[r,i]=z(e);return[r,e=>{(window._localStorage||window.localStorage).setItem(t,JSON.stringify(e)),i(e)},!!(window._localStorage||window.localStorage).getItem(t)]}function Bv(e){var t;return e!=null&&(t=e.native)!=null&&t.lastScan?(e.native.newInstances||[]).filter(e=>{var t;return!(e!=null&&(t=e.comment)!=null&&t.ack)}).length:0}var Vv={root:{width:`100%`,height:`auto`,display:`flex`,borderRadius:4,flexDirection:`column`},paper:{maxWidth:1e3,width:`100%`,maxHeight:800,height:`calc(100% - 32px)`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},headerText:{fontWeight:`bold`,fontSize:15},descriptionHeaderText:{margin:`10px 0`},heading:{display:`flex`,alignItems:`center`},headerBlock:{backgroundColor:`#272727`,padding:13,fontSize:16},headerBlockDisplayItem:{p:`5px`,fontSize:16,display:`flex`,m:`2px`,border:`1px solid #c0c0c045`,borderRadius:`4px`,alignItems:`center`,transition:`background .5s, color .5s`},activeBlock:{backgroundColor:`#c0c0c021`,border:`1px solid #4dabf5`},pointer:{cursor:`pointer`},hover:{"&:hover":{backgroundColor:`#c0c0c021`}},installSuccess:{opacity:.7,color:`#5ef05e`},installError:{opacity:.7,color:`#ffc14f`},width200:{width:200},table:{},paperTable:{width:`100%`,marginBottom:16},wrapperSwitch:{display:`flex`,margin:10,marginTop:0},divSwitch:{display:`flex`,alignItems:`center`,fontSize:10,marginLeft:0,color:`silver`},marginLeft:{marginLeft:40},stepper:{padding:0,background:`inherit`},instanceIcon:{width:30,height:30,margin:3},instanceId:{marginLeft:10},instanceWrapper:{display:`flex`,alignItems:`center`}};function Hv({style:e,children:t,value:n,index:r,title:i,custom:a,boxHeight:o,black:s,...c}){return a?E(`div`,{...c,children:n===r&&t}):n===r?N(`div`,{...c,style:e,children:[E(yt,{position:`static`,color:`default`,children:E(`div`,{style:{...Vv.headerBlock,color:s?void 0:`white`},children:i})}),E(I,{style:o?{height:`calc(100% - 45px)`}:void 0,sx:{p:3},children:E(R,{style:o?{height:`100%`}:void 0,component:`div`,children:t})})]}):null}var Uv=[{id:`instance`,numeric:!1,disablePadding:!0,label:`Instance`},{id:`host`,numeric:!1,disablePadding:!1,label:`Host`},{id:`description`,numeric:!1,disablePadding:!1,label:`Description`},{id:`ignore`,numeric:!0,disablePadding:!1,label:`Ignore`}];function Wv(e){let{numSelected:t,rowCount:n,onSelectAllClick:r}=e;return E(qt,{children:N(Xe,{children:[E(V,{padding:`checkbox`,children:E(Oe,{indeterminate:t>0&&t<n,checked:n>0&&t===n,onChange:e=>r(e),slotProps:{input:{"aria-label":`select all desserts`}}})}),Uv.map(e=>E(V,{align:e.numeric?`right`:`left`,padding:e.disablePadding?`none`:`normal`,children:E(Ft,{children:e.label})},e.id))]})})}function Gv(e){if(!e)return`new`;if(typeof e==`string`)return e;let t=``;return e.add&&(t+=j.t(`new`),Array.isArray(e.add)&&e.add.length?(t+=`: `,e.add.length<=5?t+=e.add.join(`, `):t+=j.t(`%s devices`,e.add.length)):(typeof e.add==`string`||typeof e.add==`number`)&&(t+=`: `,t+=e.add)),e.changed&&(t+=(t?`, `:``)+j.t(`changed`),Array.isArray(e.changed)&&e.changed.length?(t+=`: `,e.changed.length<=5?t+=e.changed.join(`, `):t+=j.t(`%s devices`,e.changed.length)):(typeof e.changed==`string`||typeof e.changed==`number`)&&(t+=`: `,t+=e.changed)),e.extended&&(t+=(t?`, `:``)+j.t(`extended`),Array.isArray(e.extended)&&e.extended.length?(t+=`: `,e.extended.length<=5?t+=e.extended.join(`, `):t+=j.t(`%s devices`,e.extended.length)):(typeof e.extended==`string`||typeof e.extended==`number`)&&(t+=`: `,t+=e.extended)),e.text&&(t+=(t?`, `:``)+e.text),t}function Kv({themeType:e,themeName:t,socket:n,dateFormat:r,currentHost:a,defaultLogLevel:o,repository:s,hosts:c,onClose:l,theme:d,systemConfig:f}){var p,m,h,g,_,y;let[b,x]=z(0),[ee,S]=z({}),[C,w]=z({}),[T,te]=z(!1),[D,ne]=z(null);Yt(()=>{async function e(){let e=await n.sendTo(`system.adapter.discovery.0`,`listMethods`,null),t={},r=(window._localStorage||window.localStorage).getItem(`App.discoveryLastSelection`)||null,i;if(r)try{i=JSON.parse(r)}catch{i=null}Object.keys(e).forEach(e=>{i?t[e]=i[e]:t[e]=e!==`serial`}),w(t),S(e)}e().catch(e=>console.warn(`Cannot read listMethods: ${e}`))},[n]),Yt(()=>{async function e(){let e=await n.getObject(`system.discovery`);e!==void 0&&(ne(e),Bv(e)&&x(1))}e().catch(e=>console.warn(`Cannot read system.discovery: ${e}`))},[n]);let[re,O]=z({}),[A,ae]=z({});Yt(()=>{c.forEach(async({_id:e})=>{let t=await n.getState(`${e}.alive`),r=!t||t.val===null?!1:!!t.val;O(t=>t[e]===r?t:{...t,[e]:r})})},[c,n]);let oe=Object.keys(re).filter(e=>re[e]).length>1,[se,le]=z(0),[ue,de]=z(0),[pe,me]=z(0),[he,_e]=z(!1),[ve,ye]=z(0),[be,xe]=z([]),[Se,Ce]=z(!1),[we,Te]=z(1),[Ee,De]=z({}),[M,ke]=z(`install`),[Ae,Me]=zv(!0,`discovery.suggested`),[P,Pe]=zv(!0,`discovery.showAll`),[Fe,Le]=z(null),[Re,Ve]=z(null),He=e===`dark`,[We,Ge]=z({native:{}}),Ke=[`Select methods`,`Create instances`,`Installation process`],[qe,Je]=z({}),[Ze,Qe]=z(!1),[$e,et]=z(1),tt=(e,t)=>{if(t)switch(e){case`discovery.0.devicesFound`:le(t.val);break;case`discovery.0.devicesProgress`:de(t.val);break;case`discovery.0.instancesFound`:me(t.val);break;case`discovery.0.scanRunning`:_e(t.val);break;case`discovery.0.servicesProgress`:ye(t.val)}},nt=(e,t)=>{t&&e===`system.discovery`&&ne(t)};Yt(()=>(n.subscribeObject(`system.discovery`,nt),n.subscribeState(`discovery.0.devicesFound`,tt),n.subscribeState(`discovery.0.devicesProgress`,tt),n.subscribeState(`discovery.0.instancesFound`,tt),n.subscribeState(`discovery.0.scanRunning`,tt),n.subscribeState(`discovery.0.servicesProgress`,tt),()=>{n.unsubscribeObject(`system.discovery`,nt),n.unsubscribeState(`discovery.0.devicesFound`,tt),n.unsubscribeState(`discovery.0.devicesProgress`,tt),n.unsubscribeState(`discovery.0.instancesFound`,tt),n.unsubscribeState(`discovery.0.scanRunning`,tt),n.unsubscribeState(`discovery.0.servicesProgress`,tt)}),[n]);let rt=()=>x(b+1),it=()=>x(b-1),at=(e,t)=>n.extendObject(e,t).catch(e=>window.alert(e)),ot=async()=>{te(!0);let e=Object.keys(C).filter(e=>C[e]),t=await n.sendTo(`system.adapter.discovery.0`,`browse`,e);te(!1),t.error?window.alert(t.error):x(1)},st=e=>{if(e.target.checked){var t;let e=(D==null||(t=D.native)==null||(t=t.newInstances)==null?void 0:t.map(e=>e._id))||[];xe(e)}else xe([])},ct=(e,t)=>t.includes(e),lt=(e,t,n,r)=>{let i=n.indexOf(t),a=[];i===-1?a=a.concat(n,t):i===0?a=a.concat(n.slice(1)):i===n.length-1?a=a.concat(n.slice(0,-1)):i>0&&(a=a.concat(n.slice(0,i),n.slice(i+1))),r(a)},ut=(e,t)=>{var n,r;let i=D==null||(n=D.native)==null?void 0:n.newInstances.find(t=>t._id===e),a=i?JSON.parse(JSON.stringify(i)):null;if(!a)return;let o=!0;if(a!=null&&(r=a.comment)!=null&&r.license&&a.comment.license!==`MIT`&&(o=!1,a.common.licenseUrl||(a.common.licenseUrl=`https://raw.githubusercontent.com/ioBroker/ioBroker.${a.common.name}/master/LICENSE`),a.common.licenseUrl&&typeof a.common.licenseUrl==`object`&&(a.common.licenseUrl=a.common.licenseUrl[j.getLanguage()]||a.common.licenseUrl.en),typeof a.common.licenseUrl==`string`&&a.common.licenseUrl.includes(`github.com`)&&(a.common.licenseUrl=a.common.licenseUrl.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`))),o){var s;(s=a.comment)!=null&&s.inputs?Ve({cb:t,obj:a}):t()}else Le({cb:t,obj:a})},F=(e,t)=>{let n=be.indexOf(e)+1;De(e=>({...e,[n]:`error`})),t&&Je(e=>({...e,[be[n-1]]:[j.t(t)]})),be.length>n?setTimeout(()=>ut(be[n],()=>{Te(n+1),ke(`install`),Ce(!0)}),100):Qe(!0)},ft=Re?E(Rv,{socket:n,theme:d,themeType:e,themeName:t,newInstance:Re.obj,systemConfig:f,onClose:e=>{let{cb:t}=Re,{obj:n}=Re;Ve(null),e?(Ge(e),t()):F(n._id,`Error: configuration dialog canceled`)}}):null,pt=()=>{xe([]),Ce(!1),Qe(!1),Te(1),ke(`install`),De({})},mt=()=>{ut(be[0],()=>{Te(1),Ce(!0)})},ht=Fe?E(Mv,{licenseType:((p=Fe.obj.comment)==null?void 0:p.license)||``,url:Fe.obj.common.licenseUrl,onClose:e=>{var t;let{cb:n,obj:r}=Fe;Le(null),e?(t=r.comment)!=null&&t.inputs?Ve({cb:n,obj:r}):n():F(r._id,`Error: license not accepted`)}}):null;return N(ge,{theme:d,children:[ht,ft,N(u,{onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&l()},open:!0,sx:{"& .MuiDialog-paper":Vv.paper},children:[N(`h2`,{style:Vv.heading,children:[E(Ye,{style:{color:`rgb(77 171 245)`,fontSize:36,marginLeft:25,marginRight:10}}),j.t(`Find devices and services`)]}),E(ze,{style:Vv.stepper,alternativeLabel:!0,activeStep:b,children:Ke.map(e=>E(dn,{children:E(ie,{children:j.t(e)})},e))}),E(ce,{style:{...Vv.flex,...Vv.overflowHidden},dividers:!0,children:N(`div`,{style:Vv.root,children:[E(Hv,{style:{...Vv.overflowAuto,color:He?`white`:void 0},value:b,index:0,black:He,title:j.t(`Discover all possible devices`),children:T?he&&N(`div`,{children:[ue>=99?`Lookup services - ${ve}%`:`Lookup devices - ${ue}%`,T&&E(Ie,{variant:`determinate`,value:ue>=99?ve:ue}),ue>=99?`${pe} service(s) found`:`${se} device(s) found`]}):N(je,{children:[` `,E(`div`,{style:Vv.headerText,children:j.t(`press_discover`)}),(D==null||(m=D.native)==null?void 0:m.lastScan)&&E(`div`,{style:Vv.descriptionHeaderText,children:j.t(`Last scan on %s`,Ne.formatDate(new Date(D.native.lastScan),r))}),E(`div`,{style:{...Vv.headerBlock,color:He?void 0:`white`},children:j.t(`Use following methods:`)}),Object.keys(ee).map(e=>N(`div`,{children:[E(Oe,{checked:C[e],disabled:T,onChange:(t,n)=>{let r=JSON.parse(JSON.stringify(C));r[e]=n,(window._localStorage||window.localStorage).setItem(`App.discoveryLastSelection`,JSON.stringify(r)),w(r)}}),e]},e))]})}),N(Hv,{style:Vv.overflowAuto,value:b,index:1,title:D!=null&&(h=D.native)!=null&&h.lastScan?j.t(`Create instances automatically - Last scan on %s`,Ne.formatDate(new Date(D.native.lastScan),r)):j.t(`Create instances automatically`),children:[N(`div`,{style:Vv.wrapperSwitch,children:[N(`div`,{style:Vv.divSwitch,children:[E(`div`,{style:P?void 0:{color:`green`},children:j.t(`hide ignored`)}),E(Ue,{checked:P,onChange:e=>Pe(e.target.checked),color:`primary`}),E(`div`,{style:P?{color:`green`}:void 0,children:j.t(`show ignored`)})]}),N(`div`,{style:{...Vv.divSwitch,...Vv.marginLeft},children:[E(`div`,{style:Ae?void 0:{color:`green`},children:j.t(`hide suggested`)}),E(Ue,{checked:Ae,onChange:e=>Me(e.target.checked),color:`primary`}),E(`div`,{style:Ae?{color:`green`}:void 0,children:j.t(`show suggested`)})]})]}),E(Dt,{style:Vv.paperTable,children:E(At,{children:N(i,{style:Vv.table,size:`small`,children:[E(Wv,{numSelected:be.length,onSelectAllClick:st,rowCount:(D==null||(g=D.native)==null||(g=g.newInstances)==null?void 0:g.length)||0}),E(dt,{children:D==null||(_=D.native)==null||(_=_.newInstances)==null?void 0:_.filter(e=>{if(!Ae){var t;return!((t=e.comment)!=null&&t.advice)}if(!P){var n;return!(e!=null&&(n=e.comment)!=null&&n.ack)}return!0}).map((t,n)=>{var r,i,o;return N(Xe,{hover:!0,role:`checkbox`,selected:(r=t.comment)==null?void 0:r.advice,children:[E(V,{padding:`checkbox`,children:E(Oe,{checked:ct(t._id,be),onClick:e=>lt(e,t._id,be,xe)})}),E(V,{component:`th`,scope:`row`,padding:`none`,children:N(`div`,{style:Vv.instanceWrapper,children:[E(gt,{variant:`square`,alt:t._id.replace(`system.adapter.`,``),src:(i=s[t.common.name])==null?void 0:i.icon,style:Vv.instanceIcon}),E(`div`,{style:Vv.instanceId,children:t._id.replace(`system.adapter.`,``)})]})}),E(V,{align:`left`,children:oe?E(fe,{fullWidth:!0,lang:j.getLanguage(),list:c,t:j.t,value:A[t._id]||a,themeType:e,onChange:e=>ae({...A,[t._id]:e})}):`_`}),E(V,{align:`left`,children:Gv(t.comment)}),E(V,{align:`right`,padding:`checkbox`,children:E(Oe,{checked:!!(t!=null&&(o=t.comment)!=null&&o.ack),onClick:()=>{let e=JSON.parse(JSON.stringify(D==null?void 0:D.native.newInstances));e[n].comment={...e[n].comment,ack:!e[n].comment.ack},at(`system.discovery`,{native:{newInstances:e}})}})})]},t._id)})})]})})})]}),E(Hv,{value:b,index:2,style:{...Vv.overflowAuto,height:`100%`},boxHeight:!0,title:j.t(`Install adapters`),children:N(`div`,{style:{display:`flex`,height:`100%`},children:[E(`div`,{children:be.map((e,t)=>{var n;return N(I,{component:`div`,onClick:Ze?()=>et(t):void 0,sx:{...Vv.headerBlockDisplayItem,...Ze?Vv.pointer:void 0,...Ze?Vv.hover:void 0,...Ze&&$e===t?Vv.activeBlock:void 0},children:[E(`div`,{style:Vv.width200,children:N(`div`,{style:Vv.instanceWrapper,children:[E(gt,{variant:`square`,alt:e.replace(`system.adapter.`,``),src:(n=s[e.replace(`system.adapter.`,``).split(`.`)[0]])==null?void 0:n.icon,style:Vv.instanceIcon}),E(`div`,{style:Vv.instanceId,children:e.replace(`system.adapter.`,``)})]})}),we===t+1&&!Ee[t+1]&&E(v,{size:20}),Ee[t+1]===`error`?E(Wd,{style:Vv.installError}):Ee[t+1]===`success`?E(Ud,{style:Vv.installSuccess}):null]},e)})}),we&&(Se||Ze)&&E(`div`,{style:{overflow:`hidden`,width:`calc(100% - 260px)`},children:E(bs,{noSpacing:!0,ready:!0,host:a,logsRead:Ze?qe[be[$e]]||[`skipped`]:null,showElement:!Ze,socket:n,t:j.t,cmd:Ze?``:`${M} ${be[we-1].replace(`system.adapter.`,``).split(`.`)[0]}`,onFinished:(e,t)=>{let r=JSON.parse(JSON.stringify(D==null?void 0:D.native.newInstances.find(e=>e._id===be[we-1])));delete r.comment;let i=r._id.split(`.`);i.pop(),i=i.join(`.`),n.getObject(i).then(e=>{let i=e;r={...i,...r},r.common=Object.assign(i.common,r.common),r.native=Object.assign(i.native,r.native),r.type=`instance`,o&&(r.common.logLevel=o),r.common.logLevel=r.common.logLevel||`info`,We.native&&Object.keys(We.native).length&&(Object.assign(r.native,We.native),Ge({native:{}})),oe&&A[r._id]&&(r.common.host=A[r._id]),at(r._id,r).then(()=>{if(we<be.length)ut(be[we],()=>{Te(we+1),ke(`install`)}),Je({...qe,[be[we-1]]:t}),De({...Ee,[we]:`success`});else{Je({...qe,[be[we-1]]:t}),De({...Ee,[we]:`success`}),et(we-1);let e=JSON.parse(JSON.stringify(D));e&&(e.native.newInstances=e.native.newInstances.filter(({_id:e})=>{let t=be.find(t=>t===e);return!t||Ee[be.indexOf(t)+1]!==`success`}),n.setObject(`system.discovery`,e)),Qe(!0),window.alert(j.t(`Finished`))}})})},errorFunc:(e,t)=>{if(e===51&&M===`install`)ke(`upload`);else if(be.length>we&&M===`upload`)ut(be[we],()=>Te(we+1)),De({...Ee,[we]:`error`});else{if(be.length>we)De({...Ee,[we]:`error`}),ut(be[we],()=>Te(we+1)),ke(`install`),Je({...qe,[be[we-1]]:t});else{De({...Ee,[we]:`error`}),Je({...qe,[be[we-1]]:t}),Qe(!0),et(we-1);let e=JSON.parse(JSON.stringify(D));e&&(e.native.newInstances=e.native.newInstances.filter(({_id:e})=>{let t=be.find(t=>t===e);return!t||Ee[be.indexOf(t)+1]!==`success`}),n.setObject(`system.discovery`,e))}window.alert(`error ${be[we-1]}`)}}},`${we}-${M}`)})]})})]})}),N(xt,{children:[b>0&&b!==4&&E(H,{variant:`contained`,disabled:b===0,onClick:()=>{b===2&&pt(),it()},color:`grey`,startIcon:E(Vd,{}),children:j.t(`Back`)}),b===0&&E(H,{variant:`contained`,autoFocus:!0,disabled:T,onClick:ot,color:`primary`,startIcon:E(Be,{}),children:j.t(`Discover`)}),b!==2&&b!==4&&E(Lt,{slotProps:{popper:{sx:{pointerEvents:`none`}}},title:b===0?j.t(`Skip discovery process and go to install with last scan results`):``,children:E(`span`,{style:{marginLeft:8},children:E(H,{variant:`contained`,disabled:!D||!(D!=null&&(y=D.native)!=null&&y.lastScan)||b===2||T||b===1&&!be.length,onClick:()=>{rt(),b===1&&mt()},color:b===1?`primary`:`grey`,startIcon:E(b===1?Hd:$t,{}),children:j.t(b===1?`Create instances`:`Use last scan`)})})}),E(H,{variant:`contained`,disabled:T,onClick:()=>l(),color:b===2?`primary`:`grey`,startIcon:E(k,{}),children:j.t(b===2?`Finish`:`Close`)})]})]})]})}var qv=y([E(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8`},`0`),E(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`},`1`)],`AccessTime`);x();var Jv=class e extends Qt{constructor(...t){super(...t),M(this,`_resizeHandlerInstalled`,!1),M(this,`_timerOnResize`,null),M(this,`__onResize`,()=>{this._timerOnResize&&clearTimeout(this._timerOnResize),this._timerOnResize=setTimeout(()=>{this._timerOnResize=null,this.state.mobile!==e.isMobile()&&this.setState({mobile:e.isMobile()})},200)})}static isMobile(){return window.innerWidth<800}componentDidMount(){this.state.mobile!==e.isMobile()&&this.setState({mobile:e.isMobile()}),this._resizeHandlerInstalled||(this._resizeHandlerInstalled=!0,window.addEventListener(`resize`,this.__onResize,!1))}componentWillUnmount(){this._timerOnResize&&=(clearTimeout(this._timerOnResize),null),this._resizeHandlerInstalled&&window.removeEventListener(`resize`,this.__onResize,!1)}getButtonTitle(e,t,n){return e&&t?this.state.mobile?n?N(je,{children:[e,` & `,n]}):e:N(je,{children:[e,E(`span`,{style:{marginLeft:4},children:t})]}):e||t||null}};x();var Yv={buttonLabel:{whiteSpace:`nowrap`},input:{minWidth:150}},Xv=class e extends Qt{constructor(t){super(t),M(this,`mobile`,void 0),this.state={readTimeoutSec:Math.round((t.readTimeoutMs||e.getReadTimeoutMs())/1e3)},this.mobile=window.innerWidth<800}static getReadTimeoutMs(){return parseInt((window._localStorage||window.localStorage).getItem(`App.readTimeoutMs`),10)||(pt.isCloud()?6e4:3e4)}static saveReadTimeoutMs(e){return e?(window._localStorage||window.localStorage).setItem(`App.readTimeoutMs`,e.toString()):(window._localStorage||window.localStorage).removeItem(`App.readTimeoutMs`)}render(){return N(u,{open:!0,maxWidth:`lg`,onClose:()=>this.props.onClose(),children:[E(_e,{children:this.props.t(`Detected slow connection!`)}),N(ce,{children:[E(de,{children:this.props.t(`Seems that you have slow connection. Do you want to increase timeout interval?`)}),E(L,{variant:`standard`,style:Yv.input,label:this.props.t(`Read timeout`),value:this.state.readTimeoutSec,onChange:e=>this.setState({readTimeoutSec:e.target.value}),type:`number`,slotProps:{htmlInput:{min:5,max:600}},helperText:this.props.t(`in seconds`)})]}),N(xt,{children:[E(H,{id:`slow-connection-dialog-minute`,className:`slow-connection-minute`,style:Yv.buttonLabel,variant:`contained`,onClick:()=>{e.saveReadTimeoutMs(6e4),this.props.onClose(6e4)},startIcon:E(qv,{}),color:`grey`,children:this.mobile?this.props.t(`1 minute`):this.props.t(`Set timeout to 1 minute`)}),E(H,{id:`slow-connection-dialog-ok`,className:`slow-connection-ok`,variant:`contained`,autoFocus:!0,color:`primary`,disabled:!parseInt(this.state.readTimeoutSec,10),onClick:()=>{let t=parseInt(this.state.readTimeoutSec,10)*1e3;e.saveReadTimeoutMs(t),this.props.onClose(t)},startIcon:E(Me,{}),children:this.mobile?null:this.props.t(`Apply`)}),E(H,{id:`slow-connection-dialog-close`,className:`slow-connection-cancel`,variant:`contained`,onClick:()=>this.props.onClose(),color:`grey`,startIcon:E(k,{}),children:this.mobile?null:this.props.t(`Cancel`)})]})]})}},Zv={"expert-mode":`The head symbol <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expert mode' /> in the toolbar switches the expert mode on. It shows the system objects, additional settings of an instance and the expert options of many dialogs.`,"gui-settings":`Admin normally keeps its own settings, like the selected columns or the opened folders, in the browser. In the system settings you can store them in ioBroker instead, so every browser and every device shows the same.`,"object-columns":`In the objects list, "Configure" switches the automatic column selection off, so you can choose the columns yourself. A column is resized by dragging the separator in the header, and a double click on the separator resets the whole layout.`,"object-keyboard":`In the objects list the arrow keys move the selection, and the left and right arrow close and open a folder.`,"object-url":`If the value of a state is a link, Ctrl and a click on the value open it in a new tab.`,"states-view":`The states view of the objects list replaces type, role, room and function with the columns changed from, quality, timestamp and last change.`,"custom-settings":`The gear behind a state opens its custom settings. Every adapter that supports them adds its own adapter-specific options there – the recording adapters History, SQL or InfluxDB are only the best known example.`,alias:`An alias can be created from any state. It gives the state another name, role or scaling, without changing anything in the adapter.`,"log-level":`The log level of a single instance can be changed while it runs. After a restart of the controller the saved level is used again.`,discovery:`The device discovery searches the network for devices and services and proposes the adapters that fit them. This requires the Discovery adapter to be installed.`,"auto-upgrade":`Adapters can be configured so that smaller bug fixes and feature updates are installed fully automatically. Larger version jumps with potentially breaking changes still require a manual confirmation.`,"objects-export":`Objects can be exported into a JSON file and imported again, for example to move a configuration to another installation.`},Qv={en:Zv,de:{"expert-mode":`Das Kopfsymbol <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expertenmodus' /> in der Werkzeugleiste unten schaltet den Expertenmodus ein. Er zeigt die System-Objekte, zusätzliche Einstellungen einer Instanz und die Expertenoptionen vieler Dialoge.`,"gui-settings":`Der Admin merkt sich seine eigenen Einstellungen, etwa die gewählten Spalten oder die geöffneten Ordner, normalerweise im Browser. In den Systemeinstellungen kann man sie stattdessen in ioBroker ablegen, dann sieht jeder Browser und jedes Gerät dasselbe.`,"object-columns":`In der Objektliste schaltet "Konfigurieren" die automatische Spaltenauswahl aus, dann kann man die Spalten selbst wählen. Die Breite ändert man am Trenner in der Kopfzeile, ein Doppelklick darauf setzt die ganze Aufteilung zurück.`,"object-keyboard":`In der Objektliste bewegen die Pfeiltasten die Auswahl, der linke und der rechte Pfeil schließen und öffnen einen Ordner.`,"object-url":`Wenn der Wert eines Zustands ein Link ist, öffnet Strg und ein Klick auf den Wert ihn in einem neuen Tab.`,"states-view":`Die Zustandsansicht der Objektliste ersetzt Typ, Rolle, Raum und Funktion durch die Spalten Geändert von, Qualität, Zeitstempel und Letzte Änderung.`,"custom-settings":`Das Zahnrad hinter einem Zustand öffnet dessen spezifische Einstellungen. Dort ergänzt jeder Adapter, der sie unterstützt, seine eigenen adapterspezifischen Optionen – die aufzeichnenden Adapter History, SQL oder InfluxDB sind nur das bekannteste Beispiel.`,alias:`Aus jedem Zustand lässt sich ein Alias erzeugen. Er gibt dem Zustand einen anderen Namen, eine andere Rolle oder Skalierung, ohne im Adapter etwas zu ändern.`,"log-level":`Die Protokollstufe einer einzelnen Instanz lässt sich im laufenden Betrieb ändern. Nach einem Neustart des Controllers gilt wieder die gespeicherte Stufe.`,discovery:`Die Geräteerkennung durchsucht das Netzwerk nach Geräten und Diensten und schlägt die passenden Adapter vor. Dafür muss der Discovery-Adapter installiert sein.`,"auto-upgrade":`Adapter lassen sich so konfigurieren, dass kleinere Fehlerbehebungen und Funktionsupdates vollautomatisch eingespielt werden. Größere Versionssprünge mit potenziellen Änderungen erfordern weiterhin eine manuelle Bestätigung.`,"objects-export":`Objekte lassen sich in eine JSON-Datei exportieren und wieder importieren, etwa um eine Konfiguration auf eine andere Installation zu übertragen.`},ru:{"expert-mode":`Символ головы <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Режим эксперта' /> на панели инструментов включает режим эксперта. В нём видны системные объекты, дополнительные настройки экземпляра и экспертные параметры многих диалогов.`,"gui-settings":`Обычно admin хранит свои настройки, например выбранные столбцы или открытые папки, в браузере. В системных настройках их можно сохранять в ioBroker, тогда во всех браузерах и на всех устройствах будет одно и то же.`,"object-columns":`В списке объектов пункт «Настроить» отключает автоматический выбор столбцов, и столбцы можно выбрать самому. Ширину меняют перетаскиванием разделителя в заголовке, двойной щелчок по нему возвращает исходную раскладку.`,"object-keyboard":`В списке объектов стрелки перемещают выделение, а стрелки влево и вправо закрывают и открывают папку.`,"object-url":`Если значение состояния является ссылкой, Ctrl и щелчок по значению откроют её в новой вкладке.`,"states-view":`Режим просмотра состояний в списке объектов заменяет тип, роль, комнату и функцию столбцами «Изменено из», качество, метка времени и последнее изменение.`,"custom-settings":`Шестерёнка рядом с состоянием открывает его пользовательские настройки. Там свои параметры добавляет каждый адаптер, который их поддерживает; адаптеры записи, такие как History, SQL или InfluxDB, — лишь самый известный пример.`,alias:`Из любого состояния можно создать алиас. Он даёт состоянию другое имя, другую роль или масштабирование, ничего не меняя в самом адаптере.`,"log-level":`Уровень журналирования отдельного экземпляра можно менять на ходу. После перезапуска контроллера снова действует сохранённый уровень.`,discovery:`Поиск устройств просматривает сеть на предмет устройств и служб и предлагает подходящие адаптеры. Для этого должен быть установлен адаптер Discovery.`,"auto-upgrade":`Адаптеры можно настроить так, чтобы небольшие исправления ошибок и обновления функций устанавливались полностью автоматически. Более крупные смены версий с возможными существенными изменениями по-прежнему требуют ручного подтверждения.`,"objects-export":`Объекты можно экспортировать в файл JSON и снова импортировать, например чтобы перенести конфигурацию в другую установку.`},pt:{"expert-mode":`O símbolo da cabeça <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modo especialista' /> na barra de ferramentas ativa o modo especialista. Ele mostra os objetos de sistema, definições adicionais de uma instância e as opções de especialista de muitos diálogos.`,"gui-settings":`Normalmente o admin guarda as suas próprias definições, como as colunas escolhidas ou as pastas abertas, no navegador. Nas definições do sistema pode guardá-las no ioBroker, e então todos os navegadores e dispositivos mostram o mesmo.`,"object-columns":`Na lista de objetos, "Configurar" desliga a seleção automática de colunas, permitindo escolher as colunas manualmente. A largura muda-se arrastando o separador no cabeçalho, e um duplo clique sobre ele repõe todo o layout.`,"object-keyboard":`Na lista de objetos as teclas de seta movem a seleção, e as setas para a esquerda e para a direita fecham e abrem uma pasta.`,"object-url":`Se o valor de um estado for uma ligação, Ctrl e um clique sobre o valor abrem-na num novo separador.`,"states-view":`A vista de estados da lista de objetos substitui tipo, papel, divisão e função pelas colunas alterado por, qualidade, data e hora e última alteração.`,"custom-settings":`A roda dentada ao lado de um estado abre as suas definições personalizadas. Aí cada adaptador que as suporta acrescenta as suas próprias opções; os adaptadores de registo History, SQL ou InfluxDB são apenas o exemplo mais conhecido.`,alias:`A partir de qualquer estado pode criar-se um alias. Ele dá ao estado outro nome, outro papel ou outra escala, sem alterar nada no adaptador.`,"log-level":`O nível de registo de uma instância pode ser alterado enquanto ela corre. Após um reinício do controlador volta a valer o nível guardado.`,discovery:`A deteção de dispositivos procura na rede dispositivos e serviços e propõe os adaptadores correspondentes. Para isso, o adaptador Discovery tem de estar instalado.`,"auto-upgrade":`Os adaptadores podem ser configurados para que as pequenas correções de erros e as atualizações de funcionalidades sejam instaladas de forma totalmente automática. Os saltos de versão maiores, com possíveis alterações relevantes, continuam a exigir uma confirmação manual.`,"objects-export":`Os objetos podem ser exportados para um ficheiro JSON e importados de novo, por exemplo para levar uma configuração para outra instalação.`},nl:{"expert-mode":`Het hoofd-symbool <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expertmodus' /> in de werkbalk schakelt de expertmodus in. Die toont de systeemobjecten, extra instellingen van een instantie en de expertopties van veel dialoogvensters.`,"gui-settings":`Admin bewaart zijn eigen instellingen, zoals de gekozen kolommen of de geopende mappen, normaal in de browser. In de systeeminstellingen kun je ze in plaats daarvan in ioBroker opslaan, dan tonen alle browsers en apparaten hetzelfde.`,"object-columns":`In de objectenlijst schakelt "Configureren" de automatische kolomkeuze uit, zodat je de kolommen zelf kunt kiezen. De breedte wijzig je met de scheiding in de kopregel, een dubbelklik daarop zet de hele indeling terug.`,"object-keyboard":`In de objectenlijst verplaatsen de pijltoetsen de selectie, en de linker- en rechterpijl sluiten en openen een map.`,"object-url":`Als de waarde van een state een link is, opent Ctrl met een klik op de waarde die link in een nieuw tabblad.`,"states-view":`De statenweergave van de objectenlijst vervangt type, rol, ruimte en functie door de kolommen gewijzigd door, kwaliteit, tijdstempel en laatste wijziging.`,"custom-settings":`Het tandwiel achter een state opent de aangepaste instellingen. Daar voegt elke adapter die ze ondersteunt zijn eigen adapterspecifieke opties toe; opnemende adapters zoals History, SQL of InfluxDB zijn slechts het bekendste voorbeeld.`,alias:`Van elke state kun je een alias maken. Die geeft de state een andere naam, rol of schaling, zonder iets in de adapter te wijzigen.`,"log-level":`Het logniveau van een enkele instantie kan tijdens het draaien worden gewijzigd. Na een herstart van de controller geldt weer het opgeslagen niveau.`,discovery:`De apparaatdetectie doorzoekt het netwerk op apparaten en diensten en stelt de passende adapters voor. Daarvoor moet de Discovery-adapter geïnstalleerd zijn.`,"auto-upgrade":`Adapters kunnen zo worden ingesteld dat kleinere foutoplossingen en functie-updates volledig automatisch worden geïnstalleerd. Grotere versiesprongen met mogelijke ingrijpende wijzigingen vragen nog steeds om een handmatige bevestiging.`,"objects-export":`Objecten kunnen naar een JSON-bestand worden geëxporteerd en weer geïmporteerd, bijvoorbeeld om een configuratie naar een andere installatie te brengen.`},fr:{"expert-mode":`Le symbole de la tête <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Mode expert' /> dans la barre d'outils active le mode expert. Il affiche les objets système, des réglages supplémentaires d'une instance et les options expert de nombreuses boîtes de dialogue.`,"gui-settings":`Admin conserve normalement ses propres réglages, comme les colonnes choisies ou les dossiers ouverts, dans le navigateur. Dans les réglages système, vous pouvez les enregistrer dans ioBroker, et tous les navigateurs et appareils affichent alors la même chose.`,"object-columns":`Dans la liste des objets, « Configurer » désactive la sélection automatique des colonnes, ce qui permet de les choisir soi-même. La largeur se modifie en tirant le séparateur de l'en-tête, un double-clic dessus réinitialise toute la disposition.`,"object-keyboard":`Dans la liste des objets, les touches fléchées déplacent la sélection, et les flèches gauche et droite ferment et ouvrent un dossier.`,"object-url":`Si la valeur d'un état est un lien, Ctrl et un clic sur la valeur l'ouvrent dans un nouvel onglet.`,"states-view":`La vue des états de la liste des objets remplace type, rôle, pièce et fonction par les colonnes modifié par, qualité, horodatage et dernière modification.`,"custom-settings":`L'engrenage derrière un état ouvre ses réglages personnalisés. Chaque adaptateur qui les prend en charge y ajoute ses propres options ; les adaptateurs d'enregistrement History, SQL ou InfluxDB n'en sont que l'exemple le plus connu.`,alias:`Un alias peut être créé à partir de n'importe quel état. Il lui donne un autre nom, un autre rôle ou une autre mise à l'échelle, sans rien changer dans l'adaptateur.`,"log-level":`Le niveau de journalisation d'une instance peut être modifié pendant son fonctionnement. Après un redémarrage du contrôleur, le niveau enregistré s'applique de nouveau.`,discovery:`La détection d'appareils parcourt le réseau à la recherche d'appareils et de services et propose les adaptateurs correspondants. Pour cela, l'adaptateur Discovery doit être installé.`,"auto-upgrade":`Les adaptateurs peuvent être configurés pour que les petites corrections d'erreurs et les mises à jour fonctionnelles soient installées de façon entièrement automatique. Les changements de version majeurs, susceptibles d'apporter des modifications importantes, nécessitent toujours une confirmation manuelle.`,"objects-export":`Les objets peuvent être exportés dans un fichier JSON puis réimportés, par exemple pour transférer une configuration vers une autre installation.`},it:{"expert-mode":`Il simbolo della testa <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modalità esperto' /> nella barra degli strumenti attiva la modalità esperto. Mostra gli oggetti di sistema, impostazioni aggiuntive di un'istanza e le opzioni esperto di molte finestre.`,"gui-settings":`Normalmente admin conserva le proprie impostazioni, come le colonne scelte o le cartelle aperte, nel browser. Nelle impostazioni di sistema è possibile salvarle in ioBroker, così ogni browser e ogni dispositivo mostra le stesse.`,"object-columns":`Nell'elenco degli oggetti, "Configura" disattiva la scelta automatica delle colonne, così si possono scegliere da soli. La larghezza si cambia trascinando il separatore nell'intestazione e un doppio clic su di esso ripristina l'intero layout.`,"object-keyboard":`Nell'elenco degli oggetti i tasti freccia spostano la selezione, mentre le frecce sinistra e destra chiudono e aprono una cartella.`,"object-url":`Se il valore di uno stato è un collegamento, Ctrl e un clic sul valore lo aprono in una nuova scheda.`,"states-view":`La vista degli stati dell'elenco oggetti sostituisce tipo, ruolo, stanza e funzione con le colonne modificato da, qualità, marca temporale e ultima modifica.`,"custom-settings":`L'ingranaggio accanto a uno stato apre le sue impostazioni personalizzate. Lì ogni adattatore che le supporta aggiunge le proprie opzioni specifiche; gli adattatori di registrazione History, SQL o InfluxDB sono solo l'esempio più noto.`,alias:`Da qualsiasi stato si può creare un alias. Gli assegna un altro nome, un altro ruolo o una diversa scala, senza modificare nulla nell'adattatore.`,"log-level":`Il livello di log di una singola istanza può essere modificato mentre è in funzione. Dopo un riavvio del controller torna valido il livello salvato.`,discovery:`Il rilevamento dispositivi cerca nella rete dispositivi e servizi e propone gli adattatori adatti. A tal fine deve essere installato l'adattatore Discovery.`,"auto-upgrade":`Gli adattatori possono essere configurati in modo che le piccole correzioni di errori e gli aggiornamenti funzionali vengano installati in modo completamente automatico. I salti di versione più importanti, con possibili modifiche rilevanti, richiedono ancora una conferma manuale.`,"objects-export":`Gli oggetti possono essere esportati in un file JSON e importati di nuovo, ad esempio per portare una configurazione su un'altra installazione.`},es:{"expert-mode":`El símbolo de la cabeza <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modo experto' /> en la barra de herramientas activa el modo experto. Muestra los objetos del sistema, ajustes adicionales de una instancia y las opciones de experto de muchos diálogos.`,"gui-settings":`Normalmente admin guarda sus propios ajustes, como las columnas elegidas o las carpetas abiertas, en el navegador. En los ajustes del sistema puedes guardarlos en ioBroker, y así todos los navegadores y dispositivos muestran lo mismo.`,"object-columns":`En la lista de objetos, "Configurar" desactiva la selección automática de columnas para poder elegirlas uno mismo. El ancho se cambia arrastrando el separador de la cabecera, y un doble clic sobre él restablece toda la disposición.`,"object-keyboard":`En la lista de objetos las teclas de flecha mueven la selección, y las flechas izquierda y derecha cierran y abren una carpeta.`,"object-url":`Si el valor de un estado es un enlace, Ctrl y un clic sobre el valor lo abren en una pestaña nueva.`,"states-view":`La vista de estados de la lista de objetos sustituye tipo, rol, habitación y función por las columnas cambiado desde, calidad, marca de tiempo y último cambio.`,"custom-settings":`El engranaje junto a un estado abre sus ajustes personalizados. Ahí cada adaptador que los admite añade sus propias opciones específicas; los adaptadores de registro History, SQL o InfluxDB son solo el ejemplo más conocido.`,alias:`A partir de cualquier estado se puede crear un alias. Le da otro nombre, otro rol u otra escala, sin cambiar nada en el adaptador.`,"log-level":`El nivel de registro de una instancia se puede cambiar mientras está en marcha. Tras reiniciar el controlador vuelve a aplicarse el nivel guardado.`,discovery:`La detección de dispositivos busca en la red dispositivos y servicios y propone los adaptadores adecuados. Para ello es necesario tener instalado el adaptador Discovery.`,"auto-upgrade":`Los adaptadores se pueden configurar para que las pequeñas correcciones de errores y las actualizaciones de funciones se instalen de forma totalmente automática. Los saltos de versión mayores, con posibles cambios importantes, siguen requiriendo una confirmación manual.`,"objects-export":`Los objetos se pueden exportar a un archivo JSON e importar de nuevo, por ejemplo para llevar una configuración a otra instalación.`},pl:{"expert-mode":`Symbol głowy <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Tryb eksperta' /> na pasku narzędzi włącza tryb eksperta. Pokazuje obiekty systemowe, dodatkowe ustawienia instancji oraz opcje eksperckie wielu okien dialogowych.`,"gui-settings":`Admin zwykle przechowuje własne ustawienia, na przykład wybrane kolumny albo otwarte foldery, w przeglądarce. W ustawieniach systemowych można zapisywać je w ioBrokerze, wtedy każda przeglądarka i każde urządzenie pokazuje to samo.`,"object-columns":`Na liście obiektów opcja „Konfiguruj” wyłącza automatyczny dobór kolumn, dzięki czemu można wybrać je samodzielnie. Szerokość zmienia się przeciągając separator w nagłówku, a dwuklik na nim przywraca cały układ.`,"object-keyboard":`Na liście obiektów klawisze strzałek przesuwają zaznaczenie, a strzałki w lewo i w prawo zamykają i otwierają folder.`,"object-url":`Jeśli wartość stanu jest odnośnikiem, Ctrl i kliknięcie w wartość otwierają go w nowej karcie.`,"states-view":`Widok stanów na liście obiektów zastępuje typ, rolę, pomieszczenie i funkcję kolumnami zmienione przez, jakość, znacznik czasu i ostatnia zmiana.`,"custom-settings":`Koło zębate obok stanu otwiera jego ustawienia niestandardowe. Tam każdy adapter, który je obsługuje, dodaje własne opcje; adaptery zapisu, takie jak History, SQL czy InfluxDB, to tylko najbardziej znany przykład.`,alias:`Z każdego stanu można utworzyć alias. Nadaje on stanowi inną nazwę, inną rolę lub inne skalowanie, bez zmieniania czegokolwiek w adapterze.`,"log-level":`Poziom logowania pojedynczej instancji można zmienić w trakcie jej działania. Po ponownym uruchomieniu kontrolera obowiązuje znowu zapisany poziom.`,discovery:`Wykrywanie urządzeń przeszukuje sieć w poszukiwaniu urządzeń i usług i proponuje pasujące adaptery. Wymaga to zainstalowanego adaptera Discovery.`,"auto-upgrade":`Adaptery można skonfigurować tak, aby drobne poprawki błędów i aktualizacje funkcji były instalowane w pełni automatycznie. Większe skoki wersji, które mogą wprowadzać istotne zmiany, nadal wymagają ręcznego potwierdzenia.`,"objects-export":`Obiekty można wyeksportować do pliku JSON i ponownie zaimportować, na przykład aby przenieść konfigurację na inną instalację.`},uk:{"expert-mode":`Символ голови <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Режим експерта' /> на панелі інструментів вмикає режим експерта. У ньому видно системні об'єкти, додаткові налаштування екземпляра та експертні параметри багатьох діалогів.`,"gui-settings":`Зазвичай admin зберігає власні налаштування, наприклад вибрані стовпці чи відкриті теки, у браузері. У системних налаштуваннях їх можна зберігати в ioBroker, тоді в усіх браузерах і на всіх пристроях буде однаково.`,"object-columns":`У списку об'єктів пункт «Налаштувати» вимикає автоматичний вибір стовпців, і стовпці можна вибрати самому. Ширину змінюють перетягуванням роздільника в заголовку, подвійне клацання на ньому повертає початкове розташування.`,"object-keyboard":`У списку об'єктів стрілки переміщують виділення, а стрілки ліворуч і праворуч закривають і відкривають теку.`,"object-url":`Якщо значення стану є посиланням, Ctrl і клацання на значенні відкриють його в новій вкладці.`,"states-view":`Режим перегляду станів у списку об'єктів замінює тип, роль, кімнату та функцію стовпцями «Змінено з», якість, часова позначка та остання зміна.`,"custom-settings":`Шестірня поруч зі станом відкриває його користувацькі налаштування. Там свої параметри додає кожен адаптер, який їх підтримує; адаптери запису, такі як History, SQL або InfluxDB, — лише найвідоміший приклад.`,alias:`З будь-якого стану можна створити аліас. Він дає стану іншу назву, іншу роль або інше масштабування, нічого не змінюючи в самому адаптері.`,"log-level":`Рівень журналювання окремого екземпляра можна змінити під час роботи. Після перезапуску контролера знову діє збережений рівень.`,discovery:`Пошук пристроїв переглядає мережу на наявність пристроїв і служб та пропонує відповідні адаптери. Для цього має бути встановлений адаптер Discovery.`,"auto-upgrade":`Адаптери можна налаштувати так, щоб невеликі виправлення помилок і оновлення функцій встановлювалися повністю автоматично. Більші зміни версій із можливими суттєвими змінами й надалі потребують ручного підтвердження.`,"objects-export":`Об'єкти можна експортувати у файл JSON і знову імпортувати, наприклад щоб перенести конфігурацію на іншу інсталяцію.`},"zh-cn":{"expert-mode":`工具栏中的头部图标 <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='专家模式' />可以打开专家模式。专家模式会显示系统对象、实例的附加设置以及许多对话框中的专家选项。`,"gui-settings":`admin 通常把自己的设置保存在浏览器里,例如所选的列或展开的文件夹。在系统设置中可以改为保存到 ioBroker,这样每个浏览器和每台设备看到的内容都一致。`,"object-columns":`在对象列表中,“配置”可以关闭自动选择列的功能,这样就能自己挑选要显示的列。拖动表头中的分隔线可以调整列宽,双击分隔线会恢复整个布局。`,"object-keyboard":`在对象列表中,方向键可以移动选中项,左右方向键则用来折叠和展开文件夹。`,"object-url":`如果某个状态的值是一个链接,按住 Ctrl 并点击该值,就会在新标签页中打开它。`,"states-view":`对象列表的状态视图会把类型、角色、房间和功能这几列,换成来源、质量、时间戳和最后更改。`,"custom-settings":`状态旁边的齿轮可以打开它的自定义设置。每个支持自定义设置的适配器都会在那里添加自己的专属选项,History、SQL 或 InfluxDB 等记录适配器只是其中最常见的例子。`,alias:`任何状态都可以创建别名。别名能给状态换一个名称、角色或数值换算,而不必改动适配器本身。`,"log-level":`单个实例的日志级别可以在运行中修改。控制器重启后,会重新使用已保存的级别。`,discovery:`设备发现会在网络中搜索设备和服务,并推荐与之匹配的适配器。这需要先安装 Discovery 适配器。`,"auto-upgrade":`可以配置适配器,让较小的错误修复和功能更新完全自动安装。较大的版本跨越可能包含重大变更,仍然需要手动确认。`,"objects-export":`对象可以导出为 JSON 文件,之后再导入回来,例如把一份配置迁移到另一套安装环境。`}},$v=Object.keys(Zv);function ey(e,t){return e?/^\d+$/.test(e)?`${e}px`:e:t}function ty(e){let t={},n=/([a-zA-Z][\w-]*)\s*=\s*(?:'([^']*)'|"([^"]*)")/g,r;for(;(r=n.exec(e))!==null;)t[r[1].toLowerCase()]=r[2]??r[3];return t}function ny(e,t,n){var r;let i=ty(e);if(!i.src)return null;let a=i.src.replace(/^data:image\/svg;/,`data:image/svg+xml;`);if((r=i.class)!=null&&r.split(` `).includes(`icon`)){let e=`url("${a}")`;return E(I,{component:`span`,title:i.alt||n,sx:{display:`inline-block`,verticalAlign:`text-bottom`,mx:`2px`,width:ey(i.width,`1.25em`),height:ey(i.height||i.width,`1.25em`),backgroundColor:`currentColor`,maskImage:e,maskSize:`contain`,maskPosition:`center`,maskRepeat:`no-repeat`,WebkitMaskImage:e,WebkitMaskSize:`contain`,WebkitMaskPosition:`center`,WebkitMaskRepeat:`no-repeat`}},t)}return E(I,{component:`img`,src:a,alt:i.alt||n,sx:{verticalAlign:`text-bottom`,mx:`2px`,maxWidth:`100%`,width:ey(i.width,`auto`),height:ey(i.height,`auto`)}},t)}function ry(e,t){var n;let r=((n=Qv[t])==null?void 0:n[e])||Qv.en[e]||e;if(!r.includes(`<img`))return r;let i=[],a=/<img\s[^>]*>/g,o=0,s;for(;(s=a.exec(r))!==null;){let t=ny(s[0],`${e}-${s.index}`,e);t&&(s.index>o&&i.push(r.substring(o,s.index)),i.push(t),o=s.index+s[0].length)}if(!i.length)return r;let c=r.substring(o);return c&&i.push(c),E(`span`,{children:i})}var iy=class extends Qt{constructor(e){super(e);let t=e.lastTipId?$v.indexOf(e.lastTipId):-1;this.state={index:$v.length?(t+1)%$v.length:0,dontShowAgain:!1}}move(e){this.setState({index:(this.state.index+e+$v.length)%$v.length})}render(){let e=$v[this.state.index];return e?N(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.props.onClose(this.state.dontShowAgain,e),"aria-labelledby":`tips-dialog-title`,children:[E(_e,{id:`tips-dialog-title`,children:N(I,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:1},children:[E(f,{color:`primary`}),this.props.t(`Did you know?`)]})}),N(ce,{children:[E(de,{id:`tips-dialog-text`,sx:{minHeight:90},children:ry(e,this.props.lang)}),E(Ae,{control:E(Oe,{checked:this.state.dontShowAgain,onChange:e=>this.setState({dontShowAgain:e.target.checked})}),label:this.props.t(`Do not show these tips at start`)})]}),N(xt,{children:[E(I,{component:`span`,sx:{flexGrow:1,opacity:.7,ml:1},children:`${this.state.index+1} / ${$v.length}`}),E(H,{id:`tips-dialog-previous`,variant:`outlined`,color:`grey`,disabled:$v.length<2,onClick:()=>this.move(-1),startIcon:E(Vd,{}),children:this.props.t(`Previous`)}),E(H,{id:`tips-dialog-next`,variant:`outlined`,color:`grey`,disabled:$v.length<2,onClick:()=>this.move(1),startIcon:E($t,{}),children:this.props.t(`Next`)}),E(H,{id:`tips-dialog-ok`,variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.onClose(this.state.dontShowAgain,e),startIcon:E(Me,{}),children:this.props.t(`Ok`)})]})]}):null}},ay={" for %s":` for %s`,"%s active / %s inactive":`%s active / %s inactive`,"%s added to %s":`%s added to %s`,"%s days":`%s days`,"%s days ago":`%s days ago`,"%s devices":`%s device(s)`,"%s hours":`%s hours`,"%s hours ago":`%s hours ago`,"%s instances":`%s instances`,"%s members":`%s members`,"%s minutes ago":`%s minutes ago`,"%s object(s) processed":`%s objects were processed`,"%s objects are in a room":`%s objects are in a room`,"%s objects have a function":`%s objects have a function`,"%s processes":`%s processes`,"%s selected":`%s selected`,"%s states":`%s states`,"%s tool call(s)":`%s tool call(s)`,"%s updates":`%s updates`,"%s was imported":`%s was imported successfully`,"%s was successfully updated to %s":`%s was successfully updated to %s`,"(This can be disabled later in settings)":`(This can be disabled later in settings)`,"(manual reinstallation, if somehow nothing works after the update)":`(manual reinstallation, if somehow nothing works after the update)`,"(without prefix)":`(without prefix)`,"0 %d days ago":`today`,"0 - no expiration":`0 - no expiration`,"1 %d days ago":`%d days ago`,"1 hour":`1 hour`,"1 update":`1 update`,"1. Install the MCP server":`1. Install the MCP server`,"1: Logic adapters":`1: Logic adapters`,"2 %d days ago":`%d days ago`,"2. Add the MCP server in your AI client":`2. Add the MCP server in your AI client`,"2: Data provider adapters":`2: Data provider adapters`,"3. Assistant system prompt":`3. Assistant system prompt`,"3: Other adapters":`3: Other adapters`,"5 %d days ago":`%d days ago`,"<p>You have not installed an Info Adapter. The adapter shows you information about the system and is required to display important messages from the ioBroker team.</p><p>Do you want to install the info adapter?</p>":`<p>The Info adapter ist not installed on your system. This adapter provides information about your system and is required to display important messages from the NexoWatt EOS team.</p><p>Do you want to install the Info adapter?</p>`,"<p>Your version of the info adapter is outdated. It is strongly recommended to update this to get on the enjoyment of the innovations. Only with the new version, for example, messages from the ioBroker team can be displayed directly.</p><p>Would you like to update the info adapter?</p>":`<p>Your version of the Info adapter is outdated. It is strongly recommended to update in order to receive all relevant messages for your system.</p><p>Would you like to update the Info adapter now?</p>`,"A credential with this name already exists":`A credential with this name already exists`,"A longer answer is cut off when the limit is reached.":`A longer answer is cut off when the limit is reached.`,'A manual installation usually takes place under root as user and therefore a "sudo" is necessary before the commands.':`A manual installation usually takes place under root as user and therefore a "sudo" is necessary before the commands.`,"A unique name is required":`A unique name is required`,AI:`AI`,"AI assistant":`AI assistant`,"AI assistant settings":`AI assistant settings`,"API key":`API key`,"API key (credential)":`API key (credential)`,"Absolute path to backup directory or empty to backup in data directory. Leave it empty for default storage place.":`Absolute path to backup directory or empty to backup in data directory. Leave it empty for default storage place.`,Accept:`Accept`,"Accept suggestions":`Accept suggestions`,"Access Key ID":`Access Key ID`,"Access control":`Access control`,"Access control list":`Access control list`,"Access control list: %s":`Access control list: %s`,Acknowledge:`Acknowledge`,"Acknowledge & close":`Acknowledge & close`,Acknowledged:`Acknowledged`,"Acknowledged explanation":`If you want to control a device do not use 'Acknowledged'`,Actions:`Actions`,'Activate the check of password in admin if you plan to access your ioBroker is not in "Demilitarized Zone"':`You should enable this option if you plan to allow access to NexoWatt EOS from the internet or by untrusted users.`,"Activated. Click to stop.":`Activated. Click to stop.`,Active:`Active`,"Active instances":`Active instances`,'Active repo is "%s"':`Warning: Current repository is "%s". Use at your own risk!`,"Active repository:":`Active repository`,"Adapter cannot request the exactly device status and the status will be guessed on the last sent command":`Adapter cannot request the exactly device status and the status will be guessed on the last sent command`,"Adapter configuration":`Adapter configuration`,"Adapter does not use the cloud for these devices/service":`Adapter does not use the cloud for these devices/service`,"Adapter requires the specific cloud access for these devices/service":`Adapter requires the specific cloud access for these devices/service`,"Adapter settings for %s states":`Adapter settings for %s states`,"Adapter warnings":`Adapter warnings`,Adapters:`Adapters`,"Adapters from this Group installed":`Adapters from this group installed`,Add:`Add`,'Add %s objects from "%s" to "%s"?':`Add %s objects from "%s" to "%s"?`,"Add Objecttree from JSON File":`Add objects tree from JSON file`,"Add Single-Sign On":`Add Single-Sign On`,"Add certificate from file":`Add certificate from file`,"Add child":`Add sub-category`,"Add color":`Add color`,"Add compact group":`Add compact group`,"Add credential":`Add credential`,"Add enum":`Add new category`,"Add group":`Add new category item`,"Add icon":`Add icon`,"Add instance":`Add instance`,"Add instance...":`Adding instance...`,"Add member":`Add member`,"Add new child object to selected parent":`Add new child object to selected parent`,"Add new field":`Add new attribute`,"Add new issue":`Report a bug`,"Add new line to the repository list":`Add new line to the repository list`,"Add new object:":`Add new object:`,"Add new object: %s":`Add new object: %s`,"Add objects":`Add objects`,'Add objects to "%s"':`Add objects to "%s"`,Address:`Address`,"Address:":`Address`,"Admin is not enabled in cloud settings!":`Admin is not enabled in cloud settings!`,Administrator:`Administrator`,"Administrator name":`Administrator name`,"Administrator name cannot be changed":`Administrator name cannot be changed`,"Administrator password":`Administrator password`,Afghanistan:`Afghanistan`,Agree:`Agree`,Albania:`Albania`,Algeria:`Algeria`,Alias:`Alias`,"Alias ID":`Alias ID`,"Alias description":`Alias description`,"Alias name":`Alias name`,"Alias read":`Readable`,"Alias state":`Alias state ID`,"Alias units":`Alias units`,"Alias write":`Writable`,All:`All`,"All addresses":`All addresses`,"All backups older than these hours will be deleted, but only if the number of files is greater than of the files number":`All backups older than these hours will be deleted, but only if the number of files is greater than of the files number`,"All instances":`All instances`,"All items are filtered out":`All items are filtered out`,"All objects":`All objects`,All_group:`All`,"Allow actions (write/install)":`Allow actions (write/install)`,"Allow automatic adapter upgrades for this repository":`Allow automatic adapter upgrades for this repository`,'Allow execution of sendToHost("shell", "cli command")':`Allow execution of sendToHost("shell", "cli command")`,"Allow only the following upgrades to be performed automatically:":`Allow only the following upgrades to be performed automatically:`,"Allow self-signed certificates":`Allow self-signed certificates`,"Allow shell's commands":`Allow shell's commands`,"Allow slave connections":`Allow slave connections`,"Already exists":`Already exists`,"Always first":`Always first`,"Always read files from disk and do not cache them in RAM. Used for debugging.":`Always read files from disk and do not cache them in RAM. Used for debugging.`,"American Samoa":`American Samoa`,"An object representing the username and password for HTTP Basic Auth":`An object representing the username and password for HTTP Basic Auth`,Andorra:`Andorra`,Angola:`Angola`,Anguilla:`Anguilla`,Antarctica:`Antarctica`,"Antigua and Barbuda":`Antigua and Barbuda`,"Application name":`Application name`,Apply:`Apply`,Approved:`Approved`,Apr:`Apr`,April:`April`,Architecture:`Architecture`,"Are you sure to delete %s?":`Are you sure to delete <b>"%s"</b>?`,'Are you sure to delete <span style="color: red">all</span> children of %s?':`Are you sure to delete <span style="color: red">all</span> children of <b>%s</b>?`,"Are you sure to delete all children of %s?":`Are you sure to delete <b>"%s"</b> and <span style="color: red; font-weight: bold">all</span> children?`,"Are you sure to delete script %s?":`Are you sure to delete script '%s'?`,"Are you sure you want to delete adapter %s?":`Are you sure you want to delete adapter %s?`,'Are you sure you want to delete the instance "%s" or whole adapter "%s"?':`Are you sure you want to delete the instance "%s" or whole adapter "%s"?`,"Are you sure you want to delete the instance %s?":`Are you sure you want to delete the instance "%s"?`,"Are you sure you want to delete the instance <b>%s</b>?":`Are you sure you want to delete the instance <b>%s</b>?`,"Are you sure?":`Are you sure?`,"Are you sure? Changes are not saved.":`Are you sure? Changes are not saved.`,Argentina:`Argentina`,Armenia:`Armenia`,Aruba:`Aruba`,Ascending:`Ascending`,'Ask me about your ioBroker system, e.g. "Which lights do I have in the living room?" or "Which adapter do I need for my Philips Hue?"':`Ask me about your NexoWatt EOS system, e.g. "Which lights do I have in the living room?" or "Which adapter do I need for my Philips Hue?"`,"Ask password by connection establishment":`Ask password by connection establishment`,"Ask the assistant…":`Ask the assistant…`,"Assign devices":`Assign devices`,"Assigned via single states":`Assigned via single states`,"Assigned via the device":`Assigned via the device`,Assignment:`Assignment`,Assistant:`Assistant`,Attach:`Attach`,"Attach host":`Attach host`,Aug:`Aug`,August:`August`,Australia:`Australia`,Austria:`Austria`,Auth:`Auth`,Authentication:`Authentication`,"Authentication in Admin":`Require authentication to access Admin UI`,"Authentication required.":`Authentication required or login, password are invalid`,"Authentication was deactivated":`Authentication was deactivated`,"Auto upgrade policy for %s":`Auto upgrade policy for %s`,"Auto-Upgrade":`Auto-Upgrade`,"Auto-compress size factor":`Auto-compress size factor`,"Auto-compress size factor minimum size":`Auto-compress size factor minimum size`,"Automatic Upgrade Policy":`Automatic Upgrade Policy`,Available:`Available`,"Available version:":`Available version:`,Azerbaijan:`Azerbaijan`,Back:`Back`,"Backend time differs by %s minutes":`The time of the NexoWatt EOS server and that of the browser differ by %s minutes. Check the host settings.`,Background:`Background`,"Background color of the login screen":`Background color of the login screen`,"Background image":`Background image`,"Backup hours":`Backup hours`,Badges:`Badges`,Bahamas:`Bahamas`,Bahrain:`Bahrain`,Bangladesh:`Bangladesh`,Barbados:`Barbados`,"Base URL":`Base URL`,"Base settings":`Base settings`,"Be aware!":`Be aware!`,"Beautify JSON output":`Beautify JSON output to a human readable form`,Belarus:`Belarus`,Belgium:`Belgium`,Belize:`Belize`,Benin:`Benin`,Bermuda:`Bermuda`,Bhutan:`Bhutan`,"Bind IP address":`Bind IP address`,Bolivia:`Bolivia`,"Bookmark admin":`Bookmark admin page`,"Bosnia and Herzegovina":`Bosnia and Herzegovina`,Botswana:`Botswana`,"Bouvet Island":`Bouvet Island`,Brazil:`Brazil`,"British Indian Ocean Territory":`British Indian Ocean Territory`,"Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.":`Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.`,"Brunei Darussalam":`Brunei Darussalam`,Bulgaria:`Bulgaria`,"Burkina Faso":`Burkina Faso`,Burundi:`Burundi`,"But you can open this link in new tab:":`But you can open this link in new tab:`,"By default the backup is every 2 hours. Time is in minutes. To disable backup set the value to 0":`By default the backup is every 2 hours. Time is in minutes. To disable backup set the value to 0`,"By every write the backup of object.json will be created.":`By every write the backup of object.json will be created.`,'Copy · stays in "%s" too':`Copy · stays in "%s" too`,"CPU (%)":`CPU (%)`,"CPU and RAM of this host are not recorded by %s yet":`CPU and RAM of this host are not recorded by %s yet`,CPUs:`CPUs`,Calendar:`Calendar`,Cambodia:`Cambodia`,Cameroon:`Cameroon`,Canada:`Canada`,Cancel:`Cancel`,"Cannot create credential: %s":`Cannot create credential: %s`,"Cannot create instance":`Cannot create instance`,"Cannot create user: ":`Cannot create user: `,"Cannot delete user: ":`Cannot delete user: `,"Cannot disable admin!":`Cannot disable admin!`,"Cannot enable authentication as no certificates found!":`Cannot enable authentication as no certificates found!`,"Cannot install":`Cannot install`,"Cannot parse JSON!":`Cannot parse JSON!`,"Cannot parse code!":`Cannot parse code!`,"Cannot read certificates: %s":`Cannot read certificates: %s`,"Cannot read file!":`Cannot read file!`,"Cannot read version from NPM":`Could not read version from NPM`,"Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"Cannot search for hosts":`Cannot search for hosts`,"Cannot set password: ":`Cannot set password: `,"Cannot update licenses: %s":`Cannot update licenses: %s`,"Cape Verde":`Cape Verde`,Categories:`Categories`,"Categorize objects into rooms/functions":`Categorize objects into rooms/functions`,Category:`Category`,"Cayman Islands":`Cayman Islands`,"Central African Republic":`Central African Republic`,Certificate:`Certificate`,Certificates:`Certificates`,Chad:`Chad`,Change:`Change`,"Change current host":`Change current host`,"Change log":`Change log`,"Change view mode":`Change view mode`,Changelog:`Change log`,Channel:`Channel`,Chart:`Chart`,"Chart for %s":`Chart for %s`,Check:`Check`,"Check adapter for updates":`Check adapters for updates`,"Check all":`Check all`,"Check disk space interval":`Check disk space interval`,Chile:`Chile`,China:`China`,"Christmas Island":`Christmas Island`,City:`City`,"City:":`City`,Clear:`Clear`,"Clear field":`Clear field`,"Clear list":`Clear list`,"Clear log":`Clear log`,"Clear on disk permanent":`Clear on disk permanent`,"Clear selection":`Clear selection`,"Clear text":`Clear text`,"Click do activate events again, or just wait one minute":`Click do activate events again, or just wait one minute`,"Click for more":`Click for more`,"Click on icon":`Click on icon to open a link`,"Click to clear all filters":`Click to clear all filters`,"Click to copy %s":`Click to copy %s`,Clone:`Clone`,Close:`close`,"Close on finished":`Close on finished`,"Cocos (Keeling) Islands":`Cocos Islands`,"Cocos Islands":`Cocos Islands`,"Collapse all":`Collapse all`,"Collapse all nodes":`Collapse all nodes`,Colombia:`Colombia`,Color:`Color`,Command:`Command`,"Comment to version":`Comment to version`,Comments:`Comments`,Comoros:`Comoros`,"Compact mode":`Compact mode`,"Configuration not saved.":`Configuration not saved.`,Confirm:`Confirm`,Congo:`Congo`,"Congo, The Democratic Republic of the":`Democratic Republic of the Congo`,"Connect timeout":`Connect timeout`,"Connected to device or service":`Connected to device or service`,"Connected to host":`Connected to host`,"Connected:":`Connected:`,"Connection OK: %s models":`Connection OK: %s models`,"Connection password":`Connection password`,"Connection to admin lost. Waiting for reconnection...":`Connection to admin lost. Waiting for reconnection...`,Continue:`Continue`,"Cook Islands":`Cook Islands`,Copied:`Copied`,Copy:`Copy to clipboard`,"Copy content":`Copy content`,"Copy into clipboard":`Copy into clipboard`,"Copy log":`Copy log`,"Copy states":`Copy states`,"Copy to clipboard":`Copy to clipboard`,"Costa Rica":`Costa Rica`,"Cote D'Ivoire":`Ivory Coast`,Country:`Country`,"Country:":`Country`,Create:`Create`,"Create a copy":`Create a copy`,"Create a copy of this object":`Create a copy of this object`,"Create alias from this ID":`Create alias from this object`,"Create and continue":`Create and continue`,"Create instance if it does not exist yet":`Create instance if it does not exist yet`,"Create instances":`Create instances`,"Create instances automatically":`Create instances automatically`,"Create instances automatically - Last scan on %s":`Create instances automatically - Last scan on %s`,"Create new alias: %s":`Create new alias: %s`,"Create new category":`Create new category`,"Create new category, like %s":`Create new category, like %s`,"Create new enum":`Create new enum`,"Create new enum, like %s":`Create new enum, like %s`,"Create new function":`Create new function`,"Create new group":`Create new group`,"Create new room":`Create new room`,"Create new user":`Create new user`,"Create rooms":`Create rooms`,"Create state":`Create state`,Created:`Created`,"Created: %s floors, %s rooms, %s functions":`Created: %s floors, %s rooms, %s functions`,"Credential not found":`Credential not found`,"Credential type":`Type`,Credentials:`Credentials`,Croatia:`Croatia`,"Cron expression":`Cron expression`,Cuba:`Cuba`,Currency:`Currency`,"Currency sign":`Currency sign`,"Currency:":`Currency`,Custom:`Custom`,"Custom enum":`Custom enumeration`,"Custom enumeration":`Custom enumeration`,"Custom floor":`Custom floor`,"Custom function":`Custom function`,"Custom room":`Custom room`,"Custom settings":`Custom settings`,Cyprus:`Cyprus`,"Czech Republic":`Czech Republic`,"DB number":`DB number`,"DD.MM.YY":`DD.MM.YY`,"DD.MM.YYYY":`DD.MM.YYYY`,"DD/MM/YYYY":`DD/MM/YYYY`,"Danger zone":`Danger zone`,"Date From":`Date From`,"Date To":`Date To`,"Date format":`Date format`,"Date format:":`Date format`,"Deactivated. Click to start.":`Deactivated. Click to start.`,"Debug info":`Debug info`,"Debug outputs":`Debug outputs`,"Debug outputs:":`Debug outputs`,Dec:`Dec`,December:`December`,Decline:`Decline`,Declined:`Declined`,"Default ACL":`Default ACL`,"Default History":`Default History`,"Default Repository":`Default Repository`,"Default V8 has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max-old-space-size to a maximum of ~1gb (32-bit) and ~1.7gb (64-bit)":`Default V8 engine has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max-old-space-size to a maximum of ~1gb (32-bit) and ~1.7gb (64-bit)`,"Default history instance:":`Default history instance`,"Default log level":`Default log level`,Delete:`Delete`,"Delete adapter":`Delete adapter`,"Delete all custom object settings of this adapter too":`Delete all custom object settings of this adapter too`,"Delete attribute":`Delete attribute`,"Delete category":`Delete category`,"Delete credential":`Delete credential`,"Delete enum":`Delete enum`,"Delete instance":`Delete instance`,"Delete member":`Delete member`,"Delete object":`Delete object`,"Delete object(s)":`Delete object(s)`,"Delete one item":`Delete this object`,"Delete with children":`Delete with child objects (%s objects)`,Denmark:`Denmark`,Descending:`Descending`,Description:`Description`,"Description A-Z":`Title`,"Detected slow connection!":`Detected slow connection!`,"Detected type":`Detected type`,Device:`Device`,"Device discovery":`Device discovery`,"Device or channel":`Device or channel`,Devicemanager:`Config manager`,Devices:`Devices`,"Did you know?":`Did you know?`,"Different IDs for read and write":`Different IDs for read and write`,"Directory path":`Directory path`,"Disable authentication":`Disable authentication`,"Disable/Enable translation":`Disable/Enable translation`,Discard:`Discard`,"Discard unsaved changes?":`Discard unsaved changes?`,"Discard?":`Discard?`,"Disconnect Single-Sign On":`Disconnect Single-Sign On`,Discover:`Discover`,"Discover all possible devices":`Discover all possible devices`,"Discovery devices":`Find devices and services`,"Disk free":`Disk free`,"Disk free:":`Disk free:`,"Disk size":`Disk size`,"Display name":`Display name`,Djibouti:`Djibouti`,"Do not expose iobroker Admin or Web interfaces to the internet directly via the port forwarding!":`Do not expose NexoWatt EOS or Web interfaces to the internet directly via the port forwarding!`,"Do not show these tips at start":`Do not show these tips at start`,"Do not show this dialog in this browser session any more":`Do not show this dialog in this browser session any more`,"Do not show this host again":`Do not show this host again`,'Do you want to delete enum "%s"?':`Do you want to delete enum "%s"?`,"Do you want to delete group %s?":`Do you want to delete group "%s"?`,'Do you want to delete just <span style="color: blue">one object</span> or <span style="color: red">all</span> children of %s too?':`Do you want to delete just <span style="color: blue">one object</span> or <span style="color: red">all</span> children of %s too?`,"Do you want to delete user %s?":`Do you want to delete user "%s"?`,"Do you want to upgrade all adapters?":`Do you want to upgrade all adapters?`,"Dock to the side":`Dock to the side`,"Domains:":`Domains`,Dominica:`Dominica`,"Dominican Republic":`Dominican Republic`,"Don't ask again for such operations":`Don't ask again for such operations`,"Don't install adapters from GitHub unless asked to by a developer or if you are 100 %sure what you are doing! Adapters on GitHub may not work like they should (they are still under development). Only install them if you are participating in a test! Please wait for an official release!":`Don't install adapters from GitHub unless asked by a developer or when you are 100 %sure what you are doing! Adapters on GitHub are still under development and might contain bugs or breaking changes. Only install them if you are participating in a test! Else please wait for an official release of the adapter!`,"Done with error: %s":`Done with error: %s`,Download:`Download`,"Download log":`Download log`,"Drag an object onto another entry in the list to move it there. Hold Shift, Ctrl or Alt to copy it.":`Drag an object onto another entry in the list to move it there. Hold Shift, Ctrl or Alt to copy it.`,"Drag and drop to reorder":`Drag and drop to reorder`,'Drag states, channels or devices from the object list here or use "Add objects"':`Drag states, channels or devices from the object list here or use "Add objects"`,"Drop the files here":`Drop the files here`,"Drop the icons here":`Drop the icons here`,"Due to the different hardware and platforms under which ioBroker runs, the js-controller has to be updated manually. Further details can be found in the appropriate section.":`Due to the different hardware and platforms under which NexoWatt EOS runs, the js-controller has to be updated manually. Further details can be found in the appropriate section.`,ECharts:`ECharts`,EOL:`EOL`,"East Timor":`East Timor`,"Easy Admin":`Easy Admin`,Ecuador:`Ecuador`,Edit:`Edit`,"Edit category":`Edit category`,"Edit compact groups for %s":`Edit compact groups for %s`,"Edit config for %s states":`Edit config for %s states`,"Edit config: %s":`Edit config: %s`,"Edit credential":`Edit credential`,"Edit enum":`Edit enum`,"Edit host settings":`Edit host settings`,"Edit in dialog":`Edit in dialog`,"Edit log level rule for %s":`Edit log level for %s`,"Edit memory limit rule for %s":`Edit memory limit for %s`,"Edit object":`Edit object`,"Edit object:":`Edit object:`,"Edit on github":`Edit on github`,"Edit restart rule for %s":`Edit restart schedule for %s`,"Edit start order (tier)":`Edit start order (tier)`,Egypt:`Egypt`,"El Salvador":`El Salvador`,"Email for account:":`Email for account`,"Emergency Linux / macOS / Windows":`Emergency Linux / macOS / Windows`,"Empty password is not allowed":`Empty password is not allowed`,Enabled:`Enabled`,"Enabled:":`Enabled`,"End date":`End date`,"End of line char":`End of line char`,"End time":`End Time`,"Endpoint default":`Endpoint default`,"Enter version manually":`Enter version manually`,'Entry "%s" already exists':`Entry "%s" already exists`,"Enum parameters":`Enumeration parameters`,Enums:`Enums`,"Equatorial Guinea":`Equatorial Guinea`,Eritrea:`Eritrea`,Error:`Error`,"Estimated size":`Estimated size`,Estonia:`Estonia`,Ethiopia:`Ethiopia`,Event:`Type`,Events:`Events`,"Every day one file":`Every day one file`,"Every floor becomes a room, which contains the rooms of this floor":`Every floor becomes a room, which contains the rooms of this floor`,Everyone:`Everyone`,"Exclude system repositories from export JSON":`Exclude system repositories from export JSON`,"Exclude translations (except english) from export JSON":`Exclude translations (except english) from export JSON`,Execute:`Execute`,Expand:`Expand`,"Expand all":`Expand all`,"Expand all nodes":`Expand all nodes`,"Expert mode":`Expert mode`,Expire:`Expire`,"Export setting to JSON file":`Export setting to JSON file`,"Export the shown entries as a text file":`Export the shown entries as a text file`,Facility:`Facility`,"Failed to open JSON File":`Failed to open JSON file`,"Falkland Islands (Malvinas)":`Falkland Islands (Malvinas)`,"Family number":`Family number`,"Faroe Islands":`Faroe Islands`,Feb:`Feb`,February:`February`,Fiji:`Fiji`,File:`File`,"File extension":`File extension`,"File is too big!":`File is too big!`,"File log":`File log`,"File name":`File name`,"File rights":`File rights`,Files:`Files`,Filter:`Filter`,"Filter adapter with updates":`Filter adapter with updates`,"Filter adapters to see others. There are %s more":`Filter adapters to see others. There are %s more`,"Filter adapters to see others. There is %s more":`Filter adapters to see others. There is %s more`,"Filter by mode":`Filter by mode`,"Filter by name":`Filter by name`,"Filter by status":`Filter by status`,"Filter installed adapters":`Filter installed adapters`,"Filter instances":`Filter instances`,"Filter local connection type":`Filter local connection type`,"Filter menu":`Filter menu`,"Open menu":`Open menu`,"Filter specific compact group":`Filter specific compact group`,"Filter:":`Filter`,"Filtered out":`Everything is filtered out`,"Find coordinates...":`Find coordinates…`,"Find devices and services":`Find devices and services`,Finish:`Finish`,Finland:`Finland`,"First day of week":`First day of week`,"Flag will be automatically detected as repository will be read for the first time":`Flag will be automatically detected as repository will be read for the first time`,"Float divider":`Float divider`,"Float divider sign":`Float divider sign`,"Float divider:":`Float divider`,Floors:`Floors`,Folder:`Folder`,"Following states have history enabled":`Following states have history enabled`,"For an update from js-controller 1.x to 2.x please always read the information at":`For an update from js-controller please always read the information at`,"For future use":`For future use`,"For systems created with the new Linux installer:":`For systems created with the new Linux installer:`,"For systems installed manually under Linux, prefix sudo or run as root.":`For systems installed manually under Linux, prefix sudo or run as root.`,"Force writing after this many changes have been buffered. This reduces memory consumption and data loss in case of a crash":`Force writing after this many changes have been buffered. This reduces memory consumption and data loss in case of a crash`,"Found states with history":`Found states with history`,France:`France`,Free:`Free`,"Free RAM:":`Free:`,"French Guiana":`French Guiana`,"French Polynesia":`French Polynesia`,"French Southern Territories":`French Southern Territories`,Fri:`Fri`,From:`From`,"From file":`From file`,"From github":`From github`,"From npm":`From npm`,Function:`Function`,Functions:`Functions`,Gabon:`Gabon`,Gambia:`Gambia`,"General information for all platforms":`General information for all platforms`,"Generated ID:":`Generated ID`,"Generated: %s":`Generated: %s`,Georgia:`Georgia`,Germany:`Germany`,Ghana:`Ghana`,Gibraltar:`Gibraltar`,"Go to Github...":`Go to Github...`,"Go to admin now":`Go to admin now`,"Go to original":`Go to original`,"Go to the AI settings":`Go to the AI settings`,Greece:`Greece`,Greenland:`Greenland`,Grenada:`Grenada`,Group:`Group`,"Group members":`Group members`,Groups:`Roles`,Guadeloupe:`Guadeloupe`,Guam:`Guam`,Guatemala:`Guatemala`,Guernsey:`Guernsey`,Guinea:`Guinea`,"Guinea-Bissau":`Guinea-Bissau`,Guyana:`Guyana`,"HTTP log":`HTTP log`,Haiti:`Haiti`,"Has no permission to %s %s %s":`Has no permission to %s %s %s`,"Have fun automating your home with":`Have fun automating your home with`,"Heard Island and Mcdonald Islands":`Heard Island and McDonald Islands`,"Heard and Mc Donald Islands":`Heard and Mc Donald Islands`,Heartbeat:`Heartbeat`,"Hide assistant button":`Hide assistant button`,"Hide members":`Hide members`,"Hide object list":`Hide object list`,"Hide password":`Hide password`,High:`High`,"History data":`History data`,"History instance":`History instance`,"History instance not alive":`History instance not alive`,"History instance not selected":`History instance not selected`,"Hits: %s":`Hits: %s`,"Holy See (Vatican City State)":`Vatican City`,Honduras:`Honduras`,"Hong Kong":`Hong Kong`,Host:`Host`,"Host %s is offline":`Host %s is offline`,"Host Base Settings":`Host Base Settings`,"Host does not answer":`Host does not answer`,"Host for this instance":`Host for this instance`,"Host name":`Host name`,"Host selection":`Select station`,"Host to indicate that log messages are coming from (Default: localhost).":`Host to indicate that log messages are coming from (Default: localhost).`,"Host-specific notifications":`Host-specific notifications`,"Host:":`Host`,Hosts:`Hosts`,"Hosts notifications":`Hosts notifications`,"How oft the disk will be checked. Do not set it to low, because it can affect system performance. Value is in ms":`In which interval (in ms) the disk will be checked. Do not set it to low, because it can affect system performance.`,"How oft the instance statistics will be updated. Used RAM, CPU and so on. Value is in ms":`In which interval (in ms) the instance statistics (Used RAM, CPU, ...) will be updated.`,"How often":`How often`,"How often the data from RAM will be saved on disk in ms":`In which interval (in ms) the data from RAM will be saved on disk`,Hungary:`Hungary`,"I agree with the collection of anonymous statistics.":`I agree with the collection of anonymous statistics and automatically reporting crashes.`,ID:`ID`,"ID edit":`Edit ID`,"ID preview":`Preview ID`,"IP is domain or more than one address":`IP is domain or more than one address`,Iceland:`Iceland`,Icon:`Icon`,"Icon upload":`Icon upload`,"If single lines in the DB are corrupted, they can be ignored without losing the whole DB.":`If single lines in the DB are corrupted, they can be ignored without losing the whole DB.`,"If the upgrade command displays Access Rights / Permission errors, then please use the install fixer":`If the upgrade command displays Access Rights / Permission errors, then please use the install fixer`,'If the upgrade command displays permissions / permissions errors, fix them. Sometimes "sudo" is not enough and you have to run the installation as a real root (previously simply sudo su -).':`If the upgrade command displays permissions / permissions errors, fix them. Sometimes "sudo" is not enough and you have to run the installation as a real root (previously simply "sudo su -").`,"If there are problems with access rights when running on Linux the command has to be changed slightly:":`If there are problems with access rights when running on Linux the command has to be changed slightly:`,"If you do not see the room you want to add, please add it in the categories tab.":`If you do not see the room you want to add, please add it in the categories tab.`,"If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.":`If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.`,"If you need to save the mode all the time, you can do this in the system settings.":`If you need to save the mode all the time, you can do this in the system settings.`,Ignore:`Ignore`,"Ignore read errors":`Ignore read errors`,"Ignore version %s":`Ignore version %s`,"Ignore warning":`Ignore warning`,"Import objects":`Import objects`,"Import settings from JSON file":`Import settings from JSON file`,"Important information about port forwarding":`Important information about port forwarding`,"Important main settings":`Important main settings`,"In background":`In background`,"In groups":`In groups`,"In your AI client (Claude Desktop, Codex, Gemini CLI, …) add a new MCP server with this URL:":`In your AI client (Claude Desktop, Codex, Gemini CLI, …) add a new MCP server with this URL:`,"Incompatible OS. Required one of %d, present %d":`Incompatible OS. Required one of %d, present %d`,"Incompatible node version. Required %d, installed %d":`Incompatible node.js version. Required %d, installed %d`,India:`India`,Indonesia:`Indonesia`,Info:`Info`,"Info adapter not found":`Info adapter not found`,Information:`Information`,"Initial ioBroker setup":`Initial NexoWatt EOS setup`,Insert:`Insert`,"Insert JSON with objects here":`Insert JSON with objects here`,Install:`Install`,'Install "%s" v%s from repository instead of v%s':`Install "%s" v%s from repository instead of v%s`,"Install a specific version":`Install a specific version`,"Install adapter":`Install adapter`,"Install adapter from %s":`Install or update the adapter from %s`,"Install adapters":`Install adapters`,"Install from custom URL":`Install from custom URL`,"Install on host":`Install on host`,"Install or update the adapter from %s":`Install or update the adapter from %s`,"Install selected adapters":`Install selected adapters`,"Install the %s adapter — ideally as a web extension of your web (or admin) instance. It exposes ioBroker’s tools to any MCP-compatible AI client.":`Install the %s adapter — ideally as a web extension of your web (or admin) instance. It exposes ioBroker’s tools to any MCP-compatible AI client.`,"Install version %s from repository":`Install version %s from repository`,"Installation counter":`Installations counter`,"Installation process":`Installation process`,"Installations counter":`Installations counter`,Installed:`Installed`,"Installed adapters":`Installed adapters`,"Installed from group":`Installed from group`,"Installed instances":`Installed instances`,"Installed version":`Installed version`,Instance:`Instance`,"Instance %s already exists":`Instance "%s" already exists`,"Instance link %s":`Instance link %s`,"Instance settings":`Instance settings`,"Instance statistics update interval":`Instance statistics update interval`,Instances:`Instances`,"Interpret output":`Interpret output`,Intro:`Quick access`,"Invalid configuration. Please fix":`Invalid configuration. Please fix`,"Invalid settings in these fields could lead to dead host":`Invalid settings in these fields could lead to dead host`,"Invalid version of %s":`Invalid version of %s`,"Invalid version of %s. Required %s":`Invalid version of %s. Required %s`,"Invalid version of %s. Required %s. Current":`Invalid version of %s. Required %s. Current`,"Invoice number":`Invoice number`,Iran:`Iran`,"Iran, Islamic Republic Of":`Iran`,Iraq:`Iraq`,Ireland:`Ireland`,"Is yet in the list":`It's already in the list`,"Isle of Man":`Isle of Man`,Israel:`Israel`,"It is suggested to enable the authentication in admin":`It is recommended that you enable authentication to access Admin UI.`,"It will be compressed when the uncompressed size is >= size * sizeFactor AND >= sizeFactorMinimumSize":`It will be compressed when the uncompressed size is >= size * sizeFactor AND >= sizeFactorMinimumSize`,Italy:`Italy`,"Its own configuration and objects will be discarded.":`Its own configuration and objects will be discarded.`,"Ivory Coast":`Ivory Coast`,"JS function like":`JS function like`,Jamaica:`Jamaica`,Jan:`Jan`,January:`January`,Japan:`Japan`,Jersey:`Jersey`,Jordan:`Jordan`,Jul:`Jul`,July:`July`,Jun:`Jun`,June:`June`,Kazakhstan:`Kazakhstan`,Kenya:`Kenya`,Key:`Key`,Kiribati:`Kiribati`,"Known bugs for":`Known bugs for`,Korea:`Korea`,"Korea, Democratic People'S Republic of":`North Korea`,"Korea, Republic of":`South Korea`,Kosovo:`Kosovo`,Kuwait:`Kuwait`,Kyrgyzstan:`Kyrgyzstan`,Language:`Language`,"Lao People'S Democratic Republic":`Lao People's Democratic Republic`,"Lao People's Democratic Republic":`Lao People's Democratic Republic`,"Last changed":`Last changed`,"Last month created adapters":`Last month created adapters`,"Last month updated adapters":`Last month updated adapters`,"Last read: %s":`Last read: %s`,"Last scan on %s":`Last scan on %s`,"Last start: %s":`Last start: %s`,"Last update":`Last update`,"Latest entries":`Latest entries`,Latitude:`Latitude`,"Latitude:":`Latitude`,Latvia:`Latvia`,"Leave anyway":`Leave anyway`,Lebanon:`Lebanon`,Lesotho:`Lesotho`,"Let's Encrypt settings":`Let's Encrypt settings`,"Let's encrypt SSL":`Let's encrypt SSL`,Level:`Level`,"Level of messages that this transport should log (default: level set on parent logger)":`Loglevel to use for logging for this transport. ("Default" means that the Loglevel from the relevant adapter instance/host is used and can be changed dynamically as required, All other options define the Loglevel statically)`,Liberia:`Liberia`,"Libyan Arab Jamahiriya":`Libyan Arab Jamahiriya`,License:`License`,"License agreement":`License agreement`,"License terms":`License terms`,Licenses:`Licenses`,"Licenses are not changed":`Licenses have not changed`,"Licenses have not changed":`Licenses have not changed`,"Licenses were not stored. They will be stored after the settings will be saved":`Licenses were not stored. They will be stored after the settings will be saved`,"Licenses were stored":`Licenses were stored`,Liechtenstein:`Liechtenstein`,"Limit RAM size for controller":`Limit RAM size for controller`,"Line-ending character to use. (default: os.EOL).)":`Line-ending character to use. (default: os.EOL).)`,Links:`Links`,"Linux/macOS (manually installed)":`Linux/macOS (manually installed)`,"Linux/macOS (new installer)":`Linux/macOS (new installer)`,"Listen on all IPs":`Listen on all IPs`,Lithuania:`Lithuania`,"Load models":`Load models`,"Loading...":`Loading...`,Log:`Log`,"Log file will be deleted. Are you sure?":`Log file will be deleted. Are you sure?`,"Log level will be reset to the saved level after the restart of the controller":`Log level will be reset to the saved level after the restart of the controller`,"Log level will be saved permanently":`Log level will be saved permanently`,"Log name":`Log name`,"Log size:":`Log size`,Logic:`Logic`,Login:`Login`,"Login timeout(sec):":`Login timeout (sec)`,"Login/Email":`Login/Email`,"Login/password":`Login/password`,Logs:`Logs`,Longitude:`Longitude`,"Longitude:":`Longitude`,Low:`Low`,Luxembourg:`Luxembourg`,MB:`Mb`,"MCP as a web extension":`MCP as a web extension`,"MCP is disabled in this admin’s settings (native.disableMcp).":`MCP is disabled in this admin’s settings (native.disableMcp).`,"MM/DD/YYYY":`MM/DD/YYYY`,Macao:`Macau`,Macau:`Macau`,Macedonia:`Macedonia`,"Macedonia, The Former Yugoslav Republic of":`Macedonia`,Madagascar:`Madagascar`,Mai:`Mai`,Main:`Main`,"Main settings":`General settings`,Malawi:`Malawi`,Malaysia:`Malaysia`,Maldives:`Maldives`,Mali:`Mali`,Malta:`Malta`,"Manually created":`Manually created`,Mar:`Mar`,March:`March`,"Marshall Islands":`Marshall Islands`,Martinique:`Martinique`,Mauritania:`Mauritania`,Mauritius:`Mauritius`,"Max length %s characters":`Max length %s characters`,"Maximal number of files":`Maximal number of files`,"Maximal size of one file":`Maximal size of one file`,Maximize:`Maximize`,"Maximum answer length":`Maximum answer length`,"Maximum changes before write":`Maximum changes before write`,"Maximum delay between connection attempts":`Maximum delay between connection attempts`,"Maximum number of connection retries":`Maximum number of connection retries`,"Maximum number of days":`Maximum number of days`,Mayotte:`Mayotte`,Medium:`Medium`,Members:`Members`,Memory:`Memory`,"Memory (%)":`Memory (%)`,Message:`Message`,"Message buffer overflow. Losing oldest":`Message buffer overflow. Losing oldest.`,Mexico:`Mexico`,Micronesia:`Micronesia`,"Micronesia, Federated States of":`Micronesia`,Minimal:`Minimal`,"Minimal number of backup files, after the deletion will be executed according to the backup time settings":`Minimal number of backup files, after the deletion will be executed according to the backup time settings`,"Minimal write interval":`Minimal write interval`,Minimize:`Minimize`,Model:`Model`,Moldova:`Moldova`,"Moldova, Republic of":`Moldova`,Mon:`Mon`,Monaco:`Monaco`,Monday:`Monday`,Mongolia:`Mongolia`,Montenegro:`Montenegro`,Montserrat:`Montserrat`,"More about this license":`More about this license`,"More info":`More info`,Morocco:`Morocco`,"Move · hold Shift, Ctrl or Alt to copy":`Move · hold Shift, Ctrl or Alt to copy`,Mozambique:`Mozambique`,"Multi-host":`Multi-host`,"Multi-host password":`Multi-host password`,Myanmar:`Myanmar`,NPM:`NPM`,Name:`Name`,"Name A-Z":`Name`,"Name:":`Name`,"Name: %s":`Name: %s`,Namibia:`Namibia`,"Narrow all":`Narrow all`,"Navigation to %s was declined.":`Navigation to %s was declined.`,Nauru:`Nauru`,Nepal:`Nepal`,Netherlands:`Netherlands`,"Netherlands Antilles":`Netherlands Antilles`,New:`New`,"New Caledonia":`New Caledonia`,"New Zealand":`New Zealand`,"New adapter proposals":`New adapter proposals`,"New category":`New category`,"New channel":`New channel`,"New chat":`New chat`,"New device":`New device`,"New enum":`New enum`,"New folder":`New folder`,"New group":`New group`,"New hosts found":`New hosts found`,"New licenses were stored":`New licenses were stored`,"New object":`New object`,"New object ID":`New object ID`,"New objekt":`New object`,"New state":`New state`,"New user":`New user`,Next:`Next`,"Next start: %s":`Next start: %s`,Nicaragua:`Nicaragua`,Niger:`Niger`,Nigeria:`Nigeria`,Niue:`Niue`,No:`No`,"No %s instance found":`No %s instance found`,"No SSL":`No SSL`,"No answer within %s s":`No answer within %s s`,"No change log available":`No change log available`,"No comments in selected language":`No comments in selected language`,"No data":`No data`,"No data will be sent":`No data will be sent`,"No default history instance is configured in the system settings":`No default history instance is configured in the system settings`,"No devices or channels found":`No devices or channels found`,"No entries found":`No entries found`,"No file cache":`No file cache`,"No function":`No function`,"No messages":`No messages`,"No on-the-fly backup":`No on-the-fly backup`,"No rating or too few data":`No rating or too few data`,"No reachable MCP endpoint found. Enable MCP in this admin’s settings, or install and start the %s adapter — either as a web extension on a web instance, or standalone with its own port.":`No reachable MCP endpoint found. Enable MCP in this admin’s settings, or install and start the %s adapter — either as a web extension on a web instance, or standalone with its own port.`,"No response from the assistant":`No response from the assistant`,"No restart":`No restart`,"No room":`No room`,"No running adapters":`No running adapters`,"No states selected!":`No states selected!`,"No stdout outputs":`No stdout outputs`,"No version of %s":`Latest available version of "%s" is required, but nothing installed. Please install first "%s" and then retry.`,"Node.js":`Node.js`,"Node.js update failed: %s":`Node.js update failed: %s`,"Node.js update successful, restarting controller now!":`Node.js update successful, restarting controller now!`,"Node.js upgrade":`Node.js upgrade`,"Non-NPM-Version":`Non-NPM-Version`,'Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,None:`None`,"Norfolk Island":`Norfolk Island`,"Northern Mariana Islands":`Northern Mariana Islands`,Norway:`Norway`,"Not agree":`Not agree`,"Not exists":`Does not exist`,"Not fulfilled on the following hosts: %s":`Not fulfilled on the following hosts: %s`,"Note:":`Note`,Notifications:`Notifications`,Nov:`Nov`,November:`November`,"Now the expert mode will be active only during this browser session.":`Now the expert mode will be active only during this browser session.`,"Now the expert mode will be deactivated only during this browser session.":`Now the expert mode will be deactivated only during this browser session.`,"Number of files":`Number of files`,OK:`OK`,"Only one AI provider can be active. To use another one, remove this one first.":`Only one AI provider can be active. To use another one, remove this one first.`,OS:`OS`,'Object "<b>%s</b>" does not exists. Update the page.':`Object "<b>%s</b>" does not exist. Update the page.`,"Object data":`Object data`,"Object does not exist any more":`Object does not exist any more`,"Object does not exist!":`Object does not exist!`,"Object list":`Object list`,"Object may not be deleted":`Object may not be deleted`,"Object rights":`Object rights`,Objects:`Objects`,Oct:`Oct`,October:`October`,"Off (local models)":`Off (local models)`,Offline:`Offline`,Ok:`Ok`,Oman:`Oman`,'On Windows first please call in the start menu under "ioBroker" the command line of the relevant ioBroker instance. The correct directory is then set automatically. On Linux or macOS please go to the ioBroker directory.':`On Windows first please call in the start menu under "NexoWatt EOS" the command line of the relevant NexoWatt EOS instance. The correct directory is then set automatically. On Linux or macOS please go to the NexoWatt EOS directory.`,"Only detected devices":`Only detected devices`,"Only one":`Only one`,"Only selected":`Only selected`,"Only reachable in the local network":`Only reachable in the local network`,"Only tgz files are allowed":`Only .tgz files are allowed`,"Only the newest %s hits are shown":`Only the newest %s hits are shown`,"Open charts in new window":`Open charts in new window`,"Open in admin":`Open in admin`,"Open original":`Open on new tab`,"Open repository":`Open repository`,"Open the Adapters tab":`Open the Adapters tab`,"Operations approved without asking (click to revoke):":`Operations approved without asking (click to revoke):`,Optional:`Optional`,"Optional. Always relative to iobroker.js-controller/":`Optional. Always relative to iobroker.js-controller/`,"Or install from a file":`Or install from a file`,"Or select from the list":`Or select from the list`,"Ordered at":`Ordered at`,"Otherwise please update the slaves first with an update of master-slave systems and the master last!":`Otherwise please update the slaves first with an update of master-slave systems and the master last!`,Overview:`Overview`,Owner:`Owner`,"Owner group":`Owner group`,"Owner user":`Owner user`,PID:`PID`,Pakistan:`Pakistan`,Palau:`Palau`,Palestine:`Palestine`,"Palestinian Territory, Occupied":`Palestine`,Panama:`Panama`,"Papua New Guinea":`Papua New Guinea`,Paraguay:`Paraguay`,Parent:`Parent`,"Parent ID":`Parent ID`,"Parse error":`Parse error`,Password:`Password`,"Password and confirmation are not equal!":`Password and confirmation are not equal!`,"Password cannot be empty!":`Password cannot be empty!`,"Password must be at least 8 characters long and have numbers, upper and lower case letters":`Password must be at least 8 characters long and have numbers, upper and lower case letters`,"Password repeat":`Password repeat`,"Passwords are not equal":`Passwords are not equal`,Path:`Path`,"Path to storage:":`Path to storage`,"Pause output":`Pause output`,"Performing this update will restart the js-controller afterwards!":`Performing this update will restart the js-controller afterwards! This will update your Node.js version to the latest available in your configured apt sources.`,Permissions:`Permissions`,Peru:`Peru`,Philippines:`Philippines`,"Pin to navigation":`Pin to navigation`,Pitcairn:`Pitcairn`,"Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,Platform:`Platform`,"Please configure the AI provider, credential and model first.":`Please configure the AI provider, credential and model first.`,"Please confirm":`Please confirm`,"Please execute the following commands in an SSH shell (console):":`Please execute the following commands in an SSH shell (console):`,"Please interpret the output of: %s":`Please interpret the output of: %s`,"Please make sure you know what you are doing!":`Please make sure you know what you are doing!`,"Please read these important notes:":`Please read these important notes:`,"Please select country":`Please select country`,"Please select specific version of %s":`Please select specific version of %s`,"Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.":`Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.`,"Please wait for an official release!":`Please wait for an official release of the adapter!`,Plugins:`Plugins`,Poland:`Poland`,Popular:`Popular`,"Popular first":`Popular first`,"Popup for any custom information.":`Popup for any custom information.`,Port:`Port`,"Port forwarding":`Port forwarding`,"Port to check the domain:":`Port to check the domain`,Portugal:`Portugal`,"Preserve ID":`Preserve ID`,"Press CTRL+ENTER to confirm":`Press CTRL+ENTER to confirm`,"Press CTRL+ENTER to write the value":`Press CTRL+ENTER to write the value`,"Press CTRL+ENTER to write the value, when focused":`Press CTRL+ENTER to write the value, when focused`,"Press ENTER to write the value, when focused":`Press ENTER to write the value, when focused`,Preview:`Preview`,Previous:`Previous`,"Process exited with code %s":`Process exited with code %s`,"Processing...":`Processing...`,Product:`Product`,Protocol:`Protocol`,Provider:`Provider`,"Puerto Rico":`Puerto Rico`,Qatar:`Qatar`,Quality:`Quality code`,RAM:`RAM`,"RAM limit":`RAM limit`,"RAM total usage:":`Total RAM usage:`,"RAM usage":`RAM usage`,"Remove provider":`Remove provider`,RWANDA:`Rwanda`,Rate:`Rate`,"Rate how good this version of the adapter works on your system. You can vote for every new version.":`Rate how good this version of the adapter works on your system. You can vote for every new version.`,"Rating for":`Rating for`,"Read converter":`Read converter`,"Read timeout":`Read timeout`,"Read to the end for accept":`Read to the end for accept`,"Read-only":`Read-only`,Readable:`Readable`,Readme:`Readme`,"Really delete credential %s?":`Really delete credential %s?`,"Reasoning effort":`Reasoning effort`,Rebuild:`Rebuild`,"Rebuild tree":`Rebuild tree`,"Recently created":`Recently created`,"Recently updated":`Recently updated`,"Record CPU and RAM":`Record CPU and RAM`,"Recording is active, but there is no data for the last hour yet":`Recording is active, but there is no data for the last hour yet`,"Redirect in %s second(s)":`Redirect in %s second(s)`,"Redis password":`Redis password`,"Refresh log":`Refresh log`,Region:`Region`,Relative:`Relative`,Reload:`Reload`,"Remote URI of the HTTP logging endpoint":`Remote URI of the HTTP logging endpoint`,"Remote host of the HTTP logging endpoint":`Remote host of the HTTP logging endpoint`,"Remote port of the HTTP logging endpoint":`Remote port of the HTTP logging endpoint`,Remove:`Remove`,"Remove attribute %s":`Remove attribute "%s"`,"Remove color":`Remove color`,"Remove filter for updatable adapters":`Remove filter for updatable adapters`,"Remove from navigation":`Remove from navigation`,"Remove icon":`Remove icon`,Removed:`Removed`,"Removing of adapter...":`Removing of adapter...`,"Removing of instance...":`Removing of instance...`,Rename:`Rename`,"Rename all children":`Rename all children`,"Rename or copy object":`Rename or copy object`,"Repeat administrator password":`Repeat administrator password`,"Repeat password is not equal with password":`The repeated password is not equal with the password!`,Replace:`Replace`,Repositories:`Repositories`,"Repository data last updated: %s":`Repository data last updated: %s`,"Repository data last updated: %s (oldest from %s)":`Repository data last updated: %s (oldest from %s)`,"Repository timestamps (oldest from %s):":`Repository timestamps (oldest from %s):`,"Repository timestamps:":`Repository timestamps:`,"Requesting data...":`Requesting data...`,Reset:`Reset`,"Resource usage":`Resource usage`,Restart:`Restart`,"Restart adapter after install":`Restart adapter after install`,"Restart host":`Restart host`,"Restart works only if controller started as system service.":`Restart works only if controller started as system service.`,"Restore from backup":`Restore from backup`,"Restore repository list to default":`Restore repository list to default`,"Retry maximum count":`Retry maximum count`,"Retry maximum delay":`Retry maximum delay`,Reunion:`Reunion`,"Reverse output direction":`Reverse output direction`,Review:`Review`,Rights:`Access rights`,Role:`Role`,Romania:`Romania`,Room:`Room`,Rooms:`Rooms`,"Rooms without floor":`Rooms without floor`,"Run Node.js code on the host":`Run Node.js code on the host`,"Run command":`Run command`,"Run npm install iobroker.js-controller there. A specific version can be installed using npm install iobroker.js-controller@x.y.z (replace x.y.z with the desired version).":`Run npm install iobroker.js-controller there. A specific version can be installed using "npm install iobroker.js-controller@x.y.z" (replace "x.y.z" with the desired version).`,"Run script in the javascript adapter":`Run script in the javascript adapter`,"Running adapters":`Running adapters`,"Running command":`Running command`,"Running: ":`Running: `,"Runs as web-extension":`Runs as web-extension`,"Russian Federation":`Russian Federation`,Rwanda:`Rwanda`,"SEQ log":`SEQ log`,"Set up the AI once for the whole system. The AI assistant of admin uses these settings.":`Set up the AI once for the whole system. The AI assistant of admin uses these settings.`,SSL:`SSL`,"Saint Helena":`St. Helena`,"Saint Kitts and Nevis":`Saint Kitts and Nevis`,"Saint Lucia":`Saint Lucia`,"Saint Pierre and Miquelon":`St. Pierre and Miquelon`,"Saint Vincent and the Grenadines":`Saint Vincent and the Grenadines`,Samoa:`Samoa`,"San Marino":`San Marino`,"Sao Tome and Principe":`Sao Tome and Principe`,Sat:`Sat`,"Saudi Arabia":`Saudi Arabia`,Save:`Save`,"Save & Close":`Save & Close`,"Save & close":`Save & close`,"Save Objecttree as JSON File":`Save objects tree as JSON file`,"Save Objecttree is not possible":`Saving the objects tree is not possible`,"Save as image":`Save as image`,"Save configuration":`Save configuration`,"Save configuration?":`Save configuration?`,Script:`Script`,Scripts:`Scripts`,"Search again":`Search again`,"Search failed: %s":`Search failed: %s`,"Search in the log files (Enter)":`Search in the log files (Enter)`,"Search the log files in this time range":`Search the log files in this time range`,"Secret Access Key":`Secret Access Key`,"See on github":`See on github`,"Seems that you have slow connection. Do you want to increase timeout interval?":`Seems that you have slow connection. Do you want to increase timeout interval?`,Select:`Select`,"Select ID":`Select ID`,"Select adapter":`Select adapter`,"Select adapter:":`Select adapter`,"Select an entry on the left":`Select an entry on the left`,"Select at least one floor":`Select at least one floor`,"Select file":`Select file`,"Select host to add the instance":`Select host to add the instance`,"Select language":`Select language`,"Select methods":`Select methods`,"Select options":`Select options`,"Select predefined icon":`Select predefined icon`,"Select the functions of your devices. Functions that already exist stay unchanged":`Select the functions of your devices. Functions that already exist stay unchanged`,"Select the rooms in your home":`Select the rooms in your home`,"Select the rooms of every floor. Rooms that already exist stay unchanged":`Select the rooms of every floor. Rooms that already exist stay unchanged`,"Select the rooms. Rooms that already exist stay unchanged":`Select the rooms. Rooms that already exist stay unchanged`,"Select type of export":`Select type of the export`,"Select/Unselect all":`Select/Unselect all`,"Selected %s object(s)":`Selected %s object(s)`,"Selected adapters":`Selected adapters`,Send:`Send`,Senegal:`Senegal`,"Sent data:":`Sent data`,Sep:`Sep`,September:`September`,Serbia:`Serbia`,"Serbia and Montenegro":`Serbia and Montenegro`,"Server URL":`Server URL`,"Session expire in %s":`Session expire in %s`,Set:`Set`,"Set CRON":`Set`,"Set CRON schedule for restarts":`Set CRON schedule for restarts`,"Set administrator password":`Set administrator password`,"Set function":`Set function`,"Set multiple states":`Set multiple states`,"Set room":`Set room`,"Set state":`Set state`,"Set tier for %s":`Set tier for %s`,"Set timeout to 1 minute":`Set timeout to 1 minute`,"Set up rooms and functions":`Set up rooms and functions`,"Set value":`Set value`,Settings:`Settings`,"Settings %s":`Settings %s`,"Settings for %s":`Settings for %s`,"Settings saved":`Settings saved`,Seychelles:`Seychelles`,"Show / hide List":`Show / hide List`,"Show all":`Show all`,"Show as overlay":`Show as overlay`,"Show change log":`Show change log`,"Show comments in language":`Show comments in language`,"Show error in log if RAM less than":`Show error in log if RAM less than`,"Show errors":`Show errors`,"Show errors and warnings":`Show errors and warnings`,"Show help for this adapter":`Show help for this adapter`,"Show instances only for current host":`Show instances only for current host`,"Show instructions":`Show instructions`,"Show ioBroker assistant":`Show NexoWatt EOS assistant`,"Show less":`Show less`,"Show lines":`Show lines`,"Show list view":`Show list view`,"Show members":`Show members`,"Show more":`Show more`,"Show more info":`Show more info`,"Show object list":`Show object list`,"Show only installed":`Show only installed adapters`,"Show only objects, which were detected as a device or which already have a room or a function":`Show only objects, which were detected as a device or which already have a room or a function`,"Show only running instances":`Show only running instances`,"Show password":`Show password`,"Show running or stopped instances":`Show running or stopped instances`,"Show sent statistics data":`Show sent statistics data`,"Show tree view":`Show tree view`,"Show values of instance":`Show values of instance`,"Show warning im log if RAM less than":`Show warning im log if RAM less than`,"Show whole changelog":`Show whole changelog`,"Show...":`Show...`,"Show/hide PID":`Show/hide process ID`,"Show/hide colors":`Show/hide colors`,"Showed only installed adapters":`Showed only installed adapters`,"Showed only installed adapters without instance.":`Showed only installed adapters without instance.`,"Showed only running instances":`Showed only running instances`,"Showed only stopped instances":`Showed only stopped instances`,"Sierra Leone":`Sierra Leone`,Silent:`Silent`,Singapore:`Singapore`,"Single-Sign On disconnected":`Single-Sign On disconnected`,"Site name":`Site name`,"Size: %s, Free: %s":`Size: %s, Available: %s`,"Skip discovery process and go to install with last scan results":`Skip discovery process and go to install with last scan results`,Slovakia:`Slovakia`,Slovenia:`Slovenia`,"Solomon Islands":`Solomon Islands`,Somalia:`Somalia`,"Some data are not stored. Discard?":`Some data are not stored. Discard?`,"Some updates available":`Some updates available`,"Sorry, you cannot use ioBroker.":`Sorry, you cannot use NexoWatt EOS.`,"Sort alphabetically":`Sort alphabetically by name`,"Sort by":`Sort by`,"Sort direction":`Sort direction`,Source:`Source`,"Source (show all)":`Source (show all)`,"South Africa":`South Africa`,"South Georgia South Sandwich Islands":`South Georgia South Sandwich Islands`,"South Georgia and the South Sandwich Islands":`South Georgia South Sandwich Islands`,Spain:`Spain`,Speed:`Speed`,"Sri Lanka":`Sri Lanka`,"St. Helena":`St. Helena`,"St. Pierre and Miquelon":`St. Pierre and Miquelon`,"Start date":`Start date`,"Start order (tier)":`Start order (tier)`,"Start time":`Start time`,"Start update":`Start update`,"Start wizard":`Start wizard`,"Start/stop":`Start/stop`,"Started installation of %s.":`Started installation of %s.`,"Started...":`Started...`,State:`State`,"State does not exist":`State does not exist`,"State type":`State type`,"State type":`State type`,States:`States`,"States rights":`States rights`,Statistics:`Statistics`,"Statistics:":`Statistics`,Status:`Status`,"Stay signed in":`Stay signed in`,"Step %s of %s":`Step %s of %s`,"Step type":`Step type`,"Stop on error":`Stop on error`,"Stop recording":`Stop recording`,"Storage of %s":`Storage of <span class="name">%s</span>`,"Storage of %s states":`Storage of <span class="name">%s</span> states`,"Store file interval":`Store file interval`,"Stream log":`Stream log`,"Sub-entries":`Sub-entries`,"Subscription Key":`Subscription Key`,"Success!":`Success!`,Sudan:`Sudan`,Suggestion:`Recommendation`,"Suggestion from the detected device type":`Suggestion from the detected device type`,Sun:`Sun`,Sunday:`Sunday`,"Suppress for 5 minutes":`Suppress for 5 minutes`,Suriname:`Suriname`,"Svalbard and Jan Mayen":`Svalbard and Jan Mayen Islands`,"Svalbard and Jan Mayen Islands":`Svalbard and Jan Mayen Islands`,Swaziland:`Swaziland`,Sweden:`Sweden`,Switzerland:`Switzerland`,"Synchronize admin settings between all opened browser windows":`Synchronize admin settings between all opened browser windows`,"Syrian Arab Republic":`Syrian Arab Republic`,"SysLog Type":`SysLog Type`,Syslog:`Syslog`,"Syslog facility to use (Default: local0).":`Syslog facility to use (Default: local0).`,System:`System`,"System information":`System information`,"System language:":`System language`,"System log":`System log`,"System overview and status":`System overview and status`,"System settings":`System`,"System status":`System status`,"System uptime":`System uptime`,Table:`Table`,Taiwan:`Taiwan`,"Taiwan, Province of China":`Taiwan`,Tajikistan:`Tajikistan`,Tanzania:`Tanzania`,"Tanzania, United Republic of":`Tanzania`,"Temperature unit":`Temperature unit`,"Temperature units":`Temperature unit`,"Temperature units:":`Temperature units`,Template:`Template`,Test:`Test`,Thailand:`Thailand`,"The %s adapter does not seem to be installed yet.":`The %s adapter does not seem to be installed yet.`,"The %s adapter is installed.":`The %s adapter is installed.`,"The Cloud services from iobroker.net/pro can help here to do that securely:":`The Cloud services from iobroker.net/pro can help here to do that securely:`,"The JSONL DB is append-only and will contain unnecessary entries after a while.":`The JSONL DB is append-only and will contain unnecessary entries after a while.`,"The adapter can be used free of charge.":`The adapter can be used free of charge.`,"The adapter has a limited functionality without a paid license.":`The adapter has a limited functionality without a paid license.`,"The adapter requires a paid license for commercial use.":`The adapter requires a paid license for commercial use.`,"The adapter requires a paid license.":`The adapter requires a paid license.`,"The apiKey of the seq system":`The apiKey of the seq system`,"The assistant is not available on this tab and will be closed. Continue?":`The assistant is not available on this tab and will be closed. Continue?`,"The assistant is still working on an answer, which is lost on this tab. Leave anyway?":`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`,"The assistant wants to perform the following action(s):":`The assistant wants to perform the following action(s):`,"The changes will be applied to %s states. Are you sure?":`The changes will be applied to %s states. Are you sure?`,"The current selected configuration will allow to automatically pull in incompatible changes of this adapter!":`The current selected configuration will allow to automatically pull in incompatible changes of this adapter!`,"The device or service delivers the new state actively":`The device or service delivers the new state actively`,"The device or service will be periodically asked":`The device or service will be periodically asked`,"The end of line character to be added to the end of the message (Default: Message without modifications).":`The end of line character to be added to the end of the message (Default: Message without modifications).`,"The expert mode allows you to view and edit system internal details.":`The expert mode allows you to view and edit system internal details.`,"The following hosts do not fulfill the required version %s of %s:":`The following hosts do not fulfill the required version %s of %s:`,'The adapter is not installed on host "%s"':`The adapter is not installed on host "%s"`,"The history instance %s is not running":`The history instance %s is not running`,"The host %s will be attached to this system.":`The host %s will be attached to this system.`,"The host running syslogd, defaults to localhost":`The host running syslogd, defaults to localhost`,"The http(s) URL including port of the seq server. If you use HTTPS a real certificate is needed; self signed certs are ot accepted.":`The http(s) URL including port of the seq server. If you use HTTPS a real certificate is needed; self signed certs are ot accepted.`,"The license text could not be loaded.":`The license text could not be loaded.`,"The name of the application (Default: process.title).":`The name of the application (Default: process.title).`,"The objects, states and logs will be processed by your AI provider.":`The objects, states and logs will be processed by your AI provider.`,"The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).":`The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).`,"The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).":`The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).`,"The rooms and functions are ready":`The rooms and functions are ready`,"The sent data will only be processed by ioBroker GmbH for statistical purposes and will not be shared with any third parties.":`The sent data will only be processed by NexoWatt EOS GmbH for statistical purposes and will not be shared with any third parties.`,"The type of the syslog protocol to use (Default: BSD).":`The type of the syslog protocol to use (Default: BSD).`,"There are no entries in this category yet":`There are no entries in this category yet`,"These options can reduce the size of the export file:":`These options can reduce the size of the export file:`,"Thinking…":`Thinking…`,"This adapter cannot be installed from git as must be built before installation.":`This adapter cannot be installed from git as must be built before installation.`,"This admin already provides a built-in MCP endpoint (listed below) — no extra adapter is required for it.":`This admin already provides a built-in MCP endpoint (listed below) — no extra adapter is required for it.`,"This content cannot be loaded because it uses insecure HTTP protocol.":`This content cannot be loaded because it uses insecure HTTP protocol.`,"This credential is used by":`This credential is used by`,"This feature is supported up from js-controller Kiera (Version 6)!":`This feature is supported up from js-controller Kiera (Version 6)!`,"This is the exact prompt the built-in assistant uses. Paste it as the system / instructions prompt in your AI client to get the same behaviour.":`This is the exact prompt the built-in assistant uses. Paste it as the system / instructions prompt in your AI client to get the same behaviour.`,"This is the recommended option":`This is the recommended option`,"This page is not provided by the remote access of ioBroker Cloud/Pro.":`This page is not provided by the remote access of ioBroker Cloud/Pro.`,"This name will be shown in admin's header. Just to identify the whole installation":`This name will be shown in admin's header. Just to identify the whole installation`,"This object does not used in any aliases yet":`This object does not used in any aliases yet`,"This object is used in aliases":`This object is used in aliases`,'This version of node.js "%s" on "%s" is deprecated. Please install node.js 6, 8 or newer':`NexoWatt EOS supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.`,"This way is only necessary in very few cases and please consult the forum beforehand!":`This way is only necessary in very few cases and please consult the forum beforehand!`,Thu:`Thu`,Tiers:`Tiers`,"Tiers define the order of adapters when the system starts.":`Tiers define the order of adapters when the system starts.`,Time:`Time`,"Time From":`Time From`,"Time To":`Time To`,"Time stamp":`Time stamp`,"Timor-Leste":`East Timor`,'Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.':`Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.`,"Tips at start":`Tips at start`,Title:`Title`,To:`To`,Today:`Today`,"Toggle expert mode":`Toggle expert mode`,"Toggle states view":`Toggle the states view`,Togo:`Togo`,Tokelau:`Tokelau`,Tonga:`Tonga`,"Too many events":`Too many events`,"Total RAM usage":`Total RAM usage`,"Total adapters":`Total adapters`,"Total count in group":`Total count in group`,"Total rating:":`Total rating:`,"Translated from %s":`Translated from %s`,"Trigger event":`Trigger event`,"Trinidad and Tobago":`Trinidad and Tobago`,Tue:`Tue`,Tunisia:`Tunisia`,Turkey:`Turkey`,Turkmenistan:`Turkmenistan`,"Turks and Caicos Islands":`Turks and Caicos Islands`,Tuvalu:`Tuvalu`,Type:`Type`,"Type of result is not as expected: %s":`Type of result is not as expected: %s`,URL:`URL`,"URL or file path":`URL or file path (Tarball)`,"URL or file path:":`URL or file path`,UUID:`UUID`,Uganda:`Uganda`,Ukraine:`Ukraine`,"Uncheck All":`Uncheck All`,Understand:`Understand`,"Unique name":`Unique name`,"United Arab Emirates":`United Arab Emirates`,"United Kingdom":`United Kingdom`,"United States":`United States`,"United States Minor Outlying Islands":`United States Minor Outlying Islands`,"United States minor outlying islands":`United States minor outlying islands`,"Unknown error":`Unknown error`,"Unknown file format!":`Unknown file format!`,'Unknown type: use in name "private", "public" or "chained" to define the certificate type':`Unknown type: use in name "private", "public" or "chained" to define the certificate type`,Unsecure_Auth:`The password will be sent unencrypted via an unsecure connection. To protect your passwords enable the secure connection (HTTPS)!`,"Unsupported image format":`Unsupported image format`,Update:`Update`,'Update "%s" to v%s':`Update "%s" to v%s`,"Update %s adapter(s)":`Update %s adapter(s)`,"Update all adapters":`Update all adapters`,"Update info adapter":`Update info adapter`,"Update object":`Update object`,"Update objects":`Update objects`,"Update role for %s":`Set the role for "%s"`,"Update states":`Update states`,"Update view":`Update view`,Updated:`Updated`,"Updating %s...":`Updating %s...`,Upgrade:`Upgrade`,"Upgrade all adapters":`Upgrade all adapters`,Upload:`File upload`,"Upload adapter after install":`Upload adapter after install`,"Upload admin started":`Upload of configuration is started`,"Upload failed":`Upload failed`,"Upload started...":`Upload started...`,Uptime:`Uptime`,Uruguay:`Uruguay`,"Use Lets Encrypt certificates:":`Use Let's Encrypt certificates`,"Use Single-Sign On":`Use Single-Sign On`,"Use convert functions":`Use convert functions`,"Use following methods:":`Use following methods:`,"Use last scan":`Use last scan`,"Use self signed certificates":`Use self signed certificates`,"Use settings of other browsers":`Use settings of other browsers`,"Use settings of this browser":`Use settings of this browser`,"Use the assistant without an API key":`Use the assistant without an API key`,"Use this button:":`Use this icon:`,"Use this instance for automatic update:":`Use this instance for automatic update`,"Use without an API key (external MCP client)":`Use without an API key (external MCP client)`,"Used by":`Used by`,"Used for sentinels":`Used for sentinels`,"Used only to calculate position.":`Used only to calculate position.`,User:`User`,"User deleted":`User deleted`,"User does not exist":`User does not exist`,"User parameters":`Edit user account`,"User yet exists":`User already exists`,Users:`User accounts`,Uzbekistan:`Uzbekistan`,V:`V`,"Valid till":`Valid till`,Value:`Value`,"Value type":`Value type`,"Values of %s":`Values of %s`,Vanuatu:`Vanuatu`,"Vatican City State":`Vatican City State`,Venezuela:`Venezuela`,"Viet Nam":`Vietnam`,Vietnam:`Vietnam`,View:`View`,"View file in state: %s":`View file in state: %s`,"View: %s":`View: %s`,"Virgin Islands (British)":`Virgin Islands (British)`,"Virgin Islands (U.S.)":`Virgin Islands (U.S.)`,"Virgin Islands, British":`Virgin Islands (British)`,"Virgin Islands, U.S.":`Virgin Islands (U.S.)`,Visualization:`Visualization`,"Vote:":`Vote:`,"Waiting for admin restart...":`Waiting for admin restart...`,"Waiting for connection of ioBroker...":`Waiting for connection of NexoWatt EOS...`,"Wallis and Futuna":`Wallis and Futuna Islands`,"Wallis and Futuna Islands":`Wallis and Futuna Islands`,"Warning!":`Warning!`,Warning1:`Don't install adapters from GitHub unless asked to by a developer or if you are 100 %sure what you are doing!`,Warning2:`Adapters on GitHub may not work like they should (they are still under development). Only install them if you are participating in a test!`,"Warning: Free space on disk is low":`Warning: Free space on disk is low!`,Weather:`Weather`,Wed:`Wed`,"Week starts with":`Week starts with`,Welcome:`Welcome`,"Western Sahara":`Western Sahara`,"When activated this host can be discovered by other iobroker installations in your network to become the master of a multihost system.":`When activated this host can be discovered by other NexoWatt EOS installations in your network to become the master of a multihost system.`,"When enabled adapter instances can run in one or few processes to save RAM usage.":`When enabled adapter instances can run in one or few processes to save RAM usage.`,"When hidden, move the mouse to the bottom-right corner to reveal it.":`When hidden, move the mouse to the bottom-right corner to reveal it.`,"Wide all":`Wide all`,"Will be reset to the saved log level after restart of adapter":`Will be reset to the saved log level after restart of adapter`,With:`With`,"With floors":`With floors`,"With password":`With password`,Without:`Without`,"Without floors":`Without floors`,"Without floors, all rooms are on the same level":`Without floors, all rooms are on the same level`,"Without function":`Without function`,"Without restart":`Without restart`,"Without room":`Without room`,"Would you like to restart the controller for your changes to take effect?":`Would you like to restart the controller for your changes to take effect?`,Write:`Write`,"Write converter":`Write converter`,"Write to the database file no more than every X milliseconds":`Write to the database file no more than every X milliseconds`,"Write value":`Write value`,Writeable:`Writeable`,"Wrong dependencies":`Wrong dependencies`,"YYYY.MM.DD":`YYYY.MM.DD`,Yemen:`Yemen`,Yes:`Yes`,"You are going to add new instance:":`You are going to add new instance:`,"You can change everything at any time in the categories view or in the assignment view":`You can change everything at any time in the categories view or in the assignment view`,"You can change host on Instances, Adapters or Logs pages":`You can change host on Instances, Adapters or Logs pages`,"You can change host on Overview, Instances, Adapters or Logs pages":`You can change host on Overview, Instances, Adapters or Logs pages`,"You can change the host name, but be aware, that all instances must be assigned anew":`You can change the host name, but be aware, that all instances must be assigned anew`,"You can check changelog here":`You can check the changelog <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.js-controller/blob/master/CHANGELOG.md" target="_blank">here</a>`,"You can drag and drop list items for reorder":`You can drag and drop list items for reorder`,"You can drag users to groups.":`You can drag users to groups.`,"You can drag&drop the devices, channels and states to enums":`You can drag&drop the devices, channels and states to enums`,"You can drag&drop users to groups":`You can drag&drop users to groups`,"You can drive the ioBroker assistant from an external AI client (Claude, Codex, Gemini, …) without configuring an AI provider here. The client connects directly to ioBroker through the MCP server.":`You can drive the ioBroker assistant from an external AI client (Claude, Codex, Gemini, …) without configuring an AI provider here. The client connects directly to ioBroker through the MCP server.`,"You can export all objects or just the selected branch.":`You can export all objects or just the selected branch.`,"You can set the log level permanently in the base host settings":`You can set the log level permanently in the host base settings`,"You can't see events via cloud":`You can't see events via cloud`,"You cannot delete host, when it is alive":`You cannot delete host, when it is alive`,"You have unread news!":`You have unread news!`,"You have unsaved changes":`You have unsaved changes`,"You must set the administrator password":`You must set the administrator password`,"You voted for %s on %s":`You voted for v%s on %s`,"You want to move %s states with enabled history":`You want to move %s states with enabled history`,"Your are intend to edit ALL objects. Are you sure?":`Your are intend to edit ALL objects. Are you sure?`,"Your comment":`Your comment`,"Your communication with admin is not encrypted":`Your communication with admin is not encrypted`,"Your home":`Your home`,Zaire:`Zaire`,Zambia:`Zambia`,Zimbabwe:`Zimbabwe`,_All:`All`,"_Toggle expert mode":`Toggle expert mode`,"a-z":`a-z`,ack:`ack`,actions:`actions`,active:`active`,"actual:":`actual:`,"adapter with updates":`adapters with updates`,"adapters count":`Adapters in repository`,add:`Add`,"add children":`add children`,"add instance":`add instance`,"add repository":`add repository`,agree:`Agree`,alarm_group:`Alarm`,alive:`alive`,all:`all`,"all items are filtered out":`All items are filtered out`,"allow set of compact groups":`Allow set of the compact groups`,alpha:`alpha`,"any Node.js stream. If an objectMode stream is provided then the entire info object will be written. Otherwise info[MESSAGE] will be written":`any Node.js stream. If an objectMode stream is provided then the entire info object will be written. Otherwise info[MESSAGE] will be written`,apply:`Apply`,array:`array`,authors:`authors`,auto:`auto`,available:`available`,base_settings_hint:`Changing these values can lead to a non-operational NexoWatt EOS system. Unless you knoww exactly what you do please better use "iob setup custom" to change the database type or basic database settings.`,beta:`beta`,boolean:`boolean`,bug:`bugtracker`,"built-in MCP server of admin":`built-in MCP server of admin`,cancel:`Cancel`,cannotGetAccessToken:`Cannot get access token`,cert_path_note:`You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop`,certificate:`certificate`,certs_hint:`You can use absolute path of certificate, '/opt/certs/cert.pem' for example, or you can and drop files here`,"change view mode":`change view mode`,channel:`channel`,clear:`clear`,"climate-control_group":`Climate Control`,climate_group:`Сlimate`,"close on ready":`close on ready`,"cloud wizard category":`This category includes adapters to interact with cloud services such as Amazon Alexa, Google Home or IFTT. Remote access to your visualization can also be established with such adapters.`,"cloud wizard description":`With the NexoWatt EOS Cloud Adapter, you can easily access various visualization adapters via a secure connection, no matter where you are. This means you can control your home from anywhere. The Cloud Adapter also allows you to maintain your NexoWatt EOS remotely by giving you access to the Admin Adapter. In addition, you can even access the visualization adapters via the NexoWatt EOS Visu app (available for iOS and Android). So you always have full control over your smart home from the comfort of your smartphone or laptop.`,collapse:`collapse`,"collapse all":`collapse all`,comma:`comma`,"command execution":`Command execution`,common:`common`,"common adapters_group":`Common`,common_color:`color`,common_def:`default value`,common_delete_tip:`If you want delete some attributes in "common" you must set it to "null"`,common_desc:`description`,common_icon:`icon`,common_max:`max value`,common_min:`minimal value`,common_read:`read allowed`,common_role:`role`,common_states:`predefined values`,common_type:`type`,common_unit:`measure unit`,common_write:`write allowed`,communication_group:`Communication`,"compact groups":`Compact groups`,config:`Settings`,"config instance":`config instance`,"confirm password":`Confirm password`,confirm_change_repo:`The "Beta" repository contains adapter versions that have not been fully tested. Please report problems with these versions to the developer on GitHub or in the relevant forum threads. Use this adapter version at your own risk.`,connected:`connected`,copied:`copied`,copy:`copy`,"copy note":`Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close.`,"create operation":`create`,credential_type_ai:`AI`,credential_type_aws:`AWS`,credential_type_azure:`Azure`,credential_type_cloud:`Cloud`,credential_type_custom:`Custom`,credential_type_email:`E-mail`,credentials_hint:`Central storage for credentials (e-mail, cloud, AI). Adapters reference them by ID, passwords and keys are stored encrypted.`,current:`current`,"custom enum":`?ustom enum`,"custom group":`Custom group`,"custom range":`custom range`,daemon:`daemon`,"date-and-time_group":`Date and Time`,"days ago":`days ago`,daysShortText:`d.`,debug:`debug`,default:`default`,"default group":`default group`,delete:`delete`,"delete adapter":`delete adapter`,"delete group":`delete group`,"delete operation":`delete`,"delete script":`delete script`,"delete user":`delete user`,desc:`desc`,description:`Description`,device:`device`,"diag-note":`Help us to make NexoWatt EOS even better! <br> Allow the transmission of anonymous usage statistics and crash reports. The exact scope of the data sent to iobroker.org when updating the adapter list can be selected below and is shown in the overview on the right. The data does not contain any personal information and helps us to set the priorities for the further development of NexoWatt EOS in the interest of all users and to be able to correct occurring errors quickly.<br>Much thanks for supporting our hard work by agreeing to the transmission of the statistical data!`,"diag-type-note-extended":`This is a description of the extended statistics`,"diag-type-note-no-city":`This is a description of the statistics WITHOUT CITY`,"diag-type-note-none":`Nothing goes anywhere`,"diag-type-note-normal":`Regular statistics`,different:`different`,disabled:`disabled`,"do not show":`do not show`,edit:`edit`,"edit enum":`edit enum`,"edit enums":`Edit enumerations for`,"edit file":`edit file`,"edit group":`edit group`,"edit instance":`edit instance`,"edit script":`edit script`,"edit user":`edit user`,"edit value":`Edit value`,"email wizard description":`With the NexoWatt EOS e-mail adapter, you can send yourself messages as soon as something changes in your system. These notifications can contain not only textual information, but also images and other files. This way, you are always up to date and can immediately recognize important events in your smart home.`,enabled:`enabled`,"enabled and OK":`enabled and OK`,"enabled, alive, but not connected to controller":`enabled, alive, but not connected to controller`,"enabled, alive, but not connected to device or service":`enabled, alive, but not connected to device or service`,"enabled, but not alive":`enabled, but not alive`,energy_group:`Energy`,engine:`engine`,"engine type":`engine type`,enterLogin:`Login name`,enterPassword:`Password`,error:`error`,events:`events`,"execute operation":`Execute operation`,expand:`expand`,"expand all":`expand all`,extended:`extended`,false:`false`,"file permissions":`File permissions`,filter_customs:`Settings`,filter_func:`Function`,filter_id:`ID`,filter_name:`Name`,filter_role:`Role`,filter_room:`Room`,filter_type:`Type`,"for ioBroker.net portal":`for NexoWatt EOS.net portal`,"for new instances":`for new instances`,from:`from`,garden_group:`Garden`,general_group:`General`,geoposition_group:`Geo position`,github_note:`Please note: adapter dependencies are not checked when using this installation method. Please check them yourself. You will also have to manually create an instance after the installation if necessary.`,github_warning:`Don't install adapters from %s unless asked to by a developer or if you are 100% sure what you are doing! Adapters on %s may not work like they should (they are still under development). Only install them if you are participating in a test! Please wait for an official release!`,group_acl_create:`create`,group_acl_delete:`delete`,group_acl_execute:`shell execution`,group_acl_file:`File permissions`,group_acl_http:`http requests`,group_acl_list:`list`,group_acl_object:`Object permissions`,group_acl_other:`Other permissions`,group_acl_read:`read`,group_acl_sendto:`sendTo`,group_acl_state:`State permissions`,group_acl_users:`Users permissions`,group_acl_write:`write`,groups:`groups`,hardware_group:`Hardware`,health_group:`Health`,"hide ignored":`hide ignored`,"hide suggested":`hide suggested`,history:`history`,"history data":`history data`,"history wizard category":`With adapters in this category, you can record data to visualize it over time. One example is energy consumption by time of day.`,"history wizard description":`With the NexoWatt EOS History Adapter, you can record data to visualize it over time or perform historical analyses. The best thing about it is that the history adapter stores the data locally and does not require any additional external software. This allows you to analyze power consumption over time, for example, and use energy more efficiently.`,host:`host`,household_group:`Household`,"http operation":`http`,id:`ID`,"in seconds":`in seconds`,info:`info`,infrastructure_group:`Infrastructure`,"input events":`input events`,install:`install`,"install specific version":`Install a specific version`,installed:`installed`,"installed adapters":`Filter installed adapters`,instance:`instance`,"instance number":`Desired instance number`,"ioBroker Enums":`NexoWatt EOS enums`,"ioBroker States":`NexoWatt EOS states`,"ioBroker adapter instances":`NexoWatt EOS adapter instances`,"ioBroker adapter scripts":`NexoWatt EOS adapter scripts`,"ioBroker adapters":`NexoWatt EOS adapters`,"ioBroker assistant":`NexoWatt EOS assistant`,"ioBroker certificates":`NexoWatt EOS certificates`,"ioBroker groups":`NexoWatt EOS groups`,"ioBroker hosts":`NexoWatt EOS hosts`,"ioBroker is not connected":`NexoWatt EOS is not connected`,"ioBroker is running":`ioBroker is running`,"ioBroker location":`NexoWatt EOS location`,"ioBroker repositories":`NexoWatt EOS repositories`,"ioBroker users":`NexoWatt EOS users`,"iot wizard description":`With the NexoWatt EOS IoT Adapter, you can easily connect your NexoWatt EOS to voice assistants like Amazon Alexa and Google Home. This makes controlling your smart home even more intuitive and convenient. Additionally, you can send notifications directly to your NexoWatt EOS Visu App to stay informed about important events. And the best part: With custom services, you can even send your own data to NexoWatt EOS via webhooks to trigger IFTTT automations and make your smart home even smarter.`,"iot-system_group":`IoT systems`,"iot-systems_group":`IoT Systems`,"javascript wizard description":`With the NexoWatt EOS JavaScript Adapter, you can not only create simple logics, but also very complex automations. Whether you want to write JavaScript code or prefer to work graphically, the rules engine allows even non-programmers to easily assemble logics. You can even use Blockly, a visual programming language, to implement your ideas. For experts, there is the option of creating scripts in TypeScript in addition to JavaScript support.`,"js-controller upgrade instructions":`js-controller upgrade instructions`,keywords:`keywords`,"last 10 minutes":`last 10 minutes`,"last 12 months":`last 12 months`,"last 2 weeks":`last 2 weeks`,"last 24 hours":`last 24 hours`,"last 30 days":`last 30 days`,"last 30 minutes":`last 30 minutes`,"last hour":`last hour`,"last week":`last week`,lc:`Last change`,"less output":`Less logs`,letsnecrypt_help:`This are settings for Let's Encrypt account. To get the free certificates for your domain. You can read more <a href="https://letsencrypt.org/" target="_blank">here</a>.`,letsnecrypt_help_domains:`E.g: 'example.com, www.example.com'`,letsnecrypt_help_email:`Please use your email address. It will be used for your account.`,letsnecrypt_help_path:`Directory name where the certificates will be stored. This is always relative to configuration directory`,license:`license`,"license agreement":`License agreement`,"license not agree":`Do not agree with the license!`,license_checkbox:`I agree with the collection of anonymous statistics.<br>(This can be disabled in settings)`,lighting_group:`Lighting`,link:`link`,list:`list`,"list operation":`list elements`,location:`Path`,"log level":`Log level`,"logic wizard category":`With logic adapters, you can implement simple logics such as switching devices depending on events. More complex logic such as shutter automation is also possible.`,logic_group:`Logic`,login:`Log in`,loginTitle:`NexoWatt EOS`,loglevel:`loglevel`,"max:":`to:`,media_group:`Media`,members:`members`,memlimit:`RAM limit`,message:`message`,messaging_group:`Messaging`,metering_group:`Metering`,"min:":`from:`,"misc-data_group":`Misc. data`,mixed:`mixed`,mode:`mode`,monday:`monday`,"more output":`More output`,move_states_with_history_warning:`Please note, that the history of the states cannot be moved. The same is about usage in others adapters for logic or visualisation.`,ms:`ms`,multi:`multistate`,multimedia_group:`Multimedia`,name:`name`,native:`native`,network_group:`Network`,new:`new`,"new certificate":`new certificate`,"new group":`new group`,"new script":`new script`,"new user":`new user`,newObject:`New object`,"no-city":`no city`,"node-red":`node-red`,none:`none`,normal:`normal`,"not ack":`not ack`,"not agree":`Don't agree`,"not maintained":`not maintained`,"notification-manager wizard description":`With the Notification Manager Adapter, you as a user can be informed about system notifications. For example, you will be notified via Telegram or email as soon as there is a serious problem in your system.
|
|
147
|
+
`}),n}function L_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function R_(e,t){let n=M_(e,t),r=n.one(e,void 0),i=__(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
148
|
+
`},i)),a}function z_(e,t){return e&&`run`in e?async function(n,r){let i=R_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return R_(n,{file:r,...e||t})}}function B_(e){if(e)throw e}var V_=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function H_(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function U_(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?W_(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function W_(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var G_={basename:K_,dirname:q_,extname:J_,join:Y_,sep:`/`};function K_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Q_(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function q_(e){if(Q_(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function J_(e){Q_(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Y_(...e){let t=-1,n;for(;++t<e.length;)Q_(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:X_(n)}function X_(e){Q_(e);let t=e.codePointAt(0)===47,n=Z_(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Z_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Q_(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var $_={cwd:ev};function ev(){return`/`}function tv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function nv(e){if(typeof e==`string`)e=new URL(e);else if(!tv(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return rv(e)}function rv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var iv=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],av=class{constructor(e){let t;t=e?tv(e)?{path:e}:typeof e==`string`||lv(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:$_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<iv.length;){let e=iv[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)iv.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?G_.basename(this.path):void 0}set basename(e){sv(e,`basename`),ov(e,`basename`),this.path=G_.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?G_.dirname(this.path):void 0}set dirname(e){cv(this.basename,`dirname`),this.path=G_.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?G_.extname(this.path):void 0}set extname(e){if(ov(e,`extname`),cv(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=G_.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){tv(e)&&(e=nv(e)),sv(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?G_.basename(this.path,this.extname):void 0}set stem(e){sv(e,`stem`),ov(e,`stem`),this.path=G_.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Jf(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ov(e,t){if(e&&e.includes(G_.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+G_.sep+"`")}function sv(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function cv(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function lv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var uv=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),dv=e(V_(),1),fv={}.hasOwnProperty,pv=new class e extends uv{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=U_()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,dv.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(gv(`data`,this.frozen),this.namespace[e]=t,this):fv.call(this.namespace,e)&&this.namespace[e]||void 0:e?(gv(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=yv(e),n=this.parser||this.Parser;return mv(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),mv(`process`,this.parser||this.Parser),hv(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=yv(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);xv(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),mv(`processSync`,this.parser||this.Parser),hv(`processSync`,this.compiler||this.Compiler),this.process(e,r),vv(`processSync`,`process`,t),n;function r(e,r){t=!0,B_(e),n=r}}run(e,t,n){_v(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=yv(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),vv(`runSync`,`run`,n),r;function i(e,t){B_(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=yv(t),r=this.compiler||this.Compiler;return hv(`stringify`,r),_v(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(gv(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,dv.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];H_(o)&&H_(r)&&(r=(0,dv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function mv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function hv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function gv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _v(e){if(!H_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function vv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function yv(e){return bv(e)?e:new av(e)}function bv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function xv(e){return typeof e==`string`||Sv(e)}function Sv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Cv=[],wv={allowDangerousHtml:!0},Tv=/^(https?|ircs?|mailto|xmpp)$/i,Ev=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Dv(e){let t=Ov(e),n=kv(e);return Av(t.runSync(t.parse(n),n),e)}function Ov(e){let t=e.rehypePlugins||Cv,n=e.remarkPlugins||Cv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wv}:wv;return pv().use(Tg).use(n).use(z_,r).use(t)}function kv(e){let t=e.children||``,n=new av;return typeof t==`string`?n.value=t:``+t,n}function Av(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||jv;for(let e of Ev)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return k_(e,l),np(e,{Fragment:Me,components:i,ignoreInvalidStyle:!0,jsx:T,jsxs:M,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in wp)if(Object.hasOwn(wp,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=wp[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function jv(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Tv.test(e.slice(0,t))?e:``}var Mv={root:{backgroundColor:`background.paper`,width:`100%`,height:`auto`,display:`flex`,"& .markdown":{margin:0,p:`10px`,width:`100%`,height:`100%`,overflow:`auto`}},paper:{maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},pre:{overflow:`auto`,whiteSpace:`pre-wrap`,margin:0,padding:10,width:`100%`},header1:{backgroundColor:`primary.main`,color:`primary.contrastText`,borderRadius:`2px`,pl:1,pr:1,pb:`4px`},header2:{backgroundColor:`secondary.main`,color:`secondary.contrastText`,borderRadius:`2px`,pl:1,pr:1,pb:`4px`}};function Nv({url:e,link:t,onClose:n,licenseType:r}){let[i,a]=R(``),[o,s]=R(!0),[c,l]=R(!1),[d,f]=R(!1),p=Ut.useRef(null),m=Ut.useRef(null),h=Ut.useRef(void 0),[g,_]=R(e);g!==e&&(_(e),s(!0),l(!1),f(!1),a(``)),Xt(()=>{let t=e;t.startsWith(`https://github.com/`)&&(t=t.replace(`https://github.com/`,`https://raw.githubusercontent.com/`).replace(`/blob/`,`/`));let n=()=>{l(!0),f(!0),s(!1)};if(!t){n();return}let r=()=>fetch(t).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()});r().then(e=>{a(e),s(!1)}).catch(e=>{console.error(`Cannot read license 1 from "${t}": ${e}`),r().then(e=>{a(e),s(!1)}).catch(e=>{console.error(`Cannot read license 2 "${t}": ${e}`),n()})})},[e]),Xt(()=>{let e=()=>{var e;let t=((e=m.current)==null?void 0:e.querySelector(`.markdown`))||null;return t?t.scrollHeight<=t.clientHeight?(f(!0),!0):(h.current&&=(clearInterval(h.current),null),t.onscroll=e=>{let t=e.target,n=t.scrollTop+t.clientHeight>=t.scrollHeight-10;!d&&n&&f(n)},!0):!1};return!o&&i&&(i.startsWith(`#`)?e()||(h.current=h.current||setInterval(()=>e(),100)):p.current?p.current.scrollHeight-10<=p.current.clientHeight&&f(!0):setTimeout(()=>{p.current?p.current.scrollHeight-10<=p.current.clientHeight&&f(!0):f(!0)},100)),()=>{h.current&&=(clearInterval(h.current),null);let e=p.current;if(e){let t=e.querySelector(`.markdown`);t&&(t.onscroll=null)}}},[o,d,i]);let v=null;return!o&&i?v=i.startsWith(`#`)?T(`div`,{className:`markdown`,children:T(Dv,{components:{h1:e=>T(F,{component:`h1`,sx:Mv.header1,children:e.children}),h2:e=>T(F,{component:`h2`,sx:Mv.header2,children:e.children})},children:i})}):T(`pre`,{style:Mv.pre,ref:p,onScroll:()=>{if(p.current){let e=p.current.scrollTop+p.current.clientHeight>=p.current.scrollHeight-10;!d&&e&&f(e)}},children:i}):!o&&c&&(v=M(F,{sx:{p:`10px`},children:[A.t(`The license text could not be loaded.`),e?T(`div`,{children:T(Ge,{href:e,target:`_blank`,rel:`noopener`,children:e})}):null]})),M(u,{onClose:()=>n(),open:!0,maxWidth:`lg`,fullWidth:!0,sx:{"& .MuiDialog-paper":Mv.paper},children:[M(ve,{children:[A.t(`License agreement`),`:`,T(`span`,{style:{marginLeft:16,fontWeight:`bold`},children:r})]}),T(le,{style:Mv.overflowHidden,dividers:!0,children:T(F,{component:`div`,sx:Mv.root,ref:m,children:o?T(Le,{}):v})}),M(St,{children:[t&&t!==e?T(Ge,{href:t,target:`_blank`,rel:`noopener`,sx:{ml:1,mr:`auto`},children:A.t(`More about this license`)}):null,T(V,{id:`license-dialog-accept`,variant:`contained`,disabled:o||!d,autoFocus:!0,onClick:()=>n(!0),startIcon:T(d?Ne:he,{}),color:`primary`,children:d?A.t(`Accept`):A.t(`Read to the end for accept`)}),T(V,{id:`license-dialog-close`,variant:`contained`,onClick:()=>n(),startIcon:T(O,{}),color:`grey`,children:A.t(`Close`)})]})]})}var Pv={root:{width:`100%`,height:`auto`,display:`flex`,borderRadius:4,flexDirection:`column`},paper:{maxWidth:1e3,width:`100%`,maxHeight:800,height:`calc(100% - 32px)`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},heading:{display:`flex`,alignItems:`center`},headerBlock:{backgroundColor:`#272727`,padding:13,fontSize:16},paperTable:{width:`100%`,marginBottom:16}},Fv=({children:e,value:t,index:n,title:r,custom:i,...a})=>i?T(`div`,{...a,children:t===n&&e}):T(`div`,{...a,children:t===n&&M(Me,{children:[T(bt,{position:`static`,color:`default`,children:T(`div`,{style:Pv.headerBlock,children:r})}),T(F,{sx:{p:3},children:T(L,{component:`div`,children:e})})]})}),Iv={password:`password`,checkbox:`checkbox`,select:`select`,link:`staticText`,comment:`staticText`,text:`text`,name:`staticText`,title:`staticText`};function Lv(e,t,n){let r=t.unshift();t.length?(e[r]=e[r]||{},Lv(e[r],t,n)):e[r]=n}function Rv(e,t,n){Lv(e,t.split(`.`),n)}var zv=({theme:e,themeType:t,themeName:n,socket:r,newInstance:i,onClose:a,systemConfig:o})=>{let[s,c]=R({}),{schema:l,initialData:d}=rn(()=>{var e,t;let n={},r={};if(i!=null&&(e=i.comment)!=null&&e.add&&Array.isArray(i==null||(t=i.comment)==null?void 0:t.add)){var a;i.comment.add.forEach((e,t)=>n[t]={type:`header`,text:e}),(a=i.comment.inputs)==null||a.forEach((e,t)=>{n[t+1]={...e,type:Iv[e.type],label:e.title,text:e.def?e.def.toString():``,href:e.def?e.def.toString():``,sm:6,newLine:!0},e.type===`link`&&(n[t+1].button=!0,n[t+1].variant=`contained`,n[t+1].href=e.def?e.def.toString():``,n[t+1].text=e.title,n[t+1].icon=`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTExLjk5IDJDNi40NyAyIDIgNi40OCAyIDEyczQuNDcgMTAgOS45OSAxMEMxNy41MiAyMiAyMiAxNy41MiAyMiAxMlMxNy41MiAyIDExLjk5IDJ6bTYuOTMgNmgtMi45NWMtLjMyLTEuMjUtLjc4LTIuNDUtMS4zOC0zLjU2IDEuODQuNjMgMy4zNyAxLjkxIDQuMzMgMy41NnpNMTIgNC4wNGMuODMgMS4yIDEuNDggMi41MyAxLjkxIDMuOTZoLTMuODJjLjQzLTEuNDMgMS4wOC0yLjc2IDEuOTEtMy45NnpNNC4yNiAxNEM0LjEgMTMuMzYgNCAxMi42OSA0IDEycy4xLTEuMzYuMjYtMmgzLjM4Yy0uMDguNjYtLjE0IDEuMzItLjE0IDIgMCAuNjguMDYgMS4zNC4xNCAySDQuMjZ6bS44MiAyaDIuOTVjLjMyIDEuMjUuNzggMi40NSAxLjM4IDMuNTYtMS44NC0uNjMtMy4zNy0xLjktNC4zMy0zLjU2em0yLjk1LThINS4wOGMuOTYtMS42NiAyLjQ5LTIuOTMgNC4zMy0zLjU2QzguODEgNS41NSA4LjM1IDYuNzUgOC4wMyA4ek0xMiAxOS45NmMtLjgzLTEuMi0xLjQ4LTIuNTMtMS45MS0zLjk2aDMuODJjLS40MyAxLjQzLTEuMDggMi43Ni0xLjkxIDMuOTZ6TTE0LjM0IDE0SDkuNjZjLS4wOS0uNjYtLjE2LTEuMzItLjE2LTIgMC0uNjguMDctMS4zNS4xNi0yaDQuNjhjLjA5LjY1LjE2IDEuMzIuMTYgMiAwIC42OC0uMDcgMS4zNC0uMTYgMnptLjI1IDUuNTZjLjYtMS4xMSAxLjA2LTIuMzEgMS4zOC0zLjU2aDIuOTVjLS45NiAxLjY1LTIuNDkgMi45My00LjMzIDMuNTZ6TTE2LjM2IDE0Yy4wOC0uNjYuMTQtMS4zMi4xNC0yIDAtLjY4LS4wNi0xLjM0LS4xNC0yaDMuMzhjLjE2LjY0LjI2IDEuMzEuMjYgMnMtLjEgMS4zNi0uMjYgMmgtMy4zOHoiPjwvcGF0aD48L3N2Zz4=`),e.type===`password`&&(n[t+1].repeat=!0),e.def!==void 0&&(r[t+1]=``),e.type===`checkbox`&&(r[t+1]=!1)})}return{schema:{type:`panel`,items:n},initialData:r}},[i]),[f,p]=R(d),[m,h]=R(i);return m!==i&&(h(i),p(d)),M(u,{onClose:()=>a(),open:!0,sx:{"& .MuiDialog-paper":Pv.paper},children:[M(`h2`,{style:Pv.heading,children:[T(Oe,{style:{color:`rgb(77 171 245)`,fontSize:36,marginLeft:25,marginRight:10}}),A.t(`Instance parameters for %s`,i._id.replace(`system.adapter.`,``))]}),T(le,{style:{...Pv.flex,...Pv.overflowHidden},dividers:!0,children:T(`div`,{style:Pv.root,children:T(Fv,{value:1,index:1,custom:!0,title:A.t(`Test`),children:T(Ot,{style:Pv.paperTable,children:T(Ce,{oContext:{socket:r,themeType:t,theme:e,isFloatComma:!0,instance:0,dateFormat:`YYYY.MM.DD`,forceUpdate:()=>{},onCommandRunning:()=>{},adapterName:`dummy`,_themeName:n,systemConfig:o,AceEditor:dr},data:f,themeName:n,onChange:e=>p(e),onError:(e,t)=>c({...s,[e||``]:t||``}),schema:l,alive:!0,changed:!1,originalData:f,common:{}})})})})}),M(St,{children:[T(V,{id:`inputs-modal-dialog-apply`,variant:`contained`,autoFocus:!0,disabled:!!Object.keys(s).find(e=>s[e]),onClick:()=>{let e={native:{}},t=!1;Object.keys(l.items).forEach(n=>{l.items[n].required?!f[n]&&l.items[n].type!==`checkbox`?(t=!0,alert(`no data ${l.items[n].label}`)):Rv(e,l.items[n].name||``,f[n]):l.items[n].name&&(t=!1,Rv(e,l.items[n].name,f[n]))}),t||a(e)},color:`primary`,startIcon:T(Ne,{}),children:A.t(`Apply`)}),T(V,{id:`inputs-modal-dialog-close`,variant:`contained`,onClick:()=>a(),color:`grey`,startIcon:T(O,{}),children:A.t(`Close`)})]})]})};function Bv(e,t){let n=(window._localStorage||window.localStorage).getItem(t);if(n)try{e=JSON.parse(n)}catch{}let[r,i]=R(e);return[r,e=>{(window._localStorage||window.localStorage).setItem(t,JSON.stringify(e)),i(e)},!!(window._localStorage||window.localStorage).getItem(t)]}function Vv(e){var t;return e!=null&&(t=e.native)!=null&&t.lastScan?(e.native.newInstances||[]).filter(e=>{var t;return!(e!=null&&(t=e.comment)!=null&&t.ack)}).length:0}var Hv={root:{width:`100%`,height:`auto`,display:`flex`,borderRadius:4,flexDirection:`column`},paper:{maxWidth:1e3,width:`100%`,maxHeight:800,height:`calc(100% - 32px)`},flex:{display:`flex`},overflowHidden:{overflow:`hidden`},overflowAuto:{overflowY:`auto`},headerText:{fontWeight:`bold`,fontSize:15},descriptionHeaderText:{margin:`10px 0`},heading:{display:`flex`,alignItems:`center`},headerBlock:{backgroundColor:`#272727`,padding:13,fontSize:16},headerBlockDisplayItem:{p:`5px`,fontSize:16,display:`flex`,m:`2px`,border:`1px solid #c0c0c045`,borderRadius:`4px`,alignItems:`center`,transition:`background .5s, color .5s`},activeBlock:{backgroundColor:`#c0c0c021`,border:`1px solid #4dabf5`},pointer:{cursor:`pointer`},hover:{"&:hover":{backgroundColor:`#c0c0c021`}},installSuccess:{opacity:.7,color:`#5ef05e`},installError:{opacity:.7,color:`#ffc14f`},width200:{width:200},table:{},paperTable:{width:`100%`,marginBottom:16},wrapperSwitch:{display:`flex`,margin:10,marginTop:0},divSwitch:{display:`flex`,alignItems:`center`,fontSize:10,marginLeft:0,color:`silver`},marginLeft:{marginLeft:40},stepper:{padding:0,background:`inherit`},instanceIcon:{width:30,height:30,margin:3},instanceId:{marginLeft:10},instanceWrapper:{display:`flex`,alignItems:`center`}};function Uv({style:e,children:t,value:n,index:r,title:i,custom:a,boxHeight:o,black:s,...c}){return a?T(`div`,{...c,children:n===r&&t}):n===r?M(`div`,{...c,style:e,children:[T(bt,{position:`static`,color:`default`,children:T(`div`,{style:{...Hv.headerBlock,color:s?void 0:`white`},children:i})}),T(F,{style:o?{height:`calc(100% - 45px)`}:void 0,sx:{p:3},children:T(L,{style:o?{height:`100%`}:void 0,component:`div`,children:t})})]}):null}var Wv=[{id:`instance`,numeric:!1,disablePadding:!0,label:`Instance`},{id:`host`,numeric:!1,disablePadding:!1,label:`Host`},{id:`description`,numeric:!1,disablePadding:!1,label:`Description`},{id:`ignore`,numeric:!0,disablePadding:!1,label:`Ignore`}];function Gv(e){let{numSelected:t,rowCount:n,onSelectAllClick:r}=e;return T(Jt,{children:M(Ze,{children:[T(B,{padding:`checkbox`,children:T(ke,{indeterminate:t>0&&t<n,checked:n>0&&t===n,onChange:e=>r(e),slotProps:{input:{"aria-label":`select all desserts`}}})}),Wv.map(e=>T(B,{align:e.numeric?`right`:`left`,padding:e.disablePadding?`none`:`normal`,children:T(It,{children:e.label})},e.id))]})})}function Kv(e){if(!e)return`new`;if(typeof e==`string`)return e;let t=``;return e.add&&(t+=A.t(`new`),Array.isArray(e.add)&&e.add.length?(t+=`: `,e.add.length<=5?t+=e.add.join(`, `):t+=A.t(`%s devices`,e.add.length)):(typeof e.add==`string`||typeof e.add==`number`)&&(t+=`: `,t+=e.add)),e.changed&&(t+=(t?`, `:``)+A.t(`changed`),Array.isArray(e.changed)&&e.changed.length?(t+=`: `,e.changed.length<=5?t+=e.changed.join(`, `):t+=A.t(`%s devices`,e.changed.length)):(typeof e.changed==`string`||typeof e.changed==`number`)&&(t+=`: `,t+=e.changed)),e.extended&&(t+=(t?`, `:``)+A.t(`extended`),Array.isArray(e.extended)&&e.extended.length?(t+=`: `,e.extended.length<=5?t+=e.extended.join(`, `):t+=A.t(`%s devices`,e.extended.length)):(typeof e.extended==`string`||typeof e.extended==`number`)&&(t+=`: `,t+=e.extended)),e.text&&(t+=(t?`, `:``)+e.text),t}function qv({themeType:e,themeName:t,socket:n,dateFormat:r,currentHost:a,defaultLogLevel:o,repository:s,hosts:c,onClose:l,theme:d,systemConfig:f}){var p,m,h,g,_,y;let[b,x]=R(0),[ee,S]=R({}),[C,w]=R({}),[te,ne]=R(!1),[E,re]=R(null);Xt(()=>{async function e(){let e=await n.sendTo(`system.adapter.discovery.0`,`listMethods`,null),t={},r=(window._localStorage||window.localStorage).getItem(`App.discoveryLastSelection`)||null,i;if(r)try{i=JSON.parse(r)}catch{i=null}Object.keys(e).forEach(e=>{i?t[e]=i[e]:t[e]=e!==`serial`}),w(t),S(e)}e().catch(e=>console.warn(`Cannot read listMethods: ${e}`))},[n]),Xt(()=>{async function e(){let e=await n.getObject(`system.discovery`);e!==void 0&&(re(e),Vv(e)&&x(1))}e().catch(e=>console.warn(`Cannot read system.discovery: ${e}`))},[n]);let[ie,D]=R({}),[k,oe]=R({});Xt(()=>{c.forEach(async({_id:e})=>{let t=await n.getState(`${e}.alive`),r=!t||t.val===null?!1:!!t.val;D(t=>t[e]===r?t:{...t,[e]:r})})},[c,n]);let se=Object.keys(ie).filter(e=>ie[e]).length>1,[ce,ue]=R(0),[de,fe]=R(0),[me,he]=R(0),[ge,ve]=R(!1),[ye,be]=R(0),[xe,Se]=R([]),[Ce,we]=R(!1),[Te,Ee]=R(1),[De,Oe]=R({}),[j,Ae]=R(`install`),[je,Ne]=Bv(!0,`discovery.suggested`),[N,Fe]=Bv(!0,`discovery.showAll`),[Ie,Re]=R(null),[ze,He]=R(null),Ue=e===`dark`,[Ge,Ke]=R({native:{}}),qe=[`Select methods`,`Create instances`,`Installation process`],[Je,Ye]=R({}),[Qe,$e]=R(!1),[et,tt]=R(1),nt=(e,t)=>{if(t)switch(e){case`discovery.0.devicesFound`:ue(t.val);break;case`discovery.0.devicesProgress`:fe(t.val);break;case`discovery.0.instancesFound`:he(t.val);break;case`discovery.0.scanRunning`:ve(t.val);break;case`discovery.0.servicesProgress`:be(t.val)}},rt=(e,t)=>{t&&e===`system.discovery`&&re(t)};Xt(()=>(n.subscribeObject(`system.discovery`,rt),n.subscribeState(`discovery.0.devicesFound`,nt),n.subscribeState(`discovery.0.devicesProgress`,nt),n.subscribeState(`discovery.0.instancesFound`,nt),n.subscribeState(`discovery.0.scanRunning`,nt),n.subscribeState(`discovery.0.servicesProgress`,nt),()=>{n.unsubscribeObject(`system.discovery`,rt),n.unsubscribeState(`discovery.0.devicesFound`,nt),n.unsubscribeState(`discovery.0.devicesProgress`,nt),n.unsubscribeState(`discovery.0.instancesFound`,nt),n.unsubscribeState(`discovery.0.scanRunning`,nt),n.unsubscribeState(`discovery.0.servicesProgress`,nt)}),[n]);let it=()=>x(b+1),at=()=>x(b-1),ot=(e,t)=>n.extendObject(e,t).catch(e=>window.alert(e)),st=async()=>{ne(!0);let e=Object.keys(C).filter(e=>C[e]),t=await n.sendTo(`system.adapter.discovery.0`,`browse`,e);ne(!1),t.error?window.alert(t.error):x(1)},ct=e=>{if(e.target.checked){var t;let e=(E==null||(t=E.native)==null||(t=t.newInstances)==null?void 0:t.map(e=>e._id))||[];Se(e)}else Se([])},lt=(e,t)=>t.includes(e),ut=(e,t,n,r)=>{let i=n.indexOf(t),a=[];i===-1?a=a.concat(n,t):i===0?a=a.concat(n.slice(1)):i===n.length-1?a=a.concat(n.slice(0,-1)):i>0&&(a=a.concat(n.slice(0,i),n.slice(i+1))),r(a)},dt=(e,t)=>{var n,r;let i=E==null||(n=E.native)==null?void 0:n.newInstances.find(t=>t._id===e),a=i?JSON.parse(JSON.stringify(i)):null;if(!a)return;let o=!0;if(a!=null&&(r=a.comment)!=null&&r.license&&a.comment.license!==`MIT`&&(o=!1,a.common.licenseUrl||(a.common.licenseUrl=`https://raw.githubusercontent.com/ioBroker/ioBroker.${a.common.name}/master/LICENSE`),a.common.licenseUrl&&typeof a.common.licenseUrl==`object`&&(a.common.licenseUrl=a.common.licenseUrl[A.getLanguage()]||a.common.licenseUrl.en),typeof a.common.licenseUrl==`string`&&a.common.licenseUrl.includes(`github.com`)&&(a.common.licenseUrl=a.common.licenseUrl.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`))),o){var s;(s=a.comment)!=null&&s.inputs?He({cb:t,obj:a}):t()}else Re({cb:t,obj:a})},P=(e,t)=>{let n=xe.indexOf(e)+1;Oe(e=>({...e,[n]:`error`})),t&&Ye(e=>({...e,[xe[n-1]]:[A.t(t)]})),xe.length>n?setTimeout(()=>dt(xe[n],()=>{Ee(n+1),Ae(`install`),we(!0)}),100):$e(!0)},pt=ze?T(zv,{socket:n,theme:d,themeType:e,themeName:t,newInstance:ze.obj,systemConfig:f,onClose:e=>{let{cb:t}=ze,{obj:n}=ze;He(null),e?(Ke(e),t()):P(n._id,`Error: configuration dialog canceled`)}}):null,mt=()=>{Se([]),we(!1),$e(!1),Ee(1),Ae(`install`),Oe({})},ht=()=>{dt(xe[0],()=>{Ee(1),we(!0)})},gt=Ie?T(Nv,{licenseType:((p=Ie.obj.comment)==null?void 0:p.license)||``,url:Ie.obj.common.licenseUrl,onClose:e=>{var t;let{cb:n,obj:r}=Ie;Re(null),e?(t=r.comment)!=null&&t.inputs?He({cb:n,obj:r}):n():P(r._id,`Error: license not accepted`)}}):null;return M(_e,{theme:d,children:[gt,pt,M(u,{onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&l()},open:!0,sx:{"& .MuiDialog-paper":Hv.paper},children:[M(`h2`,{style:Hv.heading,children:[T(Xe,{style:{color:`rgb(77 171 245)`,fontSize:36,marginLeft:25,marginRight:10}}),A.t(`Find devices and services`)]}),T(Be,{style:Hv.stepper,alternativeLabel:!0,activeStep:b,children:qe.map(e=>T(fn,{children:T(ae,{children:A.t(e)})},e))}),T(le,{style:{...Hv.flex,...Hv.overflowHidden},dividers:!0,children:M(`div`,{style:Hv.root,children:[T(Uv,{style:{...Hv.overflowAuto,color:Ue?`white`:void 0},value:b,index:0,black:Ue,title:A.t(`Discover all possible devices`),children:te?ge&&M(`div`,{children:[de>=99?`Lookup services - ${ye}%`:`Lookup devices - ${de}%`,te&&T(Le,{variant:`determinate`,value:de>=99?ye:de}),de>=99?`${me} service(s) found`:`${ce} device(s) found`]}):M(Me,{children:[` `,T(`div`,{style:Hv.headerText,children:A.t(`press_discover`)}),(E==null||(m=E.native)==null?void 0:m.lastScan)&&T(`div`,{style:Hv.descriptionHeaderText,children:A.t(`Last scan on %s`,Pe.formatDate(new Date(E.native.lastScan),r))}),T(`div`,{style:{...Hv.headerBlock,color:Ue?void 0:`white`},children:A.t(`Use following methods:`)}),Object.keys(ee).map(e=>M(`div`,{children:[T(ke,{checked:C[e],disabled:te,onChange:(t,n)=>{let r=JSON.parse(JSON.stringify(C));r[e]=n,(window._localStorage||window.localStorage).setItem(`App.discoveryLastSelection`,JSON.stringify(r)),w(r)}}),e]},e))]})}),M(Uv,{style:Hv.overflowAuto,value:b,index:1,title:E!=null&&(h=E.native)!=null&&h.lastScan?A.t(`Create instances automatically - Last scan on %s`,Pe.formatDate(new Date(E.native.lastScan),r)):A.t(`Create instances automatically`),children:[M(`div`,{style:Hv.wrapperSwitch,children:[M(`div`,{style:Hv.divSwitch,children:[T(`div`,{style:N?void 0:{color:`green`},children:A.t(`hide ignored`)}),T(We,{checked:N,onChange:e=>Fe(e.target.checked),color:`primary`}),T(`div`,{style:N?{color:`green`}:void 0,children:A.t(`show ignored`)})]}),M(`div`,{style:{...Hv.divSwitch,...Hv.marginLeft},children:[T(`div`,{style:je?void 0:{color:`green`},children:A.t(`hide suggested`)}),T(We,{checked:je,onChange:e=>Ne(e.target.checked),color:`primary`}),T(`div`,{style:je?{color:`green`}:void 0,children:A.t(`show suggested`)})]})]}),T(Ot,{style:Hv.paperTable,children:T(jt,{children:M(i,{style:Hv.table,size:`small`,children:[T(Gv,{numSelected:xe.length,onSelectAllClick:ct,rowCount:(E==null||(g=E.native)==null||(g=g.newInstances)==null?void 0:g.length)||0}),T(ft,{children:E==null||(_=E.native)==null||(_=_.newInstances)==null?void 0:_.filter(e=>{if(!je){var t;return!((t=e.comment)!=null&&t.advice)}if(!N){var n;return!(e!=null&&(n=e.comment)!=null&&n.ack)}return!0}).map((t,n)=>{var r,i,o;return M(Ze,{hover:!0,role:`checkbox`,selected:(r=t.comment)==null?void 0:r.advice,children:[T(B,{padding:`checkbox`,children:T(ke,{checked:lt(t._id,xe),onClick:e=>ut(e,t._id,xe,Se)})}),T(B,{component:`th`,scope:`row`,padding:`none`,children:M(`div`,{style:Hv.instanceWrapper,children:[T(_t,{variant:`square`,alt:t._id.replace(`system.adapter.`,``),src:(i=s[t.common.name])==null?void 0:i.icon,style:Hv.instanceIcon}),T(`div`,{style:Hv.instanceId,children:t._id.replace(`system.adapter.`,``)})]})}),T(B,{align:`left`,children:se?T(pe,{fullWidth:!0,lang:A.getLanguage(),list:c,t:A.t,value:k[t._id]||a,themeType:e,onChange:e=>oe({...k,[t._id]:e})}):`_`}),T(B,{align:`left`,children:Kv(t.comment)}),T(B,{align:`right`,padding:`checkbox`,children:T(ke,{checked:!!(t!=null&&(o=t.comment)!=null&&o.ack),onClick:()=>{let e=JSON.parse(JSON.stringify(E==null?void 0:E.native.newInstances));e[n].comment={...e[n].comment,ack:!e[n].comment.ack},ot(`system.discovery`,{native:{newInstances:e}})}})})]},t._id)})})]})})})]}),T(Uv,{value:b,index:2,style:{...Hv.overflowAuto,height:`100%`},boxHeight:!0,title:A.t(`Install adapters`),children:M(`div`,{style:{display:`flex`,height:`100%`},children:[T(`div`,{children:xe.map((e,t)=>{var n;return M(F,{component:`div`,onClick:Qe?()=>tt(t):void 0,sx:{...Hv.headerBlockDisplayItem,...Qe?Hv.pointer:void 0,...Qe?Hv.hover:void 0,...Qe&&et===t?Hv.activeBlock:void 0},children:[T(`div`,{style:Hv.width200,children:M(`div`,{style:Hv.instanceWrapper,children:[T(_t,{variant:`square`,alt:e.replace(`system.adapter.`,``),src:(n=s[e.replace(`system.adapter.`,``).split(`.`)[0]])==null?void 0:n.icon,style:Hv.instanceIcon}),T(`div`,{style:Hv.instanceId,children:e.replace(`system.adapter.`,``)})]})}),Te===t+1&&!De[t+1]&&T(v,{size:20}),De[t+1]===`error`?T(Br,{style:Hv.installError}):De[t+1]===`success`?T(mr,{style:Hv.installSuccess}):null]},e)})}),Te&&(Ce||Qe)&&T(`div`,{style:{overflow:`hidden`,width:`calc(100% - 260px)`},children:T(Zs,{noSpacing:!0,ready:!0,host:a,logsRead:Qe?Je[xe[et]]||[`skipped`]:null,showElement:!Qe,socket:n,t:A.t,cmd:Qe?``:`${j} ${xe[Te-1].replace(`system.adapter.`,``).split(`.`)[0]}`,onFinished:(e,t)=>{let r=JSON.parse(JSON.stringify(E==null?void 0:E.native.newInstances.find(e=>e._id===xe[Te-1])));delete r.comment;let i=r._id.split(`.`);i.pop(),i=i.join(`.`),n.getObject(i).then(e=>{let i=e;r={...i,...r},r.common=Object.assign(i.common,r.common),r.native=Object.assign(i.native,r.native),r.type=`instance`,o&&(r.common.logLevel=o),r.common.logLevel=r.common.logLevel||`info`,Ge.native&&Object.keys(Ge.native).length&&(Object.assign(r.native,Ge.native),Ke({native:{}})),se&&k[r._id]&&(r.common.host=k[r._id]),ot(r._id,r).then(()=>{if(Te<xe.length)dt(xe[Te],()=>{Ee(Te+1),Ae(`install`)}),Ye({...Je,[xe[Te-1]]:t}),Oe({...De,[Te]:`success`});else{Ye({...Je,[xe[Te-1]]:t}),Oe({...De,[Te]:`success`}),tt(Te-1);let e=JSON.parse(JSON.stringify(E));e&&(e.native.newInstances=e.native.newInstances.filter(({_id:e})=>{let t=xe.find(t=>t===e);return!t||De[xe.indexOf(t)+1]!==`success`}),n.setObject(`system.discovery`,e)),$e(!0),window.alert(A.t(`Finished`))}})})},errorFunc:(e,t)=>{if(e===51&&j===`install`)Ae(`upload`);else if(xe.length>Te&&j===`upload`)dt(xe[Te],()=>Ee(Te+1)),Oe({...De,[Te]:`error`});else{if(xe.length>Te)Oe({...De,[Te]:`error`}),dt(xe[Te],()=>Ee(Te+1)),Ae(`install`),Ye({...Je,[xe[Te-1]]:t});else{Oe({...De,[Te]:`error`}),Ye({...Je,[xe[Te-1]]:t}),$e(!0),tt(Te-1);let e=JSON.parse(JSON.stringify(E));e&&(e.native.newInstances=e.native.newInstances.filter(({_id:e})=>{let t=xe.find(t=>t===e);return!t||De[xe.indexOf(t)+1]!==`success`}),n.setObject(`system.discovery`,e))}window.alert(`error ${xe[Te-1]}`)}}},`${Te}-${j}`)})]})})]})}),M(St,{children:[b>0&&b!==4&&T(V,{variant:`contained`,disabled:b===0,onClick:()=>{b===2&&mt(),at()},color:`grey`,startIcon:T(Fr,{}),children:A.t(`Back`)}),b===0&&T(V,{variant:`contained`,autoFocus:!0,disabled:te,onClick:st,color:`primary`,startIcon:T(Ve,{}),children:A.t(`Discover`)}),b!==2&&b!==4&&T(Rt,{slotProps:{popper:{sx:{pointerEvents:`none`}}},title:b===0?A.t(`Skip discovery process and go to install with last scan results`):``,children:T(`span`,{style:{marginLeft:8},children:T(V,{variant:`contained`,disabled:!E||!(E!=null&&(y=E.native)!=null&&y.lastScan)||b===2||te||b===1&&!xe.length,onClick:()=>{it(),b===1&&ht()},color:b===1?`primary`:`grey`,startIcon:T(b===1?kr:en,{}),children:A.t(b===1?`Create instances`:`Use last scan`)})})}),T(V,{variant:`contained`,disabled:te,onClick:()=>l(),color:b===2?`primary`:`grey`,startIcon:T(O,{}),children:A.t(b===2?`Finish`:`Close`)})]})]})]})}x();var Jv=class e extends $t{constructor(...t){super(...t),j(this,`_resizeHandlerInstalled`,!1),j(this,`_timerOnResize`,null),j(this,`__onResize`,()=>{this._timerOnResize&&clearTimeout(this._timerOnResize),this._timerOnResize=setTimeout(()=>{this._timerOnResize=null,this.state.mobile!==e.isMobile()&&this.setState({mobile:e.isMobile()})},200)})}static isMobile(){return window.innerWidth<800}componentDidMount(){this.state.mobile!==e.isMobile()&&this.setState({mobile:e.isMobile()}),this._resizeHandlerInstalled||(this._resizeHandlerInstalled=!0,window.addEventListener(`resize`,this.__onResize,!1))}componentWillUnmount(){this._timerOnResize&&=(clearTimeout(this._timerOnResize),null),this._resizeHandlerInstalled&&window.removeEventListener(`resize`,this.__onResize,!1)}getButtonTitle(e,t,n){return e&&t?this.state.mobile?n?M(Me,{children:[e,` & `,n]}):e:M(Me,{children:[e,T(`span`,{style:{marginLeft:4},children:t})]}):e||t||null}};x();var Yv={buttonLabel:{whiteSpace:`nowrap`},input:{minWidth:150}},Xv=class e extends $t{constructor(t){super(t),j(this,`mobile`,void 0),this.state={readTimeoutSec:Math.round((t.readTimeoutMs||e.getReadTimeoutMs())/1e3)},this.mobile=window.innerWidth<800}static getReadTimeoutMs(){return parseInt((window._localStorage||window.localStorage).getItem(`App.readTimeoutMs`),10)||(mt.isCloud()?6e4:3e4)}static saveReadTimeoutMs(e){return e?(window._localStorage||window.localStorage).setItem(`App.readTimeoutMs`,e.toString()):(window._localStorage||window.localStorage).removeItem(`App.readTimeoutMs`)}render(){return M(u,{open:!0,maxWidth:`lg`,onClose:()=>this.props.onClose(),children:[T(ve,{children:this.props.t(`Detected slow connection!`)}),M(le,{children:[T(fe,{children:this.props.t(`Seems that you have slow connection. Do you want to increase timeout interval?`)}),T(I,{variant:`standard`,style:Yv.input,label:this.props.t(`Read timeout`),value:this.state.readTimeoutSec,onChange:e=>this.setState({readTimeoutSec:e.target.value}),type:`number`,slotProps:{htmlInput:{min:5,max:600}},helperText:this.props.t(`in seconds`)})]}),M(St,{children:[T(V,{id:`slow-connection-dialog-minute`,className:`slow-connection-minute`,style:Yv.buttonLabel,variant:`contained`,onClick:()=>{e.saveReadTimeoutMs(6e4),this.props.onClose(6e4)},startIcon:T(mn,{}),color:`grey`,children:this.mobile?this.props.t(`1 minute`):this.props.t(`Set timeout to 1 minute`)}),T(V,{id:`slow-connection-dialog-ok`,className:`slow-connection-ok`,variant:`contained`,autoFocus:!0,color:`primary`,disabled:!parseInt(this.state.readTimeoutSec,10),onClick:()=>{let t=parseInt(this.state.readTimeoutSec,10)*1e3;e.saveReadTimeoutMs(t),this.props.onClose(t)},startIcon:T(Ne,{}),children:this.mobile?null:this.props.t(`Apply`)}),T(V,{id:`slow-connection-dialog-close`,className:`slow-connection-cancel`,variant:`contained`,onClick:()=>this.props.onClose(),color:`grey`,startIcon:T(O,{}),children:this.mobile?null:this.props.t(`Cancel`)})]})]})}},Zv={"expert-mode":`The head symbol <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expert mode' /> in the toolbar switches the expert mode on. It shows the system objects, additional settings of an instance and the expert options of many dialogs.`,"gui-settings":`Admin normally keeps its own settings, like the selected columns or the opened folders, in the browser. In the system settings you can store them in ioBroker instead, so every browser and every device shows the same.`,"object-columns":`In the objects list, "Configure" switches the automatic column selection off, so you can choose the columns yourself. A column is resized by dragging the separator in the header, and a double click on the separator resets the whole layout.`,"object-keyboard":`In the objects list the arrow keys move the selection, and the left and right arrow close and open a folder.`,"object-url":`If the value of a state is a link, Ctrl and a click on the value open it in a new tab.`,"states-view":`The states view of the objects list replaces type, role, room and function with the columns changed from, quality, timestamp and last change.`,"custom-settings":`The gear behind a state opens its custom settings. Every adapter that supports them adds its own adapter-specific options there – the recording adapters History, SQL or InfluxDB are only the best known example.`,alias:`An alias can be created from any state. It gives the state another name, role or scaling, without changing anything in the adapter.`,"log-level":`The log level of a single instance can be changed while it runs. After a restart of the controller the saved level is used again.`,discovery:`The device discovery searches the network for devices and services and proposes the adapters that fit them. This requires the Discovery adapter to be installed.`,"auto-upgrade":`Adapters can be configured so that smaller bug fixes and feature updates are installed fully automatically. Larger version jumps with potentially breaking changes still require a manual confirmation.`,"objects-export":`Objects can be exported into a JSON file and imported again, for example to move a configuration to another installation.`},Qv={en:Zv,de:{"expert-mode":`Das Kopfsymbol <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expertenmodus' /> in der Werkzeugleiste unten schaltet den Expertenmodus ein. Er zeigt die System-Objekte, zusätzliche Einstellungen einer Instanz und die Expertenoptionen vieler Dialoge.`,"gui-settings":`Der Admin merkt sich seine eigenen Einstellungen, etwa die gewählten Spalten oder die geöffneten Ordner, normalerweise im Browser. In den Systemeinstellungen kann man sie stattdessen in ioBroker ablegen, dann sieht jeder Browser und jedes Gerät dasselbe.`,"object-columns":`In der Objektliste schaltet "Konfigurieren" die automatische Spaltenauswahl aus, dann kann man die Spalten selbst wählen. Die Breite ändert man am Trenner in der Kopfzeile, ein Doppelklick darauf setzt die ganze Aufteilung zurück.`,"object-keyboard":`In der Objektliste bewegen die Pfeiltasten die Auswahl, der linke und der rechte Pfeil schließen und öffnen einen Ordner.`,"object-url":`Wenn der Wert eines Zustands ein Link ist, öffnet Strg und ein Klick auf den Wert ihn in einem neuen Tab.`,"states-view":`Die Zustandsansicht der Objektliste ersetzt Typ, Rolle, Raum und Funktion durch die Spalten Geändert von, Qualität, Zeitstempel und Letzte Änderung.`,"custom-settings":`Das Zahnrad hinter einem Zustand öffnet dessen spezifische Einstellungen. Dort ergänzt jeder Adapter, der sie unterstützt, seine eigenen adapterspezifischen Optionen – die aufzeichnenden Adapter History, SQL oder InfluxDB sind nur das bekannteste Beispiel.`,alias:`Aus jedem Zustand lässt sich ein Alias erzeugen. Er gibt dem Zustand einen anderen Namen, eine andere Rolle oder Skalierung, ohne im Adapter etwas zu ändern.`,"log-level":`Die Protokollstufe einer einzelnen Instanz lässt sich im laufenden Betrieb ändern. Nach einem Neustart des Controllers gilt wieder die gespeicherte Stufe.`,discovery:`Die Geräteerkennung durchsucht das Netzwerk nach Geräten und Diensten und schlägt die passenden Adapter vor. Dafür muss der Discovery-Adapter installiert sein.`,"auto-upgrade":`Adapter lassen sich so konfigurieren, dass kleinere Fehlerbehebungen und Funktionsupdates vollautomatisch eingespielt werden. Größere Versionssprünge mit potenziellen Änderungen erfordern weiterhin eine manuelle Bestätigung.`,"objects-export":`Objekte lassen sich in eine JSON-Datei exportieren und wieder importieren, etwa um eine Konfiguration auf eine andere Installation zu übertragen.`},ru:{"expert-mode":`Символ головы <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Режим эксперта' /> на панели инструментов включает режим эксперта. В нём видны системные объекты, дополнительные настройки экземпляра и экспертные параметры многих диалогов.`,"gui-settings":`Обычно admin хранит свои настройки, например выбранные столбцы или открытые папки, в браузере. В системных настройках их можно сохранять в ioBroker, тогда во всех браузерах и на всех устройствах будет одно и то же.`,"object-columns":`В списке объектов пункт «Настроить» отключает автоматический выбор столбцов, и столбцы можно выбрать самому. Ширину меняют перетаскиванием разделителя в заголовке, двойной щелчок по нему возвращает исходную раскладку.`,"object-keyboard":`В списке объектов стрелки перемещают выделение, а стрелки влево и вправо закрывают и открывают папку.`,"object-url":`Если значение состояния является ссылкой, Ctrl и щелчок по значению откроют её в новой вкладке.`,"states-view":`Режим просмотра состояний в списке объектов заменяет тип, роль, комнату и функцию столбцами «Изменено из», качество, метка времени и последнее изменение.`,"custom-settings":`Шестерёнка рядом с состоянием открывает его пользовательские настройки. Там свои параметры добавляет каждый адаптер, который их поддерживает; адаптеры записи, такие как History, SQL или InfluxDB, — лишь самый известный пример.`,alias:`Из любого состояния можно создать алиас. Он даёт состоянию другое имя, другую роль или масштабирование, ничего не меняя в самом адаптере.`,"log-level":`Уровень журналирования отдельного экземпляра можно менять на ходу. После перезапуска контроллера снова действует сохранённый уровень.`,discovery:`Поиск устройств просматривает сеть на предмет устройств и служб и предлагает подходящие адаптеры. Для этого должен быть установлен адаптер Discovery.`,"auto-upgrade":`Адаптеры можно настроить так, чтобы небольшие исправления ошибок и обновления функций устанавливались полностью автоматически. Более крупные смены версий с возможными существенными изменениями по-прежнему требуют ручного подтверждения.`,"objects-export":`Объекты можно экспортировать в файл JSON и снова импортировать, например чтобы перенести конфигурацию в другую установку.`},pt:{"expert-mode":`O símbolo da cabeça <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modo especialista' /> na barra de ferramentas ativa o modo especialista. Ele mostra os objetos de sistema, definições adicionais de uma instância e as opções de especialista de muitos diálogos.`,"gui-settings":`Normalmente o admin guarda as suas próprias definições, como as colunas escolhidas ou as pastas abertas, no navegador. Nas definições do sistema pode guardá-las no ioBroker, e então todos os navegadores e dispositivos mostram o mesmo.`,"object-columns":`Na lista de objetos, "Configurar" desliga a seleção automática de colunas, permitindo escolher as colunas manualmente. A largura muda-se arrastando o separador no cabeçalho, e um duplo clique sobre ele repõe todo o layout.`,"object-keyboard":`Na lista de objetos as teclas de seta movem a seleção, e as setas para a esquerda e para a direita fecham e abrem uma pasta.`,"object-url":`Se o valor de um estado for uma ligação, Ctrl e um clique sobre o valor abrem-na num novo separador.`,"states-view":`A vista de estados da lista de objetos substitui tipo, papel, divisão e função pelas colunas alterado por, qualidade, data e hora e última alteração.`,"custom-settings":`A roda dentada ao lado de um estado abre as suas definições personalizadas. Aí cada adaptador que as suporta acrescenta as suas próprias opções; os adaptadores de registo History, SQL ou InfluxDB são apenas o exemplo mais conhecido.`,alias:`A partir de qualquer estado pode criar-se um alias. Ele dá ao estado outro nome, outro papel ou outra escala, sem alterar nada no adaptador.`,"log-level":`O nível de registo de uma instância pode ser alterado enquanto ela corre. Após um reinício do controlador volta a valer o nível guardado.`,discovery:`A deteção de dispositivos procura na rede dispositivos e serviços e propõe os adaptadores correspondentes. Para isso, o adaptador Discovery tem de estar instalado.`,"auto-upgrade":`Os adaptadores podem ser configurados para que as pequenas correções de erros e as atualizações de funcionalidades sejam instaladas de forma totalmente automática. Os saltos de versão maiores, com possíveis alterações relevantes, continuam a exigir uma confirmação manual.`,"objects-export":`Os objetos podem ser exportados para um ficheiro JSON e importados de novo, por exemplo para levar uma configuração para outra instalação.`},nl:{"expert-mode":`Het hoofd-symbool <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Expertmodus' /> in de werkbalk schakelt de expertmodus in. Die toont de systeemobjecten, extra instellingen van een instantie en de expertopties van veel dialoogvensters.`,"gui-settings":`Admin bewaart zijn eigen instellingen, zoals de gekozen kolommen of de geopende mappen, normaal in de browser. In de systeeminstellingen kun je ze in plaats daarvan in ioBroker opslaan, dan tonen alle browsers en apparaten hetzelfde.`,"object-columns":`In de objectenlijst schakelt "Configureren" de automatische kolomkeuze uit, zodat je de kolommen zelf kunt kiezen. De breedte wijzig je met de scheiding in de kopregel, een dubbelklik daarop zet de hele indeling terug.`,"object-keyboard":`In de objectenlijst verplaatsen de pijltoetsen de selectie, en de linker- en rechterpijl sluiten en openen een map.`,"object-url":`Als de waarde van een state een link is, opent Ctrl met een klik op de waarde die link in een nieuw tabblad.`,"states-view":`De statenweergave van de objectenlijst vervangt type, rol, ruimte en functie door de kolommen gewijzigd door, kwaliteit, tijdstempel en laatste wijziging.`,"custom-settings":`Het tandwiel achter een state opent de aangepaste instellingen. Daar voegt elke adapter die ze ondersteunt zijn eigen adapterspecifieke opties toe; opnemende adapters zoals History, SQL of InfluxDB zijn slechts het bekendste voorbeeld.`,alias:`Van elke state kun je een alias maken. Die geeft de state een andere naam, rol of schaling, zonder iets in de adapter te wijzigen.`,"log-level":`Het logniveau van een enkele instantie kan tijdens het draaien worden gewijzigd. Na een herstart van de controller geldt weer het opgeslagen niveau.`,discovery:`De apparaatdetectie doorzoekt het netwerk op apparaten en diensten en stelt de passende adapters voor. Daarvoor moet de Discovery-adapter geïnstalleerd zijn.`,"auto-upgrade":`Adapters kunnen zo worden ingesteld dat kleinere foutoplossingen en functie-updates volledig automatisch worden geïnstalleerd. Grotere versiesprongen met mogelijke ingrijpende wijzigingen vragen nog steeds om een handmatige bevestiging.`,"objects-export":`Objecten kunnen naar een JSON-bestand worden geëxporteerd en weer geïmporteerd, bijvoorbeeld om een configuratie naar een andere installatie te brengen.`},fr:{"expert-mode":`Le symbole de la tête <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Mode expert' /> dans la barre d'outils active le mode expert. Il affiche les objets système, des réglages supplémentaires d'une instance et les options expert de nombreuses boîtes de dialogue.`,"gui-settings":`Admin conserve normalement ses propres réglages, comme les colonnes choisies ou les dossiers ouverts, dans le navigateur. Dans les réglages système, vous pouvez les enregistrer dans ioBroker, et tous les navigateurs et appareils affichent alors la même chose.`,"object-columns":`Dans la liste des objets, « Configurer » désactive la sélection automatique des colonnes, ce qui permet de les choisir soi-même. La largeur se modifie en tirant le séparateur de l'en-tête, un double-clic dessus réinitialise toute la disposition.`,"object-keyboard":`Dans la liste des objets, les touches fléchées déplacent la sélection, et les flèches gauche et droite ferment et ouvrent un dossier.`,"object-url":`Si la valeur d'un état est un lien, Ctrl et un clic sur la valeur l'ouvrent dans un nouvel onglet.`,"states-view":`La vue des états de la liste des objets remplace type, rôle, pièce et fonction par les colonnes modifié par, qualité, horodatage et dernière modification.`,"custom-settings":`L'engrenage derrière un état ouvre ses réglages personnalisés. Chaque adaptateur qui les prend en charge y ajoute ses propres options ; les adaptateurs d'enregistrement History, SQL ou InfluxDB n'en sont que l'exemple le plus connu.`,alias:`Un alias peut être créé à partir de n'importe quel état. Il lui donne un autre nom, un autre rôle ou une autre mise à l'échelle, sans rien changer dans l'adaptateur.`,"log-level":`Le niveau de journalisation d'une instance peut être modifié pendant son fonctionnement. Après un redémarrage du contrôleur, le niveau enregistré s'applique de nouveau.`,discovery:`La détection d'appareils parcourt le réseau à la recherche d'appareils et de services et propose les adaptateurs correspondants. Pour cela, l'adaptateur Discovery doit être installé.`,"auto-upgrade":`Les adaptateurs peuvent être configurés pour que les petites corrections d'erreurs et les mises à jour fonctionnelles soient installées de façon entièrement automatique. Les changements de version majeurs, susceptibles d'apporter des modifications importantes, nécessitent toujours une confirmation manuelle.`,"objects-export":`Les objets peuvent être exportés dans un fichier JSON puis réimportés, par exemple pour transférer une configuration vers une autre installation.`},it:{"expert-mode":`Il simbolo della testa <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modalità esperto' /> nella barra degli strumenti attiva la modalità esperto. Mostra gli oggetti di sistema, impostazioni aggiuntive di un'istanza e le opzioni esperto di molte finestre.`,"gui-settings":`Normalmente admin conserva le proprie impostazioni, come le colonne scelte o le cartelle aperte, nel browser. Nelle impostazioni di sistema è possibile salvarle in ioBroker, così ogni browser e ogni dispositivo mostra le stesse.`,"object-columns":`Nell'elenco degli oggetti, "Configura" disattiva la scelta automatica delle colonne, così si possono scegliere da soli. La larghezza si cambia trascinando il separatore nell'intestazione e un doppio clic su di esso ripristina l'intero layout.`,"object-keyboard":`Nell'elenco degli oggetti i tasti freccia spostano la selezione, mentre le frecce sinistra e destra chiudono e aprono una cartella.`,"object-url":`Se il valore di uno stato è un collegamento, Ctrl e un clic sul valore lo aprono in una nuova scheda.`,"states-view":`La vista degli stati dell'elenco oggetti sostituisce tipo, ruolo, stanza e funzione con le colonne modificato da, qualità, marca temporale e ultima modifica.`,"custom-settings":`L'ingranaggio accanto a uno stato apre le sue impostazioni personalizzate. Lì ogni adattatore che le supporta aggiunge le proprie opzioni specifiche; gli adattatori di registrazione History, SQL o InfluxDB sono solo l'esempio più noto.`,alias:`Da qualsiasi stato si può creare un alias. Gli assegna un altro nome, un altro ruolo o una diversa scala, senza modificare nulla nell'adattatore.`,"log-level":`Il livello di log di una singola istanza può essere modificato mentre è in funzione. Dopo un riavvio del controller torna valido il livello salvato.`,discovery:`Il rilevamento dispositivi cerca nella rete dispositivi e servizi e propone gli adattatori adatti. A tal fine deve essere installato l'adattatore Discovery.`,"auto-upgrade":`Gli adattatori possono essere configurati in modo che le piccole correzioni di errori e gli aggiornamenti funzionali vengano installati in modo completamente automatico. I salti di versione più importanti, con possibili modifiche rilevanti, richiedono ancora una conferma manuale.`,"objects-export":`Gli oggetti possono essere esportati in un file JSON e importati di nuovo, ad esempio per portare una configurazione su un'altra installazione.`},es:{"expert-mode":`El símbolo de la cabeza <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Modo experto' /> en la barra de herramientas activa el modo experto. Muestra los objetos del sistema, ajustes adicionales de una instancia y las opciones de experto de muchos diálogos.`,"gui-settings":`Normalmente admin guarda sus propios ajustes, como las columnas elegidas o las carpetas abiertas, en el navegador. En los ajustes del sistema puedes guardarlos en ioBroker, y así todos los navegadores y dispositivos muestran lo mismo.`,"object-columns":`En la lista de objetos, "Configurar" desactiva la selección automática de columnas para poder elegirlas uno mismo. El ancho se cambia arrastrando el separador de la cabecera, y un doble clic sobre él restablece toda la disposición.`,"object-keyboard":`En la lista de objetos las teclas de flecha mueven la selección, y las flechas izquierda y derecha cierran y abren una carpeta.`,"object-url":`Si el valor de un estado es un enlace, Ctrl y un clic sobre el valor lo abren en una pestaña nueva.`,"states-view":`La vista de estados de la lista de objetos sustituye tipo, rol, habitación y función por las columnas cambiado desde, calidad, marca de tiempo y último cambio.`,"custom-settings":`El engranaje junto a un estado abre sus ajustes personalizados. Ahí cada adaptador que los admite añade sus propias opciones específicas; los adaptadores de registro History, SQL o InfluxDB son solo el ejemplo más conocido.`,alias:`A partir de cualquier estado se puede crear un alias. Le da otro nombre, otro rol u otra escala, sin cambiar nada en el adaptador.`,"log-level":`El nivel de registro de una instancia se puede cambiar mientras está en marcha. Tras reiniciar el controlador vuelve a aplicarse el nivel guardado.`,discovery:`La detección de dispositivos busca en la red dispositivos y servicios y propone los adaptadores adecuados. Para ello es necesario tener instalado el adaptador Discovery.`,"auto-upgrade":`Los adaptadores se pueden configurar para que las pequeñas correcciones de errores y las actualizaciones de funciones se instalen de forma totalmente automática. Los saltos de versión mayores, con posibles cambios importantes, siguen requiriendo una confirmación manual.`,"objects-export":`Los objetos se pueden exportar a un archivo JSON e importar de nuevo, por ejemplo para llevar una configuración a otra instalación.`},pl:{"expert-mode":`Symbol głowy <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Tryb eksperta' /> na pasku narzędzi włącza tryb eksperta. Pokazuje obiekty systemowe, dodatkowe ustawienia instancji oraz opcje eksperckie wielu okien dialogowych.`,"gui-settings":`Admin zwykle przechowuje własne ustawienia, na przykład wybrane kolumny albo otwarte foldery, w przeglądarce. W ustawieniach systemowych można zapisywać je w ioBrokerze, wtedy każda przeglądarka i każde urządzenie pokazuje to samo.`,"object-columns":`Na liście obiektów opcja „Konfiguruj” wyłącza automatyczny dobór kolumn, dzięki czemu można wybrać je samodzielnie. Szerokość zmienia się przeciągając separator w nagłówku, a dwuklik na nim przywraca cały układ.`,"object-keyboard":`Na liście obiektów klawisze strzałek przesuwają zaznaczenie, a strzałki w lewo i w prawo zamykają i otwierają folder.`,"object-url":`Jeśli wartość stanu jest odnośnikiem, Ctrl i kliknięcie w wartość otwierają go w nowej karcie.`,"states-view":`Widok stanów na liście obiektów zastępuje typ, rolę, pomieszczenie i funkcję kolumnami zmienione przez, jakość, znacznik czasu i ostatnia zmiana.`,"custom-settings":`Koło zębate obok stanu otwiera jego ustawienia niestandardowe. Tam każdy adapter, który je obsługuje, dodaje własne opcje; adaptery zapisu, takie jak History, SQL czy InfluxDB, to tylko najbardziej znany przykład.`,alias:`Z każdego stanu można utworzyć alias. Nadaje on stanowi inną nazwę, inną rolę lub inne skalowanie, bez zmieniania czegokolwiek w adapterze.`,"log-level":`Poziom logowania pojedynczej instancji można zmienić w trakcie jej działania. Po ponownym uruchomieniu kontrolera obowiązuje znowu zapisany poziom.`,discovery:`Wykrywanie urządzeń przeszukuje sieć w poszukiwaniu urządzeń i usług i proponuje pasujące adaptery. Wymaga to zainstalowanego adaptera Discovery.`,"auto-upgrade":`Adaptery można skonfigurować tak, aby drobne poprawki błędów i aktualizacje funkcji były instalowane w pełni automatycznie. Większe skoki wersji, które mogą wprowadzać istotne zmiany, nadal wymagają ręcznego potwierdzenia.`,"objects-export":`Obiekty można wyeksportować do pliku JSON i ponownie zaimportować, na przykład aby przenieść konfigurację na inną instalację.`},uk:{"expert-mode":`Символ голови <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='Режим експерта' /> на панелі інструментів вмикає режим експерта. У ньому видно системні об'єкти, додаткові налаштування екземпляра та експертні параметри багатьох діалогів.`,"gui-settings":`Зазвичай admin зберігає власні налаштування, наприклад вибрані стовпці чи відкриті теки, у браузері. У системних налаштуваннях їх можна зберігати в ioBroker, тоді в усіх браузерах і на всіх пристроях буде однаково.`,"object-columns":`У списку об'єктів пункт «Налаштувати» вимикає автоматичний вибір стовпців, і стовпці можна вибрати самому. Ширину змінюють перетягуванням роздільника в заголовку, подвійне клацання на ньому повертає початкове розташування.`,"object-keyboard":`У списку об'єктів стрілки переміщують виділення, а стрілки ліворуч і праворуч закривають і відкривають теку.`,"object-url":`Якщо значення стану є посиланням, Ctrl і клацання на значенні відкриють його в новій вкладці.`,"states-view":`Режим перегляду станів у списку об'єктів замінює тип, роль, кімнату та функцію стовпцями «Змінено з», якість, часова позначка та остання зміна.`,"custom-settings":`Шестірня поруч зі станом відкриває його користувацькі налаштування. Там свої параметри додає кожен адаптер, який їх підтримує; адаптери запису, такі як History, SQL або InfluxDB, — лише найвідоміший приклад.`,alias:`З будь-якого стану можна створити аліас. Він дає стану іншу назву, іншу роль або інше масштабування, нічого не змінюючи в самому адаптері.`,"log-level":`Рівень журналювання окремого екземпляра можна змінити під час роботи. Після перезапуску контролера знову діє збережений рівень.`,discovery:`Пошук пристроїв переглядає мережу на наявність пристроїв і служб та пропонує відповідні адаптери. Для цього має бути встановлений адаптер Discovery.`,"auto-upgrade":`Адаптери можна налаштувати так, щоб невеликі виправлення помилок і оновлення функцій встановлювалися повністю автоматично. Більші зміни версій із можливими суттєвими змінами й надалі потребують ручного підтвердження.`,"objects-export":`Об'єкти можна експортувати у файл JSON і знову імпортувати, наприклад щоб перенести конфігурацію на іншу інсталяцію.`},"zh-cn":{"expert-mode":`工具栏中的头部图标 <img src='data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDg2IDQ4NiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDogMjJweDsgaGVpZ2h0OiAyMnB4OyI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtNDE0LjkyODI5NywxNDkuNzE1MTY1IGMtMi42MzkzNzYsLTU3LjIyMjU1NSAtMzUuNjY5NDQ2LC0xMDYuNTA1MzQ1IC04My4zNDU4OTQsLTEzMi4wMzkxNTEgYy0zLjc1ODk0OCwtMi4wNDk4NDIgLTcuNjM2ODg1LC0zLjkzMjAyMiAtMTEuNTkwNTQyLC01LjY0MTEyNSBjLTE5LjMwMzE0NiwtOC4zOTQwODMgLTQwLjYwNzQ1OSwtMTMuMDUwODUzIC02My4wMDQzMDMsLTEzLjA1MDg1MyBjLTg0LjExMzkwOSwwIC0xNTIuNzkxNzkwLDY1LjcwMzE3NCAtMTU3LjcxODk4OCwxNDguNjA1NTY2IGwwLjA0MzI2OCwtMC4wMTA4MTYgdjAuMjgxMjQ1IGMwLDMuMDYxMjQzIC0wLjE0NjAzMSwxNi43NTAzMDYgLTAuMTQ2MDMxLDE2Ljc1MDMwNiBsLTIuMzUyNzIzLDUuMjI0NjY4IGgxNS43NDQzMTUgYzUuOTE2OTY0LC0xOS4zODQyNzUgMjQuMDc4OTA0LC0zMi42MzUyNDUgNDUuNTEzMDI0LC0zMi42MzUyNDUgYzI2LjIzMTUxMCwwIDQ3LjU3MzY4NCwyMS45MTU0ODEgNDcuNTczNjg0LDQ4LjE0Njk5MSBjMCwyNi4yMjYxMDMgLTIxLjM0MjE3NCw0Ny4xNDY0MDkgLTQ3LjU3MzY4NCw0Ny4xNDY0MDkgYy0yNS4xMTE5MzksMCAtNDUuNzM0Nzc0LC0xOS43MzU4MzEgLTQ3LjQ0Mzg3OSwtNDQuNjU4NDcxIGgtMTguNzg5MzM0IGMtMC40MDAyMzIsMCAtMC43Nzg4MzIsMC42MzgyMDkgLTEuMTYyODM5LDAuNTg0MTIyIGwtMTkuNzYyODc1LDU1LjE5OTc1MyBjLTIuNzc0NTkwLDcuNjk2Mzc5IDIuOTI2MDMwLDE2LjIxNDg2MCAxMS4xMDM3NzEsMTYuMjE0ODYwIGgxNy4wMjA3MzUgbC0wLjEyOTgwNSw4Ny44OTk4OTkgYzAsMTcuMzU2MDY2IDE0LjA3MzA3MSwzMS4xNzQ5MzUgMzEuNDI5MTM2LDMxLjE3NDkzNSBoNTYuMjA1NzQ1IHY4Mi42NDgxODkgYzAsMTIuODc3Nzc4IDEyLjkzNzI3MywyMi41ODA3MzQgMjUuODE1MDUxLDIyLjU4MDczNCBoMTQ0LjU5NzgyNSBjMTIuODc3Nzc4LDAgMjMuNDI5ODc3LC05LjcwMjk1NSAyMy40Mjk4NzcsLTIyLjU4MDczNCB2LTE2Ni4wMzczNTIgYzAsLTIyLjY0NTYzNiA1Ljk3NjQ1NywtNDQuNzYxMjM0IDE2LjU2MTAwOCwtNjQuNzg5MTI4IGMxMS4wNTUwOTMsLTIwLjkyNTcxNCAxNy41MjM3MzEsLTQ0LjYyMDYxMSAxOC4xMjk0ODksLTY5Ljc5MjA0NSBjMC4wMjcwNDIsLTEuMjYwMTkzIDAuMDM3ODU4LC0yLjU1MjgzOSAwLjAzNzg1OCwtMy44NDU0ODUgYzAsLTIuNDY2MzAyIC0wLjA3MDMxMCwtNC45MzgwMTQgLTAuMTgzODkwLC03LjM3NzI3MyB6bS0xNTUuMzkzMzA4LC0xMS43MzExNjUgaC0xMy40NTY0OTQgdjEzLjU1OTI1NyBjMCw0LjczMjQ4OSAtNC4yNjczNTIsOC41NjcxNTcgLTguOTk5ODQyLDguNTY3MTU3IGMtNC43MjcwNzksMCAtOC45OTk4NDIsLTMuODM0NjY3IC04Ljk5OTg0MiwtOC41NjcxNTcgdi0xMy41NTkyNTcgaC0xMi4xODU0ODMgYy00LjczMjQ4OSwwIC04LjU2NzE1NywtNC4yNjczNTIgLTguNTY3MTU3LC04Ljk5OTg0MiBjMCwtNC43MjcwNzkgMy44MzQ2NjcsLTguOTk5ODQyIDguNTY3MTU3LC04Ljk5OTg0MiBoMTIuMTg1NDgzIHYtMTIuMDc3MzExIGMwLC00LjczMjQ4OSA0LjI3Mjc2MiwtOC41NjcxNTcgOC45OTk4NDIsLTguNTY3MTU3IGM0LjczMjQ4OSwwIDguOTk5ODQyLDMuODM0NjY3IDguOTk5ODQyLDguNTY3MTU3IHYxMi4wNzczMTEgaDEzLjQ1NjQ5NCBjNC43MjcwNzksMCA4LjU2NzE1Nyw0LjI3Mjc2MiA4LjU2NzE1Nyw4Ljk5OTg0MiBjMCw0LjczMjQ4OSAtMy44NDAwNzcsOC45OTk4NDIgLTguNTY3MTU3LDguOTk5ODQyIHptMCwwIj48L3BhdGg+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJtMTg3LjY5NTMxMiAyODUuODc1YzMuOTM3NS0zLjk4MDQ2OSA2LjQxNDA2My05LjQ0OTIxOSA2LjQxNDA2My0xNS41MjM0MzggMC0xMi4xMjg5MDYtOS44NTU0NjktMjEuOTgwNDY4LTIxLjk4NDM3NS0yMS45ODA0NjgtNi4wMDc4MTIgMC0xMS40NzI2NTYgMi40MTAxNTYtMTUuNDU3MDMxIDYuMzQ3NjU2LTQuMDIzNDM4IDQuMDAzOTA2LTYuNTIzNDM4IDkuNTM5MDYyLTYuNTIzNDM4IDE1LjYzNjcxOSAwIDEyLjEyNSA5Ljg1NTQ2OSAyMS45ODA0NjkgMjEuOTgwNDY5IDIxLjk4MDQ2OSA2LjA3ODEyNSAwIDExLjU4NTkzOC0yLjQ3NjU2MyAxNS41NzAzMTItNi40NjA5Mzh6bTAgMCI+PC9wYXRoPjwvc3ZnPg==' class='icon' alt='专家模式' />可以打开专家模式。专家模式会显示系统对象、实例的附加设置以及许多对话框中的专家选项。`,"gui-settings":`admin 通常把自己的设置保存在浏览器里,例如所选的列或展开的文件夹。在系统设置中可以改为保存到 ioBroker,这样每个浏览器和每台设备看到的内容都一致。`,"object-columns":`在对象列表中,“配置”可以关闭自动选择列的功能,这样就能自己挑选要显示的列。拖动表头中的分隔线可以调整列宽,双击分隔线会恢复整个布局。`,"object-keyboard":`在对象列表中,方向键可以移动选中项,左右方向键则用来折叠和展开文件夹。`,"object-url":`如果某个状态的值是一个链接,按住 Ctrl 并点击该值,就会在新标签页中打开它。`,"states-view":`对象列表的状态视图会把类型、角色、房间和功能这几列,换成来源、质量、时间戳和最后更改。`,"custom-settings":`状态旁边的齿轮可以打开它的自定义设置。每个支持自定义设置的适配器都会在那里添加自己的专属选项,History、SQL 或 InfluxDB 等记录适配器只是其中最常见的例子。`,alias:`任何状态都可以创建别名。别名能给状态换一个名称、角色或数值换算,而不必改动适配器本身。`,"log-level":`单个实例的日志级别可以在运行中修改。控制器重启后,会重新使用已保存的级别。`,discovery:`设备发现会在网络中搜索设备和服务,并推荐与之匹配的适配器。这需要先安装 Discovery 适配器。`,"auto-upgrade":`可以配置适配器,让较小的错误修复和功能更新完全自动安装。较大的版本跨越可能包含重大变更,仍然需要手动确认。`,"objects-export":`对象可以导出为 JSON 文件,之后再导入回来,例如把一份配置迁移到另一套安装环境。`}},$v=Object.keys(Zv);function ey(e,t){return e?/^\d+$/.test(e)?`${e}px`:e:t}function ty(e){let t={},n=/([a-zA-Z][\w-]*)\s*=\s*(?:'([^']*)'|"([^"]*)")/g,r;for(;(r=n.exec(e))!==null;)t[r[1].toLowerCase()]=r[2]??r[3];return t}function ny(e,t,n){var r;let i=ty(e);if(!i.src)return null;let a=i.src.replace(/^data:image\/svg;/,`data:image/svg+xml;`);if((r=i.class)!=null&&r.split(` `).includes(`icon`)){let e=`url("${a}")`;return T(F,{component:`span`,title:i.alt||n,sx:{display:`inline-block`,verticalAlign:`text-bottom`,mx:`2px`,width:ey(i.width,`1.25em`),height:ey(i.height||i.width,`1.25em`),backgroundColor:`currentColor`,maskImage:e,maskSize:`contain`,maskPosition:`center`,maskRepeat:`no-repeat`,WebkitMaskImage:e,WebkitMaskSize:`contain`,WebkitMaskPosition:`center`,WebkitMaskRepeat:`no-repeat`}},t)}return T(F,{component:`img`,src:a,alt:i.alt||n,sx:{verticalAlign:`text-bottom`,mx:`2px`,maxWidth:`100%`,width:ey(i.width,`auto`),height:ey(i.height,`auto`)}},t)}function ry(e,t){var n;let r=((n=Qv[t])==null?void 0:n[e])||Qv.en[e]||e;if(!r.includes(`<img`))return r;let i=[],a=/<img\s[^>]*>/g,o=0,s;for(;(s=a.exec(r))!==null;){let t=ny(s[0],`${e}-${s.index}`,e);t&&(s.index>o&&i.push(r.substring(o,s.index)),i.push(t),o=s.index+s[0].length)}if(!i.length)return r;let c=r.substring(o);return c&&i.push(c),T(`span`,{children:i})}var iy=class extends $t{constructor(e){super(e);let t=e.lastTipId?$v.indexOf(e.lastTipId):-1;this.state={index:$v.length?(t+1)%$v.length:0,dontShowAgain:!1}}move(e){this.setState({index:(this.state.index+e+$v.length)%$v.length})}render(){let e=$v[this.state.index];return e?M(u,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.props.onClose(this.state.dontShowAgain,e),"aria-labelledby":`tips-dialog-title`,children:[T(ve,{id:`tips-dialog-title`,children:M(F,{component:`span`,sx:{display:`flex`,alignItems:`center`,gap:1},children:[T(f,{color:`primary`}),this.props.t(`Did you know?`)]})}),M(le,{children:[T(fe,{id:`tips-dialog-text`,sx:{minHeight:90},children:ry(e,this.props.lang)}),T(je,{control:T(ke,{checked:this.state.dontShowAgain,onChange:e=>this.setState({dontShowAgain:e.target.checked})}),label:this.props.t(`Do not show these tips at start`)})]}),M(St,{children:[T(F,{component:`span`,sx:{flexGrow:1,opacity:.7,ml:1},children:`${this.state.index+1} / ${$v.length}`}),T(V,{id:`tips-dialog-previous`,variant:`outlined`,color:`grey`,disabled:$v.length<2,onClick:()=>this.move(-1),startIcon:T(Fr,{}),children:this.props.t(`Previous`)}),T(V,{id:`tips-dialog-next`,variant:`outlined`,color:`grey`,disabled:$v.length<2,onClick:()=>this.move(1),startIcon:T(en,{}),children:this.props.t(`Next`)}),T(V,{id:`tips-dialog-ok`,variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.onClose(this.state.dontShowAgain,e),startIcon:T(Ne,{}),children:this.props.t(`Ok`)})]})]}):null}},ay={" for %s":` for %s`,"%s active / %s inactive":`%s active / %s inactive`,"%s added to %s":`%s added to %s`,"%s days":`%s days`,"%s days ago":`%s days ago`,"%s devices":`%s device(s)`,"%s hours":`%s hours`,"%s hours ago":`%s hours ago`,"%s instances":`%s instances`,"%s members":`%s members`,"%s minutes ago":`%s minutes ago`,"%s object(s) processed":`%s objects were processed`,"%s objects are in a room":`%s objects are in a room`,"%s objects have a function":`%s objects have a function`,"%s processes":`%s processes`,"%s selected":`%s selected`,"%s states":`%s states`,"%s tool call(s)":`%s tool call(s)`,"%s updates":`%s updates`,"%s was imported":`%s was imported successfully`,"%s was successfully updated to %s":`%s was successfully updated to %s`,"(This can be disabled later in settings)":`(This can be disabled later in settings)`,"(manual reinstallation, if somehow nothing works after the update)":`(manual reinstallation, if somehow nothing works after the update)`,"(without prefix)":`(without prefix)`,"0 %d days ago":`today`,"0 - no expiration":`0 - no expiration`,"1 %d days ago":`%d days ago`,"1 hour":`1 hour`,"1 update":`1 update`,"1. Install the MCP server":`1. Install the MCP server`,"1: Logic adapters":`1: Logic adapters`,"2 %d days ago":`%d days ago`,"2. Add the MCP server in your AI client":`2. Add the MCP server in your AI client`,"2: Data provider adapters":`2: Data provider adapters`,"3. Assistant system prompt":`3. Assistant system prompt`,"3: Other adapters":`3: Other adapters`,"5 %d days ago":`%d days ago`,"<p>You have not installed an Info Adapter. The adapter shows you information about the system and is required to display important messages from the ioBroker team.</p><p>Do you want to install the info adapter?</p>":`<p>The Info adapter ist not installed on your system. This adapter provides information about your system and is required to display important messages from the NexoWatt EOS team.</p><p>Do you want to install the Info adapter?</p>`,"<p>Your version of the info adapter is outdated. It is strongly recommended to update this to get on the enjoyment of the innovations. Only with the new version, for example, messages from the ioBroker team can be displayed directly.</p><p>Would you like to update the info adapter?</p>":`<p>Your version of the Info adapter is outdated. It is strongly recommended to update in order to receive all relevant messages for your system.</p><p>Would you like to update the Info adapter now?</p>`,"A credential with this name already exists":`A credential with this name already exists`,"A longer answer is cut off when the limit is reached.":`A longer answer is cut off when the limit is reached.`,'A manual installation usually takes place under root as user and therefore a "sudo" is necessary before the commands.':`A manual installation usually takes place under root as user and therefore a "sudo" is necessary before the commands.`,"A unique name is required":`A unique name is required`,AI:`AI`,"AI assistant":`AI assistant`,"AI assistant settings":`AI assistant settings`,"API key":`API key`,"API key (credential)":`API key (credential)`,"Absolute path to backup directory or empty to backup in data directory. Leave it empty for default storage place.":`Absolute path to backup directory or empty to backup in data directory. Leave it empty for default storage place.`,Accept:`Accept`,"Accept suggestions":`Accept suggestions`,"Access Key ID":`Access Key ID`,"Access control":`Access control`,"Access control list":`Access control list`,"Access control list: %s":`Access control list: %s`,Acknowledge:`Acknowledge`,"Acknowledge & close":`Acknowledge & close`,Acknowledged:`Acknowledged`,"Acknowledged explanation":`If you want to control a device do not use 'Acknowledged'`,Actions:`Actions`,'Activate the check of password in admin if you plan to access your ioBroker is not in "Demilitarized Zone"':`You should enable this option if you plan to allow access to NexoWatt EOS from the internet or by untrusted users.`,"Activated. Click to stop.":`Activated. Click to stop.`,Active:`Active`,"Active instances":`Active instances`,'Active repo is "%s"':`Warning: Current repository is "%s". Use at your own risk!`,"Active repository:":`Active repository`,"Adapter cannot request the exactly device status and the status will be guessed on the last sent command":`Adapter cannot request the exactly device status and the status will be guessed on the last sent command`,"Adapter configuration":`Adapter configuration`,"Adapter does not use the cloud for these devices/service":`Adapter does not use the cloud for these devices/service`,"Adapter requires the specific cloud access for these devices/service":`Adapter requires the specific cloud access for these devices/service`,"Adapter settings for %s states":`Adapter settings for %s states`,"Adapter warnings":`Adapter warnings`,Adapters:`Adapters`,"Adapters from this Group installed":`Adapters from this group installed`,Add:`Add`,'Add %s objects from "%s" to "%s"?':`Add %s objects from "%s" to "%s"?`,"Add Objecttree from JSON File":`Add objects tree from JSON file`,"Add Single-Sign On":`Add Single-Sign On`,"Add certificate from file":`Add certificate from file`,"Add child":`Add sub-category`,"Add color":`Add color`,"Add compact group":`Add compact group`,"Add credential":`Add credential`,"Add enum":`Add new category`,"Add group":`Add new category item`,"Add icon":`Add icon`,"Add instance":`Add instance`,"Add instance...":`Adding instance...`,"Add member":`Add member`,"Add new child object to selected parent":`Add new child object to selected parent`,"Add new field":`Add new attribute`,"Add new issue":`Report a bug`,"Add new line to the repository list":`Add new line to the repository list`,"Add new object:":`Add new object:`,"Add new object: %s":`Add new object: %s`,"Add objects":`Add objects`,'Add objects to "%s"':`Add objects to "%s"`,Address:`Address`,"Address:":`Address`,"Admin is not enabled in cloud settings!":`Admin is not enabled in cloud settings!`,Administrator:`Administrator`,"Administrator name":`Administrator name`,"Administrator name cannot be changed":`Administrator name cannot be changed`,"Administrator password":`Administrator password`,Afghanistan:`Afghanistan`,Agree:`Agree`,Albania:`Albania`,Algeria:`Algeria`,Alias:`Alias`,"Alias ID":`Alias ID`,"Alias description":`Alias description`,"Alias name":`Alias name`,"Alias read":`Readable`,"Alias state":`Alias state ID`,"Alias units":`Alias units`,"Alias write":`Writable`,All:`All`,"All addresses":`All addresses`,"All backups older than these hours will be deleted, but only if the number of files is greater than of the files number":`All backups older than these hours will be deleted, but only if the number of files is greater than of the files number`,"All instances":`All instances`,"All items are filtered out":`All items are filtered out`,"All objects":`All objects`,All_group:`All`,"Allow actions (write/install)":`Allow actions (write/install)`,"Allow automatic adapter upgrades for this repository":`Allow automatic adapter upgrades for this repository`,'Allow execution of sendToHost("shell", "cli command")':`Allow execution of sendToHost("shell", "cli command")`,"Allow only the following upgrades to be performed automatically:":`Allow only the following upgrades to be performed automatically:`,"Allow self-signed certificates":`Allow self-signed certificates`,"Allow shell's commands":`Allow shell's commands`,"Allow slave connections":`Allow slave connections`,"Already exists":`Already exists`,"Always first":`Always first`,"Always read files from disk and do not cache them in RAM. Used for debugging.":`Always read files from disk and do not cache them in RAM. Used for debugging.`,"American Samoa":`American Samoa`,"An object representing the username and password for HTTP Basic Auth":`An object representing the username and password for HTTP Basic Auth`,Andorra:`Andorra`,Angola:`Angola`,Anguilla:`Anguilla`,Antarctica:`Antarctica`,"Antigua and Barbuda":`Antigua and Barbuda`,"Application name":`Application name`,Apply:`Apply`,Approved:`Approved`,Apr:`Apr`,April:`April`,Architecture:`Architecture`,"Are you sure to delete %s?":`Are you sure to delete <b>"%s"</b>?`,'Are you sure to delete <span style="color: red">all</span> children of %s?':`Are you sure to delete <span style="color: red">all</span> children of <b>%s</b>?`,"Are you sure to delete all children of %s?":`Are you sure to delete <b>"%s"</b> and <span style="color: red; font-weight: bold">all</span> children?`,"Are you sure to delete script %s?":`Are you sure to delete script '%s'?`,"Are you sure you want to delete adapter %s?":`Are you sure you want to delete adapter %s?`,'Are you sure you want to delete the instance "%s" or whole adapter "%s"?':`Are you sure you want to delete the instance "%s" or whole adapter "%s"?`,"Are you sure you want to delete the instance %s?":`Are you sure you want to delete the instance "%s"?`,"Are you sure you want to delete the instance <b>%s</b>?":`Are you sure you want to delete the instance <b>%s</b>?`,"Are you sure?":`Are you sure?`,"Are you sure? Changes are not saved.":`Are you sure? Changes are not saved.`,Argentina:`Argentina`,Armenia:`Armenia`,Aruba:`Aruba`,Ascending:`Ascending`,'Ask me about your ioBroker system, e.g. "Which lights do I have in the living room?" or "Which adapter do I need for my Philips Hue?"':`Ask me about your NexoWatt EOS system, e.g. "Which lights do I have in the living room?" or "Which adapter do I need for my Philips Hue?"`,"Ask password by connection establishment":`Ask password by connection establishment`,"Ask the assistant…":`Ask the assistant…`,"Assign devices":`Assign devices`,"Assigned via single states":`Assigned via single states`,"Assigned via the device":`Assigned via the device`,Assignment:`Assignment`,Assistant:`Assistant`,Attach:`Attach`,"Attach host":`Attach host`,Aug:`Aug`,August:`August`,Australia:`Australia`,Austria:`Austria`,Auth:`Auth`,Authentication:`Authentication`,"Authentication in Admin":`Require authentication to access Admin UI`,"Authentication required.":`Authentication required or login, password are invalid`,"Authentication was deactivated":`Authentication was deactivated`,"Auto upgrade policy for %s":`Auto upgrade policy for %s`,"Auto-Upgrade":`Auto-Upgrade`,"Auto-compress size factor":`Auto-compress size factor`,"Auto-compress size factor minimum size":`Auto-compress size factor minimum size`,"Automatic Upgrade Policy":`Automatic Upgrade Policy`,Available:`Available`,"Available version:":`Available version:`,Azerbaijan:`Azerbaijan`,Back:`Back`,"Backend time differs by %s minutes":`The time of the NexoWatt EOS server and that of the browser differ by %s minutes. Check the host settings.`,Background:`Background`,"Background color of the login screen":`Background color of the login screen`,"Background image":`Background image`,"Backup hours":`Backup hours`,Badges:`Badges`,Bahamas:`Bahamas`,Bahrain:`Bahrain`,Bangladesh:`Bangladesh`,Barbados:`Barbados`,"Base URL":`Base URL`,"Base settings":`Base settings`,"Be aware!":`Be aware!`,"Beautify JSON output":`Beautify JSON output to a human readable form`,Belarus:`Belarus`,Belgium:`Belgium`,Belize:`Belize`,Benin:`Benin`,Bermuda:`Bermuda`,Bhutan:`Bhutan`,"Bind IP address":`Bind IP address`,Bolivia:`Bolivia`,"Bookmark admin":`Bookmark admin page`,"Bosnia and Herzegovina":`Bosnia and Herzegovina`,Botswana:`Botswana`,"Bouvet Island":`Bouvet Island`,Brazil:`Brazil`,"British Indian Ocean Territory":`British Indian Ocean Territory`,"Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.":`Browsers will inform you about the problem with self-signed certificates, but the communication is encrypted.`,"Brunei Darussalam":`Brunei Darussalam`,Bulgaria:`Bulgaria`,"Burkina Faso":`Burkina Faso`,Burundi:`Burundi`,"But you can open this link in new tab:":`But you can open this link in new tab:`,"By default the backup is every 2 hours. Time is in minutes. To disable backup set the value to 0":`By default the backup is every 2 hours. Time is in minutes. To disable backup set the value to 0`,"By every write the backup of object.json will be created.":`By every write the backup of object.json will be created.`,'Copy · stays in "%s" too':`Copy · stays in "%s" too`,"CPU (%)":`CPU (%)`,"CPU and RAM of this host are not recorded by %s yet":`CPU and RAM of this host are not recorded by %s yet`,CPUs:`CPUs`,Calendar:`Calendar`,Cambodia:`Cambodia`,Cameroon:`Cameroon`,Canada:`Canada`,Cancel:`Cancel`,"Cannot create credential: %s":`Cannot create credential: %s`,"Cannot create instance":`Cannot create instance`,"Cannot create user: ":`Cannot create user: `,"Cannot delete user: ":`Cannot delete user: `,"Cannot disable admin!":`Cannot disable admin!`,"Cannot enable authentication as no certificates found!":`Cannot enable authentication as no certificates found!`,"Cannot install":`Cannot install`,"Cannot parse JSON!":`Cannot parse JSON!`,"Cannot parse code!":`Cannot parse code!`,"Cannot read certificates: %s":`Cannot read certificates: %s`,"Cannot read file!":`Cannot read file!`,"Cannot read version from NPM":`Could not read version from NPM`,"Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"Cannot search for hosts":`Cannot search for hosts`,"Cannot set password: ":`Cannot set password: `,"Cannot update licenses: %s":`Cannot update licenses: %s`,"Cape Verde":`Cape Verde`,Categories:`Categories`,"Categorize objects into rooms/functions":`Categorize objects into rooms/functions`,Category:`Category`,"Cayman Islands":`Cayman Islands`,"Central African Republic":`Central African Republic`,Certificate:`Certificate`,Certificates:`Certificates`,Chad:`Chad`,Change:`Change`,"Change current host":`Change current host`,"Change log":`Change log`,"Change view mode":`Change view mode`,Changelog:`Change log`,Channel:`Channel`,Chart:`Chart`,"Chart for %s":`Chart for %s`,Check:`Check`,"Check adapter for updates":`Check adapters for updates`,"Check all":`Check all`,"Check disk space interval":`Check disk space interval`,Chile:`Chile`,China:`China`,"Christmas Island":`Christmas Island`,City:`City`,"City:":`City`,Clear:`Clear`,"Clear field":`Clear field`,"Clear list":`Clear list`,"Clear log":`Clear log`,"Clear on disk permanent":`Clear on disk permanent`,"Clear selection":`Clear selection`,"Clear text":`Clear text`,"Click do activate events again, or just wait one minute":`Click do activate events again, or just wait one minute`,"Click for more":`Click for more`,"Click on icon":`Click on icon to open a link`,"Click to clear all filters":`Click to clear all filters`,"Click to copy %s":`Click to copy %s`,Clone:`Clone`,Close:`close`,"Close on finished":`Close on finished`,"Cocos (Keeling) Islands":`Cocos Islands`,"Cocos Islands":`Cocos Islands`,"Collapse all":`Collapse all`,"Collapse all nodes":`Collapse all nodes`,Colombia:`Colombia`,Color:`Color`,Command:`Command`,"Comment to version":`Comment to version`,Comments:`Comments`,Comoros:`Comoros`,"Compact mode":`Compact mode`,"Configuration not saved.":`Configuration not saved.`,Confirm:`Confirm`,Congo:`Congo`,"Congo, The Democratic Republic of the":`Democratic Republic of the Congo`,"Connect timeout":`Connect timeout`,"Connected to device or service":`Connected to device or service`,"Connected to host":`Connected to host`,"Connected:":`Connected:`,"Connection OK: %s models":`Connection OK: %s models`,"Connection password":`Connection password`,"Connection to admin lost. Waiting for reconnection...":`Connection to admin lost. Waiting for reconnection...`,Continue:`Continue`,"Cook Islands":`Cook Islands`,Copied:`Copied`,Copy:`Copy to clipboard`,"Copy content":`Copy content`,"Copy into clipboard":`Copy into clipboard`,"Copy log":`Copy log`,"Copy states":`Copy states`,"Copy to clipboard":`Copy to clipboard`,"Costa Rica":`Costa Rica`,"Cote D'Ivoire":`Ivory Coast`,Country:`Country`,"Country:":`Country`,Create:`Create`,"Create a copy":`Create a copy`,"Create a copy of this object":`Create a copy of this object`,"Create alias from this ID":`Create alias from this object`,"Create and continue":`Create and continue`,"Create instance if it does not exist yet":`Create instance if it does not exist yet`,"Create instances":`Create instances`,"Create instances automatically":`Create instances automatically`,"Create instances automatically - Last scan on %s":`Create instances automatically - Last scan on %s`,"Create new alias: %s":`Create new alias: %s`,"Create new category":`Create new category`,"Create new category, like %s":`Create new category, like %s`,"Create new enum":`Create new enum`,"Create new enum, like %s":`Create new enum, like %s`,"Create new function":`Create new function`,"Create new group":`Create new group`,"Create new room":`Create new room`,"Create new user":`Create new user`,"Create rooms":`Create rooms`,"Create state":`Create state`,Created:`Created`,"Created: %s floors, %s rooms, %s functions":`Created: %s floors, %s rooms, %s functions`,"Credential not found":`Credential not found`,"Credential type":`Type`,Credentials:`Credentials`,Croatia:`Croatia`,"Cron expression":`Cron expression`,Cuba:`Cuba`,Currency:`Currency`,"Currency sign":`Currency sign`,"Currency:":`Currency`,Custom:`Custom`,"Custom enum":`Custom enumeration`,"Custom enumeration":`Custom enumeration`,"Custom floor":`Custom floor`,"Custom function":`Custom function`,"Custom room":`Custom room`,"Custom settings":`Custom settings`,Cyprus:`Cyprus`,"Czech Republic":`Czech Republic`,"DB number":`DB number`,"DD.MM.YY":`DD.MM.YY`,"DD.MM.YYYY":`DD.MM.YYYY`,"DD/MM/YYYY":`DD/MM/YYYY`,"Danger zone":`Danger zone`,"Date From":`Date From`,"Date To":`Date To`,"Date format":`Date format`,"Date format:":`Date format`,"Deactivated. Click to start.":`Deactivated. Click to start.`,"Debug info":`Debug info`,"Debug outputs":`Debug outputs`,"Debug outputs:":`Debug outputs`,Dec:`Dec`,December:`December`,Decline:`Decline`,Declined:`Declined`,"Default ACL":`Default ACL`,"Default History":`Default History`,"Default Repository":`Default Repository`,"Default V8 has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max-old-space-size to a maximum of ~1gb (32-bit) and ~1.7gb (64-bit)":`Default V8 engine has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max-old-space-size to a maximum of ~1gb (32-bit) and ~1.7gb (64-bit)`,"Default history instance:":`Default history instance`,"Default log level":`Default log level`,Delete:`Delete`,"Delete adapter":`Delete adapter`,"Delete all custom object settings of this adapter too":`Delete all custom object settings of this adapter too`,"Delete attribute":`Delete attribute`,"Delete category":`Delete category`,"Delete credential":`Delete credential`,"Delete enum":`Delete enum`,"Delete instance":`Delete instance`,"Delete member":`Delete member`,"Delete object":`Delete object`,"Delete object(s)":`Delete object(s)`,"Delete one item":`Delete this object`,"Delete with children":`Delete with child objects (%s objects)`,Denmark:`Denmark`,Descending:`Descending`,Description:`Description`,"Description A-Z":`Title`,"Detected slow connection!":`Detected slow connection!`,"Detected type":`Detected type`,Device:`Device`,"Device discovery":`Device discovery`,"Device or channel":`Device or channel`,Devicemanager:`Config manager`,Devices:`Devices`,"Did you know?":`Did you know?`,"Different IDs for read and write":`Different IDs for read and write`,"Directory path":`Directory path`,"Disable authentication":`Disable authentication`,"Disable/Enable translation":`Disable/Enable translation`,Discard:`Discard`,"Discard unsaved changes?":`Discard unsaved changes?`,"Discard?":`Discard?`,"Disconnect Single-Sign On":`Disconnect Single-Sign On`,Discover:`Discover`,"Discover all possible devices":`Discover all possible devices`,"Discovery devices":`Find devices and services`,"Disk free":`Disk free`,"Disk free:":`Disk free:`,"Disk size":`Disk size`,"Display name":`Display name`,Djibouti:`Djibouti`,"Do not expose iobroker Admin or Web interfaces to the internet directly via the port forwarding!":`Do not expose NexoWatt EOS or Web interfaces to the internet directly via the port forwarding!`,"Do not show these tips at start":`Do not show these tips at start`,"Do not show this dialog in this browser session any more":`Do not show this dialog in this browser session any more`,"Do not show this host again":`Do not show this host again`,'Do you want to delete enum "%s"?':`Do you want to delete enum "%s"?`,"Do you want to delete group %s?":`Do you want to delete group "%s"?`,'Do you want to delete just <span style="color: blue">one object</span> or <span style="color: red">all</span> children of %s too?':`Do you want to delete just <span style="color: blue">one object</span> or <span style="color: red">all</span> children of %s too?`,"Do you want to delete user %s?":`Do you want to delete user "%s"?`,"Do you want to upgrade all adapters?":`Do you want to upgrade all adapters?`,"Dock to the side":`Dock to the side`,"Domains:":`Domains`,Dominica:`Dominica`,"Dominican Republic":`Dominican Republic`,"Don't ask again for such operations":`Don't ask again for such operations`,"Don't install adapters from GitHub unless asked to by a developer or if you are 100 %sure what you are doing! Adapters on GitHub may not work like they should (they are still under development). Only install them if you are participating in a test! Please wait for an official release!":`Don't install adapters from GitHub unless asked by a developer or when you are 100 %sure what you are doing! Adapters on GitHub are still under development and might contain bugs or breaking changes. Only install them if you are participating in a test! Else please wait for an official release of the adapter!`,"Done with error: %s":`Done with error: %s`,Download:`Download`,"Download log":`Download log`,"Drag an object onto another entry in the list to move it there. Hold Shift, Ctrl or Alt to copy it.":`Drag an object onto another entry in the list to move it there. Hold Shift, Ctrl or Alt to copy it.`,"Drag and drop to reorder":`Drag and drop to reorder`,'Drag states, channels or devices from the object list here or use "Add objects"':`Drag states, channels or devices from the object list here or use "Add objects"`,"Drop the files here":`Drop the files here`,"Drop the icons here":`Drop the icons here`,"Due to the different hardware and platforms under which ioBroker runs, the js-controller has to be updated manually. Further details can be found in the appropriate section.":`Due to the different hardware and platforms under which NexoWatt EOS runs, the js-controller has to be updated manually. Further details can be found in the appropriate section.`,ECharts:`ECharts`,EOL:`EOL`,"East Timor":`East Timor`,"Easy Admin":`Easy Admin`,Ecuador:`Ecuador`,Edit:`Edit`,"Edit category":`Edit category`,"Edit compact groups for %s":`Edit compact groups for %s`,"Edit config for %s states":`Edit config for %s states`,"Edit config: %s":`Edit config: %s`,"Edit credential":`Edit credential`,"Edit enum":`Edit enum`,"Edit host settings":`Edit host settings`,"Edit in dialog":`Edit in dialog`,"Edit log level rule for %s":`Edit log level for %s`,"Edit memory limit rule for %s":`Edit memory limit for %s`,"Edit object":`Edit object`,"Edit object:":`Edit object:`,"Edit on github":`Edit on github`,"Edit restart rule for %s":`Edit restart schedule for %s`,"Edit start order (tier)":`Edit start order (tier)`,Egypt:`Egypt`,"El Salvador":`El Salvador`,"Email for account:":`Email for account`,"Emergency Linux / macOS / Windows":`Emergency Linux / macOS / Windows`,"Empty password is not allowed":`Empty password is not allowed`,Enabled:`Enabled`,"Enabled:":`Enabled`,"End date":`End date`,"End of line char":`End of line char`,"End time":`End Time`,"Endpoint default":`Endpoint default`,"Enter version manually":`Enter version manually`,'Entry "%s" already exists':`Entry "%s" already exists`,"Enum parameters":`Enumeration parameters`,Enums:`Enums`,"Equatorial Guinea":`Equatorial Guinea`,Eritrea:`Eritrea`,Error:`Error`,"Estimated size":`Estimated size`,Estonia:`Estonia`,Ethiopia:`Ethiopia`,Event:`Type`,Events:`Events`,"Every day one file":`Every day one file`,"Every floor becomes a room, which contains the rooms of this floor":`Every floor becomes a room, which contains the rooms of this floor`,Everyone:`Everyone`,"Exclude system repositories from export JSON":`Exclude system repositories from export JSON`,"Exclude translations (except english) from export JSON":`Exclude translations (except english) from export JSON`,Execute:`Execute`,Expand:`Expand`,"Expand all":`Expand all`,"Expand all nodes":`Expand all nodes`,"Expert mode":`Expert mode`,Expire:`Expire`,"Export setting to JSON file":`Export setting to JSON file`,"Export the shown entries as a text file":`Export the shown entries as a text file`,Facility:`Facility`,"Failed to open JSON File":`Failed to open JSON file`,"Falkland Islands (Malvinas)":`Falkland Islands (Malvinas)`,"Family number":`Family number`,"Faroe Islands":`Faroe Islands`,Feb:`Feb`,February:`February`,Fiji:`Fiji`,File:`File`,"File extension":`File extension`,"File is too big!":`File is too big!`,"File log":`File log`,"File name":`File name`,"File rights":`File rights`,Files:`Files`,Filter:`Filter`,"Filter adapter with updates":`Filter adapter with updates`,"Filter adapters to see others. There are %s more":`Filter adapters to see others. There are %s more`,"Filter adapters to see others. There is %s more":`Filter adapters to see others. There is %s more`,"Filter by mode":`Filter by mode`,"Filter by name":`Filter by name`,"Filter by status":`Filter by status`,"Filter installed adapters":`Filter installed adapters`,"Filter instances":`Filter instances`,"Filter local connection type":`Filter local connection type`,"Filter menu":`Filter menu`,"Open menu":`Open menu`,"Filter specific compact group":`Filter specific compact group`,"Filter:":`Filter`,"Filtered out":`Everything is filtered out`,"Find coordinates...":`Find coordinates…`,"Find devices and services":`Find devices and services`,Finish:`Finish`,Finland:`Finland`,"First day of week":`First day of week`,"Flag will be automatically detected as repository will be read for the first time":`Flag will be automatically detected as repository will be read for the first time`,"Float divider":`Float divider`,"Float divider sign":`Float divider sign`,"Float divider:":`Float divider`,Floors:`Floors`,Folder:`Folder`,"Following states have history enabled":`Following states have history enabled`,"For an update from js-controller 1.x to 2.x please always read the information at":`For an update from js-controller please always read the information at`,"For future use":`For future use`,"For systems created with the new Linux installer:":`For systems created with the new Linux installer:`,"For systems installed manually under Linux, prefix sudo or run as root.":`For systems installed manually under Linux, prefix sudo or run as root.`,"Force writing after this many changes have been buffered. This reduces memory consumption and data loss in case of a crash":`Force writing after this many changes have been buffered. This reduces memory consumption and data loss in case of a crash`,"Found states with history":`Found states with history`,France:`France`,Free:`Free`,"Free RAM:":`Free:`,"French Guiana":`French Guiana`,"French Polynesia":`French Polynesia`,"French Southern Territories":`French Southern Territories`,Fri:`Fri`,From:`From`,"From file":`From file`,"From github":`From github`,"From npm":`From npm`,Function:`Function`,Functions:`Functions`,Gabon:`Gabon`,Gambia:`Gambia`,"General information for all platforms":`General information for all platforms`,"Generated ID:":`Generated ID`,"Generated: %s":`Generated: %s`,Georgia:`Georgia`,Germany:`Germany`,Ghana:`Ghana`,Gibraltar:`Gibraltar`,"Go to Github...":`Go to Github...`,"Go to admin now":`Go to admin now`,"Go to original":`Go to original`,"Go to the AI settings":`Go to the AI settings`,Greece:`Greece`,Greenland:`Greenland`,Grenada:`Grenada`,Group:`Group`,"Group members":`Group members`,Groups:`Roles`,Guadeloupe:`Guadeloupe`,Guam:`Guam`,Guatemala:`Guatemala`,Guernsey:`Guernsey`,Guinea:`Guinea`,"Guinea-Bissau":`Guinea-Bissau`,Guyana:`Guyana`,"HTTP log":`HTTP log`,Haiti:`Haiti`,"Has no permission to %s %s %s":`Has no permission to %s %s %s`,"Have fun automating your home with":`Have fun automating your home with`,"Heard Island and Mcdonald Islands":`Heard Island and McDonald Islands`,"Heard and Mc Donald Islands":`Heard and Mc Donald Islands`,Heartbeat:`Heartbeat`,"Hide assistant button":`Hide assistant button`,"Hide members":`Hide members`,"Hide object list":`Hide object list`,"Hide password":`Hide password`,High:`High`,"History data":`History data`,"History instance":`History instance`,"History instance not alive":`History instance not alive`,"History instance not selected":`History instance not selected`,"Hits: %s":`Hits: %s`,"Holy See (Vatican City State)":`Vatican City`,Honduras:`Honduras`,"Hong Kong":`Hong Kong`,Host:`Host`,"Host %s is offline":`Host %s is offline`,"Host Base Settings":`Host Base Settings`,"Host does not answer":`Host does not answer`,"Host for this instance":`Host for this instance`,"Host name":`Host name`,"Host selection":`Select station`,"Host to indicate that log messages are coming from (Default: localhost).":`Host to indicate that log messages are coming from (Default: localhost).`,"Host-specific notifications":`Host-specific notifications`,"Host:":`Host`,Hosts:`Hosts`,"Hosts notifications":`Hosts notifications`,"How oft the disk will be checked. Do not set it to low, because it can affect system performance. Value is in ms":`In which interval (in ms) the disk will be checked. Do not set it to low, because it can affect system performance.`,"How oft the instance statistics will be updated. Used RAM, CPU and so on. Value is in ms":`In which interval (in ms) the instance statistics (Used RAM, CPU, ...) will be updated.`,"How often":`How often`,"How often the data from RAM will be saved on disk in ms":`In which interval (in ms) the data from RAM will be saved on disk`,Hungary:`Hungary`,"I agree with the collection of anonymous statistics.":`I agree with the collection of anonymous statistics and automatically reporting crashes.`,ID:`ID`,"ID edit":`Edit ID`,"ID preview":`Preview ID`,"IP is domain or more than one address":`IP is domain or more than one address`,Iceland:`Iceland`,Icon:`Icon`,"Icon upload":`Icon upload`,"If single lines in the DB are corrupted, they can be ignored without losing the whole DB.":`If single lines in the DB are corrupted, they can be ignored without losing the whole DB.`,"If the upgrade command displays Access Rights / Permission errors, then please use the install fixer":`If the upgrade command displays Access Rights / Permission errors, then please use the install fixer`,'If the upgrade command displays permissions / permissions errors, fix them. Sometimes "sudo" is not enough and you have to run the installation as a real root (previously simply sudo su -).':`If the upgrade command displays permissions / permissions errors, fix them. Sometimes "sudo" is not enough and you have to run the installation as a real root (previously simply "sudo su -").`,"If there are problems with access rights when running on Linux the command has to be changed slightly:":`If there are problems with access rights when running on Linux the command has to be changed slightly:`,"If you do not see the room you want to add, please add it in the categories tab.":`If you do not see the room you want to add, please add it in the categories tab.`,"If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.":`If you just want to restore from backup, you can skip the following wizard steps. You will be redirected to BackItUp tab.`,"If you need to save the mode all the time, you can do this in the system settings.":`If you need to save the mode all the time, you can do this in the system settings.`,Ignore:`Ignore`,"Ignore read errors":`Ignore read errors`,"Ignore version %s":`Ignore version %s`,"Ignore warning":`Ignore warning`,"Import objects":`Import objects`,"Import settings from JSON file":`Import settings from JSON file`,"Important information about port forwarding":`Important information about port forwarding`,"Important main settings":`Important main settings`,"In background":`In background`,"In groups":`In groups`,"In your AI client (Claude Desktop, Codex, Gemini CLI, …) add a new MCP server with this URL:":`In your AI client (Claude Desktop, Codex, Gemini CLI, …) add a new MCP server with this URL:`,"Incompatible OS. Required one of %d, present %d":`Incompatible OS. Required one of %d, present %d`,"Incompatible node version. Required %d, installed %d":`Incompatible node.js version. Required %d, installed %d`,India:`India`,Indonesia:`Indonesia`,Info:`Info`,"Info adapter not found":`Info adapter not found`,Information:`Information`,"Initial ioBroker setup":`Initial NexoWatt EOS setup`,Insert:`Insert`,"Insert JSON with objects here":`Insert JSON with objects here`,Install:`Install`,'Install "%s" v%s from repository instead of v%s':`Install "%s" v%s from repository instead of v%s`,"Install a specific version":`Install a specific version`,"Install adapter":`Install adapter`,"Install adapter from %s":`Install or update the adapter from %s`,"Install adapters":`Install adapters`,"Install from custom URL":`Install from custom URL`,"Install on host":`Install on host`,"Install or update the adapter from %s":`Install or update the adapter from %s`,"Install selected adapters":`Install selected adapters`,"Install the %s adapter — ideally as a web extension of your web (or admin) instance. It exposes ioBroker’s tools to any MCP-compatible AI client.":`Install the %s adapter — ideally as a web extension of your web (or admin) instance. It exposes ioBroker’s tools to any MCP-compatible AI client.`,"Install version %s from repository":`Install version %s from repository`,"Installation counter":`Installations counter`,"Installation process":`Installation process`,"Installations counter":`Installations counter`,Installed:`Installed`,"Installed adapters":`Installed adapters`,"Installed from group":`Installed from group`,"Installed instances":`Installed instances`,"Installed version":`Installed version`,Instance:`Instance`,"Instance %s already exists":`Instance "%s" already exists`,"Instance link %s":`Instance link %s`,"Instance settings":`Instance settings`,"Instance statistics update interval":`Instance statistics update interval`,Instances:`Instances`,"Interpret output":`Interpret output`,Intro:`Quick access`,"Invalid configuration. Please fix":`Invalid configuration. Please fix`,"Invalid settings in these fields could lead to dead host":`Invalid settings in these fields could lead to dead host`,"Invalid version of %s":`Invalid version of %s`,"Invalid version of %s. Required %s":`Invalid version of %s. Required %s`,"Invalid version of %s. Required %s. Current":`Invalid version of %s. Required %s. Current`,"Invoice number":`Invoice number`,Iran:`Iran`,"Iran, Islamic Republic Of":`Iran`,Iraq:`Iraq`,Ireland:`Ireland`,"Is yet in the list":`It's already in the list`,"Isle of Man":`Isle of Man`,Israel:`Israel`,"It is suggested to enable the authentication in admin":`It is recommended that you enable authentication to access Admin UI.`,"It will be compressed when the uncompressed size is >= size * sizeFactor AND >= sizeFactorMinimumSize":`It will be compressed when the uncompressed size is >= size * sizeFactor AND >= sizeFactorMinimumSize`,Italy:`Italy`,"Its own configuration and objects will be discarded.":`Its own configuration and objects will be discarded.`,"Ivory Coast":`Ivory Coast`,"JS function like":`JS function like`,Jamaica:`Jamaica`,Jan:`Jan`,January:`January`,Japan:`Japan`,Jersey:`Jersey`,Jordan:`Jordan`,Jul:`Jul`,July:`July`,Jun:`Jun`,June:`June`,Kazakhstan:`Kazakhstan`,Kenya:`Kenya`,Key:`Key`,Kiribati:`Kiribati`,"Known bugs for":`Known bugs for`,Korea:`Korea`,"Korea, Democratic People'S Republic of":`North Korea`,"Korea, Republic of":`South Korea`,Kosovo:`Kosovo`,Kuwait:`Kuwait`,Kyrgyzstan:`Kyrgyzstan`,Language:`Language`,"Lao People'S Democratic Republic":`Lao People's Democratic Republic`,"Lao People's Democratic Republic":`Lao People's Democratic Republic`,"Last changed":`Last changed`,"Last month created adapters":`Last month created adapters`,"Last month updated adapters":`Last month updated adapters`,"Last read: %s":`Last read: %s`,"Last scan on %s":`Last scan on %s`,"Last start: %s":`Last start: %s`,"Last update":`Last update`,"Latest entries":`Latest entries`,Latitude:`Latitude`,"Latitude:":`Latitude`,Latvia:`Latvia`,"Leave anyway":`Leave anyway`,Lebanon:`Lebanon`,Lesotho:`Lesotho`,"Let's Encrypt settings":`Let's Encrypt settings`,"Let's encrypt SSL":`Let's encrypt SSL`,Level:`Level`,"Level of messages that this transport should log (default: level set on parent logger)":`Loglevel to use for logging for this transport. ("Default" means that the Loglevel from the relevant adapter instance/host is used and can be changed dynamically as required, All other options define the Loglevel statically)`,Liberia:`Liberia`,"Libyan Arab Jamahiriya":`Libyan Arab Jamahiriya`,License:`License`,"License agreement":`License agreement`,"License terms":`License terms`,Licenses:`Licenses`,"Licenses are not changed":`Licenses have not changed`,"Licenses have not changed":`Licenses have not changed`,"Licenses were not stored. They will be stored after the settings will be saved":`Licenses were not stored. They will be stored after the settings will be saved`,"Licenses were stored":`Licenses were stored`,Liechtenstein:`Liechtenstein`,"Limit RAM size for controller":`Limit RAM size for controller`,"Line-ending character to use. (default: os.EOL).)":`Line-ending character to use. (default: os.EOL).)`,Links:`Links`,"Linux/macOS (manually installed)":`Linux/macOS (manually installed)`,"Linux/macOS (new installer)":`Linux/macOS (new installer)`,"Listen on all IPs":`Listen on all IPs`,Lithuania:`Lithuania`,"Load models":`Load models`,"Loading...":`Loading...`,Log:`Log`,"Log file will be deleted. Are you sure?":`Log file will be deleted. Are you sure?`,"Log level will be reset to the saved level after the restart of the controller":`Log level will be reset to the saved level after the restart of the controller`,"Log level will be saved permanently":`Log level will be saved permanently`,"Log name":`Log name`,"Log size:":`Log size`,Logic:`Logic`,Login:`Login`,"Login timeout(sec):":`Login timeout (sec)`,"Login/Email":`Login/Email`,"Login/password":`Login/password`,Logs:`Logs`,Longitude:`Longitude`,"Longitude:":`Longitude`,Low:`Low`,Luxembourg:`Luxembourg`,MB:`Mb`,"MCP as a web extension":`MCP as a web extension`,"MCP is disabled in this admin’s settings (native.disableMcp).":`MCP is disabled in this admin’s settings (native.disableMcp).`,"MM/DD/YYYY":`MM/DD/YYYY`,Macao:`Macau`,Macau:`Macau`,Macedonia:`Macedonia`,"Macedonia, The Former Yugoslav Republic of":`Macedonia`,Madagascar:`Madagascar`,Mai:`Mai`,Main:`Main`,"Main settings":`General settings`,Malawi:`Malawi`,Malaysia:`Malaysia`,Maldives:`Maldives`,Mali:`Mali`,Malta:`Malta`,"Manually created":`Manually created`,Mar:`Mar`,March:`March`,"Marshall Islands":`Marshall Islands`,Martinique:`Martinique`,Mauritania:`Mauritania`,Mauritius:`Mauritius`,"Max length %s characters":`Max length %s characters`,"Maximal number of files":`Maximal number of files`,"Maximal size of one file":`Maximal size of one file`,Maximize:`Maximize`,"Maximum answer length":`Maximum answer length`,"Maximum changes before write":`Maximum changes before write`,"Maximum delay between connection attempts":`Maximum delay between connection attempts`,"Maximum number of connection retries":`Maximum number of connection retries`,"Maximum number of days":`Maximum number of days`,Mayotte:`Mayotte`,Medium:`Medium`,Members:`Members`,Memory:`Memory`,"Memory (%)":`Memory (%)`,Message:`Message`,"Message buffer overflow. Losing oldest":`Message buffer overflow. Losing oldest.`,Mexico:`Mexico`,Micronesia:`Micronesia`,"Micronesia, Federated States of":`Micronesia`,Minimal:`Minimal`,"Minimal number of backup files, after the deletion will be executed according to the backup time settings":`Minimal number of backup files, after the deletion will be executed according to the backup time settings`,"Minimal write interval":`Minimal write interval`,Minimize:`Minimize`,Model:`Model`,Moldova:`Moldova`,"Moldova, Republic of":`Moldova`,Mon:`Mon`,Monaco:`Monaco`,Monday:`Monday`,Mongolia:`Mongolia`,Montenegro:`Montenegro`,Montserrat:`Montserrat`,"More about this license":`More about this license`,"More info":`More info`,Morocco:`Morocco`,"Move · hold Shift, Ctrl or Alt to copy":`Move · hold Shift, Ctrl or Alt to copy`,Mozambique:`Mozambique`,"Multi-host":`Multi-host`,"Multi-host password":`Multi-host password`,Myanmar:`Myanmar`,NPM:`NPM`,Name:`Name`,"Name A-Z":`Name`,"Name:":`Name`,"Name: %s":`Name: %s`,Namibia:`Namibia`,"Narrow all":`Narrow all`,"Navigation to %s was declined.":`Navigation to %s was declined.`,Nauru:`Nauru`,Nepal:`Nepal`,Netherlands:`Netherlands`,"Netherlands Antilles":`Netherlands Antilles`,New:`New`,"New Caledonia":`New Caledonia`,"New Zealand":`New Zealand`,"New adapter proposals":`New adapter proposals`,"New category":`New category`,"New channel":`New channel`,"New chat":`New chat`,"New device":`New device`,"New enum":`New enum`,"New folder":`New folder`,"New group":`New group`,"New hosts found":`New hosts found`,"New licenses were stored":`New licenses were stored`,"New object":`New object`,"New object ID":`New object ID`,"New objekt":`New object`,"New state":`New state`,"New user":`New user`,Next:`Next`,"Next start: %s":`Next start: %s`,Nicaragua:`Nicaragua`,Niger:`Niger`,Nigeria:`Nigeria`,Niue:`Niue`,No:`No`,"No %s instance found":`No %s instance found`,"No SSL":`No SSL`,"No answer within %s s":`No answer within %s s`,"No change log available":`No change log available`,"No comments in selected language":`No comments in selected language`,"No data":`No data`,"No data will be sent":`No data will be sent`,"No default history instance is configured in the system settings":`No default history instance is configured in the system settings`,"No devices or channels found":`No devices or channels found`,"No entries found":`No entries found`,"No file cache":`No file cache`,"No function":`No function`,"No messages":`No messages`,"No on-the-fly backup":`No on-the-fly backup`,"No rating or too few data":`No rating or too few data`,"No reachable MCP endpoint found. Enable MCP in this admin’s settings, or install and start the %s adapter — either as a web extension on a web instance, or standalone with its own port.":`No reachable MCP endpoint found. Enable MCP in this admin’s settings, or install and start the %s adapter — either as a web extension on a web instance, or standalone with its own port.`,"No response from the assistant":`No response from the assistant`,"No restart":`No restart`,"No room":`No room`,"No running adapters":`No running adapters`,"No states selected!":`No states selected!`,"No stdout outputs":`No stdout outputs`,"No version of %s":`Latest available version of "%s" is required, but nothing installed. Please install first "%s" and then retry.`,"Node.js":`Node.js`,"Node.js update failed: %s":`Node.js update failed: %s`,"Node.js update successful, restarting controller now!":`Node.js update successful, restarting controller now!`,"Node.js upgrade":`Node.js upgrade`,"Non-NPM-Version":`Non-NPM-Version`,'Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,None:`None`,"Norfolk Island":`Norfolk Island`,"Northern Mariana Islands":`Northern Mariana Islands`,Norway:`Norway`,"Not agree":`Not agree`,"Not exists":`Does not exist`,"Not fulfilled on the following hosts: %s":`Not fulfilled on the following hosts: %s`,"Note:":`Note`,Notifications:`Notifications`,Nov:`Nov`,November:`November`,"Now the expert mode will be active only during this browser session.":`Now the expert mode will be active only during this browser session.`,"Now the expert mode will be deactivated only during this browser session.":`Now the expert mode will be deactivated only during this browser session.`,"Number of files":`Number of files`,OK:`OK`,"Only one AI provider can be active. To use another one, remove this one first.":`Only one AI provider can be active. To use another one, remove this one first.`,OS:`OS`,'Object "<b>%s</b>" does not exists. Update the page.':`Object "<b>%s</b>" does not exist. Update the page.`,"Object data":`Object data`,"Object does not exist any more":`Object does not exist any more`,"Object does not exist!":`Object does not exist!`,"Object list":`Object list`,"Object may not be deleted":`Object may not be deleted`,"Object rights":`Object rights`,Objects:`Objects`,Oct:`Oct`,October:`October`,"Off (local models)":`Off (local models)`,Offline:`Offline`,Ok:`Ok`,Oman:`Oman`,'On Windows first please call in the start menu under "ioBroker" the command line of the relevant ioBroker instance. The correct directory is then set automatically. On Linux or macOS please go to the ioBroker directory.':`On Windows first please call in the start menu under "NexoWatt EOS" the command line of the relevant NexoWatt EOS instance. The correct directory is then set automatically. On Linux or macOS please go to the NexoWatt EOS directory.`,"Only detected devices":`Only detected devices`,"Only one":`Only one`,"Only selected":`Only selected`,"Only reachable in the local network":`Only reachable in the local network`,"Only tgz files are allowed":`Only .tgz files are allowed`,"Only the newest %s hits are shown":`Only the newest %s hits are shown`,"Open charts in new window":`Open charts in new window`,"Open in admin":`Open in admin`,"Open original":`Open on new tab`,"Open repository":`Open repository`,"Open the Adapters tab":`Open the Adapters tab`,"Operations approved without asking (click to revoke):":`Operations approved without asking (click to revoke):`,Optional:`Optional`,"Optional. Always relative to iobroker.js-controller/":`Optional. Always relative to iobroker.js-controller/`,"Or install from a file":`Or install from a file`,"Or select from the list":`Or select from the list`,"Ordered at":`Ordered at`,"Otherwise please update the slaves first with an update of master-slave systems and the master last!":`Otherwise please update the slaves first with an update of master-slave systems and the master last!`,Overview:`Overview`,Owner:`Owner`,"Owner group":`Owner group`,"Owner user":`Owner user`,PID:`PID`,Pakistan:`Pakistan`,Palau:`Palau`,Palestine:`Palestine`,"Palestinian Territory, Occupied":`Palestine`,Panama:`Panama`,"Papua New Guinea":`Papua New Guinea`,Paraguay:`Paraguay`,Parent:`Parent`,"Parent ID":`Parent ID`,"Parse error":`Parse error`,Password:`Password`,"Password and confirmation are not equal!":`Password and confirmation are not equal!`,"Password cannot be empty!":`Password cannot be empty!`,"Password must be at least 8 characters long and have numbers, upper and lower case letters":`Password must be at least 8 characters long and have numbers, upper and lower case letters`,"Password repeat":`Password repeat`,"Passwords are not equal":`Passwords are not equal`,Path:`Path`,"Path to storage:":`Path to storage`,"Pause output":`Pause output`,"Performing this update will restart the js-controller afterwards!":`Performing this update will restart the js-controller afterwards! This will update your Node.js version to the latest available in your configured apt sources.`,Permissions:`Permissions`,Peru:`Peru`,Philippines:`Philippines`,"Pin to navigation":`Pin to navigation`,Pitcairn:`Pitcairn`,"Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,Platform:`Platform`,"Please configure the AI provider, credential and model first.":`Please configure the AI provider, credential and model first.`,"Please confirm":`Please confirm`,"Please execute the following commands in an SSH shell (console):":`Please execute the following commands in an SSH shell (console):`,"Please interpret the output of: %s":`Please interpret the output of: %s`,"Please make sure you know what you are doing!":`Please make sure you know what you are doing!`,"Please read these important notes:":`Please read these important notes:`,"Please select country":`Please select country`,"Please select specific version of %s":`Please select specific version of %s`,"Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.":`Please select the rooms that exist in your home. You can add or remove rooms later in the categories tab.`,"Please wait for an official release!":`Please wait for an official release of the adapter!`,Plugins:`Plugins`,Poland:`Poland`,Popular:`Popular`,"Popular first":`Popular first`,"Popup for any custom information.":`Popup for any custom information.`,Port:`Port`,"Port forwarding":`Port forwarding`,"Port to check the domain:":`Port to check the domain`,Portugal:`Portugal`,"Preserve ID":`Preserve ID`,"Press CTRL+ENTER to confirm":`Press CTRL+ENTER to confirm`,"Press CTRL+ENTER to write the value":`Press CTRL+ENTER to write the value`,"Press CTRL+ENTER to write the value, when focused":`Press CTRL+ENTER to write the value, when focused`,"Press ENTER to write the value, when focused":`Press ENTER to write the value, when focused`,Preview:`Preview`,Previous:`Previous`,"Process exited with code %s":`Process exited with code %s`,"Processing...":`Processing...`,Product:`Product`,Protocol:`Protocol`,Provider:`Provider`,"Puerto Rico":`Puerto Rico`,Qatar:`Qatar`,Quality:`Quality code`,RAM:`RAM`,"RAM limit":`RAM limit`,"RAM total usage:":`Total RAM usage:`,"RAM usage":`RAM usage`,"Remove provider":`Remove provider`,RWANDA:`Rwanda`,Rate:`Rate`,"Rate how good this version of the adapter works on your system. You can vote for every new version.":`Rate how good this version of the adapter works on your system. You can vote for every new version.`,"Rating for":`Rating for`,"Read converter":`Read converter`,"Read timeout":`Read timeout`,"Read to the end for accept":`Read to the end for accept`,"Read-only":`Read-only`,Readable:`Readable`,Readme:`Readme`,"Really delete credential %s?":`Really delete credential %s?`,"Reasoning effort":`Reasoning effort`,Rebuild:`Rebuild`,"Rebuild tree":`Rebuild tree`,"Recently created":`Recently created`,"Recently updated":`Recently updated`,"Record CPU and RAM":`Record CPU and RAM`,"Recording is active, but there is no data for the last hour yet":`Recording is active, but there is no data for the last hour yet`,"Redirect in %s second(s)":`Redirect in %s second(s)`,"Redis password":`Redis password`,"Refresh log":`Refresh log`,Region:`Region`,Relative:`Relative`,Reload:`Reload`,"Remote URI of the HTTP logging endpoint":`Remote URI of the HTTP logging endpoint`,"Remote host of the HTTP logging endpoint":`Remote host of the HTTP logging endpoint`,"Remote port of the HTTP logging endpoint":`Remote port of the HTTP logging endpoint`,Remove:`Remove`,"Remove attribute %s":`Remove attribute "%s"`,"Remove color":`Remove color`,"Remove filter for updatable adapters":`Remove filter for updatable adapters`,"Remove from navigation":`Remove from navigation`,"Remove icon":`Remove icon`,Removed:`Removed`,"Removing of adapter...":`Removing of adapter...`,"Removing of instance...":`Removing of instance...`,Rename:`Rename`,"Rename all children":`Rename all children`,"Rename or copy object":`Rename or copy object`,"Repeat administrator password":`Repeat administrator password`,"Repeat password is not equal with password":`The repeated password is not equal with the password!`,Replace:`Replace`,Repositories:`Repositories`,"Repository data last updated: %s":`Repository data last updated: %s`,"Repository data last updated: %s (oldest from %s)":`Repository data last updated: %s (oldest from %s)`,"Repository timestamps (oldest from %s):":`Repository timestamps (oldest from %s):`,"Repository timestamps:":`Repository timestamps:`,"Requesting data...":`Requesting data...`,Reset:`Reset`,"Resource usage":`Resource usage`,Restart:`Restart`,"Restart adapter after install":`Restart adapter after install`,"Restart host":`Restart host`,"Restart works only if controller started as system service.":`Restart works only if controller started as system service.`,"Restore from backup":`Restore from backup`,"Restore repository list to default":`Restore repository list to default`,"Retry maximum count":`Retry maximum count`,"Retry maximum delay":`Retry maximum delay`,Reunion:`Reunion`,"Reverse output direction":`Reverse output direction`,Review:`Review`,Rights:`Access rights`,Role:`Role`,Romania:`Romania`,Room:`Room`,Rooms:`Rooms`,"Rooms without floor":`Rooms without floor`,"Run Node.js code on the host":`Run Node.js code on the host`,"Run command":`Run command`,"Run npm install iobroker.js-controller there. A specific version can be installed using npm install iobroker.js-controller@x.y.z (replace x.y.z with the desired version).":`Run npm install iobroker.js-controller there. A specific version can be installed using "npm install iobroker.js-controller@x.y.z" (replace "x.y.z" with the desired version).`,"Run script in the javascript adapter":`Run script in the javascript adapter`,"Running adapters":`Running adapters`,"Running command":`Running command`,"Running: ":`Running: `,"Runs as web-extension":`Runs as web-extension`,"Russian Federation":`Russian Federation`,Rwanda:`Rwanda`,"SEQ log":`SEQ log`,"Set up the AI once for the whole system. The AI assistant of admin uses these settings.":`Set up the AI once for the whole system. The AI assistant of admin uses these settings.`,SSL:`SSL`,"Saint Helena":`St. Helena`,"Saint Kitts and Nevis":`Saint Kitts and Nevis`,"Saint Lucia":`Saint Lucia`,"Saint Pierre and Miquelon":`St. Pierre and Miquelon`,"Saint Vincent and the Grenadines":`Saint Vincent and the Grenadines`,Samoa:`Samoa`,"San Marino":`San Marino`,"Sao Tome and Principe":`Sao Tome and Principe`,Sat:`Sat`,"Saudi Arabia":`Saudi Arabia`,Save:`Save`,"Save & Close":`Save & Close`,"Save & close":`Save & close`,"Save Objecttree as JSON File":`Save objects tree as JSON file`,"Save Objecttree is not possible":`Saving the objects tree is not possible`,"Save as image":`Save as image`,"Save configuration":`Save configuration`,"Save configuration?":`Save configuration?`,Script:`Script`,Scripts:`Scripts`,"Search again":`Search again`,"Search failed: %s":`Search failed: %s`,"Search in the log files (Enter)":`Search in the log files (Enter)`,"Search the log files in this time range":`Search the log files in this time range`,"Secret Access Key":`Secret Access Key`,"See on github":`See on github`,"Seems that you have slow connection. Do you want to increase timeout interval?":`Seems that you have slow connection. Do you want to increase timeout interval?`,Select:`Select`,"Select ID":`Select ID`,"Select adapter":`Select adapter`,"Select adapter:":`Select adapter`,"Select an entry on the left":`Select an entry on the left`,"Select at least one floor":`Select at least one floor`,"Select file":`Select file`,"Select host to add the instance":`Select host to add the instance`,"Select language":`Select language`,"Select methods":`Select methods`,"Select options":`Select options`,"Select predefined icon":`Select predefined icon`,"Select the functions of your devices. Functions that already exist stay unchanged":`Select the functions of your devices. Functions that already exist stay unchanged`,"Select the rooms in your home":`Select the rooms in your home`,"Select the rooms of every floor. Rooms that already exist stay unchanged":`Select the rooms of every floor. Rooms that already exist stay unchanged`,"Select the rooms. Rooms that already exist stay unchanged":`Select the rooms. Rooms that already exist stay unchanged`,"Select type of export":`Select type of the export`,"Select/Unselect all":`Select/Unselect all`,"Selected %s object(s)":`Selected %s object(s)`,"Selected adapters":`Selected adapters`,Send:`Send`,Senegal:`Senegal`,"Sent data:":`Sent data`,Sep:`Sep`,September:`September`,Serbia:`Serbia`,"Serbia and Montenegro":`Serbia and Montenegro`,"Server URL":`Server URL`,"Session expire in %s":`Session expire in %s`,Set:`Set`,"Set CRON":`Set`,"Set CRON schedule for restarts":`Set CRON schedule for restarts`,"Set administrator password":`Set administrator password`,"Set function":`Set function`,"Set multiple states":`Set multiple states`,"Set room":`Set room`,"Set state":`Set state`,"Set tier for %s":`Set tier for %s`,"Set timeout to 1 minute":`Set timeout to 1 minute`,"Set up rooms and functions":`Set up rooms and functions`,"Set value":`Set value`,Settings:`Settings`,"Settings %s":`Settings %s`,"Settings for %s":`Settings for %s`,"Settings saved":`Settings saved`,Seychelles:`Seychelles`,"Show / hide List":`Show / hide List`,"Show all":`Show all`,"Show as overlay":`Show as overlay`,"Show change log":`Show change log`,"Show comments in language":`Show comments in language`,"Show error in log if RAM less than":`Show error in log if RAM less than`,"Show errors":`Show errors`,"Show errors and warnings":`Show errors and warnings`,"Show help for this adapter":`Show help for this adapter`,"Show instances only for current host":`Show instances only for current host`,"Show instructions":`Show instructions`,"Show ioBroker assistant":`Show NexoWatt EOS assistant`,"Show less":`Show less`,"Show lines":`Show lines`,"Show list view":`Show list view`,"Show members":`Show members`,"Show more":`Show more`,"Show more info":`Show more info`,"Show object list":`Show object list`,"Show only installed":`Show only installed adapters`,"Show only objects, which were detected as a device or which already have a room or a function":`Show only objects, which were detected as a device or which already have a room or a function`,"Show only running instances":`Show only running instances`,"Show password":`Show password`,"Show running or stopped instances":`Show running or stopped instances`,"Show sent statistics data":`Show sent statistics data`,"Show tree view":`Show tree view`,"Show values of instance":`Show values of instance`,"Show warning im log if RAM less than":`Show warning im log if RAM less than`,"Show whole changelog":`Show whole changelog`,"Show...":`Show...`,"Show/hide PID":`Show/hide process ID`,"Show/hide colors":`Show/hide colors`,"Showed only installed adapters":`Showed only installed adapters`,"Showed only installed adapters without instance.":`Showed only installed adapters without instance.`,"Showed only running instances":`Showed only running instances`,"Showed only stopped instances":`Showed only stopped instances`,"Sierra Leone":`Sierra Leone`,Silent:`Silent`,Singapore:`Singapore`,"Single-Sign On disconnected":`Single-Sign On disconnected`,"Site name":`Site name`,"Size: %s, Free: %s":`Size: %s, Available: %s`,"Skip discovery process and go to install with last scan results":`Skip discovery process and go to install with last scan results`,Slovakia:`Slovakia`,Slovenia:`Slovenia`,"Solomon Islands":`Solomon Islands`,Somalia:`Somalia`,"Some data are not stored. Discard?":`Some data are not stored. Discard?`,"Some updates available":`Some updates available`,"Sorry, you cannot use ioBroker.":`Sorry, you cannot use NexoWatt EOS.`,"Sort alphabetically":`Sort alphabetically by name`,"Sort by":`Sort by`,"Sort direction":`Sort direction`,Source:`Source`,"Source (show all)":`Source (show all)`,"South Africa":`South Africa`,"South Georgia South Sandwich Islands":`South Georgia South Sandwich Islands`,"South Georgia and the South Sandwich Islands":`South Georgia South Sandwich Islands`,Spain:`Spain`,Speed:`Speed`,"Sri Lanka":`Sri Lanka`,"St. Helena":`St. Helena`,"St. Pierre and Miquelon":`St. Pierre and Miquelon`,"Start date":`Start date`,"Start order (tier)":`Start order (tier)`,"Start time":`Start time`,"Start update":`Start update`,"Start wizard":`Start wizard`,"Start/stop":`Start/stop`,"Started installation of %s.":`Started installation of %s.`,"Started...":`Started...`,State:`State`,"State does not exist":`State does not exist`,"State type":`State type`,"State type":`State type`,States:`States`,"States rights":`States rights`,Statistics:`Statistics`,"Statistics:":`Statistics`,Status:`Status`,"Stay signed in":`Stay signed in`,"Step %s of %s":`Step %s of %s`,"Step type":`Step type`,"Stop on error":`Stop on error`,"Stop recording":`Stop recording`,"Storage of %s":`Storage of <span class="name">%s</span>`,"Storage of %s states":`Storage of <span class="name">%s</span> states`,"Store file interval":`Store file interval`,"Stream log":`Stream log`,"Sub-entries":`Sub-entries`,"Subscription Key":`Subscription Key`,"Success!":`Success!`,Sudan:`Sudan`,Suggestion:`Recommendation`,"Suggestion from the detected device type":`Suggestion from the detected device type`,Sun:`Sun`,Sunday:`Sunday`,"Suppress for 5 minutes":`Suppress for 5 minutes`,Suriname:`Suriname`,"Svalbard and Jan Mayen":`Svalbard and Jan Mayen Islands`,"Svalbard and Jan Mayen Islands":`Svalbard and Jan Mayen Islands`,Swaziland:`Swaziland`,Sweden:`Sweden`,Switzerland:`Switzerland`,"Synchronize admin settings between all opened browser windows":`Synchronize admin settings between all opened browser windows`,"Syrian Arab Republic":`Syrian Arab Republic`,"SysLog Type":`SysLog Type`,Syslog:`Syslog`,"Syslog facility to use (Default: local0).":`Syslog facility to use (Default: local0).`,System:`System`,"System information":`System information`,"System language:":`System language`,"System log":`System log`,"System overview and status":`System overview and status`,"System settings":`System`,"System status":`System status`,"System uptime":`System uptime`,Table:`Table`,Taiwan:`Taiwan`,"Taiwan, Province of China":`Taiwan`,Tajikistan:`Tajikistan`,Tanzania:`Tanzania`,"Tanzania, United Republic of":`Tanzania`,"Temperature unit":`Temperature unit`,"Temperature units":`Temperature unit`,"Temperature units:":`Temperature units`,Template:`Template`,Test:`Test`,Thailand:`Thailand`,"The %s adapter does not seem to be installed yet.":`The %s adapter does not seem to be installed yet.`,"The %s adapter is installed.":`The %s adapter is installed.`,"The Cloud services from iobroker.net/pro can help here to do that securely:":`The Cloud services from iobroker.net/pro can help here to do that securely:`,"The JSONL DB is append-only and will contain unnecessary entries after a while.":`The JSONL DB is append-only and will contain unnecessary entries after a while.`,"The adapter can be used free of charge.":`The adapter can be used free of charge.`,"The adapter has a limited functionality without a paid license.":`The adapter has a limited functionality without a paid license.`,"The adapter requires a paid license for commercial use.":`The adapter requires a paid license for commercial use.`,"The adapter requires a paid license.":`The adapter requires a paid license.`,"The apiKey of the seq system":`The apiKey of the seq system`,"The assistant is not available on this tab and will be closed. Continue?":`The assistant is not available on this tab and will be closed. Continue?`,"The assistant is still working on an answer, which is lost on this tab. Leave anyway?":`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`,"The assistant wants to perform the following action(s):":`The assistant wants to perform the following action(s):`,"The changes will be applied to %s states. Are you sure?":`The changes will be applied to %s states. Are you sure?`,"The current selected configuration will allow to automatically pull in incompatible changes of this adapter!":`The current selected configuration will allow to automatically pull in incompatible changes of this adapter!`,"The device or service delivers the new state actively":`The device or service delivers the new state actively`,"The device or service will be periodically asked":`The device or service will be periodically asked`,"The end of line character to be added to the end of the message (Default: Message without modifications).":`The end of line character to be added to the end of the message (Default: Message without modifications).`,"The expert mode allows you to view and edit system internal details.":`The expert mode allows you to view and edit system internal details.`,"The following hosts do not fulfill the required version %s of %s:":`The following hosts do not fulfill the required version %s of %s:`,'The adapter is not installed on host "%s"':`The adapter is not installed on host "%s"`,"The history instance %s is not running":`The history instance %s is not running`,"The host %s will be attached to this system.":`The host %s will be attached to this system.`,"The host running syslogd, defaults to localhost":`The host running syslogd, defaults to localhost`,"The http(s) URL including port of the seq server. If you use HTTPS a real certificate is needed; self signed certs are ot accepted.":`The http(s) URL including port of the seq server. If you use HTTPS a real certificate is needed; self signed certs are ot accepted.`,"The license text could not be loaded.":`The license text could not be loaded.`,"The name of the application (Default: process.title).":`The name of the application (Default: process.title).`,"The objects, states and logs will be processed by your AI provider.":`The objects, states and logs will be processed by your AI provider.`,"The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).":`The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).`,"The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).":`The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).`,"The rooms and functions are ready":`The rooms and functions are ready`,"The sent data will only be processed by ioBroker GmbH for statistical purposes and will not be shared with any third parties.":`The sent data will only be processed by NexoWatt EOS GmbH for statistical purposes and will not be shared with any third parties.`,"The type of the syslog protocol to use (Default: BSD).":`The type of the syslog protocol to use (Default: BSD).`,"There are no entries in this category yet":`There are no entries in this category yet`,"These options can reduce the size of the export file:":`These options can reduce the size of the export file:`,"Thinking…":`Thinking…`,"This adapter cannot be installed from git as must be built before installation.":`This adapter cannot be installed from git as must be built before installation.`,"This admin already provides a built-in MCP endpoint (listed below) — no extra adapter is required for it.":`This admin already provides a built-in MCP endpoint (listed below) — no extra adapter is required for it.`,"This content cannot be loaded because it uses insecure HTTP protocol.":`This content cannot be loaded because it uses insecure HTTP protocol.`,"This credential is used by":`This credential is used by`,"This feature is supported up from js-controller Kiera (Version 6)!":`This feature is supported up from js-controller Kiera (Version 6)!`,"This is the exact prompt the built-in assistant uses. Paste it as the system / instructions prompt in your AI client to get the same behaviour.":`This is the exact prompt the built-in assistant uses. Paste it as the system / instructions prompt in your AI client to get the same behaviour.`,"This is the recommended option":`This is the recommended option`,"This page is not provided by the remote access of ioBroker Cloud/Pro.":`This page is not provided by the remote access of ioBroker Cloud/Pro.`,"This name will be shown in admin's header. Just to identify the whole installation":`This name will be shown in admin's header. Just to identify the whole installation`,"This object does not used in any aliases yet":`This object does not used in any aliases yet`,"This object is used in aliases":`This object is used in aliases`,'This version of node.js "%s" on "%s" is deprecated. Please install node.js 6, 8 or newer':`NexoWatt EOS supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.`,"This way is only necessary in very few cases and please consult the forum beforehand!":`This way is only necessary in very few cases and please consult the forum beforehand!`,Thu:`Thu`,Tiers:`Tiers`,"Tiers define the order of adapters when the system starts.":`Tiers define the order of adapters when the system starts.`,Time:`Time`,"Time From":`Time From`,"Time To":`Time To`,"Time stamp":`Time stamp`,"Timor-Leste":`East Timor`,'Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.':`Tip: Use the "notification-manager" adapter to receive notifications automatically via messaging adapters.`,"Tips at start":`Tips at start`,Title:`Title`,To:`To`,Today:`Today`,"Toggle expert mode":`Toggle expert mode`,"Toggle states view":`Toggle the states view`,Togo:`Togo`,Tokelau:`Tokelau`,Tonga:`Tonga`,"Too many events":`Too many events`,"Total RAM usage":`Total RAM usage`,"Total adapters":`Total adapters`,"Total count in group":`Total count in group`,"Total rating:":`Total rating:`,"Translated from %s":`Translated from %s`,"Trigger event":`Trigger event`,"Trinidad and Tobago":`Trinidad and Tobago`,Tue:`Tue`,Tunisia:`Tunisia`,Turkey:`Turkey`,Turkmenistan:`Turkmenistan`,"Turks and Caicos Islands":`Turks and Caicos Islands`,Tuvalu:`Tuvalu`,Type:`Type`,"Type of result is not as expected: %s":`Type of result is not as expected: %s`,URL:`URL`,"URL or file path":`URL or file path (Tarball)`,"URL or file path:":`URL or file path`,UUID:`UUID`,Uganda:`Uganda`,Ukraine:`Ukraine`,"Uncheck All":`Uncheck All`,Understand:`Understand`,"Unique name":`Unique name`,"United Arab Emirates":`United Arab Emirates`,"United Kingdom":`United Kingdom`,"United States":`United States`,"United States Minor Outlying Islands":`United States Minor Outlying Islands`,"United States minor outlying islands":`United States minor outlying islands`,"Unknown error":`Unknown error`,"Unknown file format!":`Unknown file format!`,'Unknown type: use in name "private", "public" or "chained" to define the certificate type':`Unknown type: use in name "private", "public" or "chained" to define the certificate type`,Unsecure_Auth:`The password will be sent unencrypted via an unsecure connection. To protect your passwords enable the secure connection (HTTPS)!`,"Unsupported image format":`Unsupported image format`,Update:`Update`,'Update "%s" to v%s':`Update "%s" to v%s`,"Update %s adapter(s)":`Update %s adapter(s)`,"Update all adapters":`Update all adapters`,"Update info adapter":`Update info adapter`,"Update object":`Update object`,"Update objects":`Update objects`,"Update role for %s":`Set the role for "%s"`,"Update states":`Update states`,"Update view":`Update view`,Updated:`Updated`,"Updating %s...":`Updating %s...`,Upgrade:`Upgrade`,"Upgrade all adapters":`Upgrade all adapters`,Upload:`File upload`,"Upload adapter after install":`Upload adapter after install`,"Upload admin started":`Upload of configuration is started`,"Upload failed":`Upload failed`,"Upload started...":`Upload started...`,Uptime:`Uptime`,Uruguay:`Uruguay`,"Use Lets Encrypt certificates:":`Use Let's Encrypt certificates`,"Use Single-Sign On":`Use Single-Sign On`,"Use convert functions":`Use convert functions`,"Use following methods:":`Use following methods:`,"Use last scan":`Use last scan`,"Use self signed certificates":`Use self signed certificates`,"Use settings of other browsers":`Use settings of other browsers`,"Use settings of this browser":`Use settings of this browser`,"Use the assistant without an API key":`Use the assistant without an API key`,"Use this button:":`Use this icon:`,"Use this instance for automatic update:":`Use this instance for automatic update`,"Use without an API key (external MCP client)":`Use without an API key (external MCP client)`,"Used by":`Used by`,"Used for sentinels":`Used for sentinels`,"Used only to calculate position.":`Used only to calculate position.`,User:`User`,"User deleted":`User deleted`,"User does not exist":`User does not exist`,"User parameters":`Edit user account`,"User yet exists":`User already exists`,Users:`User accounts`,Uzbekistan:`Uzbekistan`,V:`V`,"Valid till":`Valid till`,Value:`Value`,"Value type":`Value type`,"Values of %s":`Values of %s`,Vanuatu:`Vanuatu`,"Vatican City State":`Vatican City State`,Venezuela:`Venezuela`,"Viet Nam":`Vietnam`,Vietnam:`Vietnam`,View:`View`,"View file in state: %s":`View file in state: %s`,"View: %s":`View: %s`,"Virgin Islands (British)":`Virgin Islands (British)`,"Virgin Islands (U.S.)":`Virgin Islands (U.S.)`,"Virgin Islands, British":`Virgin Islands (British)`,"Virgin Islands, U.S.":`Virgin Islands (U.S.)`,Visualization:`Visualization`,"Vote:":`Vote:`,"Waiting for admin restart...":`Waiting for admin restart...`,"Waiting for connection of ioBroker...":`Waiting for connection of NexoWatt EOS...`,"Wallis and Futuna":`Wallis and Futuna Islands`,"Wallis and Futuna Islands":`Wallis and Futuna Islands`,"Warning!":`Warning!`,Warning1:`Don't install adapters from GitHub unless asked to by a developer or if you are 100 %sure what you are doing!`,Warning2:`Adapters on GitHub may not work like they should (they are still under development). Only install them if you are participating in a test!`,"Warning: Free space on disk is low":`Warning: Free space on disk is low!`,Weather:`Weather`,Wed:`Wed`,"Week starts with":`Week starts with`,Welcome:`Welcome`,"Western Sahara":`Western Sahara`,"When activated this host can be discovered by other iobroker installations in your network to become the master of a multihost system.":`When activated this host can be discovered by other NexoWatt EOS installations in your network to become the master of a multihost system.`,"When enabled adapter instances can run in one or few processes to save RAM usage.":`When enabled adapter instances can run in one or few processes to save RAM usage.`,"When hidden, move the mouse to the bottom-right corner to reveal it.":`When hidden, move the mouse to the bottom-right corner to reveal it.`,"Wide all":`Wide all`,"Will be reset to the saved log level after restart of adapter":`Will be reset to the saved log level after restart of adapter`,With:`With`,"With floors":`With floors`,"With password":`With password`,Without:`Without`,"Without floors":`Without floors`,"Without floors, all rooms are on the same level":`Without floors, all rooms are on the same level`,"Without function":`Without function`,"Without restart":`Without restart`,"Without room":`Without room`,"Would you like to restart the controller for your changes to take effect?":`Would you like to restart the controller for your changes to take effect?`,Write:`Write`,"Write converter":`Write converter`,"Write to the database file no more than every X milliseconds":`Write to the database file no more than every X milliseconds`,"Write value":`Write value`,Writeable:`Writeable`,"Wrong dependencies":`Wrong dependencies`,"YYYY.MM.DD":`YYYY.MM.DD`,Yemen:`Yemen`,Yes:`Yes`,"You are going to add new instance:":`You are going to add new instance:`,"You can change everything at any time in the categories view or in the assignment view":`You can change everything at any time in the categories view or in the assignment view`,"You can change host on Instances, Adapters or Logs pages":`You can change host on Instances, Adapters or Logs pages`,"You can change host on Overview, Instances, Adapters or Logs pages":`You can change host on Overview, Instances, Adapters or Logs pages`,"You can change the host name, but be aware, that all instances must be assigned anew":`You can change the host name, but be aware, that all instances must be assigned anew`,"You can check changelog here":`You can check the changelog <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.js-controller/blob/master/CHANGELOG.md" target="_blank">here</a>`,"You can drag and drop list items for reorder":`You can drag and drop list items for reorder`,"You can drag users to groups.":`You can drag users to groups.`,"You can drag&drop the devices, channels and states to enums":`You can drag&drop the devices, channels and states to enums`,"You can drag&drop users to groups":`You can drag&drop users to groups`,"You can drive the ioBroker assistant from an external AI client (Claude, Codex, Gemini, …) without configuring an AI provider here. The client connects directly to ioBroker through the MCP server.":`You can drive the ioBroker assistant from an external AI client (Claude, Codex, Gemini, …) without configuring an AI provider here. The client connects directly to ioBroker through the MCP server.`,"You can export all objects or just the selected branch.":`You can export all objects or just the selected branch.`,"You can set the log level permanently in the base host settings":`You can set the log level permanently in the host base settings`,"You can't see events via cloud":`You can't see events via cloud`,"You cannot delete host, when it is alive":`You cannot delete host, when it is alive`,"You have unread news!":`You have unread news!`,"You have unsaved changes":`You have unsaved changes`,"You must set the administrator password":`You must set the administrator password`,"You voted for %s on %s":`You voted for v%s on %s`,"You want to move %s states with enabled history":`You want to move %s states with enabled history`,"Your are intend to edit ALL objects. Are you sure?":`Your are intend to edit ALL objects. Are you sure?`,"Your comment":`Your comment`,"Your communication with admin is not encrypted":`Your communication with admin is not encrypted`,"Your home":`Your home`,Zaire:`Zaire`,Zambia:`Zambia`,Zimbabwe:`Zimbabwe`,_All:`All`,"_Toggle expert mode":`Toggle expert mode`,"a-z":`a-z`,ack:`ack`,actions:`actions`,active:`active`,"actual:":`actual:`,"adapter with updates":`adapters with updates`,"adapters count":`Adapters in repository`,add:`Add`,"add children":`add children`,"add instance":`add instance`,"add repository":`add repository`,agree:`Agree`,alarm_group:`Alarm`,alive:`alive`,all:`all`,"all items are filtered out":`All items are filtered out`,"allow set of compact groups":`Allow set of the compact groups`,alpha:`alpha`,"any Node.js stream. If an objectMode stream is provided then the entire info object will be written. Otherwise info[MESSAGE] will be written":`any Node.js stream. If an objectMode stream is provided then the entire info object will be written. Otherwise info[MESSAGE] will be written`,apply:`Apply`,array:`array`,authors:`authors`,auto:`auto`,available:`available`,base_settings_hint:`Changing these values can lead to a non-operational NexoWatt EOS system. Unless you knoww exactly what you do please better use "iob setup custom" to change the database type or basic database settings.`,beta:`beta`,boolean:`boolean`,bug:`bugtracker`,"built-in MCP server of admin":`built-in MCP server of admin`,cancel:`Cancel`,cannotGetAccessToken:`Cannot get access token`,cert_path_note:`You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop`,certificate:`certificate`,certs_hint:`You can use absolute path of certificate, '/opt/certs/cert.pem' for example, or you can and drop files here`,"change view mode":`change view mode`,channel:`channel`,clear:`clear`,"climate-control_group":`Climate Control`,climate_group:`Сlimate`,"close on ready":`close on ready`,"cloud wizard category":`This category includes adapters to interact with cloud services such as Amazon Alexa, Google Home or IFTT. Remote access to your visualization can also be established with such adapters.`,"cloud wizard description":`With the NexoWatt EOS Cloud Adapter, you can easily access various visualization adapters via a secure connection, no matter where you are. This means you can control your home from anywhere. The Cloud Adapter also allows you to maintain your NexoWatt EOS remotely by giving you access to the Admin Adapter. In addition, you can even access the visualization adapters via the NexoWatt EOS Visu app (available for iOS and Android). So you always have full control over your smart home from the comfort of your smartphone or laptop.`,collapse:`collapse`,"collapse all":`collapse all`,comma:`comma`,"command execution":`Command execution`,common:`common`,"common adapters_group":`Common`,common_color:`color`,common_def:`default value`,common_delete_tip:`If you want delete some attributes in "common" you must set it to "null"`,common_desc:`description`,common_icon:`icon`,common_max:`max value`,common_min:`minimal value`,common_read:`read allowed`,common_role:`role`,common_states:`predefined values`,common_type:`type`,common_unit:`measure unit`,common_write:`write allowed`,communication_group:`Communication`,"compact groups":`Compact groups`,config:`Settings`,"config instance":`config instance`,"confirm password":`Confirm password`,confirm_change_repo:`The "Beta" repository contains adapter versions that have not been fully tested. Please report problems with these versions to the developer on GitHub or in the relevant forum threads. Use this adapter version at your own risk.`,connected:`connected`,copied:`copied`,copy:`copy`,"copy note":`Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close.`,"create operation":`create`,credential_type_ai:`AI`,credential_type_aws:`AWS`,credential_type_azure:`Azure`,credential_type_cloud:`Cloud`,credential_type_custom:`Custom`,credential_type_email:`E-mail`,credentials_hint:`Central storage for credentials (e-mail, cloud, AI). Adapters reference them by ID, passwords and keys are stored encrypted.`,current:`current`,"custom enum":`?ustom enum`,"custom group":`Custom group`,"custom range":`custom range`,daemon:`daemon`,"date-and-time_group":`Date and Time`,"days ago":`days ago`,daysShortText:`d.`,debug:`debug`,default:`default`,"default group":`default group`,delete:`delete`,"delete adapter":`delete adapter`,"delete group":`delete group`,"delete operation":`delete`,"delete script":`delete script`,"delete user":`delete user`,desc:`desc`,description:`Description`,device:`device`,"diag-note":`Help us to make NexoWatt EOS even better! <br> Allow the transmission of anonymous usage statistics and crash reports. The exact scope of the data sent to iobroker.org when updating the adapter list can be selected below and is shown in the overview on the right. The data does not contain any personal information and helps us to set the priorities for the further development of NexoWatt EOS in the interest of all users and to be able to correct occurring errors quickly.<br>Much thanks for supporting our hard work by agreeing to the transmission of the statistical data!`,"diag-type-note-extended":`This is a description of the extended statistics`,"diag-type-note-no-city":`This is a description of the statistics WITHOUT CITY`,"diag-type-note-none":`Nothing goes anywhere`,"diag-type-note-normal":`Regular statistics`,different:`different`,disabled:`disabled`,"do not show":`do not show`,edit:`edit`,"edit enum":`edit enum`,"edit enums":`Edit enumerations for`,"edit file":`edit file`,"edit group":`edit group`,"edit instance":`edit instance`,"edit script":`edit script`,"edit user":`edit user`,"edit value":`Edit value`,"email wizard description":`With the NexoWatt EOS e-mail adapter, you can send yourself messages as soon as something changes in your system. These notifications can contain not only textual information, but also images and other files. This way, you are always up to date and can immediately recognize important events in your smart home.`,enabled:`enabled`,"enabled and OK":`enabled and OK`,"enabled, alive, but not connected to controller":`enabled, alive, but not connected to controller`,"enabled, alive, but not connected to device or service":`enabled, alive, but not connected to device or service`,"enabled, but not alive":`enabled, but not alive`,energy_group:`Energy`,engine:`engine`,"engine type":`engine type`,enterLogin:`Login name`,enterPassword:`Password`,error:`error`,events:`events`,"execute operation":`Execute operation`,expand:`expand`,"expand all":`expand all`,extended:`extended`,false:`false`,"file permissions":`File permissions`,filter_customs:`Settings`,filter_func:`Function`,filter_id:`ID`,filter_name:`Name`,filter_role:`Role`,filter_room:`Room`,filter_type:`Type`,"for ioBroker.net portal":`for NexoWatt EOS.net portal`,"for new instances":`for new instances`,from:`from`,garden_group:`Garden`,general_group:`General`,geoposition_group:`Geo position`,github_note:`Please note: adapter dependencies are not checked when using this installation method. Please check them yourself. You will also have to manually create an instance after the installation if necessary.`,github_warning:`Don't install adapters from %s unless asked to by a developer or if you are 100% sure what you are doing! Adapters on %s may not work like they should (they are still under development). Only install them if you are participating in a test! Please wait for an official release!`,group_acl_create:`create`,group_acl_delete:`delete`,group_acl_execute:`shell execution`,group_acl_file:`File permissions`,group_acl_http:`http requests`,group_acl_list:`list`,group_acl_object:`Object permissions`,group_acl_other:`Other permissions`,group_acl_read:`read`,group_acl_sendto:`sendTo`,group_acl_state:`State permissions`,group_acl_users:`Users permissions`,group_acl_write:`write`,groups:`groups`,hardware_group:`Hardware`,health_group:`Health`,"hide ignored":`hide ignored`,"hide suggested":`hide suggested`,history:`history`,"history data":`history data`,"history wizard category":`With adapters in this category, you can record data to visualize it over time. One example is energy consumption by time of day.`,"history wizard description":`With the NexoWatt EOS History Adapter, you can record data to visualize it over time or perform historical analyses. The best thing about it is that the history adapter stores the data locally and does not require any additional external software. This allows you to analyze power consumption over time, for example, and use energy more efficiently.`,host:`host`,household_group:`Household`,"http operation":`http`,id:`ID`,"in seconds":`in seconds`,info:`info`,infrastructure_group:`Infrastructure`,"input events":`input events`,install:`install`,"install specific version":`Install a specific version`,installed:`installed`,"installed adapters":`Filter installed adapters`,instance:`instance`,"instance number":`Desired instance number`,"ioBroker Enums":`NexoWatt EOS enums`,"ioBroker States":`NexoWatt EOS states`,"ioBroker adapter instances":`NexoWatt EOS adapter instances`,"ioBroker adapter scripts":`NexoWatt EOS adapter scripts`,"ioBroker adapters":`NexoWatt EOS adapters`,"ioBroker assistant":`NexoWatt EOS assistant`,"ioBroker certificates":`NexoWatt EOS certificates`,"ioBroker groups":`NexoWatt EOS groups`,"ioBroker hosts":`NexoWatt EOS hosts`,"ioBroker is not connected":`NexoWatt EOS is not connected`,"ioBroker is running":`ioBroker is running`,"ioBroker location":`NexoWatt EOS location`,"ioBroker repositories":`NexoWatt EOS repositories`,"ioBroker users":`NexoWatt EOS users`,"iot wizard description":`With the NexoWatt EOS IoT Adapter, you can easily connect your NexoWatt EOS to voice assistants like Amazon Alexa and Google Home. This makes controlling your smart home even more intuitive and convenient. Additionally, you can send notifications directly to your NexoWatt EOS Visu App to stay informed about important events. And the best part: With custom services, you can even send your own data to NexoWatt EOS via webhooks to trigger IFTTT automations and make your smart home even smarter.`,"iot-system_group":`IoT systems`,"iot-systems_group":`IoT Systems`,"javascript wizard description":`With the NexoWatt EOS JavaScript Adapter, you can not only create simple logics, but also very complex automations. Whether you want to write JavaScript code or prefer to work graphically, the rules engine allows even non-programmers to easily assemble logics. You can even use Blockly, a visual programming language, to implement your ideas. For experts, there is the option of creating scripts in TypeScript in addition to JavaScript support.`,"js-controller upgrade instructions":`js-controller upgrade instructions`,keywords:`keywords`,"last 10 minutes":`last 10 minutes`,"last 12 months":`last 12 months`,"last 2 weeks":`last 2 weeks`,"last 24 hours":`last 24 hours`,"last 30 days":`last 30 days`,"last 30 minutes":`last 30 minutes`,"last hour":`last hour`,"last week":`last week`,lc:`Last change`,"less output":`Less logs`,letsnecrypt_help:`This are settings for Let's Encrypt account. To get the free certificates for your domain. You can read more <a href="https://letsencrypt.org/" target="_blank">here</a>.`,letsnecrypt_help_domains:`E.g: 'example.com, www.example.com'`,letsnecrypt_help_email:`Please use your email address. It will be used for your account.`,letsnecrypt_help_path:`Directory name where the certificates will be stored. This is always relative to configuration directory`,license:`license`,"license agreement":`License agreement`,"license not agree":`Do not agree with the license!`,license_checkbox:`I agree with the collection of anonymous statistics.<br>(This can be disabled in settings)`,lighting_group:`Lighting`,link:`link`,list:`list`,"list operation":`list elements`,location:`Path`,"log level":`Log level`,"logic wizard category":`With logic adapters, you can implement simple logics such as switching devices depending on events. More complex logic such as shutter automation is also possible.`,logic_group:`Logic`,login:`Log in`,loginTitle:`NexoWatt EOS`,loglevel:`loglevel`,"max:":`to:`,media_group:`Media`,members:`members`,memlimit:`RAM limit`,message:`message`,messaging_group:`Messaging`,metering_group:`Metering`,"min:":`from:`,"misc-data_group":`Misc. data`,mixed:`mixed`,mode:`mode`,monday:`monday`,"more output":`More output`,move_states_with_history_warning:`Please note, that the history of the states cannot be moved. The same is about usage in others adapters for logic or visualisation.`,ms:`ms`,multi:`multistate`,multimedia_group:`Multimedia`,name:`name`,native:`native`,network_group:`Network`,new:`new`,"new certificate":`new certificate`,"new group":`new group`,"new script":`new script`,"new user":`new user`,newObject:`New object`,"no-city":`no city`,"node-red":`node-red`,none:`none`,normal:`normal`,"not ack":`not ack`,"not agree":`Don't agree`,"not maintained":`not maintained`,"notification-manager wizard description":`With the Notification Manager Adapter, you as a user can be informed about system notifications. For example, you will be notified via Telegram or email as soon as there is a serious problem in your system.
|
|
149
149
|
|
|
150
150
|
A simple example: If there are problems with the available storage space, you will now be notified immediately, instead of wondering why parts of your automation are no longer working as they should.
|
|
151
151
|
|
|
@@ -201,8 +201,8 @@ lub „Dalej”, aby użyć urządzeń z poprzedniego procesu wykrywania`,proces
|
|
|
201
201
|
举个简单的例子: 如果可用存储空间出现问题,您就会立即收到通知,而不用再纠结自动化系统的某些部分为何不再正常工作。
|
|
202
202
|
|
|
203
203
|
您可以根据消息类别自由配置用于通知的适配器(如 Telegram)。如果您最喜欢的消息适配器崩溃了,您也可以配置一个替代消息适配器来接管。`,"notifications wizard category":`此类别中的适配器允许您收到系统中的事件通知并向您发送个性化消息。`,"npm error":`npm错误`,npm_warning:`使用此对话框,您可以直接从 %s 安装 Beta/最新适配器版本。这些版本可能尚未经过全面测试,因此仅当您需要这些版本的修复或新功能时才安装它们。当开发人员认为版本稳定时,它将在稳定存储库中进行更新。`,number:`数`,object:`设备`,"object permissions":`设备权限`,"object(s)":`对象`,of:`/`,offline:`offline`,ok:`好的`,once:`运行一次`,online:`online`,"only in this browser session":`仅在此浏览器会话中`,"open web page":`打开插件的网页`,"or reboot server, then ioBroker should restart and you can be sure that all old processes were finished.":`或重新启动服务器,然后NexoWatt EOS应该重新启动,并且您可以确保所有旧进程都已完成。`,os:`操作系统`,"other permissions":`其他权限`,"output events":`输出事件`,"parent name":`父节点名字`,password:`密码`,permissionError:`权限错误`,"place here":`将文件放在这里`,planned:`计划`,platform:`平台`,point:`点`,popular:`流行`,press_discover:`按“发现”查找网络中的设备(之前关闭网络防火墙/流量分析系统!)
|
|
204
|
-
或“下一步”使用先前发现过程中的设备`,process:`处理`,processes:`流程`,protocols_group:`协议`,"pushover wizard description":`有了 NexoWatt EOS Pushover 适配器,您就可以自己向安卓和 iOS 设备发送信息,并使用 Pushover API 的各种功能。通过这些功能,您不仅可以发送简单的文本信息,还可以附加图片和其他文件。您还可以通过设置不同的优先级或为不同事件设置特定的声音,根据个人需要定制通知。`,raw:`原始(仅限专家)`,read:`读`,"read only":`只读`,"read operation":`读`,readme:`自述`,reload:`重新加载`,"reload instance":`重新加载程序`,repeat:`重复`,repo_update_hint:`您已配置为运行“beta”存储库的自动升级,请注意,如果 beta 存储库处于活动状态,则此适配器将根据此配置自动提取 beta 更新!`,repository:`repository`,rest:`休息(只读)`,restart:`自动重启`,"restart script":`重启自动化`,restartLoop:`重新启动循环`,role:`角色`,runtime:`运行`,save:`保存`,"saved:":`已保存:`,"scenes wizard description":`使用 NexoWatt EOS 场景适配器,您可以将多个数据点组合到场景中,只需点击一下即可触发复杂的操作。试想一下,创建一个名为 "影院 "的场景,在这个场景中,Harmony Hub 会打开所有必要的设备,调暗灯光,并在屏幕降低时打开阅读灯。您还可以设置群组,根据场景的活动或非活动状态,为每个场景定义两种不同的连接数据点状态。`,schedule:`日程`,schedule_group:`时间表`,script_group:`自动化`,"select member by double click":`双击选择成员`,"sendto operation":`发送操作`,"serial number (UUID) in license is for other device":`许可证中的序列号 (UUID) 用于其他设备`,service_group:`保养`,severity:`严重`,"show (default)":`显示(默认)`,"show ignored":`显示被忽略`,"show suggested":`显示建议`,"show/hide item":`显示/隐藏项目`,"signal-cmb wizard description":`有了 NexoWatt EOS Signal-CMB 适配器,您就可以使用 Signal 信使通过 CallMeBot 服务发送消息。支持文本内容和表情符号,让您的信息栩栩如生。用户可以方便地了解智能家居中发生的事件,即使在旅行中也能始终掌握最新信息。`,silly:`愚蠢`,"sql wizard description":`使用 NexoWatt EOS SQL 适配器,您可以记录数据,以便对其进行长期可视化或历史分析。SQL 适配器将数据写入外部 SQL 数据库,该数据库可在同一主机或不同主机上运行。也支持 SQLite 数据库。与历史适配器相比,SQL 更适合记录大量数据,但需要手动设置。`,stable:`稳定`,"standalone MCP adapter":`独立式 MCP 适配器`,state:`州`,"state permissions":`状态权限`,stepEnd:`步骤 (至当前值)`,stepMiddle:`步骤 (中间)`,stepStart:`步骤 (值至下一个)`,stop_admin:`您正在尝试停止当前的管理实例。您将无法通过浏览器配置NexoWatt EOS。您可以稍后通过CLI命令“ iob start %s”启动admin。你确定吗?`,storage_group:`存储`,string:`串`,subscribe:`订阅`,sunday:`星期日`,switch:`开关`,switch_db_note:`建议不要在此设置中更改数据库的类型,因为不会进行任何数据迁移。最好使用CLI命令“ iob setup custom”,以便将所有数据迁移到新数据库。确定要在此处切换数据库类型吗?`,"telegram wizard description":`有了 NexoWatt EOS Telegram 适配器,您就可以通过 Telegram Messenger 向自己发送信息,这样当系统发生变化时,您就可以随时了解最新情况。除文本信息外,您还可以发送图片和其他文件。您甚至可以发送问题,并直接在 NexoWatt EOS 中处理答案。`,"temporary log level":`临时日志级别`,terminal:`终端`,"third-party_group":`第三方`,"this 2 weeks":`这2个星期`,"this adapter does not allow multiple instances":`此插件不允许多个程序同时运行`,"this day":`这天`,"this month":`这个月`,"this week":`本星期`,"this year":`今年`,time:`时间`,"time-and-date_group":`时间和日期`,timeOffset:`时间偏移`,title:`标题`,"to apply one item":`申请一件`,"to apply with children":`申请项目和儿童`,"to fix these issues and upgrade command run again.":`解决这些问题并再次运行upgrade命令。`,today:`今天`,tooltip_ack:`已确认`,tooltip_copyState:`将状态值复制到剪贴板`,tooltip_customConfig:`设定值`,tooltip_deleteObject:`删除物件`,tooltip_editObject:`编辑物件`,tooltip_editState:`修改状态值`,tooltip_from:`资源`,tooltip_lc:`最后更改时间`,tooltip_quality:`质量`,tooltip_ts:`时间戳记`,tooltip_user:`用户`,tooltip_value:`值`,true:`正常`,ts:`时间戳`,type:`类型`,unit:`单元`,unknown:`未知`,update:`刷新`,"update adapter information":`更新插件信息`,update_info_no_net:`有关更新控制器的信息,请访问以下页面: <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.docs/blob/master/admin/zh-cn/controller-upgrade.md" target="_blank">Update JS-Contoller</a>`,updated:`刷新`,updates:`刷新`,"updating %s to %s...":`更新 %s 到 %s...`,upload:`上传`,"use GitHub for issues":`我们重视您对我们软件的评分和想法。对于错误报告,请使用我们的 GitHub 问题跟踪器,当您留下评论时,请考虑未解决的问题可能会影响您的体验。您的反馈有助于我们改善。感谢您成为我们社区的一部分!`,"user permissions":`用户权限`,users:`用户`,"users permissions":`用户权限`,utility_group:`实用工具`,val:`值`,value:`值`,"value.from":`来自于`,"value.lc":`上次更新`,"value.q":`质量`,"value.ts":`时间戳`,"value.val":`值`,vehicle_group:`车辆`,version:`版本`,"vis-2 wizard description":`NexoWatt EOS Vis 2 适配器是为您的智能家居提供的现代化、功能强大的可视化解决方案。有了这个适配器,您就可以根据自己的意愿,用现代小部件创建自己的可视化系统。无论您是想将仪表盘设计成简约风格还是具有多种功能,都有无限可能。按自己喜欢的方式设计智能家居界面吧!`,vis_group:`NexoWatt EOS.vis`,visualisation_group:`可视化`,"visualization wizard category":`借助此类适配器,您可以构建仪表板以通过 NexoWatt EOS Visu 应用程序或 Web 界面控制您的家庭。`,"visualization-icons_group":`可视化图标`,"visualization-widgets_group":`可视化小部件`,visualization_group:`可视化`,vote:`投票`,vote21:`选票`,votes:`票数`,votes2:`选票`,warn:`警告`,weather:`天气`,"weather wizard category":`通过天气适配器,您可以获得当地天气信息并将其用于可视化和自动化。`,weather_group:`天气`,"weatherunderground wizard description":`有了 NexoWatt EOS Weather Underground 适配器,您就可以在 NexoWatt EOS 中使用天气数据。例如,这意味着下雨时可以提醒您关闭打开的窗户,或者在暴风雨来临时自动收回遮阳篷。这样,您的智能家居就能更好地适应当前的天气条件,确保更加舒适和安全。`,wetty:`Wetty`,"with js-controller":`带有 js 控制器`,"wizard adapter general description":`从您希望直接安装的适配器中进行选择。您可以稍后在 "适配器 "选项卡中安装其他适配器。`,"wizard welcome description":`此向导将引导您完成新 ioBroker 安装的最重要设置。只需几分钟,所有设置以后都可以更改。`,write:`写`,"write operation":`写`,wrongPassword:`用户名或密码无效`,yesterday:`昨天`,"Åland Islands":`奥兰群岛`,"Serial port":`串口`,"TCP port":`TCP 端口`,"UDP port":`UDP 端口`,"USB device":`USB 设备`,Bluetooth:`蓝牙`,GPIO:`GPIO`,"Also registered by: %s":`也被以下实例注册:%s`,Resource:`资源`,Registered:`注册时间`,"The instance runs and holds the resource":`实例正在运行并占用该资源`,"The instance does not run and would take the resource when started":`实例未运行,启动时将占用该资源`,"In use":`使用中`,Reserved:`已预留`,"Used resources":`已占用的资源`,"No instance has registered a resource":`没有实例注册资源`,'Adapter "%s" allows only one instance, and %s exists already':`适配器 "%s" 只允许一个实例,而 %s 已存在`,'Adapter "%s" allows only one instance per host, and %s exists already on host "%s"':`适配器 "%s" 每个主机只允许一个实例,而 %s 已存在于主机 "%s" 上`,"The admin was updated. Please load the page anew.":`管理界面已更新,请重新加载页面。`,"The connection is not ready yet. Please wait a moment and try again.":`连接尚未就绪。请稍等片刻后重试。`},gy=`admin.chunkReloadTs`,_y=2e4;function vy(e){let{message:t,name:n}=typeof e==`object`&&e?e:{message:e};return typeof t==`string`?t.includes(`Failed to fetch dynamically imported module`)||t.includes(`error loading dynamically imported module`)||t.includes(`Importing a module script failed`)||t.includes(`Unable to preload CSS`)||n===`ChunkLoadError`:!1}function yy(){let e=0;try{e=parseInt(window.sessionStorage.getItem(gy)||`0`,10)||0}catch{}if(Date.now()-e<_y)return!1;try{window.sessionStorage.setItem(gy,Date.now().toString())}catch{}return window.location.reload(),!0}function by(e){yy()&&e.preventDefault()}function xy(e){return Ht.lazy(()=>e().catch(e=>{if(vy(e)&&yy())return new Promise(()=>{});throw e}))}x();var Sy=[`tab-overview`,`tab-adapters`,`tab-instances`,`tab-logs`],Cy=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-objects`,`tab-enums`,`tab-logs`,`tab-users`,`tab-hosts`,`tab-files`,`tab-devicemanager`],wy=xy(()=>r(()=>import(`./Overview-CitzUjBF.js`),__vite__mapDeps([35,1,2,3,36,9,15,25,37,28]),import.meta.url)),Ty=xy(()=>r(()=>import(`./Adapters-dDEp7o5h.js`),__vite__mapDeps([38,1,2,3,36,4,5,6,39,7,8,9,40,41,10,42,11,12,43,44]),import.meta.url)),Ey=xy(()=>r(()=>import(`./Instances-CUX5mxMQ.js`),__vite__mapDeps([45,2,1,3,36,4,5,9,39,7,8,42,43,44,46,47,20,48,22,49,23]),import.meta.url)),Dy=xy(()=>r(()=>import(`./Intro-BhQmHn3A.js`),__vite__mapDeps([50,1,2,3,36,7,9,18,21,49,23,24,25]),import.meta.url)),Oy=xy(()=>r(()=>import(`./Logs-B5SpNqHq.js`),__vite__mapDeps([51,1,2,3,36,12,26]),import.meta.url)),ky=xy(()=>r(()=>import(`./Files-COnUtEbg.js`),__vite__mapDeps([52,2,1,3,36,43,44]),import.meta.url)),Ay=xy(()=>r(()=>import(`./Objects-COg_cFkz.js`),__vite__mapDeps([53,2,1,3,31,36,47,44,41,11,43,17,34,33,27,37]),import.meta.url)),jy=xy(()=>r(()=>import(`./Users-Cu93_-VF.js`),__vite__mapDeps([54,1,2,3,36,8,55,16,29]),import.meta.url)),My=xy(()=>r(()=>import(`./Enums-DjldGElU.js`),__vite__mapDeps([56,2,1,3,36,55,14,15,16,17,18]),import.meta.url)),Ny=xy(()=>r(()=>import(`./CustomTab-B4ywHrnT.js`),__vite__mapDeps([57,2,1,3,36,47]),import.meta.url)),Py=xy(()=>r(()=>import(`./ConfigManager-DbqTWi2N.js`),__vite__mapDeps([58,1,2,3,13]),import.meta.url)),Fy=xy(()=>r(()=>import(`./Hosts-CwU1LujG.js`),__vite__mapDeps([59,2,1,3,36,5,40,41,10,42,43,44,19,20,21,48]),import.meta.url)),Iy=xy(()=>r(()=>import(`./EasyMode-A2E3hSMo.js`),__vite__mapDeps([60,1,2,3,46,36,47]),import.meta.url)),Ly={},Ry=()=>String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),zy=(e=Ry())=>[`admin`,`service`].includes(e);(window.location.search||``).replace(/^\?/,``).split(`&`).forEach(e=>{let t=e.split(`=`);t[0]&&(Ly[t[0]]=t[1]===void 0||decodeURIComponent(t[1]))});var By={root:{display:`flex`,height:`100%`},appBar:e=>({transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}),logoWhite:{backgroundColor:`#FFFFFF`},appBarShift:e=>({width:`calc(100% - 180px)`,ml:180/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftEdit:e=>({width:`calc(100% - 250px)`,ml:250/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftCompact:e=>({width:`calc(100% - 50px)`,ml:50/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),menuButton:{marginRight:16},hide:{display:`none`},content:e=>{var t,n,r;return{flexGrow:1,padding:1,paddingTop:0,transition:e.transitions.create(`margin`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowY:`auto`,mt:`${(t=e.mixins.toolbar)==null?void 0:t.minHeight}px`,"@media (min-width:0px) and (orientation: landscape)":{mt:(n=e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`])!=null&&n.minHeight?`${e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`].minHeight}px`:void 0},"@media (min-width:600px)":{mt:(r=e.mixins.toolbar[`@media (min-width:600px)`])!=null&&r.minHeight?`${e.mixins.toolbar[`@media (min-width:600px)`].minHeight}px`:void 0}}},contentMargin:{ml:-180/8},contentMarginEdit:{ml:-250/8},contentMarginCompact:{ml:-50/8},contentShift:e=>({transition:e.transitions.create(`margin`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),ml:0}),expertIcon:{width:22,height:22},expertIconActive:{},baseSettingsButton:{color:`red`},avatarNotVisible:{opacity:0,marginLeft:5,transition:`opacity 0.3s`,width:`initial`},avatarVisible:{opacity:1},cmd:{animation:`1s linear infinite alternate $myEffect`,opacity:.2},errorCmd:{color:`#a90000`,animation:`0.2s linear infinite alternate myEffect2`},performed:e=>({color:e.palette.mode===`light`?`#3bfd44`:`#388e3c`,animation:`0.2s linear infinite alternate myEffect2`}),wrapperButtons:{display:`flex`,marginRight:`auto`,overflowY:`auto`,alignItems:`center`},flexGrow:{flexGrow:2},floatingButtons:{position:`fixed`,top:4,left:4,zIndex:1200,display:`flex`,gap:.5},contentNoAppBar:{mt:0,"@media (min-width:0px) and (orientation: landscape)":{mt:0},"@media (min-width:600px)":{mt:0}},contentMenuButtonSpace:{pt:`44px`},styleVersion:{fontSize:10},wrapperName:{display:`flex`,flexDirection:`column`,marginRight:10},expertBadge:{mt:`11px`,mr:`11px`},siteName:{lineHeight:`48px`,fontSize:24,marginLeft:10,marginRight:10,display:`inline-block`,verticalAlign:`middle`},tooltip:{pointerEvents:`none`}};function Vy(e){return e.native||={localStorage:{},sessionStorage:{}},e.native.localStorage||(e.native={localStorage:e.native,sessionStorage:{}}),e.native.sessionStorage||={},e}var Hy=1e4,Uy=5e3,Wy=5e3,Gy=1e3;function Ky(e,t){let n;return Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(`${t} got no answer`)),Hy)})]).finally(()=>clearTimeout(n))}function qy(e,t){for(let n of[`localStorage`,`sessionStorage`])for(let[r,i]of Object.entries(t[n]))i===null?delete e[n][r]:e[n][r]=i}var Jy={_id:``,type:`state`,common:{name:`Admin settings`,type:`boolean`,read:!0,write:!1,role:`state`},native:{localStorage:{},sessionStorage:{}}},Yy=class e extends d{constructor(t){super(t),M(this,`translations`,void 0),M(this,`_tempAllStored`,!0),M(this,`refConfigIframe`,null),M(this,`expireInSecInterval`,null),M(this,`toggleThemePossible`,void 0),M(this,`adminGuiConfig`,void 0),M(this,`logsWorker`,null),M(this,`instancesWorker`,null),M(this,`hostsWorker`,null),M(this,`adaptersWorker`,null),M(this,`objectsWorker`,null),M(this,`repoInfoPromise`,null),M(this,`repoInfoRun`,0),M(this,`guiSettings`,null),M(this,`guiSettingsChanges`,{localStorage:{},sessionStorage:{}}),M(this,`guiSettingsWrite`,Promise.resolve()),M(this,`localStorageTimer`,null),M(this,`guiSettingsRetryTimer`,null),M(this,`languageSet`,!1),M(this,`socket`,null),M(this,`adminInstance`,``),M(this,`newsSubscription`,void 0),M(this,`newsSubscribeTimer`,null),M(this,`doNotAskSessionExpiration`,0),M(this,`tabsInfo`,null),M(this,`pendingCommandTimer`,null),M(this,`pendingCommand`,null),M(this,`chatBusy`,!1),M(this,`lastHash`,window.location.hash),M(this,`chatLeaveConfirmed`,!1),M(this,`connectionLostAt`,0),M(this,`localStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.localStorage[e]}),M(this,`localStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.localStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.localStorage[e]=t.toString(),this.guiSettingsChanges.localStorage[e]=t.toString()),this.localStorageSave()}),M(this,`localStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.localStorage,e)&&(delete this.guiSettings.native.localStorage[e],this.guiSettingsChanges.localStorage[e]=null,this.localStorageSave())}),M(this,`sessionStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.sessionStorage[e]}),M(this,`sessionStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.sessionStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.sessionStorage[e]=t.toString(),this.guiSettingsChanges.sessionStorage[e]=t.toString()),this.localStorageSave()}),M(this,`sessionStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.sessionStorage,e)&&(delete this.guiSettings.native.sessionStorage[e],this.guiSettingsChanges.sessionStorage[e]=null,this.localStorageSave())}),M(this,`toggleTranslation`,()=>{(window._localStorage||window.localStorage).setItem(`App.noTranslation`,this.state.noTranslation?`false`:`true`),this.setState({noTranslation:!this.state.noTranslation})}),M(this,`onEosPolicyChanged`,e=>{var t;let n=e instanceof CustomEvent?e.detail:null;if(!n||typeof n!=`object`||!(`policy`in n))return;let r=n.policy,i=`unknown`;if(r&&typeof r==`object`&&`authenticated`in r&&r.authenticated===!0&&`role`in r&&typeof r.role==`string`&&[`admin`,`service`,`installer`,`enduser`].includes(r.role)&&!(`mustChangePassword`in r&&r.mustChangePassword===!0)&&(i=r.role),window.NEXOWATT_EOS_ACCESS_ROLE=i,i===this.state.eosAccessRole)return;let a=[`admin`,`service`].includes(i),o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);this.setState({eosAccessRole:i,expertMode:a&&(o?o===`true`:!!((t=this.state.systemConfig)!=null&&t.common.expertMode)),expertModeDialog:!1})}),M(this,`updateHosts`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts));e.forEach(e=>{let n=t.find(t=>t._id===e.id);if(n){let r=t.indexOf(n);e.obj?t[r]=e.obj:t.splice(r,1)}else t.push(e.obj)}),this.setState({hosts:t})}),M(this,`repoChangeHandler`,()=>{this.readRepoAndInstalledInfo(this.state.currentHost,{update:!0}).then(()=>console.log(`Repo updated!`))}),M(this,`adaptersChangeHandler`,e=>{let t=JSON.parse(JSON.stringify(this.state.installed)),n=!1;e.forEach(e=>{let r=e.id.split(`.`)[2];e.type===`deleted`||!e.obj?t[r]&&(n=!0,delete t[r]):t[r]?Object.keys(t[r]).forEach(i=>{e.obj&&t[r][i]!==e.obj.common[i]&&(t[r][i]=e.obj.common[i],n=!0)}):(t[r]={version:e.obj.common.version},n=!0)}),n&&this.setState({installed:t})}),M(this,`onSessionExpiration`,e=>new Promise(t=>{let n=Math.max(0,e-Date.now()+500);this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.expireInSecInterval=setTimeout(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)},n),t(!1)})),M(this,`onDiscoveryAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.discoveryAlive&&this.setState({discoveryAlive:!!(t!=null&&t.val)})}),M(this,`onDiscoveryObject`,(e,t)=>{let n=Bv(t);n!==this.state.discoveryProposals&&this.setState({discoveryProposals:n})}),M(this,`getDiscoveryModal`,()=>this.state.systemConfig&&this.socket?E(Kv,{themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket,systemConfig:this.state.systemConfig.common,dateFormat:this.state.systemConfig.common.dateFormat,currentHost:this.state.currentHost,defaultLogLevel:this.state.systemConfig.common.defaultLogLevel||`info`,repository:this.state.repository,hosts:this.state.hosts,onClose:()=>d.doNavigate(null)}):null),M(this,`handleNewNotifications`,async e=>{let t={warning:0,other:0};if(!e)this.setState({noNotifications:t,notifications:{}});else{for(let n of Object.values(e))if(n!=null&&n.result){for(let[e,r]of Object.entries(n.result))if(e!==`system`)for(let e of Object.values(r.categories))for(let n of Object.values(e.instances)){let r=e.severity===`alert`;t[r?`warning`:`other`]+=n.messages.length}}if(this.instancesWorker){let n=await this.instancesWorker.getObjects();this.setState({noNotifications:t,notifications:{notifications:e,instances:n}})}}}),M(this,`showAdaptersWarning`,async(e,t)=>{if(!e||!e[t]||!e[t].result)return;let n=e[t].result;if(n!=null&&n.system&&Object.keys(n.system.categories).length){var r;await((r=this.instancesWorker)==null?void 0:r.getObjects().then(e=>e&&this.setState({showHostWarning:{host:t,instances:e,result:n}})))}}),M(this,`onNews`,async(e,t)=>{if(!this.socket)throw Error(`Socket not initialized`);try{var n;if(!((n=this.state.systemConfig)!=null&&n.common.licenseConfirmed))return;let e=await this.socket.getState(this.ownNewsState(`newsLastId`));if(t!=null&&t.val){let n=null;try{n=JSON.parse(t.val)}catch{console.error(`Cannot parse news: ${t.val}`)}if(n!=null&&n.length&&n[0].id!==(e==null?void 0:e.val)){var r,i,a;let t=await this.socket.getUuid(),o=await this.socket.getHostInfo(this.state.currentHost).catch(()=>null),s=await this.socket.getCompactInstances().catch(()=>null),c;if(this.state.currentHost){let e=await this.socket.getDiagData(this.state.currentHost,`normal`);c=e==null?void 0:e.objectsType}let l=await((r=this.objectsWorker)==null?void 0:r.getObjects()),u=Object.keys(l||{}).length;await((i=this.repoInfoPromise)==null?void 0:i.catch(()=>{}));let d=bd(n,e==null?void 0:e.val,{lang:j.getLanguage(),adapters:this.state.adapters,instances:s||{},nodeVersion:o&&o[`Node.js`]||`?`,npmVersion:o&&o.NPM||`?`,jsControllerVersion:((a=this.state.installed)==null||(a=a[`js-controller`])==null?void 0:a.version)||``,os:o&&o.os||`?`,activeRepo:this.state.systemConfig.common.activeRepo,uuid:t,objectsDbType:c||`jsonl`,noObjects:u});d!=null&&d.length&&this.setState({showNews:{checkNews:d,lastNewsId:e==null?void 0:e.val}})}}}catch(e){console.error(`Could not process news: ${e.stack}`),this.showAlert(`Could not process news: ${e.stack}`,`error`)}}),M(this,`logsWorkerChanged`,e=>{var t;(t=this.logsWorker)==null||t.setCurrentHost(e)}),M(this,`onHashChanged`,()=>{let t=window.location.hash;this.chatBlocksLeaving(e.tabOfHash(t))?(window.history.replaceState(null,``,this.lastHash||`${window.location.pathname}${window.location.search}`),this.setState({chatLeaveDialog:{target:{hash:t},reason:`busy`}})):(this.lastHash=t,this.setState({currentTab:d.getLocation()},()=>this.setCurrentTabTitle()))}),M(this,`toggleTheme`,t=>{let n=this.state.themeName,r=t||Ne.toggleTheme(n),i=e.createTheme(r);this.setState({theme:i,themeName:r,themeType:e.getThemeType(i)},()=>{var e,t;(e=this.refConfigIframe)==null||(e=e.contentWindow)==null||e.postMessage(`updateTheme`,`*`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage({type:`updateTheme`,themeName:r},`*`)})}),M(this,`handleNavigation`,(e,t,n)=>{var r;if(e){if(this.chatBlocksLeaving(e)){this.setState({chatLeaveDialog:{target:{tab:e,subTab:t,param:n},reason:`busy`}});return}this._tempAllStored?(d.doNavigate(e,t,n),this.lastHash=window.location.hash,this.setState({currentTab:d.getLocation()})):this.setState({dataNotStoredDialog:!0,dataNotStoredTab:{tab:e,subTab:t,param:n}})}(this.props.width===`xs`||this.props.width===`sm`)&&this.handleDrawerState(J.closed),e||=((r=this.state.currentTab)==null?void 0:r.tab)||``,this.setTitle(e.replace(`tab-`,``))});try{window.alert=e=>{let t=(e==null?void 0:e.toString())??``,n=Date.now();this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):t.toLowerCase().includes(`error`)?(console.error(t),setTimeout(()=>{this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):this.showAlert(t,`error`)},Gy)):(console.log(t),this.showAlert(t,`info`))}}catch{}this.translations=Rt;let n={en:ay,de:oy,ru:sy,pt:cy,nl:ly,fr:uy,it:dy,es:fy,pl:py,uk:my,"zh-cn":hy};Object.keys(n).forEach(e=>Object.assign(this.translations[e],n[e])),j.extendTranslations(this.translations),j.setLanguage((window.navigator.language||window.navigator.userLanguage||`en`).substring(0,2).toLowerCase()),this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}}};let r=window.vendorPrefix;if(this.toggleThemePossible=!r||r===`@@vendorPrefix@@`||r===`MV`,Ly.login){let t=e.createTheme();this.state={login:!0,theme:t,themeName:e.getThemeName(t),themeType:e.getThemeType(t)}}else{let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=e.createTheme();Object.defineProperty(window,"configNotSaved",{get:()=>this.state.configNotSaved,set:e=>{let t=!e;t!==this._tempAllStored&&(this._tempAllStored=t,this.forceUpdate())},configurable:!0}),this.state={connected:!1,progress:0,ready:!1,lang:`en`,hostname:window.location.hostname,expertMode:!1,eosAccessRole:Ry(),chatDockWidth:0,hosts:[],currentHost:``,currentHostName:``,ownHost:``,currentTab:d.getLocation(),systemConfig:null,user:null,repository:{},installed:{},waitForRestart:!1,tabs:null,config:{},stateChanged:!1,theme:r,themeName:e.getThemeName(r),themeType:e.getThemeType(r),alert:!1,alertType:`info`,alertMessage:``,drawerState:n,editMenuList:!1,tab:null,dataNotStoredDialog:!1,dataNotStoredTab:null,chatLeaveDialog:null,baseSettingsOpened:!1,unsavedDataInDialog:!1,systemSettingsOpened:!1,cmd:null,cmdDialog:!1,commandHost:null,commandError:!1,commandRunning:!1,wizard:!0,performed:!1,showTips:!1,discoveryAlive:!1,discoveryProposals:0,readTimeoutMs:Xv.getReadTimeoutMs(),showSlowConnectionWarning:!1,versionAdmin:``,forceUpdateAdapters:0,noTranslation:(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`,cloudNotConnected:!1,cloudReconnect:0,showRedirect:``,redirectCountDown:0,triggerAdapterUpdate:0,updating:!1,notificationsDialog:!1,notifications:{},noNotifications:{warning:0,other:0},configNotSaved:!1,login:!1,showHostWarning:null,adapters:{},askForTokenRefresh:null},this.logsWorker=null,this.instancesWorker=null,this.hostsWorker=null}}static getDerivedStateFromError(e){return{hasGlobalError:e}}componentDidCatch(e){this.setState({hasGlobalError:e})}static async checkSsoResponse(){let e=new URLSearchParams(window.location.search);if(e.has(`ssoCode`)){try{let t=await fetch(sr(`sso-token`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:e.get(`ssoCode`)})}),n=await t.json();t.ok&&n.access_token&&ln.saveTokensStatic(n,!0)}catch(e){console.error(`Cannot finish the single sign-on: ${e}`)}window.localStorage.removeItem(`oidc_id_token`),window.location.search=``}else if(e.has(`id_token`)&&(window.localStorage.setItem(`oidc_id_token`,e.get(`id_token`)),window.location.search=``),e.has(`ssoLoginResponse`)){let t=JSON.parse(e.get(`ssoLoginResponse`));ln.saveTokensStatic(t,!0),window.location.search=``}}setUnsavedData(e){e!==this.state.unsavedDataInDialog&&this.setState({unsavedDataInDialog:e})}mustInvertBackground(e){if(!e)return!1;let t=Ne.invertColor(e,!0);return t===`#FFFFFF`&&this.state.themeType===`dark`||t===`#000000`&&this.state.themeType===`light`}localStorageSave(){this.localStorageTimer&&clearTimeout(this.localStorageTimer),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.localStorageTimer=setTimeout(()=>{this.localStorageTimer=null,this.guiSettingsWrite=this.guiSettingsWrite.then(()=>this.writeGuiSettings())},200)}async writeGuiSettings(){let e=this.guiSettingsChanges;if(!this.guiSettings||!this.socket||!Object.keys(e.localStorage).length&&!Object.keys(e.sessionStorage).length)return;this.guiSettingsChanges={localStorage:{},sessionStorage:{}};let t=`system.adapter.${this.adminInstance}.guiSettings`;try{let n=Vy(await Ky(this.socket.getObject(t),`Reading`)||JSON.parse(JSON.stringify(this.guiSettings)));qy(n.native,e),await Ky(this.socket.setObject(t,n),`Writing`),this.guiSettings&&(this.guiSettings=n,qy(this.guiSettings.native,this.guiSettingsChanges))}catch(r){var n;for(let t of[`localStorage`,`sessionStorage`])this.guiSettingsChanges[t]={...e[t],...this.guiSettingsChanges[t]};console.warn(`Could not save "${t}": ${r.message}`),(n=this.socket)!=null&&n.isConnected()&&!this.localStorageTimer&&!this.guiSettingsRetryTimer&&(this.guiSettingsRetryTimer=setTimeout(()=>{this.guiSettingsRetryTimer=null,this.localStorageSave()},Uy))}}async getGUISettings(){let e=null;if(!this.adminInstance||!this.socket)return;let t=!1;try{e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)}catch(e){t=!0,console.warn(`Could not get "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}if(!e&&!t){e=JSON.parse(JSON.stringify(Jy));try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,e)}catch(e){console.warn(`Could not update "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}}let n;try{n=await this.socket.getState(`system.adapter.${this.adminInstance}.guiSettings`)}catch{n={val:!1}}if(n!=null&&n.val){this.guiSettings=Vy(e||JSON.parse(JSON.stringify(Jy))),(Object.keys(this.guiSettingsChanges.localStorage).length||Object.keys(this.guiSettingsChanges.sessionStorage).length)&&(qy(this.guiSettings.native,this.guiSettingsChanges),this.localStorageSave()),window._localStorage={getItem:this.localStorageGetItem,setItem:this.localStorageSetItem,removeItem:this.localStorageRemoveItem},window._sessionStorage={getItem:this.sessionStorageGetItem,setItem:this.sessionStorageSetItem,removeItem:this.sessionStorageRemoveItem};let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`;this.setState({guiSettings:!0,drawerState:n,noTranslation:r},()=>{Ne.getThemeName()!==this.state.theme.name&&this.toggleTheme(Ne.getThemeName())})}else this.state.guiSettings&&(window._localStorage=void 0,window._sessionStorage=void 0,this.setState({guiSettings:!1}))}async enableGuiSettings(e,t){if(e&&!this.guiSettings&&this.socket){let e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`);this.guiSettings=e||JSON.parse(JSON.stringify(Jy)),t||!this.guiSettings.native||!Object.keys(this.guiSettings.native).length?(this.guiSettings.native={localStorage:{},sessionStorage:{}},Object.keys(window.localStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.localStorage[e]=window.localStorage.getItem(e))}),Object.keys(window.sessionStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.sessionStorage[e]=window.sessionStorage.getItem(e))}),await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,this.guiSettings),await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0})):(await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0}),window.location.reload()),await this.getGUISettings()}else if(!e&&this.guiSettings&&this.socket){if(!await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`))try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,Jy)}catch(e){console.error(`Cannot create system.adapter.${this.adminInstance}.guiSettings": ${e}`)}window._localStorage=void 0,window._sessionStorage=void 0,Object.keys(window.localStorage).forEach(e=>window.localStorage.removeItem(e)),Object.keys(window.sessionStorage).forEach(e=>window.sessionStorage.removeItem(e)),Object.keys(this.guiSettings.native.localStorage).forEach(e=>window.localStorage.setItem(e,this.guiSettings.native.localStorage[e])),Object.keys(this.guiSettings.native.sessionStorage).forEach(e=>window.sessionStorage.setItem(e,this.guiSettings.native.sessionStorage[e])),this.guiSettings=null,this.guiSettingsChanges={localStorage:{},sessionStorage:{}},this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null);try{await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!1,ack:!0})}catch(e){window.alert(`Cannot disable settings: ${e}`)}this.setState({guiSettings:!1})}}componentDidMount(){Ly.login?window.location.replace(`/login.html`):(ln.deleteTokensStatic(),window.addEventListener(`vite:preloadError`,by),window.addEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),this.state.login||(window.addEventListener(`hashchange`,this.onHashChanged,!1),this.state.currentTab.tab?this.setTitle(this.state.currentTab.tab.replace(`tab-`,``)):this.handleNavigation(`tab-intro`),this.socket=new ln({protocol:window.location.protocol,host:window.location.hostname,name:`eos-admin`,admin5only:!0,port:e.getPort(),cmdTimeout:this.state.readTimeoutMs,autoSubscribes:[`system.adapter.*`],autoSubscribeLog:!0,tokenTimeoutHandler:this.onSessionExpiration,onProgress:async e=>{if(this.socket){if(e===_.CONNECTING)this.state.connected&&(this.connectionLostAt=Date.now()),this.setState({connected:!1});else if(e===_.READY)try{let e=await this.socket.getVersion();console.log(`Stored version: ${this.state.versionAdmin}, new version: ${e.version}`),this.state.versionAdmin&&this.state.versionAdmin!==e.version&&(window.alert(`New adapter version detected. Reloading...`),setTimeout(()=>window.location.reload(),500)),this.adminInstance||=await this.socket.getCurrentInstance(),await this.getGUISettings();let n={connected:!0,progress:100,versionAdmin:e.version,disableMcp:!0};if(this.state.cmd&&/\b(?:admin|eos-admin)(?:@[-.\w]+)?(?:\s+--debug)?$/.test(this.state.cmd))n.commandRunning=!1,n.forceUpdateAdapters=this.state.forceUpdateAdapters+1,this.closeCmdDialog(()=>{this.setState(n),window.location.reload()});else{try{var t;let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);n.disableMcp=!0,e!=null&&(t=e.native)!=null&&t.language?e.native.language!==j.getLanguage()&&(console.log(`Language changed to ${e.native.language}`),j.setLanguage(e.native.language),this.languageSet?window.location.reload():this.languageSet=!0):this.socket.systemLang!==j.getLanguage()&&(console.log(`Language changed to ${this.socket.systemLang}`),j.setLanguage(this.socket.systemLang),this.languageSet?window.location.reload():this.languageSet=!0)}catch(e){console.error(`Cannot read admin settings: ${e}`)}this.setState(n)}}catch(e){console.error(`Cannot read version: ${e}`),e===`ioBroker is not connected`&&(setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10}))}else this.setState({connected:!0,progress:Math.round(_.READY/e*100)})}},onReady:async()=>{var e;if(!this.socket)throw Error(`Socket not initialized`);this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}},...(e=this.socket)==null||(e=e.systemConfig)==null||(e=e.native)==null?void 0:e.vendor},this.adminGuiConfig.admin.menu||={},this.adminGuiConfig.admin.settings||={},this.adminGuiConfig.admin.adapters||={},this.adminGuiConfig.admin.login||={};try{var t,n;try{var r;this.adminInstance||=await this.socket.getCurrentInstance(),this.adminInstance||console.error(`Cannot read admin instance!`);let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);e!=null&&(r=e.native)!=null&&r.language?j.setLanguage(e.native.language):j.setLanguage(this.socket.systemLang)}catch(e){console.warn(`Cannot read the settings of this admin: ${e.message}`),j.setLanguage(this.socket.systemLang)}this.languageSet=!0;let e=!1;try{e=await this.socket.getIsEasyModeStrict()}catch(e){console.warn(`Cannot read the easy mode: ${e.message}`)}if(await this.getGUISettings(),e){let e=await this.socket.getEasyMode();this.setState({lang:this.socket.systemLang,ready:!0,strictEasyMode:!0,easyModeConfigs:e.configs});return}this.logsWorker||=new Fd(this.socket,1e3),this.instancesWorker||=new Ld(this.socket),this.hostsWorker||=new Rd(this.socket),this.adaptersWorker||=new zd(this.socket),this.objectsWorker||=new Bd(this.socket);let a={lang:this.socket.systemLang,ready:!0};try{a.systemConfig=await this.socket.getCompactSystemConfig(),a.wizard=!a.systemConfig.common.licenseConfirmed,a.showTips=!a.wizard&&!a.systemConfig.common.tipsDisabled,await this.findCurrentHost(a),a.currentHost&&this.readRepoAndInstalledInfo(a.currentHost)}catch(e){console.log(`Error reading repo in onReady: ${e.stack}`)}this.adaptersWorker.registerRepositoryHandler(this.repoChangeHandler),this.adaptersWorker.registerHandler(this.adaptersChangeHandler),this.hostsWorker.registerHandler(this.updateHosts),this.hostsWorker.registerNotificationHandler(this.handleNewNotifications);let o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);if(a.expertMode=zy(this.state.eosAccessRole)&&(o?o===`true`:!!((t=a.systemConfig)!=null&&t.common.expertMode)),this.socket.isSecure||(n=this.socket.systemConfig)!=null&&(n=n.native)!=null&&n.vendor)try{var i;let e=await this.socket.getCurrentUser(),t=await this.socket.getObject(`system.user.${e}`);t!=null&&(i=t.native)!=null&&i.vendor&&Object.assign(this.adminGuiConfig,t.native.vendor),this.socket.isSecure&&t&&this.setState({user:{id:t._id,name:Ne.getObjectNameFromObj(t,this.socket.systemLang),color:t.common.color,icon:t.common.icon,invertBackground:t.common.color?this.mustInvertBackground(t.common.color):!1,group:await this.getLeadingGroupName(t._id)}})}catch(e){console.error(`Could not determine user to show: ${e.toString()}, ${e.stack}`),this.showAlert(e.toString(),`error`)}this.setState(a,()=>this.setCurrentTabTitle()),this.socket.subscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),this.socket.getObject(`system.discovery`).then(e=>this.onDiscoveryObject(`system.discovery`,e)).catch(e=>console.warn(`Cannot read system.discovery: ${e}`)),this.socket.subscribeObject(`system.discovery`,this.onDiscoveryObject),setTimeout(()=>this.logsWorkerChanged(this.state.currentHost),1e3),this.newsSubscribeTimer&&clearTimeout(this.newsSubscribeTimer),this.newsSubscribeTimer=setTimeout(()=>{this.newsSubscribeTimer=null,this.subscribeOwnNews().catch(e=>console.warn(`Cannot subscribe EOS news: ${e}`))},5e3),setTimeout(async()=>{var e;let t=await((e=this.hostsWorker)==null?void 0:e.getNotifications(a.currentHost));await this.handleNewNotifications(t)},3e3)}catch(e){console.error(`Error in onReady: ${e.stack}`),this.showAlert(`Error in onReady: ${e.stack}`,`error`),this.setState({ready:!0})}},onError:e=>{console.error(e);let t;t=e instanceof Error&&e.message||e.toString(),t===`ioBroker is not connected`?this.state.cloudNotConnected||(this.showAlert(j.t(t),`error`),setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10})):this.showAlert(t,`error`)}}),window.NEXOWATT_EOS_ADMIN_SOCKET=this.socket,window.NEXOWATT_EOS_SOCKET=this.socket,window.dispatchEvent(new CustomEvent(`nexowatt-eos-admin-socket-ready`))))}componentWillUnmount(){var e,t,n,r,i;if(window.removeEventListener(`hashchange`,this.onHashChanged,!1),window.removeEventListener(`vite:preloadError`,by),window.removeEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),(e=this.socket)==null||e.unsubscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),(t=this.socket)==null||t.unsubscribeObject(`system.discovery`,this.onDiscoveryObject),this.newsSubscribeTimer&&=(clearTimeout(this.newsSubscribeTimer),null),this.newsSubscription){var a;(a=this.socket)==null||a.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=void 0}(n=this.adaptersWorker)==null||n.unregisterRepositoryHandler(this.repoChangeHandler),(r=this.adaptersWorker)==null||r.unregisterHandler(this.adaptersChangeHandler),(i=this.hostsWorker)==null||i.unregisterHandler(this.updateHosts),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.pendingCommandTimer&&=(clearTimeout(this.pendingCommandTimer),null),this.pendingCommand=null,window._localStorage&&(window._localStorage=void 0,window._sessionStorage=void 0)}async findCurrentHost(e){if(!this.socket)return;if(e.hosts=await this.socket.getCompactHosts(),!this.state.currentHost){let r=(window._localStorage||window.localStorage).getItem(`App.currentHost`),i=e.hosts.find(e=>e._id===r);if(r&&i){var t;e.currentHost=i._id,e.currentHostName=((t=i.common)==null?void 0:t.name)||i._id.replace(`system.host.`,``)}else{var n;e.currentHost=e.hosts[0]._id,e.currentHostName=((n=e.hosts[0].common)==null?void 0:n.name)||e.hosts[0]._id.replace(`system.host.`,``)}}e.ownHost=e.currentHost;let r;try{r=await this.socket.getState(`${e.currentHost}.alive`)}catch(t){r=null,console.warn(`Cannot get state ${e.currentHost}.alive: ${t}`)}if(!(r!=null&&r.val))for(let t=0;t<e.hosts.length;t++)r=await this.socket.getState(`${e.hosts[t]._id}.alive`),r!=null&&r.val&&(e.currentHost=e.hosts[t]._id,e.currentHostName=e.hosts[t].common.name)}renderTokenTimeoutDialog(){return this.state.askForTokenRefresh?N(u,{open:!0,onClose:()=>e.logout(),children:[N(ce,{children:[E(de,{children:j.t(`ra_Session will expire in %s seconds. Continue?`,Math.round((this.state.askForTokenRefresh.expireAt-Date.now())/1e3))}),E(`div`,{children:E(Ae,{label:j.t(`ra_Do not ask for next 2 hours in this session`),control:E(Oe,{checked:this.state.askForTokenRefresh.doNotAsk,onChange:()=>{var e;let t={...this.state.askForTokenRefresh};t.doNotAsk=!((e=this.state.askForTokenRefresh)!=null&&e.doNotAsk),this.setState({askForTokenRefresh:t})}})})})]}),N(xt,{children:[E(H,{onClick:()=>{var e,t;let n=(e=this.state.askForTokenRefresh)==null?void 0:e.resolve;(t=this.state.askForTokenRefresh)!=null&&t.doNotAsk&&(this.doNotAskSessionExpiration=Date.now()+72e5),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.setState({askForTokenRefresh:null},()=>n==null?void 0:n(!0))},variant:`contained`,startIcon:E($o,{}),children:j.t(`ra_Continue`)}),E(H,{onClick:()=>e.logout(),variant:`outlined`,color:`grey`,startIcon:E(is,{}),children:j.t(`ra_Logout`)})]})]}):null}ownNewsState(e){if(!/^eos-admin\.(0|[1-9]\d*)$/.test(this.adminInstance))throw Error(`EOS_NEWS_INSTANCE_UNAVAILABLE`);return`${this.adminInstance}.info.${e}`}async subscribeOwnNews(){if(!this.socket)return;let e=this.ownNewsState(`newsFeed`);this.newsSubscription&&this.newsSubscription!==e&&this.socket.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=e,await this.socket.subscribeState(e,this.onNews)}renderNotificationsDialog(){var e,t;return!this.state.notificationsDialog||!this.state.systemConfig||!this.socket?null:E(gs,{notifications:((e=this.state.notifications)==null?void 0:e.notifications)||{},instances:((t=this.state.notifications)==null?void 0:t.instances)||{},onClose:()=>this.setState({notificationsDialog:!1}),ackCallback:(e,t)=>this.socket.clearNotifications(e,t),dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket})}renderHostWarningDialog(){return!this.state.showHostWarning||!this.state.systemConfig||!this.socket?null:E(jd,{instances:this.state.showHostWarning.instances,messages:this.state.showHostWarning.result.system.categories,dateFormat:this.state.systemConfig.common.dateFormat,themeType:this.state.themeType,ackCallback:e=>this.socket.clearNotifications(this.state.showHostWarning.host,e),onClose:()=>this.setState({showHostWarning:null})})}renderNewsDialog(){return!this.state.showNews||!this.socket?null:E(xd,{newsArr:this.state.showNews.checkNews,current:this.state.showNews.lastNewsId,onSetLastNewsId:async e=>{e&&await this.socket.setState(this.ownNewsState(`newsLastId`),{val:e,ack:!0}),this.setState({showNews:null})}})}renderTipsDialog(){return!this.state.showTips||this.state.wizard||this.state.showNews||this.state.showHostWarning?null:E(iy,{t:j.t,lang:this.state.lang,lastTipId:(window._localStorage||window.localStorage).getItem(e.LAST_TIP_ID),onClose:(t,n)=>{(window._localStorage||window.localStorage).setItem(e.LAST_TIP_ID,n),this.setState({showTips:!1}),t&&this.disableTips()}})}async disableTips(){if(this.socket)try{var e;let t=await this.socket.getSystemConfig(!0);t!=null&&t.common&&!t.common.tipsDisabled&&(t.common.tipsDisabled=!0,await this.socket.setSystemConfig(t)),(e=this.state.systemConfig)!=null&&e.common&&this.setState({systemConfig:{...this.state.systemConfig,common:{...this.state.systemConfig.common,tipsDisabled:!0}}})}catch(e){this.showAlert(`Cannot save system configuration: ${e.toString()}`,`error`)}}renderSlowConnectionWarning(){return this.state.showSlowConnectionWarning?E(Xv,{readTimeoutMs:this.state.readTimeoutMs,t:j.t,onClose:e=>{e?this.setState({showSlowConnectionWarning:!1,readTimeoutMs:e},()=>this.readRepoAndInstalledInfo(this.state.currentHost,{offerLongerTimeout:!0})):this.setState({showSlowConnectionWarning:!1})}}):null}readRepoAndInstalledInfo(e,t){let n=this.readRepoAndInstalledInfoRun(e,++this.repoInfoRun,t);return this.repoInfoPromise=n,n}async readRepoAndInstalledInfoRun(e,t,n){if(!this.socket)throw Error(`Socket not initialized`);let r=n==null?void 0:n.update,i=()=>{n!=null&&n.offerLongerTimeout&&this.setState({showSlowConnectionWarning:!0})},[a,o,s]=await Promise.all([this.socket.getCompactRepository(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getRepositoryCompact: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactInstalled(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getInstalled: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactAdapters(r).then(e=>(t===this.repoInfoRun&&this.setState({adapters:e}),e)).catch(e=>(window.alert(`Cannot read adapters: ${e}`),{}))]);t===this.repoInfoRun&&(o&&s&&Object.keys(s).forEach(e=>{o[e]&&s[e].iv&&(o[e].ignoreVersion=s[e].iv)}),this.setState({repository:a,installed:o,adapters:s}))}static tabOfHash(e){return e.replace(/^#/,``).split(`/`)[0]}static isAdminTab(e){return!e||Cy.includes(e)}chatBlocksLeaving(t){return this.chatLeaveConfirmed?(this.chatLeaveConfirmed=!1,!1):this.chatBusy&&e.isAdminTab(e.tabOfHash(this.lastHash))&&!e.isAdminTab(t)}assistantNavigate(t){let n=t.startsWith(`#`)?t:`#${t}`;return e.isAdminTab(e.tabOfHash(n))?(window.location.hash=n,Promise.resolve(!0)):new Promise(e=>this.setState({chatLeaveDialog:{target:{hash:n},reason:`assistant`,resolve:e}}))}onChatLeaveDialog(e){let t=this.state.chatLeaveDialog;this.setState({chatLeaveDialog:null},()=>{var n;t==null||(n=t.resolve)==null||n.call(t,e);let r=t==null?void 0:t.target;e&&r&&(this.chatLeaveConfirmed=!0,`hash`in r?window.location.hash=r.hash:this.handleNavigation(r.tab,r.subTab,r.param))})}static getPort(){let t=parseInt(window.location.port,10);if(Number.isNaN(t))switch(e.getProtocol()){case`https:`:t=443;break;case`http:`:t=80}return t&&t!==3e3||(t=8188),t}static getProtocol(){return window.location.protocol}static createTheme(e){return a(Ne.getThemeName(e))}static getThemeName(e){return e.name}static getThemeType(e){return e.palette.mode}renderHostSelector(){return!this.socket||!this.hostsWorker?null:E(js,{name:`admin.appBar.hostSelector`,config:this.adminGuiConfig,children:E(fd,{themeType:this.state.themeType,expertMode:this.state.expertMode,socket:this.socket,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,setCurrentHost:(e,t)=>{this.setState({currentHostName:e,currentHost:t},async()=>{var e;this.logsWorkerChanged(t),(window._localStorage||window.localStorage).setItem(`App.currentHost`,t),await this.readRepoAndInstalledInfo(t,{offerLongerTimeout:!0});let n=await((e=this.hostsWorker)==null?void 0:e.getNotifications(t));await this.handleNewNotifications(n)})}})})}setCurrentTabTitle(){this.setTitle(this.state.currentTab.tab.replace(`tab-`,``))}setTitle(e){document.title=`${e} - ${this.state.currentHostName||`NexoWatt EOS`}`}getCurrentTab(){var e;if(!this.socket||!this.hostsWorker||!this.adaptersWorker||!this.instancesWorker||!this.objectsWorker||!this.state.systemConfig||!this.logsWorker)return null;if((e=this.state)!=null&&(e=e.currentTab)!=null&&e.tab){if(this.state.currentTab.tab===`tab-adapters`){let e=this.props.width===`xs`||this.props.width===`sm`,t=!e&&this.state.drawerState===J.opened,n=e||this.state.drawerState===J.closed;return E(mt,{fallback:E(Sc,{}),children:E(Ty,{theme:this.state.theme,triggerUpdate:this.state.triggerAdapterUpdate,forceUpdateAdapters:this.state.forceUpdateAdapters,adaptersWorker:this.adaptersWorker,instancesWorker:this.instancesWorker,themeType:this.state.themeType,systemConfig:this.state.systemConfig,socket:this.socket,adminHost:this.state.ownHost,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t,lang:j.getLanguage(),expertMode:this.state.expertMode,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),commandRunning:this.state.commandRunning,onSetCommandRunning:e=>this.setState({commandRunning:e}),menuOpened:t,menuClosed:n,adminGuiConfig:this.adminGuiConfig,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,adminInstance:this.adminInstance,currentAdminVersion:this.state.versionAdmin,onUpdating:e=>this.setState({updating:e}),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`adapters`)})}if(this.state.currentTab.tab===`tab-instances`)return E(mt,{fallback:E(Sc,{}),children:E(Ey,{menuPadding:this.state.drawerState===J.closed?0:this.state.drawerState===J.opened?this.state.editMenuList?250:180:50,socket:this.socket,instancesWorker:this.instancesWorker,lang:j.getLanguage(),hostname:this.state.hostname,adminInstance:this.adminInstance,repository:this.state.repository,hosts:this.state.hosts,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,t:j.t,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,width:this.props.width,configStored:e=>this.allStored(e),executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),inBackgroundCommand:this.state.commandError||this.state.performed,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation,hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`instances`)});if(this.state.currentTab.tab===`tab-overview`)return E(mt,{fallback:E(Sc,{}),children:E(wy,{t:j.t,lang:this.state.lang,socket:this.socket,theme:this.state.theme,themeType:this.state.themeType,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,hostsWorker:this.hostsWorker,instancesWorker:this.instancesWorker,objectsWorker:this.objectsWorker,logsWorker:this.logsWorker,expertMode:this.state.expertMode,installed:this.state.installed,repository:this.state.repository,handleNavigation:e=>this.handleNavigation(e),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`overview`)});if(this.state.currentTab.tab===`tab-intro`)return E(mt,{fallback:E(Sc,{}),children:E(Dy,{hostname:this.state.hostname,adminInstance:this.adminInstance,instancesWorker:this.instancesWorker,hostsWorker:this.hostsWorker,showAlert:(e,t)=>this.showAlert(e,t),socket:this.socket,t:j.t,lang:j.getLanguage(),theme:this.state.theme},`intro`)});if(this.state.currentTab.tab===`tab-logs`)return E(mt,{fallback:E(Sc,{}),children:E(Oy,{t:j.t,width:this.props.width,lang:this.state.lang,socket:this.socket,themeType:this.state.themeType,theme:this.state.theme,ready:this.state.ready,logsWorker:this.logsWorker,expertMode:this.state.expertMode,currentHost:this.state.currentHost,hostsWorker:this.hostsWorker,clearErrors:()=>this.clearLogErrors(),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`logs`)});if(this.state.currentTab.tab===`tab-files`)return E(mt,{fallback:E(Sc,{}),children:E(ky,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`files`)});if(this.state.currentTab.tab===`tab-users`)return E(mt,{fallback:E(Sc,{}),children:E(jy,{ready:this.state.ready,t:j.t,expertMode:this.state.expertMode,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`users`)});if(this.state.currentTab.tab===`tab-enums`)return E(mt,{fallback:E(Sc,{}),children:E(My,{t:j.t,lang:j.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`enums`)});if(this.state.currentTab.tab===`tab-objects`)return E(mt,{fallback:E(Sc,{}),children:E(Ay,{t:j.t,theme:this.state.theme,themeName:this.state.themeName,themeType:this.state.themeType,expertMode:this.state.expertMode,objectsWorker:this.objectsWorker,lang:j.getLanguage(),socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma})},`objects`);if(this.state.currentTab.tab===`tab-hosts`)return E(mt,{fallback:E(Sc,{}),children:E(Fy,{socket:this.socket,lang:j.getLanguage(),hostsWorker:this.hostsWorker,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,t:j.t,currentHost:this.state.currentHost,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),systemConfig:this.state.systemConfig,showAdaptersWarning:this.showAdaptersWarning,adminInstance:this.adminInstance,onUpdating:e=>this.setState({updating:e})})});if(this.state.currentTab.tab===`tab-devicemanager`)return E(mt,{fallback:E(Sc,{}),children:E(Py,{themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma},this.state.currentTab.tab)});let e=this.state.currentTab.tab.match(/^tab-([-\w]+?)(?:-(\d+))?$/);if(e){var t;let n=(t=this.tabsInfo)==null?void 0:t.find(t=>t.name===e[0]||t.name===`tab-${e[1]}`);return E(mt,{fallback:E(Sc,{}),children:E(Ny,{hostname:this.state.hostname,adminInstance:this.adminInstance,hosts:this.state.hosts,instancesWorker:this.instancesWorker,tab:this.state.currentTab.tab,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},icon:n==null?void 0:n.icon,supportsLoadingMessage:n==null?void 0:n.supportsLoadingMessage},this.state.currentTab.tab)})}}return null}clearLogErrors(){var e,t;(e=this.logsWorker)==null||e.resetErrors(),(t=this.logsWorker)==null||t.resetWarnings()}getCurrentDialog(){if(this.state&&this.state.currentTab&&this.state.currentTab.dialog){if(this.state.currentTab.dialog===`system`)return this.getSystemSettingsDialog();if(this.state.currentTab.dialog===`discovery`)return this.getDiscoveryModal()}return null}getSystemSettingsDialog(){return zy(this.state.eosAccessRole)?E(od,{eosAccessRole:this.state.eosAccessRole,adminGuiConfig:this.adminGuiConfig,width:this.props.width,currentHost:this.state.currentHost,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,onClose:async e=>{var t;d.doNavigate(null);let n=await((t=this.socket)==null?void 0:t.getObject(`system.config`));n&&(e?this.setState({triggerAdapterUpdate:this.state.triggerAdapterUpdate+1,systemConfig:n}):this.setState({systemConfig:n}))},lang:this.state.lang,socket:this.socket,currentTab:this.state.currentTab,expertModeFunc:e=>{if(!zy(this.state.eosAccessRole))return;(window._sessionStorage||window.sessionStorage).removeItem(`App.expertMode`);let t=JSON.parse(JSON.stringify(this.state.systemConfig));t.common.expertMode=e,this.setState({expertMode:e,systemConfig:t})},t:j.t},`systemSettings`):null}handleAlertClose(e,t){t!==`clickaway`&&this.setState({alert:!1})}isCausedByConnectionLoss(e,t){var n;return e.includes(`notConnectedError`)?!0:this.connectionLostAt?!((n=this.socket)!=null&&n.isConnected())||this.connectionLostAt>t-Wy:!1}getConnectionLostText(){return this.connectionLostAt?j.t(`Connection to admin lost. Waiting for reconnection...`):void 0}showAlert(e,t){t!==`error`&&t!==`warning`&&t!==`info`&&t!==`success`&&(t=`info`);let n;n=typeof e==`string`?e:e instanceof Error?e.message||e.toString():e==null?`null`:e.toString(),this.setState({alert:!0,alertType:t,alertMessage:n})}handleDrawerState(e){(window._localStorage||window.localStorage).setItem(`App.drawerState`,e.toString()),this.setState({drawerState:e})}static logout(){ud().then(()=>{ln.deleteTokensStatic(),window.location.replace(`/login.html`)}).catch(()=>{window.alert(`Abmeldung konnte nicht bestätigt werden. Bitte erneut versuchen.`)})}allStored(e){this._tempAllStored!==e&&(this._tempAllStored=e,this.forceUpdate())}closeDataNotStoredDialog(){this.setState({dataNotStoredDialog:!1})}confirmDataNotStored(){this._tempAllStored=!0,this.setState({dataNotStoredDialog:!1},()=>{var e,t,n;return this.handleNavigation((e=this.state.dataNotStoredTab)==null?void 0:e.tab,(t=this.state.dataNotStoredTab)==null?void 0:t.subTab,(n=this.state.dataNotStoredTab)==null?void 0:n.param)})}executeCommand(e,t,n,r){if(typeof t==`boolean`&&(n=t,t=void 0),!(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected()))){if(this.pendingCommand){this.showAlert(`EOS stellt die Verbindung noch her. Ein Installations- oder Updatebefehl wartet bereits.`,`warning`);return}let i={cmd:e,host:t,callback:n||void 0,files:r,started:Date.now()};this.pendingCommand=i,this.showAlert(`EOS stellt die Verbindung noch her. Der Befehl wird automatisch gestartet, sobald das System bereit ist.`,`info`);let a=()=>{this.pendingCommand===i&&(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected())?(this.pendingCommand=null,this.pendingCommandTimer=null,this.executeCommand(i.cmd,i.host||void 0,i.callback,i.files)):Date.now()-i.started>=6e4?(this.pendingCommand=null,this.pendingCommandTimer=null,this.showAlert(`Der Befehl wurde nicht gestartet, weil die EOS-Verbindung innerhalb von 60 Sekunden nicht bereit war.`,`error`)):this.pendingCommandTimer=setTimeout(a,500))};this.pendingCommandTimer=setTimeout(a,250)}else this.state.commandRunning?this.showAlert(`Es läuft bereits ein Installations- oder Updatebefehl.`,`warning`):this.state.performed||this.state.commandError?this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null})):(console.log(`Execute: ${e}`),this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null}))}closeCmdDialog(e){this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>e&&e())}renderWizardDialog(){return this.state.wizard?E(Sl,{executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),host:this.state.currentHost,socket:this.socket,themeName:this.state.themeName,themeType:this.state.themeType,toggleTheme:this.toggleTheme,lang:j.getLanguage(),onClose:e=>{this.setState({wizard:!1,showRedirect:e,redirectCountDown:10,lang:j.getLanguage()},()=>{this.state.showRedirect&&setInterval(()=>{this.state.redirectCountDown>0?this.setState({redirectCountDown:this.state.redirectCountDown-1}):window.location.href=this.state.showRedirect},1e3)})},onNavigate:(e,t,n)=>{d.doNavigate(e,t,n),window.location.reload()}}):null}showRedirectDialog(){if(this.state.showRedirect){var e;return N(u,{open:!0,onClose:()=>{},children:[E(_e,{children:j.t(`Waiting for admin restart...`)}),E(ce,{children:E(de,{children:j.t(`Redirect in %s second(s)`,this.state.redirectCountDown)})}),N(xt,{children:[window.sidebar||window.opera&&window.print||window.document.all&&(e=window.external)!=null&&e.AddFavorite?E(H,{onClick:()=>{if(window.sidebar&&this.state.showRedirect)window.sidebar.addPanel(`NexoWatt EOS`,this.state.showRedirect,``);else if(window.opera&&this.state.showRedirect&&window.print){let e=document.createElement(`a`);e.setAttribute(`href`,this.state.showRedirect),e.setAttribute(`title`,`NexoWatt EOS`),e.setAttribute(`rel`,`sidebar`),e.click()}else document.all&&window.external.AddFavorite(this.state.showRedirect,`NexoWatt EOS`)},children:j.t(`Bookmark admin`)}):null,this.state.redirectCountDown?E(H,{variant:`contained`,onClick:()=>this.state.showRedirect&&(window.location.href=this.state.showRedirect),children:j.t(`Go to admin now`)}):null]})]})}return null}renderCommandDialog(){return this.state.cmd&&this.socket?E(Ss,{onSetCommandRunning:e=>this.setState({commandRunning:e}),onClose:()=>this.closeCmdDialog(()=>this.setState({commandRunning:!1})),visible:this.state.cmdDialog,callback:this.state.callback,onInBackground:()=>this.setState({cmdDialog:!1}),cmd:this.state.cmd,files:this.state.cmdFiles||void 0,errorFunc:()=>this.setState({commandError:!0}),performed:()=>this.setState({performed:!0}),inBackground:this.state.commandError||this.state.performed,commandError:this.state.commandError,socket:this.socket,host:this.state.commandHost||this.state.currentHost,ready:this.state.ready&&this.state.connected,t:j.t}):null}async getLeadingGroupName(e){if(!this.socket)throw Error(`Socket not ready`);try{let t=await this.socket.getForeignObjects(`system.group.*`,`group`),n=Object.values(t||{}).filter(t=>{var n;return t==null||(n=t.common)==null||(n=n.members)==null?void 0:n.includes(e)}),r=n.find(e=>e._id===`system.group.administrator`)||n[0];return r?Ne.getObjectNameFromObj(r,this.socket.systemLang):``}catch(t){return console.warn(`Cannot read groups of ${e}: ${t}`),``}}renderSiteName(){var e;let t=(e=this.state.systemConfig)==null||(e=e.common)==null?void 0:e.siteName;return t?E(`div`,{style:By.siteName,children:t}):null}needsMenuButtonSpace(){var e;return!((e=this.state.systemConfig)!=null&&(e=e.common)!=null&&e.siteName)&&this.state.drawerState===J.closed}renderFloatingButtons(){let e=this.state.drawerState===J.closed,t=this.state.cmd&&!this.state.cmdDialog;return!e&&!t?null:N(I,{sx:By.floatingButtons,children:[e?E(A,{onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}):null,t?E(A,{onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?Ne.getStyle(this.state.theme,By.performed):By.cmd})}):null]})}renderAlertSnackbar(){return E(Ke,{open:this.state.alert,autoHideDuration:6e3,onClose:()=>this.handleAlertClose(),children:E(C,{severity:this.state.alertType,variant:`filled`,onClose:()=>this.handleAlertClose(),children:this.state.alertMessage})})}renderDialogConfirm(){return this.state.dataNotStoredDialog?E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(`ra_Some data are not stored. Discard?`),ok:j.t(`ra_Discard`),cancel:j.t(`ra_Cancel`),onClose:e=>e?this.confirmDataNotStored():this.closeDataNotStoredDialog()}):null}renderChatLeaveDialog(){if(!this.state.chatLeaveDialog)return null;let e=this.state.chatLeaveDialog.reason===`busy`;return E(Zt,{title:j.t(`ra_Please confirm`),text:j.t(e?`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`:`The assistant is not available on this tab and will be closed. Continue?`),ok:j.t(e?`Leave anyway`:`Continue`),cancel:j.t(`ra_Cancel`),onClose:e=>this.onChatLeaveDialog(e)})}renderExpertDialog(){return!this.state.expertModeDialog||!zy(this.state.eosAccessRole)?null:E(md,{onClose:e=>{if(!zy(this.state.eosAccessRole))this.setState({expertModeDialog:!1,expertMode:!1});else if(e===`openSettings`)d.doNavigate(null,`system`);else if(e){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`),this.setState({expertModeDialog:!1,expertMode:!this.state.expertMode})}else this.state.expertModeDialog&&this.setState({expertModeDialog:!1})},expertMode:this.state.expertMode})}renderShowGuiSettings(){return this.state.showGuiSettings?N(Ze,{anchorEl:this.state.showGuiSettings,open:!0,onClose:()=>this.setState({showGuiSettings:null}),children:[E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of other browsers`)}),E(It,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0,!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:j.t(`Use settings of this browser`)}),N(It,{onClick:()=>this.setState({showGuiSettings:null}),children:[E(Mt,{children:E(k,{fontSize:`small`})}),E(Jt,{children:j.t(`Cancel`)})]})]}):null}renderExpertModeButton(){var e;let t=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`),n=!t||t===`true`==!!((e=this.state.systemConfig)!=null&&e.common.expertMode);return zy(this.state.eosAccessRole)?E(js,{name:`admin.appBar.expertMode`,config:this.adminGuiConfig,children:E(Lt,{title:`${j.t(`Toggle expert mode`)} ${n?``:` (${j.t(`only in this browser session`)})`}`,slotProps:{popper:{sx:By.tooltip}},children:E(at,{color:`secondary`,variant:`dot`,sx:{"& .MuiBadge-badge":By.expertBadge},invisible:n,children:E(A,{"data-eos-expert-control":`1`,"aria-label":j.t(`Toggle expert mode`),"aria-pressed":this.state.expertMode,onClick:()=>{var e;if(zy(this.state.eosAccessRole)){if(!!((e=this.state.systemConfig)!=null&&e.common.expertMode)==!this.state.expertMode){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`)}else if((window._sessionStorage||window.sessionStorage).getItem(`App.doNotShowExpertDialog`)===`true`){var n;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(n=this.refConfigIframe)==null||(n=n.contentWindow)==null||n.postMessage(`updateExpertMode`,`*`)}else this.setState({expertModeDialog:!0})}},style:{color:this.state.expertMode?this.state.theme.palette.expert:void 0},color:`default`,children:E(jt,{style:{...By.expertIcon,...this.state.expertMode?By.expertIconActive:void 0}})})})})}):null}renderMenuButtons(){let e=this.state.noNotifications.warning+this.state.noNotifications.other;return N(je,{children:[E(Lt,{title:j.t(`Notifications`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{disableRipple:!e,style:{opacity:e?1:.3},onClick:e?()=>this.setState({notificationsDialog:!0}):void 0,children:E(at,{badgeContent:this.state.noNotifications.other+this.state.noNotifications.warning,color:this.state.noNotifications.warning>0?`error`:`secondary`,max:99,children:E(rs,{})})})}),E(js,{name:`admin.appBar.discovery`,config:this.adminGuiConfig,children:this.state.discoveryAlive?E(Lt,{title:this.state.discoveryProposals?`${j.t(`Discovery devices`)} - ${j.t(`New adapter proposals`)}: ${this.state.discoveryProposals}`:j.t(`Discovery devices`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:()=>d.doNavigate(null,`discovery`),children:E(at,{badgeContent:this.state.discoveryProposals,color:`secondary`,max:99,children:E(Ye,{})})})}):E(`div`,{style:{display:`none`}})}),this.toggleThemePossible?E(js,{name:`admin.appBar.toggleTheme`,config:this.adminGuiConfig,children:E(te,{toggleTheme:this.toggleTheme,themeName:this.state.themeName,t:j.t})}):null,zy(this.state.eosAccessRole)&&this.state.expertMode?E(Lt,{title:j.t(`Synchronize admin settings between all opened browser windows`),slotProps:{popper:{sx:By.tooltip}},children:E(A,{onClick:e=>this.state.guiSettings?this.enableGuiSettings(!1):this.setState({showGuiSettings:e.target}),style:{color:this.state.guiSettings?this.state.theme.palette.expert:void 0},children:this.state.guiSettings?E(ts,{}):E(ns,{})})}):null]})}renderToolbar(e){let t=Ne.getStyle(this.state.theme,By.performed);return N(ft,{children:[E(A,{size:`large`,edge:`start`,"data-eos-menu-toggle":`1`,"aria-label":j.t(`Open menu`),"aria-expanded":this.state.drawerState!==J.closed,style:{...By.menuButton,...!e&&this.state.drawerState!==J.closed?By.hide:void 0},onClick:()=>this.handleDrawerState(J.opened),children:E(bt,{})}),N(`div`,{style:By.wrapperButtons,children:[E(I,{className:`eos-header-controls`,children:this.renderMenuButtons()}),E(`div`,{style:By.flexGrow}),this.state.cmd&&!this.state.cmdDialog&&E(A,{size:`large`,onClick:()=>this.setState({cmdDialog:!0}),children:E(es,{style:this.state.commandError?By.errorCmd:this.state.performed?t:By.cmd})})]}),this.renderSiteName(),this.state.drawerState!==J.opened&&!this.state.expertMode&&window.innerWidth>450&&N(P,{container:!0,style:{...By.avatarNotVisible,...this.state.drawerState===J.opened?void 0:By.avatarVisible},spacing:1,sx:{alignItems:`center`},children:[this.state.user?null:N(I,{component:`div`,style:By.wrapperName,children:[E(R,{children:`admin`}),!this.adminGuiConfig.icon&&this.state.versionAdmin&&N(R,{style:{...By.styleVersion,color:this.state.themeType===`dark`?`#ffffff80`:`#00000080`},children:[`v`,this.state.versionAdmin]})]}),E(P,{children:E(`a`,{href:`#easy`,onClick:e=>e.preventDefault(),style:{color:`inherit`,textDecoration:`none`},children:this.adminGuiConfig.icon?E(`div`,{style:{height:50,width:102,lineHeight:`50px`,background:`white`,borderRadius:5,padding:5},children:E(`img`,{src:this.adminGuiConfig.icon,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):E(gt,{onClick:()=>this.handleNavigation(`easy`),style:this.state.themeName===`colored`||this.state.themeName===`blue`?By.logoWhite:void 0,alt:`NexoWatt EOS`,src:`img/no-image.svg`})})})]})]})}renderSampleError(){var e,t;let n=(e=this.state.hasGlobalError)==null?void 0:e.message,r=(t=this.state.hasGlobalError)==null?void 0:t.stack;return vy(this.state.hasGlobalError)?N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50},children:[E(`h2`,{children:j.t(`The admin was updated. Please load the page anew.`)}),E(H,{variant:`contained`,onClick:()=>window.location.reload(),children:j.t(`Reload`)}),E(`div`,{style:{color:`#888`,fontSize:14,marginTop:20},children:n})]}):N(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50,height:`calc(100% - 50px)`,overflow:`auto`},children:[E(`h1`,{style:{color:`#F00`},children:`Error in GUI!`}),`Please open the browser console (F12), copy error text from there and create the issue on`,` `,E(`a`,{href:`https://nexowatt.com`,target:`_blank`,rel:`noreferrer`,children:`github`}),E(`br`,{}),`Without this information it is not possible to analyse the error.`,E(`br`,{}),`It should looks like `,E(`br`,{}),E(`img`,{src:`img/browserError.png`,alt:`error`}),E(`br`,{}),`If in the second line you will see`,` `,E(`code`,{style:{color:`#888`,fontFamily:`monospace`,fontSize:16},children:`at :3000/static/js/main.chunk.js:36903`}),` `,`and not the normal file name,`,E(`br`,{}),`please try to reproduce an error with opened browser console. In this case the special "map" files will be loaded and the developers can see the real name of functions and files.`,E(`div`,{style:{color:`#F88`,fontSize:14,marginTop:20},children:n}),E(`pre`,{style:{color:`#F88`,fontSize:12,fontFamily:`monospace`,textAlign:`left`,marginTop:20,padding:20},children:(r||``).toString().split(`
|
|
205
|
-
`).map((e,t)=>
|
|
204
|
+
或“下一步”使用先前发现过程中的设备`,process:`处理`,processes:`流程`,protocols_group:`协议`,"pushover wizard description":`有了 NexoWatt EOS Pushover 适配器,您就可以自己向安卓和 iOS 设备发送信息,并使用 Pushover API 的各种功能。通过这些功能,您不仅可以发送简单的文本信息,还可以附加图片和其他文件。您还可以通过设置不同的优先级或为不同事件设置特定的声音,根据个人需要定制通知。`,raw:`原始(仅限专家)`,read:`读`,"read only":`只读`,"read operation":`读`,readme:`自述`,reload:`重新加载`,"reload instance":`重新加载程序`,repeat:`重复`,repo_update_hint:`您已配置为运行“beta”存储库的自动升级,请注意,如果 beta 存储库处于活动状态,则此适配器将根据此配置自动提取 beta 更新!`,repository:`repository`,rest:`休息(只读)`,restart:`自动重启`,"restart script":`重启自动化`,restartLoop:`重新启动循环`,role:`角色`,runtime:`运行`,save:`保存`,"saved:":`已保存:`,"scenes wizard description":`使用 NexoWatt EOS 场景适配器,您可以将多个数据点组合到场景中,只需点击一下即可触发复杂的操作。试想一下,创建一个名为 "影院 "的场景,在这个场景中,Harmony Hub 会打开所有必要的设备,调暗灯光,并在屏幕降低时打开阅读灯。您还可以设置群组,根据场景的活动或非活动状态,为每个场景定义两种不同的连接数据点状态。`,schedule:`日程`,schedule_group:`时间表`,script_group:`自动化`,"select member by double click":`双击选择成员`,"sendto operation":`发送操作`,"serial number (UUID) in license is for other device":`许可证中的序列号 (UUID) 用于其他设备`,service_group:`保养`,severity:`严重`,"show (default)":`显示(默认)`,"show ignored":`显示被忽略`,"show suggested":`显示建议`,"show/hide item":`显示/隐藏项目`,"signal-cmb wizard description":`有了 NexoWatt EOS Signal-CMB 适配器,您就可以使用 Signal 信使通过 CallMeBot 服务发送消息。支持文本内容和表情符号,让您的信息栩栩如生。用户可以方便地了解智能家居中发生的事件,即使在旅行中也能始终掌握最新信息。`,silly:`愚蠢`,"sql wizard description":`使用 NexoWatt EOS SQL 适配器,您可以记录数据,以便对其进行长期可视化或历史分析。SQL 适配器将数据写入外部 SQL 数据库,该数据库可在同一主机或不同主机上运行。也支持 SQLite 数据库。与历史适配器相比,SQL 更适合记录大量数据,但需要手动设置。`,stable:`稳定`,"standalone MCP adapter":`独立式 MCP 适配器`,state:`州`,"state permissions":`状态权限`,stepEnd:`步骤 (至当前值)`,stepMiddle:`步骤 (中间)`,stepStart:`步骤 (值至下一个)`,stop_admin:`您正在尝试停止当前的管理实例。您将无法通过浏览器配置NexoWatt EOS。您可以稍后通过CLI命令“ iob start %s”启动admin。你确定吗?`,storage_group:`存储`,string:`串`,subscribe:`订阅`,sunday:`星期日`,switch:`开关`,switch_db_note:`建议不要在此设置中更改数据库的类型,因为不会进行任何数据迁移。最好使用CLI命令“ iob setup custom”,以便将所有数据迁移到新数据库。确定要在此处切换数据库类型吗?`,"telegram wizard description":`有了 NexoWatt EOS Telegram 适配器,您就可以通过 Telegram Messenger 向自己发送信息,这样当系统发生变化时,您就可以随时了解最新情况。除文本信息外,您还可以发送图片和其他文件。您甚至可以发送问题,并直接在 NexoWatt EOS 中处理答案。`,"temporary log level":`临时日志级别`,terminal:`终端`,"third-party_group":`第三方`,"this 2 weeks":`这2个星期`,"this adapter does not allow multiple instances":`此插件不允许多个程序同时运行`,"this day":`这天`,"this month":`这个月`,"this week":`本星期`,"this year":`今年`,time:`时间`,"time-and-date_group":`时间和日期`,timeOffset:`时间偏移`,title:`标题`,"to apply one item":`申请一件`,"to apply with children":`申请项目和儿童`,"to fix these issues and upgrade command run again.":`解决这些问题并再次运行upgrade命令。`,today:`今天`,tooltip_ack:`已确认`,tooltip_copyState:`将状态值复制到剪贴板`,tooltip_customConfig:`设定值`,tooltip_deleteObject:`删除物件`,tooltip_editObject:`编辑物件`,tooltip_editState:`修改状态值`,tooltip_from:`资源`,tooltip_lc:`最后更改时间`,tooltip_quality:`质量`,tooltip_ts:`时间戳记`,tooltip_user:`用户`,tooltip_value:`值`,true:`正常`,ts:`时间戳`,type:`类型`,unit:`单元`,unknown:`未知`,update:`刷新`,"update adapter information":`更新插件信息`,update_info_no_net:`有关更新控制器的信息,请访问以下页面: <a href="https://github.com/NexoWatt EOS/NexoWatt EOS.docs/blob/master/admin/zh-cn/controller-upgrade.md" target="_blank">Update JS-Contoller</a>`,updated:`刷新`,updates:`刷新`,"updating %s to %s...":`更新 %s 到 %s...`,upload:`上传`,"use GitHub for issues":`我们重视您对我们软件的评分和想法。对于错误报告,请使用我们的 GitHub 问题跟踪器,当您留下评论时,请考虑未解决的问题可能会影响您的体验。您的反馈有助于我们改善。感谢您成为我们社区的一部分!`,"user permissions":`用户权限`,users:`用户`,"users permissions":`用户权限`,utility_group:`实用工具`,val:`值`,value:`值`,"value.from":`来自于`,"value.lc":`上次更新`,"value.q":`质量`,"value.ts":`时间戳`,"value.val":`值`,vehicle_group:`车辆`,version:`版本`,"vis-2 wizard description":`NexoWatt EOS Vis 2 适配器是为您的智能家居提供的现代化、功能强大的可视化解决方案。有了这个适配器,您就可以根据自己的意愿,用现代小部件创建自己的可视化系统。无论您是想将仪表盘设计成简约风格还是具有多种功能,都有无限可能。按自己喜欢的方式设计智能家居界面吧!`,vis_group:`NexoWatt EOS.vis`,visualisation_group:`可视化`,"visualization wizard category":`借助此类适配器,您可以构建仪表板以通过 NexoWatt EOS Visu 应用程序或 Web 界面控制您的家庭。`,"visualization-icons_group":`可视化图标`,"visualization-widgets_group":`可视化小部件`,visualization_group:`可视化`,vote:`投票`,vote21:`选票`,votes:`票数`,votes2:`选票`,warn:`警告`,weather:`天气`,"weather wizard category":`通过天气适配器,您可以获得当地天气信息并将其用于可视化和自动化。`,weather_group:`天气`,"weatherunderground wizard description":`有了 NexoWatt EOS Weather Underground 适配器,您就可以在 NexoWatt EOS 中使用天气数据。例如,这意味着下雨时可以提醒您关闭打开的窗户,或者在暴风雨来临时自动收回遮阳篷。这样,您的智能家居就能更好地适应当前的天气条件,确保更加舒适和安全。`,wetty:`Wetty`,"with js-controller":`带有 js 控制器`,"wizard adapter general description":`从您希望直接安装的适配器中进行选择。您可以稍后在 "适配器 "选项卡中安装其他适配器。`,"wizard welcome description":`此向导将引导您完成新 ioBroker 安装的最重要设置。只需几分钟,所有设置以后都可以更改。`,write:`写`,"write operation":`写`,wrongPassword:`用户名或密码无效`,yesterday:`昨天`,"Åland Islands":`奥兰群岛`,"Serial port":`串口`,"TCP port":`TCP 端口`,"UDP port":`UDP 端口`,"USB device":`USB 设备`,Bluetooth:`蓝牙`,GPIO:`GPIO`,"Also registered by: %s":`也被以下实例注册:%s`,Resource:`资源`,Registered:`注册时间`,"The instance runs and holds the resource":`实例正在运行并占用该资源`,"The instance does not run and would take the resource when started":`实例未运行,启动时将占用该资源`,"In use":`使用中`,Reserved:`已预留`,"Used resources":`已占用的资源`,"No instance has registered a resource":`没有实例注册资源`,'Adapter "%s" allows only one instance, and %s exists already':`适配器 "%s" 只允许一个实例,而 %s 已存在`,'Adapter "%s" allows only one instance per host, and %s exists already on host "%s"':`适配器 "%s" 每个主机只允许一个实例,而 %s 已存在于主机 "%s" 上`,"The admin was updated. Please load the page anew.":`管理界面已更新,请重新加载页面。`,"The connection is not ready yet. Please wait a moment and try again.":`连接尚未就绪。请稍等片刻后重试。`},gy=`admin.chunkReloadTs`,_y=2e4;function vy(e){let{message:t,name:n}=typeof e==`object`&&e?e:{message:e};return typeof t==`string`?t.includes(`Failed to fetch dynamically imported module`)||t.includes(`error loading dynamically imported module`)||t.includes(`Importing a module script failed`)||t.includes(`Unable to preload CSS`)||n===`ChunkLoadError`:!1}function yy(){let e=0;try{e=parseInt(window.sessionStorage.getItem(gy)||`0`,10)||0}catch{}if(Date.now()-e<_y)return!1;try{window.sessionStorage.setItem(gy,Date.now().toString())}catch{}return window.location.reload(),!0}function by(e){yy()&&e.preventDefault()}function xy(e){return Ut.lazy(()=>e().catch(e=>{if(vy(e)&&yy())return new Promise(()=>{});throw e}))}x();var Sy=[`tab-overview`,`tab-adapters`,`tab-instances`,`tab-logs`],Cy=[`tab-overview`,`tab-intro`,`tab-adapters`,`tab-instances`,`tab-objects`,`tab-enums`,`tab-logs`,`tab-users`,`tab-hosts`,`tab-files`,`tab-devicemanager`],wy=xy(()=>r(()=>import(`./Overview-DdvghCLQ.js`),__vite__mapDeps([36,1,2,3,17,25,26,28,37,38]),import.meta.url)),Ty=xy(()=>r(()=>import(`./Adapters-CIlqSF5B.js`),__vite__mapDeps([39,1,2,3,6,7,16,23,29,37,40,8,26,30,41,10,42,43,44,45]),import.meta.url)),Ey=xy(()=>r(()=>import(`./Instances-Db6Vgh62.js`),__vite__mapDeps([46,2,1,3,7,11,21,24,26,29,37,40,8,30,43,44,45,47,48,49,50]),import.meta.url)),Dy=xy(()=>r(()=>import(`./Intro-Dc3wAG9V.js`),__vite__mapDeps([51,1,2,3,8,14,15,17,20,24,26,37,50]),import.meta.url)),Oy=xy(()=>r(()=>import(`./Logs-CPbEGWNq.js`),__vite__mapDeps([52,1,2,3,16,27,37]),import.meta.url)),ky=xy(()=>r(()=>import(`./Files-wmjjMXYM.js`),__vite__mapDeps([53,2,1,3,37,44,45]),import.meta.url)),Ay=xy(()=>r(()=>import(`./Objects-DJB-2468.js`),__vite__mapDeps([54,2,1,3,5,18,23,32,35,34,37,48,45,42,44,38]),import.meta.url)),jy=xy(()=>r(()=>import(`./Users-BGHf3Rox.js`),__vite__mapDeps([55,1,2,3,13,19,30,37,56]),import.meta.url)),My=xy(()=>r(()=>import(`./Enums-3H97czGs.js`),__vite__mapDeps([57,2,1,3,9,13,18,20,28,37,56]),import.meta.url)),Ny=xy(()=>r(()=>import(`./CustomTab-B4ywHrnT.js`),__vite__mapDeps([58,2,1,3,37,48]),import.meta.url)),Py=xy(()=>r(()=>import(`./ConfigManager-BhVBfM-q.js`),__vite__mapDeps([59,1,2,3,22]),import.meta.url)),Fy=xy(()=>r(()=>import(`./Hosts-Bk-xmI98.js`),__vite__mapDeps([60,2,1,3,11,12,14,29,37,41,10,42,43,44,45,49]),import.meta.url)),Iy=xy(()=>r(()=>import(`./EasyMode-A2E3hSMo.js`),__vite__mapDeps([61,1,2,3,47,37,48]),import.meta.url)),Ly={},Ry=()=>String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),zy=(e=Ry())=>[`admin`,`service`].includes(e);(window.location.search||``).replace(/^\?/,``).split(`&`).forEach(e=>{let t=e.split(`=`);t[0]&&(Ly[t[0]]=t[1]===void 0||decodeURIComponent(t[1]))});var By={root:{display:`flex`,height:`100%`},appBar:e=>({transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}),logoWhite:{backgroundColor:`#FFFFFF`},appBarShift:e=>({width:`calc(100% - 180px)`,ml:180/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftEdit:e=>({width:`calc(100% - 250px)`,ml:250/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),appBarShiftCompact:e=>({width:`calc(100% - 50px)`,ml:50/8,transition:e.transitions.create([`margin`,`width`],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}),menuButton:{marginRight:16},hide:{display:`none`},content:e=>{var t,n,r;return{flexGrow:1,padding:1,paddingTop:0,transition:e.transitions.create(`margin`,{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowY:`auto`,mt:`${(t=e.mixins.toolbar)==null?void 0:t.minHeight}px`,"@media (min-width:0px) and (orientation: landscape)":{mt:(n=e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`])!=null&&n.minHeight?`${e.mixins.toolbar[`@media (min-width:0px) and (orientation: landscape)`].minHeight}px`:void 0},"@media (min-width:600px)":{mt:(r=e.mixins.toolbar[`@media (min-width:600px)`])!=null&&r.minHeight?`${e.mixins.toolbar[`@media (min-width:600px)`].minHeight}px`:void 0}}},contentMargin:{ml:-180/8},contentMarginEdit:{ml:-250/8},contentMarginCompact:{ml:-50/8},contentShift:e=>({transition:e.transitions.create(`margin`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),ml:0}),expertIcon:{width:22,height:22},expertIconActive:{},baseSettingsButton:{color:`red`},avatarNotVisible:{opacity:0,marginLeft:5,transition:`opacity 0.3s`,width:`initial`},avatarVisible:{opacity:1},cmd:{animation:`1s linear infinite alternate $myEffect`,opacity:.2},errorCmd:{color:`#a90000`,animation:`0.2s linear infinite alternate myEffect2`},performed:e=>({color:e.palette.mode===`light`?`#3bfd44`:`#388e3c`,animation:`0.2s linear infinite alternate myEffect2`}),wrapperButtons:{display:`flex`,marginRight:`auto`,overflowY:`auto`,alignItems:`center`},flexGrow:{flexGrow:2},floatingButtons:{position:`fixed`,top:4,left:4,zIndex:1200,display:`flex`,gap:.5},contentNoAppBar:{mt:0,"@media (min-width:0px) and (orientation: landscape)":{mt:0},"@media (min-width:600px)":{mt:0}},contentMenuButtonSpace:{pt:`44px`},styleVersion:{fontSize:10},wrapperName:{display:`flex`,flexDirection:`column`,marginRight:10},expertBadge:{mt:`11px`,mr:`11px`},siteName:{lineHeight:`48px`,fontSize:24,marginLeft:10,marginRight:10,display:`inline-block`,verticalAlign:`middle`},tooltip:{pointerEvents:`none`}};function Vy(e){return e.native||={localStorage:{},sessionStorage:{}},e.native.localStorage||(e.native={localStorage:e.native,sessionStorage:{}}),e.native.sessionStorage||={},e}var Hy=1e4,Uy=5e3,Wy=5e3,Gy=1e3;function Ky(e,t){let n;return Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(`${t} got no answer`)),Hy)})]).finally(()=>clearTimeout(n))}function qy(e,t){for(let n of[`localStorage`,`sessionStorage`])for(let[r,i]of Object.entries(t[n]))i===null?delete e[n][r]:e[n][r]=i}var Jy={_id:``,type:`state`,common:{name:`Admin settings`,type:`boolean`,read:!0,write:!1,role:`state`},native:{localStorage:{},sessionStorage:{}}},Yy=class e extends d{constructor(t){super(t),j(this,`translations`,void 0),j(this,`_tempAllStored`,!0),j(this,`refConfigIframe`,null),j(this,`expireInSecInterval`,null),j(this,`toggleThemePossible`,void 0),j(this,`adminGuiConfig`,void 0),j(this,`logsWorker`,null),j(this,`instancesWorker`,null),j(this,`hostsWorker`,null),j(this,`adaptersWorker`,null),j(this,`objectsWorker`,null),j(this,`repoInfoPromise`,null),j(this,`repoInfoRun`,0),j(this,`guiSettings`,null),j(this,`guiSettingsChanges`,{localStorage:{},sessionStorage:{}}),j(this,`guiSettingsWrite`,Promise.resolve()),j(this,`localStorageTimer`,null),j(this,`guiSettingsRetryTimer`,null),j(this,`languageSet`,!1),j(this,`socket`,null),j(this,`adminInstance`,``),j(this,`newsSubscription`,void 0),j(this,`newsSubscribeTimer`,null),j(this,`doNotAskSessionExpiration`,0),j(this,`tabsInfo`,null),j(this,`pendingCommandTimer`,null),j(this,`pendingCommand`,null),j(this,`chatBusy`,!1),j(this,`lastHash`,window.location.hash),j(this,`chatLeaveConfirmed`,!1),j(this,`connectionLostAt`,0),j(this,`localStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.localStorage[e]}),j(this,`localStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.localStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.localStorage[e]=t.toString(),this.guiSettingsChanges.localStorage[e]=t.toString()),this.localStorageSave()}),j(this,`localStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.localStorage,e)&&(delete this.guiSettings.native.localStorage[e],this.guiSettingsChanges.localStorage[e]=null,this.localStorageSave())}),j(this,`sessionStorageGetItem`,e=>{var t;return(t=this.guiSettings)==null?void 0:t.native.sessionStorage[e]}),j(this,`sessionStorageSetItem`,(e,t)=>{if(t===null)t=`null`;else if(t===void 0){this.sessionStorageRemoveItem(e);return}this.guiSettings&&(this.guiSettings.native.sessionStorage[e]=t.toString(),this.guiSettingsChanges.sessionStorage[e]=t.toString()),this.localStorageSave()}),j(this,`sessionStorageRemoveItem`,e=>{this.guiSettings&&Object.prototype.hasOwnProperty.call(this.guiSettings.native.sessionStorage,e)&&(delete this.guiSettings.native.sessionStorage[e],this.guiSettingsChanges.sessionStorage[e]=null,this.localStorageSave())}),j(this,`toggleTranslation`,()=>{(window._localStorage||window.localStorage).setItem(`App.noTranslation`,this.state.noTranslation?`false`:`true`),this.setState({noTranslation:!this.state.noTranslation})}),j(this,`onEosPolicyChanged`,e=>{var t;let n=e instanceof CustomEvent?e.detail:null;if(!n||typeof n!=`object`||!(`policy`in n))return;let r=n.policy,i=`unknown`;if(r&&typeof r==`object`&&`authenticated`in r&&r.authenticated===!0&&`role`in r&&typeof r.role==`string`&&[`admin`,`service`,`installer`,`enduser`].includes(r.role)&&!(`mustChangePassword`in r&&r.mustChangePassword===!0)&&(i=r.role),window.NEXOWATT_EOS_ACCESS_ROLE=i,i===this.state.eosAccessRole)return;let a=[`admin`,`service`].includes(i),o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);this.setState({eosAccessRole:i,expertMode:a&&(o?o===`true`:!!((t=this.state.systemConfig)!=null&&t.common.expertMode)),expertModeDialog:!1})}),j(this,`updateHosts`,e=>{let t=JSON.parse(JSON.stringify(this.state.hosts));e.forEach(e=>{let n=t.find(t=>t._id===e.id);if(n){let r=t.indexOf(n);e.obj?t[r]=e.obj:t.splice(r,1)}else t.push(e.obj)}),this.setState({hosts:t})}),j(this,`repoChangeHandler`,()=>{this.readRepoAndInstalledInfo(this.state.currentHost,{update:!0}).then(()=>console.log(`Repo updated!`))}),j(this,`adaptersChangeHandler`,e=>{let t=JSON.parse(JSON.stringify(this.state.installed)),n=!1;e.forEach(e=>{let r=e.id.split(`.`)[2];e.type===`deleted`||!e.obj?t[r]&&(n=!0,delete t[r]):t[r]?Object.keys(t[r]).forEach(i=>{e.obj&&t[r][i]!==e.obj.common[i]&&(t[r][i]=e.obj.common[i],n=!0)}):(t[r]={version:e.obj.common.version},n=!0)}),n&&this.setState({installed:t})}),j(this,`onSessionExpiration`,e=>new Promise(t=>{let n=Math.max(0,e-Date.now()+500);this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.expireInSecInterval=setTimeout(()=>{un.deleteTokensStatic(),window.location.replace(`/login.html`)},n),t(!1)})),j(this,`onDiscoveryAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.discoveryAlive&&this.setState({discoveryAlive:!!(t!=null&&t.val)})}),j(this,`onDiscoveryObject`,(e,t)=>{let n=Vv(t);n!==this.state.discoveryProposals&&this.setState({discoveryProposals:n})}),j(this,`getDiscoveryModal`,()=>this.state.systemConfig&&this.socket?T(qv,{themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket,systemConfig:this.state.systemConfig.common,dateFormat:this.state.systemConfig.common.dateFormat,currentHost:this.state.currentHost,defaultLogLevel:this.state.systemConfig.common.defaultLogLevel||`info`,repository:this.state.repository,hosts:this.state.hosts,onClose:()=>d.doNavigate(null)}):null),j(this,`handleNewNotifications`,async e=>{let t={warning:0,other:0};if(!e)this.setState({noNotifications:t,notifications:{}});else{for(let n of Object.values(e))if(n!=null&&n.result){for(let[e,r]of Object.entries(n.result))if(e!==`system`)for(let e of Object.values(r.categories))for(let n of Object.values(e.instances)){let r=e.severity===`alert`;t[r?`warning`:`other`]+=n.messages.length}}if(this.instancesWorker){let n=await this.instancesWorker.getObjects();this.setState({noNotifications:t,notifications:{notifications:e,instances:n}})}}}),j(this,`showAdaptersWarning`,async(e,t)=>{if(!e||!e[t]||!e[t].result)return;let n=e[t].result;if(n!=null&&n.system&&Object.keys(n.system.categories).length){var r;await((r=this.instancesWorker)==null?void 0:r.getObjects().then(e=>e&&this.setState({showHostWarning:{host:t,instances:e,result:n}})))}}),j(this,`onNews`,async(e,t)=>{if(!this.socket)throw Error(`Socket not initialized`);try{var n;if(!((n=this.state.systemConfig)!=null&&n.common.licenseConfirmed))return;let e=await this.socket.getState(this.ownNewsState(`newsLastId`));if(t!=null&&t.val){let n=null;try{n=JSON.parse(t.val)}catch{console.error(`Cannot parse news: ${t.val}`)}if(n!=null&&n.length&&n[0].id!==(e==null?void 0:e.val)){var r,i,a;let t=await this.socket.getUuid(),o=await this.socket.getHostInfo(this.state.currentHost).catch(()=>null),s=await this.socket.getCompactInstances().catch(()=>null),c;if(this.state.currentHost){let e=await this.socket.getDiagData(this.state.currentHost,`normal`);c=e==null?void 0:e.objectsType}let l=await((r=this.objectsWorker)==null?void 0:r.getObjects()),u=Object.keys(l||{}).length;await((i=this.repoInfoPromise)==null?void 0:i.catch(()=>{}));let d=Ad(n,e==null?void 0:e.val,{lang:A.getLanguage(),adapters:this.state.adapters,instances:s||{},nodeVersion:o&&o[`Node.js`]||`?`,npmVersion:o&&o.NPM||`?`,jsControllerVersion:((a=this.state.installed)==null||(a=a[`js-controller`])==null?void 0:a.version)||``,os:o&&o.os||`?`,activeRepo:this.state.systemConfig.common.activeRepo,uuid:t,objectsDbType:c||`jsonl`,noObjects:u});d!=null&&d.length&&this.setState({showNews:{checkNews:d,lastNewsId:e==null?void 0:e.val}})}}}catch(e){console.error(`Could not process news: ${e.stack}`),this.showAlert(`Could not process news: ${e.stack}`,`error`)}}),j(this,`logsWorkerChanged`,e=>{var t;(t=this.logsWorker)==null||t.setCurrentHost(e)}),j(this,`onHashChanged`,()=>{let t=window.location.hash;this.chatBlocksLeaving(e.tabOfHash(t))?(window.history.replaceState(null,``,this.lastHash||`${window.location.pathname}${window.location.search}`),this.setState({chatLeaveDialog:{target:{hash:t},reason:`busy`}})):(this.lastHash=t,this.setState({currentTab:d.getLocation()},()=>this.setCurrentTabTitle()))}),j(this,`toggleTheme`,t=>{let n=this.state.themeName,r=t||Pe.toggleTheme(n),i=e.createTheme(r);this.setState({theme:i,themeName:r,themeType:e.getThemeType(i)},()=>{var e,t;(e=this.refConfigIframe)==null||(e=e.contentWindow)==null||e.postMessage(`updateTheme`,`*`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage({type:`updateTheme`,themeName:r},`*`)})}),j(this,`handleNavigation`,(e,t,n)=>{var r;if(e){if(this.chatBlocksLeaving(e)){this.setState({chatLeaveDialog:{target:{tab:e,subTab:t,param:n},reason:`busy`}});return}this._tempAllStored?(d.doNavigate(e,t,n),this.lastHash=window.location.hash,this.setState({currentTab:d.getLocation()})):this.setState({dataNotStoredDialog:!0,dataNotStoredTab:{tab:e,subTab:t,param:n}})}(this.props.width===`xs`||this.props.width===`sm`)&&this.handleDrawerState(J.closed),e||=((r=this.state.currentTab)==null?void 0:r.tab)||``,this.setTitle(e.replace(`tab-`,``))});try{window.alert=e=>{let t=(e==null?void 0:e.toString())??``,n=Date.now();this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):t.toLowerCase().includes(`error`)?(console.error(t),setTimeout(()=>{this.isCausedByConnectionLoss(t,n)?console.warn(`Not shown, as the connection to admin is lost: ${t}`):this.showAlert(t,`error`)},Gy)):(console.log(t),this.showAlert(t,`info`))}}catch{}this.translations=zt;let n={en:ay,de:oy,ru:sy,pt:cy,nl:ly,fr:uy,it:dy,es:fy,pl:py,uk:my,"zh-cn":hy};Object.keys(n).forEach(e=>Object.assign(this.translations[e],n[e])),A.extendTranslations(this.translations),A.setLanguage((window.navigator.language||window.navigator.userLanguage||`en`).substring(0,2).toLowerCase()),this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}}};let r=window.vendorPrefix;if(this.toggleThemePossible=!r||r===`@@vendorPrefix@@`||r===`MV`,Ly.login){let t=e.createTheme();this.state={login:!0,theme:t,themeName:e.getThemeName(t),themeType:e.getThemeType(t)}}else{let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=e.createTheme();Object.defineProperty(window,"configNotSaved",{get:()=>this.state.configNotSaved,set:e=>{let t=!e;t!==this._tempAllStored&&(this._tempAllStored=t,this.forceUpdate())},configurable:!0}),this.state={connected:!1,progress:0,ready:!1,lang:`en`,hostname:window.location.hostname,expertMode:!1,eosAccessRole:Ry(),chatDockWidth:0,hosts:[],currentHost:``,currentHostName:``,ownHost:``,currentTab:d.getLocation(),systemConfig:null,user:null,repository:{},installed:{},waitForRestart:!1,tabs:null,config:{},stateChanged:!1,theme:r,themeName:e.getThemeName(r),themeType:e.getThemeType(r),alert:!1,alertType:`info`,alertMessage:``,drawerState:n,editMenuList:!1,tab:null,dataNotStoredDialog:!1,dataNotStoredTab:null,chatLeaveDialog:null,baseSettingsOpened:!1,unsavedDataInDialog:!1,systemSettingsOpened:!1,cmd:null,cmdDialog:!1,commandHost:null,commandError:!1,commandRunning:!1,wizard:!0,performed:!1,showTips:!1,discoveryAlive:!1,discoveryProposals:0,readTimeoutMs:Xv.getReadTimeoutMs(),showSlowConnectionWarning:!1,versionAdmin:``,forceUpdateAdapters:0,noTranslation:(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`,cloudNotConnected:!1,cloudReconnect:0,showRedirect:``,redirectCountDown:0,triggerAdapterUpdate:0,updating:!1,notificationsDialog:!1,notifications:{},noNotifications:{warning:0,other:0},configNotSaved:!1,login:!1,showHostWarning:null,adapters:{},askForTokenRefresh:null},this.logsWorker=null,this.instancesWorker=null,this.hostsWorker=null}}static getDerivedStateFromError(e){return{hasGlobalError:e}}componentDidCatch(e){this.setState({hasGlobalError:e})}static async checkSsoResponse(){let e=new URLSearchParams(window.location.search);if(e.has(`ssoCode`)){try{let t=await fetch(lr(`sso-token`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:e.get(`ssoCode`)})}),n=await t.json();t.ok&&n.access_token&&un.saveTokensStatic(n,!0)}catch(e){console.error(`Cannot finish the single sign-on: ${e}`)}window.localStorage.removeItem(`oidc_id_token`),window.location.search=``}else if(e.has(`id_token`)&&(window.localStorage.setItem(`oidc_id_token`,e.get(`id_token`)),window.location.search=``),e.has(`ssoLoginResponse`)){let t=JSON.parse(e.get(`ssoLoginResponse`));un.saveTokensStatic(t,!0),window.location.search=``}}setUnsavedData(e){e!==this.state.unsavedDataInDialog&&this.setState({unsavedDataInDialog:e})}mustInvertBackground(e){if(!e)return!1;let t=Pe.invertColor(e,!0);return t===`#FFFFFF`&&this.state.themeType===`dark`||t===`#000000`&&this.state.themeType===`light`}localStorageSave(){this.localStorageTimer&&clearTimeout(this.localStorageTimer),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.localStorageTimer=setTimeout(()=>{this.localStorageTimer=null,this.guiSettingsWrite=this.guiSettingsWrite.then(()=>this.writeGuiSettings())},200)}async writeGuiSettings(){let e=this.guiSettingsChanges;if(!this.guiSettings||!this.socket||!Object.keys(e.localStorage).length&&!Object.keys(e.sessionStorage).length)return;this.guiSettingsChanges={localStorage:{},sessionStorage:{}};let t=`system.adapter.${this.adminInstance}.guiSettings`;try{let n=Vy(await Ky(this.socket.getObject(t),`Reading`)||JSON.parse(JSON.stringify(this.guiSettings)));qy(n.native,e),await Ky(this.socket.setObject(t,n),`Writing`),this.guiSettings&&(this.guiSettings=n,qy(this.guiSettings.native,this.guiSettingsChanges))}catch(r){var n;for(let t of[`localStorage`,`sessionStorage`])this.guiSettingsChanges[t]={...e[t],...this.guiSettingsChanges[t]};console.warn(`Could not save "${t}": ${r.message}`),(n=this.socket)!=null&&n.isConnected()&&!this.localStorageTimer&&!this.guiSettingsRetryTimer&&(this.guiSettingsRetryTimer=setTimeout(()=>{this.guiSettingsRetryTimer=null,this.localStorageSave()},Uy))}}async getGUISettings(){let e=null;if(!this.adminInstance||!this.socket)return;let t=!1;try{e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`)}catch(e){t=!0,console.warn(`Could not get "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}if(!e&&!t){e=JSON.parse(JSON.stringify(Jy));try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,e)}catch(e){console.warn(`Could not update "system.adapter.${this.adminInstance}.guiSettings": ${e.message}`)}}let n;try{n=await this.socket.getState(`system.adapter.${this.adminInstance}.guiSettings`)}catch{n={val:!1}}if(n!=null&&n.val){this.guiSettings=Vy(e||JSON.parse(JSON.stringify(Jy))),(Object.keys(this.guiSettingsChanges.localStorage).length||Object.keys(this.guiSettingsChanges.sessionStorage).length)&&(qy(this.guiSettings.native,this.guiSettingsChanges),this.localStorageSave()),window._localStorage={getItem:this.localStorageGetItem,setItem:this.localStorageSetItem,removeItem:this.localStorageRemoveItem},window._sessionStorage={getItem:this.sessionStorageGetItem,setItem:this.sessionStorageSetItem,removeItem:this.sessionStorageRemoveItem};let t=(window._localStorage||window.localStorage).getItem(`App.drawerState`),n;n=t?parseInt(t,10):this.props.width===`xs`?J.closed:J.opened;let r=(window._localStorage||window.localStorage).getItem(`App.noTranslation`)!==`false`;this.setState({guiSettings:!0,drawerState:n,noTranslation:r},()=>{Pe.getThemeName()!==this.state.theme.name&&this.toggleTheme(Pe.getThemeName())})}else this.state.guiSettings&&(window._localStorage=void 0,window._sessionStorage=void 0,this.setState({guiSettings:!1}))}async enableGuiSettings(e,t){if(e&&!this.guiSettings&&this.socket){let e=await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`);this.guiSettings=e||JSON.parse(JSON.stringify(Jy)),t||!this.guiSettings.native||!Object.keys(this.guiSettings.native).length?(this.guiSettings.native={localStorage:{},sessionStorage:{}},Object.keys(window.localStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.localStorage[e]=window.localStorage.getItem(e))}),Object.keys(window.sessionStorage).forEach(e=>{e!==`getItem`&&e!==`setItem`&&e!==`removeItem`&&e!==`clear`&&e!==`key`&&e!==`length`&&(this.guiSettings.native.sessionStorage[e]=window.sessionStorage.getItem(e))}),await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,this.guiSettings),await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0})):(await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!0,ack:!0}),window.location.reload()),await this.getGUISettings()}else if(!e&&this.guiSettings&&this.socket){if(!await this.socket.getObject(`system.adapter.${this.adminInstance}.guiSettings`))try{await this.socket.setObject(`system.adapter.${this.adminInstance}.guiSettings`,Jy)}catch(e){console.error(`Cannot create system.adapter.${this.adminInstance}.guiSettings": ${e}`)}window._localStorage=void 0,window._sessionStorage=void 0,Object.keys(window.localStorage).forEach(e=>window.localStorage.removeItem(e)),Object.keys(window.sessionStorage).forEach(e=>window.sessionStorage.removeItem(e)),Object.keys(this.guiSettings.native.localStorage).forEach(e=>window.localStorage.setItem(e,this.guiSettings.native.localStorage[e])),Object.keys(this.guiSettings.native.sessionStorage).forEach(e=>window.sessionStorage.setItem(e,this.guiSettings.native.sessionStorage[e])),this.guiSettings=null,this.guiSettingsChanges={localStorage:{},sessionStorage:{}},this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null);try{await this.socket.setState(`system.adapter.${this.adminInstance}.guiSettings`,{val:!1,ack:!0})}catch(e){window.alert(`Cannot disable settings: ${e}`)}this.setState({guiSettings:!1})}}componentDidMount(){Ly.login?window.location.replace(`/login.html`):(un.deleteTokensStatic(),window.addEventListener(`vite:preloadError`,by),window.addEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),this.state.login||(window.addEventListener(`hashchange`,this.onHashChanged,!1),this.state.currentTab.tab?this.setTitle(this.state.currentTab.tab.replace(`tab-`,``)):this.handleNavigation(`tab-intro`),this.socket=new un({protocol:window.location.protocol,host:window.location.hostname,name:`eos-admin`,admin5only:!0,port:e.getPort(),cmdTimeout:this.state.readTimeoutMs,autoSubscribes:[`system.adapter.*`],autoSubscribeLog:!0,tokenTimeoutHandler:this.onSessionExpiration,onProgress:async e=>{if(this.socket){if(e===_.CONNECTING)this.state.connected&&(this.connectionLostAt=Date.now()),this.setState({connected:!1});else if(e===_.READY)try{let e=await this.socket.getVersion();console.log(`Stored version: ${this.state.versionAdmin}, new version: ${e.version}`),this.state.versionAdmin&&this.state.versionAdmin!==e.version&&(window.alert(`New adapter version detected. Reloading...`),setTimeout(()=>window.location.reload(),500)),this.adminInstance||=await this.socket.getCurrentInstance(),await this.getGUISettings();let n={connected:!0,progress:100,versionAdmin:e.version,disableMcp:!0};if(this.state.cmd&&/\b(?:admin|eos-admin)(?:@[-.\w]+)?(?:\s+--debug)?$/.test(this.state.cmd))n.commandRunning=!1,n.forceUpdateAdapters=this.state.forceUpdateAdapters+1,this.closeCmdDialog(()=>{this.setState(n),window.location.reload()});else{try{var t;let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);n.disableMcp=!0,e!=null&&(t=e.native)!=null&&t.language?e.native.language!==A.getLanguage()&&(console.log(`Language changed to ${e.native.language}`),A.setLanguage(e.native.language),this.languageSet?window.location.reload():this.languageSet=!0):this.socket.systemLang!==A.getLanguage()&&(console.log(`Language changed to ${this.socket.systemLang}`),A.setLanguage(this.socket.systemLang),this.languageSet?window.location.reload():this.languageSet=!0)}catch(e){console.error(`Cannot read admin settings: ${e}`)}this.setState(n)}}catch(e){console.error(`Cannot read version: ${e}`),e===`ioBroker is not connected`&&(setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10}))}else this.setState({connected:!0,progress:Math.round(_.READY/e*100)})}},onReady:async()=>{var e;if(!this.socket)throw Error(`Socket not initialized`);this.adminGuiConfig={admin:{menu:{},settings:{},adapters:{},login:{}},...(e=this.socket)==null||(e=e.systemConfig)==null||(e=e.native)==null?void 0:e.vendor},this.adminGuiConfig.admin.menu||={},this.adminGuiConfig.admin.settings||={},this.adminGuiConfig.admin.adapters||={},this.adminGuiConfig.admin.login||={};try{var t,n;try{var r;this.adminInstance||=await this.socket.getCurrentInstance(),this.adminInstance||console.error(`Cannot read admin instance!`);let e=await this.socket.getObject(`system.adapter.${this.adminInstance}`);e!=null&&(r=e.native)!=null&&r.language?A.setLanguage(e.native.language):A.setLanguage(this.socket.systemLang)}catch(e){console.warn(`Cannot read the settings of this admin: ${e.message}`),A.setLanguage(this.socket.systemLang)}this.languageSet=!0;let e=!1;try{e=await this.socket.getIsEasyModeStrict()}catch(e){console.warn(`Cannot read the easy mode: ${e.message}`)}if(await this.getGUISettings(),e){let e=await this.socket.getEasyMode();this.setState({lang:this.socket.systemLang,ready:!0,strictEasyMode:!0,easyModeConfigs:e.configs});return}this.logsWorker||=new Bd(this.socket,1e3),this.instancesWorker||=new Hd(this.socket),this.hostsWorker||=new Ud(this.socket),this.adaptersWorker||=new Wd(this.socket),this.objectsWorker||=new Gd(this.socket);let a={lang:this.socket.systemLang,ready:!0};try{a.systemConfig=await this.socket.getCompactSystemConfig(),a.wizard=!a.systemConfig.common.licenseConfirmed,a.showTips=!a.wizard&&!a.systemConfig.common.tipsDisabled,await this.findCurrentHost(a),a.currentHost&&this.readRepoAndInstalledInfo(a.currentHost)}catch(e){console.log(`Error reading repo in onReady: ${e.stack}`)}this.adaptersWorker.registerRepositoryHandler(this.repoChangeHandler),this.adaptersWorker.registerHandler(this.adaptersChangeHandler),this.hostsWorker.registerHandler(this.updateHosts),this.hostsWorker.registerNotificationHandler(this.handleNewNotifications);let o=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`);if(a.expertMode=zy(this.state.eosAccessRole)&&(o?o===`true`:!!((t=a.systemConfig)!=null&&t.common.expertMode)),this.socket.isSecure||(n=this.socket.systemConfig)!=null&&(n=n.native)!=null&&n.vendor)try{var i;let e=await this.socket.getCurrentUser(),t=await this.socket.getObject(`system.user.${e}`);t!=null&&(i=t.native)!=null&&i.vendor&&Object.assign(this.adminGuiConfig,t.native.vendor),this.socket.isSecure&&t&&this.setState({user:{id:t._id,name:Pe.getObjectNameFromObj(t,this.socket.systemLang),color:t.common.color,icon:t.common.icon,invertBackground:t.common.color?this.mustInvertBackground(t.common.color):!1,group:await this.getLeadingGroupName(t._id)}})}catch(e){console.error(`Could not determine user to show: ${e.toString()}, ${e.stack}`),this.showAlert(e.toString(),`error`)}this.setState(a,()=>this.setCurrentTabTitle()),this.socket.subscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),this.socket.getObject(`system.discovery`).then(e=>this.onDiscoveryObject(`system.discovery`,e)).catch(e=>console.warn(`Cannot read system.discovery: ${e}`)),this.socket.subscribeObject(`system.discovery`,this.onDiscoveryObject),setTimeout(()=>this.logsWorkerChanged(this.state.currentHost),1e3),this.newsSubscribeTimer&&clearTimeout(this.newsSubscribeTimer),this.newsSubscribeTimer=setTimeout(()=>{this.newsSubscribeTimer=null,this.subscribeOwnNews().catch(e=>console.warn(`Cannot subscribe EOS news: ${e}`))},5e3),setTimeout(async()=>{var e;let t=await((e=this.hostsWorker)==null?void 0:e.getNotifications(a.currentHost));await this.handleNewNotifications(t)},3e3)}catch(e){console.error(`Error in onReady: ${e.stack}`),this.showAlert(`Error in onReady: ${e.stack}`,`error`),this.setState({ready:!0})}},onError:e=>{console.error(e);let t;t=e instanceof Error&&e.message||e.toString(),t===`ioBroker is not connected`?this.state.cloudNotConnected||(this.showAlert(A.t(t),`error`),setInterval(()=>{this.state.cloudReconnect>0?this.setState({cloudReconnect:this.state.cloudReconnect-1}):window.location.reload()},1e3),this.setState({cloudNotConnected:!0,cloudReconnect:10})):this.showAlert(t,`error`)}}),window.NEXOWATT_EOS_ADMIN_SOCKET=this.socket,window.NEXOWATT_EOS_SOCKET=this.socket,window.dispatchEvent(new CustomEvent(`nexowatt-eos-admin-socket-ready`))))}componentWillUnmount(){var e,t,n,r,i;if(window.removeEventListener(`hashchange`,this.onHashChanged,!1),window.removeEventListener(`vite:preloadError`,by),window.removeEventListener(`nexowatt-eos-policy`,this.onEosPolicyChanged),(e=this.socket)==null||e.unsubscribeState(`system.adapter.discovery.0.alive`,this.onDiscoveryAlive),(t=this.socket)==null||t.unsubscribeObject(`system.discovery`,this.onDiscoveryObject),this.newsSubscribeTimer&&=(clearTimeout(this.newsSubscribeTimer),null),this.newsSubscription){var a;(a=this.socket)==null||a.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=void 0}(n=this.adaptersWorker)==null||n.unregisterRepositoryHandler(this.repoChangeHandler),(r=this.adaptersWorker)==null||r.unregisterHandler(this.adaptersChangeHandler),(i=this.hostsWorker)==null||i.unregisterHandler(this.updateHosts),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.guiSettingsRetryTimer&&=(clearTimeout(this.guiSettingsRetryTimer),null),this.pendingCommandTimer&&=(clearTimeout(this.pendingCommandTimer),null),this.pendingCommand=null,window._localStorage&&(window._localStorage=void 0,window._sessionStorage=void 0)}async findCurrentHost(e){if(!this.socket)return;if(e.hosts=await this.socket.getCompactHosts(),!this.state.currentHost){let r=(window._localStorage||window.localStorage).getItem(`App.currentHost`),i=e.hosts.find(e=>e._id===r);if(r&&i){var t;e.currentHost=i._id,e.currentHostName=((t=i.common)==null?void 0:t.name)||i._id.replace(`system.host.`,``)}else{var n;e.currentHost=e.hosts[0]._id,e.currentHostName=((n=e.hosts[0].common)==null?void 0:n.name)||e.hosts[0]._id.replace(`system.host.`,``)}}e.ownHost=e.currentHost;let r;try{r=await this.socket.getState(`${e.currentHost}.alive`)}catch(t){r=null,console.warn(`Cannot get state ${e.currentHost}.alive: ${t}`)}if(!(r!=null&&r.val))for(let t=0;t<e.hosts.length;t++)r=await this.socket.getState(`${e.hosts[t]._id}.alive`),r!=null&&r.val&&(e.currentHost=e.hosts[t]._id,e.currentHostName=e.hosts[t].common.name)}renderTokenTimeoutDialog(){return this.state.askForTokenRefresh?M(u,{open:!0,onClose:()=>e.logout(),children:[M(le,{children:[T(fe,{children:A.t(`ra_Session will expire in %s seconds. Continue?`,Math.round((this.state.askForTokenRefresh.expireAt-Date.now())/1e3))}),T(`div`,{children:T(je,{label:A.t(`ra_Do not ask for next 2 hours in this session`),control:T(ke,{checked:this.state.askForTokenRefresh.doNotAsk,onChange:()=>{var e;let t={...this.state.askForTokenRefresh};t.doNotAsk=!((e=this.state.askForTokenRefresh)!=null&&e.doNotAsk),this.setState({askForTokenRefresh:t})}})})})]}),M(St,{children:[T(V,{onClick:()=>{var e,t;let n=(e=this.state.askForTokenRefresh)==null?void 0:e.resolve;(t=this.state.askForTokenRefresh)!=null&&t.doNotAsk&&(this.doNotAskSessionExpiration=Date.now()+72e5),this.expireInSecInterval&&=(clearInterval(this.expireInSecInterval),null),this.setState({askForTokenRefresh:null},()=>n==null?void 0:n(!0))},variant:`contained`,startIcon:T(Kr,{}),children:A.t(`ra_Continue`)}),T(V,{onClick:()=>e.logout(),variant:`outlined`,color:`grey`,startIcon:T(jr,{}),children:A.t(`ra_Logout`)})]})]}):null}ownNewsState(e){if(!/^eos-admin\.(0|[1-9]\d*)$/.test(this.adminInstance))throw Error(`EOS_NEWS_INSTANCE_UNAVAILABLE`);return`${this.adminInstance}.info.${e}`}async subscribeOwnNews(){if(!this.socket)return;let e=this.ownNewsState(`newsFeed`);this.newsSubscription&&this.newsSubscription!==e&&this.socket.unsubscribeState(this.newsSubscription,this.onNews),this.newsSubscription=e,await this.socket.subscribeState(e,this.onNews)}renderNotificationsDialog(){var e,t;return!this.state.notificationsDialog||!this.state.systemConfig||!this.socket?null:T(Js,{notifications:((e=this.state.notifications)==null?void 0:e.notifications)||{},instances:((t=this.state.notifications)==null?void 0:t.instances)||{},onClose:()=>this.setState({notificationsDialog:!1}),ackCallback:(e,t)=>this.socket.clearNotifications(e,t),dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,socket:this.socket})}renderHostWarningDialog(){return!this.state.showHostWarning||!this.state.systemConfig||!this.socket?null:T(Id,{instances:this.state.showHostWarning.instances,messages:this.state.showHostWarning.result.system.categories,dateFormat:this.state.systemConfig.common.dateFormat,themeType:this.state.themeType,ackCallback:e=>this.socket.clearNotifications(this.state.showHostWarning.host,e),onClose:()=>this.setState({showHostWarning:null})})}renderNewsDialog(){return!this.state.showNews||!this.socket?null:T(jd,{newsArr:this.state.showNews.checkNews,current:this.state.showNews.lastNewsId,onSetLastNewsId:async e=>{e&&await this.socket.setState(this.ownNewsState(`newsLastId`),{val:e,ack:!0}),this.setState({showNews:null})}})}renderTipsDialog(){return!this.state.showTips||this.state.wizard||this.state.showNews||this.state.showHostWarning?null:T(iy,{t:A.t,lang:this.state.lang,lastTipId:(window._localStorage||window.localStorage).getItem(e.LAST_TIP_ID),onClose:(t,n)=>{(window._localStorage||window.localStorage).setItem(e.LAST_TIP_ID,n),this.setState({showTips:!1}),t&&this.disableTips()}})}async disableTips(){if(this.socket)try{var e;let t=await this.socket.getSystemConfig(!0);t!=null&&t.common&&!t.common.tipsDisabled&&(t.common.tipsDisabled=!0,await this.socket.setSystemConfig(t)),(e=this.state.systemConfig)!=null&&e.common&&this.setState({systemConfig:{...this.state.systemConfig,common:{...this.state.systemConfig.common,tipsDisabled:!0}}})}catch(e){this.showAlert(`Cannot save system configuration: ${e.toString()}`,`error`)}}renderSlowConnectionWarning(){return this.state.showSlowConnectionWarning?T(Xv,{readTimeoutMs:this.state.readTimeoutMs,t:A.t,onClose:e=>{e?this.setState({showSlowConnectionWarning:!1,readTimeoutMs:e},()=>this.readRepoAndInstalledInfo(this.state.currentHost,{offerLongerTimeout:!0})):this.setState({showSlowConnectionWarning:!1})}}):null}readRepoAndInstalledInfo(e,t){let n=this.readRepoAndInstalledInfoRun(e,++this.repoInfoRun,t);return this.repoInfoPromise=n,n}async readRepoAndInstalledInfoRun(e,t,n){if(!this.socket)throw Error(`Socket not initialized`);let r=n==null?void 0:n.update,i=()=>{n!=null&&n.offerLongerTimeout&&this.setState({showSlowConnectionWarning:!0})},[a,o,s]=await Promise.all([this.socket.getCompactRepository(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getRepositoryCompact: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactInstalled(e,r,this.state.readTimeoutMs).catch(e=>(window.alert(`Cannot getInstalled: ${e}`),e.toString().includes(`timeout`)&&i(),{})),this.socket.getCompactAdapters(r).then(e=>(t===this.repoInfoRun&&this.setState({adapters:e}),e)).catch(e=>(window.alert(`Cannot read adapters: ${e}`),{}))]);t===this.repoInfoRun&&(o&&s&&Object.keys(s).forEach(e=>{o[e]&&s[e].iv&&(o[e].ignoreVersion=s[e].iv)}),this.setState({repository:a,installed:o,adapters:s}))}static tabOfHash(e){return e.replace(/^#/,``).split(`/`)[0]}static isAdminTab(e){return!e||Cy.includes(e)}chatBlocksLeaving(t){return this.chatLeaveConfirmed?(this.chatLeaveConfirmed=!1,!1):this.chatBusy&&e.isAdminTab(e.tabOfHash(this.lastHash))&&!e.isAdminTab(t)}assistantNavigate(t){let n=t.startsWith(`#`)?t:`#${t}`;return e.isAdminTab(e.tabOfHash(n))?(window.location.hash=n,Promise.resolve(!0)):new Promise(e=>this.setState({chatLeaveDialog:{target:{hash:n},reason:`assistant`,resolve:e}}))}onChatLeaveDialog(e){let t=this.state.chatLeaveDialog;this.setState({chatLeaveDialog:null},()=>{var n;t==null||(n=t.resolve)==null||n.call(t,e);let r=t==null?void 0:t.target;e&&r&&(this.chatLeaveConfirmed=!0,`hash`in r?window.location.hash=r.hash:this.handleNavigation(r.tab,r.subTab,r.param))})}static getPort(){let t=parseInt(window.location.port,10);if(Number.isNaN(t))switch(e.getProtocol()){case`https:`:t=443;break;case`http:`:t=80}return t&&t!==3e3||(t=8188),t}static getProtocol(){return window.location.protocol}static createTheme(e){return a(Pe.getThemeName(e))}static getThemeName(e){return e.name}static getThemeType(e){return e.palette.mode}renderHostSelector(){return!this.socket||!this.hostsWorker?null:T(tc,{name:`admin.appBar.hostSelector`,config:this.adminGuiConfig,children:T(Sd,{themeType:this.state.themeType,expertMode:this.state.expertMode,socket:this.socket,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,setCurrentHost:(e,t)=>{this.setState({currentHostName:e,currentHost:t},async()=>{var e;this.logsWorkerChanged(t),(window._localStorage||window.localStorage).setItem(`App.currentHost`,t),await this.readRepoAndInstalledInfo(t,{offerLongerTimeout:!0});let n=await((e=this.hostsWorker)==null?void 0:e.getNotifications(t));await this.handleNewNotifications(n)})}})})}setCurrentTabTitle(){this.setTitle(this.state.currentTab.tab.replace(`tab-`,``))}setTitle(e){document.title=`${e} - ${this.state.currentHostName||`NexoWatt EOS`}`}getCurrentTab(){var e;if(!this.socket||!this.hostsWorker||!this.adaptersWorker||!this.instancesWorker||!this.objectsWorker||!this.state.systemConfig||!this.logsWorker)return null;if((e=this.state)!=null&&(e=e.currentTab)!=null&&e.tab){if(this.state.currentTab.tab===`tab-adapters`){let e=this.props.width===`xs`||this.props.width===`sm`,t=!e&&this.state.drawerState===J.opened,n=e||this.state.drawerState===J.closed;return T(ht,{fallback:T(Gc,{}),children:T(Ty,{theme:this.state.theme,triggerUpdate:this.state.triggerAdapterUpdate,forceUpdateAdapters:this.state.forceUpdateAdapters,adaptersWorker:this.adaptersWorker,instancesWorker:this.instancesWorker,themeType:this.state.themeType,systemConfig:this.state.systemConfig,socket:this.socket,adminHost:this.state.ownHost,hostsWorker:this.hostsWorker,currentHost:this.state.currentHost,ready:this.state.ready&&this.state.connected,t:A.t,lang:A.getLanguage(),expertMode:this.state.expertMode,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),commandRunning:this.state.commandRunning,onSetCommandRunning:e=>this.setState({commandRunning:e}),menuOpened:t,menuClosed:n,adminGuiConfig:this.adminGuiConfig,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,adminInstance:this.adminInstance,currentAdminVersion:this.state.versionAdmin,onUpdating:e=>this.setState({updating:e}),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`adapters`)})}if(this.state.currentTab.tab===`tab-instances`)return T(ht,{fallback:T(Gc,{}),children:T(Ey,{menuPadding:this.state.drawerState===J.closed?0:this.state.drawerState===J.opened?this.state.editMenuList?250:180:50,socket:this.socket,instancesWorker:this.instancesWorker,lang:A.getLanguage(),hostname:this.state.hostname,adminInstance:this.adminInstance,repository:this.state.repository,hosts:this.state.hosts,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,t:A.t,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,width:this.props.width,configStored:e=>this.allStored(e),executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),inBackgroundCommand:this.state.commandError||this.state.performed,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation,hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`instances`)});if(this.state.currentTab.tab===`tab-overview`)return T(ht,{fallback:T(Gc,{}),children:T(wy,{t:A.t,lang:this.state.lang,socket:this.socket,theme:this.state.theme,themeType:this.state.themeType,currentHost:this.state.currentHost,currentHostName:this.state.currentHostName,hostsWorker:this.hostsWorker,instancesWorker:this.instancesWorker,objectsWorker:this.objectsWorker,logsWorker:this.logsWorker,expertMode:this.state.expertMode,installed:this.state.installed,repository:this.state.repository,handleNavigation:e=>this.handleNavigation(e),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`overview`)});if(this.state.currentTab.tab===`tab-intro`)return T(ht,{fallback:T(Gc,{}),children:T(Dy,{hostname:this.state.hostname,adminInstance:this.adminInstance,instancesWorker:this.instancesWorker,hostsWorker:this.hostsWorker,showAlert:(e,t)=>this.showAlert(e,t),socket:this.socket,t:A.t,lang:A.getLanguage(),theme:this.state.theme},`intro`)});if(this.state.currentTab.tab===`tab-logs`)return T(ht,{fallback:T(Gc,{}),children:T(Oy,{t:A.t,width:this.props.width,lang:this.state.lang,socket:this.socket,themeType:this.state.themeType,theme:this.state.theme,ready:this.state.ready,logsWorker:this.logsWorker,expertMode:this.state.expertMode,currentHost:this.state.currentHost,hostsWorker:this.hostsWorker,clearErrors:()=>this.clearLogErrors(),hostSelector:this.renderHostSelector(),menuButtonSpace:this.needsMenuButtonSpace()},`logs`)});if(this.state.currentTab.tab===`tab-files`)return T(ht,{fallback:T(Gc,{}),children:T(ky,{ready:this.state.ready,t:A.t,expertMode:this.state.expertMode,lang:A.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`files`)});if(this.state.currentTab.tab===`tab-users`)return T(ht,{fallback:T(Gc,{}),children:T(jy,{ready:this.state.ready,t:A.t,expertMode:this.state.expertMode,lang:A.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`users`)});if(this.state.currentTab.tab===`tab-enums`)return T(ht,{fallback:T(Gc,{}),children:T(My,{t:A.t,lang:A.getLanguage(),socket:this.socket,themeType:this.state.themeType,theme:this.state.theme},`enums`)});if(this.state.currentTab.tab===`tab-objects`)return T(ht,{fallback:T(Gc,{}),children:T(Ay,{t:A.t,theme:this.state.theme,themeName:this.state.themeName,themeType:this.state.themeType,expertMode:this.state.expertMode,objectsWorker:this.objectsWorker,lang:A.getLanguage(),socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma})},`objects`);if(this.state.currentTab.tab===`tab-hosts`)return T(ht,{fallback:T(Gc,{}),children:T(Fy,{socket:this.socket,lang:A.getLanguage(),hostsWorker:this.hostsWorker,toggleTranslation:this.toggleTranslation,noTranslation:this.state.noTranslation,themeType:this.state.themeType,theme:this.state.theme,expertMode:this.state.expertMode,t:A.t,currentHost:this.state.currentHost,executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),systemConfig:this.state.systemConfig,showAdaptersWarning:this.showAdaptersWarning,adminInstance:this.adminInstance,onUpdating:e=>this.setState({updating:e})})});if(this.state.currentTab.tab===`tab-devicemanager`)return T(ht,{fallback:T(Gc,{}),children:T(Py,{themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma},this.state.currentTab.tab)});let e=this.state.currentTab.tab.match(/^tab-([-\w]+?)(?:-(\d+))?$/);if(e){var t;let n=(t=this.tabsInfo)==null?void 0:t.find(t=>t.name===e[0]||t.name===`tab-${e[1]}`);return T(ht,{fallback:T(Gc,{}),children:T(Ny,{hostname:this.state.hostname,adminInstance:this.adminInstance,hosts:this.state.hosts,instancesWorker:this.instancesWorker,tab:this.state.currentTab.tab,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,socket:this.socket,dateFormat:this.state.systemConfig.common.dateFormat,isFloatComma:this.state.systemConfig.common.isFloatComma,onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},icon:n==null?void 0:n.icon,supportsLoadingMessage:n==null?void 0:n.supportsLoadingMessage},this.state.currentTab.tab)})}}return null}clearLogErrors(){var e,t;(e=this.logsWorker)==null||e.resetErrors(),(t=this.logsWorker)==null||t.resetWarnings()}getCurrentDialog(){if(this.state&&this.state.currentTab&&this.state.currentTab.dialog){if(this.state.currentTab.dialog===`system`)return this.getSystemSettingsDialog();if(this.state.currentTab.dialog===`discovery`)return this.getDiscoveryModal()}return null}getSystemSettingsDialog(){return zy(this.state.eosAccessRole)?T(gd,{eosAccessRole:this.state.eosAccessRole,adminGuiConfig:this.adminGuiConfig,width:this.props.width,currentHost:this.state.currentHost,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,onClose:async e=>{var t;d.doNavigate(null);let n=await((t=this.socket)==null?void 0:t.getObject(`system.config`));n&&(e?this.setState({triggerAdapterUpdate:this.state.triggerAdapterUpdate+1,systemConfig:n}):this.setState({systemConfig:n}))},lang:this.state.lang,socket:this.socket,currentTab:this.state.currentTab,expertModeFunc:e=>{if(!zy(this.state.eosAccessRole))return;(window._sessionStorage||window.sessionStorage).removeItem(`App.expertMode`);let t=JSON.parse(JSON.stringify(this.state.systemConfig));t.common.expertMode=e,this.setState({expertMode:e,systemConfig:t})},t:A.t},`systemSettings`):null}handleAlertClose(e,t){t!==`clickaway`&&this.setState({alert:!1})}isCausedByConnectionLoss(e,t){var n;return e.includes(`notConnectedError`)?!0:this.connectionLostAt?!((n=this.socket)!=null&&n.isConnected())||this.connectionLostAt>t-Wy:!1}getConnectionLostText(){return this.connectionLostAt?A.t(`Connection to admin lost. Waiting for reconnection...`):void 0}showAlert(e,t){t!==`error`&&t!==`warning`&&t!==`info`&&t!==`success`&&(t=`info`);let n;n=typeof e==`string`?e:e instanceof Error?e.message||e.toString():e==null?`null`:e.toString(),this.setState({alert:!0,alertType:t,alertMessage:n})}handleDrawerState(e){(window._localStorage||window.localStorage).setItem(`App.drawerState`,e.toString()),this.setState({drawerState:e})}static logout(){bd().then(()=>{un.deleteTokensStatic(),window.location.replace(`/login.html`)}).catch(()=>{window.alert(`Abmeldung konnte nicht bestätigt werden. Bitte erneut versuchen.`)})}allStored(e){this._tempAllStored!==e&&(this._tempAllStored=e,this.forceUpdate())}closeDataNotStoredDialog(){this.setState({dataNotStoredDialog:!1})}confirmDataNotStored(){this._tempAllStored=!0,this.setState({dataNotStoredDialog:!1},()=>{var e,t,n;return this.handleNavigation((e=this.state.dataNotStoredTab)==null?void 0:e.tab,(t=this.state.dataNotStoredTab)==null?void 0:t.subTab,(n=this.state.dataNotStoredTab)==null?void 0:n.param)})}executeCommand(e,t,n,r){if(typeof t==`boolean`&&(n=t,t=void 0),!(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected()))){if(this.pendingCommand){this.showAlert(`EOS stellt die Verbindung noch her. Ein Installations- oder Updatebefehl wartet bereits.`,`warning`);return}let i={cmd:e,host:t,callback:n||void 0,files:r,started:Date.now()};this.pendingCommand=i,this.showAlert(`EOS stellt die Verbindung noch her. Der Befehl wird automatisch gestartet, sobald das System bereit ist.`,`info`);let a=()=>{this.pendingCommand===i&&(this.state.connected&&this.state.ready&&this.socket&&(typeof this.socket.isConnected!=`function`||this.socket.isConnected())?(this.pendingCommand=null,this.pendingCommandTimer=null,this.executeCommand(i.cmd,i.host||void 0,i.callback,i.files)):Date.now()-i.started>=6e4?(this.pendingCommand=null,this.pendingCommandTimer=null,this.showAlert(`Der Befehl wurde nicht gestartet, weil die EOS-Verbindung innerhalb von 60 Sekunden nicht bereit war.`,`error`)):this.pendingCommandTimer=setTimeout(a,500))};this.pendingCommandTimer=setTimeout(a,250)}else this.state.commandRunning?this.showAlert(`Es läuft bereits ein Installations- oder Updatebefehl.`,`warning`):this.state.performed||this.state.commandError?this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null})):(console.log(`Execute: ${e}`),this.setState({cmd:e,cmdDialog:!0,callback:n,commandHost:t||this.state.currentHost,cmdFiles:r||null}))}closeCmdDialog(e){this.setState({cmd:null,cmdDialog:!1,commandError:!1,performed:!1,callback:null,commandHost:null,cmdFiles:null},()=>e&&e())}renderWizardDialog(){return this.state.wizard?T(Hl,{executeCommand:(e,t,n,r)=>this.executeCommand(e,t,n,r),host:this.state.currentHost,socket:this.socket,themeName:this.state.themeName,themeType:this.state.themeType,toggleTheme:this.toggleTheme,lang:A.getLanguage(),onClose:e=>{this.setState({wizard:!1,showRedirect:e,redirectCountDown:10,lang:A.getLanguage()},()=>{this.state.showRedirect&&setInterval(()=>{this.state.redirectCountDown>0?this.setState({redirectCountDown:this.state.redirectCountDown-1}):window.location.href=this.state.showRedirect},1e3)})},onNavigate:(e,t,n)=>{d.doNavigate(e,t,n),window.location.reload()}}):null}showRedirectDialog(){if(this.state.showRedirect){var e;return M(u,{open:!0,onClose:()=>{},children:[T(ve,{children:A.t(`Waiting for admin restart...`)}),T(le,{children:T(fe,{children:A.t(`Redirect in %s second(s)`,this.state.redirectCountDown)})}),M(St,{children:[window.sidebar||window.opera&&window.print||window.document.all&&(e=window.external)!=null&&e.AddFavorite?T(V,{onClick:()=>{if(window.sidebar&&this.state.showRedirect)window.sidebar.addPanel(`NexoWatt EOS`,this.state.showRedirect,``);else if(window.opera&&this.state.showRedirect&&window.print){let e=document.createElement(`a`);e.setAttribute(`href`,this.state.showRedirect),e.setAttribute(`title`,`NexoWatt EOS`),e.setAttribute(`rel`,`sidebar`),e.click()}else document.all&&window.external.AddFavorite(this.state.showRedirect,`NexoWatt EOS`)},children:A.t(`Bookmark admin`)}):null,this.state.redirectCountDown?T(V,{variant:`contained`,onClick:()=>this.state.showRedirect&&(window.location.href=this.state.showRedirect),children:A.t(`Go to admin now`)}):null]})]})}return null}renderCommandDialog(){return this.state.cmd&&this.socket?T($s,{onSetCommandRunning:e=>this.setState({commandRunning:e}),onClose:()=>this.closeCmdDialog(()=>this.setState({commandRunning:!1})),visible:this.state.cmdDialog,callback:this.state.callback,onInBackground:()=>this.setState({cmdDialog:!1}),cmd:this.state.cmd,files:this.state.cmdFiles||void 0,errorFunc:()=>this.setState({commandError:!0}),performed:()=>this.setState({performed:!0}),inBackground:this.state.commandError||this.state.performed,commandError:this.state.commandError,socket:this.socket,host:this.state.commandHost||this.state.currentHost,ready:this.state.ready&&this.state.connected,t:A.t}):null}async getLeadingGroupName(e){if(!this.socket)throw Error(`Socket not ready`);try{let t=await this.socket.getForeignObjects(`system.group.*`,`group`),n=Object.values(t||{}).filter(t=>{var n;return t==null||(n=t.common)==null||(n=n.members)==null?void 0:n.includes(e)}),r=n.find(e=>e._id===`system.group.administrator`)||n[0];return r?Pe.getObjectNameFromObj(r,this.socket.systemLang):``}catch(t){return console.warn(`Cannot read groups of ${e}: ${t}`),``}}renderSiteName(){var e;let t=(e=this.state.systemConfig)==null||(e=e.common)==null?void 0:e.siteName;return t?T(`div`,{style:By.siteName,children:t}):null}needsMenuButtonSpace(){var e;return!((e=this.state.systemConfig)!=null&&(e=e.common)!=null&&e.siteName)&&this.state.drawerState===J.closed}renderFloatingButtons(){let e=this.state.drawerState===J.closed,t=this.state.cmd&&!this.state.cmdDialog;return!e&&!t?null:M(F,{sx:By.floatingButtons,children:[e?T(k,{onClick:()=>this.handleDrawerState(J.opened),children:T(xt,{})}):null,t?T(k,{onClick:()=>this.setState({cmdDialog:!0}),children:T(zr,{style:this.state.commandError?By.errorCmd:this.state.performed?Pe.getStyle(this.state.theme,By.performed):By.cmd})}):null]})}renderAlertSnackbar(){return T(qe,{open:this.state.alert,autoHideDuration:6e3,onClose:()=>this.handleAlertClose(),children:T(C,{severity:this.state.alertType,variant:`filled`,onClose:()=>this.handleAlertClose(),children:this.state.alertMessage})})}renderDialogConfirm(){return this.state.dataNotStoredDialog?T(Qt,{title:A.t(`ra_Please confirm`),text:A.t(`ra_Some data are not stored. Discard?`),ok:A.t(`ra_Discard`),cancel:A.t(`ra_Cancel`),onClose:e=>e?this.confirmDataNotStored():this.closeDataNotStoredDialog()}):null}renderChatLeaveDialog(){if(!this.state.chatLeaveDialog)return null;let e=this.state.chatLeaveDialog.reason===`busy`;return T(Qt,{title:A.t(`ra_Please confirm`),text:A.t(e?`The assistant is still working on an answer, which is lost on this tab. Leave anyway?`:`The assistant is not available on this tab and will be closed. Continue?`),ok:A.t(e?`Leave anyway`:`Continue`),cancel:A.t(`ra_Cancel`),onClose:e=>this.onChatLeaveDialog(e)})}renderExpertDialog(){return!this.state.expertModeDialog||!zy(this.state.eosAccessRole)?null:T(wd,{onClose:e=>{if(!zy(this.state.eosAccessRole))this.setState({expertModeDialog:!1,expertMode:!1});else if(e===`openSettings`)d.doNavigate(null,`system`);else if(e){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`),this.setState({expertModeDialog:!1,expertMode:!this.state.expertMode})}else this.state.expertModeDialog&&this.setState({expertModeDialog:!1})},expertMode:this.state.expertMode})}renderShowGuiSettings(){return this.state.showGuiSettings?M(Qe,{anchorEl:this.state.showGuiSettings,open:!0,onClose:()=>this.setState({showGuiSettings:null}),children:[T(Lt,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:A.t(`Use settings of other browsers`)}),T(Lt,{onClick:()=>{this.setState({showGuiSettings:null}),this.enableGuiSettings(!0,!0).catch(e=>console.error(`Cannot enable GUI settings: ${e}`))},children:A.t(`Use settings of this browser`)}),M(Lt,{onClick:()=>this.setState({showGuiSettings:null}),children:[T(Nt,{children:T(O,{fontSize:`small`})}),T(Yt,{children:A.t(`Cancel`)})]})]}):null}renderExpertModeButton(){var e;let t=(window._sessionStorage||window.sessionStorage).getItem(`App.expertMode`),n=!t||t===`true`==!!((e=this.state.systemConfig)!=null&&e.common.expertMode);return zy(this.state.eosAccessRole)?T(tc,{name:`admin.appBar.expertMode`,config:this.adminGuiConfig,children:T(Rt,{title:`${A.t(`Toggle expert mode`)} ${n?``:` (${A.t(`only in this browser session`)})`}`,slotProps:{popper:{sx:By.tooltip}},children:T(ot,{color:`secondary`,variant:`dot`,sx:{"& .MuiBadge-badge":By.expertBadge},invisible:n,children:T(k,{"data-eos-expert-control":`1`,"aria-label":A.t(`Toggle expert mode`),"aria-pressed":this.state.expertMode,onClick:()=>{var e;if(zy(this.state.eosAccessRole)){if(!!((e=this.state.systemConfig)!=null&&e.common.expertMode)==!this.state.expertMode){var t;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(t=this.refConfigIframe)==null||(t=t.contentWindow)==null||t.postMessage(`updateExpertMode`,`*`)}else if((window._sessionStorage||window.sessionStorage).getItem(`App.doNotShowExpertDialog`)===`true`){var n;(window._sessionStorage||window.sessionStorage).setItem(`App.expertMode`,this.state.expertMode?`false`:`true`),this.setState({expertMode:!this.state.expertMode}),(n=this.refConfigIframe)==null||(n=n.contentWindow)==null||n.postMessage(`updateExpertMode`,`*`)}else this.setState({expertModeDialog:!0})}},style:{color:this.state.expertMode?this.state.theme.palette.expert:void 0},color:`default`,children:T(Mt,{style:{...By.expertIcon,...this.state.expertMode?By.expertIconActive:void 0}})})})})}):null}renderMenuButtons(){let e=this.state.noNotifications.warning+this.state.noNotifications.other;return M(Me,{children:[T(Rt,{title:A.t(`Notifications`),slotProps:{popper:{sx:By.tooltip}},children:T(k,{disableRipple:!e,style:{opacity:e?1:.3},onClick:e?()=>this.setState({notificationsDialog:!0}):void 0,children:T(ot,{badgeContent:this.state.noNotifications.other+this.state.noNotifications.warning,color:this.state.noNotifications.warning>0?`error`:`secondary`,max:99,children:T(Ir,{})})})}),T(tc,{name:`admin.appBar.discovery`,config:this.adminGuiConfig,children:this.state.discoveryAlive?T(Rt,{title:this.state.discoveryProposals?`${A.t(`Discovery devices`)} - ${A.t(`New adapter proposals`)}: ${this.state.discoveryProposals}`:A.t(`Discovery devices`),slotProps:{popper:{sx:By.tooltip}},children:T(k,{onClick:()=>d.doNavigate(null,`discovery`),children:T(ot,{badgeContent:this.state.discoveryProposals,color:`secondary`,max:99,children:T(Xe,{})})})}):T(`div`,{style:{display:`none`}})}),this.toggleThemePossible?T(tc,{name:`admin.appBar.toggleTheme`,config:this.adminGuiConfig,children:T(ne,{toggleTheme:this.toggleTheme,themeName:this.state.themeName,t:A.t})}):null,zy(this.state.eosAccessRole)&&this.state.expertMode?T(Rt,{title:A.t(`Synchronize admin settings between all opened browser windows`),slotProps:{popper:{sx:By.tooltip}},children:T(k,{onClick:e=>this.state.guiSettings?this.enableGuiSettings(!1):this.setState({showGuiSettings:e.target}),style:{color:this.state.guiSettings?this.state.theme.palette.expert:void 0},children:this.state.guiSettings?T(xr,{}):T(Gr,{})})}):null]})}renderToolbar(e){let t=Pe.getStyle(this.state.theme,By.performed);return M(pt,{children:[T(k,{size:`large`,edge:`start`,"data-eos-menu-toggle":`1`,"aria-label":A.t(`Open menu`),"aria-expanded":this.state.drawerState!==J.closed,style:{...By.menuButton,...!e&&this.state.drawerState!==J.closed?By.hide:void 0},onClick:()=>this.handleDrawerState(J.opened),children:T(xt,{})}),M(`div`,{style:By.wrapperButtons,children:[T(F,{className:`eos-header-controls`,children:this.renderMenuButtons()}),T(`div`,{style:By.flexGrow}),this.state.cmd&&!this.state.cmdDialog&&T(k,{size:`large`,onClick:()=>this.setState({cmdDialog:!0}),children:T(zr,{style:this.state.commandError?By.errorCmd:this.state.performed?t:By.cmd})})]}),this.renderSiteName(),this.state.drawerState!==J.opened&&!this.state.expertMode&&window.innerWidth>450&&M(N,{container:!0,style:{...By.avatarNotVisible,...this.state.drawerState===J.opened?void 0:By.avatarVisible},spacing:1,sx:{alignItems:`center`},children:[this.state.user?null:M(F,{component:`div`,style:By.wrapperName,children:[T(L,{children:`admin`}),!this.adminGuiConfig.icon&&this.state.versionAdmin&&M(L,{style:{...By.styleVersion,color:this.state.themeType===`dark`?`#ffffff80`:`#00000080`},children:[`v`,this.state.versionAdmin]})]}),T(N,{children:T(`a`,{href:`#easy`,onClick:e=>e.preventDefault(),style:{color:`inherit`,textDecoration:`none`},children:this.adminGuiConfig.icon?T(`div`,{style:{height:50,width:102,lineHeight:`50px`,background:`white`,borderRadius:5,padding:5},children:T(`img`,{src:this.adminGuiConfig.icon,alt:`logo`,style:{maxWidth:`100%`,maxHeight:`100%`}})}):T(_t,{onClick:()=>this.handleNavigation(`easy`),style:this.state.themeName===`colored`||this.state.themeName===`blue`?By.logoWhite:void 0,alt:`NexoWatt EOS`,src:`img/no-image.svg`})})})]})]})}renderSampleError(){var e,t;let n=(e=this.state.hasGlobalError)==null?void 0:e.message,r=(t=this.state.hasGlobalError)==null?void 0:t.stack;return vy(this.state.hasGlobalError)?M(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50},children:[T(`h2`,{children:A.t(`The admin was updated. Please load the page anew.`)}),T(V,{variant:`contained`,onClick:()=>window.location.reload(),children:A.t(`Reload`)}),T(`div`,{style:{color:`#888`,fontSize:14,marginTop:20},children:n})]}):M(`div`,{style:{textAlign:`center`,fontSize:22,marginTop:50,height:`calc(100% - 50px)`,overflow:`auto`},children:[T(`h1`,{style:{color:`#F00`},children:`Error in GUI!`}),`Please open the browser console (F12), copy error text from there and create the issue on`,` `,T(`a`,{href:`https://nexowatt.com`,target:`_blank`,rel:`noreferrer`,children:`github`}),T(`br`,{}),`Without this information it is not possible to analyse the error.`,T(`br`,{}),`It should looks like `,T(`br`,{}),T(`img`,{src:`img/browserError.png`,alt:`error`}),T(`br`,{}),`If in the second line you will see`,` `,T(`code`,{style:{color:`#888`,fontFamily:`monospace`,fontSize:16},children:`at :3000/static/js/main.chunk.js:36903`}),` `,`and not the normal file name,`,T(`br`,{}),`please try to reproduce an error with opened browser console. In this case the special "map" files will be loaded and the developers can see the real name of functions and files.`,T(`div`,{style:{color:`#F88`,fontSize:14,marginTop:20},children:n}),T(`pre`,{style:{color:`#F88`,fontSize:12,fontFamily:`monospace`,textAlign:`left`,marginTop:20,padding:20},children:(r||``).toString().split(`
|
|
205
|
+
`).map((e,t)=>M(`div`,{children:[e,T(`br`,{})]},t))})]})}renderEasyMode(){var e,t;return this.socket?T(de,{injectFirst:!0,children:T(_e,{theme:this.state.theme,children:M(`div`,{style:{height:`100%`},children:[!this.state.connected&&T(Gc,{text:this.getConnectionLostText()}),T(ht,{fallback:T(Gc,{}),children:T(Iy,{navigate:d.doNavigate,getLocation:d.getLocation,location:this.state.currentTab,toggleTheme:this.toggleTheme,themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,width:this.props.width,adminInstance:this.adminInstance,configs:this.state.easyModeConfigs,socket:this.socket,configStored:e=>this.allStored(e),isFloatComma:!!((e=this.state.systemConfig)!=null&&e.common.isFloatComma),dateFormat:((t=this.state.systemConfig)==null?void 0:t.common.dateFormat)||`DD.MM.YYYY`,t:A.t,lang:A.getLanguage(),onRegisterIframeRef:e=>this.refConfigIframe=e,onUnregisterIframeRef:e=>{this.refConfigIframe===e&&(this.refConfigIframe=null)},handleNavigation:this.handleNavigation})})]})})}):null}render(){var t,n;let r=this.props.width===`xs`||this.props.width===`sm`,i=this.needsMenuButtonSpace();return this.state.cloudNotConnected?T(de,{injectFirst:!0,children:M(_e,{theme:this.state.theme,children:[T(Ys,{label:M(Me,{children:[A.t(`Waiting for connection of ioBroker...`),` `,T(`span`,{style:{fontSize:18},children:this.state.cloudReconnect})]})}),this.renderAlertSnackbar()]})}):this.state.hasGlobalError?this.renderSampleError():this.state.login?T(de,{injectFirst:!0,children:M(_e,{theme:this.state.theme,children:[T(yd,{}),this.renderAlertSnackbar()]})}):!this.state.ready&&!this.state.updating?T(de,{injectFirst:!0,children:M(_e,{theme:this.state.theme,children:[T(Tt,{}),T(Ys,{label:A.t(`Loading...`)}),this.renderAlertSnackbar()]})}):this.state.strictEasyMode||this.state.currentTab.tab===`easy`?this.renderEasyMode():T(de,{injectFirst:!0,children:M(_e,{theme:this.state.theme,children:[T(ue,{theme:this.state.theme}),T(Tt,{}),T(`style`,{children:`@keyframes myEffect2 {
|
|
206
206
|
0% {
|
|
207
207
|
opacity: 1;
|
|
208
208
|
transform: translateX(0);
|
|
@@ -222,4 +222,4 @@ lub „Dalej”, aby użyć urządzeń z poprzedniego procesu wykrywania`,proces
|
|
|
222
222
|
transform: translateY(-10%);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
`}),
|
|
225
|
+
`}),M(Ot,{elevation:0,style:{...By.root,paddingRight:this.state.chatDockWidth||void 0},children:[T(bt,{color:`default`,position:`fixed`,sx:Pe.getStyle(this.state.theme,By.appBar,!r&&this.state.drawerState===J.opened&&!this.state.editMenuList&&By.appBarShift,!r&&this.state.drawerState===J.opened&&this.state.editMenuList&&By.appBarShiftEdit,!r&&this.state.drawerState===J.compact&&By.appBarShiftCompact,this.state.chatDockWidth?{paddingRight:`${this.state.chatDockWidth}px`}:void 0),children:this.renderToolbar(r)}),T(Qa,{backend:r?Is:ys,children:T(Hc,{adminGuiConfig:this.adminGuiConfig,state:this.state.drawerState,editMenuList:this.state.editMenuList,setEditMenuList:e=>this.setState({editMenuList:e}),systemConfig:this.state.systemConfig,handleNavigation:this.handleNavigation,onStateChange:e=>this.handleDrawerState(e),onLogout:()=>e.logout(),currentTab:this.state.currentTab&&this.state.currentTab.tab,currentTabId:(t=this.state.currentTab)==null?void 0:t.id,instancesWorker:this.instancesWorker,hostsWorker:this.hostsWorker,logsWorker:this.logsWorker,logoutTitle:A.t(`ra_Logout`),isSecure:(n=this.socket)==null?void 0:n.isSecure,versionAdmin:this.state.versionAdmin,t:A.t,lang:A.getLanguage(),socket:this.socket,expertMode:this.state.expertMode,ready:this.state.ready,themeName:this.state.themeName,themeType:this.state.themeType,hostname:this.state.hostname,adminInstance:this.adminInstance,hosts:this.state.hosts,repository:this.state.repository,installed:this.state.installed,theme:this.state.theme,provideTabsInfo:e=>{this.tabsInfo=e},onSystemSettings:()=>d.doNavigate(null,`system`),eosAccessRole:this.state.eosAccessRole,expertModeControl:this.renderExpertModeButton(),user:this.state.user})}),T(Ot,{elevation:0,square:!0,id:`app-paper`,sx:Pe.getStyle(this.state.theme,By.content,!r&&this.state.drawerState!==J.compact&&!this.state.editMenuList&&By.contentMargin,!r&&this.state.drawerState!==J.compact&&this.state.editMenuList&&By.contentMarginEdit,!r&&this.state.drawerState!==J.opened&&By.contentMarginCompact,!r&&this.state.drawerState!==J.closed&&By.contentShift,!1,i&&!Sy.includes(this.state.currentTab.tab)&&By.contentMenuButtonSpace),children:this.getCurrentTab()}),this.renderAlertSnackbar()]}),this.renderTokenTimeoutDialog(),this.renderExpertDialog(),this.getCurrentDialog(),this.renderDialogConfirm(),this.renderChatLeaveDialog(),this.renderCommandDialog(),this.renderWizardDialog(),this.showRedirectDialog(),this.renderSlowConnectionWarning(),this.renderNewsDialog(),this.renderTipsDialog(),this.renderHostWarningDialog(),this.renderNotificationsDialog(),!this.state.connected&&!this.state.redirectCountDown&&!this.state.updating?T(Gc,{text:this.getConnectionLostText()}):null,this.renderShowGuiSettings()]})})}};j(Yy,`LAST_TIP_ID`,`App.lastTipId`);var Xy=w()(Yy),Zy=t({});$r(),window.adapterName=`eos-admin`,window.USE_OAUTH2=!0,console.log(`iobroker.${window.adapterName}@${ei.version}`);var Qy=[`ChunkLoadError`,`Failed to fetch dynamically imported module`,`removeChild`,`DOMException`],$y=[`removeChild`,`Loading chunk`,`getWidth`,`safari-extension`,`this.animation`,`No connection`,`notConnectedError`,`has no target`,`ResizeObserver`,`WorkerGlobalScope`,`generateKey`,`The operation is insecure.`,`SyntaxError: An invalid or illegal string was specified`,`Can't find variable: servConn`,`LPContentScriptFeatures`,`window.webkit.messageHandlers`,`has no target`];(!window.disableDataReporting||window.disableDataReporting===`@@disableDataReporting@@`)&&window.location.port!==`3000`?gn({dsn:`https://43643152dab3481db69950ba866ee9d6@sentry.iobroker.net/58`,release:`iobroker.${window.adapterName}@${ei.version}`,integrations:[hn()],beforeSend(e){var t;let n=e==null||(t=e.exception)==null||(t=t.values)==null?void 0:t.map(e=>e.value).join(` `),r=e==null?void 0:e.message;if(n&&Qy.find(e=>n.includes(e)))window.location.reload();else if(n&&$y.find(e=>n.includes(e)))return null;else if(r&&Qy.find(e=>r.includes(e)))window.location.reload();else if(r&&$y.find(e=>r.includes(e)))return null;return e}}):(window.onerror=(e,t,n,r,i)=>{!i&&e&&(i=e);let a=i==null?void 0:i.toString();if(typeof i==`object`&&a&&Qy.find(e=>a.includes(e))){let e=i.message,t=i.stack;console.error(`Try to detect admin version change:`),console.error(e),console.error(JSON.stringify(t,null,2)),window.location.reload()}else{if(typeof i==`string`){if($y.find(e=>i.includes(e))){console.error(`Ignore error: ${i}`);return}throw Error(i)}throw i instanceof Error?i:Error(String(i))}},window.onunhandledrejection=e=>{var t;let n=((t=e.reason)==null?void 0:t.toString())??String(e.reason);if(n&&Qy.find(e=>n.includes(e)))console.error(`Try to detect admin version change: ${e.reason}`),window.location.reload();else throw e instanceof Error?e:Error(n)});var eb=document.getElementById(`root`);eb&&kt(eb).render(T(et,{dateAdapter:Zr,children:T(ni,{children:T(Xy,{})})}));export{Br as $,Nl as A,Uo as B,Mp as C,_r as Ct,zd as D,mr as Dt,Vd as E,hr as Et,tc as F,Zr as G,Po as H,Zs as I,Gr as J,qr as K,Is as L,Xc as M,Tc as N,Sd as O,pr as Ot,Ec as P,Vr as Q,ys as R,Fp as S,vr as St,Kd as T,U as Tt,no as U,Fo as V,Qa as W,Ur as X,Wr as Y,Hr as Z,qp as _,Sr as _t,Dv as a,Pr as at,Xp as b,yr as bt,v_ as c,jr as ct,om as d,Or as dt,zr as et,$p as f,Dr as ft,$ as g,Cr as gt,Up as h,wr as ht,Nv as i,Fr as it,Ml as j,qu as k,mm as l,Ar as lt,Vp as m,Tr as mt,Xv as n,Lr as nt,k_ as o,Nr as ot,Bp as p,Er as pt,Kr as q,Jv as r,Ir as rt,D_ as s,Mr as st,Zy as t,Rr as tt,sm as u,kr as ut,Jp as v,xr as vt,Ep as w,gr as wt,zp as x,W as xt,Yp as y,br as yt,vs as z};
|