iobroker.eos-admin 8.0.1 → 8.0.2
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 +3 -3
- package/NEXOWATT_EOS_PREBUILT_MANIFEST.json +102 -96
- package/START_HERE_8.0.2.md +41 -0
- package/adminWww/.vite/manifest.json +278 -278
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +333 -329
- package/adminWww/assets/{AccessTime-Dpa6PKHY.js → AccessTime-5f47qrw7.js} +1 -1
- package/adminWww/assets/{AceEditor-DTzNaeVy.js → AceEditor-CJ-_Ev2E.js} +1 -1
- package/adminWww/assets/{AdapterUpdateDialog-D3y2bGHM.js → AdapterUpdateDialog-QwlPbETd.js} +3 -3
- package/adminWww/assets/Adapters-gKngfaOu.js +7 -0
- package/adminWww/assets/{AdminUtils-DDT_kD8H.js → AdminUtils-CopxRJZ2.js} +1 -1
- package/adminWww/assets/{Apps-C8LE9l6Z.js → Apps-BKnx1gzD.js} +1 -1
- package/adminWww/assets/{Book-QmHxDaHb.js → Book-DrhneQH0.js} +1 -1
- package/adminWww/assets/{Cached-f77QQBQD.js → Cached-XJmxLN4E.js} +1 -1
- package/adminWww/assets/{Computer-DFIUq-fL.js → Computer-DDMBRY5r.js} +1 -1
- package/adminWww/assets/{Config-BZDUILCW.js → Config-BwTa1LdH.js} +1 -1
- package/adminWww/assets/{ConfigManager-BMdQoiCg.js → ConfigManager-DYwC4yq9.js} +1 -1
- package/adminWww/assets/{CustomModal-B8vdCRn1.js → CustomModal-DjI4oCb8.js} +1 -1
- package/adminWww/assets/{CustomTab-DSPqif6P.js → CustomTab-_HYUrXsZ.js} +1 -1
- package/adminWww/assets/{DeleteForever-BnEM-6_v.js → DeleteForever-Caoe64_y.js} +1 -1
- package/adminWww/assets/EasyMode-CCRqFtQq.js +1 -0
- package/adminWww/assets/Enums-BTurn3-x.js +92 -0
- package/adminWww/assets/{Extension-DU1jqvic.js → Extension-D-tNJv4S.js} +1 -1
- package/adminWww/assets/{Fields-Df7Llf6U.js → Fields-C2Bn4V04.js} +1 -1
- package/adminWww/assets/{Files-Bwbw17Fb.js → Files-XdmhxGOR.js} +1 -1
- package/adminWww/assets/Hosts-DiTMe9fw.js +120 -0
- package/adminWww/assets/{InfoOutlined-l86Si1qa.js → InfoOutlined-DIGDQvu6.js} +1 -1
- package/adminWww/assets/Instances-DA6FIgRs.js +4 -0
- package/adminWww/assets/Intro-CJpwLg8Q.js +2 -0
- package/adminWww/assets/{KeyboardArrowRight-zZUJhG9e.js → KeyboardArrowRight-DVPBjTKi.js} +1 -1
- package/adminWww/assets/Logs-CA0mEMlO.js +2 -0
- package/adminWww/assets/{MoreHoriz-CR2kD-dc.js → MoreHoriz-BYaCptH0.js} +1 -1
- package/adminWww/assets/Objects-B2IC3Bce.js +301 -0
- package/adminWww/assets/{Overview-CDvnM655.js → Overview-HG8fAMFM.js} +2 -2
- package/adminWww/assets/{Pageview-DBITLOzI.js → Pageview-DFHddrKX.js} +1 -1
- package/adminWww/assets/{PersonOff-ANdO5Nu4.js → PersonOff-BwYQLD1M.js} +1 -1
- package/adminWww/assets/{PushPinOutlined-DvxsqPHo.js → PushPinOutlined-CEBeTmNm.js} +1 -1
- package/adminWww/assets/Remove-BPxvNccW.js +1 -0
- package/adminWww/assets/{Schedule-BMMrgd7j.js → Schedule-BQlh1nhQ.js} +1 -1
- package/adminWww/assets/{Star-DNdm064z.js → Star-ChMjBwLn.js} +1 -1
- package/adminWww/assets/State-UGfoS6qW.js +1 -0
- package/adminWww/assets/Storage-DrC3j-wf.js +1 -0
- package/adminWww/assets/{TextSnippet-Bywi1YuG.js → TextSnippet-BQ4TSmvS.js} +1 -1
- package/adminWww/assets/{Timeline-IQCnSLiw.js → Timeline-CEyldmz2.js} +1 -1
- package/adminWww/assets/{Timer-Be9yF62g.js → Timer-I0twtyWh.js} +1 -1
- package/adminWww/assets/{UnfoldMore-Du7-8wYn.js → UnfoldMore-_DDSfPKk.js} +1 -1
- package/adminWww/assets/{Usb-Ca47vqRv.js → Usb-Dwk7qdYu.js} +1 -1
- package/adminWww/assets/{UsedResources-BIdU7UPm.js → UsedResources-B6HWeXGX.js} +2 -2
- package/adminWww/assets/Users-DFeYuC5y.js +1 -0
- package/adminWww/assets/{ViewCompact-C3SC0jFF.js → ViewCompact-BbfomOIi.js} +1 -1
- package/adminWww/assets/ViewList-1pB5VinA.js +1 -0
- package/adminWww/assets/{ViewSidebar-kHvah-XS.js → ViewSidebar-DdedDirX.js} +1 -1
- package/adminWww/assets/{VpnKey-iMA7KrB-.js → VpnKey-o8QeqmnU.js} +1 -1
- package/adminWww/assets/{WifiTethering-Da8nW7Do.js → WifiTethering-Cp63fmkC.js} +1 -1
- package/adminWww/assets/{_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-CpelrCgN.js → _virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-uaKFfE5p.js} +1 -1
- package/adminWww/assets/{bootstrap-D-7xcwTc.js → bootstrap-DSDOwKWU.js} +33 -33
- package/adminWww/assets/{date-fns-Bpgjk9P-.js → date-fns-ukillHs-.js} +1 -1
- package/adminWww/assets/helpers-CDcY0YJ-.js +1 -0
- package/adminWww/assets/{hostInit-huY-0clu.js → hostInit-Cd61hJHh.js} +1 -1
- package/adminWww/assets/{icons-material-Bu1f45BT.js → icons-material-Dms1APQk.js} +1 -1
- package/adminWww/assets/{index-D8vmzGp8.js → index-D6uhIclX.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BkdptYag.js → installSVGRenderer-BR-zIijZ.js} +1 -1
- package/adminWww/assets/{lib-CE1B3iHH.js → lib-BZRGBDoe.js} +2 -2
- package/adminWww/assets/{loadShare-eager-CRNcc8D7.js → loadShare-eager-BpwDZfDr.js} +93 -93
- package/adminWww/assets/{mf-entry-bootstrap-0-f6098d8b.js → mf-entry-bootstrap-0-2d631020.js} +3 -3
- package/adminWww/assets/{pendingShares-CuQbFsaK.js → pendingShares-D1Vr_qYv.js} +2 -2
- package/adminWww/assets/{sentry-B4uGc7ut.js → sentry-BFzW-2KQ.js} +1 -1
- package/adminWww/assets/{setYear-DurmWw03.js → setYear-DhVdgUBF.js} +1 -1
- package/adminWww/css/nexowatt-native-shell.css +72 -0
- package/adminWww/index.html +21 -21
- package/adminWww/js/eos-license-link.js +9 -16
- package/adminWww/js/nexowatt-native-shell.js +2 -2
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-8.0.1.js → remoteEntry-eos-8.0.2.js} +2 -2
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/web.js +25 -5
- package/build/lib/web.js.map +1 -1
- package/docs/ADMIN8_MIGRATION_8.0.0_DE.md +2 -0
- package/docs/cra/CRA_IEC_GAP_ANALYSIS_2026-09-30.md +5 -0
- package/docs/security/admin8-2026-11-04/development-1.log +4 -4
- package/docs/security/admin8-2026-11-04/development-2.log +275 -248
- package/docs/security/admin8-2026-11-05/system-fix/BACKEND_ROLE_REVIEW_DE.md +79 -0
- package/docs/security/admin8-2026-11-05/system-fix/NAVIGATION_DE.md +30 -0
- package/docs/security/admin8-2026-11-05/system-fix/REPORT_DE.md +51 -0
- package/docs/security/admin8-2026-11-05/system-fix/REVIEW_DE.md +65 -0
- package/docs/security/admin8-2026-11-05/system-fix/SCOPE_DE.md +21 -0
- package/docs/security/admin8-2026-11-05/system-fix/SYSTEM_DE.md +44 -0
- package/docs/security/admin8-2026-11-05/system-fix/archive-scan.json +12 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/README.md +46 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/integrity.json +16 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser-result.json +3607 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser.cjs +221 -0
- package/docs/security/admin8-2026-11-05/system-fix/browser/system-fixture.cjs +60 -0
- package/docs/security/admin8-2026-11-05/system-fix/evidence-sha256.json +49 -0
- package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node22.log +80 -0
- package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node24.log +19 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/lint.log +0 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/node22-tests.log +56 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/node24-tests.log +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/navigation/source-sha256.json +11 -0
- package/docs/security/admin8-2026-11-05/system-fix/path-budget.json +7 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/artifacts.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.json +22 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.stderr +1 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/backend-build.log +5 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/clean.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.json +22 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.stderr +2 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-install.log +4 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/consumer-package-lock.json +3258 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/development.log +392 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/frontend-build.log +149 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/http-node22.json +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/http-node24.json +15 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/inventory.log +8 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-journal.json +452 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-publish.log +10790 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/overlay-validation.json +12 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/pack.json +8104 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/pack.stderr +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/retired-801.json +68 -0
- package/docs/security/admin8-2026-11-05/system-fix/release/seal.log +6 -0
- package/docs/security/admin8-2026-11-05/system-fix/review-tests.log +30 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-before.log +86 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-lint.log +0 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-node22.log +44 -0
- package/docs/security/admin8-2026-11-05/system-fix/role-context-test.log +13 -0
- package/docs/security/admin8-2026-11-05/system-fix/validation.json +90 -0
- package/docs/third-party/admin8/NOTICE-PROVENANCE.json +1 -1
- package/io-package.json +9 -10
- package/package.json +3 -2
- package/release-manifests/admin8-development-validation.json +42 -32
- package/reports/security/artifact-inventory.json +561 -561
- package/reports/security/inventory-summary.json +7 -7
- package/reports/security/sbom-backend-lock.cdx.json +5 -5
- package/reports/security/sbom-frontend-lock.cdx.json +5 -5
- package/reports/security/source-runtime-manifest.json +155 -155
- package/tools/nexowatt-admin8-development-check.cjs +8 -1
- package/tools/nexowatt-installer-ems-selftest.cjs +1 -1
- package/tools/nexowatt-role-security-selftest.cjs +2 -2
- package/tools/nexowatt-user-area-selftest.cjs +1 -1
- package/tools/nexowatt-v7109-clean-core-selftest.cjs +1 -1
- package/tools/vendor/eos-retired-release-files.json +196 -1
- package/adminWww/assets/Adapters-WMGNQt7g.js +0 -7
- package/adminWww/assets/EasyMode-TwIN5yxu.js +0 -1
- package/adminWww/assets/Enums-CHm2sGa-.js +0 -92
- package/adminWww/assets/Hosts-BR0g-Wxo.js +0 -120
- package/adminWww/assets/Instances-BKydFSdw.js +0 -4
- package/adminWww/assets/Intro-Dt2GzmtW.js +0 -2
- package/adminWww/assets/Logs-hbcdBDN3.js +0 -2
- package/adminWww/assets/Objects-HPx0yuOk.js +0 -301
- package/adminWww/assets/Remove-DplJatnC.js +0 -1
- package/adminWww/assets/State-Cc-tyuqB.js +0 -1
- package/adminWww/assets/Storage-COo2RkS1.js +0 -1
- package/adminWww/assets/Users-BruHA-yU.js +0 -1
- package/adminWww/assets/ViewList-DuKCnBnc.js +0 -1
- package/adminWww/assets/helpers-DBoACUHw.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Do as e,Ds as t,Es as n,Fr as r,Hs as i,Ir as a,
|
|
1
|
+
import{Do as e,Ds as t,Es as n,Fr as r,Hs as i,Ir as a,Js as o,Lr as s,Oo as c,Os as l,So as u,Us as d,Ws as f,Zo as p,_o as m,bo as h,br as g,ho as _,mo as v,nc as y,qo as b,vo as x}from"./loadShare-eager-BpwDZfDr.js";import{t as S}from"./Extension-D-tNJv4S.js";import{n as ee,t as C}from"./Timeline-CEyldmz2.js";import{t as w}from"./Storage-DrC3j-wf.js";import{n as T,t as E}from"./UnfoldMore-_DDSfPKk.js";import{t as D}from"./AdminUtils-CopxRJZ2.js";import{ot as te}from"./bootstrap-DSDOwKWU.js";import{$ as ne,$t as O,A as re,C as ie,D as k,Dt as A,Jt as ae,L as oe,M as j,N as se,Nt as ce,O as le,Pt as ue,Qt as de,R as fe,V as pe,W as me,Xt as M,Y as he,Yt as ge,Zt as N,_n as P,ct as _e,dn as ve,en as ye,ft as be,gn as xe,i as Se,in as F,it as I,j as Ce,k as L,l as R,ln as z,mn as we,n as Te,nn as Ee,nt as B,o as De,on as Oe,q as ke,r as Ae,rn as je,rt as V,s as Me,sn as Ne,t as Pe,tn as Fe,un as Ie,v as Le,y as Re,z as ze}from"./installSVGRenderer-BR-zIijZ.js";var Be=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},H=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),F(t)&&O(t,function(e,r){z(e)&&(e={type:e}),t[r]=ve(e,Be(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&be(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=M(),a=Ie(r,function(e){return(z(e)||Ne(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new fe(e,this,this.ecModel))},this);this._data=Fe(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;O(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;O(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;O(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&je(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:k.size.m,align:`auto`,backgroundColor:k.color.transparent,borderColor:k.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:k.color.disabled,inactiveBorderColor:k.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:k.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:k.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:k.color.tertiary,borderWidth:1,borderColor:k.color.border},emphasis:{selectorLabel:{show:!0,color:k.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(le),U=N,W=O,G=A,K=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new G),this.group.add(this._selectorGroup=new G),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);i&&i!==`auto`||(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=re(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=j(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=j(de({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Ae(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=M(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),W(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
2
2
|
`)){var p=new G;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,U(q,f,null,r,d)).on(`mouseover`,U(J,m.name,null,r,d)).on(`mouseout`,U(Y,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=B(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=ce(h.fill);_&&_[3]===0&&(_[3]=.2,h=ye(ye({},h),{fill:ue(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,U(q,null,f,r,d)).on(`mouseover`,U(J,null,f,r,d)).on(`mouseout`,U(Y,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=B(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};B(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();W(e,function(e){var r=e.type,i=new V({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i);var o=t.getModel(`selectorLabel`),s=t.getModel([`emphasis`,`selectorLabel`]);pe(i,{normal:o,emphasis:s},{defaultText:e.title}),ne(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=Ve(c,r,o,s,d,m,u),y=new G,b=r.getModel(`textStyle`);if(Oe(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(He({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,ee=a,C=i.get(`formatter`),w=t;z(C)&&C?w=C.replace(`{name}`,t??``):Oe(C)&&(w=C(t));var T=m?b.getTextColor():r.get(`inactiveColor`);y.add(new V({style:ze(b,{text:w,x:S,y:p/2,fill:T,align:ee,verticalAlign:`middle`},{inheritColor:T})}));var E=new I({shape:y.getBoundingRect(),style:{fill:`transparent`}}),D=r.getModel(`tooltip`);return D.get(`show`)&&ke({el:E,componentModel:i,itemName:t,itemTooltipOption:D.option}),y.add(E),y.eachChild(function(e){e.silent=!0}),E.silent=!l,this.getContentGroup().add(y),ne(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();L(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){L(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(ie);function Ve(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),W(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Le(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function He(e){var t=e.icon||`roundRect`,n=Re(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=k.color.neutral00,n.style.lineWidth=2),n}function q(e,t,n,r){Y(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),J(e,t,n,r)}function J(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function Y(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function X(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),Ue(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){O(i,function(t,n){e[t?`select`:`unSelect`](n)}),Ue(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Ue(e,t){var n=t||{};return O(e.getData(),function(t){var r=t.get(`name`);if(r!==`
|
|
3
|
-
`&&r!==``){var i=e.isSelected(r);n[r]=Ee(n,r)?n[r]&&i:i}}),n}function We(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,N(X,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,N(X,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,N(X,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,N(X,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,N(X,`unSelect`))}var Ge=_e(Ke);function Ke(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function qe(e){e.registerComponentModel(H),e.registerComponentView(K),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Ge),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),We(e)}var Je=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Ce(t);e.prototype.init.call(this,t,n,r),Ye(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Ye(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=oe(H.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:k.color.accent50,pageIconInactiveColor:k.color.accent10,pageIconSize:15,pageTextStyle:{color:k.color.tertiary},animationDurationUpdate:800}),t}(H);function Ye(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,se(t,n,{type:`box`,ignoreSize:!!i})}var Xe=A,Z=[`width`,`height`],Q=[`x`,`y`],Ze=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Xe),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Xe)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=F(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new V({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=me(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:ae(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Z[s],l=Q[s],u=Z[1-s],d=Q[1-s];i&&L(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=ge(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;L(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),L(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new I({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&he(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;O([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,z(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Z[i],o=Q[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(K);function Qe(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function $e(e){R(qe),e.registerComponentModel(Je),e.registerComponentView(Ze),Qe(e)}function et(e){R(qe),R($e)}var tt=t(u(d,{children:[i(`g`,{transform:`translate(-1.4 -1) scale(0.8)`,children:i(`path`,{d:`M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11`})}),i(`circle`,{cx:`19.2`,cy:`19.2`,r:`4.4`})]}),`Instance`);n(),R([De,Se,et,Te,Pe]);var nt=36e5,rt=3e4,it=class extends b{constructor(e){super(e),l(this,`refreshTimer`,null),this.state={historyInstance:``,blocker:null,loading:!0,enabling:!1,cpu:[],mem:[],error:``}}componentDidMount(){this.props.paused||(this.detectAndLoad(),this.startTimer())}componentDidUpdate(e){e.currentHost!==this.props.currentHost&&this.setState({loading:!0,cpu:[],mem:[]},()=>void this.detectAndLoad()),e.paused!==this.props.paused&&(this.props.paused?this.stopTimer():(this.detectAndLoad(),this.startTimer()))}componentWillUnmount(){this.stopTimer()}startTimer(){this.stopTimer(),this.refreshTimer=setInterval(()=>{this.state.blocker?this.detectAndLoad():this.readData()},rt)}stopTimer(){this.refreshTimer&&=(clearInterval(this.refreshTimer),null)}getIds(){return{cpu:`${this.props.currentHost}.cpu`,mem:`${this.props.currentHost}.mem`}}async detectAndLoad(){try{var e,t,n,r,i,a,o;let d=await this.props.socket.getCompactSystemConfig(),f=(d==null||(e=d.common)==null?void 0:e.defaultHistory)||``;if(!f){var s,c;this.setState({historyInstance:``,blocker:`noDefaultHistory`,loading:!1}),(s=(c=this.props).onAvailabilityChange)==null||s.call(c,!1);return}let p=await this.props.socket.getState(`system.adapter.${f}.alive`);if(!(p!=null&&p.val)){var l,u;this.setState({historyInstance:f,blocker:`historyNotAlive`,loading:!1}),(l=(u=this.props).onAvailabilityChange)==null||l.call(u,!1);return}(t=(n=this.props).onAvailabilityChange)==null||t.call(n,!0);let m=this.getIds(),[h,g]=await Promise.all([this.props.socket.getObject(m.cpu),this.props.socket.getObject(m.mem)]),_=!!(h!=null&&(r=h.common)!=null&&(r=r.custom)!=null&&(r=r[f])!=null&&r.enabled)&&!!(g!=null&&(i=g.common)!=null&&(i=i.custom)!=null&&(i=i[f])!=null&&i.enabled);if((a=(o=this.props).onRecordingChange)==null||a.call(o,_),!_){this.setState({historyInstance:f,blocker:`notRecorded`,loading:!1});return}this.setState({historyInstance:f,blocker:null},()=>void this.readData())}catch(e){this.setState({error:e.toString(),loading:!1})}}async enableRecording(){return this.setRecording(!0)}async stopRecording(){return this.setRecording(!1)}async setRecording(e){this.setState({enabling:!0});try{let t=this.getIds();for(let n of[t.cpu,t.mem]){let t=await this.props.socket.getObject(n);t&&(t.common.custom||={},t.common.custom[this.state.historyInstance]={...t.common.custom[this.state.historyInstance]||{},enabled:e},await this.props.socket.setObject(n,t))}this.setState({enabling:!1,loading:!0},()=>void this.detectAndLoad())}catch(e){this.setState({enabling:!1,error:e.toString()})}}async readData(){let e=this.getIds(),t=Date.now(),n=t-nt,r={instance:this.state.historyInstance,start:n,end:t,step:6e4,aggregate:`average`,from:!1,ack:!1,q:!1,addId:!1};try{let[t,n]=await Promise.all([this.props.socket.getHistory(e.cpu,r),this.props.socket.getHistory(e.mem,r)]),i=e=>(e||[]).filter(e=>e.val!==null&&e.val!==void 0).map(e=>[e.ts,Math.round(Number(e.val)*100)/100]);this.setState({cpu:i(t),mem:i(n),loading:!1})}catch(e){this.setState({error:e.toString(),loading:!1})}}renderBlocker(){let{t:e}=this.props;return u(p,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[i(C,{sx:{fontSize:40,opacity:.4}}),i(g,{variant:`body2`,children:e(`CPU and RAM of this host are not recorded by %s yet`,this.state.historyInstance)}),this.state.blocker===`notRecorded`?i(m,{variant:`contained`,disabled:this.state.enabling,startIcon:this.state.enabling?i(s,{size:16}):null,onClick:()=>void this.enableRecording(),children:e(`Record CPU and RAM`)}):null]})}renderChart(){let{theme:e,themeType:t,t:n}=this.props,r=t===`dark`?`#96A2B4`:`#5C6675`,a={backgroundColor:`transparent`,grid:{left:45,right:45,top:40,bottom:30},tooltip:{trigger:`axis`},legend:{data:[n(`CPU (%)`),n(`Memory (%)`)],textStyle:{color:r},top:0},xAxis:{type:`time`,axisLabel:{color:r},axisLine:{lineStyle:{color:r}},splitLine:{show:!1}},yAxis:[{type:`value`,name:`%`,min:0,max:100,nameTextStyle:{color:r},axisLabel:{color:r},splitLine:{lineStyle:{color:e.palette.divider}}}],series:[{name:n(`CPU (%)`),type:`line`,showSymbol:!1,smooth:!0,lineStyle:{width:2,color:e.palette.primary.main},itemStyle:{color:e.palette.primary.main},data:this.state.cpu},{name:n(`Memory (%)`),type:`line`,showSymbol:!1,smooth:!0,lineStyle:{width:2,color:e.palette.secondary.main},itemStyle:{color:e.palette.secondary.main},data:this.state.mem}]};return i(xe,{echarts:Me,option:a,style:{height:260,width:`100%`},opts:{renderer:`svg`},notMerge:!0})}render(){return this.state.blocker===`noDefaultHistory`||this.state.blocker===`historyNotAlive`?null:this.state.error?i(p,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i(g,{variant:`body2`,color:`error`,children:this.state.error})}):this.state.loading?i(p,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i(s,{})}):this.state.blocker?this.renderBlocker():!this.state.cpu.length&&!this.state.mem.length?u(p,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[i(C,{sx:{fontSize:40,opacity:.4}}),i(g,{variant:`body2`,children:this.props.t(`Recording is active, but there is no data for the last hour yet`)})]}):this.renderChart()}};n();var at=3e4,ot=5e3,st=6,ct=16,lt=`App.overviewChartMinimized`,ut=5,$=`--`,dt=class t extends b{constructor(e){super(e),l(this,`refreshTimer`,null),l(this,`chartRef`,y.createRef()),l(this,`objectsTimer`,null),l(this,`mounted`,!1),l(this,`subscribedHost`,``),l(this,`onCpu`,(e,t)=>{this.mounted&&this.setState({cpu:(t==null?void 0:t.val)===null||(t==null?void 0:t.val)===void 0?null:Number(t.val)})}),l(this,`onMem`,(e,t)=>{this.mounted&&this.setState({mem:(t==null?void 0:t.val)===null||(t==null?void 0:t.val)===void 0?null:Number(t.val)})}),l(this,`onLogs`,e=>{this.mounted&&this.setState(t=>({logs:[...t.logs,...e].slice(-16)}))}),l(this,`onChartButton`,()=>{if(!this.state.chartMinimized&&this.state.chartRecording){var e;(e=this.chartRef.current)==null||e.stopRecording();return}let t=!this.state.chartMinimized;(window._localStorage||window.localStorage).setItem(lt,t?`true`:`false`),this.setState({chartMinimized:t})}),this.state={loaded:!1,objectsLoaded:!1,hostAlive:!1,adaptersTotal:0,adaptersActive:0,instancesTotal:0,instancesAlive:0,objectsCount:0,statesCount:0,hostInfo:null,adapters:[],logs:[],cpu:null,mem:null,chartAvailable:!0,chartRecording:!0,chartMinimized:(window._localStorage||window.localStorage).getItem(lt)===`true`}}componentDidMount(){this.mounted=!0,this.readAll(),this.objectsTimer=setTimeout(()=>{this.objectsTimer=null,this.readObjects()},ot),this.subscribeHost(),this.refreshTimer=setInterval(()=>void this.readAll(),at),this.props.logsWorker.registerHandler(this.onLogs)}async readObjects(){let e,t=0;try{let n=await this.props.socket.getObjectsCount();e=n.total,t=n.byType.state||0}catch(r){console.warn(`Cannot count the objects on the server, reading them all: ${r.message}`);let i=await this.props.objectsWorker.getObjects()||{};e=Object.keys(i).length;for(let e of Object.keys(i)){var n;((n=i[e])==null?void 0:n.type)===`state`&&t++}}this.mounted&&this.setState({objectsCount:e,statesCount:t,objectsLoaded:!0})}componentDidUpdate(e){e.currentHost!==this.props.currentHost&&(this.setState({loaded:!1,cpu:null,mem:null,hostInfo:null}),this.subscribeHost(),this.readAll())}componentWillUnmount(){this.mounted=!1,this.refreshTimer&&=(clearInterval(this.refreshTimer),null),this.objectsTimer&&=(clearTimeout(this.objectsTimer),null),this.unsubscribeHost(),this.props.logsWorker.unregisterHandler(this.onLogs)}subscribeHost(){this.unsubscribeHost(),this.subscribedHost=this.props.currentHost,this.subscribedHost&&(this.props.socket.subscribeState(`${this.subscribedHost}.cpu`,this.onCpu),this.props.socket.subscribeState(`${this.subscribedHost}.mem`,this.onMem))}unsubscribeHost(){this.subscribedHost&&=(this.props.socket.unsubscribeState(`${this.subscribedHost}.cpu`,this.onCpu),this.props.socket.unsubscribeState(`${this.subscribedHost}.mem`,this.onMem),``)}async readAll(){let{socket:e,currentHost:t}=this.props,[n,r,i,a]=await Promise.all([this.props.instancesWorker.getObjects(),e.getForeignStates(`system.adapter.*.alive`).catch(()=>({})),e.getState(`${t}.alive`).catch(()=>null),this.props.logsWorker.getLogs().catch(()=>({logs:[],logSize:0}))]);if(!this.mounted)return;let o=Object.values(n||{}).filter(e=>{var t;return(e==null||(t=e.common)==null?void 0:t.host)===this.hostName()}),s=new Set,c=new Set,l=[],u=0;for(let e of o){var d;let t=e._id.replace(`system.adapter.`,``).split(`.`)[0];if(s.add(t),(d=r[`${e._id}.alive`])!=null&&d.val){u++,c.add(t);let n=l.find(e=>e.name===t);if(n)n.instances++;else{var f,p;l.push({name:t,version:((f=e.common)==null?void 0:f.version)||``,instances:1,icon:(p=e.common)!=null&&p.icon?`adapter/${t}/${e.common.icon}`:``})}}}l.sort((e,t)=>e.name.localeCompare(t.name));let m=this.state.hostInfo;try{m=await this.props.socket.getHostInfo(t)}catch{}this.mounted&&this.setState({loaded:!0,hostAlive:!!(i!=null&&i.val),adaptersTotal:s.size,adaptersActive:c.size,instancesTotal:o.length,instancesAlive:u,hostInfo:m,adapters:l,logs:(a.logs||[]).slice(-16)})}static logText(e){return typeof e.message==`string`?e.message:e.message.original}hostName(){return this.props.currentHostName||this.props.currentHost.replace(`system.host.`,``)}static renderGaugeRow(e,t,n){return u(p,{sx:{display:`flex`,alignItems:`center`,gap:2,py:1},children:[i(g,{variant:`body2`,color:`text.secondary`,sx:{width:80},children:e}),i(f,{variant:`determinate`,value:Math.max(0,Math.min(100,t??0)),sx:{flex:1,maxWidth:160}}),i(g,{variant:`body2`,sx:{flex:1,textAlign:`right`},children:n})]},e)}renderSystemInfo(){let{t:e}=this.props,n=this.state.hostInfo,r=n!=null&&n.RAM?Number(n.RAM)/1024/1024/1024:0,s=this.state.mem!==null&&r?r*this.state.mem/100:null;return u(c,{sx:{flex:`1 1 340px`,p:2.5},children:[i(a,{title:e(`System information`)}),n?u(d,{children:[i(o,{name:e(`Platform`),value:String(n.Platform??`-`)}),i(o,{name:e(`Architecture`),value:String(n.Architecture??`-`)}),i(o,{name:`Node.js`,value:String(n[`Node.js`]??`-`)}),i(o,{name:`NPM`,value:String(n.NPM??`-`)}),i(o,{name:e(`System uptime`),value:D.formatSeconds(Number(n[`System uptime`]??0),e)}),t.renderGaugeRow(e(`RAM`),this.state.mem,s===null?`-`:`${s.toFixed(1)} GB / ${r==null?void 0:r.toFixed(1)} GB (${Math.round(this.state.mem??0)}%)`),t.renderGaugeRow(`CPU`,this.state.cpu,this.state.cpu===null?`-`:`${Math.round(this.state.cpu)}%`)]}):i(f,{})]})}renderAdapters(){let{t,theme:n}=this.props;return u(c,{sx:{flex:`1 1 340px`,p:2.5},children:[i(a,{title:t(`Running adapters`),action:{text:t(`Show all`),onClick:()=>this.props.handleNavigation(`tab-instances`)}}),this.state.adapters.length?this.state.adapters.slice(0,ut).map(r=>u(p,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`},children:[i(p,{sx:{width:26,height:26,borderRadius:`50%`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:x(n.palette.success.main,.2),border:`1px solid ${x(n.palette.success.main,.5)}`},children:r.icon?i(h,{src:r.icon,alt:r.name,style:{width:18,height:18,borderRadius:`50%`}}):null}),i(g,{variant:`body2`,sx:{flex:1},children:r.name}),u(g,{variant:`caption`,color:`text.secondary`,children:[`v`,r.version]}),i(e,{size:`small`,color:`success`,variant:`outlined`,label:r.instances>1?t(`%s instances`,r.instances):t(`active`)})]},r.name)):i(g,{variant:`body2`,color:`text.secondary`,children:t(`No running adapters`)})]})}renderChartButton(){let{t:e}=this.props,t,n;return this.state.chartMinimized?(t=i(E,{}),n=e(`Maximize`)):this.state.chartRecording?(t=i(ee,{}),n=e(`Stop recording`)):(t=i(T,{}),n=e(`Minimize`)),i(_,{title:n,children:i(v,{size:`small`,onClick:this.onChartButton,"aria-label":n,children:t})})}renderLog(){let{t:e,theme:n}=this.props,r={error:n.palette.error.main,warn:n.palette.warning.main};return u(c,{sx:{flex:`2 1 460px`,p:2.5,minWidth:0},children:[i(a,{title:e(`System log`),action:{text:e(`Show all`),onClick:()=>this.props.handleNavigation(`tab-logs`)}}),this.state.logs.length?this.state.logs.slice(-(this.state.chartMinimized?ct:st)).map((e,a)=>u(p,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`,minWidth:0},children:[i(p,{sx:{width:8,height:8,borderRadius:`50%`,flexShrink:0,backgroundColor:r[e.severity]||n.palette.success.main}}),i(g,{variant:`caption`,color:`text.secondary`,sx:{whiteSpace:`nowrap`},children:new Date(e.ts).toLocaleTimeString()}),i(g,{variant:`caption`,sx:{color:r[e.severity]||`text.secondary`,width:34,flexShrink:0},children:e.severity}),i(g,{variant:`caption`,sx:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.logText(e)})]},`${e.key??e.ts}_${a}`)):i(g,{variant:`body2`,color:`text.secondary`,children:e(`No messages`)})]})}render(){let{t,theme:n}=this.props,o=this.state.hostAlive,s=this.state.loaded,l=D.countAdapterUpdates(this.props.installed,this.props.repository);return u(p,{sx:{height:`100%`,overflow:`auto`,p:3,pt:0},children:[u(p,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:2,gap:2},children:[this.props.menuButtonSpace?i(p,{sx:{width:40,flexShrink:0}}):null,u(p,{children:[i(g,{sx:{fontSize:`1.5rem`,fontWeight:700},children:t(`Overview`)}),i(g,{variant:`body2`,color:`text.secondary`,children:t(`System overview and status`)})]}),u(p,{sx:{display:`flex`,alignItems:`center`,gap:1.5},children:[s?i(e,{size:`small`,label:t(o?`online`:`offline`),color:o?`success`:`error`}):null,i(p,{sx:{ml:`auto`,pl:1},children:this.props.hostSelector})]})]}),u(p,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[i(r,{title:t(`System status`),value:s?t(o?`OK`:`Offline`):$,valueColor:s?o?n.palette.success.main:n.palette.error.main:void 0,hint:t(s?o?`ioBroker is running`:`Host does not answer`:`Loading...`),color:s?o?n.palette.success.main:n.palette.error.main:n.palette.text.secondary,icon:i(te,{}),onClick:()=>this.props.handleNavigation(`tab-hosts`)}),i(r,{title:t(`Adapters`),value:s?String(this.state.adaptersTotal):$,hint:s?t(`%s active / %s inactive`,this.state.adaptersActive,this.state.adaptersTotal-this.state.adaptersActive):t(`Loading...`),chip:l?{label:l===1?t(`1 update`):t(`%s updates`,l),color:`warning`}:void 0,color:n.palette.primary.main,icon:i(S,{}),onClick:()=>this.props.handleNavigation(`tab-adapters`)}),i(r,{title:t(`Instances`),value:s?String(this.state.instancesTotal):$,hint:s?t(`%s active / %s inactive`,this.state.instancesAlive,this.state.instancesTotal-this.state.instancesAlive):t(`Loading...`),color:n.palette.secondary.main,icon:i(tt,{}),onClick:()=>this.props.handleNavigation(`tab-instances`)}),i(r,{title:t(`Objects`),value:this.state.objectsLoaded?this.state.objectsCount.toLocaleString(this.props.lang):$,hint:this.state.objectsLoaded?t(`%s states`,this.state.statesCount.toLocaleString(this.props.lang)):t(`Loading...`),color:n.palette.warning.main,icon:i(w,{}),onClick:()=>this.props.handleNavigation(`tab-objects`)})]}),u(p,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[this.renderSystemInfo(),u(c,{sx:{flex:`2 1 460px`,p:2.5,minWidth:0,alignSelf:this.state.chartMinimized?`flex-start`:void 0,display:this.state.chartAvailable?void 0:`none`},children:[i(a,{title:t(`Resource usage`),actions:this.renderChartButton()}),i(p,{sx:{display:this.state.chartMinimized?`none`:void 0},children:i(it,{ref:this.chartRef,socket:this.props.socket,currentHost:this.props.currentHost,theme:this.props.theme,themeType:this.props.themeType,t,paused:this.state.chartMinimized,onAvailabilityChange:e=>{e!==this.state.chartAvailable&&this.setState({chartAvailable:e})},onRecordingChange:e=>{e!==this.state.chartRecording&&this.setState({chartRecording:e})}})})]})]}),u(p,{sx:{display:`flex`,gap:2,flexWrap:`wrap`},children:[this.renderAdapters(),this.renderLog()]})]})}};export{dt as default};
|
|
3
|
+
`&&r!==``){var i=e.isSelected(r);n[r]=Ee(n,r)?n[r]&&i:i}}),n}function We(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,N(X,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,N(X,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,N(X,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,N(X,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,N(X,`unSelect`))}var Ge=_e(Ke);function Ke(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function qe(e){e.registerComponentModel(H),e.registerComponentView(K),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Ge),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),We(e)}var Je=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=Ce(t);e.prototype.init.call(this,t,n,r),Ye(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Ye(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=oe(H.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:k.color.accent50,pageIconInactiveColor:k.color.accent10,pageIconSize:15,pageTextStyle:{color:k.color.tertiary},animationDurationUpdate:800}),t}(H);function Ye(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,se(t,n,{type:`box`,ignoreSize:!!i})}var Xe=A,Z=[`width`,`height`],Q=[`x`,`y`],Ze=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Xe),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Xe)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=F(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new V({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=me(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:ae(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Z[s],l=Q[s],u=Z[1-s],d=Q[1-s];i&&L(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=ge(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;L(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),L(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new I({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&he(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;O([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,z(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Z[i],o=Q[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(K);function Qe(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function $e(e){R(qe),e.registerComponentModel(Je),e.registerComponentView(Ze),Qe(e)}function et(e){R(qe),R($e)}var tt=l(f(i,{children:[d(`g`,{transform:`translate(-1.4 -1) scale(0.8)`,children:d(`path`,{d:`M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11`})}),d(`circle`,{cx:`19.2`,cy:`19.2`,r:`4.4`})]}),`Instance`);t(),R([De,Se,et,Te,Pe]);var nt=36e5,rt=3e4,it=class extends y{constructor(e){super(e),n(this,`refreshTimer`,null),this.state={historyInstance:``,blocker:null,loading:!0,enabling:!1,cpu:[],mem:[],error:``}}componentDidMount(){this.props.paused||(this.detectAndLoad(),this.startTimer())}componentDidUpdate(e){e.currentHost!==this.props.currentHost&&this.setState({loading:!0,cpu:[],mem:[]},()=>void this.detectAndLoad()),e.paused!==this.props.paused&&(this.props.paused?this.stopTimer():(this.detectAndLoad(),this.startTimer()))}componentWillUnmount(){this.stopTimer()}startTimer(){this.stopTimer(),this.refreshTimer=setInterval(()=>{this.state.blocker?this.detectAndLoad():this.readData()},rt)}stopTimer(){this.refreshTimer&&=(clearInterval(this.refreshTimer),null)}getIds(){return{cpu:`${this.props.currentHost}.cpu`,mem:`${this.props.currentHost}.mem`}}async detectAndLoad(){try{var e,t,n,r,i,a,o;let d=await this.props.socket.getCompactSystemConfig(),f=(d==null||(e=d.common)==null?void 0:e.defaultHistory)||``;if(!f){var s,c;this.setState({historyInstance:``,blocker:`noDefaultHistory`,loading:!1}),(s=(c=this.props).onAvailabilityChange)==null||s.call(c,!1);return}let p=await this.props.socket.getState(`system.adapter.${f}.alive`);if(!(p!=null&&p.val)){var l,u;this.setState({historyInstance:f,blocker:`historyNotAlive`,loading:!1}),(l=(u=this.props).onAvailabilityChange)==null||l.call(u,!1);return}(t=(n=this.props).onAvailabilityChange)==null||t.call(n,!0);let m=this.getIds(),[h,g]=await Promise.all([this.props.socket.getObject(m.cpu),this.props.socket.getObject(m.mem)]),_=!!(h!=null&&(r=h.common)!=null&&(r=r.custom)!=null&&(r=r[f])!=null&&r.enabled)&&!!(g!=null&&(i=g.common)!=null&&(i=i.custom)!=null&&(i=i[f])!=null&&i.enabled);if((a=(o=this.props).onRecordingChange)==null||a.call(o,_),!_){this.setState({historyInstance:f,blocker:`notRecorded`,loading:!1});return}this.setState({historyInstance:f,blocker:null},()=>void this.readData())}catch(e){this.setState({error:e.toString(),loading:!1})}}async enableRecording(){return this.setRecording(!0)}async stopRecording(){return this.setRecording(!1)}async setRecording(e){this.setState({enabling:!0});try{let t=this.getIds();for(let n of[t.cpu,t.mem]){let t=await this.props.socket.getObject(n);t&&(t.common.custom||={},t.common.custom[this.state.historyInstance]={...t.common.custom[this.state.historyInstance]||{},enabled:e},await this.props.socket.setObject(n,t))}this.setState({enabling:!1,loading:!0},()=>void this.detectAndLoad())}catch(e){this.setState({enabling:!1,error:e.toString()})}}async readData(){let e=this.getIds(),t=Date.now(),n=t-nt,r={instance:this.state.historyInstance,start:n,end:t,step:6e4,aggregate:`average`,from:!1,ack:!1,q:!1,addId:!1};try{let[t,n]=await Promise.all([this.props.socket.getHistory(e.cpu,r),this.props.socket.getHistory(e.mem,r)]),i=e=>(e||[]).filter(e=>e.val!==null&&e.val!==void 0).map(e=>[e.ts,Math.round(Number(e.val)*100)/100]);this.setState({cpu:i(t),mem:i(n),loading:!1})}catch(e){this.setState({error:e.toString(),loading:!1})}}renderBlocker(){let{t:e}=this.props;return f(m,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[d(C,{sx:{fontSize:40,opacity:.4}}),d(_,{variant:`body2`,children:e(`CPU and RAM of this host are not recorded by %s yet`,this.state.historyInstance)}),this.state.blocker===`notRecorded`?d(h,{variant:`contained`,disabled:this.state.enabling,startIcon:this.state.enabling?d(c,{size:16}):null,onClick:()=>void this.enableRecording(),children:e(`Record CPU and RAM`)}):null]})}renderChart(){let{theme:e,themeType:t,t:n}=this.props,r=t===`dark`?`#96A2B4`:`#5C6675`,i={backgroundColor:`transparent`,grid:{left:45,right:45,top:40,bottom:30},tooltip:{trigger:`axis`},legend:{data:[n(`CPU (%)`),n(`Memory (%)`)],textStyle:{color:r},top:0},xAxis:{type:`time`,axisLabel:{color:r},axisLine:{lineStyle:{color:r}},splitLine:{show:!1}},yAxis:[{type:`value`,name:`%`,min:0,max:100,nameTextStyle:{color:r},axisLabel:{color:r},splitLine:{lineStyle:{color:e.palette.divider}}}],series:[{name:n(`CPU (%)`),type:`line`,showSymbol:!1,smooth:!0,lineStyle:{width:2,color:e.palette.primary.main},itemStyle:{color:e.palette.primary.main},data:this.state.cpu},{name:n(`Memory (%)`),type:`line`,showSymbol:!1,smooth:!0,lineStyle:{width:2,color:e.palette.secondary.main},itemStyle:{color:e.palette.secondary.main},data:this.state.mem}]};return d(xe,{echarts:Me,option:i,style:{height:260,width:`100%`},opts:{renderer:`svg`},notMerge:!0})}render(){return this.state.blocker===`noDefaultHistory`||this.state.blocker===`historyNotAlive`?null:this.state.error?d(m,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:d(_,{variant:`body2`,color:`error`,children:this.state.error})}):this.state.loading?d(m,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:d(c,{})}):this.state.blocker?this.renderBlocker():!this.state.cpu.length&&!this.state.mem.length?f(m,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[d(C,{sx:{fontSize:40,opacity:.4}}),d(_,{variant:`body2`,children:this.props.t(`Recording is active, but there is no data for the last hour yet`)})]}):this.renderChart()}};t();var at=3e4,ot=5e3,st=6,ct=16,lt=`App.overviewChartMinimized`,ut=5,$=`--`,dt=class t extends y{constructor(e){super(e),n(this,`refreshTimer`,null),n(this,`chartRef`,o.createRef()),n(this,`objectsTimer`,null),n(this,`mounted`,!1),n(this,`subscribedHost`,``),n(this,`onCpu`,(e,t)=>{this.mounted&&this.setState({cpu:(t==null?void 0:t.val)===null||(t==null?void 0:t.val)===void 0?null:Number(t.val)})}),n(this,`onMem`,(e,t)=>{this.mounted&&this.setState({mem:(t==null?void 0:t.val)===null||(t==null?void 0:t.val)===void 0?null:Number(t.val)})}),n(this,`onLogs`,e=>{this.mounted&&this.setState(t=>({logs:[...t.logs,...e].slice(-16)}))}),n(this,`onChartButton`,()=>{if(!this.state.chartMinimized&&this.state.chartRecording){var e;(e=this.chartRef.current)==null||e.stopRecording();return}let t=!this.state.chartMinimized;(window._localStorage||window.localStorage).setItem(lt,t?`true`:`false`),this.setState({chartMinimized:t})}),this.state={loaded:!1,objectsLoaded:!1,hostAlive:!1,adaptersTotal:0,adaptersActive:0,instancesTotal:0,instancesAlive:0,objectsCount:0,statesCount:0,hostInfo:null,adapters:[],logs:[],cpu:null,mem:null,chartAvailable:!0,chartRecording:!0,chartMinimized:(window._localStorage||window.localStorage).getItem(lt)===`true`}}componentDidMount(){this.mounted=!0,this.readAll(),this.objectsTimer=setTimeout(()=>{this.objectsTimer=null,this.readObjects()},ot),this.subscribeHost(),this.refreshTimer=setInterval(()=>void this.readAll(),at),this.props.logsWorker.registerHandler(this.onLogs)}async readObjects(){let e,t=0;try{let n=await this.props.socket.getObjectsCount();e=n.total,t=n.byType.state||0}catch(r){console.warn(`Cannot count the objects on the server, reading them all: ${r.message}`);let i=await this.props.objectsWorker.getObjects()||{};e=Object.keys(i).length;for(let e of Object.keys(i)){var n;((n=i[e])==null?void 0:n.type)===`state`&&t++}}this.mounted&&this.setState({objectsCount:e,statesCount:t,objectsLoaded:!0})}componentDidUpdate(e){e.currentHost!==this.props.currentHost&&(this.setState({loaded:!1,cpu:null,mem:null,hostInfo:null}),this.subscribeHost(),this.readAll())}componentWillUnmount(){this.mounted=!1,this.refreshTimer&&=(clearInterval(this.refreshTimer),null),this.objectsTimer&&=(clearTimeout(this.objectsTimer),null),this.unsubscribeHost(),this.props.logsWorker.unregisterHandler(this.onLogs)}subscribeHost(){this.unsubscribeHost(),this.subscribedHost=this.props.currentHost,this.subscribedHost&&(this.props.socket.subscribeState(`${this.subscribedHost}.cpu`,this.onCpu),this.props.socket.subscribeState(`${this.subscribedHost}.mem`,this.onMem))}unsubscribeHost(){this.subscribedHost&&=(this.props.socket.unsubscribeState(`${this.subscribedHost}.cpu`,this.onCpu),this.props.socket.unsubscribeState(`${this.subscribedHost}.mem`,this.onMem),``)}async readAll(){let{socket:e,currentHost:t}=this.props,[n,r,i,a]=await Promise.all([this.props.instancesWorker.getObjects(),e.getForeignStates(`system.adapter.*.alive`).catch(()=>({})),e.getState(`${t}.alive`).catch(()=>null),this.props.logsWorker.getLogs().catch(()=>({logs:[],logSize:0}))]);if(!this.mounted)return;let o=Object.values(n||{}).filter(e=>{var t;return(e==null||(t=e.common)==null?void 0:t.host)===this.hostName()}),s=new Set,c=new Set,l=[],u=0;for(let e of o){var d;let t=e._id.replace(`system.adapter.`,``).split(`.`)[0];if(s.add(t),(d=r[`${e._id}.alive`])!=null&&d.val){u++,c.add(t);let n=l.find(e=>e.name===t);if(n)n.instances++;else{var f,p;l.push({name:t,version:((f=e.common)==null?void 0:f.version)||``,instances:1,icon:(p=e.common)!=null&&p.icon?`adapter/${t}/${e.common.icon}`:``})}}}l.sort((e,t)=>e.name.localeCompare(t.name));let m=this.state.hostInfo;try{m=await this.props.socket.getHostInfo(t)}catch{}this.mounted&&this.setState({loaded:!0,hostAlive:!!(i!=null&&i.val),adaptersTotal:s.size,adaptersActive:c.size,instancesTotal:o.length,instancesAlive:u,hostInfo:m,adapters:l,logs:(a.logs||[]).slice(-16)})}static logText(e){return typeof e.message==`string`?e.message:e.message.original}hostName(){return this.props.currentHostName||this.props.currentHost.replace(`system.host.`,``)}static renderGaugeRow(e,t,n){return f(m,{sx:{display:`flex`,alignItems:`center`,gap:2,py:1},children:[d(_,{variant:`body2`,color:`text.secondary`,sx:{width:80},children:e}),d(p,{variant:`determinate`,value:Math.max(0,Math.min(100,t??0)),sx:{flex:1,maxWidth:160}}),d(_,{variant:`body2`,sx:{flex:1,textAlign:`right`},children:n})]},e)}renderSystemInfo(){let{t:e}=this.props,n=this.state.hostInfo,r=n!=null&&n.RAM?Number(n.RAM)/1024/1024/1024:0,o=this.state.mem!==null&&r?r*this.state.mem/100:null;return f(u,{sx:{flex:`1 1 340px`,p:2.5},children:[d(a,{title:e(`System information`)}),n?f(i,{children:[d(s,{name:e(`Platform`),value:String(n.Platform??`-`)}),d(s,{name:e(`Architecture`),value:String(n.Architecture??`-`)}),d(s,{name:`Node.js`,value:String(n[`Node.js`]??`-`)}),d(s,{name:`NPM`,value:String(n.NPM??`-`)}),d(s,{name:e(`System uptime`),value:D.formatSeconds(Number(n[`System uptime`]??0),e)}),t.renderGaugeRow(e(`RAM`),this.state.mem,o===null?`-`:`${o.toFixed(1)} GB / ${r==null?void 0:r.toFixed(1)} GB (${Math.round(this.state.mem??0)}%)`),t.renderGaugeRow(`CPU`,this.state.cpu,this.state.cpu===null?`-`:`${Math.round(this.state.cpu)}%`)]}):d(p,{})]})}renderAdapters(){let{t,theme:n}=this.props;return f(u,{sx:{flex:`1 1 340px`,p:2.5},children:[d(a,{title:t(`Running adapters`),action:{text:t(`Show all`),onClick:()=>this.props.handleNavigation(`tab-instances`)}}),this.state.adapters.length?this.state.adapters.slice(0,ut).map(r=>f(m,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`},children:[d(m,{sx:{width:26,height:26,borderRadius:`50%`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:x(n.palette.success.main,.2),border:`1px solid ${x(n.palette.success.main,.5)}`},children:r.icon?d(g,{src:r.icon,alt:r.name,style:{width:18,height:18,borderRadius:`50%`}}):null}),d(_,{variant:`body2`,sx:{flex:1},children:r.name}),f(_,{variant:`caption`,color:`text.secondary`,children:[`v`,r.version]}),d(e,{size:`small`,color:`success`,variant:`outlined`,label:r.instances>1?t(`%s instances`,r.instances):t(`active`)})]},r.name)):d(_,{variant:`body2`,color:`text.secondary`,children:t(`No running adapters`)})]})}renderChartButton(){let{t:e}=this.props,t,n;return this.state.chartMinimized?(t=d(E,{}),n=e(`Maximize`)):this.state.chartRecording?(t=d(ee,{}),n=e(`Stop recording`)):(t=d(T,{}),n=e(`Minimize`)),d(v,{title:n,children:d(b,{size:`small`,onClick:this.onChartButton,"aria-label":n,children:t})})}renderLog(){let{t:e,theme:n}=this.props,r={error:n.palette.error.main,warn:n.palette.warning.main};return f(u,{sx:{flex:`2 1 460px`,p:2.5,minWidth:0},children:[d(a,{title:e(`System log`),action:{text:e(`Show all`),onClick:()=>this.props.handleNavigation(`tab-logs`)}}),this.state.logs.length?this.state.logs.slice(-(this.state.chartMinimized?ct:st)).map((e,i)=>f(m,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`,minWidth:0},children:[d(m,{sx:{width:8,height:8,borderRadius:`50%`,flexShrink:0,backgroundColor:r[e.severity]||n.palette.success.main}}),d(_,{variant:`caption`,color:`text.secondary`,sx:{whiteSpace:`nowrap`},children:new Date(e.ts).toLocaleTimeString()}),d(_,{variant:`caption`,sx:{color:r[e.severity]||`text.secondary`,width:34,flexShrink:0},children:e.severity}),d(_,{variant:`caption`,sx:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:t.logText(e)})]},`${e.key??e.ts}_${i}`)):d(_,{variant:`body2`,color:`text.secondary`,children:e(`No messages`)})]})}render(){let{t,theme:n}=this.props,i=this.state.hostAlive,o=this.state.loaded,s=D.countAdapterUpdates(this.props.installed,this.props.repository);return f(m,{sx:{height:`100%`,overflow:`auto`,p:3,pt:0},children:[f(m,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:2,gap:2},children:[this.props.menuButtonSpace?d(m,{sx:{width:40,flexShrink:0}}):null,f(m,{children:[d(_,{sx:{fontSize:`1.5rem`,fontWeight:700},children:t(`Overview`)}),d(_,{variant:`body2`,color:`text.secondary`,children:t(`System overview and status`)})]}),f(m,{sx:{display:`flex`,alignItems:`center`,gap:1.5},children:[o?d(e,{size:`small`,label:t(i?`online`:`offline`),color:i?`success`:`error`}):null,d(m,{sx:{ml:`auto`,pl:1},children:this.props.hostSelector})]})]}),f(m,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[d(r,{title:t(`System status`),value:o?t(i?`OK`:`Offline`):$,valueColor:o?i?n.palette.success.main:n.palette.error.main:void 0,hint:t(o?i?`ioBroker is running`:`Host does not answer`:`Loading...`),color:o?i?n.palette.success.main:n.palette.error.main:n.palette.text.secondary,icon:d(te,{}),onClick:()=>this.props.handleNavigation(`tab-hosts`)}),d(r,{title:t(`Adapters`),value:o?String(this.state.adaptersTotal):$,hint:o?t(`%s active / %s inactive`,this.state.adaptersActive,this.state.adaptersTotal-this.state.adaptersActive):t(`Loading...`),chip:s?{label:s===1?t(`1 update`):t(`%s updates`,s),color:`warning`}:void 0,color:n.palette.primary.main,icon:d(S,{}),onClick:()=>this.props.handleNavigation(`tab-adapters`)}),d(r,{title:t(`Instances`),value:o?String(this.state.instancesTotal):$,hint:o?t(`%s active / %s inactive`,this.state.instancesAlive,this.state.instancesTotal-this.state.instancesAlive):t(`Loading...`),color:n.palette.secondary.main,icon:d(tt,{}),onClick:()=>this.props.handleNavigation(`tab-instances`)}),d(r,{title:t(`Objects`),value:this.state.objectsLoaded?this.state.objectsCount.toLocaleString(this.props.lang):$,hint:this.state.objectsLoaded?t(`%s states`,this.state.statesCount.toLocaleString(this.props.lang)):t(`Loading...`),color:n.palette.warning.main,icon:d(w,{}),onClick:()=>this.props.handleNavigation(`tab-objects`)})]}),f(m,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[this.renderSystemInfo(),f(u,{sx:{flex:`2 1 460px`,p:2.5,minWidth:0,alignSelf:this.state.chartMinimized?`flex-start`:void 0,display:this.state.chartAvailable?void 0:`none`},children:[d(a,{title:t(`Resource usage`),actions:this.renderChartButton()}),d(m,{sx:{display:this.state.chartMinimized?`none`:void 0},children:d(it,{ref:this.chartRef,socket:this.props.socket,currentHost:this.props.currentHost,theme:this.props.theme,themeType:this.props.themeType,t,paused:this.state.chartMinimized,onAvailabilityChange:e=>{e!==this.state.chartAvailable&&this.setState({chartAvailable:e})},onRecordingChange:e=>{e!==this.state.chartRecording&&this.setState({chartRecording:e})}})})]})]}),f(m,{sx:{display:`flex`,gap:2,flexWrap:`wrap`},children:[this.renderAdapters(),this.renderLog()]})]})}};export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5`}),`ColorLens`),r=e(t(`path`,{d:`m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42M5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7`}),`LocalOffer`),i=e(t(`path`,{d:`M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-3.21 14.21-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9z`}),`Pageview`);export{r as n,n as r,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17`}),`GroupAdd`),r=e(t(`path`,{d:`M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4`}),`PersonAdd`),i=e(t(`path`,{d:`M8.65 5.82C9.36 4.72 10.6 4 12 4c2.21 0 4 1.79 4 4 0 1.4-.72 2.64-1.82 3.35zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45-1 .51-1.61 1.54-1.61 2.66V20h13.17l2.61 2.61z`}),`PersonOff`);export{r as n,n as r,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{fillRule:`evenodd`,d:`M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3`}),`PushPin`),r=e(t(`path`,{d:`M14 4v5c0 1.12.37 2.16 1 3H9c.65-.86 1-1.9 1-3V4zm3-2H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3V4h1c.55 0 1-.45 1-1s-.45-1-1-1`}),`PushPinOutlined`);export{n,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M19 13H5v-2h14z`}),`Remove`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e([t(`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`),t(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`},`1`)],`Schedule`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(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`}),`AddToPhotos`),r=e(t(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),i=e(t(`path`,{d:`M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96M3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4z`}),`CloudOff`),a=e(t(`path`,{d:`M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27`}),`GitHub`),o=e(t(`path`,{fillRule:`evenodd`,d:`M4 11h16v2H4z`}),`HorizontalRule`),s=e(t(`path`,{d:`M18 13h-.68l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2H6l-3 3v4c0 1.1.89 2 1.99 2H19c1.1 0 2-.89 2-2v-4zm-1-5.05-4.95 4.95-3.54-3.54 4.95-4.95zm-4.24-5.66L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01`}),`HowToVote`),c=e(t(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),l=e([t(`path`,{d:`M6 17.59 7.41 19 12 14.42 16.59 19 18 17.59l-6-6z`},`0`),t(`path`,{d:`m6 11 1.41 1.41L12 7.83l4.59 4.58L18 11l-6-6z`},`1`)],`KeyboardDoubleArrowUp`),u=e(t(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16`}),`MonetizationOn`),d=e(t(`path`,{d:`m5 9 1.41 1.41L11 5.83V22h2V5.83l4.59 4.59L19 9l-7-7z`}),`North`),f=e(t(`path`,{d:`M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M9 11H7V9h2zm4 0h-2V9h2zm4 0h-2V9h2z`}),`Sms`),p=e(t(`path`,{d:`M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z`}),`Sort`),m=e(t(`path`,{d:`M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z`}),`Star`);export{u as a,s as c,i as d,r as f,d as i,o as l,p as n,l as o,n as p,f as r,c as s,m as t,a as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bs as e,Go as t,Rs as n,Us as r,Ws as i,ei as a,ho as o}from"./loadShare-eager-BpwDZfDr.js";import{yt as s}from"./bootstrap-DSDOwKWU.js";var c={checkIcon:{color:n[700]},cancelIcon:{color:e[700]},wrapperContent:{display:`flex`,flexFlow:`nowrap`,alignItems:`inherit`}};function l(e){return i(t,{container:!0,style:c.wrapperContent,direction:`row`,spacing:1,sx:{alignItems:`center`},children:[r(t,{children:e.state?r(s,{style:c.checkIcon}):r(a,{style:c.cancelIcon})}),r(t,{children:r(o,{children:e.children})})]})}export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z`}),`Storage`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`m20.41 8.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.42M7 7h7v2H7zm10 10H7v-2h10zm0-4H7v-2h10z`}),`TextSnippet`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 14H8V8h8z`}),`StopCircle`),r=e(t(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2`}),`Timeline`);export{n,r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z`}),`Create`),r=e(t(`path`,{d:`M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9zm-4 10H4V5h14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z`}),`DeveloperBoard`),i=e(t(`path`,{d:`M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83`}),`PowerSettingsNew`),a=e(t(`path`,{d:`m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83`}),`Speed`),o=e(t(`path`,{d:`M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M13 14h-2V8h2z`}),`Timer`);export{n as a,r as i,a as n,i as r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z`}),`UnfoldLess`),r=e(t(`path`,{d:`M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z`}),`UnfoldMore`);export{n,r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),r=e(t(`path`,{d:`m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5z`}),`DeviceHub`),i=e(t(`path`,{d:`M13 22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3z`}),`Lan`),a=e(t(`path`,{d:`M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2S4.8 7.79 4.8 9c0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3.05c-.71.37-1.2 1.1-1.2 1.95 0 1.22.99 2.2 2.2 2.2s2.2-.98 2.2-2.2c0-.85-.49-1.58-1.2-1.95V15h3c1.11 0 2-.89 2-2v-2h1V7z`}),`Usb`);export{n as i,i as n,r,a as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{An as e,Do as t,
|
|
2
|
-
`)}),children:
|
|
1
|
+
import{An as e,Do as t,Qt as n,Us as r,Vt as i,Ws as a,_o as o,cc as s,eo as c,ho as l,io as u,mc as d,mo as f,no as p,oo as m,si as h,to as g}from"./loadShare-eager-BpwDZfDr.js";import{n as _,r as v,t as y}from"./Usb-Dwk7qdYu.js";import{o as b}from"./AdminUtils-CopxRJZ2.js";import{ot as x}from"./bootstrap-DSDOwKWU.js";var S=`system.host.*.usedResources.*`,C=`.usedResources.`;function w(e){let t=e.indexOf(C);return e.startsWith(`system.host.`)&&t>0?e.substring(0,t):null}function T(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.type==`string`&&/^[A-Za-z0-9_-]{1,64}$/.test(t.type)&&typeof t.instance==`string`&&!!t.instance&&typeof t.ts==`number`&&typeof t.isBlocked==`boolean`&&typeof t.data==`object`&&t.data!==null&&!Array.isArray(t.data)}function E(e){if(!e||typeof e.val!=`string`||!e.val)return[];try{let t=JSON.parse(e.val);return Array.isArray(t)?t.filter(T):[]}catch{return[]}}var D=new Set([`0.0.0.0`,`::`,`*`,``]);function O(e,t,n){if(e===`tcpPort`||e===`udpPort`){if(t.port!==n.port||t.family!==void 0&&n.family!==void 0&&t.family!==n.family)return!1;if(t.bind===void 0||n.bind===void 0)return!0;let e=String(t.bind).trim(),r=String(n.bind).trim();return D.has(e)||D.has(r)||e===r}if(e===`serialPort`)return(t.device??t.port)===(n.device??n.port);if(e===`usb`)return t.path===n.path;let r=(e,t)=>Object.keys(e).every(n=>e[n]===void 0||e[n]===t[n]);return r(t,n)||r(n,t)}var k={serialPort:`Serial port`,tcpPort:`TCP port`,udpPort:`UDP port`,usb:`USB device`,bluetooth:`Bluetooth`,gpio:`GPIO`};function A(e){return e.flatMap(e=>Object.keys(k).map(t=>`${e}.usedResources.${t}`))}async function j(e,t){let n=A(t),r=t.length===1?`${t[0]}.usedResources.*`:S,[i,a]=await Promise.all([n.length?e.getForeignStates(n).catch(e=>(console.warn(`Cannot read the used resources: ${e}`),{})):Promise.resolve({}),e.getForeignStates(r).catch(e=>(console.warn(`Cannot read ${r}: ${e}`),{}))]),o={...i,...a};for(let e of Object.keys(o))o[e]||delete o[e];return o}function M(e){let t=[];for(let[n,r]of Object.entries(e)){let e=w(n);if(e)for(let n of E(r))t.push({...n,hostId:e,conflicts:[]})}for(let e of t)e.conflicts=t.filter(t=>t.hostId===e.hostId&&t.type===e.type&&t.instance!==e.instance&&O(e.type,e.data,t.data)).map(e=>e.instance);return t.sort((e,t)=>e.hostId.localeCompare(t.hostId)||e.type.localeCompare(t.type)||N(e).localeCompare(N(t),void 0,{numeric:!0})||e.instance.localeCompare(t.instance))}function N(e){let t=e.data,n=[],r;switch(e.type){case`tcpPort`:case`udpPort`:r=String(t.port??``),t.bind!==void 0&&!D.has(String(t.bind).trim())&&n.push(String(t.bind)),t.family!==void 0&&n.push(`IPv${t.family}`);break;case`serialPort`:r=String(t.port??``),t.device!==void 0&&t.device!==t.port&&n.push(`→ ${t.device}`),t.baudRate!==void 0&&n.push(`${t.baudRate} Bd`);break;case`usb`:r=String(t.path??``),(t.vendorId!==void 0||t.productId!==void 0)&&n.push(`${t.vendorId??`?`}:${t.productId??`?`}`);break;case`bluetooth`:r=String(t.hci??``);break;case`gpio`:r=String(t.pin??``),t.chip!==void 0&&n.push(String(t.chip));break;default:r=Object.entries(t).map(([e,t])=>`${e}: ${t}`).join(`, `)}return n.length?`${r} (${n.join(`, `)})`:r}var P={serialPort:r(i,{fontSize:`small`}),tcpPort:r(_,{fontSize:`small`}),udpPort:r(_,{fontSize:`small`}),usb:r(y,{fontSize:`small`}),bluetooth:r(n,{fontSize:`small`}),gpio:r(x,{fontSize:`small`})};function F(e){return P[e]||r(v,{fontSize:`small`})}function I(e,t){return k[e]?t(k[e]):e}function L(e,t){return t(`Also registered by: %s`,e.conflicts.join(`, `))}function R(e,t){let[n,r]=d(null);return s(()=>{let n=`${t}.usedResources.*`,i={},a=!0,o=()=>{a&&r(Object.keys(i).length?M(i):null)},s=(e,t)=>{i={...i,[e]:t},o()};return j(e,[t]).then(e=>{i={...e,...i},o()}),e.subscribeState(n,s),()=>{a=!1,e.unsubscribeState(n,s)}},[e,t]),n}var z={};function B(e){let t=e.instance.split(`.`)[0],[n,i]=d(``);return s(()=>{let n=!0;return z[t]||=e.socket.getObject(`system.adapter.${t}`).then(e=>{var n;return e!=null&&(n=e.common)!=null&&n.icon?b(`adapter/${t}/${e.common.icon}`):``}).catch(()=>``),z[t].then(e=>{n&&i(e)}),()=>{n=!1}},[e.socket,t]),r(o,{sx:{width:20,height:20,flexShrink:0},children:n?r(`img`,{src:n,alt:``,style:{width:20,height:20,objectFit:`contain`}}):null})}function V(e){let{t:n}=e;return a(c,{size:`small`,sx:{"& td, & th":{py:.5}},children:[r(u,{children:a(m,{children:[r(p,{children:n(`Type`)}),r(p,{children:n(`Resource`)}),e.hideInstance?null:r(p,{children:n(`Instance`)}),r(p,{children:n(`Status`)}),r(p,{children:n(`Registered`)})]})}),r(g,{children:e.resources.map(i=>{let s=N(i);return a(m,{children:[r(p,{children:a(o,{sx:{display:`flex`,alignItems:`center`,gap:1,whiteSpace:`nowrap`},children:[F(i.type),I(i.type,n)]})}),r(p,{children:a(o,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[s,i.conflicts.length?r(f,{title:L(i,n),children:r(h,{fontSize:`small`,color:`warning`})}):null]})}),e.hideInstance?null:r(p,{children:a(o,{sx:{display:`flex`,alignItems:`center`,gap:1,whiteSpace:`nowrap`},children:[r(B,{socket:e.socket,instance:i.instance}),i.instance]})}),r(p,{children:r(f,{title:i.isBlocked?n(`The instance runs and holds the resource`):n(`The instance does not run and would take the resource when started`),children:r(t,{size:`small`,variant:i.isBlocked?`filled`:`outlined`,color:i.isBlocked?`success`:`info`,label:i.isBlocked?n(`In use`):n(`Reserved`)})})}),r(p,{sx:{whiteSpace:`nowrap`},children:new Date(i.ts).toLocaleString()})]},`${i.instance}|${i.type}|${s}`)})})]})}function H(n){let i=R(n.socket,n.hostId),[s,c]=d(!1);if(!i)return null;let u=i.filter(e=>e.conflicts.length);return a(o,{sx:{width:`100%`,px:2,pb:1},onClick:e=>e.stopPropagation(),children:[a(o,{sx:e=>({display:`inline-flex`,alignItems:`center`,gap:1,py:.5,pl:.5,pr:1.5,borderRadius:2,cursor:`pointer`,border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.action.hover,"&:hover":{backgroundColor:e.palette.action.selected}}),onClick:()=>c(!s),children:[r(e,{fontSize:`small`,sx:{transition:`transform 0.2s`,transform:s?`rotate(180deg)`:void 0}}),r(l,{variant:`subtitle2`,sx:{fontWeight:`bold`},children:n.t(`Used resources`)}),r(t,{size:`small`,label:i.length}),u.length?r(f,{title:r(`span`,{style:{whiteSpace:`pre-line`},children:u.map(e=>`${N(e)}: ${L(e,n.t)}`).join(`
|
|
2
|
+
`)}),children:a(o,{sx:{display:`flex`,alignItems:`center`,gap:.5,color:`warning.main`},children:[r(h,{fontSize:`small`,color:`warning`}),u.length]})}):null]}),s?r(o,{sx:{mt:1,maxHeight:400,overflowY:`auto`},children:i.length?r(V,{socket:n.socket,resources:i,t:n.t}):r(l,{variant:`body2`,color:`textSecondary`,children:n.t(`No instance has registered a resource`)})}):null]})}export{S as a,j as c,I as i,L as n,M as o,F as r,N as s,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$a as e,$i as t,Ds as n,Eo as r,Es as i,Fo as a,Ga as o,Go as s,Gr as c,Ho as l,Kn as u,Mo as d,No as f,Po as p,Rr as m,Sa as h,So as g,Ua as _,Us as v,Ws as y,Zo as ee,_a as b,_o as x,bo as S,br as C,cc as te,co as w,ho as T,jo as E,nc as D,pc as ne,qa as O,qn as k,qo as A,wo as j,xa as M,xi as N,xr as P,zo as F,zr as re}from"./loadShare-eager-BpwDZfDr.js";import{n as I,r as L,t as R}from"./Pageview-DFHddrKX.js";import{n as ie,r as ae,t as oe}from"./PersonOff-BwYQLD1M.js";import{t as z}from"./VpnKey-o8QeqmnU.js";import{o as B,t as V}from"./AdminUtils-CopxRJZ2.js";import{B as H,H as U,L as W,R as G,W as K,z as se}from"./bootstrap-DSDOwKWU.js";import{n as q,r as ce,t as J}from"./Fields-C2Bn4V04.js";var Y=e=>{let n=+!e.isDragging,i=c.getInvertedColor(e.user.common.color,e.themeType,!0),a={cursor:`grab`,opacity:n,overflow:`hidden`,color:i};return e.user.common.color&&(a.backgroundColor=e.user.common.color),v(g,{style:a,sx:e.styles.userGroupCard2,children:y(`div`,{style:e.styles.userCardContent,children:[y(`div`,{style:e.styles.right,children:[v(r,{checked:e.user.common.enabled,style:{color:i},disabled:e.user.common.dontDelete,onChange:()=>{e.socket.extendObject(e.user._id,{common:{enabled:!e.user.common.enabled}}).then(()=>e.updateData())}}),v(A,{size:`small`,onClick:()=>e.showUserEditDialog(e.user,!1),children:v(M,{style:{color:i}})}),v(A,{size:`small`,onClick:()=>e.showUserDeleteDialog(e.user),disabled:e.user.common.dontDelete,children:v(_,{style:e.user.common.dontDelete?void 0:{color:i}})})]}),y(j,{children:[y(T,{gutterBottom:!0,component:`div`,style:e.styles.userGroupTitle,children:[e.user.common.icon?v(C,{style:e.styles.icon,src:e.user.common.icon}):v(k,{style:e.styles.icon}),y(`div`,{children:[y(`div`,{children:[v(`span`,{style:e.styles.userGroupUserName,children:e.getText(e.user.common.name)}),y(`span`,{style:e.styles.userGroupUserID,children:[`[`,e.user._id,`]`]})]}),v(`span`,{children:e.user.common.desc?v(`div`,{style:e.styles.description,children:e.getText(e.user.common.desc)}):null})]})]}),e.groups.find(t=>t.common.members&&t.common.members.includes(e.user._id))?y(`div`,{children:[e.t(`In groups`),`:`]}):null,v(`div`,{children:e.groups.map(n=>{var r,a;if(!n.common.members||!n.common.members.includes(e.user._id))return null;let o=n&&(r=n.common)!=null&&r.color?c.getInvertedColor(n.common.color,e.themeType,!0):i;return y(g,{variant:`outlined`,sx:e.styles.userGroupMember,style:{color:o,borderColor:`${o}80`,background:((a=n.common)==null?void 0:a.color)||`inherit`},children:[n.common.icon?v(C,{style:e.styles.icon,src:n.common.icon}):v(u,{style:e.styles.icon}),e.getText(n.common.name),v(A,{size:`small`,onClick:()=>e.removeUserFromGroup(e.user._id,n._id),children:v(t,{style:{color:o}})})]},n._id)})})]})]})})},le=e=>{let t=ne(null),[{isDragging:n},r,i]=U({type:`user`,item:()=>{var n;return{userId:e.user._id,preview:v(`div`,{style:{width:(n=t.current)==null?void 0:n.offsetWidth},children:v(Y,{...e})})}},end:(t,n)=>{let r=n.getDropResult();if(t&&r){var i;(i=e.addUserToGroup)==null||i.call(e,t.userId,r.groupId)}},collect:e=>({isDragging:e.isDragging(),handlerId:e.getHandlerId()})});return te(()=>{i(se(),{captureDraggingState:!0})},[i]),v(`div`,{ref:e=>{r(e)},children:v(`div`,{ref:t,children:v(Y,{isDragging:n,...e})})})};function ue(e,t){return!t.group.common.members||!t.group.common.members.includes(e.getItem().userId)}var de=e=>{var n;let[{CanDrop:r,isOver:i},a]=H(()=>({accept:`user`,drop:()=>({groupId:e.group._id}),canDrop:(t,n)=>ue(n,e),collect:e=>({isOver:e.isOver(),CanDrop:e.canDrop()})}),[e.group.common.members]),o=.7,s;r&&i?(o=r?1:.125,s=e.styles.userGroupCardSecondary):r&&(o=r?.75:.25);let l=c.getInvertedColor(e.group.common.color,e.themeType,!0),d={opacity:o,overflow:`hidden`,color:l};return e.group.common.color&&(d.backgroundColor=e.group.common.color),y(g,{style:d,ref:e=>{a(e)},sx:c.getStyle(e.theme,e.styles.userGroupCard2,s),children:[y(`div`,{style:e.styles.right,children:[v(A,{size:`small`,onClick:()=>e.showGroupEditDialog(e.group,!1),children:v(M,{style:{color:l}})}),v(A,{size:`small`,onClick:()=>e.showGroupDeleteDialog(e.group),disabled:e.group.common.dontDelete,children:v(_,{style:e.group.common.dontDelete?void 0:{color:l}})})]}),y(j,{children:[y(T,{gutterBottom:!0,component:`div`,style:e.styles.userGroupTitle,children:[e.group.common.icon?v(C,{style:e.styles.icon,src:e.group.common.icon}):v(u,{style:e.styles.icon}),y(`div`,{children:[y(`div`,{children:[v(`span`,{style:e.styles.userGroupUserName,children:e.getText(e.group.common.name)}),y(`span`,{children:[`[`,e.group._id,`]`]})]}),e.group.common.desc?v(`div`,{style:e.styles.description,children:e.getText(e.group.common.desc)}):null]})]}),(n=e.group.common.members)!=null&&n.length?y(`div`,{children:[e.t(`Group members`),`:`]}):null,v(`div`,{children:(e.group.common.members||[]).map((n,r)=>{var i,a;let o=e.users.find(e=>e._id===n),s=o&&(i=o.common)!=null&&i.color?c.getInvertedColor(o.common.color,e.themeType,!0):l;return o?y(g,{variant:`outlined`,sx:e.styles.userGroupMember,style:{color:s,borderColor:`${s}40`,background:((a=o.common)==null?void 0:a.color)||`inherit`},children:[o.common.icon?v(C,{style:e.styles.icon,src:o.common.icon}):v(k,{style:e.styles.icon}),e.getText(o.common.name),v(A,{size:`small`,onClick:()=>e.removeUserFromGroup(n,e.group._id),children:v(t,{style:{color:s}})})]},r):null})})]})]})},X=[new URL(`user1-D1GAYfim.svg`,import.meta.url).href,new URL(`user2-kVvfO6hI.svg`,import.meta.url).href,new URL(`user3-B1MPu8jB.svg`,import.meta.url).href,new URL(`user4-DmVDIOoi.svg`,import.meta.url).href,new URL(`user5-DwFpzcW1.svg`,import.meta.url).href,new URL(`user6-DHgFm0fc.svg`,import.meta.url).href,new URL(`user7-DkJFgUmb.svg`,import.meta.url).href,new URL(`user8-BZA6Afc4.svg`,import.meta.url).href,new URL(`user9-BLdaSIG0.svg`,import.meta.url).href,new URL(`user10-DvWuZ_uc.svg`,import.meta.url).href,new URL(`user11-Ch5DvO34.svg`,import.meta.url).href,new URL(`user12-DEiNnJWd.svg`,import.meta.url).href],fe={contentRoot:{padding:`16px 24px`}},pe=class extends D{constructor(e){super(e),this.state={originalId:e.user._id,passwordRepeat:e.user.common.password,originalData:JSON.stringify(e.user)}}componentDidMount(){if(this.props.isNew){let e=X[Math.round(Math.random()*(X.length-1))];e&&c.getSvg(e).then(e=>{let t=c.clone(this.props.user);t.common.icon=e,this.props.onChange(t)})}}render(){let e=this.props.users.find(e=>e._id===this.props.user._id),t=this.props.user._id!==this.state.originalId,n=e=>e.split(`.`).pop()||``,r=e=>e.replace(c.FORBIDDEN_CHARS,`_`).replace(/\s/g,`_`).replace(/\./g,`_`).replace(/,/g,`_`).replace(/__/g,`_`).replace(/__/g,`_`).toLowerCase(),i=(e,t)=>{let n=e.split(`.`);return n[n.length-1]=t,n.join(`.`)},l=this.props.getText(this.props.user.common.desc),u=this.props.getText(this.props.user.common.name),p=V.checkPassword(this.props.user.common.password),m=V.checkPassword(this.props.user.common.password,this.state.passwordRepeat),g=this.props.isNew||JSON.stringify(this.props.user)!==this.state.originalData,_=this.props.user._id!==`system.user.`&&!p&&!m&&g;return(this.props.isNew&&e||e&&t)&&(_=!1),y(E,{fullWidth:this.props.innerWidth<500,open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&this.props.onClose()},children:[v(a,{style:{...this.props.styles.dialogTitle,padding:12},children:this.props.t(`User parameters`)}),y(f,{sx:{"&.MuiDialogContent-root":{...this.props.innerWidth<500?this.props.styles.narrowContent:void 0,...fe.contentRoot}},children:[y(s,{container:!0,spacing:this.props.innerWidth<500?1:4,style:this.props.styles.dialog,children:[v(s,{size:{xs:12,md:6},children:v(q,{label:`Name`,t:this.props.t,value:u,onChange:e=>{let t=c.clone(this.props.user);!this.props.user.common.dontDelete&&r(this.props.getText(t.common.name))===n(t._id)&&(t._id=i(t._id,r(e))),t.common.name=e,this.props.onChange(t)},autoComplete:`new-password`,icon:N,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`ID edit`,t:this.props.t,disabled:this.props.user.common.dontDelete,value:this.props.user._id.split(`.`)[this.props.user._id.split(`.`).length-1],onChange:e=>{let t=c.clone(this.props.user);t._id=i(t._id,r(e)),this.props.onChange(t)},icon:I,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`ID preview`,t:this.props.t,disabled:!0,value:this.props.user._id,icon:R,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`Description`,t:this.props.t,value:l,onChange:e=>{let t=c.clone(this.props.user);t.common.desc=e,this.props.onChange(t)},icon:h,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`Password`,t:this.props.t,value:this.props.user.common.password,error:p?this.props.t(p):void 0,onChange:e=>{let t=c.clone(this.props.user);t.common.password=e,this.props.onChange(t)},type:`password`,autoComplete:`new-password`,icon:z,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`Password repeat`,t:this.props.t,value:this.state.passwordRepeat,error:m?this.props.t(m):void 0,onChange:e=>this.setState({passwordRepeat:e}),type:`password`,autoComplete:`new-password`,icon:z,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(P,{icons:X,label:`Icon`,value:this.props.user.common.icon,onChange:e=>{let t=c.clone(this.props.user);t.common.icon=e,this.props.onChange(t)},previewStyle:this.props.styles.iconPreview,icon:b})}),v(s,{size:{xs:12,md:6},children:v(J,{label:`Color`,t:this.props.t,value:this.props.user.common.color||``,previewStyle:this.props.styles.iconPreview,onChange:e=>{let t=c.clone(this.props.user);t.common.color=e,this.props.onChange(t)},icon:L,style:this.props.styles.colorPicker,styles:this.props.styles})})]}),this.props.isNew?null:this.renderOidcButton()]}),y(d,{children:[v(S,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.saveData(this.props.isNew?null:this.state.originalId),disabled:!_,startIcon:v(o,{}),children:this.props.t(`Save`)}),v(S,{variant:`contained`,color:`grey`,onClick:this.props.onClose,startIcon:v(O,{}),children:this.props.t(`Cancel`)})]})]})}renderOidcButton(){var e;return window.ssoActive===`true`?(e=this.props.user.common)!=null&&(e=e.externalAuthentication)!=null&&e.oidc?v(S,{variant:`contained`,color:`secondary`,fullWidth:!0,startIcon:v(oe,{}),sx:{marginTop:2},onClick:async()=>{var e;(e=this.props.user.common.externalAuthentication)==null||delete e.oidc,await this.props.saveData(this.state.originalId),window.alert(`Single-Sign On disconnected!`)},children:this.props.t(`Disconnect Single-Sign On`)}):v(S,{variant:`contained`,color:`secondary`,fullWidth:!0,onClick:()=>{window.location.href=B(`sso?redirectUrl=${encodeURIComponent(`${window.origin}${B(`#tab-users`)}`)}&method=register&user=${encodeURIComponent((this.state.originalId||this.props.user._id).replace(/^system\.user\./,``))}`)},startIcon:v(k,{}),sx:{marginTop:2},children:this.props.t(`Add Single-Sign On`)}):null}},Z=[new URL(`group1-CmFsZszo.svg`,import.meta.url).href,new URL(`group2-CuvSswwx.svg`,import.meta.url).href,new URL(`group3-CRAMNPrf.svg`,import.meta.url).href,new URL(`group4-D4IM6-jV.svg`,import.meta.url).href,new URL(`group5-T3CGkJFm.svg`,import.meta.url).href,new URL(`group6-CLVorg7G.svg`,import.meta.url).href,new URL(`group7-D-h4KR6w.svg`,import.meta.url).href,new URL(`group8-BXzJmR7Y.svg`,import.meta.url).href,`data:image/svg+xml,%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20461.367%20461.367'%3e%3cpath%20style='fill:%231EA6C6;'%20d='M373.88,367.988c0,0.037,0,0.075,0,0.122c-37.818,34.295-88.019,55.185-143.083,55.185%20c-55.073,0-105.275-20.89-143.092-55.185c0-0.047,0-0.084,0-0.122c0-57.04,33.377-106.277,81.659-129.256%20c18.145,18.098,39.391,27.85,61.434,27.85c22.052,0,43.288-9.752,61.443-27.85C340.521,261.711,373.88,310.947,373.88,367.988z%20'/%3e%3cpath%20style='fill:%23FCD09F;'%20d='M230.797,58.571c43.71,0,79.148,35.429,79.148,79.139c0,43.719-35.438,103.504-79.148,103.504%20s-79.148-59.785-79.148-103.504C151.649,94,187.087,58.571,230.797,58.571z'/%3e%3cpath%20style='fill:%23EF806F;'%20d='M164.094,213.389c2.426,3.457,4.937,6.698,7.532,9.742l-7.897,3.756%20c-26.286,12.506-48.525,32.075-64.328,56.59c-12.853,19.944-20.909,42.427-23.71,65.865%20c-28.562-7.785-54.38-22.22-75.691-41.546v-0.103c0-49.705,29.087-92.609,71.157-112.638%20c15.813,15.775,34.323,24.272,53.527,24.272c12.581,0,24.871-3.644,36.291-10.595%20C161.977,210.307,163.026,211.862,164.094,213.389z'/%3e%3cpath%20style='fill:%23EFC59C;'%20d='M138.539,137.707c0,16.431,4.272,34.511,11.878,51.504c-7.953,5.04-16.637,8.009-25.733,8.009%20c-38.089,0-68.965-52.094-68.965-90.193c0-38.089,30.876-68.956,68.965-68.956c21.124,0,40.038,9.499,52.684,24.459%20C153.883,79.28,138.539,106.737,138.539,137.707z'/%3e%3cpath%20style='fill:%23EF806F;'%20d='M297.273,213.389c-2.426,3.457-4.937,6.698-7.532,9.742l7.897,3.756%20c26.286,12.506,48.525,32.075,64.328,56.59c12.853,19.944,20.909,42.427,23.71,65.865c28.562-7.785,54.38-22.22,75.691-41.546%20v-0.103c0-49.705-29.087-92.609-71.157-112.638c-15.813,15.775-34.323,24.272-53.527,24.272%20c-12.581,0-24.871-3.644-36.291-10.595C299.39,210.307,298.341,211.862,297.273,213.389z'/%3e%3cpath%20style='fill:%23EFC59C;'%20d='M322.828,137.707c0,16.431-4.272,34.511-11.878,51.504c7.953,5.04,16.637,8.009,25.733,8.009%20c38.089,0,68.965-52.094,68.965-90.193c0-38.089-30.876-68.956-68.965-68.956c-21.124,0-40.038,9.499-52.684,24.459%20C307.484,79.28,322.828,106.737,322.828,137.707z'/%3e%3c/svg%3e`,new URL(`group10-Dp9tRs6I.svg`,import.meta.url).href];function me(e){let t=(e,t)=>Object.values(e).map((n,r)=>{let i=Object.keys(e)[r];return t(n,i)}),n=e.group.common.acl||{},i=e=>e,a={...n,object:{read:!0,list:!0,write:!0,delete:!1,create:!1,...i(n.object)},state:{read:!0,list:!0,write:!0,delete:!1,create:!1,...i(n.state)},users:{read:!1,list:!1,write:!1,delete:!1,create:!1,...i(n.users)},other:{http:!1,execute:!1,sendto:!0,...i(n.other)},file:{read:!0,list:!0,write:!1,delete:!1,create:!1,...i(n.file)}};return v(s,{container:!0,spacing:e.innerWidth<500?1:4,style:e.styles.dialog,children:t(a,(n,i)=>y(s,{size:{xs:12,md:12},children:[v(x,{component:`h2`,sx:e.styles.permHeaders,children:e.t(`group_acl_${i}`)}),t(n,(t,n)=>v(l,{control:v(r,{disabled:e.group._id===`system.group.administrator`,checked:t,onChange:t=>{let r=c.clone(e.group);r.common.acl=c.clone(a),r.common.acl[i][n]=t.target.checked,e.onChange(r)}}),label:e.t(`group_acl_${n}`),labelPlacement:`top`},n))]},i))},`PermissionsTab`)}var he={contentRoot:{padding:`16px 24px`}},ge=class extends D{constructor(e){super(e),this.state={tab:0,originalId:e.group._id,originalData:JSON.stringify(e.group)}}componentDidMount(){if(this.props.isNew){let e=Z[Math.round(Math.random()*(Z.length-1))];e&&c.getSvg(e).then(e=>{let t=c.clone(this.props.group);t.common.icon=e,this.props.onChange(t)})}}render(){let t=this.props.groups.find(e=>e._id===this.props.group._id),n=this.props.group._id!==this.state.originalId,r=this.props.isNew||JSON.stringify(this.props.group)!==this.state.originalData,i=this.props.group._id!==`system.group.`&&this.props.group.common.password===this.props.group.common.passwordRepeat&&r,l=e=>e.split(`.`).pop()||``,u=e=>e.replace(c.FORBIDDEN_CHARS,`_`).replace(/\s/g,`_`).replace(/\./g,`_`).toLowerCase(),p=(e,t)=>{let n=e.split(`.`);return n[n.length-1]=t,n.join(`.`)};this.props.isNew?t&&(i=!1):t&&n&&(i=!1);let m=this.props.getText(this.props.group.common.desc),g=this.props.getText(this.props.group.common.name),_=[y(s,{container:!0,spacing:this.props.innerWidth<500?1:4,style:this.props.styles.dialog,children:[v(s,{size:{xs:12,md:6},children:v(q,{label:`Name`,t:this.props.t,value:g,onChange:e=>{let t=c.clone(this.props.group);!this.props.group.common.dontDelete&&u(this.props.getText(t.common.name))===l(t._id)&&(t._id=p(t._id,u(e))),t.common.name=e,this.props.onChange(t)},autoComplete:`off`,icon:N,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`ID edit`,t:this.props.t,disabled:this.props.group.common.dontDelete,value:this.props.group._id.split(`.`)[this.props.group._id.split(`.`).length-1],onChange:e=>{let t=c.clone(this.props.group);t._id=p(t._id,u(e)),this.props.onChange(t)},icon:I,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`ID preview`,t:this.props.t,disabled:!0,value:this.props.group._id,icon:R,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(q,{label:`Description`,t:this.props.t,value:m,onChange:e=>{let t=c.clone(this.props.group);t.common.desc=e,this.props.onChange(t)},icon:h,styles:this.props.styles})}),v(s,{size:{xs:12,md:6},children:v(P,{label:`Icon`,icons:Z,value:this.props.group.common.icon,onChange:e=>{let t=c.clone(this.props.group);t.common.icon=e,this.props.onChange(t)},previewStyle:this.props.styles.iconPreview,icon:b})}),v(s,{size:{xs:12,md:6},children:v(J,{label:`Color`,t:this.props.t,value:this.props.group.common.color||``,previewStyle:this.props.styles.iconPreview,onChange:e=>{let t=c.clone(this.props.group);t.common.color=e,this.props.onChange(t)},icon:L,style:this.props.styles.colorPicker,styles:this.props.styles})})]}),me(this.props)][this.state.tab];return y(E,{open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&this.props.onClose()},fullWidth:this.props.innerWidth<500,children:[v(a,{style:this.props.styles.dialogTitle,children:y(w,{variant:`fullWidth`,value:this.state.tab,onChange:(e,t)=>this.setState({tab:t}),children:[v(e,{label:this.props.t(`Main`),value:0}),v(e,{label:this.props.t(`Permissions`),value:1})]})}),v(f,{sx:{"&.MuiDialogContent-root":{...this.props.innerWidth<500?this.props.styles.narrowContent:void 0,...he.contentRoot}},children:_}),y(d,{style:this.props.styles.dialogActions,children:[v(S,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.saveData(this.props.isNew?null:this.state.originalId),disabled:!i,startIcon:v(o,{}),children:this.props.t(`Save`)}),v(S,{variant:`contained`,color:`grey`,onClick:this.props.onClose,startIcon:v(O,{}),children:this.props.t(`Cancel`)})]})]})}};function _e(e){return y(E,{open:!0,onClose:e.onClose,children:[v(a,{children:e.t(`Please confirm`)}),v(f,{children:v(p,{children:e.t(`Do you want to delete user %s?`,e.getText(e.user.common.name))})}),y(d,{children:[v(S,{variant:`contained`,color:`primary`,onClick:()=>e.deleteUser(e.user._id),startIcon:v(_,{}),children:e.t(`Delete`)}),v(S,{variant:`contained`,color:`grey`,autoFocus:!0,onClick:e.onClose,startIcon:v(O,{}),children:e.t(`Cancel`)})]})]})}function ve(e){return y(E,{open:!0,onClose:e.onClose,children:[v(a,{children:e.t(`Please confirm`)}),v(f,{children:v(p,{children:e.t(`Do you want to delete group %s?`,e.getText(e.group.common.name))})}),y(d,{style:e.styles.dialogActions,children:[v(S,{variant:`contained`,color:`primary`,onClick:()=>e.deleteGroup(e.group._id),startIcon:v(_,{}),children:e.t(`Delete`)}),v(S,{variant:`contained`,color:`grey`,autoFocus:!0,onClick:e.onClose,startIcon:v(O,{}),children:e.t(`Cancel`)})]})]})}n();var Q=`***********`,ye=`0 1px 1px 0 rgba(0, 0, 0, .4),0 6px 6px 0 rgba(0, 0, 0, .2)`,$={mainGridCont:{height:`calc(100% - 55px)`,overflowY:`auto`},childGridCont:{display:`flex`,flexDirection:`column`},childGridContWide:{height:`100%`},canDrop:e=>({backgroundColor:e.palette.background.default}),headContainer:{margin:10},blocksContainer:{overflowY:`auto`,overflowX:`hidden`},userGroupCard2:e=>({border:`1px solid #FFF`,borderColor:e.palette.divider,m:`10px`,minHeight:150,backgroundColor:e.palette.background.default,color:e.palette.text.primary,transition:`all 200ms ease-out`,opacity:1,overflow:`hidden`,"&:hover":{overflowY:`auto`,boxShadow:ye}}),userGroupCardSecondary:e=>({color:e.palette.text.primary,backgroundColor:e.palette.success.light}),permHeaders:e=>({backgroundColor:e.palette.mode===`dark`?e.palette.background.default:e.palette.primary.main,p:`4px`,borderRadius:`2px`,color:`#EEE`}),userCardContent:{height:`100%`,opacity:1},userGroupTitle:{display:`inline-flex`,alignItems:`center`},userGroupUserName:{fontWeight:900,padding:5},userGroupUserID:{opacity:.7,padding:5},description:{fontSize:10,fontStyle:`italic`,marginLeft:5,opacity:.7},userGroupMember:e=>({display:`inline-flex`,m:`4px`,p:`4px`,backgroundColor:`#00000010`,border:`1px solid #FFF`,borderColor:e.palette.text.primary,color:e.palette.text.primary,alignItems:`center`}),icon:{height:32,width:32,marginRight:5,backgroundSize:`cover`,backgroundPosition:`center`},right:{float:`right`},left:{float:`left`,marginRight:10},dialog:{},flex:{display:`flex`},formControl:{display:`flex`,padding:24,flexGrow:1e3},formContainer:{display:`flex`,justifyContent:`center`,alignItems:`center`},formIcon:{margin:10,opacity:.6},descriptionPanel:e=>({width:`100%`,backgroundColor:`transparent`,mb:`20px`,mt:`20px`,ml:`20px`,opacity:.75,border:`none`,display:`flex`,alignItems:`center`,"& a":{pl:`3px`,color:e.palette.mode===`dark`?`#EEE`:`#111`}}),dialogTitle:{borderBottom:`1px solid #00000020`,padding:0,width:`100%`},dialogActions:{borderTop:`1px solid #00000020`,width:`100%`},dialogPaper:{overflowY:`initial`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`calc(100% - 100px)`,height:`calc(100% - 100px)`,maxWidth:800,maxHeight:`100%`},dialogPaperMini:{maxHeight:300},colorPicker:{},iconPreview:{height:40,width:40},mainDescription:{fontSize:`200%`},deleteDialog:{padding:20},narrowContent:{padding:`8px 8px 8px 8px`}},be=()=>{let e=ce();return e.display?v(`div`,{style:e.style,children:e.item.preview}):null},xe={_id:`system.user.`,type:`user`,common:{name:``,password:``,enabled:!0,color:``,desc:``},native:{},enums:{}},Se={_id:``,native:{},type:`group`,common:{name:``,desc:``,members:[],dontDelete:!0,acl:{object:{list:!1,read:!1,write:!1,delete:!1,create:!1},state:{list:!1,read:!1,write:!1,create:!1,delete:!1},users:{list:!1,read:!1,write:!1,create:!1,delete:!1},other:{execute:!1,http:!1,sendto:!1},file:{list:!1,read:!1,write:!1,create:!1,delete:!1}},icon:``,color:``}},Ce=class e extends D{constructor(e){super(e),i(this,`getText`,e=>e&&(typeof e==`object`?e[this.props.lang]||e.en||``:e||``)||``),i(this,`showUserEditDialog`,(e,t)=>{e=c.clone(e),e.common.password=e.common.password?Q:``,this.setState({userEditDialog:e,userEditDialogNew:t})}),i(this,`showGroupEditDialog`,(e,t)=>{e=c.clone(e),this.setState({groupEditDialog:e,groupEditDialogNew:t})}),i(this,`updateData`,()=>{let e;return this.props.socket.getForeignObjects(`system.user.*`,`user`).then(t=>(e=Object.values(t).sort((e,t)=>e._id>t._id?1:-1),e.forEach(e=>{e.common&&e.common.description&&(e.common.desc||(e.common.desc=e.common.description),delete e.common.description)}),this.props.socket.getForeignObjects(`system.group.*`,`group`))).then(t=>{let n=Object.values(t).sort((e,t)=>e._id>t._id?1:-1);n.forEach(e=>{e.common&&e.common.description&&(e.common.desc||(e.common.desc=e.common.description),delete e.common.description)}),this.setState({groups:n,users:e})})}),i(this,`changeUserFormData`,e=>this.setState({userEditDialog:e})),i(this,`changeGroupFormData`,e=>this.setState({groupEditDialog:e})),i(this,`saveUser`,async e=>{var t;let n=c.clone(this.state.userEditDialog),r=(t=this.state.users)==null?void 0:t.find(e=>e._id===n._id),i=n.common.password&&n.common.password!==Q?n.common.password:``;if(r?n.common.password=r.common.password:n.common.password=``,await this.props.socket.setObject(n._id,n),typeof this.state.userEditDialog==`object`&&e&&e!==this.state.userEditDialog._id)try{await this.props.socket.delObject(e);let t=this.state.groups||[];for(let r=0;r<t.length;r++){let i=t[r];if(i.common.members.includes(e)){let t=c.clone(i);t.common.members[t.common.members.indexOf(e)]=n._id,await this.props.socket.setObject(t._id,t)}}}catch(e){window.alert(`Cannot delete user: ${e}`)}if(i)try{await this.props.socket.changePassword(n._id,i)}catch(e){window.alert(`Cannot change password: ${e}`)}this.setState({userEditDialog:!1},()=>this.updateData())}),i(this,`saveGroup`,async e=>{if(typeof this.state.groupEditDialog==`object`){if(await this.props.socket.setObject(this.state.groupEditDialog._id,this.state.groupEditDialog),e&&e!==this.state.groupEditDialog._id)try{await this.props.socket.delObject(e)}catch(e){window.alert(`Cannot delete user: ${e}`)}this.setState({groupEditDialog:!1},()=>this.updateData())}}),i(this,`showUserDeleteDialog`,e=>this.setState({userDeleteDialog:e})),i(this,`showGroupDeleteDialog`,e=>this.setState({groupDeleteDialog:e})),i(this,`deleteUser`,e=>{this.props.socket.delObject(e).then(()=>Promise.all((this.state.groups||[]).map(t=>{if(t.common.members.includes(e)){let n=c.clone(t);return n.common.members.splice(n.common.members.indexOf(e),1),this.props.socket.setObject(n._id,n)}return Promise.resolve(null)}))).catch(e=>window.alert(`Cannot delete user: ${e}`)).then(()=>{this.setState({userDeleteDialog:!1},()=>this.updateData())})}),i(this,`deleteGroup`,e=>this.props.socket.delObject(e).then(()=>this.setState({groupDeleteDialog:!1},()=>this.updateData())).catch(e=>window.alert(`Cannot delete user: ${e}`))),i(this,`addUserToGroup`,(e,t)=>{var n;let r=(n=this.state.groups)==null?void 0:n.find(e=>e._id===t),i=(r==null?void 0:r.common.members)||[];r&&!i.includes(e)&&(i.push(e),this.props.socket.setObject(r._id,r).then(()=>this.updateData()).catch(e=>window.alert(`Cannot delete user: ${e}`)))}),i(this,`removeUserFromGroup`,(e,t)=>{var n;let r=(n=this.state.groups)==null?void 0:n.find(e=>e._id===t),i=(r==null?void 0:r.common.members)||[];r&&i.includes(e)&&(i.splice(i.indexOf(e),1),this.props.socket.setObject(r._id,r).then(()=>this.updateData()))}),this.state={users:null,groups:null,userEditDialog:!1,userEditDialogNew:!1,groupEditDialog:!1,groupEditDialogNew:!1,userDeleteDialog:!1,groupDeleteDialog:!1,innerWidth:0}}componentDidMount(){this.setState({innerWidth:window.innerWidth},()=>this.updateData())}componentDidUpdate(){window.innerWidth!==this.state.innerWidth&&setTimeout(()=>this.setState({innerWidth:window.innerWidth}),100)}static _isUniqueName(e,t,n){return!e.find(e=>e._id===`system.user.${t.toLowerCase()}_${n}`||e.common.name===`${t} ${n}`)}static findNewUniqueName(t,n,r){let i=1;for(;!e._isUniqueName(n,r,i);)i++;return{_id:`system.${t?`group`:`user`}.${r.toLowerCase()}_${i}`,name:`${r} ${i}`}}render(){return!this.state.users||!this.state.groups?v(ee,{}):y(K,{backend:V.isTouchDevice()?W:G,children:[v(be,{}),v(x,{component:`div`,sx:$.descriptionPanel,children:this.props.t(`You can drag users to groups.`)}),y(s,{container:!0,spacing:2,style:$.mainGridCont,children:[y(s,{size:{xs:12,md:6},style:{...$.childGridCont,...this.state.innerWidth>600?$.childGridContWide:void 0},children:[y(`div`,{style:$.headContainer,children:[v(F,{size:`small`,style:$.right,onClick:()=>{let{_id:t,name:n}=e.findNewUniqueName(!0,this.state.groups||[],this.props.t(`Group`)),r=c.clone(Se);r._id=t,r.common.name=n,this.showGroupEditDialog(r,!0)},children:v(ae,{})}),v(T,{gutterBottom:!0,variant:`h4`,component:`h4`,children:this.props.t(`Groups`)})]}),v(`div`,{style:$.blocksContainer,children:this.state.groups.sort((e,t)=>{var n,r;let i=(this.getText(e==null||(n=e.common)==null?void 0:n.name)||e._id).toLowerCase(),a=(this.getText(t==null||(r=t.common)==null?void 0:r.name)||t._id).toLowerCase();return i>a?1:i<a?-1:0}).map(e=>v(de,{group:e,users:this.state.users||[],showGroupEditDialog:this.showGroupEditDialog,showGroupDeleteDialog:this.showGroupDeleteDialog,removeUserFromGroup:this.removeUserFromGroup,getText:this.getText,styles:$,...this.props},e._id))})]}),y(s,{size:{xs:12,md:6},style:{...$.childGridCont,...this.state.innerWidth>600?$.childGridContWide:void 0},children:[y(`div`,{style:$.headContainer,children:[v(F,{size:`small`,style:$.right,onClick:()=>{let{_id:t,name:n}=e.findNewUniqueName(!1,this.state.users||[],this.props.t(`User`)),r=c.clone(xe);r._id=t,r.common.name=n,this.showUserEditDialog(r,!0)},children:v(ie,{})}),v(T,{gutterBottom:!0,variant:`h4`,component:`h4`,children:this.props.t(`Users`)})]}),v(`div`,{style:$.blocksContainer,children:this.state.users.sort((e,t)=>{var n,r;let i=(this.getText(e==null||(n=e.common)==null?void 0:n.name)||e._id).toLowerCase(),a=(this.getText(t==null||(r=t.common)==null?void 0:r.name)||t._id).toLowerCase();return i>a?1:i<a?-1:0}).map(e=>v(le,{user:e,groups:this.state.groups||[],showUserEditDialog:this.showUserEditDialog,showUserDeleteDialog:this.showUserDeleteDialog,updateData:this.updateData,addUserToGroup:this.addUserToGroup,removeUserFromGroup:this.removeUserFromGroup,getText:this.getText,styles:$,...this.props},e._id))})]})]}),this.state.userEditDialog?v(pe,{onClose:()=>this.setState({userEditDialog:!1}),users:this.state.users,user:this.state.userEditDialog,isNew:this.state.userEditDialogNew,t:this.props.t,getText:this.getText,styles:$,onChange:this.changeUserFormData,saveData:this.saveUser,innerWidth:this.state.innerWidth}):null,this.state.groupEditDialog?v(ge,{onClose:()=>this.setState({groupEditDialog:!1}),groups:this.state.groups,group:this.state.groupEditDialog,isNew:this.state.groupEditDialogNew,t:this.props.t,getText:this.getText,styles:$,onChange:this.changeGroupFormData,innerWidth:this.state.innerWidth,saveData:this.saveGroup}):null,this.state.userDeleteDialog?v(_e,{getText:this.getText,onClose:()=>this.setState({userDeleteDialog:!1}),user:this.state.userDeleteDialog,t:this.props.t,deleteUser:this.deleteUser}):null,this.state.groupDeleteDialog?v(ve,{getText:this.getText,onClose:()=>this.setState({groupDeleteDialog:!1}),group:this.state.groupDeleteDialog,t:this.props.t,styles:$,deleteGroup:this.deleteGroup}):null]})}};function we(e){return v(m,{children:v(re,{style:{display:`flex`,flexDirection:`column`,overflow:`auto`},children:v(Ce,{t:e.t,lang:e.lang,socket:e.socket,ready:e.ready,expertMode:e.expertMode,themeType:e.themeType,theme:e.theme})})})}export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z`}),`Input`),r=e(t(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2`}),`Lens`),i=e(t(`path`,{d:`M14 5h8v2h-8zm0 5.5h8v2h-8zm0 5.5h8v2h-8zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7.92 2 11.5`}),`LowPriority`),a=e(t(`path`,{d:`M4 18h2.5v-2.5H4zm0-4.75h2.5v-2.5H4zM4 8.5h2.5V6H4zM17.5 6v2.5H20V6zM13 8.5h2.5V6H13zm4.5 9.5H20v-2.5h-2.5zm0-4.75H20v-2.5h-2.5zM8.5 18H11v-2.5H8.5zm4.5 0h2.5v-2.5H13zM8.5 8.5H11V6H8.5zm4.5 4.75h2.5v-2.5H13zm-4.5 0H11v-2.5H8.5z`}),`ViewCompact`);export{n as i,i as n,r,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z`}),`ViewList`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.996.996 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12z`}),`AutoFixHigh`),r=e(t(`path`,{d:`M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3m13.71-9.37-1.34-1.34a.996.996 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41`}),`Brush`),i=e([t(`path`,{d:`m12 2-5.5 9h11z`},`0`),t(`circle`,{cx:`17.5`,cy:`17.5`,r:`4.5`},`1`),t(`path`,{d:`M3 13.5h8v8H3z`},`2`)],`Category`),a=e(t(`path`,{d:`M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z`}),`Checklist`),o=e(t(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),s=e(t(`path`,{d:`M14 10H3v2h11zm0-4H3v2h11zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2zM3 16h7v-2H3z`}),`PlaylistAdd`),c=e(t(`path`,{d:`M16 20H2V4h14zm2-12h4V4h-4zm0 12h4v-4h-4zm0-6h4v-4h-4z`}),`ViewSidebar`);export{i as a,a as i,s as n,r as o,o as r,n as s,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`VpnKey`);export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Os as e,Us as t}from"./loadShare-eager-BpwDZfDr.js";var n=e(t(`path`,{d:`M17 5H3c-1.1 0-2 .89-2 2v9h2c0 1.65 1.34 3 3 3s3-1.35 3-3h5.5c0 1.65 1.34 3 3 3s3-1.35 3-3H23v-5zM3 11V7h4v4zm3 6.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m7-6.5H9V7h4zm4.5 6.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M15 11V7h1l4 4z`}),`AirportShuttle`),r=e(t(`path`,{d:`M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2C8.2 7.18 6.84 6.62 5.4 6.62 2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12c1.02 1.01 2.37 1.57 3.82 1.57 2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37`}),`AllInclusive`),i=e(t(`path`,{d:`M17 11V3H7v4H3v14h8v-4h2v4h8V11zM7 19H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm4 4H9v-2h2zm0-4H9V9h2zm0-4H9V5h2zm4 8h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm4 12h-2v-2h2zm0-4h-2v-2h2z`}),`Apartment`),a=e([t(`circle`,{cx:`7.2`,cy:`14.4`,r:`3.2`},`0`),t(`circle`,{cx:`14.8`,cy:`18`,r:`2`},`1`),t(`circle`,{cx:`15.2`,cy:`8.8`,r:`4.8`},`2`)],`BubbleChart`),o=e(t(`path`,{d:`M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z`}),`DateRange`),s=e(t(`path`,{d:`M17 3h-1v5h1zm-2 2h-2V4h2V3h-3v3h2v1h-2v1h3zm3-2v5h1V6h2V3zm2 2h-1V4h1zm0 10.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.01.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.27-.26.35-.65.24-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1`}),`DialerSip`),c=e(t(`path`,{d:`M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28c.35.6.98 1 1.72 1s1.38-.4 1.72-1H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46C18.09 13.95 19 12.08 19 10c0-3.87-3.13-7-7-7m2 16h-4v-1h4zm0-2h-4v-1h4zm-1.5-5.59V14h-1v-2.59L9.67 9.59l.71-.71L12 10.5l1.62-1.62.71.71z`}),`EmojiObjects`),l=e([t(`path`,{d:`M3 2h8v2H3zm3 9h2V7h3V5H3v2h3zm6.4038 9.182 7.7782-7.7783 1.4142 1.4142-7.7782 7.7782z`},`0`),t(`circle`,{cx:`14.5`,cy:`14.5`,r:`1.5`},`1`),t(`circle`,{cx:`19.5`,cy:`19.5`,r:`1.5`},`2`),t(`path`,{d:`M15.5 11c1.38 0 2.5-1.12 2.5-2.5V4h3V2h-4v4.51c-.42-.32-.93-.51-1.5-.51C14.12 6 13 7.12 13 8.5s1.12 2.5 2.5 2.5m-5.76 4.96-1.41 1.41-.71-.71.35-.35c.98-.98.98-2.56 0-3.54-.49-.49-1.13-.73-1.77-.73s-1.28.24-1.77.73c-.98.98-.98 2.56 0 3.54l.35.35-1.06 1.06c-.98.98-.98 2.56 0 3.54.5.5 1.14.74 1.78.74s1.28-.24 1.77-.73l1.06-1.06 1.41 1.41 1.41-1.41-1.41-1.41 1.41-1.41zM5.85 14.2c.12-.12.26-.15.35-.15s.23.03.35.15c.19.2.19.51 0 .71l-.35.35-.35-.36c-.19-.19-.19-.51 0-.7m0 5.65c-.12.12-.26.15-.35.15s-.23-.03-.35-.15c-.19-.19-.19-.51 0-.71l1.06-1.06.71.71z`},`3`)],`EmojiSymbols`),u=e(t(`path`,{d:`m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z`}),`Favorite`),d=e(t(`path`,{d:`M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95q.36.3.78.54c1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19M12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4`}),`FilterVintage`),f=e(t(`path`,{d:`M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z`}),`Folder`),p=e(t(`path`,{d:`M19 9.3V4h-3v2.6L12 3 2 12h3v8h5v-6h4v6h5v-8h3zm-9 .7c0-1.1.9-2 2-2s2 .9 2 2z`}),`House`),m=e(t(`path`,{d:`M19.5 9.5c-1.03 0-1.9.62-2.29 1.5h-2.92c-.39-.88-1.26-1.5-2.29-1.5s-1.9.62-2.29 1.5H6.79c-.39-.88-1.26-1.5-2.29-1.5C3.12 9.5 2 10.62 2 12s1.12 2.5 2.5 2.5c1.03 0 1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5s1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5 1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5`}),`LinearScale`),h=e(t(`path`,{d:`M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-2 12H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z`}),`Message`),g=e(t(`path`,{d:`M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42m12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42M18 11c0-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-1l-2-2zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18q.15-.36.15-.78h-4c.01 1.1.9 2 2.01 2`}),`NotificationsActive`),_=e(t(`path`,{d:`M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M7 15l4.5-6 3.5 4.51 2.5-3.01L21 15z`}),`PermMedia`),v=e(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`}),`Phonelink`),y=e(t(`path`,{d:`M10.82 12.49c.02-.16.04-.32.04-.49s-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75M18 1.01 8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99`}),`PhonelinkSetup`),b=e(t(`path`,{d:`M21 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-2m0 16.01H3V4.99h18zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3z`}),`SettingsBrightness`),x=e(t(`path`,{d:`M7.77 6.76 6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12zM7 13h2v-2H7zm10-2h-2v2h2zm-6 2h2v-2h-2zm6.77-7.52-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12z`}),`SettingsEthernet`),S=e(t(`path`,{d:`M13 13v8h8v-8zM3 21h8v-8H3zM3 3v8h8V3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66z`}),`Widgets`),C=e(t(`path`,{d:`M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.48-.81 2.75-2 3.45l1 1.74c1.79-1.04 3-2.97 3-5.19M12 3C6.48 3 2 7.48 2 13c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 18.53 4 15.96 4 13c0-4.42 3.58-8 8-8s8 3.58 8 8c0 2.96-1.61 5.53-4 6.92l1 1.73c2.99-1.73 5-4.95 5-8.65 0-5.52-4.48-10-10-10`}),`WifiTethering`);export{n as S,s as _,y as a,i as b,g as c,p as d,f,c as g,l as h,b as i,h as l,u as m,S as n,v as o,d as p,x as r,_ as s,C as t,m as u,o as v,r as x,a as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-sJBDdmOt.js";import{$ as t,A as n,At as r,B as i,Bs as a,C as o,Ct as s,D as c,Dt as l,E as u,Et as ee,F as te,Ft as ne,G as re,Gs as ie,H as ae,I as oe,J as d,K as f,L as p,M as m,Mt as h,N as g,Nt as _,O as v,Ot as y,P as b,Pt as x,Q as S,R as C,S as w,St as T,T as E,Tt as D,U as O,V as k,W as A,Ws as j,X as M,Xr as N,Y as P,Z as F,Zr as I,_ as L,_c as R,_t as z,at as B,b as V,bc as H,bt as U,ct as W,d as G,dt as K,et as q,f as se,ft as ce,g as le,gt as J,h as ue,ht as de,it as fe,j as pe,jt as me,k as he,kt as ge,l as _e,lt as ve,m as ye,mt as be,nt as xe,o as Se,ot as Ce,p as we,pt as Te,q as Ee,rt as De,s as Oe,sn as ke,st as Ae,tt as je,u as Me,ut as Ne,v as Pe,vc as Fe,vt as Ie,w as Le,ws as Re,wt as Y,x as ze,xt as Be,y as Ve,yc as He,yt as Ue,z as We}from"./loadShare-eager-CRNcc8D7.js";var Ge=e({Bounds:()=>Me,Browser:()=>G,CRS:()=>se,Canvas:()=>we,Circle:()=>ye,CircleMarker:()=>ue,Class:()=>le,Control:()=>L,DivIcon:()=>Pe,DivOverlay:()=>Ve,DomEvent:()=>V,DomUtil:()=>ze,Draggable:()=>w,Evented:()=>o,FeatureGroup:()=>Le,GeoJSON:()=>E,GridLayer:()=>u,Handler:()=>c,Icon:()=>v,ImageOverlay:()=>he,LatLng:()=>n,LatLngBounds:()=>pe,Layer:()=>m,LayerGroup:()=>g,LineUtil:()=>b,Map:()=>te,Marker:()=>oe,Mixin:()=>p,Path:()=>C,Point:()=>We,PolyUtil:()=>i,Polygon:()=>k,Polyline:()=>ae,Popup:()=>O,PosAnimation:()=>A,Projection:()=>be,Rectangle:()=>re,Renderer:()=>f,SVG:()=>Ee,SVGOverlay:()=>d,TileLayer:()=>P,Tooltip:()=>M,Transformation:()=>F,Util:()=>S,VideoOverlay:()=>t,bind:()=>q,bounds:()=>l,canvas:()=>je,circle:()=>xe,circleMarker:()=>De,control:()=>fe,default:()=>Ke,divIcon:()=>Ce,extend:()=>Ae,featureGroup:()=>W,geoJSON:()=>ve,geoJson:()=>Ne,gridLayer:()=>K,icon:()=>ce,imageOverlay:()=>Te,latLng:()=>y,latLngBounds:()=>ge,layerGroup:()=>de,map:()=>B,marker:()=>z,point:()=>r,polygon:()=>Ie,polyline:()=>Ue,popup:()=>U,rectangle:()=>Be,setOptions:()=>T,stamp:()=>s,svg:()=>Y,svgOverlay:()=>D,tileLayer:()=>ee,tooltip:()=>h,transformation:()=>me,version:()=>_,videoOverlay:()=>x}),Ke=Reflect.get(J,`default`)??J,X=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},Z=(e,t,n,r)=>{var i,a;let o=(i=globalThis.__mf_module_cache__)==null?void 0:i.share,s=t.map(e=>o==null?void 0:o[e]).find(e=>e!==void 0),c=e=>{let t=String(e||``).split(/[^0-9]+/).map(Number),r=String(n||``).split(/[^0-9]+/).map(Number);for(let e=0;e<Math.max(t.length,r.length);e++){if((t[e]||0)<(r[e]||0))return!0;if((t[e]||0)>(r[e]||0))return!1}return!1};if(!c((s==null?void 0:s.version)??(s==null||(a=s.default)==null?void 0:a.version)))for(let t of e){var l,u;let e=o==null?void 0:o[t];if(e===void 0)continue;let n=(e==null?void 0:e.version)??(e==null||(l=e.default)==null?void 0:l.version);if(!(n!==void 0&&c(n))&&(!r||typeof(e==null?void 0:e[r])==`function`||typeof(e==null||(u=e.default)==null?void 0:u[r])==`function`)){let n=typeof(e==null?void 0:e[r])==`function`?e:e==null?void 0:e.default,i=n==null?void 0:n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(!r||t.endsWith(`/client`)||!i)return e;let a={};for(let e of[`createRoot`,`hydrateRoot`])a[e]=(...t)=>{i.usingClientEntryPoint=!0;try{return n[e](...t)}finally{i.usingClientEntryPoint=!1}};return{...a,default:a}}}},Q={react:async()=>H,"react/jsx-runtime":async()=>He,"react-dom":async()=>Fe,"react-dom/client":async()=>R,"@emotion/react":async()=>ie,"@emotion/styled":async()=>j,"react-dropzone":async()=>a,"@mui/material":async()=>Re,"@iobroker/gui-components":async()=>I,"@mui/x-date-pickers":async()=>N,"@iobroker/json-config":async()=>ke,"@iobroker/dm-gui-components":async()=>ne,leaflet:async()=>Ge,"leaflet-geosearch":async()=>_e,"react-ace":async()=>Oe,semver:async()=>Se},$={react:{name:`react`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$.react;return e.lib?e.lib:(e.loading||=(async()=>{try{let{react:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react/jsx-runtime`];if(e.lib)return e.lib;if(e.loading)return e.loading;let t=Z([`default:react/jsx-runtime`,`react/jsx-runtime`],[`default:react`,`react`],`19.3.1`,void 0);return t===void 0?(e.loading=(async()=>{try{let{"react/jsx-runtime":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return t},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dom":{name:`react-dom`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dom`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-dom":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dom/client":{name:`react-dom/client`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dom/client`];if(e.lib)return e.lib;if(e.loading)return e.loading;let t=Z([`default:react-dom/client`,`react-dom/client`,`default:react-dom`,`react-dom`],[`default:react`,`react`],`19.3.1`,`createRoot`);return t===void 0?(e.loading=(async()=>{try{let{"react-dom/client":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return t},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@emotion/react":{name:`@emotion/react`,version:`11.14.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@emotion/react`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@emotion/react":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@emotion/styled":{name:`@emotion/styled`,version:`11.14.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@emotion/styled`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@emotion/styled":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dropzone":{name:`react-dropzone`,version:`20.1.4`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dropzone`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-dropzone":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@mui/material":{name:`@mui/material`,version:`9.5.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@mui/material`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/material":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/gui-components":{name:`@iobroker/gui-components`,version:`10.3.14`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/gui-components`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/gui-components":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@mui/x-date-pickers":{name:`@mui/x-date-pickers`,version:`9.16.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@mui/x-date-pickers`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/x-date-pickers":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/json-config":{name:`@iobroker/json-config`,version:`10.1.8`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/json-config`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/json-config":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/dm-gui-components":{name:`@iobroker/dm-gui-components`,version:`10.0.23`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/dm-gui-components`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/dm-gui-components":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},leaflet:{name:`leaflet`,version:`1.9.4`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!1,get(){let e=$.leaflet;return e.lib?e.lib:(e.loading||=(async()=>{try{let{leaflet:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"leaflet-geosearch":{name:`leaflet-geosearch`,version:`5.1.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`leaflet-geosearch`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"leaflet-geosearch":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-ace":{name:`react-ace`,version:`15.0.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-ace`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-ace":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},semver:{name:`semver`,version:`7.8.5`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$.semver;return e.lib?e.lib:(e.loading||=(async()=>{try{let{semver:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}}},qe=[];export{qe as usedRemotes,$ as usedShared};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-sJBDdmOt.js";import{$ as t,A as n,At as r,B as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as ee,Ft as te,G as ne,Gs as re,H as ie,I as ae,J as oe,K as d,Ks as f,L as p,M as m,Mt as h,N as g,Nt as _,O as v,Ot as y,P as b,Pt as x,Q as S,R as C,S as w,St as T,T as E,Ts as D,Tt as O,U as k,V as A,Vs as j,W as M,X as N,Xr as P,Y as F,Z as I,Zr as L,_ as R,_t as z,at as B,b as V,bc as H,bt as U,ct as W,d as G,dt as K,et as q,f as se,ft as ce,g as le,gt as J,h as ue,ht as de,it as fe,j as pe,jt as me,k as he,kt as ge,l as _e,lt as ve,m as ye,mt as be,nt as xe,o as Se,ot as Ce,p as we,pt as Te,q as Ee,rt as De,s as Oe,sn as ke,st as Ae,tt as je,u as Me,ut as Ne,v as Pe,vc as Fe,vt as Ie,w as Le,wt as Re,x as Y,xc as ze,xt as Be,y as Ve,yc as He,yt as Ue,z as We}from"./loadShare-eager-BpwDZfDr.js";var Ge=e({Bounds:()=>Me,Browser:()=>G,CRS:()=>se,Canvas:()=>we,Circle:()=>ye,CircleMarker:()=>ue,Class:()=>le,Control:()=>R,DivIcon:()=>Pe,DivOverlay:()=>Ve,DomEvent:()=>V,DomUtil:()=>Y,Draggable:()=>w,Evented:()=>a,FeatureGroup:()=>Le,GeoJSON:()=>E,GridLayer:()=>l,Handler:()=>s,Icon:()=>v,ImageOverlay:()=>he,LatLng:()=>n,LatLngBounds:()=>pe,Layer:()=>m,LayerGroup:()=>g,LineUtil:()=>b,Map:()=>ee,Marker:()=>ae,Mixin:()=>p,Path:()=>C,Point:()=>We,PolyUtil:()=>i,Polygon:()=>A,Polyline:()=>ie,Popup:()=>k,PosAnimation:()=>M,Projection:()=>be,Rectangle:()=>ne,Renderer:()=>d,SVG:()=>Ee,SVGOverlay:()=>oe,TileLayer:()=>F,Tooltip:()=>N,Transformation:()=>I,Util:()=>S,VideoOverlay:()=>t,bind:()=>q,bounds:()=>c,canvas:()=>je,circle:()=>xe,circleMarker:()=>De,control:()=>fe,default:()=>Ke,divIcon:()=>Ce,extend:()=>Ae,featureGroup:()=>W,geoJSON:()=>ve,geoJson:()=>Ne,gridLayer:()=>K,icon:()=>ce,imageOverlay:()=>Te,latLng:()=>y,latLngBounds:()=>ge,layerGroup:()=>de,map:()=>B,marker:()=>z,point:()=>r,polygon:()=>Ie,polyline:()=>Ue,popup:()=>U,rectangle:()=>Be,setOptions:()=>T,stamp:()=>o,svg:()=>Re,svgOverlay:()=>O,tileLayer:()=>u,tooltip:()=>h,transformation:()=>me,version:()=>_,videoOverlay:()=>x}),Ke=Reflect.get(J,`default`)??J,X=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},Z=(e,t,n,r)=>{var i,a;let o=(i=globalThis.__mf_module_cache__)==null?void 0:i.share,s=t.map(e=>o==null?void 0:o[e]).find(e=>e!==void 0),c=e=>{let t=String(e||``).split(/[^0-9]+/).map(Number),r=String(n||``).split(/[^0-9]+/).map(Number);for(let e=0;e<Math.max(t.length,r.length);e++){if((t[e]||0)<(r[e]||0))return!0;if((t[e]||0)>(r[e]||0))return!1}return!1};if(!c((s==null?void 0:s.version)??(s==null||(a=s.default)==null?void 0:a.version)))for(let t of e){var l,u;let e=o==null?void 0:o[t];if(e===void 0)continue;let n=(e==null?void 0:e.version)??(e==null||(l=e.default)==null?void 0:l.version);if(!(n!==void 0&&c(n))&&(!r||typeof(e==null?void 0:e[r])==`function`||typeof(e==null||(u=e.default)==null?void 0:u[r])==`function`)){let n=typeof(e==null?void 0:e[r])==`function`?e:e==null?void 0:e.default,i=n==null?void 0:n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(!r||t.endsWith(`/client`)||!i)return e;let a={};for(let e of[`createRoot`,`hydrateRoot`])a[e]=(...t)=>{i.usingClientEntryPoint=!0;try{return n[e](...t)}finally{i.usingClientEntryPoint=!1}};return{...a,default:a}}}},Q={react:async()=>ze,"react/jsx-runtime":async()=>H,"react-dom":async()=>He,"react-dom/client":async()=>Fe,"@emotion/react":async()=>f,"@emotion/styled":async()=>re,"react-dropzone":async()=>j,"@mui/material":async()=>D,"@iobroker/gui-components":async()=>L,"@mui/x-date-pickers":async()=>P,"@iobroker/json-config":async()=>ke,"@iobroker/dm-gui-components":async()=>te,leaflet:async()=>Ge,"leaflet-geosearch":async()=>_e,"react-ace":async()=>Oe,semver:async()=>Se},$={react:{name:`react`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$.react;return e.lib?e.lib:(e.loading||=(async()=>{try{let{react:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react/jsx-runtime`];if(e.lib)return e.lib;if(e.loading)return e.loading;let t=Z([`default:react/jsx-runtime`,`react/jsx-runtime`],[`default:react`,`react`],`19.3.1`,void 0);return t===void 0?(e.loading=(async()=>{try{let{"react/jsx-runtime":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return t},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dom":{name:`react-dom`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dom`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-dom":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dom/client":{name:`react-dom/client`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dom/client`];if(e.lib)return e.lib;if(e.loading)return e.loading;let t=Z([`default:react-dom/client`,`react-dom/client`,`default:react-dom`,`react-dom`],[`default:react`,`react`],`19.3.1`,`createRoot`);return t===void 0?(e.loading=(async()=>{try{let{"react-dom/client":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading):(e.lib=function(){return t},e.loaded=!0,e.lib)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@emotion/react":{name:`@emotion/react`,version:`11.14.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@emotion/react`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@emotion/react":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@emotion/styled":{name:`@emotion/styled`,version:`11.14.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@emotion/styled`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@emotion/styled":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-dropzone":{name:`react-dropzone`,version:`20.1.4`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-dropzone`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-dropzone":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@mui/material":{name:`@mui/material`,version:`9.5.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@mui/material`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/material":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/gui-components":{name:`@iobroker/gui-components`,version:`10.3.14`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/gui-components`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/gui-components":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@mui/x-date-pickers":{name:`@mui/x-date-pickers`,version:`9.16.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@mui/x-date-pickers`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@mui/x-date-pickers":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/json-config":{name:`@iobroker/json-config`,version:`10.1.8`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/json-config`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/json-config":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"@iobroker/dm-gui-components":{name:`@iobroker/dm-gui-components`,version:`10.0.23`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`@iobroker/dm-gui-components`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"@iobroker/dm-gui-components":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},leaflet:{name:`leaflet`,version:`1.9.4`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!1,get(){let e=$.leaflet;return e.lib?e.lib:(e.loading||=(async()=>{try{let{leaflet:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"leaflet-geosearch":{name:`leaflet-geosearch`,version:`5.1.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`leaflet-geosearch`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"leaflet-geosearch":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},"react-ace":{name:`react-ace`,version:`15.0.0`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$[`react-ace`];return e.lib?e.lib:(e.loading||=(async()=>{try{let{"react-ace":t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}},semver:{name:`semver`,version:`7.8.5`,scope:[`default`],loaded:!1,materialize:!0,eager:!0,from:`iobroker_admin`,canLiveRebind:!0,get(){let e=$.semver;return e.lib?e.lib:(e.loading||=(async()=>{try{let{semver:t}=Q,n=X({...await t()});return n.__esModule!==!0&&Object.defineProperty(n,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return n},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`*`,strictVersion:!1,eager:!0}}},qe=[];export{qe as usedRemotes,$ as usedShared};
|