iobroker.eos-admin 9.0.27 → 9.0.28
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 +9 -12
- package/README.md +17 -227
- package/adminWww/.vite/manifest.json +224 -233
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13887 -13897
- package/adminWww/assets/{AdapterUpdateDialog-L3aqW3ID.js → AdapterUpdateDialog-DBLX7GoO.js} +5 -5
- package/adminWww/assets/{Adapters-Db3kbmAj.js → Adapters-c250DTTU.js} +5 -5
- package/adminWww/assets/AddLink-0L0E-LsA.js +1 -0
- package/adminWww/assets/ColorLens-DA51K29x.js +1 -0
- package/adminWww/assets/ConfigManager-BBUXk8hZ.js +1 -0
- package/adminWww/assets/Enums-CWJJ2zNF.js +92 -0
- package/adminWww/assets/Fields-CNefAzNH.js +1 -0
- package/adminWww/assets/FileCopy-B16lEuur.js +1 -0
- package/adminWww/assets/Files-Bf8oZSk6.js +1 -0
- package/adminWww/assets/{Hosts-DimiJ78g.js → Hosts-8gg41ODb.js} +6 -6
- package/adminWww/assets/Instances-PPTEPJQN.js +4 -0
- package/adminWww/assets/Intro-9c_ynpJu.js +2 -0
- package/adminWww/assets/Lens-9lkeoWGk.js +1 -0
- package/adminWww/assets/LinearScale-Be5h2beh.js +1 -0
- package/adminWww/assets/{Logs-D9dqF5Ag.js → Logs-Brgb9kR_.js} +2 -2
- package/adminWww/assets/North-C2whbHM-.js +1 -0
- package/adminWww/assets/{Objects-oliB7_Se.js → Objects-DHVNfs_x.js} +4 -4
- package/adminWww/assets/Overview-CgnpH8e8.js +3 -0
- package/adminWww/assets/PersonOff-DqBq0Fho.js +1 -0
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +1 -0
- package/adminWww/assets/State-vVobamei.js +1 -0
- package/adminWww/assets/UsedResources-1fEUqiQ6.js +2 -0
- package/adminWww/assets/Users-oRpvFtQR.js +1 -0
- package/adminWww/assets/{bootstrap-BVw0diuj.js → bootstrap-st8VxLDc.js} +25 -25
- package/adminWww/assets/date-fns-C1dqkno9.js +1 -0
- package/adminWww/assets/{hostInit-C_7OBoza.js → hostInit-OQMl4yOT.js} +1 -1
- package/adminWww/assets/icons-material-DeF0gQyK.js +1 -0
- package/adminWww/assets/{index-DwDSxDMx.js → index-D4lV2S7J.js} +2 -2
- package/adminWww/assets/{installSVGRenderer--VTzKbml.js → installSVGRenderer-1WdbDz-H.js} +1 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +1 -0
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +1 -0
- package/adminWww/assets/locale-hLcz_Xh2.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-6f3e4c6b.js → mf-entry-bootstrap-0-3b253ab0.js} +2 -2
- package/adminWww/assets/sentry-DwQQLI7N.js +1 -0
- package/adminWww/assets/startOfWeek-DJph8SIW.js +1 -0
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.28.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/docs/DOKUMENTATION_9.0.27.md +7 -0
- package/docs/README.md +13 -0
- package/docs/UMSORTIERTE_DATEIEN.tsv +153 -0
- package/docs/reports/unified-9.0.14/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.16/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.17/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.28/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.28/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.28/raw/INDEX.json +87 -0
- package/docs/reports/unified-9.0.28/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.28/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.28/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.28/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.28/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.28/raw/node22-tests-final.log +17060 -0
- package/docs/reports/unified-9.0.28/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/node24-tests-final.log +2845 -0
- package/docs/reports/unified-9.0.28/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/npm-audit-runtime.json +77 -0
- package/docs/reports/unified-9.0.28/raw/runtime-mirror-check.log +1 -0
- package/docs/reports/unified-9.0.28/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.28/raw/ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.4/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.5/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.6/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.7/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.8/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.9/PRUEFBERICHT.md +1 -1
- package/{START_HIER_9.0.1.md → docs/start/START_HIER_9.0.1.md} +5 -5
- package/{START_HIER_9.0.10.md → docs/start/START_HIER_9.0.10.md} +1 -1
- package/{START_HIER_9.0.11.md → docs/start/START_HIER_9.0.11.md} +1 -1
- package/{START_HIER_9.0.12.md → docs/start/START_HIER_9.0.12.md} +1 -1
- package/{START_HIER_9.0.13.md → docs/start/START_HIER_9.0.13.md} +2 -2
- package/{START_HIER_9.0.14.md → docs/start/START_HIER_9.0.14.md} +1 -1
- package/{START_HIER_9.0.15.md → docs/start/START_HIER_9.0.15.md} +2 -2
- package/{START_HIER_9.0.16.md → docs/start/START_HIER_9.0.16.md} +1 -1
- package/{START_HIER_9.0.17.md → docs/start/START_HIER_9.0.17.md} +2 -2
- package/{START_HIER_9.0.18.md → docs/start/START_HIER_9.0.18.md} +4 -4
- package/{START_HIER_9.0.19.md → docs/start/START_HIER_9.0.19.md} +2 -2
- package/{START_HIER_9.0.2.md → docs/start/START_HIER_9.0.2.md} +2 -2
- package/{START_HIER_9.0.20.md → docs/start/START_HIER_9.0.20.md} +1 -1
- package/{START_HIER_9.0.21.md → docs/start/START_HIER_9.0.21.md} +1 -1
- package/{START_HIER_9.0.22.md → docs/start/START_HIER_9.0.22.md} +4 -4
- package/{START_HIER_9.0.24.md → docs/start/START_HIER_9.0.24.md} +1 -1
- package/{START_HIER_9.0.25.md → docs/start/START_HIER_9.0.25.md} +1 -1
- package/{START_HIER_9.0.26.md → docs/start/START_HIER_9.0.26.md} +1 -1
- package/{START_HIER_9.0.27.md → docs/start/START_HIER_9.0.27.md} +3 -3
- package/docs/start/START_HIER_9.0.28.md +20 -0
- package/{START_HIER_9.0.3.md → docs/start/START_HIER_9.0.3.md} +3 -3
- package/{START_HIER_9.0.4.md → docs/start/START_HIER_9.0.4.md} +3 -3
- package/{START_HIER_9.0.5.md → docs/start/START_HIER_9.0.5.md} +2 -2
- package/{START_HIER_9.0.6.md → docs/start/START_HIER_9.0.6.md} +3 -3
- package/{START_HIER_9.0.7.md → docs/start/START_HIER_9.0.7.md} +4 -4
- package/{START_HIER_9.0.8.md → docs/start/START_HIER_9.0.8.md} +3 -3
- package/{START_HIER_9.0.9.md → docs/start/START_HIER_9.0.9.md} +1 -1
- package/docs/unified/ARCHITECTURE.md +37 -1
- package/docs/unified/BESTANDSUEBERNAHME_9_0_7.md +1 -1
- package/docs/unified/INSTALL_PUBLISH.md +2 -2
- package/io-package.json +8 -8
- package/package.json +35 -30
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +269 -126
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +89 -6
- package/release-manifests/unified/runtime.cdx.json +26 -26
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +2 -2
- package/ui/io-package.json +5 -1
- package/ui/lib/smarthome-device-detection.js +177 -4
- package/ui/main.js +69 -5
- package/ui/package.json +1 -1
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/smarthome-config-workspace.css +7 -0
- package/ui/www/smarthome-config.html +4 -4
- package/ui/www/smarthome-config.js +178 -163
- package/ui/www/smarthome-device-config.js +131 -6
- package/ui/www/smarthome-setup.js +252 -59
- package/adminWww/assets/AccessTime-CuR73YC3.js +0 -1
- package/adminWww/assets/ConfigManager-D33l1qlC.js +0 -1
- package/adminWww/assets/Enums-HlPEZ4AF.js +0 -92
- package/adminWww/assets/Fields-BWBgNDOp.js +0 -1
- package/adminWww/assets/Files-BYaJp3AG.js +0 -1
- package/adminWww/assets/Instances-C5kAjcqw.js +0 -4
- package/adminWww/assets/Intro-B8keS0Ph.js +0 -2
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +0 -1
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +0 -1
- package/adminWww/assets/Overview-BmjcCFve.js +0 -3
- package/adminWww/assets/Pageview-wzrLQZ-j.js +0 -1
- package/adminWww/assets/PersonOff-YtHcY0sV.js +0 -1
- package/adminWww/assets/Star-D8VNXawT.js +0 -1
- package/adminWww/assets/State-DQz1O54D.js +0 -1
- package/adminWww/assets/UsedResources-DOAuH0-U.js +0 -2
- package/adminWww/assets/Users-Dv1iXiRk.js +0 -1
- package/adminWww/assets/ViewCompact-D7bHgn99.js +0 -1
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +0 -1
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +0 -1
- package/adminWww/assets/date-fns-BtR4dG_j.js +0 -1
- package/adminWww/assets/en-US-BjjaEI6N.js +0 -1
- package/adminWww/assets/icons-material-Apny8Mbp.js +0 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +0 -1
- package/adminWww/assets/locale-DN6Bdkdt.js +0 -1
- package/adminWww/assets/sentry-CPzCHrwe.js +0 -1
- package/adminWww/assets/setYear-DDSuW45e.js +0 -1
- package/adminWww/remoteEntry-eos-9.0.27.js +0 -12
- /package/{START_HIER_9.0.23.md → docs/start/START_HIER_9.0.23.md} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$r as e,Ao as t,As as n,Bo as r,Ci as i,Do as a,Es as o,Gi as s,Ha as c,Hs as l,Ii as u,Jo as d,Ka as f,Ki as p,Ko as m,Lr as h,Mo as g,Po as _,Qs as ee,Ro as v,To as y,Tr as b,Ts as x,Ui as S,Ur as C,Us as w,Vi as T,Vo as te,Vs as E,Wa as D,Wi as O,Wn as ne,Wo as k,Wr as A,Xn as re,Xo as ie,Yi as ae,Zo as oe,_s as se,er as ce,gi as le,go as j,gs as ue,ic as de,jo as M,js as fe,ks as N,lo as P,mo as F,ms as I,oi as pe,os as me,pc as L,po as R,ps as he,qo as z,qs as ge,r as B,sc as _e,tc as ve,ua as ye,uc as be,xo as xe,ya as Se,yo as V}from"./loadShare-eager-dmdYQhAl.js";import{t as Ce}from"./Apps-BZHXIYjq.js";import{t as we}from"./Computer-BBU3Cm9-.js";import{a as Te,i as Ee,n as De,r as Oe,t as ke}from"./Timer-vc3BIs4y.js";import{t as Ae}from"./Extension-DIV5Bi1u.js";import{t as je}from"./InfoOutlined-Bggo2-pX.js";import{t as Me}from"./Schedule-vdojlve9.js";import{t as Ne}from"./Storage-B44xXFFu.js";import{c as Pe,f as Fe,l as Ie,p as Le,s as Re,t as H}from"./AdminUtils-Dc1eHsx5.js";import{st as ze,xt as Be}from"./bootstrap-BVw0diuj.js";import{i as Ve,l as He,n as Ue,r as We,t as Ge}from"./classPrivateFieldGet2-DZ8s9-Td.js";var Ke=168;function qe(e,t){if(e)try{return N(e,t)}catch{return}}var U={root:{display:`flex`,maxWidth:460},link:e=>({display:`flex`,width:`100%`,color:`inherit`,borderRadius:`12px`,"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:`2px`}}),card:e=>({display:`flex`,flexDirection:`column`,gap:`12px`,width:`100%`,p:`16px`,position:`relative`,overflow:`hidden`,backgroundColor:e.palette.mode===`dark`?fe(e.palette.background.paper,.08):n(e.palette.background.paper,.03),border:`1px solid`,borderColor:e.palette.divider,backgroundImage:`none`,transition:`border-color 0.15s, background-color 0.15s`,"@media (prefers-reduced-motion: reduce)":{transition:`none`}}),cardClickable:{cursor:`pointer`,"&:hover .intro-card-launch":{opacity:1}},cardOff:e=>({opacity:.45,borderStyle:`dashed`,borderColor:e.palette.text.disabled}),head:{display:`flex`,alignItems:`flex-start`,gap:`14px`},icon:{width:56,height:56,flex:`0 0 auto`,borderRadius:`14px`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`},iconOffline:{filter:`grayscale(1)`,opacity:.5},img:{width:40,height:40,objectFit:`contain`},headText:{minWidth:0,flex:1,display:`flex`,flexDirection:`column`,gap:`2px`,pr:`20px`},title:{fontSize:`0.98rem`,fontWeight:600,lineHeight:1.25,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:2,overflow:`hidden`,wordBreak:`break-word`},meta:e=>({fontSize:`0.78rem`,lineHeight:1.35,color:e.palette.text.secondary,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}),warning:e=>({fontSize:17,ml:`4px`,verticalAlign:`-3px`,color:e.palette.warning.main}),corner:{position:`absolute`,top:16,right:16,zIndex:2,display:`flex`,alignItems:`center`,gap:`8px`},launch:e=>({fontSize:17,opacity:0,color:e.palette.text.secondary,transition:`opacity 0.15s`,"@media (prefers-reduced-motion: reduce)":{transition:`none`}}),lamp:{width:10,height:10,borderRadius:`50%`,flex:`0 0 auto`},lampOnline:e=>({backgroundColor:e.palette.success.main,boxShadow:`0 0 0 3px ${N(e.palette.success.main,.2)}`}),lampOffline:e=>({backgroundColor:e.palette.error.main,boxShadow:`0 0 0 3px ${N(e.palette.error.main,.2)}`}),lampUnknown:e=>({backgroundColor:e.palette.text.disabled}),content:e=>({flex:1,minHeight:0,overflow:`hidden`,fontSize:`0.82rem`,lineHeight:1.5,color:e.palette.text.secondary}),contentClamped:{display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:3},infoButton:{alignSelf:`flex-start`,ml:`-6px`,fontSize:`0.78rem`,minHeight:0,py:`2px`},editBar:e=>({position:`absolute`,top:8,right:8,zIndex:3,display:`flex`,gap:`2px`,borderRadius:`10px`,p:`2px`,backgroundColor:N(e.palette.background.paper,.85),backdropFilter:`blur(3px)`}),tooltip:{pointerEvents:`none`},infoTitle:{display:`flex`,alignItems:`center`,gap:`8px`,pr:`12px`},infoTitleText:{flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},infoBody:{fontSize:`0.9rem`,lineHeight:1.5}},W=class e extends ve{constructor(e){super(e),this.state={infoOpen:!1}}static getDerivedStateFromProps(e){return e.edit?{infoOpen:!1}:null}renderContent(){return this.props.children}openDialog(){}renderDialogs(){return null}hoverTint(e){let t=qe(e,this.props.theme.palette.mode===`dark`?.12:.07);return t?`linear-gradient(${t}, ${t})`:void 0}cardMinHeight(){return Ke}static swallow(e,t){e.preventDefault(),e.stopPropagation(),t==null||t()}renderEditBar(){return this.props.edit?w(j,{sx:U.editBar,children:[this.props.toggleActivation?l(R,{title:this.props.t(`show/hide item`),slotProps:{popper:{sx:U.tooltip}},children:l(m,{size:`small`,color:this.props.enabled?`primary`:`default`,onClick:t=>e.swallow(t,this.props.toggleActivation),children:l(D,{fontSize:`small`})})}):null,this.props.onEdit?l(R,{title:this.props.t(`Edit`),slotProps:{popper:{sx:U.tooltip}},children:l(m,{size:`small`,onClick:t=>e.swallow(t,this.props.onEdit),children:l(Te,{fontSize:`small`})})}):null,this.props.onRemove?l(R,{title:this.props.t(`Delete`),slotProps:{popper:{sx:U.tooltip}},children:l(m,{size:`small`,color:`error`,onClick:t=>e.swallow(t,this.props.onRemove),children:l(c,{fontSize:`small`})})}):null]}):null}renderInfoDialog(){var e,n;if(!this.props.showInfo||!this.state.infoOpen)return null;let r=(e=(n=this.props).getHostDescriptionAll)==null?void 0:e.call(n),i=()=>this.setState({infoOpen:!1});return w(t,{open:!0,onClose:i,maxWidth:`sm`,fullWidth:!0,onClick:e=>e.stopPropagation(),children:[w(_,{sx:U.infoTitle,children:[l(je,{color:`primary`}),w(j,{sx:U.infoTitleText,children:[this.props.t(`Info`),`: `,this.props.title]}),l(m,{size:`small`,onClick:i,children:l(f,{})})]}),l(g,{dividers:!0,sx:U.infoBody,children:r==null?void 0:r.el}),w(M,{children:[l(V,{color:`grey`,variant:`outlined`,startIcon:l(ce,{}),disabled:!(r!=null&&r.text),onClick:()=>{var e,t;A.copyToClipboard((r==null?void 0:r.text)||``),(e=(t=this.props).openSnackBarFunc)==null||e.call(t)},children:this.props.t(`Copy to clipboard`)}),l(V,{variant:`contained`,color:`primary`,autoFocus:!0,startIcon:l(f,{}),onClick:i,children:this.props.t(`Close`)})]})]})}render(){var t,n,r;let{theme:i}=this.props,a=this.props.color||i.palette.primary.main,o=!this.props.edit&&!!((t=this.props.action)!=null&&t.link)&&!this.props.unreachable,s=H.getText((n=this.props.action)==null?void 0:n.text,this.props.lang),c=``;if((r=this.props.action)!=null&&r.link)try{c=new URL(this.props.action.link,window.location.href).href}catch{c=this.props.action.link}return l(k,{size:{xs:12,sm:6,md:4,lg:3,xl:2},sx:A.getStyle(i,U.root,this.props.style),children:l(oe,{href:o?this.props.action.link:void 0,underline:`none`,target:`_blank`,rel:`noopener noreferrer`,sx:A.getStyle(i,U.link),children:w(xe,{sx:A.getStyle(i,U.card,{minHeight:this.cardMinHeight()},o&&U.cardClickable,o&&{"&:hover":{borderColor:qe(a,.7)||a,backgroundImage:this.hoverTint(a)}},this.props.edit&&!this.props.enabled&&U.cardOff,this.props.unreachable&&U.cardOff),onClick:e=>{e.stopPropagation(),this.openDialog()},children:[w(j,{sx:U.head,children:[l(j,{sx:A.getStyle(i,U.icon,{backgroundColor:this.props.color||qe(i.palette.text.primary,.07)},(this.props.offline||this.props.unreachable)&&U.iconOffline),children:l(j,{component:`img`,src:this.props.image,alt:``,sx:U.img})}),w(j,{sx:U.headText,children:[w(F,{component:`div`,sx:U.title,children:[this.props.title,this.props.warning||this.props.unreachable?l(R,{title:this.props.warning||this.props.t(`Only reachable in the local network`),slotProps:{popper:{sx:U.tooltip}},children:l(pe,{sx:U.warning})}):null]}),s?l(F,{component:`div`,sx:U.meta,title:c||s,children:s}):null]})]}),o||this.props.status?w(j,{sx:U.corner,children:[o?l(ne,{className:`intro-card-launch`,sx:U.launch}):null,this.props.status?l(R,{title:this.props.t(this.props.status===`unknown`?`unknown`:this.props.status),slotProps:{popper:{sx:U.tooltip}},children:l(j,{sx:A.getStyle(i,U.lamp,this.props.status===`online`&&U.lampOnline,this.props.status===`offline`&&U.lampOffline,this.props.status===`unknown`&&U.lampUnknown)})}):null]}):null,l(j,{sx:A.getStyle(i,U.content,typeof this.props.children==`string`&&U.contentClamped),children:this.renderContent()}),this.props.showInfo&&!this.props.offline?l(V,{sx:U.infoButton,size:`small`,color:`inherit`,startIcon:l(je,{fontSize:`small`}),disabled:this.props.disabled,onClick:t=>e.swallow(t,()=>this.setState({infoOpen:!0})),children:this.props.t(`Info`)}):null,this.renderInfoDialog(),this.renderEditBar(),this.renderDialogs()]})})})}};o();var G={rootGrid:{flexGrow:1},closeButton:e=>({position:`absolute`,right:8,top:8,color:e.palette.grey[500]}),paper:{},typography:{paddingRight:30},img:{width:`100%`,height:`100%`,objectFit:`contain`}},Je=class extends ve{constructor(e){super(e),x(this,`cameraUpdateTimer`,void 0),x(this,`cameraRef`,void 0),this.cameraUpdateTimer=null,this.cameraRef=ee()}componentDidMount(){this.props.camera&&this.props.camera!==`text`&&(this.cameraUpdateTimer=setInterval(()=>this.updateCamera(),Math.max(parseInt(this.props.interval||``,10),500)),this.updateCamera())}componentWillUnmount(){this.cameraUpdateTimer&&=(clearInterval(this.cameraUpdateTimer),null)}updateCamera(){if(this.cameraRef.current){if(this.props.camera===`custom`){let e=this.props.cameraUrl;this.props.addTs&&(e.includes(`?`)?e+=`&ts=${Date.now()}`:e+=`?ts=${Date.now()}`),this.cameraRef.current.src=e}else{let e=this.props.camera.split(`.`),t=e.shift(),n=e.shift();this.props.socket.sendTo(`${t}.${n}`,`image`,{name:e.pop(),width:this.cameraRef.current.width}).then(e=>{e&&e.data&&this.cameraRef.current&&(this.cameraRef.current.src=`data:image/jpeg;base64,${e.data}`)})}}}render(){return w(t,{onClose:()=>this.props.onClose(),open:!0,maxWidth:`xl`,fullWidth:!0,fullScreen:!0,sx:{"& .MuiDialog-paper":G.paper},children:[l(_,{children:w(F,{component:`h2`,variant:`h6`,sx:{"&.MuiTypography-root":G.typography},children:[this.props.name,l(m,{size:`large`,sx:G.closeButton,onClick:()=>this.props.onClose(),children:l(f,{})})]})}),l(g,{dividers:!0,children:l(`img`,{style:G.img,src:``,alt:`camera`,ref:this.cameraRef})}),l(M,{children:l(V,{variant:`contained`,autoFocus:!0,onClick:e=>{e.stopPropagation(),this.props.onClose()},color:`primary`,startIcon:l(f,{}),children:this.props.t(`Close`)})})]})}};o();var K={cameraImg:{width:`100%`,height:`100%`,objectFit:`contain`,borderRadius:8},imgContainer:{height:`100%`,width:`100%`},hidden:{display:`none`},imgSkeleton:{transform:`initial`}},Ye=class extends W{constructor(e){super(e),x(this,`cameraRef`,void 0),x(this,`cameraUpdateTimer`,void 0),x(this,`interval`,void 0),Object.assign(this.state,{error:!1,dialog:!1,loaded:!1}),this.cameraRef=ee(),this.cameraUpdateTimer=null,this.interval=e.interval||0}updateCamera(){if(this.cameraRef.current){if(this.props.camera===`custom`){let e=this.props.cameraUrl||``;this.props.addTs&&(e.includes(`?`)?e+=`&ts=${Date.now()}`:e+=`?ts=${Date.now()}`),this.cameraRef.current.src=e}else{let e=(this.props.camera||``).split(`.`),t=e.shift(),n=e.shift();this.props.socket.sendTo(`${t}.${n}`,`image`,{name:e.pop(),width:this.cameraRef.current.width}).then(e=>{e!=null&&e.data&&this.cameraRef.current&&(this.cameraRef.current.src=`data:image/jpeg;base64,${e.data}`)}).catch(e=>window.alert(`Cannot send to instance: ${e}`))}}}componentDidMount(){this.props.camera&&this.props.camera!==`text`&&(this.cameraUpdateTimer=setInterval(()=>this.updateCamera(),Math.max(parseInt(this.props.interval,10),500)),this.updateCamera())}componentWillUnmount(){this.cameraUpdateTimer&&=(clearInterval(this.cameraUpdateTimer),null)}cardMinHeight(){return 260}renderDialogs(){return this.state.dialog?l(Je,{socket:this.props.socket,camera:this.props.camera||``,name:this.props.title,t:this.props.t,onClose:()=>{this.props.camera&&this.props.camera!==`text`&&(this.cameraUpdateTimer&&clearInterval(this.cameraUpdateTimer),this.cameraUpdateTimer=setInterval(()=>this.updateCamera(),Math.max(parseInt(this.props.interval,10),500)),this.updateCamera()),this.setState({dialog:!1})},cameraUrl:this.props.cameraUrl||``}):null}handleImageLoad(){this.state.loaded||this.setState({loaded:!0,error:!1})}handleImageError(){this.state.error||this.setState({loaded:!1,error:!0})}renderContent(){var e;if(this.props.camera===`custom`){let e=this.props.cameraUrl||``;return this.props.addTs&&(e.includes(`?`)?e+=`&ts=${Date.now()}`:e+=`?ts=${Date.now()}`),w(k,{container:!0,style:K.imgContainer,sx:{alignItems:`center`,justifyContent:`center`},children:[l(`img`,{ref:this.cameraRef,src:e,alt:`Camera`,style:this.state.loaded&&!this.state.error?K.cameraImg:K.hidden,onLoad:()=>this.handleImageLoad(),onError:()=>this.handleImageError()}),!this.state.loaded&&!this.state.error&&l(I,{height:`100%`,width:`100%`,animation:`wave`,style:K.imgSkeleton}),this.state.error&&l(le,{fontSize:`large`})]})}return(e=this.props.camera)!=null&&e.startsWith(`cameras.`)?l(`img`,{ref:this.cameraRef,src:``,alt:`camera`,style:K.cameraImg}):null}render(){return this.props.camera&&this.props.camera!==`text`?this.interval!==this.props.interval&&(this.interval=this.props.interval||0,this.cameraUpdateTimer&&clearInterval(this.cameraUpdateTimer),this.cameraUpdateTimer=setInterval(()=>this.updateCamera(),Math.max(parseInt(this.props.interval,10),500))):this.cameraUpdateTimer&&=(clearInterval(this.cameraUpdateTimer),null),super.render()}};o();var q={formControl:{marginTop:32},rootGrid:{flexGrow:1},closeButton:e=>({position:`absolute`,right:8,top:8,color:e.palette.grey[500]}),paper:{},typography:{paddingRight:30},editItem:{marginTop:8},editItemSlider:{marginTop:24},labelSlider:{marginTop:16,fontSize:`1rem`},editColor:{width:`100%`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},image:{height:`100%`,width:`auto`,objectFir:`contain`},uploadDiv:{position:`relative`,width:`100%`,height:100,opacity:.9},uploadDivDragging:{opacity:1},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,position:`relative`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0}},Xe=class e extends ve{constructor(e){super(e),x(this,`originalData`,void 0),this.state={image:``,name:e.t(`New link`),link:`http://`,linkName:``,color:``,desc:``,addTs:!0,interval:5e3,camera:`text`,cameraList:[],...e.link},this.originalData=JSON.stringify(this.getData())}getData(){return{link:this.state.link,name:this.state.name,desc:this.state.desc,linkName:this.state.linkName,color:this.state.color,image:this.state.image,addTs:this.state.addTs,camera:this.state.camera,interval:this.state.interval}}componentDidMount(){this.getCamerasInstances()}getCamerasInstances(){this.props.socket.getAdapterInstances(`cameras`,!0).then(e=>{let t=[],n=[];e.forEach(e=>{let r=e._id.replace(`system.adapter.`,``);e.common&&e.common.enabled&&n.push(this.props.socket.getState(`${e._id}.alive`).then(e=>e&&e.val&&this.props.socket.sendTo(r,`list`,null)).then(e=>e&&e.list&&e.list.forEach(e=>t.push({id:e.id,name:`${e.desc} [${r}/${e.name}]`}))))}),Promise.all(n).then(()=>this.setState({cameraList:t}))})}static getLinkNameFromLink(e){let t=e.trim().match(/^https?:\/\/([^/:]+)(:\d+)?/);return t?t[1]+(t[2]||``):``}render(){return w(t,{onClose:()=>this.props.onClose(),open:!0,maxWidth:`md`,fullWidth:!0,sx:{"& .MuiDialog-paper":q.paper},children:[l(_,{children:w(F,{component:`h2`,variant:`h6`,sx:{"&.MuiTypography-root":q.typography},children:[this.props.isNew?this.props.t(`Add new link: `):this.props.t(`Edit link`),l(m,{size:`large`,sx:q.closeButton,onClick:()=>this.props.onClose(),children:l(f,{})})]})}),l(g,{dividers:!0,children:w(k,{style:q.rootGrid,container:!0,direction:`row`,children:[l(k,{size:{xs:12,sm:6,md:8,lg:9},children:w(k,{container:!0,sx:{flexDirection:`column`},children:[w(r,{variant:`standard`,style:q.formControl,children:[l(d,{id:`select-helper-label`,children:this.props.t(`Link type`)}),w(he,{variant:`standard`,labelId:`select-helper-label`,value:this.state.camera,onChange:e=>this.setState({camera:e.target.value}),children:[l(me,{value:`text`,children:l(`em`,{children:this.props.t(`Description`)})},`desc`),this.state.cameraList.map(e=>l(me,{value:e.id,children:e.name},e.id)),l(me,{value:`custom`,children:this.props.t(`Custom camera URL`)},`custom`)]})]}),l(P,{variant:`standard`,label:this.props.t(`URL`),value:this.state.link,style:q.editItem,onChange:t=>{let n=e.getLinkNameFromLink(this.state.link);n&&(!this.state.linkName||n===this.state.linkName)?this.setState({link:t.target.value,linkName:e.getLinkNameFromLink(t.target.value)}):this.setState({link:t.target.value})},slotProps:{input:{endAdornment:this.state.link?l(z,{position:`end`,children:l(m,{tabIndex:-1,size:`small`,onClick:()=>this.setState({link:``}),children:l(f,{})})}):null}}}),l(P,{variant:`standard`,style:q.editItem,label:this.props.t(`Name`),value:this.state.name||``,onChange:e=>this.setState({name:e.target.value}),slotProps:{input:{endAdornment:this.state.name?l(z,{position:`end`,children:l(m,{tabIndex:-1,size:`small`,onClick:()=>this.setState({name:``}),children:l(f,{})})}):null}}}),this.state.link?l(P,{variant:`standard`,style:q.editItem,label:this.props.t(`Link name`),value:this.state.linkName||``,onChange:e=>this.setState({linkName:e.target.value}),slotProps:{input:{endAdornment:this.state.linkName?l(z,{position:`end`,children:l(m,{tabIndex:-1,size:`small`,onClick:()=>this.setState({linkName:``}),children:l(f,{})})}):null}}}):null,this.state.camera===`custom`||this.state.camera===`text`?l(P,{variant:`standard`,style:q.editItem,label:this.state.camera===`custom`?this.props.t(`Camera URL`):this.props.t(`Description`),value:this.state.desc||``,onChange:e=>this.setState({desc:e.target.value}),slotProps:{input:{endAdornment:this.state.desc?l(z,{position:`end`,children:l(m,{tabIndex:-1,size:`small`,onClick:()=>this.setState({desc:``}),children:l(f,{})})}):null}}}):null,this.state.camera===`custom`?l(te,{style:q.editItem,control:l(y,{checked:this.state.addTs,onChange:e=>this.setState({addTs:e.target.checked})}),label:this.props.t(`Add timestamp to URL`)}):null,this.state.camera===`text`?null:l(F,{style:q.labelSlider,gutterBottom:!0,children:`Polling interval in ms`}),this.state.camera===`text`?null:l(ue,{style:q.editItemSlider,value:this.state.interval,getAriaValueText:()=>`${this.state.interval}ms`,onChange:(e,t)=>this.setState({interval:t}),step:100,min:500,max:6e4,valueLabelDisplay:`on`}),l(`div`,{style:{...q.editItem,width:50},children:l(P,{variant:`standard`,fullWidth:!0,label:this.props.t(`Color`),style:q.editColor,type:`color`,value:this.state.color,onChange:e=>this.setState({color:e.target.value})})}),l(C,{disabled:!1,crop:!0,maxSize:262144,icon:this.state.image,removeIconFunc:()=>this.setState({image:``}),onChange:e=>this.setState({image:e})})]})}),l(k,{size:{xs:12,sm:6,md:4,lg:3},children:this.state.camera===`text`?l(W,{image:this.state.image,title:this.state.name,action:{link:this.state.link,text:this.state.linkName},t:this.props.t,lang:this.props.lang,style:{width:`100% !important`,maxWidth:`100% !important`,marginLeft:`8px`},color:this.state.color,enabled:!0,theme:this.props.theme,children:this.state.desc}):l(Ye,{interval:this.state.interval,camera:this.state.camera,addTs:this.state.addTs,style:{width:`100% !important`,maxWidth:`100% !important`,marginLeft:`8px`},image:this.state.image,title:this.state.name,socket:this.props.socket,action:{link:this.state.link,text:this.state.linkName},t:this.props.t,lang:this.props.lang,color:this.state.color,enabled:!0,cameraUrl:this.state.desc,theme:this.props.theme})})]})}),w(M,{children:[l(V,{variant:`contained`,autoFocus:!0,onClick:()=>this.props.onClose(this.getData()),disabled:!this.props.isNew&&JSON.stringify(this.getData())===this.originalData,color:`primary`,startIcon:this.props.isNew?l(i,{}):l(D,{}),children:this.props.isNew?this.props.t(`Add`):this.props.t(`Save`)}),l(V,{variant:`contained`,onClick:()=>this.props.onClose(),color:`grey`,startIcon:l(f,{}),children:this.props.t(`Close`)})]})]})}},Ze=class extends ge.Component{constructor(e){super(e),this.state={inProgress:!1,success:!1,error:``,finished:!1}}render(){return w(t,{open:!0,maxWidth:`lg`,fullWidth:!0,children:[l(_,{children:b.t(`Node.js upgrade`)}),w(g,{style:{height:100,padding:`0 20px`,overflow:`hidden`},children:[this.state.finished?null:l(F,{children:b.t(`Performing this update will restart the js-controller afterwards!`)}),this.state.inProgress?l(j,{sx:{display:`flex`,justifyContent:`center`},children:l(a,{})}):null,this.state.success?l(F,{children:b.t(`Node.js update successful, restarting controller now!`)}):null,this.state.error?l(F,{sx:{color:`red`},children:b.t(`Node.js update failed: %s`,this.state.error)}):null]}),w(M,{children:[l(V,{disabled:this.state.inProgress||this.state.finished,color:`primary`,variant:`contained`,startIcon:l(ye,{}),onClick:()=>this.updateNodeJsVersion(),children:b.t(`Upgrade`)}),l(V,{disabled:this.state.inProgress,variant:`contained`,onClick:()=>{this.props.onClose()},color:`primary`,startIcon:l(f,{}),children:b.t(`Close`)})]})]})}async updateNodeJsVersion(){this.setState({inProgress:!0});let e=await this.props.socket.upgradeOsPackages(this.props.hostId,[{name:`nodejs`}],!0);this.setState({inProgress:!1,success:e.success,error:e.error||``,finished:!0})}},Qe={ok:`#01bc69`,info:`#48b9ff`,warning:`#ffbd59`,error:`#ff5f72`},$e={ok:`Normal`,info:`Information`,warning:`Begrenzt`,error:`Störung`};function J(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function Y(e,t=``){return(typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):t).replace(/\s+/g,` `).trim()||t}function et(e,t){if(e&&typeof e==`object`)return e;try{return JSON.parse(typeof e==`string`?e:``)}catch{return t}}function X(e,t){var n;return(n=e[t])==null?void 0:n.val}function Z(e){let t=J(e,0),n=t<0?`−`:``,r=Math.abs(t);return r>=1e3?`${n}${(r/1e3).toLocaleString(`de-DE`,{minimumFractionDigits:1,maximumFractionDigits:2})} kW`:`${n}${Math.round(r).toLocaleString(`de-DE`)} W`}function tt(e){let t=J(e,0);if(!t)return`noch kein Regeltick`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));return n<2?`gerade eben`:n<60?`vor ${n} s`:`vor ${Math.round(n/60)} min`}function nt(e){let t=J(e,0);if(!t)return`—`;try{return new Date(t).toLocaleTimeString(`de-DE`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}catch{return`—`}}function Q(e){let t=Y(e).toLowerCase();return t===`error`?`error`:t===`warning`||t===`warn`?`warning`:t===`ok`?`ok`:`info`}function rt(e,t){let n=new Set;for(let t of Object.keys(e||{})){let e=t.match(/^(eos-admin\.\d+)\.info\.adminOverview\./);e!=null&&e[1]&&n.add(e[1])}let r=[];for(let a of n){var i;let n=et(X(e,`${a}.info.adminOverview.summaryJson`),{}),o=et(X(e,`${a}.info.adminOverview.eventsJson`),[]),s=Math.max(J(n.updatedAt,0),J(n.generatedAt,0),J(X(e,`${a}.info.adminOverview.updatedAt`),0),J((i=e[`${a}.info.adminOverview.summaryJson`])==null?void 0:i.ts,0)),c=X(t,`system.adapter.${a}.alive`),l=c==null?null:c===!0||c===1||[`true`,`1`,`online`,`active`].includes(Y(c).toLowerCase());r.push({instance:a,alive:l,summary:{...n,status:Q(n.status||X(e,`${a}.info.adminOverview.status`)),headline:Y(n.headline||X(e,`${a}.info.adminOverview.headline`),`EMS-Diagnose wird aufgebaut`),reason:Y(n.reason||X(e,`${a}.info.adminOverview.reason`),``),binding:Y(n.binding||X(e,`${a}.info.adminOverview.binding`),`none`)},events:Array.isArray(o)?o:[],updatedAt:s})}return r.sort((e,t)=>{let n=e=>e===!0?2:+(e===null);return n(t.alive)-n(e.alive)||t.updatedAt-e.updatedAt||e.instance.localeCompare(t.instance)})}function it(e){let t=[],n=e.charging||{};n.available&&t.push({subsystem:`charging`,severity:J(n.faultCount,0)>0?`error`:J(n.waitingCount,0)>0?`info`:`ok`,title:`${J(n.activeCount,0)} lädt · ${J(n.waitingCount,0)} wartet · ${J(n.faultCount,0)} gestört`,reason:Y(n.limiterText||n.status,`Lademanagement aktiv`),details:`Ist ${Z(n.actualW)} · Soll ${Z(n.targetW)}`});let r=e.storage||{};return r.available&&t.push({subsystem:`storage`,severity:r.writeOk===!1?`error`:`ok`,title:`Speicher ${Y(r.topology,`aktiv`)}${r.socPct==null?``:` · SoC ${Math.round(J(r.socPct,0))} %`}`,reason:Y(r.reason,`Speicherregelung aktiv`),details:`Ist ${Z(r.actualW)} · Soll ${Z(r.targetW)}`}),t}function at({socket:e}){let[t,n]=L(null),[r,i]=L(!0),[a,o]=L(``),[s,c]=L(()=>Date.now()),u=de(async()=>{if(document.visibilityState===`visible`)try{let t=await e.getCurrentInstance();if(!/^eos-admin\.\d+$/.test(t))throw Error(`EOS-Instanz konnte nicht eindeutig ermittelt werden`);let[r,i]=await Promise.all([e.getForeignStates(`${t}.info.adminOverview.*`),e.getForeignStates(`system.adapter.${t}.alive`)]),a=rt(r||{},i||{});n(a[0]||null),o(``)}catch(e){o(Y(e==null?void 0:e.message,`EMS-Diagnose konnte nicht gelesen werden`))}finally{i(!1),c(Date.now())}},[e]);_e(()=>{u();let e=()=>{document.visibilityState===`visible`&&u()};document.addEventListener(`visibilitychange`,e);let t=window.setInterval(()=>void u(),5e3);return()=>{document.removeEventListener(`visibilitychange`,e),window.clearInterval(t)}},[u]);let d=String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),f=d===`admin`||d===`service`||d===`installer`||d===`installateur`,p=(t==null?void 0:t.summary)||{},m=t!=null&&t.updatedAt?Math.max(0,s-t.updatedAt):1/0,h=!!(t&&(t.alive===!1||m>2e4)),g=Q(p.status),_=h?`error`:g,ee=Qe[_],v=p.budget||{},y=p.charging||{},b=p.storage||{},x=p.ems||{},S=p.para14a||{},C=p.tariff||{},T=p.forecast||{},te=p.peakShaving||{},E=Math.max(0,J(v.totalW,0)),D=Math.max(0,J(v.remainingW,0)),O=E>0?Math.max(0,Math.min(100,D/E*100)):0,ne=be(()=>(Array.isArray(p.currentDecisions)?p.currentDecisions:it(p)).slice(0,f?5:2),[p,f]),k=f?((t==null?void 0:t.events)||[]).slice(0,6):[],A=[];return Y(p.binding,`none`)!==`none`&&A.push({label:`Bindend: ${Y(v.bindingText||p.binding)}`,warning:!0}),S.communicationFallbackActive?A.push({label:`§14a-Fallback ${Z(S.fallbackCapW)}`,warning:!0}):S.binding&&A.push({label:`§14a begrenzt`,warning:!0}),te.active&&A.push({label:`Peak-Shaving: ${Y(te.status,`aktiv`)}`,warning:!0}),C.available&&A.push({label:`Tarif: ${Y(C.state,`aktiv`)}${C.priceEurPerKwh==null?``:` · ${J(C.priceEurPerKwh).toFixed(3)} €/kWh`}`}),T.available&&A.push({label:`Prognose: ${Y(T.source,`aktiv`)}${T.fresh===!1?` · veraltet`:``}`,warning:T.fresh===!1}),(x.safetyActive||x.safetyEmergencyStop||x.safetyValid===!1)&&A.push({label:`EOS Safety aktiv`,warning:!0}),!t&&!r?w(`section`,{className:`eos-ems-overview-card`,"data-nexowatt-contract":`nexowatt-ems-overview-v1`,style:{"--eos-ems-status-color":Qe.info},children:[w(`header`,{className:`eos-ems-overview-header`,children:[w(`div`,{children:[l(`span`,{className:`eos-ems-overview-eyebrow`,children:`NexoWatt EMS`}),l(`h2`,{children:`Live-Diagnose`}),l(`p`,{children:a||`Die integrierte EMS-Laufzeit startet oder die Diagnosewerte sind derzeit nicht verfügbar.`})]}),w(`div`,{className:`eos-ems-overview-state`,children:[l(`span`,{className:`eos-ems-overview-state-dot`}),l(`strong`,{children:`Nicht verfügbar`}),l(`small`,{children:`read-only`})]})]}),w(`footer`,{className:`eos-ems-overview-footer`,children:[l(`span`,{children:`Diagnose ist rein lesend.`}),l(`span`,{children:`Keine EMS-Regelung wurde verändert.`})]})]}):w(`section`,{className:`eos-ems-overview-card`,"data-nexowatt-contract":`nexowatt-ems-overview-v1`,style:{"--eos-ems-status-color":ee},children:[w(`header`,{className:`eos-ems-overview-header`,children:[w(`div`,{children:[l(`span`,{className:`eos-ems-overview-eyebrow`,children:`NexoWatt EMS · Live-Diagnose`}),l(`h2`,{children:r?`EMS-Diagnose wird geladen …`:h?`EMS-Diagnose ist nicht aktuell`:Y(p.headline,`EMS arbeitet normal`)}),l(`p`,{children:h?`Adapter oder Diagnosewerte sind älter als 20 Sekunden. Die dargestellten Werte dürfen nicht als aktuelle Regelentscheidung verwendet werden.`:Y(p.reason,`EMS arbeitet innerhalb aller aktiven Grenzen.`)})]}),w(`div`,{className:`eos-ems-overview-state`,children:[l(`span`,{className:`eos-ems-overview-state-dot`}),l(`strong`,{children:h?`Offline / veraltet`:$e[_]}),w(`small`,{children:[(t==null?void 0:t.instance)||`eos-admin`,` · `,tt(t==null?void 0:t.updatedAt)]})]})]}),w(`div`,{className:`eos-ems-overview-metrics`,children:[w(`div`,{className:`eos-ems-overview-metric`,children:[l(`span`,{children:`EMS-Budget`}),l(`strong`,{children:E>0?Z(E):`nicht begrenzt`}),w(`small`,{children:[`Rest `,Z(D)]})]}),w(`div`,{className:`eos-ems-overview-metric`,children:[l(`span`,{children:`Lademanagement`}),w(`strong`,{children:[Z(y.actualW),` / `,Z(y.targetW)]}),w(`small`,{children:[J(y.activeCount),` lädt · `,J(y.waitingCount),` wartet`]})]}),b.available?w(`div`,{className:`eos-ems-overview-metric`,children:[w(`span`,{children:[`Speicher `,Y(b.topology,``)]}),w(`strong`,{children:[Z(b.actualW),` / `,Z(b.targetW)]}),l(`small`,{children:b.socPct==null?Y(b.reason,`aktiv`):`SoC ${Math.round(J(b.socPct))} %`})]}):w(`div`,{className:`eos-ems-overview-metric`,children:[l(`span`,{children:`PV-Budget`}),l(`strong`,{children:Z(v.pvBudgetW)}),w(`small`,{children:[`PV-Rest `,Z(v.remainingPvW)]})]}),w(`div`,{className:`eos-ems-overview-metric`,children:[l(`span`,{children:`Letzter Regeltick`}),l(`strong`,{children:tt(x.lastTickTs||(t==null?void 0:t.updatedAt))}),l(`small`,{children:f?`Zyklus ${J(x.cycleMs)} ms`:Y(x.decision,`EMS aktiv`)})]})]}),E>0?l(`div`,{className:`eos-ems-overview-budget`,title:`${O.toFixed(1)} % Restbudget`,children:l(`span`,{style:{width:`${O}%`}})}):null,A.length?l(`div`,{className:`eos-ems-overview-tags`,children:A.map(e=>l(`span`,{className:e.warning?`is-warning`:``,children:e.label},e.label))}):null,w(`div`,{className:`eos-ems-overview-columns`,children:[w(`div`,{className:`eos-ems-overview-panel`,children:[l(`h3`,{children:`Aktuelle Regelentscheidungen`}),ne.length?ne.map((e,t)=>w(`div`,{className:`eos-ems-overview-decision eos-ems-overview-decision--${Q(e.severity)}`,children:[l(`strong`,{children:Y(e.title,`EMS-Entscheidung`)}),l(`span`,{children:Y(e.reason,`Keine zusätzliche Begrenzung`)}),f&&e.details?l(`small`,{children:e.details}):null]},`${e.subsystem||`ems`}-${t}`)):l(`div`,{className:`eos-ems-overview-empty`,children:`Keine aktiven Regelentscheidungen. EOS arbeitet mit den aktuellen Messwerten.`})]}),w(`div`,{className:`eos-ems-overview-panel`,children:[l(`h3`,{children:f?`Letzte EMS-Ereignisse`:`Systemerklärung`}),f?k.length?k.map((e,t)=>w(`div`,{className:`eos-ems-overview-event eos-ems-overview-event--${Q(e.severity)}`,children:[l(`time`,{children:nt(e.ts)}),w(`div`,{children:[l(`strong`,{children:Y(e.title,`EMS`)}),l(`span`,{children:Y(e.message||e.reason,`Zustand aktualisiert`)})]})]},e.id||`${e.ts}-${t}`)):l(`div`,{className:`eos-ems-overview-empty`,children:`Noch keine Zustandsänderung im begrenzten Ereignispuffer.`}):w(`div`,{className:`eos-ems-overview-decision eos-ems-overview-decision--info`,children:[l(`strong`,{children:Y(p.headline,`EMS aktiv`)}),l(`span`,{children:Y(p.reason,`EOS optimiert die Anlage innerhalb aller Sicherheitsgrenzen.`)})]})]})]}),l(`footer`,{className:`eos-ems-overview-footer`,children:l(`span`,{children:`Diagnose ist rein lesend. Keine Kachel besitzt Schreibhoheit.`})})]})}Ve(),o(),Ue();var $={button:{position:`absolute`,bottom:16,right:16},saveButton:e=>({backgroundColor:e.palette.success.main,right:80,"&:hover":{backgroundColor:e.palette.success.dark}}),addButton:e=>({backgroundColor:e.palette.secondary.main,right:144,"&:hover":{backgroundColor:e.palette.secondary.dark}}),closeButton:e=>({backgroundColor:e.palette.error.main,"&:hover":{backgroundColor:e.palette.error.dark}}),hostOffline:e=>({color:e.palette.error.main,fontWeight:500}),updateExists:{color:`#c28700`,marginRight:4},updateNo:{color:`#00b204`,marginRight:4},nodeUpdate:{opacity:.6},instanceNumber:{opacity:.6,fontWeight:500},hostStats:{display:`grid`,gridTemplateColumns:`auto minmax(0, 1fr)`,columnGap:`10px`,rowGap:`3px`,alignItems:`baseline`},hostStatLabel:e=>({color:e.palette.text.disabled,whiteSpace:`nowrap`}),hostStatValue:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},hostInfoStats:{display:`grid`,gridTemplateColumns:`auto auto minmax(0, 1fr)`,columnGap:`12px`,rowGap:`6px`,alignItems:`center`},hostInfoIcon:e=>({display:`flex`,alignItems:`center`,color:e.palette.text.disabled,fontSize:18,"& svg":{fontSize:18}}),hostInfoValue:{overflowWrap:`anywhere`},diskValue:{display:`flex`,alignItems:`center`,gap:`8px`},diskBar:{flex:`1 1 auto`,minWidth:60,maxWidth:160,height:8,borderRadius:4},diskText:{whiteSpace:`nowrap`},updateIcon:{cursor:`pointer`,fontSize:16},tooltip:{pointerEvents:`none`},cards:{alignContent:`flex-start`,width:`100%`,pt:`12px`,px:`8px`,pb:`64px`}},ot={Uptime:H.formatSeconds,"System uptime":H.formatSeconds,RAM:H.formatRam,Speed:H.formatSpeed,"Disk size":H.formatBytes,"Disk free":H.formatBytes,timeOffset:e=>{let t=Math.abs(e),n=Math.floor(t/60),r=t%60;return`UTC${e>0?`-`:`+`}${n}${r?`:${r.toString().padStart(2,`0`)}`:``}`}};function st(e,t,n){let r=typeof t==`number`?t:new Date().getTimezoneOffset(),i=new Date(e-r*6e4);try{return i.toLocaleString(n===`zh-cn`?`zh-CN`:n,{timeZone:`UTC`})}catch{return i.toUTCString().replace(` GMT`,``)}}function ct(e){return e&&e[0].toUpperCase()+e.substring(1)}function lt(e){let t=e.toLowerCase();return t.includes(`darwin`)||t.includes(`osx`)||t.includes(`mac`)?l(u,{}):t.includes(`win`)?l(ae,{}):t.includes(`bsd`)?l(T,{}):t.includes(`linux`)||t.includes(`docker`)||t.includes(`android`)?l(S,{}):l(we,{})}function ut(t,n){switch(t){case`Platform`:case`os`:return lt(`${n.Platform||``} ${n.os||``}`);case`Architecture`:return l(Ee,{});case`CPUs`:case`Model`:return l(O,{});case`Speed`:return l(De,{});case`RAM`:return l(ze,{});case`System uptime`:return l(Oe,{});case`Uptime`:return l(ke,{});case`Node.js`:return l(s,{});case`NPM`:return l(p,{});case`time`:return l(Me,{});case`timeOffset`:return l(re,{});case`adapters count`:return l(Ae,{});case`Disk size`:case`Disk free`:return l(Ne,{});case`Active instances`:return l(Ce,{});case`location`:return l(Se,{});case`alive`:case`active`:return n[t]?l(Be,{color:`success`}):l(e,{color:`error`});default:return null}}var dt=new WeakMap,ft=new WeakMap,pt=new WeakMap,mt=class e extends ge.Component{constructor(t){super(t),We(this,dt,18e5),We(this,ft,3e5),We(this,pt,6e4),x(this,`introLinksOriginal`,void 0),x(this,`deactivatedOriginal`,void 0),x(this,`remoteAccess`,null),x(this,`t`,void 0),x(this,`getDataTimeout`,void 0),x(this,`updateHostsAlive`,async t=>{let n=JSON.parse(JSON.stringify(this.state.alive)),r=[];if(t.find(e=>e.type===`deleted`))this.getDataDelayed();else if(t.forEach(e=>{!!n[e.id]!=!!e.alive&&(n[e.id]=e.alive,r.push(e.id))}),r.length){let t=JSON.parse(JSON.stringify(this.state.hostsData)),i=new Map(this.state.hostDataTimestampMap),a=Date.now();(await Promise.all(r.map(e=>this.getHostData(e,n[e])))).forEach(n=>{t[n.id]=e.preprocessHostData(n.data),i.set(n.id,a)}),this.setState({alive:n,hostsData:t,hostDataTimestampMap:i},()=>this.checkBackendTime())}}),x(this,`updateHosts`,t=>{let n=[];if(t.find(e=>!e.obj))this.getDataDelayed();else if(n=t.map(e=>e.id),n.length){let t=JSON.parse(JSON.stringify(this.state.hostsData)),r=new Map(this.state.hostDataTimestampMap),i=Date.now();Promise.all(n.map(e=>this.getHostData(e))).then(n=>{n.forEach(n=>{t[n.id]=e.preprocessHostData(n.data),r.set(n.id,i)}),this.setState({hostsData:t,hostDataTimestampMap:r})})}}),x(this,`getDataDelayed`,e=>{this.getDataTimeout&&clearTimeout(this.getDataTimeout),this.getDataTimeout=setTimeout(()=>{this.getDataTimeout=void 0,this.getData(!0).catch(e=>console.error(`Cannot get data: ${e}`))},300)}),this.state={instances:null,deactivated:[],edit:!1,link:null,introLinks:[],editLink:!1,editLinkIndex:-1,openSnackBar:!1,hasUnsavedChanges:!1,reverseProxy:null,alive:{},hostsData:{},hosts:null,hostTimeDiffMap:new Map,hostDataTimestampMap:new Map,nodeUpdateSupported:!1,nodeUpdateDialog:null},this.t=t.t}checkBackendTime(){let e=this.state.hostTimeDiffMap,t=this.state.hostDataTimestampMap,n=Date.now();for(let[r,i]of Object.entries(this.state.hostsData)){let a=Math.abs(i.time-n);e.set(r,a),t.set(r,n)}this.setState({hostTimeDiffMap:e,hostDataTimestampMap:t})}async componentDidMount(){let e=window;e.NEXOWATT_EOS_ADMIN_SOCKET=this.props.socket,e.NEXOWATT_EOS_SOCKET=this.props.socket,window.dispatchEvent(new CustomEvent(`nexowatt-eos-admin-socket-ready`));let t=[],n=!1;try{var r;let[e,i]=await Promise.all([this.props.socket.getObject(`system.adapter.${this.props.adminInstance}`),this.props.socket.checkFeatureSupported(`CONTROLLER_OS_PACKAGE_UPGRADE`)]);t=(e==null||(r=e.native)==null?void 0:r.reverseProxy)||[],n=i}catch(e){if(String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase()===`admin`)throw e}await new Promise(e=>this.setState({reverseProxy:t,nodeUpdateSupported:n},()=>e())),await this.getData(),this.props.instancesWorker.registerHandler(this.getDataDelayed),this.props.hostsWorker.registerHandler(this.updateHosts),this.props.hostsWorker.registerAliveHandler(this.updateHostsAlive),this.checkBackendTime()}componentWillUnmount(){this.getDataTimeout&&=(clearTimeout(this.getDataTimeout),void 0),this.props.instancesWorker.unregisterHandler(this.getDataDelayed),this.props.hostsWorker.unregisterHandler(this.updateHosts),this.props.hostsWorker.unregisterAliveHandler(this.updateHostsAlive)}async activateEditMode(){var e;let t=await this.props.socket.getSystemConfig(!0),n=await this.getInstances(!0,null,t),r=t!=null&&(e=t.native)!=null&&e.introLinks?t.native.introLinks:[];this.introLinksOriginal=JSON.stringify(r),this.deactivatedOriginal=JSON.parse(JSON.stringify(n.deactivated)),this.setState({instances:n.instances,deactivated:n.deactivated,edit:!0,introLinks:r,hasUnsavedChanges:!1})}deactivateEditMode(){this.state.hasUnsavedChanges,this.setState({deactivated:this.deactivatedOriginal||null,introLinks:JSON.parse(this.introLinksOriginal||`[]`),hasUnsavedChanges:!1,edit:!1},()=>{this.deactivatedOriginal=void 0,this.introLinksOriginal=void 0})}toggleCard(e,t){if(!this.state.instances||!this.state.instances.length)return;let n=JSON.parse(JSON.stringify(this.state.deactivated)),r=n.indexOf(`${e}_${t}`);r===-1?(n.push(`${e}_${t}`),n.sort()):n.splice(r,1);let i=JSON.stringify(n)!==JSON.stringify(this.deactivatedOriginal)||JSON.stringify(this.state.introLinks)!==this.introLinksOriginal;this.setState({deactivated:n,hasUnsavedChanges:i})}getInstancesCards(){return(this.state.instances||[]).map(e=>{var t;let n=`${e.id}_${e.linkName}`,r=String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase(),i=r===`admin`||r===`service`;if(!i&&/^(?:admin|xterm)(?:\.|$)/i.test(e.id))return null;let a=i&&/^(?:admin|xterm)(?:\.|$)/i.test(e.id)||!((t=this.state.deactivated)!=null&&t.includes(n));if(a||this.state.edit){let t=``;if(e.link)try{t=new URL(e.link,window.location.href).host}catch{t=e.link.replace(/^https?:\/\//,``).split(`/`)[0]}if(e.id===this.props.adminInstance)return null;let n=window.isFinite(e.id.split(`.`).pop());if(n){var o;n=!!((o=this.state.instances)!=null&&o.find(t=>t.id!==e.id&&e.name===t.name&&e.id.split(`.`)[0]===t.id.split(`.`)[0]))}let r=this.state.hostsData?this.state.hostsData[e.id]:null,i;e.info&&(i=r&&typeof r==`object`?r.alive===!1?`offline`:`online`:`unknown`);let s=this.state.hostTimeDiffMap.get(e.id)??0,c=this.state.hostDataTimestampMap.get(e.id)??0,u=Date.now()-c<Ge(ft,this);return l(W,{image:e.image||``,title:w(E,{children:[e.name,n?w(`span`,{style:$.instanceNumber,children:[`.`,e.id.split(`.`).pop()]}):null]}),action:{link:e.link||``,text:t},t:this.props.t,lang:this.props.lang,color:e.color||``,showInfo:!!e.info,status:i,edit:this.state.edit,offline:!!r&&r.alive===!1,warning:s>Ge(dt,this)&&u?this.t(`Backend time differs by %s minutes`,Math.round(s/Ge(pt,this)).toString()):void 0,enabled:a,unreachable:!!e.unreachable,disabled:!r||typeof r!=`object`,getHostDescriptionAll:()=>this.getHostDescriptionAll(e.id),toggleActivation:()=>this.toggleCard(e.id,e.linkName||``),openSnackBarFunc:()=>this.setState({openSnackBar:!0}),theme:this.props.theme,children:e.description||this.getHostDescription(e.id)},`${e.id}_${e.link}`)}return null})}toggleLinkCard(e){let t=JSON.parse(JSON.stringify(this.state.introLinks));t[e].enabled=!t[e].enabled;let n=JSON.stringify(this.state.deactivated)!==JSON.stringify(this.deactivatedOriginal)||JSON.stringify(t)!==this.introLinksOriginal;this.setState({introLinks:t,hasUnsavedChanges:n})}getLinkCards(){return(this.state.introLinks||[]).map((e,t)=>!e.enabled&&!this.state.edit?null:e.camera===`custom`?l(Ye,{image:e.image,title:e.name,action:{link:e.link,text:e.linkName},t:this.props.t,socket:this.props.socket,color:e.color,edit:this.state.edit,interval:e.interval,camera:e.camera,addTs:e.addTs,onEdit:()=>{var e;return this.setState({editLink:!0,editLinkIndex:t,link:JSON.parse(JSON.stringify((e=this.state.introLinks)==null?void 0:e[t]))})},onRemove:()=>{let e=JSON.parse(JSON.stringify(this.state.introLinks));e.splice(t,1);let n=JSON.stringify(this.state.deactivated)!==JSON.stringify(this.deactivatedOriginal)||JSON.stringify(e)!==this.introLinksOriginal;this.setState({introLinks:e,hasUnsavedChanges:n})},enabled:e.enabled,lang:this.props.lang,toggleActivation:()=>this.toggleLinkCard(t),cameraUrl:e.desc,theme:this.props.theme},`link${t}`):l(W,{image:e.image,title:e.name,action:{link:e.link,text:e.linkName},t:this.props.t,color:e.color,edit:this.state.edit,onEdit:()=>{var e;return this.setState({editLink:!0,editLinkIndex:t,link:JSON.parse(JSON.stringify((e=this.state.introLinks)==null?void 0:e[t]))})},onRemove:()=>{let e=JSON.parse(JSON.stringify(this.state.introLinks));e.splice(t,1);let n=JSON.stringify(this.state.deactivated)!==JSON.stringify(this.deactivatedOriginal)||JSON.stringify(e)!==this.introLinksOriginal;this.setState({introLinks:e,hasUnsavedChanges:n})},enabled:e.enabled,lang:this.props.lang,toggleActivation:()=>this.toggleLinkCard(t),theme:this.props.theme,children:e.desc||``},`link${t}`))}editLinkCard(){return this.state.editLink?l(Xe,{link:this.state.link,socket:this.props.socket,isNew:this.state.editLinkIndex===-1,t:this.props.t,lang:this.props.lang,theme:this.props.theme,onClose:e=>{if(e){let t=JSON.parse(JSON.stringify(this.state.introLinks));this.state.editLinkIndex===-1?(e.enabled=!0,t.push(e)):(e.enabled=t[this.state.editLinkIndex].enabled,t[this.state.editLinkIndex]=e);let n=JSON.stringify(this.state.deactivated)!==JSON.stringify(this.deactivatedOriginal)||JSON.stringify(t)!==this.introLinksOriginal;this.setState({introLinks:t,editLink:!1,hasUnsavedChanges:n,link:null})}else this.setState({editLink:!1})}}):null}getButtons(){let e=[];return this.state.edit?(e.push(l(v,{color:`primary`,size:`small`,sx:A.getStyle(this.props.theme,$.button,$.addButton),onClick:()=>this.setState({editLink:!0,editLinkIndex:-1,link:{}}),children:l(i,{})},`add`)),e.push(l(v,{size:`small`,color:`primary`,disabled:!this.state.hasUnsavedChanges,sx:A.getStyle(this.props.theme,$.button,$.saveButton),onClick:()=>this.saveCards(),children:l(D,{})},`save`)),e.push(l(v,{size:`small`,color:`primary`,sx:A.getStyle(this.props.theme,$.button,$.closeButton),onClick:()=>this.deactivateEditMode(),children:l(f,{})},`close`))):e.push(l(v,{color:`primary`,size:`small`,style:$.button,onClick:()=>this.activateEditMode(),children:l(Te,{})},`edit`)),e}async saveCards(){let e=await this.props.socket.getSystemConfig(!0),t=!1;JSON.stringify(e.common.intro)!==JSON.stringify(this.state.deactivated)&&(e.common.intro=this.state.deactivated||void 0,t=!0),!t&&JSON.stringify(e.native.introLinks)!==JSON.stringify(this.state.introLinks)&&(t=!0,e.native.introLinks=this.state.introLinks),t?this.props.socket.setSystemConfig(e).then(()=>this.props.showAlert(`Updated`,`success`)).catch(e=>{console.log(e),this.props.showAlert(e,`error`)}).then(()=>this.setState({edit:!1})):this.setState({edit:!1})}async getHostData(e,t){let n;if(t!==void 0)n={val:t};else try{n=await this.props.socket.getState(`${e}.alive`)}catch(t){console.error(`Cannot get state ${e}.alive: ${t}`),n={val:!1}}let r={alive:!1};if(n!=null&&n.val)try{r=await this.props.socket.getHostInfo(e,!1,1e4),r&&typeof r==`object`&&r.alive!==!1&&(r.alive=!0)}catch(t){console.error(`Cannot get host info for ${e}: ${t}`),r={alive:!1}}else r={alive:!1};let i=await this.props.socket.getForeignStates(`${e}.versions.*`);return Object.keys(i).forEach(e=>r[`_${e.split(`.`).pop()}`]=i[e].val),{id:e,data:r}}async getHostsData(t){let n=t.map(e=>this.getHostData(e._id)),r=await Promise.all(n),i={},a={},o=new Map(this.state.hostDataTimestampMap),s=Date.now();return r.forEach(t=>{i[t.id]=e.preprocessHostData(t.data),a[t.id]=!!t.data.alive,o.set(t.id,s)}),this.setState({hostDataTimestampMap:o}),{hostsData:i,alive:a}}addLinks(e,t,n,r,i,a){let o={id:e.id,name:e.name,description:e.description,color:e.color,image:e.icon,info:``},s=Fe(e.link,t.name,n,{instances:r,hostname:this.props.hostname,adminInstance:this.props.adminInstance,hosts:i}),c=this.state.reverseProxy,l=null;if(c!=null&&c.length){let e=window.location.pathname;l=c.find(t=>{if(!t.globalPath)return!1;let n=t.globalPath.endsWith(`/`)?t.globalPath:`${t.globalPath}/`;return e===n||e.startsWith(n)})||null}if(s.length>1&&(s.sort((e,t)=>(e.instance||``).localeCompare(t.instance||``,void 0,{numeric:!0})),s.splice(1)),s.length){if(o.link=s[0].url,o.port=s[0].port,this.remoteAccess){let e=Re(o.link,o.port,this.remoteAccess);e===null?o.unreachable=!0:o.link=e}else o.link=Pe(o.link,o.id,r,l)||o.link;let i=He(e.link,t.name,n,this.props.adminInstance,window.location.href);i&&(o.link=i,o.port=void 0,o.unreachable=!1);let c=a.find(e=>e.link===o.link);c?Le(o.link,t.name,c.id.split(`.`)[0])?a[a.indexOf(c)]=o:console.log(`Double links: "${o.id}" and "${c.id}"`):a.push(o)}}static getText(e,t){return e?typeof e==`object`?e[t]||e.en||``:e||``:``}static normalizeLinks(t,n,r){if(!t.common.localLinks&&!t.common.localLink&&!t.common.welcomeScreen&&!t.common.welcomeScreenPro)return null;let i={id:t._id.replace(`system.adapter.`,``),link:``,name:e.getText(t.common.titleLang||t.common.title||t.common.name,n),order:t.common.order||1e3,intro:!0,description:e.getText(t.common.desc,n),icon:t.common.icon?`adapter/${t.common.name}/${t.common.icon}`:`img/no-image.svg`},a=[];if(t.common.localLink){if(typeof t.common.localLink==`string`)a.push({...i,link:t.common.localLink});else{let e=t.common.localLink;if(e.link){let t={...i,link:e.link};e.color&&(t.color=e.color),e.order!==void 0&&typeof e.order==`number`&&(t.order=e.order),e.icon&&e.img&&(t.icon=e.icon||e.img),a.push(t)}else console.warn(`Unknown localLink structure: ${JSON.stringify(t.common.localLink)}`)}}let o=t.common.localLinks;if(o&&typeof o==`object`&&Object.keys(o).forEach(r=>{let s=o[r];if(typeof s==`string`)a.push({...i,link:s});else{let o=s;if(o.link){let s={...i,id:t._id.replace(`system.adapter.`,``)+(r===`_default`?``:` ${r}`),link:o.link,name:i.name+(r===`_default`?``:` ${r}`)};o.color&&(s.color=o.color),o.order!==void 0&&(s.order=parseInt(o.order,10)||1e3),o.icon&&o.img&&(s.icon=o.icon||o.img),o.description&&(s.description=e.getText(o.description,n)),o.pro!==void 0&&(s.pro=typeof o.pro==`string`?o.pro:`${t.common.name}/index.html`),o.cloud!==void 0&&(s.cloud=o.cloud),o.intro!==void 0&&(s.intro=o.intro===!0),o.name&&(s.name=e.getText(o.name,n)),r===`_default`&&(s.default=!0),a.push(s)}else console.warn(`Unknown localLinks structure: ${JSON.stringify(s)}`)}}),t.common.welcomeScreen&&typeof t.common.welcomeScreen==`object`&&((Array.isArray(t.common.welcomeScreen)?t.common.welcomeScreen:[t.common.welcomeScreen]).forEach(r=>{if(r.link){let s={...i,id:`${t._id.replace(`system.adapter.`,``)} cloud`,link:`%web_protocol%://%web_bind%:%web_port%/${r.link}`,cloud:r.link};if(r.color&&(s.color=r.color),r.order!==void 0&&typeof r.order==`number`&&(s.order=r.order),r.icon&&r.img&&(s.icon=r.icon||r.img),r.localLinks){var o;let e=(o=t.common.localLinks)==null?void 0:o[r.localLinks];e&&typeof e==`string`?s.link=e:e&&typeof e==`object`&&e.link&&(s.link=e.link)}r.name&&(s.name=e.getText(r.name,n)),a.push(s)}}),t.common.welcomeScreenPro&&typeof t.common.welcomeScreenPro==`object`&&(Array.isArray(t.common.welcomeScreenPro)?t.common.welcomeScreenPro:[t.common.welcomeScreenPro]).forEach(r=>{if(r.link){let s={...i,id:`${t._id.replace(`system.adapter.`,``)} pro`,link:`%web_protocol%://%web_bind%:%web_port%/${r.link}`,pro:r.link};if(r.color&&(s.color=r.color),r.order!==void 0&&typeof r.order==`number`&&(s.order=r.order),r.icon&&r.img&&(s.icon=r.icon||r.img),r.localLinks){var o;let e=(o=t.common.localLinks)==null?void 0:o[r.localLinks];e&&typeof e==`string`?s.link=e:e&&typeof e==`object`&&e.link&&(s.link=e.link)}r.name&&(s.name=e.getText(r.name,n)),a.push(s)}})),a.forEach(e=>{e.icon.startsWith(`adapter/`)||e.icon.startsWith(`data:image/`)||e.icon.startsWith(`http://`)||e.icon.startsWith(`https://`)||e.icon===`img/no-image.svg`||(e.icon=`adapter/${t.common.name}/${e.icon}`)}),r){let e={};a.forEach(t=>{e[t.link]?(t.color&&(e[t.link].color=t.color),t.icon&&(e[t.link].icon=t.icon),t.cloud&&(e[t.link].cloud=t.cloud),t.pro&&(e[t.link].pro=t.pro),t.intro!==void 0&&(e[t.link].intro=t.intro),t.name&&typeof t.name==`object`&&(e[t.link].name=t.name),t.order!==void 0&&(e[t.link].order=t.order),t.default&&(e[t.link].default=t.default)):e[t.link]=t}),a=Object.values(e)}return a.sort((e,t)=>e.default===void 0&&t.default===void 0?e.order===void 0&&t.order===void 0?0:e.order===void 0?-1:t.order===void 0?1:e.order-t.order:e.default===void 0?-1:t.default===void 0?1:e.order===void 0&&t.order===void 0?0:e.order===void 0?-1:t.order===void 0?1:e.order-t.order),a}async getInstances(t,n,r){n=n||this.state.hosts||[];let i={};n.forEach(e=>i[e._id]=e);try{let a=await this.props.socket.getAdapterInstances(``,t),o=r.common.intro||[];Array.isArray(o)||(o=Object.keys(o),o.sort());let s=[],c={};a.forEach(e=>c[e._id]=e),this.remoteAccess=Ie(c,window.location),a.forEach(t=>{if(!t)return;let n=t.common||null,r=t._id.split(`.`),a=parseInt(r.pop()||``,10),o;if(n!=null&&n.name&&typeof n.name==`object`){let e=n==null?void 0:n.name;o=e[this.props.lang]||e.en}else o=(n==null?void 0:n.name)||``;if((o!==`admin`||n.localLink!==(this.props.hostname||``))&&o!==`web`&&!(o&&o!==`vis-web-admin`&&o.match(/^vis-/)&&o!==`vis-2`)&&!(o!=null&&o.match(/^icons-/))&&n&&(n.enabled||n.onlyWWW)){let r=e.normalizeLinks(t,this.props.lang,!0);r&&r.forEach(e=>this.addLinks(e,n,a,c,i,s))}}),s.forEach(e=>{e.link&&(e.linkName=e.link.replace(`https://`,``).replace(`http://`,``).replace(/^[^_]+:/,``))}),s.sort((e,t)=>{if(e.order!==void 0||t.order!==void 0){if(e.order=e.order===void 0?1e3:e.order,t.order=t.order===void 0?1e3:t.order,e.order<t.order)return-1;if(e.order>t.order)return 1}return e.id>t.id?1:e.id<t.id?-1:0}),n==null||n.forEach(e=>{let t=e==null?void 0:e.common,n=t==null?void 0:t.name;if(typeof n==`object`&&(n&&=n[this.props.lang]||n.en),t){let r={id:e._id,name:n||``,color:``,image:t.icon||`img/no-image.svg`,info:this.t(`Info`),linkName:``};s.push(r)}});let l=[];return o.forEach(e=>{s.find(t=>e===`${t.id}_${t.linkName}`)&&l.push(e)}),o=l,{instances:s,deactivated:o}}catch(e){return console.log(e),{instances:[],deactivated:[]}}}getHostDescription(e){let t=this.state.hostsData?this.state.hostsData[e]:null;if(t&&t.alive===!1)return l(j,{sx:$.hostOffline,children:this.props.t(`Offline`)});let n=``,r=``;if(t){try{t._nodeNewest&&t[`Node.js`]&&B.gt(t._nodeNewest,t[`Node.js`].replace(/^v/,``))&&(n=t._nodeNewest)}catch{}try{t._nodeNewest!==t._nodeNewestNext&&t._nodeNewestNext&&t[`Node.js`]&&t._nodeNewest&&B.gt(t._nodeNewestNext,t[`Node.js`].replace(/^v/,``))&&B.gt(t._nodeNewestNext,t._nodeNewest)&&(n+=(n?` / `:``)+t._nodeNewestNext)}catch{}if(n){let r=this.state.nodeUpdateSupported&&t.Platform===`linux`;n=l(R,{title:this.props.t(`Some updates available`),slotProps:{popper:{sx:$.tooltip}},children:w(`span`,{style:{...$.nodeUpdate,display:`inline-flex`},children:[`(`,n,`)`,r?l(ye,{style:$.updateIcon,onClick:()=>this.setState({nodeUpdateDialog:{hostId:e,version:t._nodeNewestNext}})}):null]})})}try{t._npmNewest&&t.NPM&&B.gt(t._npmNewest,t.NPM)&&(r=t._npmNewest)}catch{}try{t._npmNewest!==t._npmNewestNext&&t._npmNewestNext&&t.NPM&&t._npmNewest&&B.gt(t._npmNewestNext,t.NPM)&&B.gt(t._npmNewestNext,t._npmNewest)&&(r+=(r?` / `:``)+t._npmNewestNext)}catch{}r&&=l(R,{title:this.props.t(`Some updates available`),slotProps:{popper:{sx:$.tooltip}},children:w(`span`,{style:$.nodeUpdate,children:[`(`,r,`)`]})})}return t&&typeof t==`object`?w(j,{sx:$.hostStats,children:[l(j,{sx:$.hostStatLabel,children:this.t(`Platform`)}),l(j,{sx:$.hostStatValue,title:t.Platform||``,children:t.Platform||`--`}),l(j,{sx:$.hostStatLabel,children:this.t(`RAM`)}),l(j,{sx:$.hostStatValue,children:ot.RAM(t.RAM)}),l(j,{sx:$.hostStatLabel,children:this.t(`Node.js`)}),w(j,{sx:$.hostStatValue,children:[l(`span`,{style:n?$.updateExists:$.updateNo,children:t[`Node.js`]||`--`}),n]}),l(j,{sx:$.hostStatLabel,children:this.t(`NPM`)}),w(j,{sx:$.hostStatValue,children:[l(`span`,{style:r?$.updateExists:$.updateNo,children:t.NPM||`--`}),r]})]}):w(j,{sx:$.hostStats,children:[l(I,{width:60}),l(I,{}),l(I,{width:60}),l(I,{}),l(I,{width:60}),l(I,{}),l(I,{width:60}),l(I,{})]})}renderDiskRow(e){let t=e[`Disk size`],n=e[`Disk free`],r=t>0?Math.max(0,Math.min(100,n/t*100)):0,i=`${H.formatBytes(n)} / ${H.formatBytes(t)}`,a=r<10?`error`:r<25?`warning`:`success`;return{name:`Disk free`,text:i,value:w(j,{sx:$.diskValue,children:[l(R,{title:`${Math.round(r)}% ${this.t(`Free`)}`,slotProps:{popper:{sx:$.tooltip}},children:l(ie,{variant:`determinate`,value:r,color:a,sx:$.diskBar})}),l(j,{component:`span`,sx:$.diskText,children:i})]})}}renderHostInfoRow(e,t){let n=t[e];return e===`time`?{name:e,text:st(n,t.timeOffset,this.props.lang)}:typeof n==`boolean`?{name:e,text:n?this.t(`Yes`):this.t(`No`)}:ot[e]?{name:e,text:ot[e](n,this.t)||`--`}:typeof n==`object`?{name:e,text:JSON.stringify(n)}:{name:e,text:n.toString()||`--`}}getHostDescriptionAll(e){let t=this.state.hostsData&&typeof this.state.hostsData[e]==`object`?this.state.hostsData[e]:null,n=[];if(t){for(let e of Object.keys(t))if(!(e.startsWith(`_`)||t[e]===null||t[e]===void 0)){if(e===`Disk size`&&typeof t[`Disk free`]==`number`)n.push(this.renderDiskRow(t));else if(e===`Disk free`&&typeof t[`Disk size`]==`number`)continue;else n.push(this.renderHostInfoRow(e,t))}}return{el:l(j,{sx:$.hostInfoStats,children:n.map(e=>w(ge.Fragment,{children:[l(j,{sx:$.hostInfoIcon,children:ut(e.name,t||{})}),l(j,{sx:$.hostStatLabel,children:ct(this.t(e.name))}),l(j,{sx:$.hostInfoValue,children:e.value??e.text})]},e.name))}),text:n.map(e=>`${ct(this.t(e.name))}: ${e.text}`).join(`
|
|
2
|
-
`)}}async getData(e){try{let t=await this.props.socket.getSystemConfig(e),n=await this.props.socket.getCompactHosts(e),r=await this.getInstances(e,n,t);this.setState({instances:r.instances,hosts:n,deactivated:r.deactivated,introLinks:t&&t.native&&t.native.introLinks?t.native.introLinks:[]});let i=await this.getHostsData(n);await new Promise(e=>{this.setState(i,()=>e())})}catch(t){if(String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase()!==`admin`){try{let t=await this.getInstances(e,[],{common:{intro:[]},native:{introLinks:[]}});this.setState({instances:t.instances,hosts:[],deactivated:t.deactivated,introLinks:[],hostsData:{},alive:{}})}catch{this.setState({instances:[],hosts:[],deactivated:[],introLinks:[],hostsData:{},alive:{}})}return}window.alert(`Cannot get data: ${t}`)}}renderCopiedToast(){return l(se,{anchorOrigin:{vertical:`bottom`,horizontal:`left`},open:this.state.openSnackBar,autoHideDuration:3e3,onClose:()=>this.setState({openSnackBar:!1}),message:this.t(`copied`)})}getOverviewRoleConfig(){let e=String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase();return e===`installer`||e===`installateur`?{role:`installer`,label:`Installateur`,text:`Inbetriebnahme, Fehlersuche, Geräte- und EMS-Diagnose – mit deinen freigegebenen Installateurrechten.`,admin:!1}:e!==`admin`&&e!==`service`?{role:`enduser`,label:`Endkunde`,text:`Energie, Laden, Gebäude und die aktuellen EMS-Entscheidungen auf einen Blick.`,admin:!1}:{role:`admin`,label:`Admin / Service`,text:`Systemstatus, Module, Dienste und Anlagenzugänge in einer modernen Serviceübersicht.`,admin:!0}}render(){return this.state.instances?w(h,{elevation:0,overflow:`visible`,children:[this.renderCopiedToast(),w(`section`,{id:`eos-native-overview-hero`,className:`eos-overview-hero eos-native-overview-hero`,"data-eos-native-react-overview":`true`,children:[w(`div`,{children:[l(`span`,{className:`eos-overview-eyebrow`,children:`NexoWatt EOS`}),l(`h1`,{children:`Übersicht`}),l(`p`,{children:this.getOverviewRoleConfig().text})]}),w(`div`,{className:`eos-overview-role`,"data-nexowatt-overview-role":this.getOverviewRoleConfig().role,children:[l(`span`,{className:`eos-overview-status-dot`}),this.getOverviewRoleConfig().label]})]}),this.state.nodeUpdateDialog?l(Ze,{onClose:()=>this.setState({nodeUpdateDialog:null}),socket:this.props.socket,...this.state.nodeUpdateDialog}):null,w(k,{container:!0,className:`eos-native-intro-grid`,spacing:2,sx:$.cards,children:[this.getInstancesCards(),this.getLinkCards(),l(at,{socket:this.props.socket,t:this.props.t,lang:this.props.lang,theme:this.props.theme}),this.getOverviewRoleConfig().admin?l(`div`,{className:`eos-overview-edit-controls`,children:this.getButtons()}):null]}),this.getOverviewRoleConfig().admin?this.editLinkCard():null]}):l(ie,{})}static preprocessHostData(e){var t;if((t=e.dockerInformation)!=null&&t.isDocker){let t=e.dockerInformation.isOfficial?`official image`:`unofficial image`;e.dockerInformation.isOfficial&&(t+=` - ${e.dockerInformation.officialVersion}`),e.Platform=`${e.Platform} (${t})`}return delete e.dockerInformation,e}};export{mt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.js";var n=e(t(`path`,{d:`M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z`}),`FileCopy`),r=e(t(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`);export{n,r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.js";var n=e(t(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z`}),`AddBox`),r=e(t(`path`,{d:`M8 11h8v2H8zm12.1 1H22c0-2.76-2.24-5-5-5h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M19 12h-2v3h-3v2h3v3h2v-3h3v-2h-3z`}),`AddLink`),i=e(t(`path`,{d:`M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z`}),`Fullscreen`),a=e(t(`path`,{d:`M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z`}),`FullscreenExit`),o=e(t(`path`,{d:`M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z`}),`GetApp`),s=e(t(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),c=e(t(`path`,{d:`M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreHoriz`);export{i as a,a as i,s as n,r as o,o as r,n as s,c as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Do as e,Ds as t,Eo as n,Es as r,Fr as i,Hs as a,Ir as o,Ko as s,Pr as c,Ts as l,Us as u,Vs as d,Xo as f,_o as p,br as m,go as h,mo as g,po as _,qs as v,tc as y,xo as b,yo as x}from"./loadShare-eager-dmdYQhAl.js";import{t as ee}from"./Extension-DIV5Bi1u.js";import{n as S,t as C}from"./Timeline-BtOuO808.js";import{t as w}from"./Storage-B44xXFFu.js";import{n as T,t as E}from"./UnfoldMore-DOHSVdRn.js";import{t as D}from"./AdminUtils-Dc1eHsx5.js";import{st as te}from"./bootstrap-BVw0diuj.js";import{$ as O,$t as k,A as ne,C as re,D as A,Dt as j,Jt as ie,L as ae,M as oe,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 he,Y as ge,Yt as _e,Zt as M,_n as N,ct as ve,dn as ye,en as P,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--VTzKbml.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){N(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)&&k(t,function(e,r){z(e)&&(e={type:e}),t[r]=ye(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=he(),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;k(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;k(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;k(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:A.size.m,align:`auto`,backgroundColor:A.color.transparent,borderColor:A.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:A.color.disabled,inactiveBorderColor:A.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:A.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:A.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:A.color.tertiary,borderWidth:1,borderColor:A.color.border},emphasis:{selectorLabel:{show:!0,color:A.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(le),U=M,W=k,G=j,K=function(e){N(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=ne(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=oe(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=oe(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=he(),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
|
-
`)){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=P(P({},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}),O(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 ee=a===`left`?f+5:-5,S=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:ee,y:p/2,fill:T,align:S,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),O(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}(re);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=A.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){k(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 k(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`,M(X,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,M(X,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,M(X,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,M(X,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,M(X,`unSelect`))}var Ge=ve(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){N(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=ae(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:A.color.accent50,pageIconInactiveColor:A.color.accent10,pageIconSize:15,pageTextStyle:{color:A.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=j,Z=[`width`,`height`],Q=[`x`,`y`],Ze=function(e){N(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:ie(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=_e(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&&ge(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;k([`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:[a(`g`,{transform:`translate(-1.4 -1) scale(0.8)`,children:a(`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`})}),a(`circle`,{cx:`19.2`,cy:`19.2`,r:`4.4`})]}),`Instance`);r(),R([De,Se,et,Te,Pe]);var nt=36e5,rt=3e4,it=class extends y{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}=this.props;return u(h,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[a(C,{sx:{fontSize:40,opacity:.4}}),a(g,{variant:`body2`,children:t(`CPU and RAM of this host are not recorded by %s yet`,this.state.historyInstance)}),this.state.blocker===`notRecorded`?a(x,{variant:`contained`,disabled:this.state.enabling,startIcon:this.state.enabling?a(e,{size:16}):null,onClick:()=>void this.enableRecording(),children:t(`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 a(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?a(h,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:a(g,{variant:`body2`,color:`error`,children:this.state.error})}):this.state.loading?a(h,{sx:{height:260,display:`flex`,alignItems:`center`,justifyContent:`center`},children:a(e,{})}):this.state.blocker?this.renderBlocker():!this.state.cpu.length&&!this.state.mem.length?u(h,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:2,height:260,color:`text.secondary`,textAlign:`center`,px:2},children:[a(C,{sx:{fontSize:40,opacity:.4}}),a(g,{variant:`body2`,children:this.props.t(`Recording is active, but there is no data for the last hour yet`)})]}):this.renderChart()}};r();var at=3e4,ot=5e3,st=6,ct=16,lt=`App.overviewChartMinimized`,ut=5,$=`--`,dt=class e extends y{constructor(e){super(e),l(this,`refreshTimer`,null),l(this,`chartRef`,v.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(h,{sx:{display:`flex`,alignItems:`center`,gap:2,py:1},children:[a(g,{variant:`body2`,color:`text.secondary`,sx:{width:80},children:e}),a(f,{variant:`determinate`,value:Math.max(0,Math.min(100,t??0)),sx:{flex:1,maxWidth:160}}),a(g,{variant:`body2`,sx:{flex:1,textAlign:`right`},children:n})]},e)}renderSystemInfo(){let{t}=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(b,{sx:{flex:`1 1 340px`,p:2.5},children:[a(i,{title:t(`System information`)}),n?u(d,{children:[a(o,{name:t(`Platform`),value:String(n.Platform??`-`)}),a(o,{name:t(`Architecture`),value:String(n.Architecture??`-`)}),a(o,{name:`Node.js`,value:String(n[`Node.js`]??`-`)}),a(o,{name:`NPM`,value:String(n.NPM??`-`)}),a(o,{name:t(`System uptime`),value:D.formatSeconds(Number(n[`System uptime`]??0),t)}),e.renderGaugeRow(t(`RAM`),this.state.mem,s===null?`-`:`${s.toFixed(1)} GB / ${r==null?void 0:r.toFixed(1)} GB (${Math.round(this.state.mem??0)}%)`),e.renderGaugeRow(`CPU`,this.state.cpu,this.state.cpu===null?`-`:`${Math.round(this.state.cpu)}%`)]}):a(f,{})]})}renderAdapters(){let{t:e,theme:t}=this.props;return u(b,{sx:{flex:`1 1 340px`,p:2.5},children:[a(i,{title:e(`Running adapters`),action:{text:e(`Show all`),onClick:()=>this.props.handleNavigation(`tab-instances`)}}),this.state.adapters.length?this.state.adapters.slice(0,ut).map(r=>u(h,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`},children:[a(h,{sx:{width:26,height:26,borderRadius:`50%`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:p(t.palette.success.main,.2),border:`1px solid ${p(t.palette.success.main,.5)}`},children:r.icon?a(m,{src:r.icon,alt:r.name,style:{width:18,height:18,borderRadius:`50%`}}):null}),a(g,{variant:`body2`,sx:{flex:1},children:r.name}),u(g,{variant:`caption`,color:`text.secondary`,children:[`v`,r.version]}),a(n,{size:`small`,color:`success`,variant:`outlined`,label:r.instances>1?e(`%s instances`,r.instances):e(`active`)})]},r.name)):a(g,{variant:`body2`,color:`text.secondary`,children:e(`No running adapters`)})]})}renderChartButton(){let{t:e}=this.props,t,n;return this.state.chartMinimized?(t=a(E,{}),n=e(`Maximize`)):this.state.chartRecording?(t=a(S,{}),n=e(`Stop recording`)):(t=a(T,{}),n=e(`Minimize`)),a(_,{title:n,children:a(s,{size:`small`,onClick:this.onChartButton,"aria-label":n,children:t})})}renderLog(){let{t,theme:n}=this.props,r={error:n.palette.error.main,warn:n.palette.warning.main};return u(b,{sx:{flex:`2 1 460px`,p:2.5,minWidth:0},children:[a(i,{title:t(`System log`),action:{text:t(`Show all`),onClick:()=>this.props.handleNavigation(`tab-logs`)}}),this.state.logs.length?this.state.logs.slice(-(this.state.chartMinimized?ct:st)).map((t,i)=>u(h,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:1,borderTop:`1px solid`,borderColor:`divider`,minWidth:0},children:[a(h,{sx:{width:8,height:8,borderRadius:`50%`,flexShrink:0,backgroundColor:r[t.severity]||n.palette.success.main}}),a(g,{variant:`caption`,color:`text.secondary`,sx:{whiteSpace:`nowrap`},children:new Date(t.ts).toLocaleTimeString()}),a(g,{variant:`caption`,sx:{color:r[t.severity]||`text.secondary`,width:34,flexShrink:0},children:t.severity}),a(g,{variant:`caption`,sx:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.logText(t)})]},`${t.key??t.ts}_${i}`)):a(g,{variant:`body2`,color:`text.secondary`,children:t(`No messages`)})]})}render(){let{t:e,theme:t}=this.props,r=this.state.hostAlive,o=this.state.loaded,s=D.countAdapterUpdates(this.props.installed,this.props.repository);return u(h,{sx:{height:`100%`,overflow:`auto`,p:3,pt:0},children:[u(h,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:2,gap:2},children:[this.props.menuButtonSpace?a(h,{sx:{width:40,flexShrink:0}}):null,u(h,{children:[a(g,{sx:{fontSize:`1.5rem`,fontWeight:700},children:e(`Overview`)}),a(g,{variant:`body2`,color:`text.secondary`,children:e(`System overview and status`)})]}),u(h,{sx:{display:`flex`,alignItems:`center`,gap:1.5},children:[o?a(n,{size:`small`,label:e(r?`online`:`offline`),color:r?`success`:`error`}):null,a(h,{sx:{ml:`auto`,pl:1},children:this.props.hostSelector})]})]}),u(h,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[a(c,{title:e(`System status`),value:o?e(r?`OK`:`Offline`):$,valueColor:o?r?t.palette.success.main:t.palette.error.main:void 0,hint:e(o?r?`ioBroker is running`:`Host does not answer`:`Loading...`),color:o?r?t.palette.success.main:t.palette.error.main:t.palette.text.secondary,icon:a(te,{}),onClick:()=>this.props.handleNavigation(`tab-hosts`)}),a(c,{title:e(`Adapters`),value:o?String(this.state.adaptersTotal):$,hint:o?e(`%s active / %s inactive`,this.state.adaptersActive,this.state.adaptersTotal-this.state.adaptersActive):e(`Loading...`),chip:s?{label:s===1?e(`1 update`):e(`%s updates`,s),color:`warning`}:void 0,color:t.palette.primary.main,icon:a(ee,{}),onClick:()=>this.props.handleNavigation(`tab-adapters`)}),a(c,{title:e(`Instances`),value:o?String(this.state.instancesTotal):$,hint:o?e(`%s active / %s inactive`,this.state.instancesAlive,this.state.instancesTotal-this.state.instancesAlive):e(`Loading...`),color:t.palette.secondary.main,icon:a(tt,{}),onClick:()=>this.props.handleNavigation(`tab-instances`)}),a(c,{title:e(`Objects`),value:this.state.objectsLoaded?this.state.objectsCount.toLocaleString(this.props.lang):$,hint:this.state.objectsLoaded?e(`%s states`,this.state.statesCount.toLocaleString(this.props.lang)):e(`Loading...`),color:t.palette.warning.main,icon:a(w,{}),onClick:()=>this.props.handleNavigation(`tab-objects`)})]}),u(h,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[this.renderSystemInfo(),u(b,{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:[a(i,{title:e(`Resource usage`),actions:this.renderChartButton()}),a(h,{sx:{display:this.state.chartMinimized?`none`:void 0},children:a(it,{ref:this.chartRef,socket:this.props.socket,currentHost:this.props.currentHost,theme:this.props.theme,themeType:this.props.themeType,t:e,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(h,{sx:{display:`flex`,gap:2,flexWrap:`wrap`},children:[this.renderAdapters(),this.renderLog()]})]})}};export{dt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$r as e,Hs as t,Ls as n,Us as r,Wo as i,mo as a,zs as o}from"./loadShare-eager-dmdYQhAl.js";import{xt as s}from"./bootstrap-BVw0diuj.js";var c={checkIcon:{color:n[700]},cancelIcon:{color:o[700]},wrapperContent:{display:`flex`,flexFlow:`nowrap`,alignItems:`inherit`}};function l(n){return r(i,{container:!0,style:c.wrapperContent,direction:`row`,spacing:1,sx:{alignItems:`center`},children:[t(i,{children:n.state?t(s,{style:c.checkIcon}):t(e,{style:c.cancelIcon})}),t(i,{children:t(a,{children:n.children})})]})}export{l as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$a as e,An as t,Eo as n,Hs as r,Qt as i,Us as a,Vt as o,ao as s,eo as c,go as l,mo as u,oi as d,pc as f,po as p,ro as m,sc as h,to as g}from"./loadShare-eager-dmdYQhAl.js";import{n as _,r as v,t as y}from"./Usb-C8HitPqx.js";import{o as b}from"./AdminUtils-Dc1eHsx5.js";import{st as x}from"./bootstrap-BVw0diuj.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(o,{fontSize:`small`}),tcpPort:r(_,{fontSize:`small`}),udpPort:r(_,{fontSize:`small`}),usb:r(y,{fontSize:`small`}),bluetooth:r(i,{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]=f(null);return h(()=>{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]=f(``);return h(()=>{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(l,{sx:{width:20,height:20,flexShrink:0},children:n?r(`img`,{src:n,alt:``,style:{width:20,height:20,objectFit:`contain`}}):null})}function V(t){let{t:i}=t;return a(e,{size:`small`,sx:{"& td, & th":{py:.5}},children:[r(m,{children:a(s,{children:[r(g,{children:i(`Type`)}),r(g,{children:i(`Resource`)}),t.hideInstance?null:r(g,{children:i(`Instance`)}),r(g,{children:i(`Status`)}),r(g,{children:i(`Registered`)})]})}),r(c,{children:t.resources.map(e=>{let o=N(e);return a(s,{children:[r(g,{children:a(l,{sx:{display:`flex`,alignItems:`center`,gap:1,whiteSpace:`nowrap`},children:[F(e.type),I(e.type,i)]})}),r(g,{children:a(l,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[o,e.conflicts.length?r(p,{title:L(e,i),children:r(d,{fontSize:`small`,color:`warning`})}):null]})}),t.hideInstance?null:r(g,{children:a(l,{sx:{display:`flex`,alignItems:`center`,gap:1,whiteSpace:`nowrap`},children:[r(B,{socket:t.socket,instance:e.instance}),e.instance]})}),r(g,{children:r(p,{title:e.isBlocked?i(`The instance runs and holds the resource`):i(`The instance does not run and would take the resource when started`),children:r(n,{size:`small`,variant:e.isBlocked?`filled`:`outlined`,color:e.isBlocked?`success`:`info`,label:e.isBlocked?i(`In use`):i(`Reserved`)})})}),r(g,{sx:{whiteSpace:`nowrap`},children:new Date(e.ts).toLocaleString()})]},`${e.instance}|${e.type}|${o}`)})})]})}function H(e){let i=R(e.socket,e.hostId),[o,s]=f(!1);if(!i)return null;let c=i.filter(e=>e.conflicts.length);return a(l,{sx:{width:`100%`,px:2,pb:1},onClick:e=>e.stopPropagation(),children:[a(l,{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:()=>s(!o),children:[r(t,{fontSize:`small`,sx:{transition:`transform 0.2s`,transform:o?`rotate(180deg)`:void 0}}),r(u,{variant:`subtitle2`,sx:{fontWeight:`bold`},children:e.t(`Used resources`)}),r(n,{size:`small`,label:i.length}),c.length?r(p,{title:r(`span`,{style:{whiteSpace:`pre-line`},children:c.map(t=>`${N(t)}: ${L(t,e.t)}`).join(`
|
|
2
|
-
`)}),children:a(l,{sx:{display:`flex`,alignItems:`center`,gap:.5,color:`warning.main`},children:[r(d,{fontSize:`small`,color:`warning`}),c.length]})}):null]}),o?r(l,{sx:{mt:1,maxHeight:400,overflowY:`auto`},children:i.length?r(V,{socket:e.socket,resources:i,t:e.t}):r(u,{variant:`body2`,color:`textSecondary`,children:e.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ao as e,Co as t,Es as n,Ha as r,Hs as i,Ka as a,Kn as o,Ko as s,Lr as c,Mo as l,No as u,Po as d,Qa as f,Qi as p,Ro as m,Rr as h,To as g,Ts as _,Us as v,Vo as ee,Wa as y,Wo as b,Wr as x,Xo as te,ba as S,bi as C,br as w,fc as ne,ga as T,go as E,jo as D,mo as O,qn as k,sc as A,so as j,tc as M,xa as N,xo as P,xr as F,yo as I}from"./loadShare-eager-dmdYQhAl.js";import{n as L,r as R,t as z}from"./Pageview-wzrLQZ-j.js";import{n as re,r as ie,t as ae}from"./PersonOff-YtHcY0sV.js";import{t as B}from"./VpnKey-BbZdswcd.js";import{o as V,t as H}from"./AdminUtils-Dc1eHsx5.js";import{B as oe,H as U,L as W,R as G,W as K,z as se}from"./bootstrap-BVw0diuj.js";import{n as q,r as ce,t as J}from"./Fields-BWBgNDOp.js";var Y=e=>{let n=+!e.isDragging,a=x.getInvertedColor(e.user.common.color,e.themeType,!0),c={cursor:`grab`,opacity:n,overflow:`hidden`,color:a};return e.user.common.color&&(c.backgroundColor=e.user.common.color),i(P,{style:c,sx:e.styles.userGroupCard2,children:v(`div`,{style:e.styles.userCardContent,children:[v(`div`,{style:e.styles.right,children:[i(g,{checked:e.user.common.enabled,style:{color:a},disabled:e.user.common.dontDelete,onChange:()=>{e.socket.extendObject(e.user._id,{common:{enabled:!e.user.common.enabled}}).then(()=>e.updateData())}}),i(s,{size:`small`,onClick:()=>e.showUserEditDialog(e.user,!1),children:i(S,{style:{color:a}})}),i(s,{size:`small`,onClick:()=>e.showUserDeleteDialog(e.user),disabled:e.user.common.dontDelete,children:i(r,{style:e.user.common.dontDelete?void 0:{color:a}})})]}),v(t,{children:[v(O,{gutterBottom:!0,component:`div`,style:e.styles.userGroupTitle,children:[e.user.common.icon?i(w,{style:e.styles.icon,src:e.user.common.icon}):i(k,{style:e.styles.icon}),v(`div`,{children:[v(`div`,{children:[i(`span`,{style:e.styles.userGroupUserName,children:e.getText(e.user.common.name)}),v(`span`,{style:e.styles.userGroupUserID,children:[`[`,e.user._id,`]`]})]}),i(`span`,{children:e.user.common.desc?i(`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))?v(`div`,{children:[e.t(`In groups`),`:`]}):null,i(`div`,{children:e.groups.map(t=>{var n,r;if(!t.common.members||!t.common.members.includes(e.user._id))return null;let c=t&&(n=t.common)!=null&&n.color?x.getInvertedColor(t.common.color,e.themeType,!0):a;return v(P,{variant:`outlined`,sx:e.styles.userGroupMember,style:{color:c,borderColor:`${c}80`,background:((r=t.common)==null?void 0:r.color)||`inherit`},children:[t.common.icon?i(w,{style:e.styles.icon,src:t.common.icon}):i(o,{style:e.styles.icon}),e.getText(t.common.name),i(s,{size:`small`,onClick:()=>e.removeUserFromGroup(e.user._id,t._id),children:i(p,{style:{color:c}})})]},t._id)})})]})]})})},le=e=>{let t=ne(null),[{isDragging:n},r,a]=U({type:`user`,item:()=>{var n;return{userId:e.user._id,preview:i(`div`,{style:{width:(n=t.current)==null?void 0:n.offsetWidth},children:i(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 A(()=>{a(se(),{captureDraggingState:!0})},[a]),i(`div`,{ref:e=>{r(e)},children:i(`div`,{ref:t,children:i(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:a,isOver:c},l]=oe(()=>({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]),u=.7,d;a&&c?(u=a?1:.125,d=e.styles.userGroupCardSecondary):a&&(u=a?.75:.25);let f=x.getInvertedColor(e.group.common.color,e.themeType,!0),m={opacity:u,overflow:`hidden`,color:f};return e.group.common.color&&(m.backgroundColor=e.group.common.color),v(P,{style:m,ref:e=>{l(e)},sx:x.getStyle(e.theme,e.styles.userGroupCard2,d),children:[v(`div`,{style:e.styles.right,children:[i(s,{size:`small`,onClick:()=>e.showGroupEditDialog(e.group,!1),children:i(S,{style:{color:f}})}),i(s,{size:`small`,onClick:()=>e.showGroupDeleteDialog(e.group),disabled:e.group.common.dontDelete,children:i(r,{style:e.group.common.dontDelete?void 0:{color:f}})})]}),v(t,{children:[v(O,{gutterBottom:!0,component:`div`,style:e.styles.userGroupTitle,children:[e.group.common.icon?i(w,{style:e.styles.icon,src:e.group.common.icon}):i(o,{style:e.styles.icon}),v(`div`,{children:[v(`div`,{children:[i(`span`,{style:e.styles.userGroupUserName,children:e.getText(e.group.common.name)}),v(`span`,{children:[`[`,e.group._id,`]`]})]}),e.group.common.desc?i(`div`,{style:e.styles.description,children:e.getText(e.group.common.desc)}):null]})]}),(n=e.group.common.members)!=null&&n.length?v(`div`,{children:[e.t(`Group members`),`:`]}):null,i(`div`,{children:(e.group.common.members||[]).map((t,n)=>{var r,a;let o=e.users.find(e=>e._id===t),c=o&&(r=o.common)!=null&&r.color?x.getInvertedColor(o.common.color,e.themeType,!0):f;return o?v(P,{variant:`outlined`,sx:e.styles.userGroupMember,style:{color:c,borderColor:`${c}40`,background:((a=o.common)==null?void 0:a.color)||`inherit`},children:[o.common.icon?i(w,{style:e.styles.icon,src:o.common.icon}):i(k,{style:e.styles.icon}),e.getText(o.common.name),i(s,{size:`small`,onClick:()=>e.removeUserFromGroup(t,e.group._id),children:i(p,{style:{color:c}})})]},n):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 M{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&&x.getSvg(e).then(e=>{let t=x.clone(this.props.user);t.common.icon=e,this.props.onChange(t)})}}render(){let t=this.props.users.find(e=>e._id===this.props.user._id),n=this.props.user._id!==this.state.originalId,r=e=>e.split(`.`).pop()||``,o=e=>e.replace(x.FORBIDDEN_CHARS,`_`).replace(/\s/g,`_`).replace(/\./g,`_`).replace(/,/g,`_`).replace(/__/g,`_`).replace(/__/g,`_`).toLowerCase(),s=(e,t)=>{let n=e.split(`.`);return n[n.length-1]=t,n.join(`.`)},c=this.props.getText(this.props.user.common.desc),u=this.props.getText(this.props.user.common.name),f=H.checkPassword(this.props.user.common.password),p=H.checkPassword(this.props.user.common.password,this.state.passwordRepeat),m=this.props.isNew||JSON.stringify(this.props.user)!==this.state.originalData,h=this.props.user._id!==`system.user.`&&!f&&!p&&m;return(this.props.isNew&&t||t&&n)&&(h=!1),v(e,{fullWidth:this.props.innerWidth<500,open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&this.props.onClose()},children:[i(d,{style:{...this.props.styles.dialogTitle,padding:12},children:this.props.t(`User parameters`)}),v(l,{sx:{"&.MuiDialogContent-root":{...this.props.innerWidth<500?this.props.styles.narrowContent:void 0,...fe.contentRoot}},children:[v(b,{container:!0,spacing:this.props.innerWidth<500?1:4,style:this.props.styles.dialog,children:[i(b,{size:{xs:12,md:6},children:i(q,{label:`Name`,t:this.props.t,value:u,onChange:e=>{let t=x.clone(this.props.user);!this.props.user.common.dontDelete&&o(this.props.getText(t.common.name))===r(t._id)&&(t._id=s(t._id,o(e))),t.common.name=e,this.props.onChange(t)},autoComplete:`new-password`,icon:C,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(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=x.clone(this.props.user);t._id=s(t._id,o(e)),this.props.onChange(t)},icon:L,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`ID preview`,t:this.props.t,disabled:!0,value:this.props.user._id,icon:z,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`Description`,t:this.props.t,value:c,onChange:e=>{let t=x.clone(this.props.user);t.common.desc=e,this.props.onChange(t)},icon:N,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`Password`,t:this.props.t,value:this.props.user.common.password,error:f?this.props.t(f):void 0,onChange:e=>{let t=x.clone(this.props.user);t.common.password=e,this.props.onChange(t)},type:`password`,autoComplete:`new-password`,icon:B,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`Password repeat`,t:this.props.t,value:this.state.passwordRepeat,error:p?this.props.t(p):void 0,onChange:e=>this.setState({passwordRepeat:e}),type:`password`,autoComplete:`new-password`,icon:B,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(F,{icons:X,label:`Icon`,value:this.props.user.common.icon,onChange:e=>{let t=x.clone(this.props.user);t.common.icon=e,this.props.onChange(t)},previewStyle:this.props.styles.iconPreview,icon:T})}),i(b,{size:{xs:12,md:6},children:i(J,{label:`Color`,t:this.props.t,value:this.props.user.common.color||``,previewStyle:this.props.styles.iconPreview,onChange:e=>{let t=x.clone(this.props.user);t.common.color=e,this.props.onChange(t)},icon:R,style:this.props.styles.colorPicker,styles:this.props.styles})})]}),this.props.isNew?null:this.renderOidcButton()]}),v(D,{children:[i(I,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.saveData(this.props.isNew?null:this.state.originalId),disabled:!h,startIcon:i(y,{}),children:this.props.t(`Save`)}),i(I,{variant:`contained`,color:`grey`,onClick:this.props.onClose,startIcon:i(a,{}),children:this.props.t(`Cancel`)})]})]})}renderOidcButton(){var e;return window.ssoActive===`true`?(e=this.props.user.common)!=null&&(e=e.externalAuthentication)!=null&&e.oidc?i(I,{variant:`contained`,color:`secondary`,fullWidth:!0,startIcon:i(ae,{}),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`)}):i(I,{variant:`contained`,color:`secondary`,fullWidth:!0,onClick:()=>{window.location.href=V(`sso?redirectUrl=${encodeURIComponent(`${window.origin}${V(`#tab-users`)}`)}&method=register&user=${encodeURIComponent((this.state.originalId||this.props.user._id).replace(/^system\.user\./,``))}`)},startIcon:i(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||{},r=e=>e,a={...n,object:{read:!0,list:!0,write:!0,delete:!1,create:!1,...r(n.object)},state:{read:!0,list:!0,write:!0,delete:!1,create:!1,...r(n.state)},users:{read:!1,list:!1,write:!1,delete:!1,create:!1,...r(n.users)},other:{http:!1,execute:!1,sendto:!0,...r(n.other)},file:{read:!0,list:!0,write:!1,delete:!1,create:!1,...r(n.file)}};return i(b,{container:!0,spacing:e.innerWidth<500?1:4,style:e.styles.dialog,children:t(a,(n,r)=>v(b,{size:{xs:12,md:12},children:[i(E,{component:`h2`,sx:e.styles.permHeaders,children:e.t(`group_acl_${r}`)}),t(n,(t,n)=>i(ee,{control:i(g,{disabled:e.group._id===`system.group.administrator`,checked:t,onChange:t=>{let i=x.clone(e.group);i.common.acl=x.clone(a),i.common.acl[r][n]=t.target.checked,e.onChange(i)}}),label:e.t(`group_acl_${n}`),labelPlacement:`top`},n))]},r))},`PermissionsTab`)}var he={contentRoot:{padding:`16px 24px`}},ge=class extends M{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&&x.getSvg(e).then(e=>{let t=x.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,o=this.props.group._id!==`system.group.`&&this.props.group.common.password===this.props.group.common.passwordRepeat&&r,s=e=>e.split(`.`).pop()||``,c=e=>e.replace(x.FORBIDDEN_CHARS,`_`).replace(/\s/g,`_`).replace(/\./g,`_`).toLowerCase(),u=(e,t)=>{let n=e.split(`.`);return n[n.length-1]=t,n.join(`.`)};this.props.isNew?t&&(o=!1):t&&n&&(o=!1);let p=this.props.getText(this.props.group.common.desc),m=this.props.getText(this.props.group.common.name),h=[v(b,{container:!0,spacing:this.props.innerWidth<500?1:4,style:this.props.styles.dialog,children:[i(b,{size:{xs:12,md:6},children:i(q,{label:`Name`,t:this.props.t,value:m,onChange:e=>{let t=x.clone(this.props.group);!this.props.group.common.dontDelete&&c(this.props.getText(t.common.name))===s(t._id)&&(t._id=u(t._id,c(e))),t.common.name=e,this.props.onChange(t)},autoComplete:`off`,icon:C,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(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=x.clone(this.props.group);t._id=u(t._id,c(e)),this.props.onChange(t)},icon:L,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`ID preview`,t:this.props.t,disabled:!0,value:this.props.group._id,icon:z,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(q,{label:`Description`,t:this.props.t,value:p,onChange:e=>{let t=x.clone(this.props.group);t.common.desc=e,this.props.onChange(t)},icon:N,styles:this.props.styles})}),i(b,{size:{xs:12,md:6},children:i(F,{label:`Icon`,icons:Z,value:this.props.group.common.icon,onChange:e=>{let t=x.clone(this.props.group);t.common.icon=e,this.props.onChange(t)},previewStyle:this.props.styles.iconPreview,icon:T})}),i(b,{size:{xs:12,md:6},children:i(J,{label:`Color`,t:this.props.t,value:this.props.group.common.color||``,previewStyle:this.props.styles.iconPreview,onChange:e=>{let t=x.clone(this.props.group);t.common.color=e,this.props.onChange(t)},icon:R,style:this.props.styles.colorPicker,styles:this.props.styles})})]}),me(this.props)][this.state.tab];return v(e,{open:!0,onClose:(e,t)=>{t!==`backdropClick`&&t!==`escapeKeyDown`&&this.props.onClose()},fullWidth:this.props.innerWidth<500,children:[i(d,{style:this.props.styles.dialogTitle,children:v(j,{variant:`fullWidth`,value:this.state.tab,onChange:(e,t)=>this.setState({tab:t}),children:[i(f,{label:this.props.t(`Main`),value:0}),i(f,{label:this.props.t(`Permissions`),value:1})]})}),i(l,{sx:{"&.MuiDialogContent-root":{...this.props.innerWidth<500?this.props.styles.narrowContent:void 0,...he.contentRoot}},children:h}),v(D,{style:this.props.styles.dialogActions,children:[i(I,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>this.props.saveData(this.props.isNew?null:this.state.originalId),disabled:!o,startIcon:i(y,{}),children:this.props.t(`Save`)}),i(I,{variant:`contained`,color:`grey`,onClick:this.props.onClose,startIcon:i(a,{}),children:this.props.t(`Cancel`)})]})]})}};function _e(t){return v(e,{open:!0,onClose:t.onClose,children:[i(d,{children:t.t(`Please confirm`)}),i(l,{children:i(u,{children:t.t(`Do you want to delete user %s?`,t.getText(t.user.common.name))})}),v(D,{children:[i(I,{variant:`contained`,color:`primary`,onClick:()=>t.deleteUser(t.user._id),startIcon:i(r,{}),children:t.t(`Delete`)}),i(I,{variant:`contained`,color:`grey`,autoFocus:!0,onClick:t.onClose,startIcon:i(a,{}),children:t.t(`Cancel`)})]})]})}function ve(t){return v(e,{open:!0,onClose:t.onClose,children:[i(d,{children:t.t(`Please confirm`)}),i(l,{children:i(u,{children:t.t(`Do you want to delete group %s?`,t.getText(t.group.common.name))})}),v(D,{style:t.styles.dialogActions,children:[i(I,{variant:`contained`,color:`primary`,onClick:()=>t.deleteGroup(t.group._id),startIcon:i(r,{}),children:t.t(`Delete`)}),i(I,{variant:`contained`,color:`grey`,autoFocus:!0,onClick:t.onClose,startIcon:i(a,{}),children:t.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?i(`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 M{constructor(e){super(e),_(this,`getText`,e=>e&&(typeof e==`object`?e[this.props.lang]||e.en||``:e||``)||``),_(this,`showUserEditDialog`,(e,t)=>{e=x.clone(e),e.common.password=e.common.password?Q:``,this.setState({userEditDialog:e,userEditDialogNew:t})}),_(this,`showGroupEditDialog`,(e,t)=>{e=x.clone(e),this.setState({groupEditDialog:e,groupEditDialogNew:t})}),_(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})})}),_(this,`changeUserFormData`,e=>this.setState({userEditDialog:e})),_(this,`changeGroupFormData`,e=>this.setState({groupEditDialog:e})),_(this,`saveUser`,async e=>{var t;let n=x.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=x.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())}),_(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())}}),_(this,`showUserDeleteDialog`,e=>this.setState({userDeleteDialog:e})),_(this,`showGroupDeleteDialog`,e=>this.setState({groupDeleteDialog:e})),_(this,`deleteUser`,e=>{this.props.socket.delObject(e).then(()=>Promise.all((this.state.groups||[]).map(t=>{if(t.common.members.includes(e)){let n=x.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())})}),_(this,`deleteGroup`,e=>this.props.socket.delObject(e).then(()=>this.setState({groupDeleteDialog:!1},()=>this.updateData())).catch(e=>window.alert(`Cannot delete user: ${e}`))),_(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}`)))}),_(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?i(te,{}):v(K,{backend:H.isTouchDevice()?W:G,children:[i(be,{}),i(E,{component:`div`,sx:$.descriptionPanel,children:this.props.t(`You can drag users to groups.`)}),v(b,{container:!0,spacing:2,style:$.mainGridCont,children:[v(b,{size:{xs:12,md:6},style:{...$.childGridCont,...this.state.innerWidth>600?$.childGridContWide:void 0},children:[v(`div`,{style:$.headContainer,children:[i(m,{size:`small`,style:$.right,onClick:()=>{let{_id:t,name:n}=e.findNewUniqueName(!0,this.state.groups||[],this.props.t(`Group`)),r=x.clone(Se);r._id=t,r.common.name=n,this.showGroupEditDialog(r,!0)},children:i(ie,{})}),i(O,{gutterBottom:!0,variant:`h4`,component:`h4`,children:this.props.t(`Groups`)})]}),i(`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=>i(de,{group:e,users:this.state.users||[],showGroupEditDialog:this.showGroupEditDialog,showGroupDeleteDialog:this.showGroupDeleteDialog,removeUserFromGroup:this.removeUserFromGroup,getText:this.getText,styles:$,...this.props},e._id))})]}),v(b,{size:{xs:12,md:6},style:{...$.childGridCont,...this.state.innerWidth>600?$.childGridContWide:void 0},children:[v(`div`,{style:$.headContainer,children:[i(m,{size:`small`,style:$.right,onClick:()=>{let{_id:t,name:n}=e.findNewUniqueName(!1,this.state.users||[],this.props.t(`User`)),r=x.clone(xe);r._id=t,r.common.name=n,this.showUserEditDialog(r,!0)},children:i(re,{})}),i(O,{gutterBottom:!0,variant:`h4`,component:`h4`,children:this.props.t(`Users`)})]}),i(`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=>i(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?i(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?i(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?i(_e,{getText:this.getText,onClose:()=>this.setState({userDeleteDialog:!1}),user:this.state.userDeleteDialog,t:this.props.t,deleteUser:this.deleteUser}):null,this.state.groupDeleteDialog?i(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 i(c,{children:i(h,{style:{display:`flex`,flexDirection:`column`,overflow:`auto`},children:i(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 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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 +0,0 @@
|
|
|
1
|
-
import{Ds as e,Hs as t}from"./loadShare-eager-dmdYQhAl.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 +0,0 @@
|
|
|
1
|
-
import{C as e,E as t,S as n,_ as r,b as i,d as a,f as o,g as s,h as c,m as l,p as u,t as d,u as f,v as p,w as m,x as h,y as g}from"./en-US-BjjaEI6N.js";import{$ as _,A as v,B as y,C as ee,D as b,E as te,F as ne,G as re,H as ie,I as ae,J as oe,K as x,L as S,M as se,N as ce,O as le,P as ue,Q as de,R as fe,S as pe,T as me,U as he,V as ge,W as _e,X as ve,Y as C,Z as w,_ as ye,a as be,at as T,b as xe,c as Se,ct as Ce,d as we,dt as E,et as Te,f as Ee,g as De,h as Oe,i as ke,it as Ae,j as je,k as Me,l as Ne,lt as Pe,m as Fe,n as Ie,nt as D,o as Le,ot as O,p as Re,q as ze,r as Be,rt as k,s as Ve,st as A,t as He,tt as Ue,u as We,ut as j,v as Ge,w as Ke,x as qe,y as Je,z as Ye}from"./setYear-DDSuW45e.js";import{t as M}from"./isSameWeek-WMSJR5Qs.js";function N(e,t,n){let{years:r=0,months:i=0,weeks:a=0,days:o=0,hours:s=0,minutes:u=0,seconds:d=0}=t,f=l(e,n==null?void 0:n.in),p=i||r?j(f,i+r*12):f,m=o||a?E(p,o+a*7):p,h=(d+(u+s*60)*60)*1e3;return c((n==null?void 0:n.in)||e,+m+h)}function Xe(e,t){return l(e,t==null?void 0:t.in).getDay()===6}function Ze(e,t){return l(e,t==null?void 0:t.in).getDay()===0}function P(e,t){let n=l(e,t==null?void 0:t.in).getDay();return n===0||n===6}function Qe(e,t,n){let r=l(e,n==null?void 0:n.in),i=P(r,n);if(isNaN(t))return c(n==null?void 0:n.in,NaN);let a=r.getHours(),o=t<0?-1:1,s=Math.trunc(t/5);r.setDate(r.getDate()+s*7);let u=Math.abs(t%5);for(;u>0;)r.setDate(r.getDate()+o),P(r,n)||--u;return i&&P(r,n)&&t!==0&&(Xe(r,n)&&r.setDate(r.getDate()+(o<0?2:-1)),Ze(r,n)&&r.setDate(r.getDate()+(o<0?1:-2))),r.setHours(a),r}function $e(e,t,n){let r=l(e,n==null?void 0:n.in),i=k(r,D(r,n)),a=c((n==null?void 0:n.in)||e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),r=D(a),r.setDate(r.getDate()+i),r}function et(e,t,n){return $e(e,O(e,n)+t,n)}function tt(e,t,n){return j(e,t*3,n)}function nt(e,t,n){let[r,i]=[+l(e.start,n==null?void 0:n.in),+l(e.end,n==null?void 0:n.in)].sort((e,t)=>e-t),[a,o]=[+l(t.start,n==null?void 0:n.in),+l(t.end,n==null?void 0:n.in)].sort((e,t)=>e-t);return n!=null&&n.inclusive?r<=o&&a<=i:r<o&&a<i}function rt(e,t){let n,r=t==null?void 0:t.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=c.bind(null,e));let t=l(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),c(r,n||NaN)}function it(e,t){let n,r=t==null?void 0:t.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=c.bind(null,e));let t=l(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),c(r,n||NaN)}function at(e,t,n){let[r,i,a]=f(n==null?void 0:n.in,e,t.start,t.end);return it([rt([r,i],n),a],n)}function ot(e,t){let n=+l(e);if(isNaN(n))return NaN;let r,i;return t.forEach((e,t)=>{let a=l(e);if(isNaN(+a)){r=NaN,i=NaN;return}let o=Math.abs(n-+a);(r==null||o<i)&&(r=t,i=o)}),r}function st(e,t,n){let[r,...i]=f(n==null?void 0:n.in,e,...t),a=ot(r,i);if(typeof a==`number`&&isNaN(a))return c(r,NaN);if(a!==void 0)return i[a]}function F(e,t){let n=+l(e)-l(t);return n<0?-1:n>0?1:n}function ct(e,t){let n=+l(e)-l(t);return n>0?-1:n<0?1:n}function I(e){return c(e,Date.now())}function lt(e){let t=Math.trunc(e/7);return t===0?0:t}function ut(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);if(!C(r)||!C(i))return NaN;let a=k(r,i),o=a<0?-1:1,s=Math.trunc(a/7),c=s*5,l=E(i,s*7);for(;!w(r,l);)c+=P(l,n)?0:o,l=E(l,o);return c===0?0:c}function dt(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);return O(r,n)-O(i,n)}function ft(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=A(r),o=A(i),s=+a-T(a),c=+o-T(o);return Math.round((s-c)/h)}function L(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function pt(e,t){let n=l(e,t==null?void 0:t.in);return Math.trunc(n.getMonth()/3)+1}function R(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=r.getFullYear()-i.getFullYear(),o=pt(r)-pt(i);return a*4+o}function z(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),o=a(r,n),s=a(i,n),c=+o-T(o),l=+s-T(s);return Math.round((c-l)/h)}function B(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);return r.getFullYear()-i.getFullYear()}function mt(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=ht(r,i),o=Math.abs(k(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(ht(r,i)===-a));return s===0?0:s}function ht(e,t){let n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function V(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function H(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=(+r-i)/p;return V(n==null?void 0:n.roundingMethod)(a)}function gt(e,t,n){return et(e,-t,n)}function _t(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=F(r,i),o=Math.abs(dt(r,i,n)),s=gt(r,a*o,n),c=a*(o-Number(F(s,i)===-a));return c===0?0:c}function vt(e,t){return+l(e)-l(t)}function U(e,t,n){let r=vt(e,t)/g;return V(n==null?void 0:n.roundingMethod)(r)}function yt(e,t){let n=l(e,t==null?void 0:t.in);return+oe(n,t)==+ze(n,t)}function W(e,t,n){let[r,i,a]=f(n==null?void 0:n.in,e,e,t),o=F(i,a),s=Math.abs(L(i,a));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let c=F(i,a)===-o;yt(r)&&s===1&&F(r,a)===1&&(c=!1);let l=o*(s-+c);return l===0?0:l}function bt(e,t,n){let r=W(e,t,n)/3;return V(n==null?void 0:n.roundingMethod)(r)}function G(e,t,n){let r=vt(e,t)/1e3;return V(n==null?void 0:n.roundingMethod)(r)}function xt(e,t,n){let r=mt(e,t,n)/7;return V(n==null?void 0:n.roundingMethod)(r)}function St(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t),a=F(r,i),o=Math.abs(B(r,i));r.setFullYear(1584),i.setFullYear(1584);let s=a*(o-+(F(r,i)===-a));return s===0?0:s}function K(e,t){let[n,r]=f(e,t.start,t.end);return{start:n,end:r}}function Ct(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o.setDate(o.getDate()+s),o.setHours(0,0,0,0);return i?l.reverse():l}function wt(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setMinutes(0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o.setHours(o.getHours()+s);return i?l.reverse():l}function Tt(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e);n.setSeconds(0,0);let i=+n>+r,a=i?+n:+r,o=i?r:n,s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o=Ue(o,s);return i?l.reverse():l}function Et(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o.setMonth(o.getMonth()+s);return i?l.reverse():l}function q(e,t){let n=l(e,t==null?void 0:t.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function Dt(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,a=i?+q(n):+q(r),o=q(i?r:n),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o=tt(o,s);return i?l.reverse():l}function Ot(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,o=a(i?r:n,t),s=a(i?n:r,t);o.setHours(15),s.setHours(15);let l=+s.getTime(),u=o,d=(t==null?void 0:t.step)??1;if(!d)return[];d<0&&(d=-d,i=!i);let f=[];for(;+u<=l;)u.setHours(0),f.push(c(n,u)),u=_(u,d),u.setHours(15);return i?f.reverse():f}function kt(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=Ct({start:n,end:r},t),a=[],o=0;for(;o<i.length;){let e=i[o++];P(e)&&a.push(c(n,e))}return a}function At(e,t){return kt({start:x(e,t),end:ze(e,t)},t)}function jt(e,t){return kt({start:_e(e,t),end:re(e,t)},t)}function Mt(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(c(n,o)),o.setFullYear(o.getFullYear()+s);return i?l.reverse():l}function Nt(e,t){let n=l(e,t==null?void 0:t.in),r=n.getFullYear(),i=9+Math.floor(r/10)*10;return n.setFullYear(i,11,31),n.setHours(23,59,59,999),n}function Pt(e,t){let n=l(e,t==null?void 0:t.in);return n.setMinutes(59,59,999),n}function Ft(e,t){return he(e,{...t,weekStartsOn:1})}function It(e,t){let n=O(e,t),r=c((t==null?void 0:t.in)||e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=A(r,t);return i.setMilliseconds(i.getMilliseconds()-1),i}function Lt(e,t){let n=l(e,t==null?void 0:t.in);return n.setSeconds(59,999),n}function Rt(e,t){let n=l(e,t==null?void 0:t.in),r=n.getMonth(),i=r-r%3+3;return n.setMonth(i,0),n.setHours(23,59,59,999),n}function zt(e,t){let n=l(e,t==null?void 0:t.in);return n.setMilliseconds(999),n}function Bt(e){return oe(Date.now(),e)}function Vt(e){let t=I(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=I(e==null?void 0:e.in);return a.setFullYear(n,r,i+1),a.setHours(23,59,59,999),e!=null&&e.in?e.in(a):a}function Ht(e){let t=I(e==null?void 0:e.in),n=c(e==null?void 0:e.in,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()-1),n.setHours(23,59,59,999),n}function Ut(t,r,i){let a=o(),s=(i==null?void 0:i.locale)??a.locale??d,c=F(t,r);if(isNaN(c))throw RangeError(`Invalid time value`);let l=Object.assign({},i,{addSuffix:i==null?void 0:i.addSuffix,comparison:c}),[u,p]=f(i==null?void 0:i.in,...c>0?[r,t]:[t,r]),m=G(p,u),h=(T(p)-T(u))/1e3,g=Math.round((m-h)/60),_;if(g<2)return i!=null&&i.includeSeconds?m<5?s.formatDistance(`lessThanXSeconds`,5,l):m<10?s.formatDistance(`lessThanXSeconds`,10,l):m<20?s.formatDistance(`lessThanXSeconds`,20,l):m<40?s.formatDistance(`halfAMinute`,0,l):m<60?s.formatDistance(`lessThanXMinutes`,1,l):s.formatDistance(`xMinutes`,1,l):g===0?s.formatDistance(`lessThanXMinutes`,1,l):s.formatDistance(`xMinutes`,g,l);if(g<45)return s.formatDistance(`xMinutes`,g,l);if(g<90)return s.formatDistance(`aboutXHours`,1,l);if(g<1440){let e=Math.round(g/60);return s.formatDistance(`aboutXHours`,e,l)}if(g<2520)return s.formatDistance(`xDays`,1,l);if(g<43200){let e=Math.round(g/n);return s.formatDistance(`xDays`,e,l)}if(g<86400)return _=Math.round(g/e),s.formatDistance(`aboutXMonths`,_,l);if(_=W(p,u),_<12){let t=Math.round(g/e);return s.formatDistance(`xMonths`,t,l)}{let e=_%12,t=Math.trunc(_/12);return e<3?s.formatDistance(`aboutXYears`,t,l):e<9?s.formatDistance(`overXYears`,t,l):s.formatDistance(`almostXYears`,t+1,l)}}function Wt(t,r,i){let a=o(),s=(i==null?void 0:i.locale)??a.locale??d,c=F(t,r);if(isNaN(c))throw RangeError(`Invalid time value`);let l=Object.assign({},i,{addSuffix:i==null?void 0:i.addSuffix,comparison:c}),[u,p]=f(i==null?void 0:i.in,...c>0?[r,t]:[t,r]),h=V((i==null?void 0:i.roundingMethod)??`round`),_=p.getTime()-u.getTime(),v=_/g,y=(_-(T(p)-T(u)))/g,ee=i==null?void 0:i.unit,b;if(b=ee||(v<1?`second`:v<60?`minute`:v<1440?`hour`:y<43200?`day`:y<525600?`month`:`year`),b===`second`){let e=h(_/1e3);return s.formatDistance(`xSeconds`,e,l)}if(b===`minute`){let e=h(v);return s.formatDistance(`xMinutes`,e,l)}if(b===`hour`){let e=h(v/60);return s.formatDistance(`xHours`,e,l)}if(b===`day`){let e=h(y/n);return s.formatDistance(`xDays`,e,l)}if(b===`month`){let t=h(y/e);return t===12&&ee!==`month`?s.formatDistance(`xYears`,1,l):s.formatDistance(`xMonths`,t,l)}{let e=h(y/m);return s.formatDistance(`xYears`,e,l)}}function Gt(e,t){return Ut(e,I(e),t)}function Kt(e,t){return Wt(e,I(e),t)}var qt=[`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`];function Jt(e,t){let n=o(),r=(t==null?void 0:t.locale)??n.locale??d,i=(t==null?void 0:t.format)??qt,a=(t==null?void 0:t.zero)??!1,s=(t==null?void 0:t.delimiter)??` `;return r.formatDistance?i.reduce((t,n)=>{let i=`x${n.replace(/(^.)/,e=>e.toUpperCase())}`,o=e[n];return o!==void 0&&(a||e[n])?t.concat(r.formatDistance(i,o)):t},[]).join(s):``}function Yt(e,t){let n=l(e,t==null?void 0:t.in);if(isNaN(+n))throw RangeError(`Invalid time value`);let r=(t==null?void 0:t.format)??`extended`,i=(t==null?void 0:t.representation)??`complete`,a=``,o=``,s=r===`extended`?`-`:``,c=r===`extended`?`:`:``;if(i!==`time`){let e=S(n.getDate(),2),t=S(n.getMonth()+1,2);a=`${S(n.getFullYear(),4)}${s}${t}${s}${e}`}if(i!==`date`){let e=n.getTimezoneOffset();if(e!==0){let t=Math.abs(e),n=S(Math.trunc(t/60),2),r=S(t%60,2);o=`${e<0?`+`:`-`}${n}:${r}`}else o=`Z`;let t=S(n.getHours(),2),r=S(n.getMinutes(),2),i=S(n.getSeconds(),2),s=a===``?``:`T`,l=[t,r,i].join(c);a=`${a}${s}${l}${o}`}return a}function Xt(e,t){let n=l(e,t==null?void 0:t.in);if(!C(n))throw RangeError(`Invalid time value`);let r=(t==null?void 0:t.format)??`extended`,i=(t==null?void 0:t.representation)??`complete`,a=``,o=r===`extended`?`-`:``,s=r===`extended`?`:`:``;if(i!==`time`){let e=S(n.getDate(),2),t=S(n.getMonth()+1,2);a=`${S(n.getFullYear(),4)}${o}${t}${o}${e}`}if(i!==`date`){let e=S(n.getHours(),2),t=S(n.getMinutes(),2),r=S(n.getSeconds(),2);a=`${a}${a===``?``:` `}${e}${s}${t}${s}${r}`}return a}function Zt(e){let{years:t=0,months:n=0,days:r=0,hours:i=0,minutes:a=0,seconds:o=0}=e;return`P${t}Y${n}M${r}DT${i}H${a}M${o}S`}function Qt(e,t){let n=l(e,t==null?void 0:t.in);if(!C(n))throw RangeError(`Invalid time value`);let r=(t==null?void 0:t.fractionDigits)??0,i=S(n.getDate(),2),a=S(n.getMonth()+1,2),o=n.getFullYear(),s=S(n.getHours(),2),c=S(n.getMinutes(),2),u=S(n.getSeconds(),2),d=``;if(r>0){let e=n.getMilliseconds(),t=Math.trunc(e*10**(r-3));d=`.`+S(t,r)}let f=``,p=n.getTimezoneOffset();if(p!==0){let e=Math.abs(p),t=S(Math.trunc(e/60),2),n=S(e%60,2);f=`${p<0?`+`:`-`}${t}:${n}`}else f=`Z`;return`${o}-${a}-${i}T${s}:${c}:${u}${d}${f}`}var $t=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],en=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function tn(e){let t=l(e);if(!C(t))throw RangeError(`Invalid time value`);return`${$t[t.getUTCDay()]}, ${S(t.getUTCDate(),2)} ${en[t.getUTCMonth()]} ${t.getUTCFullYear()} ${S(t.getUTCHours(),2)}:${S(t.getUTCMinutes(),2)}:${S(t.getUTCSeconds(),2)} GMT`}function nn(e,t,n){var r,i;let[a,s]=f(n==null?void 0:n.in,e,t),c=o(),l=(n==null?void 0:n.locale)??c.locale??d,u=(n==null?void 0:n.weekStartsOn)??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??c.weekStartsOn??((i=c.locale)==null||(i=i.options)==null?void 0:i.weekStartsOn)??0,p=k(a,s);if(isNaN(p))throw RangeError(`Invalid time value`);let m;m=p<-6?`other`:p<-1?`lastWeek`:p<0?`yesterday`:p<1?`today`:p<2?`tomorrow`:p<7?`nextWeek`:`other`;let h=l.formatRelative(m,a,s,{locale:l,weekStartsOn:u});return ce(a,h,{locale:l,weekStartsOn:u})}function rn(e,t){return l(e*1e3,t==null?void 0:t.in)}function J(e,t){return l(e,t==null?void 0:t.in).getDay()}function an(e,t){let n=l(e,t==null?void 0:t.in).getFullYear();return n%400==0||n%4==0&&n%100!=0}function on(e,t){let n=l(e,t==null?void 0:t.in);return Number.isNaN(+n)?NaN:an(n)?366:365}function sn(e,t){let n=l(e,t==null?void 0:t.in).getFullYear();return Math.floor(n/10)*10}function cn(e,t){let n=D(e,t),r=+D(_(n,60))-n;return Math.round(r/h)}function ln(e,t){let[n,i]=[+l(e.start),+l(e.end)].sort((e,t)=>e-t),[a,o]=[+l(t.start),+l(t.end)].sort((e,t)=>e-t);if(!(n<o&&a<i))return 0;let s=a<n?n:a,c=s-T(s),u=o>i?i:o,d=u-T(u);return Math.ceil((d-c)/r)}function un(e){return+l(e)}function dn(e){return Math.trunc(l(e)/1e3)}function fn(e,t){var n,r;let i=o(),a=(t==null?void 0:t.weekStartsOn)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,s=se(l(e,t==null?void 0:t.in));if(isNaN(s))return NaN;let c=a-J(x(e,t));c<=0&&(c+=7);let u=s-c;return Math.ceil(u/7)+1}function pn(e,t){let n=l(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),l(n,t==null?void 0:t.in)}function mn(e,t){let n=l(e,t==null?void 0:t.in);return z(pn(n,t),x(n,t),t)+1}function hn(e){return Math.trunc(e*p)}function gn(e){return Math.trunc(e*60)}function _n(e){return Math.trunc(e*t)}function vn(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);if(isNaN(+r))throw TypeError(`Start date is invalid`);if(isNaN(+i))throw TypeError(`End date is invalid`);if(n!=null&&n.assertPositive&&+r>+i)throw TypeError(`End date must be after start date`);return{start:r,end:i}}function yn(e,t){let{start:n,end:r}=K(t==null?void 0:t.in,e),i={},a=St(r,n);a&&(i.years=a);let o=N(n,{years:i.years}),s=W(r,o);s&&(i.months=s);let c=N(o,{months:i.months}),l=mt(r,c);l&&(i.days=l);let u=N(c,{days:i.days}),d=H(r,u);d&&(i.hours=d);let f=N(u,{hours:i.hours}),p=U(r,f);p&&(i.minutes=p);let m=G(r,N(f,{minutes:i.minutes}));return m&&(i.seconds=m),i}function bn(e,t,n){let r;return xn(t)?r=t:n=t,new Intl.DateTimeFormat(n==null?void 0:n.locale,r).format(l(e))}function xn(e){return e!==void 0&&!(`locale`in e)}function Sn(e,t,n){let r=0,i,[a,o]=f(n==null?void 0:n.in,e,t);if(n!=null&&n.unit)i=n==null?void 0:n.unit,i===`second`?r=G(a,o):i===`minute`?r=U(a,o):i===`hour`?r=H(a,o):i===`day`?r=k(a,o):i===`week`?r=z(a,o):i===`month`?r=L(a,o):i===`quarter`?r=R(a,o):i===`year`&&(r=B(a,o));else{let e=G(a,o);Math.abs(e)<60?(r=G(a,o),i=`second`):Math.abs(e)<3600?(r=U(a,o),i=`minute`):Math.abs(e)<86400&&Math.abs(k(a,o))<1?(r=H(a,o),i=`hour`):Math.abs(e)<604800&&(r=k(a,o))&&Math.abs(r)<7?i=`day`:Math.abs(e)<2629746?(r=z(a,o),i=`week`):Math.abs(e)<7889238?(r=L(a,o),i=`month`):Math.abs(e)<31556952&&R(a,o)<4?(r=R(a,o),i=`quarter`):(r=B(a,o),i=`year`)}return new Intl.RelativeTimeFormat(n==null?void 0:n.locale,{numeric:`auto`,...n}).format(r,i)}function Cn(e,t,n){let r=new Date(e,t,n);return r.getFullYear()===e&&r.getMonth()===t&&r.getDate()===n}function wn(e,t){return l(e,t==null?void 0:t.in).getDate()===1}function Tn(e,t){return l(e,t==null?void 0:t.in).getDay()===5}function En(e){return+l(e)>Date.now()}function Dn(e,t,n){return C(Re(e,t,new Date,n))}function On(e,t){return l(e,t==null?void 0:t.in).getDay()===1}function kn(e){return+l(e)<Date.now()}function An(e,t,n){return M(e,t,{...n,weekStartsOn:1})}function jn(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);return+D(r)==+D(i)}function Mn(e,t){let n=l(e,t==null?void 0:t.in);return n.setSeconds(0,0),n}function Nn(e,t){return+Mn(e)==+Mn(t)}function Pn(e,t,n){let[r,i]=f(n==null?void 0:n.in,e,t);return+q(r)==+q(i)}function Fn(e,t){let n=l(e,t==null?void 0:t.in);return n.setMilliseconds(0),n}function In(e,t){return+Fn(e)==+Fn(t)}function Ln(e,t){return we(l(e,t==null?void 0:t.in),I((t==null?void 0:t.in)||e))}function Rn(e,t){return An(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e))}function zn(e){return Nn(e,I(e))}function Bn(e,t){return We(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e))}function Vn(e,t){return Pn(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e))}function Hn(e){return In(e,I(e))}function Un(e,t){return M(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e),t)}function Wn(e,t){return Ne(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e))}function Gn(e,t){return l(e,t==null?void 0:t.in).getDay()===4}function Kn(e,t){return w(c((t==null?void 0:t.in)||e,e),I((t==null?void 0:t.in)||e))}function qn(e,t){return w(e,E(I((t==null?void 0:t.in)||e),1),t)}function Jn(e,t){return l(e,t==null?void 0:t.in).getDay()===2}function Yn(e,t){return l(e,t==null?void 0:t.in).getDay()===3}function Y(e,t,n){return E(e,-t,n)}function Xn(e,t){return w(c((t==null?void 0:t.in)||e,e),Y(I((t==null?void 0:t.in)||e),1))}function Zn(e,t){let n=l(e,t==null?void 0:t.in),r=n.getFullYear(),i=9+Math.floor(r/10)*10;return n.setFullYear(i+1,0,0),n.setHours(0,0,0,0),l(n,t==null?void 0:t.in)}function Qn(e,t){var n,r;let i=o(),a=(t==null?void 0:t.weekStartsOn)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,s=l(e,t==null?void 0:t.in),c=s.getDay(),u=(c<a?-7:0)+6-(c-a);return s.setHours(0,0,0,0),s.setDate(s.getDate()+u),s}function $n(e,t){return Qn(e,{...t,weekStartsOn:1})}function er(e,t){let n=O(e,t),r=c((t==null?void 0:t.in)||e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=A(r,t);return i.setDate(i.getDate()-1),i}function tr(e,t){let n=l(e,t==null?void 0:t.in),r=n.getMonth(),i=r-r%3+3;return n.setMonth(i,0),n.setHours(0,0,0,0),n}function nr(e,t){let n=l(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(0,0,0,0),n}var rr=/(\w)\1*|''|'(''|[^'])+('|$)|./g,ir=/^'([^]*?)'?$/,ar=/''/g,or=/[a-zA-Z]/;function sr(e,t){let n=l(e);if(!C(n))throw RangeError(`Invalid time value`);let r=t.match(rr);return r?r.map(e=>{if(e===`''`)return`'`;let t=e[0];if(t===`'`)return cr(e);let r=ae[t];if(r)return r(n,e);if(t.match(or))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e}).join(``):``}function cr(e){let t=e.match(ir);return t?t[1].replace(ar,`'`):e}function lr({years:e,months:t,weeks:n,days:r,hours:i,minutes:a,seconds:o}){let c=0;e&&(c+=e*s),t&&(c+=s/12*t),n&&(c+=n*7),r&&(c+=r);let l=c*24*60*60;return i&&(l+=i*60*60),a&&(l+=a*60),o&&(l+=o),Math.trunc(l*1e3)}function ur(e){let t=e/p;return Math.trunc(t)}function dr(e){let t=e/g;return Math.trunc(t)}function fr(e){let t=e/i;return Math.trunc(t)}function pr(e){let t=e/60;return Math.trunc(t)}function mr(e){return Math.trunc(e*g)}function hr(e){return Math.trunc(e*60)}function gr(e){let t=e/3;return Math.trunc(t)}function _r(e){let t=e/12;return Math.trunc(t)}function X(e,t,n){let r=t-J(e,n);return r<=0&&(r+=7),E(e,r,n)}function vr(e,t){return X(e,5,t)}function yr(e,t){return X(e,1,t)}function br(e,t){return X(e,6,t)}function xr(e,t){return X(e,0,t)}function Sr(e,t){return X(e,4,t)}function Cr(e,t){return X(e,2,t)}function wr(e,t){return X(e,3,t)}function Tr(e,t){let n=()=>c(t==null?void 0:t.in,NaN),r=(t==null?void 0:t.additionalDigits)??2,i=kr(e),a;if(i.date){let e=Ar(i.date,r);a=jr(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,u;if(i.time&&(s=Mr(i.time),isNaN(s)))return n();if(i.timezone){if(u=Pr(i.timezone),isNaN(u))return n()}else{let e=new Date(o+s),n=l(0,t==null?void 0:t.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return l(o+s+u,t==null?void 0:t.in)}var Z={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Er=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Dr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Or=/^([+-])(\d{2})(?::?(\d{2}))?$/;function kr(e){let t={},n=e.split(Z.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Z.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Z.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=Z.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function Ar(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function jr(e,t){if(t===null)return new Date(NaN);let n=e.match(Er);if(!n)return new Date(NaN);let r=!!n[4],i=Q(n[1]),a=Q(n[2])-1,o=Q(n[3]),s=Q(n[4]),c=Q(n[5])-1;if(r)return Br(t,s,c)?Fr(t,s,c):new Date(NaN);{let e=new Date(0);return!Rr(t,a,o)||!zr(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function Q(e){return e?parseInt(e):1}function Mr(e){let t=e.match(Dr);if(!t)return NaN;let n=Nr(t[1]),r=Nr(t[2]),i=Nr(t[3]);return Vr(n,r,i)?n*p+r*g+i*1e3:NaN}function Nr(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function Pr(e){if(e===`Z`)return 0;let t=e.match(Or);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Hr(r,i)?n*(r*p+i*g):NaN}function Fr(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Ir=[31,null,31,30,31,30,31,31,30,31,30,31];function Lr(e){return e%400==0||e%4==0&&e%100!=0}function Rr(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ir[t]||(Lr(e)?29:28))}function zr(e,t){return t>=1&&t<=(Lr(e)?366:365)}function Br(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Vr(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Hr(e,t){return t>=0&&t<=59}function Ur(e,t){let n=e.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return l(n?Date.UTC(+n[1],n[2]-1,+n[3],+n[4]-(+n[9]||0)*(n[8]==`-`?-1:1),+n[5]-(+n[10]||0)*(n[8]==`-`?-1:1),+n[6],+((n[7]||`0`)+`00`).substring(0,3)):NaN,t==null?void 0:t.in)}function $(e,t,n){let r=J(e,n)-t;return r<=0&&(r+=7),Y(e,r,n)}function Wr(e,t){return $(e,5,t)}function Gr(e,t){return $(e,1,t)}function Kr(e,t){return $(e,6,t)}function qr(e,t){return $(e,0,t)}function Jr(e,t){return $(e,4,t)}function Yr(e,t){return $(e,2,t)}function Xr(e,t){return $(e,3,t)}function Zr(e){return Math.trunc(e*3)}function Qr(e){let t=e/4;return Math.trunc(t)}function $r(e,t){let n=(t==null?void 0:t.nearestTo)??1;if(n<1||n>12)return c((t==null?void 0:t.in)||e,NaN);let r=l(e,t==null?void 0:t.in),i=r.getMinutes()/60,a=r.getSeconds()/60/60,o=r.getMilliseconds()/1e3/60/60,s=r.getHours()+i+a+o,u=V((t==null?void 0:t.roundingMethod)??`round`)(s/n)*n;return r.setHours(u,0,0,0),r}function ei(e,t){let n=(t==null?void 0:t.nearestTo)??1;if(n<1||n>30)return c(e,NaN);let r=l(e,t==null?void 0:t.in),i=r.getSeconds()/60,a=r.getMilliseconds()/1e3/60,o=r.getMinutes()+i+a,s=V((t==null?void 0:t.roundingMethod)??`round`)(o/n)*n;return r.setMinutes(s,0,0),r}function ti(e){let n=e/t;return Math.trunc(n)}function ni(e){return e*i}function ri(e){let t=e/60;return Math.trunc(t)}function ii(e,t,n){let r=l(e,n==null?void 0:n.in);return isNaN(+r)?c((n==null?void 0:n.in)||e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=Ve(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function ai(e,t,n){let r=l(e,n==null?void 0:n.in);return r.setMonth(0),r.setDate(t),r}function oi(e){let t={},n=o();for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]===void 0?delete t[n]:t[n]=e[n]);u(t)}function si(e,t,n){let r=l(e,n==null?void 0:n.in),i=t-(Math.trunc(r.getMonth()/3)+1);return Ve(r,r.getMonth()+i*3)}function ci(e,t,n){var r,i;let a=o(),s=(n==null?void 0:n.firstWeekContainsDate)??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??((i=a.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,u=k(l(e,n==null?void 0:n.in),Ye(e,n),n),d=c((n==null?void 0:n.in)||e,0);d.setFullYear(t,0,s),d.setHours(0,0,0,0);let f=Ye(d,n);return f.setDate(f.getDate()+u),f}function li(e,t){let n=l(e,t==null?void 0:t.in),r=n.getFullYear(),i=Math.floor(r/10)*10;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}function ui(e){return Ae(Date.now(),e)}function di(e){let t=I(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=c(e==null?void 0:e.in,0);return a.setFullYear(n,r,i+1),a.setHours(0,0,0,0),a}function fi(e){let t=I(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=I(e==null?void 0:e.in);return a.setFullYear(n,r,i-1),a.setHours(0,0,0,0),a}function pi(e,t,n){return j(e,-t,n)}function mi(e,t,n){let{years:r=0,months:i=0,weeks:a=0,days:o=0,hours:s=0,minutes:l=0,seconds:u=0}=t,d=Y(pi(e,i+r*12,n),o+a*7,n),f=(u+(l+s*60)*60)*1e3;return c((n==null?void 0:n.in)||e,+d-f)}function hi(e,t,n){return Qe(e,-t,n)}function gi(e,t,n){return Ce(e,-t,n)}function _i(e,t,n){return Pe(e,-t,n)}function vi(e,t,n){return Ue(e,-t,n)}function yi(e,t,n){return tt(e,-t,n)}function bi(e,t,n){return Te(e,-t,n)}function xi(e,t,n){return _(e,-t,n)}function Si(e,t,n){return de(e,-t,n)}function Ci(e){return Math.trunc(e*7)}function wi(e){return Math.trunc(e*s)}function Ti(e){return Math.trunc(e*12)}function Ei(e){return Math.trunc(e*4)}export{N as add,Qe as addBusinessDays,E as addDays,Ce as addHours,et as addISOWeekYears,Pe as addMilliseconds,Ue as addMinutes,j as addMonths,tt as addQuarters,Te as addSeconds,_ as addWeeks,de as addYears,nt as areIntervalsOverlapping,at as clamp,ot as closestIndexTo,st as closestTo,F as compareAsc,ct as compareDesc,c as constructFrom,I as constructNow,lt as daysToWeeks,ut as differenceInBusinessDays,k as differenceInCalendarDays,dt as differenceInCalendarISOWeekYears,ft as differenceInCalendarISOWeeks,L as differenceInCalendarMonths,R as differenceInCalendarQuarters,z as differenceInCalendarWeeks,B as differenceInCalendarYears,mt as differenceInDays,H as differenceInHours,_t as differenceInISOWeekYears,vt as differenceInMilliseconds,U as differenceInMinutes,W as differenceInMonths,bt as differenceInQuarters,G as differenceInSeconds,xt as differenceInWeeks,St as differenceInYears,Ct as eachDayOfInterval,wt as eachHourOfInterval,Tt as eachMinuteOfInterval,Et as eachMonthOfInterval,Dt as eachQuarterOfInterval,Ot as eachWeekOfInterval,kt as eachWeekendOfInterval,At as eachWeekendOfMonth,jt as eachWeekendOfYear,Mt as eachYearOfInterval,oe as endOfDay,Nt as endOfDecade,Pt as endOfHour,Ft as endOfISOWeek,It as endOfISOWeekYear,Lt as endOfMinute,ze as endOfMonth,Rt as endOfQuarter,zt as endOfSecond,Bt as endOfToday,Vt as endOfTomorrow,he as endOfWeek,re as endOfYear,Ht as endOfYesterday,ce as format,ce as formatDate,Ut as formatDistance,Wt as formatDistanceStrict,Gt as formatDistanceToNow,Kt as formatDistanceToNowStrict,Jt as formatDuration,Yt as formatISO,Xt as formatISO9075,Zt as formatISODuration,Qt as formatRFC3339,tn as formatRFC7231,nn as formatRelative,ne as formatters,rn as fromUnixTime,se as getDate,J as getDay,ie as getDayOfYear,je as getDaysInMonth,on as getDaysInYear,sn as getDecade,v as getDefaultOptions,Me as getHours,le as getISODay,ge as getISOWeek,O as getISOWeekYear,cn as getISOWeeksInYear,b as getMilliseconds,te as getMinutes,me as getMonth,ln as getOverlappingDaysInIntervals,pt as getQuarter,Ke as getSeconds,un as getTime,dn as getUnixTime,fe as getWeek,fn as getWeekOfMonth,y as getWeekYear,mn as getWeeksInMonth,ee as getYear,hn as hoursToMilliseconds,gn as hoursToMinutes,_n as hoursToSeconds,vn as interval,yn as intervalToDuration,bn as intlFormat,Sn as intlFormatDistance,pe as isAfter,qe as isBefore,ve as isDate,xe as isEqual,Cn as isExists,wn as isFirstDayOfMonth,Tn as isFriday,En as isFuture,yt as isLastDayOfMonth,an as isLeapYear,Dn as isMatch,On as isMonday,kn as isPast,w as isSameDay,we as isSameHour,An as isSameISOWeek,jn as isSameISOWeekYear,Nn as isSameMinute,We as isSameMonth,Pn as isSameQuarter,In as isSameSecond,M as isSameWeek,Ne as isSameYear,Xe as isSaturday,Ze as isSunday,Ln as isThisHour,Rn as isThisISOWeek,zn as isThisMinute,Bn as isThisMonth,Vn as isThisQuarter,Hn as isThisSecond,Un as isThisWeek,Wn as isThisYear,Gn as isThursday,Kn as isToday,qn as isTomorrow,Jn as isTuesday,C as isValid,Yn as isWednesday,P as isWeekend,Se as isWithinInterval,Xn as isYesterday,Zn as lastDayOfDecade,$n as lastDayOfISOWeek,er as lastDayOfISOWeekYear,pn as lastDayOfMonth,tr as lastDayOfQuarter,Qn as lastDayOfWeek,nr as lastDayOfYear,sr as lightFormat,ae as lightFormatters,ue as longFormatters,rt as max,lr as milliseconds,ur as millisecondsToHours,dr as millisecondsToMinutes,fr as millisecondsToSeconds,it as min,pr as minutesToHours,mr as minutesToMilliseconds,hr as minutesToSeconds,gr as monthsToQuarters,_r as monthsToYears,X as nextDay,vr as nextFriday,yr as nextMonday,br as nextSaturday,xr as nextSunday,Sr as nextThursday,Cr as nextTuesday,wr as nextWednesday,Re as parse,Tr as parseISO,Ur as parseJSON,Fe as parsers,$ as previousDay,Wr as previousFriday,Gr as previousMonday,Kr as previousSaturday,qr as previousSunday,Jr as previousThursday,Yr as previousTuesday,Xr as previousWednesday,Zr as quartersToMonths,Qr as quartersToYears,$r as roundToNearestHours,ei as roundToNearestMinutes,ti as secondsToHours,ni as secondsToMilliseconds,ri as secondsToMinutes,ii as set,Le as setDate,De as setDay,ai as setDayOfYear,oi as setDefaultOptions,be as setHours,Oe as setISODay,ye as setISOWeek,$e as setISOWeekYear,ke as setMilliseconds,Be as setMinutes,Ve as setMonth,si as setQuarter,Ie as setSeconds,Ge as setWeek,ci as setWeekYear,He as setYear,Ae as startOfDay,li as startOfDecade,Ee as startOfHour,A as startOfISOWeek,D as startOfISOWeekYear,Mn as startOfMinute,x as startOfMonth,q as startOfQuarter,Fn as startOfSecond,ui as startOfToday,di as startOfTomorrow,a as startOfWeek,Ye as startOfWeekYear,_e as startOfYear,fi as startOfYesterday,mi as sub,hi as subBusinessDays,Y as subDays,gi as subHours,gt as subISOWeekYears,_i as subMilliseconds,vi as subMinutes,pi as subMonths,yi as subQuarters,bi as subSeconds,xi as subWeeks,Si as subYears,l as toDate,Je as transpose,Ci as weeksToDays,wi as yearsToDays,Ti as yearsToMonths,Ei as yearsToQuarters};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=365.2425,t=6048e5,n=864e5,r=6e4,i=36e5,a=1e3,o=525600,s=43200,c=1440,l=3600,u=l*24,d=u*7,f=u*e,p=f/12,m=p*3,h=Symbol.for(`constructDateFrom`);function g(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&h in e?e[h](t):e instanceof Date?new e.constructor(t):new Date(t)}function _(e,t){return g(t||e,e)}var v={};function y(){return v}function b(e){v=e}function x(e,t){var n,r;let i=y(),a=(t==null?void 0:t.weekStartsOn)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=_(e,t==null?void 0:t.in),s=o.getDay(),c=(s<a?7:0)+s-a;return o.setDate(o.getDate()-c),o.setHours(0,0,0,0),o}function S(e,...t){let n=g.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var C={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},w=(e,t,n)=>{let r,i=C[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function T(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var E={date:T({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:T({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:T({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},D={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},O=(e,t,n,r)=>D[e];function k(e){return(t,n)=>{let r=n!=null&&n.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n!=null&&n.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var A={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:k({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:k({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:k({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:k({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:k({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function j(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?N(s,e=>e.test(o)):M(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function M(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function N(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function P(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var F={ordinalNumber:P({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:j({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:j({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:j({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:j({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:j({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},I={code:`en-US`,formatDistance:w,formatLong:E,formatRelative:O,localize:A,match:F,options:{weekStartsOn:0,firstWeekContainsDate:1}};export{f as A,s as C,p as D,l as E,m as O,c as S,u as T,n as _,A as a,a as b,T as c,x as d,y as f,e as g,g as h,j as i,d as k,w as l,_ as m,F as n,k as o,b as p,P as r,O as s,I as t,S as u,i as v,o as w,t as x,r as y};
|