iobroker.javascript 10.1.1 → 10.1.3
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/README.md +21 -6
- package/admin/assets/{AiChatPanel-C_WbKMGX.js → AiChatPanel-rQsCR89v.js} +11 -11
- package/admin/assets/AiDiffView-BoglEOaq.js +1 -0
- package/admin/assets/{Debugger-DAdJnEhw.js → Debugger-Bj4PsKNm.js} +4 -4
- package/admin/assets/Error-RANTMuGx.js +1 -0
- package/admin/assets/Import-CJgQwwNY.js +1 -0
- package/admin/assets/RulesEditor-BcGsf9n4.css +1 -0
- package/admin/assets/RulesEditor-PYpUIg7N.js +1 -0
- package/admin/assets/{ScriptEditor-CZSc7rwE.js → ScriptEditor-C6ekGK_v.js} +2 -2
- package/admin/assets/{ScriptEditorVanillaMonaco-DEKg14_A.js → ScriptEditorVanillaMonaco-BzazJaUa.js} +3 -3
- package/admin/assets/{_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DPmwd_G2.js → _virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-CL_S1FIh.js} +1 -1
- package/admin/assets/{_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-C8inUeKt.js → _virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BAOcdAz5.js} +92 -92
- package/admin/assets/{_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-VcQjt7_9.js → _virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DdX5BXjB.js} +1 -1
- package/admin/assets/aiPromptBuilder-a2bvj40X.js +1 -0
- package/admin/assets/blocks_action-CaHoI2vK.js +1 -0
- package/admin/assets/{blocks_convert-CX0i-JfS.js → blocks_convert-Dno4Uyat.js} +2 -2
- package/admin/assets/{blocks_logic-D-QSzw95.js → blocks_logic-C4MPyL6T.js} +1 -1
- package/admin/assets/{blocks_number-D7JuNYsw.js → blocks_number-BMu9V-ca.js} +1 -1
- package/admin/assets/blocks_object-vU59tx8A.js +1 -0
- package/admin/assets/{blocks_procedures-BJMz6HWW.js → blocks_procedures-CfhGGNAK.js} +1 -1
- package/admin/assets/{blocks_sendto-DRh7lk9o.js → blocks_sendto-oZjHfEt6.js} +3 -3
- package/admin/assets/{blocks_switch-BfmboMex.js → blocks_switch-DtRe2uV0.js} +1 -1
- package/admin/assets/blocks_system-CWkKMHLd.js +1 -0
- package/admin/assets/{blocks_text-CGbR0Ozw.js → blocks_text-CunCNUrR.js} +1 -1
- package/admin/assets/blocks_time-B_Duc9-g.js +1 -0
- package/admin/assets/blocks_timeout-B5PA_0Xv.js +1 -0
- package/admin/assets/blocks_trigger-BePNP-VV.js +2 -0
- package/admin/assets/blocks_words-bpwd7Ia0.js +1 -0
- package/admin/assets/{cronHoverProvider-DpgESCox.js → cronHoverProvider-COaB74MF.js} +1 -1
- package/admin/assets/dist-BF-PlO2i.js +4 -0
- package/admin/assets/{field_cron-B40zwSfJ.js → field_cron-BkiRQvy7.js} +1 -1
- package/admin/assets/{field_oid-KfoBnEM9.js → field_oid-pEOMkwS7.js} +1 -1
- package/admin/assets/{field_script-yXhe1iCp.js → field_script-D8TaeXTc.js} +1 -1
- package/admin/assets/{helpers-B0ByElPJ.js → helpers-Cbd0K4kn.js} +1 -1
- package/admin/assets/{hostInit-9REPDUe7.js → hostInit-PWanFl0v.js} +1 -1
- package/admin/assets/index-4M2aGX3M.js +871 -0
- package/admin/assets/{inlineChatWidget-B9y_gQcH.js → inlineChatWidget-CmSJN0Rv.js} +1 -1
- package/admin/assets/{inlineDiffController-C07CdIFo.js → inlineDiffController-CauFSimb.js} +1 -1
- package/admin/assets/{mf-entry-bootstrap-0-efcb49d3.js → mf-entry-bootstrap-0-66751765.js} +2 -2
- package/admin/assets/{stateHoverProvider-CqeoOjXs.js → stateHoverProvider-g3dqXZ8K.js} +1 -1
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-Dc9L2TVn.js +1 -0
- package/admin/custom/assets/{Components-BCQTjBgm.js → Components-uxORfFYU.js} +1 -1
- package/admin/custom/assets/{_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-BuAc8OyX.js → _virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-Bd9Y-jyc.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-aRlxyEhq.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DMefPDeL.js} +92 -92
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-DQwzYx75.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-D81YCXgE.js} +65 -65
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-xxszBNje.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CxkJmLDG.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-Tq7tesSS.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-BNLW3sTg.js} +1 -1
- package/admin/custom/assets/{hostInit-CHwrowP4.js → hostInit-CxnK2NMF.js} +1 -1
- package/admin/custom/assets/{index-Cm6xl9K4.js → index-CHg-uG3r.js} +1 -1
- package/admin/custom/assets/{lib-bhrFL6jR.js → lib-D4Fc4r7w.js} +1 -1
- package/admin/custom/assets/{mf-entry-bootstrap-0-f08941e2.js → mf-entry-bootstrap-0-16561517.js} +2 -2
- package/admin/custom/assets/{setYear-DzTZ2h9A.js → setYear-Dhce8K9j.js} +1 -1
- package/admin/custom/assets/virtualExposes-DUFP2Erj.js +1 -0
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-jnBHXUID.js +1 -0
- package/admin/custom/assets/{virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-C3ImybiM.js → virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-PH1CCUgS.js} +2 -2
- package/admin/custom/customComponents.js +2 -2
- package/admin/mf-manifest.json +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/remoteEntry.js +2 -2
- package/admin/tab.html +4 -4
- package/build/lib/mirror.js +21 -4
- package/build/lib/mirror.js.map +1 -1
- package/build/lib/sandbox.js +59 -31
- package/build/lib/sandbox.js.map +1 -1
- package/build/lib/tools.js +13 -0
- package/build/lib/tools.js.map +1 -1
- package/build/main.js +3 -0
- package/build/main.js.map +1 -1
- package/docs/en/javascript.md +11 -0
- package/io-package.json +27 -27
- package/package.json +4 -4
- package/admin/assets/AiDiffView-BtXbDWZ8.js +0 -1
- package/admin/assets/Error-DQ1pzKcf.js +0 -1
- package/admin/assets/Import-BjMtH6Gk.js +0 -1
- package/admin/assets/RulesEditor-dDRPHw4X.js +0 -1
- package/admin/assets/RulesEditor-k-DMHotH.css +0 -1
- package/admin/assets/aiPromptBuilder-D5FDo74i.js +0 -1
- package/admin/assets/back-CXiqI7Po.jpg +0 -0
- package/admin/assets/blocks_action-BqfWEwpf.js +0 -1
- package/admin/assets/blocks_object-C9DzAlc7.js +0 -1
- package/admin/assets/blocks_system-B-78JfAc.js +0 -1
- package/admin/assets/blocks_time-5vS2geJg.js +0 -1
- package/admin/assets/blocks_timeout-BdaTywfN.js +0 -1
- package/admin/assets/blocks_trigger-D8kgHKbg.js +0 -2
- package/admin/assets/blocks_words-BhHIf_1o.js +0 -1
- package/admin/assets/dist-CaOsN0XW.js +0 -4
- package/admin/assets/index-07o_WKsX.js +0 -726
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-BwSvIKEV.js +0 -1
- package/admin/custom/assets/virtualExposes-B5LJmnfO.js +0 -1
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-ML-chjs6.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lib-
|
|
2
|
-
import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,O as f,P as p,S as m,T as h,V as g,_,b as v,j as y,k as b,p as x,v as S,w as C,x as w,y as T}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BGJv4zZP.js";import{$ as E,$n as D,$t as O,A as k,An as A,Ar as j,At as M,B as N,Bn as ee,Br as P,Bt as F,C as I,Cn as te,Cr as L,Ct as ne,D as R,Dn as z,Dr as B,Dt as re,E as ie,En as ae,Er as oe,Et as V,F as se,Fr as ce,Ft as H,G as U,Gn as le,Gt as ue,H as de,Hn as fe,Hr as pe,Ht as W,I as me,In as he,Ir as ge,It as _e,J as ve,Jn as ye,Jt as be,K as xe,Kn as Se,Kt as Ce,L as we,Ln as Te,Lr as G,Lt as Ee,M as De,Mn as Oe,Mr as ke,Mt as Ae,N as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,On as Ie,Or as Le,Ot as Re,P as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qn as We,Qt as Ge,R as Ke,Rn as qe,Rr as Je,Rt as Ye,S as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Tn as tt,Tr as nt,Tt as rt,U as it,Un as at,Ut as ot,V as st,Vn as ct,Vt as lt,W as ut,Wn as dt,Wt as ft,X as pt,Xn as mt,Xt as ht,Y as gt,Yn as _t,Yt as vt,Z as yt,Zn as bt,Zt as xt,_ as St,_n as Ct,_r as K,_t as wt,a as Tt,an as Et,ar as Dt,at as Ot,b as kt,bn as At,br as q,bt as jt,c as Mt,cn as Nt,cr as Pt,ct as Ft,d as It,dn as Lt,dr as Rt,dt as zt,en as Bt,er as Vt,et as Ht,f as Ut,fn as Wt,fr as Gt,ft as Kt,g as qt,gn as Jt,gr as Yt,gt as Xt,h as Zt,hn as Qt,hr as $t,ht as en,i as tn,in as nn,ir as rn,it as an,j as on,jn as sn,jr as cn,k as ln,kn as un,kr as dn,kt as fn,l as J,ln as pn,lr as mn,lt as hn,m as gn,mn as _n,mr as vn,mt as yn,n as bn,nn as xn,nr as Sn,nt as Cn,o as wn,on as Tn,or as En,ot as Dn,p as On,pn as kn,pr as An,pt as jn,q as Mn,qn as Nn,qt as Pn,r as Fn,rn as In,rr as Ln,rt as Rn,s as zn,sn as Bn,sr as Vn,st as Hn,t as Un,tn as Wn,tr as Gn,tt as Kn,u as qn,un as Jn,ur as Yn,ut as Xn,vn as Zn,vt as Qn,w as $n,wn as er,wr as Y,wt as tr,x as nr,xn as rr,xr as ir,xt as ar,y as or,yn as sr,yr as cr,yt as lr,z as ur,zn as dr,zt as fr}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lib-D4Fc4r7w.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,O as f,P as p,S as m,T as h,V as g,_,b as v,j as y,k as b,p as x,v as S,w as C,x as w,y as T}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BGJv4zZP.js";import{$ as E,$n as D,$t as O,A as k,An as A,Ar as j,At as M,B as N,Bn as ee,Br as P,Bt as F,C as I,Cn as te,Cr as L,Ct as ne,D as R,Dn as z,Dr as B,Dt as re,E as ie,En as ae,Er as oe,Et as V,F as se,Fr as ce,Ft as H,G as U,Gn as le,Gt as ue,H as de,Hn as fe,Hr as pe,Ht as W,I as me,In as he,Ir as ge,It as _e,J as ve,Jn as ye,Jt as be,K as xe,Kn as Se,Kt as Ce,L as we,Ln as Te,Lr as G,Lt as Ee,M as De,Mn as Oe,Mr as ke,Mt as Ae,N as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,On as Ie,Or as Le,Ot as Re,P as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qn as We,Qt as Ge,R as Ke,Rn as qe,Rr as Je,Rt as Ye,S as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Tn as tt,Tr as nt,Tt as rt,U as it,Un as at,Ut as ot,V as st,Vn as ct,Vt as lt,W as ut,Wn as dt,Wt as ft,X as pt,Xn as mt,Xt as ht,Y as gt,Yn as _t,Yt as vt,Z as yt,Zn as bt,Zt as xt,_ as St,_n as Ct,_r as K,_t as wt,a as Tt,an as Et,ar as Dt,at as Ot,b as kt,bn as At,br as q,bt as jt,c as Mt,cn as Nt,cr as Pt,ct as Ft,d as It,dn as Lt,dr as Rt,dt as zt,en as Bt,er as Vt,et as Ht,f as Ut,fn as Wt,fr as Gt,ft as Kt,g as qt,gn as Jt,gr as Yt,gt as Xt,h as Zt,hn as Qt,hr as $t,ht as en,i as tn,in as nn,ir as rn,it as an,j as on,jn as sn,jr as cn,k as ln,kn as un,kr as dn,kt as fn,l as J,ln as pn,lr as mn,lt as hn,m as gn,mn as _n,mr as vn,mt as yn,n as bn,nn as xn,nr as Sn,nt as Cn,o as wn,on as Tn,or as En,ot as Dn,p as On,pn as kn,pr as An,pt as jn,q as Mn,qn as Nn,qt as Pn,r as Fn,rn as In,rr as Ln,rt as Rn,s as zn,sn as Bn,sr as Vn,st as Hn,t as Un,tn as Wn,tr as Gn,tt as Kn,u as qn,un as Jn,ur as Yn,ut as Xn,vn as Zn,vt as Qn,w as $n,wn as er,wr as Y,wt as tr,x as nr,xn as rr,xr as ir,xt as ar,y as or,yn as sr,yr as cr,yt as lr,z as ur,zn as dr,zt as fr}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DMefPDeL.js";var pr=`FEDERATION_DEBUG`,mr={AT:`@`,HYPHEN:`-`,SLASH:`/`},hr={[mr.AT]:`scope_`,[mr.HYPHEN]:`_`,[mr.SLASH]:`__`};hr[mr.AT],mr.AT,hr[mr.HYPHEN],mr.HYPHEN,hr[mr.SLASH],mr.SLASH;var gr=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function _r(){return!0}function vr(){var e;return typeof navigator<`u`&&((e=navigator)==null?void 0:e.product)===`ReactNative`}function yr(){try{if(_r()&&window.localStorage)return!!localStorage.getItem(pr)}catch{return!1}return!1}function br(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:yr()}var xr=`[ Federation Runtime ]`,Sr=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function Cr(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!_r()&&!vr()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``)}var wr=e=>{console.warn(`${xr}: ${e}`)};function Tr(e){try{return JSON.stringify(e,null,2)}catch{return``}}var Er=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function Dr(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function Or(e,t={}){var n;let{remotes:r={},overrides:i={},version:a}=t,o,s=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&a?Dr(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(i),l={};Object.keys(r).length||(l=((n=e.remotes)==null?void 0:n.reduce((e,t)=>{let n,r=t.federationContainerName;return n=c.includes(r)?i[r]:`version`in t?t.version:t.entry,e[r]={matchedVersion:n},e},{}))||{}),Object.keys(r).forEach(e=>l[e]={matchedVersion:c.includes(e)?i[e]:r[e]});let{remoteEntry:{path:u,name:d,type:f},types:p={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:m},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:_}=e,v={version:a||``,buildVersion:m,globalName:h,remoteEntry:Er(u,d),remoteEntryType:f,remoteTypes:Er(p.path,p.name),remoteTypesZip:p.zip||``,remoteTypesAPI:p.api||``,remotesInfo:l,shared:e==null?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:_==null?void 0:_.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(o={...v,publicPath:s()},typeof e.metaData.ssrPublicPath==`string`&&(o.ssrPublicPath=e.metaData.ssrPublicPath)):o={...v,getPublicPath:s()},g){let e=Er(g.path,g.name);o.ssrRemoteEntry=e,o.ssrRemoteEntryType=g.type||`commonjs-module`}return o}function kr(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var Ar=`[ Module Federation ]`,jr=console,Mr=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function Nr(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
3
3
|
`),n=t.filter(e=>!Mr.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
4
4
|
`)}`:void 0}catch{return}}var Pr=class{constructor(e,t=jr){this.prefix=e,this.delegate=t??jr}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??jr}emit(e,t){let n=this.delegate,r=br()?Nr():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=jr[e];if(typeof t==`function`){t.call(jr,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){br()&&this.emit(`debug`,e)}};function Fr(e){return new Pr(e)}function Ir(e){let t=new Pr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}Fr(Ar),Ir(Ar);async function Lr(e,t){try{return await e()}catch(e){!t&&wr(e);return}}function Rr(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function zr(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&Rr(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=(n==null?void 0:n.type)===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&Rr(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else o?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(o)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,Lr(()=>{let{needDeleteScript:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function Br(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&Rr(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,Lr(()=>{let{needDeleteLink:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function Vr(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=zr({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var Hr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,Ur=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(Hr(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
5
|
-
`)};function Wr(e,t,n,r,i,a){return r(Ur(e,t,n,i))}var Gr=`[ Federation Runtime ]`,Kr=Fr(Gr);function qr(e,t,n,r,i){e||(n===void 0?Jr(t):Jr(t,n,r,void 0,i))}function Jr(e,t,n,r,i){if(t!==void 0)return Wr(e,t,n??{},e=>{throw Error(`${Gr}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(Gr)||(a.message=`${Gr}: ${a.message}`),a):Error(`${Gr}: ${a}`)}function Yr(e){e instanceof Error&&(e.message.startsWith(Gr)||(e.message=`${Gr}: ${e.message}`)),Kr.warn(e)}function Xr(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function Zr(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Qr(e){return e.entry!==void 0}function $r(e){return!e.entry.includes(`.json`)}function ei(e){return e&&typeof e==`object`}var ti=Object.prototype.toString;function ni(e){return ti.call(e)===`[object Object]`}function ri(e){return Array.isArray(e)?e:[e]}function ii(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var ai=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},oi=typeof globalThis==`object`?globalThis:window,si=(()=>{try{return document.defaultView}catch{return oi}})(),ci=si;function li(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function ui(e,t){return Object.hasOwnProperty.call(e,t)}ui(oi,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||li(oi,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var di=oi.__GLOBAL_LOADING_REMOTE_ENTRY__;function fi(e){ui(e,`__VMOK__`)&&!ui(e,`__FEDERATION__`)&&li(e,`__FEDERATION__`,e.__VMOK__),ui(e,`__FEDERATION__`)||(li(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),li(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}fi(oi),fi(si);function pi(){oi.__FEDERATION__.__GLOBAL_PLUGIN__=[],oi.__FEDERATION__.__INSTANCES__=[],oi.__FEDERATION__.moduleInfo={},oi.__FEDERATION__.__SHARE__={},oi.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(di).forEach(e=>{delete di[e]})}function mi(e){oi.__FEDERATION__.__INSTANCES__.push(e)}function hi(){return oi.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function gi(e,t=br()){t&&(oi.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,oi.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.8.2`)}function _i(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}Jr(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var vi=()=>si.__FEDERATION__.moduleInfo,yi=(e,t)=>{let n=_i(t,Zr(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=Zr(n),i=_i(si.__FEDERATION__.moduleInfo,r).value;if((i==null?void 0:i.version)===t)return i}},bi=e=>yi(e,si.__FEDERATION__.moduleInfo),xi=(e,t)=>{let n=Zr(e);return si.__FEDERATION__.moduleInfo[n]=t,si.__FEDERATION__.moduleInfo},Si=e=>(si.__FEDERATION__.moduleInfo={...si.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete si.__FEDERATION__.moduleInfo[e]}),Ci=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:oi[n]}},wi=e=>{let{__GLOBAL_PLUGIN__:t}=si.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):Yr(`The plugin ${e.name} has been registered.`)})},Ti=()=>si.__FEDERATION__.__GLOBAL_PLUGIN__,Ei=e=>oi.__FEDERATION__.__PRELOADED_MAP__.get(e),Di=e=>oi.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Oi=`[0-9A-Za-z-]+`,ki=`(?:\\+(${Oi}(?:\\.${Oi})*))`,Ai=`0|[1-9]\\d*`,ji=`[0-9]+`,Mi=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ni=`(?:${ji}|${Mi})`,Pi=`(?:-?(${Ni}(?:\\.${Ni})*))`,Fi=`(?:${Ai}|${Mi})`,Ii=`(?:-(${Fi}(?:\\.${Fi})*))`,Li=`${Ai}|x|X|\\*`,Ri=`[v=\\s]*(${Li})(?:\\.(${Li})(?:\\.(${Li})(?:${Ii})?${ki}?)?)?`,zi=`^\\s*(${Ri})\\s+-\\s+(${Ri})\\s*$`,Bi=`[v=\\s]*${`(${ji})\\.(${ji})\\.(${ji})`}${Pi}?${ki}?`,Vi=`((?:<|>)?=?)`,Hi=`(\\s*)${Vi}\\s*(${Bi}|${Ri})`,Ui=`(?:~>?)`,Wi=`(\\s*)${Ui}\\s+`,Gi=`(?:\\^)`,Ki=`(\\s*)${Gi}\\s+`,qi=`(<|>)?=?\\s*\\*`,Ji=`^${Gi}${Ri}$`,Yi=`v?${`(${Ai})\\.(${Ai})\\.(${Ai})`}${Ii}?${ki}?`,Xi=`^${Ui}${Ri}$`,Zi=`^${Vi}\\s*${Ri}$`,Qi=`^${Vi}\\s*(${Yi})$|^$`,$i=`^\\s*>=\\s*0.0.0\\s*$`;function ea(e){return new RegExp(e)}function ta(e){return!e||e.toLowerCase()===`x`||e===`*`}function na(...e){return t=>e.reduce((e,t)=>t(e),t)}function ra(e){return e.match(ea(Qi))}function ia(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function aa(e){return e.replace(ea(zi),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=ta(n)?``:ta(r)?`>=${n}.0.0`:ta(i)?`>=${n}.${r}.0`:`>=${t}`,s=ta(c)?``:ta(l)?`<${Number(c)+1}.0.0-0`:ta(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function oa(e){return e.replace(ea(Hi),`$1$2$3`)}function sa(e){return e.replace(ea(Wi),`$1~`)}function ca(e){return e.replace(ea(Ki),`$1^`)}function la(e){return e.trim().split(/\s+/).map(e=>e.replace(ea(Ji),(e,t,n,r,i)=>ta(t)?``:ta(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ta(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function ua(e){return e.trim().split(/\s+/).map(e=>e.replace(ea(Xi),(e,t,n,r,i)=>ta(t)?``:ta(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ta(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function da(e){return e.split(/\s+/).map(e=>e.trim().replace(ea(Zi),(e,t,n,r,i,a)=>{let o=ta(n),s=o||ta(r),c=s||ta(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function fa(e){return e.trim().replace(ea(qi),``)}function pa(e){return e.trim().replace(ea($i),``)}function ma(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function ha(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?ma(t,i):-1:1}return 0}function ga(e,t){return ma(e.major,t.major)||ma(e.minor,t.minor)||ma(e.patch,t.patch)||ha(e,t)}function _a(e,t){return e.version===t.version}function va(e,t){switch(e.operator){case``:case`=`:return _a(e,t);case`>`:return ga(e,t)<0;case`>=`:return _a(e,t)||ga(e,t)<0;case`<`:return ga(e,t)>0;case`<=`:return _a(e,t)||ga(e,t)>0;case void 0:return!0;default:return!1}}function ya(e){return na(la,ua,da,fa)(e)}function ba(e){return na(aa,oa,sa,ca)(e.trim()).split(/\s+/).join(` `)}function xa(e,t){if(!e)return!1;let n=ra(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ia(i,a,o,s),major:i,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=ba(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>ya(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>pa(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ra(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!va({operator:n,version:ia(r,a,o,s),major:r,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Sa=`default`,Ca=`global`;function wa(e,t,n,r){var i,a;let o;return o=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{Jr(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(i=e.shareConfig)!=null&&i.eager&&(a=e.treeShaking)!=null&&a.mode&&Jr(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??gr.UNKNOWN,useIn:[]}:void 0}}function Ta(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=ri(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(wa(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function Ea(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===gr.NO_USE?!1:n===gr.CALCULATED?!0:r===`runtime-infer`?!t||ja(e,t):!1}function Da(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!xa(n(e),`<=${n(t)}`)}var Oa=(e,t)=>{let n=t||function(e,t){return Da(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},ka=e=>!!e.loaded||typeof e.lib==`function`,Aa=e=>!!e.loading,ja=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Ma(e,t,n,r){let i=e[t][n],a=``,o=Ea(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!ka(i[e].treeShaking)&&Da(e,t):!1:!0:!ka(i[e])&&Da(e,t)};if(o){if(a=Oa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Oa(e[t][n],s),useTreesShaking:o}}var Na=e=>ka(e)||Aa(e);function Pa(e,t,n,r){let i=e[t][n],a=``,o=Ea(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(Na(i[t].treeShaking))return!Na(i[e].treeShaking)||!!Da(e,t);if(Na(i[e].treeShaking))return!1}return Na(i[t])?!Na(i[e])||!!Da(e,t):!Na(i[e])&&Da(e,t)};if(o){if(a=Oa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Oa(e[t][n],s),useTreesShaking:o}}function Fa(e){return e===`loaded-first`?Pa:Ma}function Ia(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Sa,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=Fa(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:ci.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!xa(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?Jr(e):Yr(e)}return{shared:r,useTreesShaking:u}}{if(c===!1||c===`*`||xa(l,c))return{shared:r,useTreesShaking:u};let n=Ea(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(Ea(i.treeShaking,s==null?void 0:s.usedExports)&&xa(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(xa(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function La(){return ci.__FEDERATION__.__SHARE__}function Ra(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=(n==null?void 0:n.resolver)??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[Oa(t,function(e,n){return!ka(t[e])&&Da(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n==null?void 0:n.customShareInfo)}var za=(e,t)=>{e.useIn||=[],Xr(e.useIn,t)};function Ba(e,t){return t&&e.treeShaking?e.treeShaking:e}function Va(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Ha(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ua(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Wa=`RUNTIME-001`,Ga=`RUNTIME-002`,Ka=`RUNTIME-003`,qa=`RUNTIME-004`,Ja=`RUNTIME-005`,Ya=`RUNTIME-006`,Xa=`RUNTIME-007`,Za=`RUNTIME-008`,Qa=`RUNTIME-009`,$a=`RUNTIME-010`,eo=`RUNTIME-011`,to=`RUNTIME-012`,no=`RUNTIME-013`,ro=`RUNTIME-014`,io=`RUNTIME-015`,ao=`TYPE-001`,oo=`BUILD-001`,so=`BUILD-002`,co={[Wa]:`Failed to get remoteEntry exports.`,[Ga]:`The remote entry interface does not contain "init"`,[Ka]:`Failed to get manifest.`,[qa]:`Failed to locate remote.`,[Ja]:`Invalid loadShareSync function call from bundler runtime`,[Ya]:`Invalid loadShareSync function call from runtime`,[Xa]:`Failed to get remote snapshot.`,[Za]:`Failed to load script resources.`,[Qa]:`Please call createInstance first.`,[$a]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[eo]:`The remoteEntry URL is missing from the remote snapshot.`,[to]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[no]:`The manifest is not a valid Module Federation manifest.`,[ro]:`The remote does not expose the requested module.`,[io]:`Remote container initialization failed.`},lo={[ao]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},uo={[oo]:`Failed to find expose module.`,[so]:`PublicPath is required in prod mode.`};({...co,...lo,...uo});var fo=`.then(callbacks[0]).catch(callbacks[1])`,po=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function mo(e){return e instanceof TypeError&&po.some(t=>e.message.includes(t))}function ho(e){return e===`esm`||e===`module`}async function go({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((a,o)=>{let s=e=>{if(mo(e)){let t=e instanceof Error?e.message:String(e);try{Jr(Za,co,{remoteName:n,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=r?r(e):e;try{t?a(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${fo}`)([a,s]):i(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){Jr(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function _o({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${fo}`)([n,r])}catch(t){Jr(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function vo(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ci(e,t);return i||Jr(Wa,co,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function yo({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ci(e,t);if(s)return s;let c=a?a(n):n;return Vr(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>vo(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);Jr(Za,co,{remoteName:e,resourceUrl:c},n)})}async function bo({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return ho(c)?go({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?_o({entry:a,remoteEntryExports:t}):yo({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function xo(e){let{entry:t,name:n}=e;return Sr(n,t)}async function So(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=xo(r);if(n)return n;if(!di[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;di[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||bo({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=xo(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>So({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:di,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return di[s]}function Co(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function wo(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function To(e,t){let n=Ti(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e!=null&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function Eo(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function Do(e){var t,n;let r={};for(let[t,n]of Object.entries(e.shared)){var i,a,o,s;let e=n[0];e&&(r[t]={version:e.version,singleton:(i=e.shareConfig)==null?void 0:i.singleton,requiredVersion:((a=e.shareConfig)==null?void 0:a.requiredVersion)===!1?!1:(o=e.shareConfig)==null?void 0:o.requiredVersion,eager:e.eager,strictVersion:(s=e.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((t=e.remotes)==null?void 0:t.length)>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:((n=e.remotes)==null?void 0:n.map(Eo))??[],shared:r}}}function Oo(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function ko(e,t){return t.map(t=>{let n=Ua(e,t.nameOrAlias);return qr(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Tr({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Oo(t)}})}function Ao(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function jo(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function Mo(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function No(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i!=null&&i.remoteEntryExports)return Mo(r,a,`cached`);try{if(!await So({origin:e,remoteInfo:n,remoteEntryExports:i==null?void 0:i.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return Mo(r,a,`success`)}catch(e){return Mo(r,a,jo(e)?`timeout`:`error`,e)}}function Po({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=Br({url:n,cb:()=>{o(Mo(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Fo({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=zr({url:n,cb:()=>{a(Mo(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Io(e,t){return{...e,resourceType:t}}function Lo(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(No(t,e,r,Io(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,context:Io(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:Io(i,`css`)}))})}let n=Fo,l={fetchpriority:`high`,type:`text/javascript`};r?(n=Po,l={rel:`preload`,as:`script`}):ho(e.type)&&(n=Po,l={rel:`modulepreload`,fetchpriority:`high`}),o.forEach(r=>{c.push(n({host:t,remoteInfo:e,url:r,attrs:l,context:Io(i,`js`)}))})}return Promise.all(c)}var Ro={global:{Global:ci,nativeGlobal:si,resetFederationGlobalInfo:pi,setGlobalFederationInstance:mi,getGlobalFederationConstructor:hi,setGlobalFederationConstructor:gi,getInfoWithoutType:_i,getGlobalSnapshot:vi,getTargetSnapshotInfoByModuleInfo:yi,getGlobalSnapshotInfoByModuleInfo:bi,setGlobalSnapshotInfoByModuleInfo:xi,addGlobalSnapshot:Si,getRemoteEntryExports:Ci,registerGlobalPlugins:wi,getGlobalHostPlugins:Ti,getPreloaded:Ei,setPreloaded:Di},share:{getRegisteredShare:Ia,getGlobalShareScope:La},utils:{matchRemoteWithNameAndExpose:Ha,preloadAssets:Lo,getRemoteInfo:Co}};function zo(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Bo(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Vo=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await So({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:Va(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return qr(t,`remoteEntryExports is undefined \n ${Tr(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=Bo(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});(i==null?void 0:i.init)===void 0&&Jr(Ga,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,Do(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){Jr(io,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,Do(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||Jr(ro,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:zo(r)},void 0,Do(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=ai(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},Ho=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){qr(ni(e),`Plugin configuration is invalid.`);let n=e.name;if(qr(n,`A name must be provided by the plugin.`),!this.registerPlugins[n]){var r;this.registerPlugins[n]=e,(r=e.apply)==null||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)})}}removePlugin(e){qr(e,`A name is required.`);let t=this.registerPlugins[e];qr(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}},Uo=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},Wo=class extends Uo{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Go(e,t){if(!ei(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Ko=class extends Uo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Go(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){Yr(e),this.onerror(e)}return e}},qo=class extends Uo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(Yr(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Go(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Jo=`Remote loading is disabled by experiments.optimization.disableRemote.`,Yo=class{constructor(){this.hooks=new Ho({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(Jo)}preloadRemote(){throw Error(Jo)}registerRemotes(){throw Error(Jo)}getRemoteModuleAndOptions(){throw Error(Jo)}initRawContainer(){throw Error(Jo)}};function Xo(e,t){let n=ii(t);n.url||Jr(eo,co,{remoteName:e.name});let r=Cr(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Zo(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!Qr(t)||!$r(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Va(t.name,r)});Xo(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Lo(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Qo(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function $o(e,t,n,r,i={},a){let{value:o}=_i(e,Zr(t)),s=a||o;if(s&&!kr(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Qo(r),a=s.remotesInfo[r];$o(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var es=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function ts(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if($o(r,n,(t,n,r)=>{var i;let c;if(r)c=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;c=Oo(e)}else if(f===!0)c=d;else return;let l=Cr(t,ii(t).url);l&&s.push({name:n.name,moduleInfo:{name:n.name,entry:l,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:l});let u=`modules`in t?t.modules:[],p=Ao(c.exposes);p.length&&`modules`in t&&(u=t==null||(i=t.modules)==null?void 0:i.reduce((e,t)=>((p==null?void 0:p.indexOf(t.moduleName))!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>Cr(t,e));return c.filter?n.filter(c.filter):n}if(u){let r=u.length;for(let i=0;i<r;i++){let r=u[i],s=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:s,name:n.name,remoteSnapshot:t,preloadConfig:c,remote:n,origin:e}),!Ei(s)&&(c.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):c.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Di(s))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=Ia(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{var n;let r=(n=u.shared)==null?void 0:n[e.sharedName];if(!r)return;let i=e.version?r.find(t=>t.version===e.version):r;i&&ri(i).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!es(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!es(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!es(`script`,e.url))}}var ns=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return Qr(i)&&$r(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Xo(r,o),ts(t,n,r,a,o))}}};function rs(e,t){let n=bi({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&_i(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:vi(),remoteSnapshot:bi({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:vi(),remoteSnapshot:bi({name:e.name,version:`version`in e?e.version:void 0})}}var is=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ho({beforeLoadRemoteSnapshot:new Wo(`beforeLoadRemoteSnapshot`),loadSnapshot:new qo(`loadGlobalSnapshot`),loadRemoteSnapshot:new qo(`loadRemoteSnapshot`),afterLoadSnapshot:new qo(`afterLoadSnapshot`)}),this.manifestLoading=ci.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=bi({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Si({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!_i(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i==null?void 0:i.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(kr(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=xi({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(Qr(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=xi(e,r);u=r,d=i}else Jr(Xa,co,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Do(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return rs(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=Co(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],Jr(Ka,co,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,Do(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&Jr(no,co,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,Do(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Or(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},as=class{constructor(){this.hooks=new Ho({})}},os=class{constructor(e){this.hooks=new Ho({beforeRegisterShare:new Ko(`beforeRegisterShare`),afterResolve:new qo(`afterResolve`),beforeLoadShare:new qo(`beforeLoadShare`),loadShare:new Wo,afterLoadShare:new Uo(`afterLoadShare`),errorLoadShare:new Uo(`errorLoadShare`),resolveShare:new Ko(`resolveShare`),initContainerShareScopeMap:new Ko(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){Yr(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){Yr(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Ta(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{var i;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),(i=this.shareScopeMap[r])!=null&&i[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Ra({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r!=null&&r.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,qr(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=Ia(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=Ba(o,s);if(t.lib)return za(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,za(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}{let r=(async()=>{let e=await t.get();return za(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=Ea(a.treeShaking),i=Ba(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,za(i,n.options.name);let{shared:r,useTreesShaking:o}=Ia(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=Ba(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Sa,t){let{host:n}=this,r=t==null?void 0:t.from,i=t==null?void 0:t.strategy,a=t==null?void 0:t.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{var n;let{version:r,eager:i}=t;l[e]=l[e]||{};let a=l[e],o=a[r]&&Ba(a[r]),s=!!(o&&(`eager`in o&&o.eager||`shareConfig`in o&&(n=o.shareConfig)!=null&&n.eager));(!o||o.strategy!==`loaded-first`&&!o.loaded&&(!i==!s?c>a[r].from:i))&&(a[r]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r!=null&&r.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Ra({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r!=null&&r.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=Ia(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return za(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return za(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&Jr((t==null?void 0:t.from)===`build`?Ja:Ya,co,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}Jr(Ya,co,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=La(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},ss=class{constructor(){this.shareScopeMap={},this.hooks=new Ho({afterResolve:new qo(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},cs=class{constructor(e){this.hooks=new Ho({beforeRegisterRemote:new Ko(`beforeRegisterRemote`),registerRemote:new Ko(`registerRemote`),beforeRequest:new qo(`beforeRequest`),afterMatchRemote:new Wo(`afterMatchRemote`),onLoad:new Wo(`onLoad`),afterLoadRemote:new Wo(`afterLoadRemote`),handlePreloadModule:new Uo(`handlePreloadModule`),errorLoadRemote:new Wo(`errorLoadRemote`),beforePreloadRemote:new Wo(`beforePreloadRemote`),generatePreloadAssets:new Wo(`generatePreloadAssets`),afterPreloadRemote:new Wo(`afterPreloadRemote`),loadEntry:new Wo}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Ha(n.options.remotes,e),i=e,a=r==null?void 0:r.expose,o=r?Co(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=Co(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=ko(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Va(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=Co(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Lo(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Vo({host:r,remoteInfo:Co({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Ha(t.options.remotes,i);if(!a)try{Jr(qa,co,{hostName:t.options.name,requestId:i},void 0,Do(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=Co(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;qr(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Vo(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>{var n;return e.alias&&(t.name.startsWith(e.alias)||((n=t.alias)==null?void 0:n.startsWith(e.alias)))});qr(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Sa,e.type||=Ca};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n!=null&&n.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),wr(o.join(` `)))}}removeRemote(e){try{let{host:n}=this,{name:r}=e,i=n.options.remotes.findIndex(e=>e.name===r);i!==-1&&n.options.remotes.splice(i,1);let a=_i(oi.__FEDERATION__.moduleInfo,Zr(e)).key;delete oi.__FEDERATION__.moduleInfo[a],`entry`in e&&(n.snapshotHandler.manifestCache.delete(e.entry),delete ci.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:o}=rs(e,n);if(o){let t=o&&`remotesInfo`in o&&o.remotesInfo&&_i(o.remotesInfo,e.name).key;t&&delete o.remotesInfo[t]}let s=n.moduleCache.get(e.name);if(s){var t;let r=s.remoteInfo,i=r.entryGlobalName;oi[i]&&((t=Object.getOwnPropertyDescriptor(oi,i))!=null&&t.configurable?delete oi[i]:oi[i]=void 0);let a=xo(s.remoteInfo);di[a]&&delete di[a];let o=r.buildVersion?Sr(r.name,r.buildVersion):r.name,c=oi.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===o:e.name===o);if(c!==-1){let e=oi.__FEDERATION__.__INSTANCES__[c];o=e.options.id||o;let t=La(),n=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===r.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==r.name),c.useIn.length?n=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),n&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{var a;(a=t[e])==null||(a=a[n])==null||(a=a[r])==null||delete a[i]}),oi.__FEDERATION__.__INSTANCES__.splice(c,1)}n.moduleCache.delete(e.name)}}catch(e){Kr.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ls=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,us=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ds=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,fs=class{constructor(e){this.hooks=new Ho({beforeInit:new Ko(`beforeInit`),init:new Uo,beforeInitContainer:new qo(`beforeInitContainer`),initContainer:new qo(`initContainer`)}),this.version=`2.8.2`,this.moduleCache=new Map,this.loaderHook=new Ho({getModuleInfo:new Uo,createScript:new Uo,createLink:new Uo,fetch:new Wo,loadEntryError:new Wo,afterLoadEntry:new Wo(`afterLoadEntry`),beforeInitRemote:new Wo(`beforeInitRemote`),afterInitRemote:new Wo(`afterInitRemote`),beforeGetExpose:new Wo(`beforeGetExpose`),afterGetExpose:new Wo(`afterGetExpose`),beforeExecuteFactory:new Wo(`beforeExecuteFactory`),afterExecuteFactory:new Wo(`afterExecuteFactory`),getModuleFactory:new Wo}),this.bridgeHook=new Ho({beforeBridgeRender:new Uo,afterBridgeRender:new Uo,beforeBridgeDestroy:new Uo,afterBridgeDestroy:new Uo});let t=us&&ls?[Zo(),ns()]:[],n={id:wo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=us?new is(this):new as,this.sharedHandler=ds?new os(this):new ss,this.remoteHandler=us?new cs(this):new Yo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&Jr(Ur($a,co)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Sa,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=ds?Ta(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=To(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},ps=Ro;function ms(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function hs(e,t){let n=ms();return oi.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function gs(e){let t=new((hi())||fs)({id:`${e.name}@${e.version||Date.now()}`,...e});return mi(t),t}var _s=null;function vs(e){let t=hs(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),_s||=t,t):(_s=gs(n),_s)}function ys(...e){return qr(_s,Qa,co),_s.loadRemote.apply(_s,e)}function bs(...e){return qr(_s,Qa,co),_s.registerRemotes.apply(_s,e)}gi(fs);var xs=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},w=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},T=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[T],d=o?n:n[r]||(n[r]={}),f=d[T]||(d[T]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?w(g,t):c&&typeof g==`function`?w(Function.call,g):g,u&&S(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var D=E,O=Math.ceil,k=Math.floor,A=function(e){return isNaN(e=+e)?0:(e>0?k:O)(e)},j=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},M=function(e){return function(t,n){var r=String(j(t)),i=A(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);D(D.P,`String`,{codePointAt:function(e){return M(this,e)}}),n.String.codePointAt;var N=Math.max,ee=Math.min,P=function(e,t){return e=A(e),e<0?N(e+t,0):ee(e,t)},F=String.fromCharCode,I=String.fromCodePoint;D(D.S+D.F*(!!I&&I.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],P(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?F(a):F(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var te={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},L={isSpaceSeparator:function(e){return typeof e==`string`&&te.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||te.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||te.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ne,R,z,B,re,ie,ae,oe,V,se=function(e,t){ne=String(e),R=`start`,z=[],B=0,re=1,ie=0,ae=void 0,oe=void 0,V=void 0;do ae=fe(),be[R]();while(ae.type!==`eof`);return typeof t==`function`?ce({"":V},``,t):V};function ce(e,t,n){var r=e[t];if(typeof r==`object`&&r){if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=ce(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=ce(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}}return n.call(e,t,r)}var H,U,le,ue,de;function fe(){for(H=`default`,U=``,le=!1,ue=1;;){de=pe();var e=me[H]();if(e)return e}}function pe(){if(ne[B])return String.fromCodePoint(ne.codePointAt(B))}function W(){var e=pe();return e===`
|
|
5
|
+
`)};function Wr(e,t,n,r,i,a){return r(Ur(e,t,n,i))}var Gr=`[ Federation Runtime ]`,Kr=Fr(Gr);function qr(e,t,n,r,i){e||(n===void 0?Jr(t):Jr(t,n,r,void 0,i))}function Jr(e,t,n,r,i){if(t!==void 0)return Wr(e,t,n??{},e=>{throw Error(`${Gr}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(Gr)||(a.message=`${Gr}: ${a.message}`),a):Error(`${Gr}: ${a}`)}function Yr(e){e instanceof Error&&(e.message.startsWith(Gr)||(e.message=`${Gr}: ${e.message}`)),Kr.warn(e)}function Xr(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function Zr(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Qr(e){return e.entry!==void 0}function $r(e){return!e.entry.includes(`.json`)}function ei(e){return e&&typeof e==`object`}var ti=Object.prototype.toString;function ni(e){return ti.call(e)===`[object Object]`}function ri(e){return Array.isArray(e)?e:[e]}function ii(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var ai=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},oi=2e3,si=typeof globalThis==`object`?globalThis:window,ci=(()=>{try{return document.defaultView}catch{return si}})(),li=ci;function ui(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function di(e,t){return Object.hasOwnProperty.call(e,t)}di(si,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||ui(si,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var fi=si.__GLOBAL_LOADING_REMOTE_ENTRY__;function pi(e){di(e,`__VMOK__`)&&!di(e,`__FEDERATION__`)&&ui(e,`__FEDERATION__`,e.__VMOK__),di(e,`__FEDERATION__`)||(ui(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),ui(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}pi(si),pi(ci);function mi(){si.__FEDERATION__.__GLOBAL_PLUGIN__=[],si.__FEDERATION__.__INSTANCES__=[],si.__FEDERATION__.moduleInfo={},si.__FEDERATION__.__SHARE__={},si.__FEDERATION__.__MANIFEST_LOADING__={},si.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(fi).forEach(e=>{delete fi[e]})}function hi(e){si.__FEDERATION__.__INSTANCES__.push(e)}function gi(){return si.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function _i(e,t=br()){t&&(si.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,si.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.0`)}function vi(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}Jr(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var yi=()=>ci.__FEDERATION__.moduleInfo,bi=(e,t)=>{let n=vi(t,Zr(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=Zr(n),i=vi(ci.__FEDERATION__.moduleInfo,r).value;if((i==null?void 0:i.version)===t)return i}},xi=e=>bi(e,ci.__FEDERATION__.moduleInfo),Si=(e,t)=>{let n=Zr(e);return ci.__FEDERATION__.moduleInfo[n]=t,ci.__FEDERATION__.moduleInfo},Ci=e=>(ci.__FEDERATION__.moduleInfo={...ci.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete ci.__FEDERATION__.moduleInfo[e]}),wi=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:si[n]}},Ti=e=>{let{__GLOBAL_PLUGIN__:t}=ci.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):Yr(`The plugin ${e.name} has been registered.`)})},Ei=()=>ci.__FEDERATION__.__GLOBAL_PLUGIN__,Di=e=>si.__FEDERATION__.__PRELOADED_MAP__.get(e),Oi=e=>si.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ki=e=>si.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Ai=e=>{let t=si.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>oi){let e=t.values().next().value;e!==void 0&&t.delete(e)}},ji=`[0-9A-Za-z-]+`,Mi=`(?:\\+(${ji}(?:\\.${ji})*))`,Ni=`0|[1-9]\\d*`,Pi=`[0-9]+`,Fi=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ii=`(?:${Pi}|${Fi})`,Li=`(?:-?(${Ii}(?:\\.${Ii})*))`,Ri=`(?:${Ni}|${Fi})`,zi=`(?:-(${Ri}(?:\\.${Ri})*))`,Bi=`${Ni}|x|X|\\*`,Vi=`[v=\\s]*(${Bi})(?:\\.(${Bi})(?:\\.(${Bi})(?:${zi})?${Mi}?)?)?`,Hi=`^\\s*(${Vi})\\s+-\\s+(${Vi})\\s*$`,Ui=`[v=\\s]*${`(${Pi})\\.(${Pi})\\.(${Pi})`}${Li}?${Mi}?`,Wi=`((?:<|>)?=?)`,Gi=`(\\s*)${Wi}\\s*(${Ui}|${Vi})`,Ki=`(?:~>?)`,qi=`(\\s*)${Ki}\\s+`,Ji=`(?:\\^)`,Yi=`(\\s*)${Ji}\\s+`,Xi=`(<|>)?=?\\s*\\*`,Zi=`^${Ji}${Vi}$`,Qi=`v?${`(${Ni})\\.(${Ni})\\.(${Ni})`}${zi}?${Mi}?`,$i=`^${Ki}${Vi}$`,ea=`^${Wi}\\s*${Vi}$`,ta=`^${Wi}\\s*(${Qi})$|^$`,na=`^\\s*>=\\s*0.0.0\\s*$`;function ra(e){return new RegExp(e)}function ia(e){return!e||e.toLowerCase()===`x`||e===`*`}function aa(...e){return t=>e.reduce((e,t)=>t(e),t)}function oa(e){return e.match(ra(ta))}function sa(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function ca(e){return e.replace(ra(Hi),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=ia(n)?``:ia(r)?`>=${n}.0.0`:ia(i)?`>=${n}.${r}.0`:`>=${t}`,s=ia(c)?``:ia(l)?`<${Number(c)+1}.0.0-0`:ia(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function la(e){return e.replace(ra(Gi),`$1$2$3`)}function ua(e){return e.replace(ra(qi),`$1~`)}function da(e){return e.replace(ra(Yi),`$1^`)}function fa(e){return e.trim().split(/\s+/).map(e=>e.replace(ra(Zi),(e,t,n,r,i)=>ia(t)?``:ia(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ia(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function pa(e){return e.trim().split(/\s+/).map(e=>e.replace(ra($i),(e,t,n,r,i)=>ia(t)?``:ia(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ia(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function ma(e){return e.split(/\s+/).map(e=>e.trim().replace(ra(ea),(e,t,n,r,i,a)=>{let o=ia(n),s=o||ia(r),c=s||ia(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function ha(e){return e.trim().replace(ra(Xi),``)}function ga(e){return e.trim().replace(ra(na),``)}function _a(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function va(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?_a(t,i):-1:1}return 0}function ya(e,t){return _a(e.major,t.major)||_a(e.minor,t.minor)||_a(e.patch,t.patch)||va(e,t)}function ba(e,t){return e.version===t.version}function xa(e,t){switch(e.operator){case``:case`=`:return ba(e,t);case`>`:return ya(e,t)<0;case`>=`:return ba(e,t)||ya(e,t)<0;case`<`:return ya(e,t)>0;case`<=`:return ba(e,t)||ya(e,t)>0;case void 0:return!0;default:return!1}}function Sa(e){return aa(fa,pa,ma,ha)(e)}function Ca(e){return aa(ca,la,ua,da)(e.trim()).split(/\s+/).join(` `)}function wa(e,t){if(!e)return!1;let n=oa(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:sa(i,a,o,s),major:i,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Ca(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Sa(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>ga(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=oa(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!xa({operator:n,version:sa(r,a,o,s),major:r,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Ta=`default`,Ea=`global`;function Da(e,t,n,r){var i,a;let o;return o=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{Jr(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(i=e.shareConfig)!=null&&i.eager&&(a=e.treeShaking)!=null&&a.mode&&Jr(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??gr.UNKNOWN,useIn:[]}:void 0}}function Oa(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=ri(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(Da(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function ka(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===gr.NO_USE?!1:n===gr.CALCULATED?!0:r===`runtime-infer`?!t||Pa(e,t):!1}function Aa(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!wa(n(e),`<=${n(t)}`)}var ja=(e,t)=>{let n=t||function(e,t){return Aa(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},Ma=e=>!!e.loaded||typeof e.lib==`function`,Na=e=>!!e.loading,Pa=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Fa(e,t,n,r){let i=e[t][n],a=``,o=ka(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!Ma(i[e].treeShaking)&&Aa(e,t):!1:!0:!Ma(i[e])&&Aa(e,t)};if(o){if(a=ja(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:ja(e[t][n],s),useTreesShaking:o}}var Ia=e=>Ma(e)||Na(e);function La(e,t,n,r){let i=e[t][n],a=``,o=ka(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(Ia(i[t].treeShaking))return!Ia(i[e].treeShaking)||!!Aa(e,t);if(Ia(i[e].treeShaking))return!1}return Ia(i[t])?!Ia(i[e])||!!Aa(e,t):!Ia(i[e])&&Aa(e,t)};if(o){if(a=ja(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:ja(e[t][n],s),useTreesShaking:o}}function Ra(e){return e===`loaded-first`?La:Fa}function za(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=Ta,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=Ra(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:li.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!wa(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?Jr(e):Yr(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||wa(u,l))return{shared:r,useTreesShaking:d};let n=ka(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(ka(i.treeShaking,c==null?void 0:c.usedExports)&&wa(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(wa(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Ba(){return li.__FEDERATION__.__SHARE__}function Va(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=(n==null?void 0:n.resolver)??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[ja(t,function(e,n){return!Ma(t[e])&&Aa(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n==null?void 0:n.customShareInfo)}var Ha=(e,t)=>{e.useIn||=[],Xr(e.useIn,t)};function Ua(e,t){return t&&e.treeShaking?e.treeShaking:e}function Wa(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Ga(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ka(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var qa=`RUNTIME-001`,Ja=`RUNTIME-002`,Ya=`RUNTIME-003`,Xa=`RUNTIME-004`,Za=`RUNTIME-005`,Qa=`RUNTIME-006`,$a=`RUNTIME-007`,eo=`RUNTIME-008`,to=`RUNTIME-009`,no=`RUNTIME-010`,ro=`RUNTIME-011`,io=`RUNTIME-012`,ao=`RUNTIME-013`,oo=`RUNTIME-014`,so=`RUNTIME-015`,co=`TYPE-001`,lo=`BUILD-001`,uo=`BUILD-002`,fo={[qa]:`Failed to get remoteEntry exports.`,[Ja]:`The remote entry interface does not contain "init"`,[Ya]:`Failed to get manifest.`,[Xa]:`Failed to locate remote.`,[Za]:`Invalid loadShareSync function call from bundler runtime`,[Qa]:`Invalid loadShareSync function call from runtime`,[$a]:`Failed to get remote snapshot.`,[eo]:`Failed to load script resources.`,[to]:`Please call createInstance first.`,[no]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[ro]:`The remoteEntry URL is missing from the remote snapshot.`,[io]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[ao]:`The manifest is not a valid Module Federation manifest.`,[oo]:`The remote does not expose the requested module.`,[so]:`Remote container initialization failed.`},po={[co]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},mo={[lo]:`Failed to find expose module.`,[uo]:`PublicPath is required in prod mode.`};({...fo,...po,...mo});var ho=`.then(callbacks[0]).catch(callbacks[1])`,go=new WeakMap,_o=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function vo(e){return e instanceof TypeError&&_o.some(t=>e.message.includes(t))}function yo(e){return e===`esm`||e===`module`}async function bo({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((a,o)=>{let s=e=>{if(vo(e)){let t=e instanceof Error?e.message:String(e);try{Jr(eo,fo,{remoteName:n,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=r?r(e):e;try{t?a(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${ho}`)([a,s]):i(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){Jr(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function xo({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${ho}`)([n,r])}catch(t){Jr(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function So(e,t,n){let{remoteEntryKey:r,entryExports:i}=wi(e,t);return i||Jr(qa,fo,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function Co({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=wi(e,t);if(s)return s;let c=a?a(n):n;return Vr(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>So(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);Jr(eo,fo,{remoteName:e,resourceUrl:c},n)})}async function wo({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return yo(c)?bo({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?xo({entry:a,remoteEntryExports:t}):Co({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function To(e){let{entry:t,name:n}=e;return Sr(n,t)}async function Eo(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=To(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!fi[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;fi[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||wo({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>Eo({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:fi,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}),go.set(fi[s],t)}let c=fi[s];if(go.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function Do(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Oo(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function ko(e){let t=new Map;return[...e||[],...Ei()].forEach(e=>{e&&(qr(ni(e),`Plugin configuration is invalid.`),qr(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function Ao(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function jo(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return ko(e).forEach(e=>{var i;if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let a=Ao(e,(i=e.apply)==null?void 0:i.call(e,t));r.forEach(e=>{e.applyPlugin(a)})}),Array.from(n.values())}function Mo(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function No(e){var t,n;let r={};for(let[t,n]of Object.entries(e.shared)){var i,a,o,s;let e=n[0];e&&(r[t]={version:e.version,singleton:(i=e.shareConfig)==null?void 0:i.singleton,requiredVersion:((a=e.shareConfig)==null?void 0:a.requiredVersion)===!1?!1:(o=e.shareConfig)==null?void 0:o.requiredVersion,eager:e.eager,strictVersion:(s=e.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((t=e.remotes)==null?void 0:t.length)>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:((n=e.remotes)==null?void 0:n.map(Mo))??[],shared:r}}}function Po(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function Fo(e,t){return t.map(t=>{let n=Ka(e,t.nameOrAlias);return qr(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Tr({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Po(t)}})}function Io(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Lo(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function Ro(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function zo(e,t,n,r){return n?ki(t)?Promise.resolve(Ro(e,t,`cached`)):(Ai(t),r()):r()}async function Bo(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i!=null&&i.remoteEntryExports)return Ro(r,a,`cached`);try{if(!await Eo({origin:e,remoteInfo:n,remoteEntryExports:i==null?void 0:i.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return Ro(r,a,`success`)}catch(e){return Ro(r,a,Lo(e)?`timeout`:`error`,e)}}function Vo({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=Br({url:n,cb:()=>{o(Ro(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(Ro(i,n,Lo(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Ho({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=zr({url:n,cb:()=>{a(Ro(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(Ro(i,n,Lo(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Uo(e,t){return{...e,resourceType:t}}function Wo(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(Bo(t,e,r,Uo(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=Uo(i,`css`);l.push(zo(o,r,a,()=>Vo({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=Uo(i,`css`);l.push(zo(o,r,a,()=>Vo({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Ho,u={fetchpriority:`high`,type:`text/javascript`};r?(n=Vo,u={rel:`preload`,as:`script`}):yo(e.type)&&(n=Vo,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=Uo(i,`js`);l.push(zo(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var Go={global:{Global:li,nativeGlobal:ci,resetFederationGlobalInfo:mi,setGlobalFederationInstance:hi,getGlobalFederationConstructor:gi,setGlobalFederationConstructor:_i,getInfoWithoutType:vi,getGlobalSnapshot:yi,getTargetSnapshotInfoByModuleInfo:bi,getGlobalSnapshotInfoByModuleInfo:xi,setGlobalSnapshotInfoByModuleInfo:Si,addGlobalSnapshot:Ci,getRemoteEntryExports:wi,registerGlobalPlugins:Ti,getGlobalHostPlugins:Ei,getPreloaded:Di,setPreloaded:Oi},share:{getRegisteredShare:za,getGlobalShareScope:Ba},utils:{matchRemoteWithNameAndExpose:Ga,preloadAssets:Wo,getRemoteInfo:Do}};function Ko(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function qo(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Jo=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Wa(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await Eo({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return qr(r,`remoteEntryExports is undefined \n ${Tr(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=qo(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});(a==null?void 0:a.init)===void 0&&Jr(Ja,fo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,No(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){Jr(so,fo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,No(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||Jr(oo,fo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Ko(r)},void 0,No(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=ai(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},Yo=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){qr(ni(e),`Plugin configuration is invalid.`);let t=e.name;qr(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){qr(e,`A name is required.`);let t=this.registerPlugins[e];qr(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Xo=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},Zo=class extends Xo{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Qo(e,t){if(!ei(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var $o=class extends Xo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Qo(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){Yr(e),this.onerror(e)}return e}},es=class extends Xo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(Yr(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Qo(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},ts=`Remote loading is disabled by experiments.optimization.disableRemote.`,ns=class{constructor(){this.hooks=new Yo({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(ts)}preloadRemote(){throw Error(ts)}registerRemotes(){throw Error(ts)}getRemoteModuleAndOptions(){throw Error(ts)}initRawContainer(){throw Error(ts)}};function rs(e,t){let n=ii(t);n.url||Jr(ro,fo,{remoteName:e.name});let r=Cr(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function is(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!Qr(t)||!$r(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Wa(t.name,r)});rs(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&Wo(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function as(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function os(e,t,n,r,i={},a){let{value:o}=vi(e,Zr(t)),s=a||o;if(s&&!kr(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=as(r),a=s.remotesInfo[r];os(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var ss=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function cs(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(os(r,n,(t,n,r)=>{var i;let c;if(r)c=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;c=Po(e)}else if(f===!0)c=d;else return;let l=Cr(t,ii(t).url);l&&s.push({name:n.name,moduleInfo:{name:n.name,entry:l,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:l});let u=`modules`in t?t.modules:[],p=Io(c.exposes);p.length&&`modules`in t&&(u=t==null||(i=t.modules)==null?void 0:i.reduce((e,t)=>((p==null?void 0:p.indexOf(t.moduleName))!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>Cr(t,e));return c.filter?n.filter(c.filter):n}if(u){let r=u.length;for(let i=0;i<r;i++){let r=u[i],s=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:s,name:n.name,remoteSnapshot:t,preloadConfig:c,remote:n,origin:e}),!Di(s)&&(c.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):c.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Oi(s))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=za(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{var n;let r=(n=u.shared)==null?void 0:n[e.sharedName];if(!r)return;let i=e.version?r.find(t=>t.version===e.version):r;i&&ri(i).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!ss(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!ss(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!ss(`script`,e.url))}}var ls=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return Qr(i)&&$r(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(rs(r,o),cs(t,n,r,a,o))}}};function us(e,t){let n=xi({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&vi(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:yi(),remoteSnapshot:xi({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:yi(),remoteSnapshot:xi({name:e.name,version:`version`in e?e.version:void 0})}}var ds=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Yo({beforeLoadRemoteSnapshot:new Zo(`beforeLoadRemoteSnapshot`),loadSnapshot:new es(`loadGlobalSnapshot`),loadRemoteSnapshot:new es(`loadRemoteSnapshot`),afterLoadSnapshot:new es(`afterLoadSnapshot`),beforeLoadManifest:new Zo(`beforeLoadManifest`),afterLoadManifest:new Zo(`afterLoadManifest`)}),this.manifestLoading=li.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=xi({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ci({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!vi(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i==null?void 0:i.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(kr(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Si({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(Qr(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Si(e,r);u=r,d=i}else Jr($a,fo,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,No(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return us(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=Do(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),Jr(Ya,fo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,No(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&Jr(ao,fo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,No(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Or(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},fs=class{constructor(){this.hooks=new Yo({})}},ps=class{constructor(e){this.hooks=new Yo({beforeRegisterShare:new $o(`beforeRegisterShare`),afterRegisterShare:new Xo(`afterRegisterShare`),afterResolve:new es(`afterResolve`),beforeLoadShare:new es(`beforeLoadShare`),loadShare:new Zo,afterLoadShare:new Xo(`afterLoadShare`),errorLoadShare:new Xo(`errorLoadShare`),resolveShare:new $o(`resolveShare`),initContainerShareScopeMap:new $o(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){Yr(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){Yr(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Oa(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{var i,a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let o=(i=this.shareScopeMap[r])==null?void 0:i[e],s=o==null?void 0:o[n.version];o||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:s,registeredShared:(a=this.shareScopeMap[r])==null||(a=a[e])==null?void 0:a[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t==null?void 0:t.context,i=Va({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i!=null&&i.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,qr(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=za(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=Ua(c,l);if(t.lib)return Ha(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,Ha(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return Ha(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=ka(s.treeShaking),a=Ua(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,Ha(a,n.options.name);let{shared:i,useTreesShaking:o}=za(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=Ua(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=Ta,t){var n;let{host:r}=this,i=t==null?void 0:t.from,a=t==null?void 0:t.strategy,o=(t==null||(n=t.context)==null?void 0:n.trigger)||i||`runtime`,s=t==null?void 0:t.initScope,c=[];if(i!==`build`){let{initTokens:t}=this;s||=[];let n=t[e];if(n||=t[e]={from:this.host.name},s.indexOf(n)>=0)return c;s.push(n)}let l=this.shareScopeMap,u=r.options.name;l[e]||(l[e]={});let d=l[e],f=(t,n)=>{var r;let{version:i,eager:a}=n;d[t]=d[t]||{};let s=d[t],c=s[i],l=c&&Ua(c),f=!!(l&&(`eager`in l&&l.eager||`shareConfig`in l&&(r=l.shareConfig)!=null&&r.eager));(!l||l.strategy!==`loaded-first`&&!l.loaded&&(!a==!f?u>s[i].from:a))&&(s[i]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:c,registeredShared:s[i],trigger:o})},p=async e=>{let{module:t}=await r.remoteHandler.getRemoteModuleAndOptions({id:e}),n,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{n=await t.getEntry(void 0,i)}catch(i){if(n=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:r}),!n)return}finally{n!=null&&n.init&&!t.initing&&(t.remoteEntryExports=n,await t.init(void 0,void 0,s,void 0,i))}};return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(n=>{n.scope.includes(e)&&f(t,n)})}),(r.options.shareStrategy===`version-first`||a===`version-first`)&&r.options.remotes.forEach(t=>{t.shareScope===e&&c.push(p(t.name))}),c}loadShareSync(e,t){let{host:n}=this,r=t==null?void 0:t.context,i=Va({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i!=null&&i.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t==null?void 0:t.from,context:r})});let{shared:a}=za(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return Ha(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return Ha(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&Jr((t==null?void 0:t.from)===`build`?Za:Qa,fo,{hostName:n.options.name,sharedPkgName:e},void 0,No(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}Jr(Qa,fo,{hostName:n.options.name,sharedPkgName:e},void 0,No(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Ba(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},ms=class{constructor(){this.shareScopeMap={},this.hooks=new Yo({afterResolve:new es(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},hs=class{constructor(e){this.hooks=new Yo({beforeRegisterRemote:new $o(`beforeRegisterRemote`),registerRemote:new $o(`registerRemote`),beforeRequest:new es(`beforeRequest`),afterMatchRemote:new Zo(`afterMatchRemote`),onLoad:new Zo(`onLoad`),afterLoadRemote:new Zo(`afterLoadRemote`),handlePreloadModule:new Xo(`handlePreloadModule`),errorLoadRemote:new Zo(`errorLoadRemote`),beforePreloadRemote:new Zo(`beforePreloadRemote`),generatePreloadAssets:new Zo(`generatePreloadAssets`),afterPreloadRemote:new Zo(`afterPreloadRemote`),loadEntry:new Zo}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Ga(n.options.remotes,e),i=e,a=r==null?void 0:r.expose,o=r?Do(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=Do(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=Fo(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Wa(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=Do(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Wo(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Jo({host:r,remoteInfo:Do({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Ga(t.options.remotes,i);if(!a)try{Jr(Xa,fo,{hostName:t.options.name,requestId:i},void 0,No(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=Do(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;qr(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Jo(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>{var n;return e.alias&&(t.name.startsWith(e.alias)||((n=t.alias)==null?void 0:n.startsWith(e.alias)))});qr(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Ta,e.type||=Ea};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n!=null&&n.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),wr(o.join(` `)))}}removeRemote(e){try{let{host:n}=this,{name:r}=e,i=n.options.remotes.findIndex(e=>e.name===r);i!==-1&&n.options.remotes.splice(i,1);let a=vi(si.__FEDERATION__.moduleInfo,Zr(e)).key;delete si.__FEDERATION__.moduleInfo[a],`entry`in e&&(n.snapshotHandler.manifestCache.delete(e.entry),delete li.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:o}=us(e,n);if(o){let t=o&&`remotesInfo`in o&&o.remotesInfo&&vi(o.remotesInfo,e.name).key;t&&delete o.remotesInfo[t]}let s=n.moduleCache.get(e.name);if(s){var t;let r=s.remoteInfo,i=r.entryGlobalName;si[i]&&((t=Object.getOwnPropertyDescriptor(si,i))!=null&&t.configurable?delete si[i]:si[i]=void 0);let a=To(s.remoteInfo);fi[a]&&delete fi[a];let o=r.buildVersion?Sr(r.name,r.buildVersion):r.name,c=si.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===o:e.name===o);if(c!==-1){let e=si.__FEDERATION__.__INSTANCES__[c];o=e.options.id||o;let t=Ba(),n=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===r.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==r.name),c.useIn.length?n=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),n&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{var a;(a=t[e])==null||(a=a[n])==null||(a=a[r])==null||delete a[i]}),si.__FEDERATION__.__INSTANCES__.splice(c,1)}n.moduleCache.delete(e.name)}}catch(e){Kr.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},gs=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,_s=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,vs=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,ys=class{constructor(e){this.hooks=new Yo({beforeInit:new $o(`beforeInit`),init:new Xo,beforeInitContainer:new es(`beforeInitContainer`),initContainer:new es(`initContainer`)}),this.version=`2.9.0`,this.moduleCache=new Map,this.loaderHook=new Yo({getModuleInfo:new Xo,createScript:new Xo,createLink:new Xo,fetch:new Zo,loadEntryError:new Zo,afterLoadEntry:new Zo(`afterLoadEntry`),beforeInitRemote:new Zo(`beforeInitRemote`),afterInitRemote:new Zo(`afterInitRemote`),beforeGetExpose:new Zo(`beforeGetExpose`),afterGetExpose:new Zo(`afterGetExpose`),beforeExecuteFactory:new Zo(`beforeExecuteFactory`),afterExecuteFactory:new Zo(`afterExecuteFactory`),getModuleFactory:new Zo}),this.bridgeHook=new Yo({beforeBridgeRender:new Xo,afterBridgeRender:new Xo,beforeBridgeDestroy:new Xo,afterBridgeDestroy:new Xo,afterBridgeRouteSync:new Xo});let t=_s&&gs?[is(),ls()]:[],n={id:Oo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=_s?new ds(this):new fs,this.sharedHandler=vs?new ps(this):new ms,this.remoteHandler=_s?new hs(this):new ns,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&Jr(Ur(no,fo)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Ta,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=vs?Oa(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=jo(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},bs=Go;function xs(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Ss(e,t){let n=xs();return si.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function Cs(e){let t=new((gi())||ys)({id:`${e.name}@${e.version||Date.now()}`,...e});return hi(t),t}var ws=null;function Ts(e){let t=Ss(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),ws||=t,t):(ws=Cs(n),ws)}function Es(...e){return qr(ws,to,fo),ws.loadRemote.apply(ws,e)}function Ds(...e){return qr(ws,to,fo),ws.registerRemotes.apply(ws,e)}_i(ys);var Os=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},w=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},T=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[T],d=o?n:n[r]||(n[r]={}),f=d[T]||(d[T]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?w(g,t):c&&typeof g==`function`?w(Function.call,g):g,u&&S(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var D=E,O=Math.ceil,k=Math.floor,A=function(e){return isNaN(e=+e)?0:(e>0?k:O)(e)},j=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},M=function(e){return function(t,n){var r=String(j(t)),i=A(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);D(D.P,`String`,{codePointAt:function(e){return M(this,e)}}),n.String.codePointAt;var N=Math.max,ee=Math.min,P=function(e,t){return e=A(e),e<0?N(e+t,0):ee(e,t)},F=String.fromCharCode,I=String.fromCodePoint;D(D.S+D.F*(!!I&&I.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],P(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?F(a):F(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var te={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},L={isSpaceSeparator:function(e){return typeof e==`string`&&te.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||te.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||te.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ne,R,z,B,re,ie,ae,oe,V,se=function(e,t){ne=String(e),R=`start`,z=[],B=0,re=1,ie=0,ae=void 0,oe=void 0,V=void 0;do ae=fe(),be[R]();while(ae.type!==`eof`);return typeof t==`function`?ce({"":V},``,t):V};function ce(e,t,n){var r=e[t];if(typeof r==`object`&&r){if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=ce(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=ce(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}}return n.call(e,t,r)}var H,U,le,ue,de;function fe(){for(H=`default`,U=``,le=!1,ue=1;;){de=pe();var e=me[H]();if(e)return e}}function pe(){if(ne[B])return String.fromCodePoint(ne.codePointAt(B))}function W(){var e=pe();return e===`
|
|
6
6
|
`?(re++,ie=0):e?ie+=e.length:ie++,e&&(B+=e.length),e}var me={default:function(){switch(de){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
7
7
|
`:case`\r`:case`\u2028`:case`\u2029`:W();return;case`/`:W(),H=`comment`;return;case void 0:return W(),he(`eof`)}if(L.isSpaceSeparator(de)){W();return}return me[R]()},comment:function(){switch(de){case`*`:W(),H=`multiLineComment`;return;case`/`:W(),H=`singleLineComment`;return}throw Ce(W())},multiLineComment:function(){switch(de){case`*`:W(),H=`multiLineCommentAsterisk`;return;case void 0:throw Ce(W())}W()},multiLineCommentAsterisk:function(){switch(de){case`*`:W();return;case`/`:W(),H=`default`;return;case void 0:throw Ce(W())}W(),H=`multiLineComment`},singleLineComment:function(){switch(de){case`
|
|
8
8
|
`:case`\r`:case`\u2028`:case`\u2029`:W(),H=`default`;return;case void 0:return W(),he(`eof`)}W()},value:function(){switch(de){case`{`:case`[`:return he(`punctuator`,W());case`n`:return W(),ge(`ull`),he(`null`,null);case`t`:return W(),ge(`rue`),he(`boolean`,!0);case`f`:return W(),ge(`alse`),he(`boolean`,!1);case`-`:case`+`:W()===`-`&&(ue=-1),H=`sign`;return;case`.`:U=W(),H=`decimalPointLeading`;return;case`0`:U=W(),H=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:U=W(),H=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,1/0);case`N`:return W(),ge(`aN`),he(`numeric`,NaN);case`"`:case`'`:le=W()===`"`,U=``,H=`string`;return}throw Ce(W())},identifierNameStartEscape:function(){if(de!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:break;default:if(!L.isIdStartChar(e))throw Te()}U+=e,H=`identifierName`},identifierName:function(){switch(de){case`$`:case`_`:case``:case``:U+=W();return;case`\\`:W(),H=`identifierNameEscape`;return}if(L.isIdContinueChar(de)){U+=W();return}return he(`identifier`,U)},identifierNameEscape:function(){if(de!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:case``:case``:break;default:if(!L.isIdContinueChar(e))throw Te()}U+=e,H=`identifierName`},sign:function(){switch(de){case`.`:U=W(),H=`decimalPointLeading`;return;case`0`:U=W(),H=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:U=W(),H=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,ue*(1/0));case`N`:return W(),ge(`aN`),he(`numeric`,NaN)}throw Ce(W())},zero:function(){switch(de){case`.`:U+=W(),H=`decimalPoint`;return;case`e`:case`E`:U+=W(),H=`decimalExponent`;return;case`x`:case`X`:U+=W(),H=`hexadecimal`;return}return he(`numeric`,ue*0)},decimalInteger:function(){switch(de){case`.`:U+=W(),H=`decimalPoint`;return;case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(L.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},decimalPointLeading:function(){if(L.isDigit(de)){U+=W(),H=`decimalFraction`;return}throw Ce(W())},decimalPoint:function(){switch(de){case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(L.isDigit(de)){U+=W(),H=`decimalFraction`;return}return he(`numeric`,ue*Number(U))},decimalFraction:function(){switch(de){case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(L.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},decimalExponent:function(){switch(de){case`+`:case`-`:U+=W(),H=`decimalExponentSign`;return}if(L.isDigit(de)){U+=W(),H=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentSign:function(){if(L.isDigit(de)){U+=W(),H=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentInteger:function(){if(L.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},hexadecimal:function(){if(L.isHexDigit(de)){U+=W(),H=`hexadecimalInteger`;return}throw Ce(W())},hexadecimalInteger:function(){if(L.isHexDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},string:function(){switch(de){case`\\`:W(),U+=_e();return;case`"`:if(le)return W(),he(`string`,U);U+=W();return;case`'`:if(!le)return W(),he(`string`,U);U+=W();return;case`
|
|
@@ -15,7 +15,7 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
15
15
|
`+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!L.isIdStartChar(t))return m(e,!0);for(var n=t.length;n<e.length;n++)if(!L.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return m(e,!0);return e}function _(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=[],a=0;a<e.length;a++){var o=p(String(a),e);n.push(o===void 0?`null`:o)}var c;if(n.length===0)c=`[]`;else if(s===``)c=`[`+n.join(`,`)+`]`;else{var l=`,
|
|
16
16
|
`+i,u=n.join(l);c=`[
|
|
17
17
|
`+i+u+`,
|
|
18
|
-
`+t+`]`}return r.pop(),i=t,c}}}}))})),Ss=r(((e,t)=>{t.exports={}})),Cs=r(((t,n)=>{(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof e==`function`)try{r=Ss()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t==n?e.length*4:t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),ws=r(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(Cs()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})}));pe();var Ts=n(xs()),Es=n(ws());g();var Ds=window.innerWidth<=600?12:void 0,Os={add:()=>_.createElement(re,null),auth:()=>_.createElement(Ht,null),backlight:()=>_.createElement(Ue,null),book:()=>_.createElement(Ft,null),delete:()=>_.createElement(me,null),dimmer:()=>_.createElement(k,null),edit:()=>_.createElement(Ke,null),error:()=>_.createElement(ur,null),group:()=>_.createElement(pt,null),help:()=>_.createElement(yt,null),identify:()=>_.createElement(Mn,null),info:()=>_.createElement(E,null),light:()=>_.createElement(Cn,null),lines:()=>_.createElement($e,null),next:()=>_.createElement(Re,null),open:()=>_.createElement(jn,null),pair:()=>_.createElement(Rn,null),pause:()=>_.createElement(yn,null),play:()=>_.createElement(Xt,null),previous:()=>_.createElement(fn,null),qrcode:()=>_.createElement(jt,null),refresh:()=>_.createElement(ar,null),save:()=>_.createElement(ne,null),search:()=>_.createElement(tr,null),send:()=>_.createElement(rt,null),settings:()=>_.createElement(V,null),socket:()=>_.createElement(wt,null),stop:()=>_.createElement(M,null),unpair:()=>_.createElement(an,null),upload:()=>_.createElement(nr,null),user:()=>_.createElement(en,null),warning:()=>_.createElement(et,null),web:()=>_.createElement(Qn,null)};function ks(e){return Object.prototype.toString.call(e)===`[object Object]`}var X=class e extends s{constructor(t){super(t),K(this,`defaultValue`,void 0),K(this,`isError`,void 0),K(this,`lang`,void 0),K(this,`defaultSendToDone`,void 0),K(this,`sendToTimeout`,void 0),K(this,`noPlaceRequired`,void 0),K(this,`reportedHidden`,!1),K(this,`calculateTimeout`,null),K(this,`AsyncFunction`,void 0),K(this,`onUpdate`,t=>{let n=e.getValue(t||this.props.data,this.props.attr)||``;this.state.value===n?this.forceUpdate():this.setState({value:n})}),K(this,`getObject`,async e=>{try{var t,n;return await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,e))||null}catch(e){return console.error(e),null}}),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=J.getLanguage(),t.schema&&(t.custom?t.schema.defaultFunc||(this.defaultValue=t.schema.default):t.schema.type!==`state`&&!t.schema.defaultFunc&&(this.defaultValue=t.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t;if((t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):this.props.schema.type!==`state`&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`))),this.props.attr){var n,r;(n=(r=this.props.oContext).registerOnForceUpdate)==null||n.call(r,this.props.attr,this.onUpdate)}let i=[`select`,`autocomplete`,`autocompleteSendTo`];if(this.defaultValue!==void 0&&this.props.attr){let t=e.getValue(this.props.data,this.props.attr);(t===void 0||i.includes(this.props.schema.type)&&(t===``||t===null))&&setTimeout(()=>{this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(e.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))},100)}else this.props.schema.defaultSendTo&&this.defaultSendTo().catch(e=>console.error(e))}async defaultSendTo(){if(this.props.alive&&this.props.schema.defaultSendTo){this.defaultSendToDone=!0;let t=this.props.schema.data;if(t===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{t=JSON.parse(e)}catch{console.error(`Cannot parse json data: ${e}`)}}else t={attr:this.props.attr,value:e.getValue(this.props.data,this.props.attr)};t===void 0&&(t=null);let n=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(n!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${n}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,n));return}}try{let r=await this.props.oContext.socket.sendTo(n,this.props.schema.defaultSendTo,t);r!=null&&this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,r,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(e.setValue(this.props.data,this.props.attr,r),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))}catch(e){console.error(e)}}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()))}componentWillUnmount(){if(this.props.attr){var e,t;(e=(t=this.props.oContext).registerOnForceUpdate)==null||e.call(t,this.props.attr)}this.sendToTimeout&&=(clearTimeout(this.sendToTimeout),null),this.calculateTimeout&&=(clearTimeout(this.calculateTimeout),null)}static getValue(t,n){if(!n)return;if(typeof n==`string`)return e.getValue(t,n.split(`.`));if(n.length===1)return t[n[0]];let r=n.shift();if(typeof r==`string`&&typeof t[r]==`object`)return e.getValue(t[r],n)}static setValue(t,n,r){if(n){if(typeof n==`string`){e.setValue(t,n.split(`.`),r);return}if(n.length===1)r===null?delete t[n[0]]:t[n[0]]=r;else{let i=n.shift();if(typeof i!=`string`)return;(!t[i]||typeof t[i]==`object`)&&(t[i]=t[i]||{}),e.setValue(t[i],n,r)}}}getText(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPattern(n,void 0,t):n}if(e&&typeof e==`object`){let n=e;return n.func?typeof n.func==`object`?this.getPattern(n.func[this.lang]||n.func.en||``,void 0,!0):this.getPattern(n.func,void 0,t):e[this.lang]||e.en||``}return e.toString()}async getTextAsync(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return ks(e)?e.func?typeof e.func==`object`?this.getPatternAsync(e.func[this.lang]||e.func.en||``,null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||``:e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let t=this.state.confirmData||this.props.schema.confirm;if(!t)return null;let n=null;return t.type===`warning`?n=_.createElement(et,null):t.type===`error`?n=_.createElement(ur,null):t.type===`info`&&(n=_.createElement(E,null)),_.createElement(bn,{title:this.getText(t.title)||J.t(`jc_Please confirm`),text:this.getText(t.text),ok:this.getText(t.ok)||J.t(`jc_Ok`),cancel:this.getText(t.cancel)||J.t(`jc_Cancel`),icon:n||void 0,onClose:t=>this.setState({confirmDialog:!1},()=>{if(t){if(this.state.confirmCallback){let e=this.state.confirmCallback;this.setState({confirmCallback:null},()=>e(!0));return}let t=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&e.setValue(t,this.state.confirmDepAttr,this.state.confirmDepNewValue),e.setValue(t,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(t))}else{let e=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{e&&e(!1)})}})})}getIcon(e){if(e||=this.props.schema.icon,!e)return null;let t=Os[e];return t?t():((e.endsWith(`.png`)||e.endsWith(`.svg`)||e.endsWith(`.jpg`))&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),_.createElement(Mt,{src:e,style:{width:22,height:22}}))}onChangeAsync(e,t){return new Promise(n=>{let r=this.onChange(e,t,n);r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))})}async onChange(t,n,r){let i=JSON.parse(JSON.stringify(this.props.data));if(e.setValue(i,t,n),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmData:null},()=>{typeof r==`function`?r():e()})});if(this.props.schema.confirmDependsOn)for(let a=0;a<this.props.schema.confirmDependsOn.length;a++){let o=this.props.schema.confirmDependsOn[a];if(o.confirm){let a=e.getValue(i,o.attr);if(await this.execute(o.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{if(!o.confirm)throw Error(`Cannot set value: confirm is not defined for ${o.attr}`);this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmDepNewValue:a,confirmDepAttr:o.attr,confirmData:o.confirm},()=>{typeof r==`function`?r():e()})})}}let a=[];if(this.props.schema.onChangeDependsOn)for(let t=0;t<this.props.schema.onChangeDependsOn.length;t++){let n=this.props.schema.onChangeDependsOn[t];if(n.onChange){let t=e.getValue(i,n.attr),r;r=this.props.custom?await this.executeCustom(n.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(n.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`),r!==t&&n.attr&&(e.setValue(i,n.attr,r),a.push(n.attr))}}if(this.props.schema.hiddenDependsOn)for(let e=0;e<this.props.schema.hiddenDependsOn.length;e++){let t=this.props.schema.hiddenDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.labelDependsOn)for(let e=0;e<this.props.schema.labelDependsOn.length;e++){let t=this.props.schema.labelDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.helpDependsOn)for(let e=0;e<this.props.schema.helpDependsOn.length;e++){let t=this.props.schema.helpDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.onChange&&!this.props.schema.onChange.ignoreOwnChanges){let t=e.getValue(i,this.props.attr),n=this.props.custom?await this.executeCustom(this.props.schema.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(this.props.schema.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`);n!==t&&e.setValue(i,this.props.attr,n)}return this.props.custom?(this.props.onChange(t,n,()=>r==null?void 0:r()),a!=null&&a.length&&a.forEach((t,n)=>setTimeout(()=>this.props.onChange(t,e.getValue(i,t)),n*50))):this.props.onChange(i,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,i),r==null||r()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?<![\w$.])getObject\(/g,(t,n)=>{let r=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(r)?t:`await ${t}`})}debugLog(e,t,n,r){var i,a;if(!((i=this.props.schema)!=null&&i.debug))return;let o=this.props.attr||((a=this.props.schema)==null?void 0:a.attr)||``,s=`%c[jsonConfig]%c ${o?`${o} → `:``}${e}`,c={function:t,result:n,data:r??this.props.data,arrayIndex:this.props.arrayIndex};n instanceof Error?console.error(s,`background:#b71c1c;color:#fff;border-radius:3px;padding:1px 4px`,`color:#e53935`,c):console.log(s,`background:#33691e;color:#fff;border-radius:3px;padding:1px 4px`,`color:#7cb342`,c)}static isHostAllowed(e,t){if(!(e!=null&&e.os)&&!(e!=null&&e.notOs)&&(e==null?void 0:e.docker)===void 0)return!0;let n=t==null?void 0:t.os;return!(n&&(e.os&&!(Array.isArray(e.os)?e.os:[e.os]).includes(n)||e.notOs&&(Array.isArray(e.notOs)?e.notOs:[e.notOs]).includes(n))||e.docker!==void 0&&(t==null?void 0:t.docker)!==void 0&&e.docker!==t.docker)}async execute(t,n,r,i,a,o){let s;if(ks(t))s=t.func;else if(typeof t==`string`)s=t;else return t;if(!s)return n;s.includes(`getObject(`)&&(s=e.ensureAwaitGetObject(s));try{var c,l;let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`_alive`,`_common`,`_socket`,`_instance`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,s.includes(`return`)?s:`return ${s}`)(r||this.props.data||{},this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,i,a||{},this.props.changed,window.location.href,this.getObject,((c=this.props.oContext.hostInfo)==null?void 0:c.os)||``,((l=this.props.oContext.hostInfo)==null?void 0:l.arch)||``,this.props.oContext.hostInfo||{});return this.debugLog(o||`JS function`,s,e,r),e}catch(e){return this.debugLog(o||`JS function`,s,e instanceof Error?e:Error(String(e)),r),console.error(`Cannot execute ${JSON.stringify(t)}: ${e}`),n}}async executeCustom(t,n,r,i,a,o,s){let c;if(ks(t))c=t.func;else if(typeof t==`string`)c=t;else return t;if(!c)return null;c.includes(`getObject(`)&&(c=e.ensureAwaitGetObject(c));try{var l,u;let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,c.includes(`return`)?c:`return ${c}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,i||{},r||{},this.props.oContext.socket,a,o||{},this.props.changed,window.location.href,this.getObject,((l=this.props.oContext.hostInfo)==null?void 0:l.os)||``,((u=this.props.oContext.hostInfo)==null?void 0:u.arch)||``,this.props.oContext.hostInfo||{});return this.debugLog(s||`JS function`,c,e,n),e}catch(e){return this.debugLog(s||`JS function`,c,e instanceof Error?e:Error(String(e)),n),console.error(`Cannot execute ${c}: ${e}`),null}}async calculate(e){let t,n,r,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default),{error:t,disabled:n,hidden:r,defaultValue:i}}onError(e,t){var n,r;e&&(t?this.isError[e]=t:delete this.isError[e]),(n=(r=this.props).onError)==null||n.call(r,e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},this.getText(e,n)):(e=this.getText(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}static escapeString(t,n){return typeof t==`string`?(t=t.replace(/`/g,"\\`"),t=t.replace(/\${([^}]+)}/g,(t,r)=>{if(r&&typeof r==`string`&&r.startsWith(`data.`)){let t=e.getValue(n,r.replace(/^data\./,``));if(typeof t==`string`&&(t.includes(`\\`)||t.includes(`"`)))return`\${${r}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return t}),t):``}async getPatternAsync(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&(i=e.ensureAwaitGetObject(i));try{var a,o;if(this.props.custom){var s,c;let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject,((s=this.props.oContext.hostInfo)==null?void 0:s.os)||``,((c=this.props.oContext.hostInfo)==null?void 0:c.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject,((a=this.props.oContext.hostInfo)==null?void 0:a.os)||``,((o=this.props.oContext.hostInfo)==null?void 0:o.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}getPattern(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&console.warn(`It is not possible to use getObject function in text patterns: ${i}`);try{var a,o;if(this.props.custom){var s,c;let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,((s=this.props.oContext.hostInfo)==null?void 0:s.os)||``,((c=this.props.oContext.hostInfo)==null?void 0:c.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,((a=this.props.oContext.hostInfo)==null?void 0:a.os)||``,((o=this.props.oContext.hostInfo)==null?void 0:o.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;let e=this.props.schema;if(!e)return;let{error:t,disabled:n,hidden:r,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==r||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:r,defaultValue:i}})},50)}render(){let t=this.props.schema;if(!t||this.props.expertMode===!1&&t.expertMode||!e.isHostAllowed(t,this.props.oContext.hostInfo)||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.defaultSendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),t.hideOnlyControl){let e=_.createElement(Jt,{size:{xs:t.xs||Ds,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0},style:{marginBottom:0,textAlign:`left`,...t.style,...this.props.oContext.themeType===`dark`?t.darkStyle:{}}});return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),e):e}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!0))},10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!1))},10)),t.validatorNoSaveOnError&&this.props.attr&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:!t.validatorErrorText||J.t(t.validatorErrorText)},setTimeout(e=>Object.keys(e).forEach(t=>this.props.onError(t,e[t])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));let n=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled||!1,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return n;let r=_.createElement(Jt,{title:this.getText(t.tooltip),size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0},style:{marginBottom:0,textAlign:`left`,width:t.type===`divider`||t.type===`header`?t.width||`100%`:void 0,...t.style,...this.props.oContext.themeType===`dark`?t.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?_.createElement(Jt,{container:!0,style:{width:`100%`}},_.createElement(Jt,{sx:{flex:1}},n),_.createElement(Jt,null,_.createElement(xt,{disabled:this.state.calculatedValues.disabled,variant:`outlined`,onClick:()=>this.defaultSendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):J.t(`jc_Request data by instance`)},this.getText(this.props.schema.button)))):n);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),this.renderDialogConfirm(),r):this.state.confirmDialog?_.createElement(_.Fragment,null,this.renderDialogConfirm(),r):r}};K(X,`DIFFERENT_VALUE`,`__different__`),K(X,`DIFFERENT_LABEL`,`jc___different__`),K(X,`NONE_VALUE`,``),K(X,`NONE_LABEL`,`jc_none`),g();var As={fullWidth:{width:`100%`},accordionSummary:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`}),accordionTitle:{},toolbar:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`,borderRadius:`3px`}),tooltip:{pointerEvents:`none`}},js=class extends X{constructor(e){super(e),K(this,`typingTimer`,null),K(this,`onAccordionError`,e=>(t,n)=>{let r={...this.state.accordionErrors};r[e]||(r[e]={}),t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({accordionErrors:r}),this.props.onError(t,n)}),K(this,`hasAccordionErrors`,e=>!!this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onChangeWrapper`,e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{if(this.typingTimer=null,this.props.attr){let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(e))}},300,e)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))}),K(this,`onExport`,()=>{let{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,r=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.json`,i=document.createElement(`a`);i.setAttribute(`href`,n),i.setAttribute(`download`,r),i.click()}),K(this,`onImport`,e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.json`,t.onchange=t=>{var n;let r=(n=t.target.files)==null?void 0:n[0];if(!r)return;let i=new FileReader;i.onload=t=>{try{var n;let r=JSON.parse((n=t.target)==null?void 0:n.result);if(!Array.isArray(r)){alert(J.t(`jc_Invalid JSON format. Expected an array.`));return}let i;i=e?r:[...this.state.value,...r],this.setState({value:i,activeIndex:-1},()=>this.onChangeWrapper(i))}catch{alert(J.t(`jc_Invalid JSON file.`))}},i.readAsText(r)},t.click()}),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),super.componentWillUnmount()}itemAccordion(e,t){let{value:n}=this.state,{schema:r}=this.props,i={type:`panel`,items:r.items.reduce((e,t)=>(t.attr&&(e[t.attr]=t),e),{}),style:{marginLeft:`-8px`,marginTop:`10px`,marginBottom:`10px`}};return _.createElement(jO,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(e,r)=>{if(typeof e==`string`&&e){let i=JSON.parse(JSON.stringify(n));i[t][e]=r,this.setState({value:i},()=>this.onChangeWrapper(i))}},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);let r=this.state.activeIndex-1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);let r=this.state.activeIndex+1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}renderItem(){let{schema:e}=this.props,{value:t}=this.state;return t?_.createElement(A,null,e.label||!e.noDelete?_.createElement(ue,{variant:`dense`},e.label?_.createElement(Pn,{variant:`h6`,id:`tableTitle`,component:`div`},this.getText(e.label)):null,e.noDelete?null:_.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Export configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onExport},_.createElement(it,null))),_.createElement(Ce,{title:J.t(`jc_Import and replace configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!0)},_.createElement(ut,null))),_.createElement(Ce,{title:J.t(`jc_Import and add configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!1)},_.createElement(ln,null))),_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null)))):null,t.map((n,r)=>_.createElement(Ae,{key:`${n}_${r}`,expanded:this.state.activeIndex===r,onChange:(e,t)=>this.setState({activeIndex:t?r:-1})},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,As.fullWidth,As.accordionSummary)},_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:1,width:`100%`}},e.titleAttr&&_.createElement(Pn,{style:As.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(r)&&_.createElement(ur,{sx:{fontSize:20,color:`error.main`}}))),_.createElement(xn,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[r],r),_.createElement(ue,{sx:As.toolbar},r?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(r)},_.createElement(hn,null))):_.createElement(`div`,{style:As.buttonEmpty}),r<t.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(r)},_.createElement(Ot,null))):_.createElement(`div`,{style:As.buttonEmpty}),e.noDelete?null:_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(r)},_.createElement(me,null))),e.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(r)},_.createElement(se,null))):null)))),!e.noDelete&&t.length>0?_.createElement(ue,{variant:`dense`,sx:As.rootTool},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null))):null,e.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}};g();var Ms={root:{width:`100%`},notAlive:{color:`#a30000`}},Ns=class extends X{constructor(...e){super(...e),K(this,`aliveId`,null),K(this,`checkTimeout`,null),K(this,`onAliveChanged`,(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})})}async componentDidMount(){await super.componentDidMount();let e=await this.getInstance();this.aliveId=`${e}.alive`;let t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val),instance:e},async()=>{this.aliveId&&await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith(`system.adapter.`)&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){var e;if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;let t=(e=this.state.instance)==null?void 0:e.replace(/^system\.adapter\./,``);return _.createElement(`div`,{style:{...Ms.root,...this.state.alive?void 0:Ms.notAlive}},this.state.alive?this.props.schema.textAlive===void 0?J.t(`jc_Instance %s is alive`,t):this.props.schema.textAlive?J.t(this.props.schema.textAlive,t):``:this.props.schema.textNotAlive===void 0?J.t(`jc_Instance %s is not alive`,t):this.props.schema.textNotAlive?J.t(this.props.schema.textNotAlive,t):``)}};g();var Ps=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)));if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)n.value!==X.DIFFERENT_VALUE&&(e[n.value]=this.getText(n.label));this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n,r=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE?([...this.state.value].filter(e=>!r.find(t=>typeof t==`object`?t.value===e:t===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>typeof e==`object`?e.value==this.state.value:e==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),_.createElement(un,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:r,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||this.getText(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},getOptionLabel:e=>typeof e==`object`?this.getText((e==null?void 0:e.label)??``):``,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}};g();var Fs=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof e==`string`&&(n=JSON.parse(e))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});let r=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(r!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${r}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,r));return}}this.props.oContext.socket.sendTo(r,this.props.schema.command||`send`,n).then(n=>{n&&Array.isArray(n)&&n.forEach(e=>t.push(typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(e=>{console.error(`Error in autocompleteSendTo:`,e),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n,r=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_LABEL?([...this.state.value].filter(e=>!r.find(t=>t.value===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>e.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),r.length?_.createElement(un,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:r,disabled:t,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||String(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},getOptionLabel:e=>this.getText(typeof e==`object`?(e==null?void 0:e.label)??``:e),onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{...n.slotProps,input:{...n.slotProps.input,endAdornment:_.createElement(_.Fragment,null,this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null,t?null:n.slotProps.input.endAdornment)}}})}):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Is={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,marginLeft:4,minWidth:48}},Ls=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,showDialog:!1})}renderItem(e,t){let{schema:n,attr:r}=this.props,{value:i,showDialog:a}=this.state;return _.createElement(Wt,{style:Is.fullWidth,variant:`standard`},n.label?_.createElement(rr,{shrink:!0},this.getText(n.label)):null,_.createElement(`div`,{style:Is.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:i??``,error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(r,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:Is.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showDialog:!0})},`...`)),a?_.createElement(Fn,{title:J.t(`jc_Define schedule`),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:J.t(`jc_Cancel`),ok:J.t(`jc_Ok`),theme:this.props.oContext.theme,onOk:e=>this.setState({showDialog:!1,value:e},()=>this.onChange(r,e))}):null)}};g();var Rs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=(await this.props.oContext.socket.getCertificates()).filter(e=>{let t=this.props.attr.toLowerCase();return t.includes(e.type)||e.type===`public`&&t.includes(`cert`)||e.type===`private`&&(t.includes(`priv`)||t.includes(`key`))?!0:!!(e.type===`chained`&&(t.includes(`chain`)||t.includes(`ca`)))}).map(e=>({label:e.name,value:e.name}));t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),onChange:e=>this.setState({value:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zs={fullWidth:{width:`100%`},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}},Bs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.props.oContext.socket.getCertificates(),n=[],r=[],i=[],a,o=await this.getCachedObject(`system.certificates`);a=o!=null&&(e=o.native)!=null&&e.collections?Object.keys(o.native.collections):null,t.forEach(e=>{e.type===`public`?n.push({label:e.name,value:e.name}):e.type===`private`?r.push({label:e.name,value:e.name}):e.type===`chained`?i.push({label:e.name,value:e.name}):(n.push({label:e.name,value:e.name}),r.push({label:e.name,value:e.name}),i.push({label:e.name,value:e.name}))}),n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),i.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:i,certsPrivateOptions:r,collectionsOptions:a})}renderItem(e,t){var n,r,i,a,o,s,c;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;let l=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString(),u=X.getValue(this.props.data,this.props.schema.certPublicName||`certPublic`),d=X.getValue(this.props.data,this.props.schema.certPrivateName||`certPrivate`),f=X.getValue(this.props.data,this.props.schema.certChainedName||`certChained`),p=(n=this.state.certsPublicOptions)==null?void 0:n.find(e=>e.value===u),m=(r=this.state.certsPrivateOptions)==null?void 0:r.find(e=>e.value===d),h=(i=this.state.certsChainOptions)==null?void 0:i.find(e=>e.value===f);return _.createElement(`div`,{style:zs.fullWidth},this.state.collectionsOptions?_.createElement(Wt,{style:zs.leWidth,variant:`standard`},_.createElement(rr,{shrink:!0},`Let's encrypt`),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:l,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(a=this.state.collectionsOptions)==null?void 0:a.map(e=>_.createElement(z,{key:e,value:e},e)))):null,this.state.collectionsOptions?_.createElement(`br`,null):null,this.state.collectionsOptions&&l!==`false`?_.createElement(`div`,null,J.t(`jc_Fallback custom certificates`)):null,_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Public certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:u||``,renderValue:()=>this.getText(p==null?void 0:p.label,!0),onChange:e=>this.onChange(this.props.schema.certPublicName||`certPublic`,e.target.value)},(o=this.state.certsPublicOptions)==null?void 0:o.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Private certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:d||``,renderValue:()=>this.getText(m==null?void 0:m.label,!0),onChange:e=>this.onChange(this.props.schema.certPrivateName||`certPrivate`,e.target.value)},(s=this.state.certsPrivateOptions)==null?void 0:s.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Chained certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:f||``,renderValue:()=>this.getText(h==null?void 0:h.label,!0),onChange:e=>this.onChange(this.props.schema.certChainedName||`certChained`,e.target.value)},(c=this.state.certsChainOptions)==null?void 0:c.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))))}};g();var Vs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t,n=await this.getCachedObject(`system.certificates`);t=n!=null&&(e=n.native)!=null&&e.collections?Object.keys(n.native.collections):[],this.setState({collectionsOptions:t})}renderItem(e,t){var n;if(!this.state.collectionsOptions)return null;let r=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString();return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:r,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(n=this.state.collectionsOptions)==null?void 0:n.map(e=>_.createElement(z,{key:e,value:e},e))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Hs=class extends X{async componentDidMount(){await super.componentDidMount();let e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{let t=await this.props.oContext.socket.sendTo(e,`checkDocker`,null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||``,errorDocker:t?t.daemonRunning?``:J.t(`jc_Docker is not installed or not running`):J.t(`jc_No response from admin`)})})}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr);return this.state.requesting?_.createElement(Wn,null):this.state.errorDocker&&!n?_.createElement(_n,{style:{color:`orange`}},J.t(`jc_Docker is not available`),`:\xA0`,J.t(`jc_${this.state.errorDocker}`).replace(/^jc_/,``)):_.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{checked:!!n,onChange:e=>{this.props.attr&&this.onChange(this.props.attr,e.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:_.createElement(_n,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Us=`system.credentials.`,Ws=1,Gs=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],Ks={email:`E-mail`,cloud:`Cloud`,ai:`AI`,aws:`AWS`,azure:`Azure`,custom:`Custom`},qs={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]},Js={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function Ys(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${window.btoa(n)}`}var Xs={anthropic:Ys(Js.anthropic,`#d97757`),chatgpt:Ys(Js.chatgpt,`#74aa9c`),gemini:Ys(Js.gemini,`#8e75b2`),email:Ys(Js.email,`#2196f3`),login:Ys(Js.login,`#9e9e9e`),key:Ys(Js.key,`#ffc107`),aws:Ys(Js.aws,`#ff9900`),azure:Ys(Js.azure,`#0089d6`)},Zs={anthropic:{label:`Anthropic`,icon:Xs.anthropic,form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:Xs.chatgpt,form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:Xs.gemini,form:`key`,type:`ai`,name:`gemini`},aws:{label:`AWS`,icon:Xs.aws,form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:Xs.azure,form:`azure`,type:`azure`,name:`azure`},email:{label:`E-mail`,icon:Xs.email,form:`login`,type:`email`},login:{label:`Login & password`,icon:Xs.login,form:`login`,type:null},key:{label:`Key`,icon:Xs.key,form:`key`,type:null}};function Qs(e,t,n){return _.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},e!=null&&e.icon?_.createElement(Mt,{src:e.icon,style:{width:20,height:20}}):n?_.createElement(`span`,{style:{width:20,height:20,flexShrink:0}}):null,t)}var $s=class e extends X{async componentDidMount(){if(await super.componentDidMount(),!this.props.attr)throw Error(`Missing attribute attribute`);let e=X.getValue(this.props.data,this.props.attr),t=await this.readCredentials();this.setState({value:e,selectOptions:t})}async readCredentials(){let t=[];try{let n=await this.props.oContext.socket.getObjectViewSystem(`config`,Us,`${Us}香`);t=Object.values(n).filter(e=>{var t;return!!e&&(!this.props.schema.credentialType||((t=e.native)==null?void 0:t.type)===this.props.schema.credentialType)}).map(t=>{var n;return{label:e.getCredentialName(t),value:t._id,icon:typeof((n=t.common)==null?void 0:n.icon)==`string`?t.common.icon:void 0}}).sort((e,t)=>e.label.localeCompare(t.label))}catch(e){console.error(`Cannot read credentials: ${e}`)}return t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),t}static getCredentialName(e){var t;let n=(t=e.common)==null?void 0:t.name,r;return r=n&&typeof n==`object`?n[J.getLanguage()]||n.en||Object.values(n)[0]||``:n||``,r||e._id.substring(19)}templateKeys(){let e=this.props.schema.credentialType;return Object.keys(Zs).filter(t=>{let n=Zs[t];return!e||n.type===e||n.type===null})}selectTemplate(e){let t=Zs[e];this.setState({addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``})}openAddDialog(){let e=this.templateKeys()[0],t=Zs[e];this.setState({addOpen:!0,addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``,addSaving:!1})}async createCredential(){let e=Zs[this.state.addTemplate||``],t=(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`);if(!t){this.setState({addError:J.t(`jc_A unique name is required`)});return}let n=`${Us}${t}`;if((this.state.selectOptions||[]).find(e=>e.value===n)){this.setState({addError:J.t(`jc_A credential with this name already exists`)});return}let r=(e==null?void 0:e.form)||`login`,i=qs[r],a=this.state.addFields||{};if(i.some(e=>e.required&&!(a[e.name]||``).trim())){this.setState({addError:J.t(`jc_Please fill in all required fields`)});return}let o=(e==null?void 0:e.type)||this.props.schema.credentialType||this.state.addType||`custom`;this.setState({addSaving:!0,addError:``});try{let s=this.props.oContext.socket,c={type:o,form:r,version:Ws,encryptedFields:i.filter(e=>e.encrypted).map(e=>e.name)};for(let e of i){let t=a[e.name]||``;c[e.name]=e.encrypted&&t?await s.encrypt(t):t}let l={_id:n,type:`config`,common:{name:t,...e!=null&&e.icon?{icon:e.icon}:{}},native:c,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}};await s.setObject(n,l);let u=this.state.selectOptions||[],d=u.find(e=>e.value===X.NONE_VALUE),f=u.filter(e=>e.value!==X.NONE_VALUE);f.push({label:t,value:n,icon:e==null?void 0:e.icon}),f.sort((e,t)=>e.label.localeCompare(t.label));let p=d?[d,...f]:f;this.setState({addOpen:!1,addSaving:!1,selectOptions:p,value:n},()=>this.onChange(this.props.attr,n))}catch(e){this.setState({addSaving:!1,addError:J.t(`jc_Cannot create credential: %s`,e.toString())})}}renderAddDialog(){if(!this.state.addOpen)return null;let e=Zs[this.state.addTemplate||``],t=qs[(e==null?void 0:e.form)||`login`],n=`${Us}${(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`)}`,r=!this.props.schema.credentialType&&(e==null?void 0:e.type)===null;return _.createElement(nn,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1})},_.createElement(Nt,null,J.t(`jc_Add credential`)),_.createElement(Tn,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8}},_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Template`)),_.createElement(Me,{variant:`standard`,value:this.state.addTemplate||``,onChange:e=>this.selectTemplate(e.target.value)},this.templateKeys().map(e=>_.createElement(z,{key:e,value:e},_.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},_.createElement(`img`,{src:Zs[e].icon,width:20,height:20,alt:``}),J.t(Zs[e].label)))))),r?_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Credential type`)),_.createElement(Me,{variant:`standard`,value:this.state.addType||`custom`,onChange:e=>this.setState({addType:e.target.value})},Gs.map(e=>_.createElement(z,{key:e,value:e},J.t(Ks[e]))))):null,_.createElement(ot,{variant:`standard`,fullWidth:!0,label:J.t(`jc_Name`),value:this.state.addName||``,error:!!this.state.addError,helperText:this.state.addName?n:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value,addError:``})}),t.map(e=>{var t;let n=((t=this.state.addFields)==null?void 0:t[e.name])||``;if(e.type===`select`){let t=e.options?[...e.options]:[];return n&&!t.find(e=>e.value===n)&&t.unshift({value:n}),_.createElement(ot,{key:e.name,select:!0,variant:`standard`,fullWidth:!0,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})},t.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label||e.value)))}return _.createElement(ot,{key:e.name,variant:`standard`,fullWidth:!0,type:e.type===`password`?`password`:`text`,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:e.type===`password`?`new-password`:`off`}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})})}),this.state.addError?_.createElement(Ct,{severity:`error`},this.state.addError):null),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,disabled:!!this.state.addSaving||!(this.state.addName||``).trim(),startIcon:_.createElement(on,null),onClick:()=>this.createCredential()},J.t(`jc_Create`)),_.createElement(xt,{variant:`contained`,color:`grey`,disabled:!!this.state.addSaving,startIcon:_.createElement(De,null),onClick:()=>this.setState({addOpen:!1})},J.t(`jc_Cancel`))))}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value),a=this.state.value&&this.state.value!==X.NONE_VALUE&&!i?this.state.value:null,o=this.state.selectOptions.some(e=>!!e.icon),s=!this.props.schema.disableCreation;return _.createElement(`div`,{style:{display:`flex`,alignItems:`flex-end`,gap:4,width:`100%`}},_.createElement(Wt,{style:{flex:1,minWidth:0},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e||!!a,displayEmpty:!0,disabled:!!t,value:this.state.value||X.NONE_VALUE,renderValue:()=>a||Qs(i,this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),o),onChange:e=>this.setState({value:e.target.value===X.NONE_VALUE?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},Qs(e,this.getText(e.label,this.props.schema.noTranslation!==!1),o)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),s?_.createElement(Zn,{size:`small`,disabled:!!t,title:J.t(`jc_Add credential`),onClick:()=>this.openAddDialog()},_.createElement(re,null)):null,this.renderAddDialog())}};g();var ec={fullWidth:{width:`100%`},icon:{width:24,height:24,marginRight:4},licLabel:{fontWeight:`bold`,minWidth:100,marginRight:10,textTransform:`capitalize`,display:`inline-block`},licValue:{fontWeight:`normal`},errorTitle:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`}),okTitle:e=>({color:e.palette.mode===`dark`?`#6fd56f`:`#007c00`}),errorText:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`,mb:`30px`})},tc=class e extends X{async componentDidMount(){await super.componentDidMount(),this.setState({_error:``,running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[_.createElement(`div`,{key:`error`},e)],e.push(_.createElement(xt,{key:`button`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`iobroker.net`)),this.state.allLicenses.length?e.push(_.createElement(Ye,{key:`table`},_.createElement(H,{size:`small`},_.createElement(fr,null,_.createElement(F,null,_.createElement(Ee,null,J.t(`jc_Product`)),_.createElement(Ee,null,J.t(`jc_Version`)),_.createElement(Ee,null,`UUID`),_.createElement(Ee,null,J.t(`jc_ValidTill`)),_.createElement(Ee,null,J.t(`jc_Commercial`)),_.createElement(Ee,null,`ID`))),_.createElement(_e,null,this.state.allLicenses.map(e=>_.createElement(F,{key:e.id},_.createElement(Ee,{sx:e.validName?null:ec.errorText},e.license.product),_.createElement(Ee,{sx:e.validVersion?null:ec.errorText},e.license.version),_.createElement(Ee,{sx:e.validUuid?null:ec.errorText},e.license.uuid||`--`),_.createElement(Ee,{sx:e.validTill?null:ec.errorText},e.license.validTill&&e.license.validTill!==`0000-00-00 00:00:00`?new Date(e.license.validTill).toLocaleDateString():`--`),_.createElement(Ee,null,e.license.invoice===`free`?`-`:e.license.invoice===`MANUALLY_CREATED`?`✓`:e.license.invoice),_.createElement(Ee,null,e.id))))))):(e.push(_.createElement(`div`,{key:`text1`},J.t(`jc_No one license found in license manager`))),e.push(_.createElement(`div`,{key:`text2`},J.t(`jc_Please create license`))))),_.createElement(nn,{open:!0,maxWidth:`xl`,fullWidth:this.props.fullWidth===void 0||this.props.fullWidth,onClick:()=>this.setState({_error:``,allLicenses:null})},_.createElement(Nt,null,J.t(`jc_Error`)),_.createElement(Tn,null,_.createElement(Bn,null,e)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({_error:``,allLicenses:null}),color:`primary`,autoFocus:!0,startIcon:_.createElement(on,null)},J.t(`jc_Ok`))))}return null}renderMessageDialog(){if(this.state.showLicenseData){let e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(t[n]!==null&&t[n]!==void 0){if(typeof t[n]==`object`){let r=t[n];Object.keys(r).forEach(t=>{r[t]!==null&&r[t]!==void 0&&(typeof r[t]==`object`?e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},t,`:`),JSON.stringify(r[t],null,2))):e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},n,` -`,t,`:`),r[t].toString())))})}else e.push(_.createElement(`div`,{key:n},_.createElement(`div`,{style:ec.licLabel},n.replace(/_/g,` `),`:`),t[n].toString()))}}),e.push(_.createElement(`div`,{key:`checked`},_.createElement(`div`,{style:ec.licLabel},J.t(`jc_Checked`),`:`),this.state.licenseOfflineCheck?J.t(`jc_locally`):J.t(`jc_via internet`))),_.createElement(nn,{open:!0,onClose:()=>this.setState({showLicenseData:null})},_.createElement(Nt,null,_.createElement(vt,{component:`span`,sx:this.state.result?ec.okTitle:ec.errorTitle},J.t(`jc_License %s`,this.state.result?`OK`:`INVALID`))),_.createElement(Tn,null,this.state.showLinkToProfile?_.createElement(xt,{variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`https://iobroker.net`):null,this.state._error?_.createElement(vt,{component:`div`,sx:ec.errorText},this.state._error):null,e),_.createElement(Et,null,_.createElement(xt,{onClick:()=>this.setState({showLicenseData:null,_error:``}),color:`primary`,variant:`contained`},J.t(`jc_Close`))))}return null}static parseJwt(e){let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``));try{return JSON.parse(n)}catch{return null}}static isVersionValid(e,t,n,r){if(!t||!e)return!0;let[i]=e.split(`.`);return t.startsWith(`>=`)||t.startsWith(`<=`)?parseInt(t.substring(2,10)):t.startsWith(`>`)||t.startsWith(`<`)||t.startsWith(`=`)?parseInt(t.substring(1,10)):t.startsWith(`==`)?parseInt(t.substring(2,10)):t.startsWith(`===`)&&parseInt(t.substring(3,10)),!0}async findInLicenseManager(t){var n;let r=await this.getCachedObject(`system.licenses`),i=[];if(r!=null&&(n=r.native)!=null&&(n=n.licenses)!=null&&n.length){let n=null,s=Date.now(),c;if(this.props.schema.uuid){var a;let e=await this.getCachedObject(`system.meta.uuid`);c=e==null||(a=e.native)==null?void 0:a.uuid}let l;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${t}`);l=e==null||(o=e.common)==null?void 0:o.version}if(r.native.licenses.forEach(r=>{let a=!r.validTill||r.validTill===`0000-00-00 00:00:00`||new Date(r.validTill).getTime()>s,o=(r.product||``).split(`.`),u=o[1]===t||t===`vis-2`&&o[1]===`vis`,d=!c||!r.uuid||r.uuid===c,f=e.isVersionValid(l,r.version,r.invoice,t);(!n||r.invoice!==`free`)&&a&&u&&d&&f&&(n=r),i.push({id:r.id,validName:u,validUuid:d,validVersion:f,validTill:a,license:r})}),n){let e=i.find(e=>e.id===(n==null?void 0:n.id));e&&(e.used=!0)}}return i}async checkLicense(t,n){let r;if(this.props.schema.uuid){var i;let e=await this.getCachedObject(`system.meta.uuid`);r=e==null||(i=e.native)==null?void 0:i.uuid}let a;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${n}`);a=e==null||(o=e.common)==null?void 0:o.version}let s=new AbortController,c=setTimeout(()=>{c=null,s.abort()},5e3);try{let i=await window.fetch(`https://iobroker.net/api/v1/public/cert/`,{method:`POST`,body:JSON.stringify({json:t,uuid:r}),headers:{"Content-Type":`text/plain`},signal:s.signal});c&&clearTimeout(c);let o=await i.text(),l;try{l=JSON.parse(o)}catch{}if(l!=null&&l.error)try{let n=e.parseJwt(t),r=J.t(`jc_${(n==null?void 0:n.error)||l.error||`Unknown error`}`).replace(/^jc_/,``);return this.setState({_error:r,licenseOfflineCheck:!1,showLicenseData:n,result:!1,running:!1})}catch{return console.log(`Cannot parse license`),this.setState({_error:l.error,result:!1,running:!1})}{let i=null;try{i=e.parseJwt(t)}catch{}if(l){let t=l.validTill||l.valid_till;if(t&&t!==`0000-00-00 00:00:00`&&new Date(t).getTime()<Date.now())return this.setState({_error:J.t(`jc_License expired on %s`,new Date(t).toLocaleString()),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1});let o=(l.name||``).split(`.`);return o[1]===n||o[1]===`vis`&&n===`vis-2`?r&&!l.uuid&&n===`vis-2`?this.setState({_error:J.t(`jc_License must be converted`,l.uuid),showLinkToProfile:!0,licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):r&&l.uuid&&l.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,l.uuid),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):e.isVersionValid(a,l.version,l.invoice,n)?this.setState({licenseOfflineCheck:!1,showLicenseData:i,result:!0,running:!1}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,l.version,this.props.schema.version),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,l.name),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1})}throw Error(`jc_Invalid answer from server`)}}catch(i){var l;if((i==null||(l=i.response)==null?void 0:l.status)===404)return this.setState({_error:J.t(`jc_License does not exist`),result:!1,running:!1});try{let i=e.parseJwt(t),o=((i==null?void 0:i.name)||``).split(`.`);return i!=null&&i.valid_till&&i.valid_till!==`0000-00-00 00:00:00`&&new Date(i.valid_till).getTime()<Date.now()?this.setState({_error:J.t(`jc_License expired on %s`,new Date(i.valid_till).toLocaleString()),showLicenseData:i,licenseOfflineCheck:!0,running:!1,result:!1}):o[1]===n?r&&i!=null&&i.uuid&&i.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,i==null?void 0:i.uuid),showLicenseData:i,licenseOfflineCheck:!0,result:!1,running:!1}):e.isVersionValid(a,i==null?void 0:i.version,i==null?void 0:i.invoice,n)?this.setState({running:!1,result:!0,licenseOfflineCheck:!0,showLicenseData:i}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,i==null?void 0:i.version,this.props.schema.version),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,i==null?void 0:i.name),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1})}catch{return this.setState({_error:J.t(`jc_Cannot decode license`),result:!1,licenseOfflineCheck:!0,running:!1})}}}renderAskForUpdate(){return this.state.askForUpdate?_.createElement(bn,{text:J.t(`jc_License not found in license manager. Do you want to read licenses from iobroker.net?`),ok:J.t(`jc_Yes`),onClose:async e=>{if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(``,``)}catch(e){window.alert(J.t(`jc_Cannot read licenses: %s`,e));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){let t=this.props.oContext.adapterName===`vis-2`?`vis`:this.props.oContext.adapterName;this.setState({running:!0});let n,r;if(this.props.data.useLicenseManager){if(r=await this.findInLicenseManager(t),n=r.find(e=>e.used),n&&=n.license.json,!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:J.t(`jc_Suitable license not found in license manager`),result:!1,running:!1,allLicenses:r||null}):this.setState({_error:J.t(`jc_Please enter the license`),result:!1,running:!1})}renderItem(){return _.createElement(`div`,{style:ec.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||`outlined`,color:this.props.schema.color||`primary`,style:ec.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:_.createElement(rt,null),onClick:()=>this._onClick()},this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||`jc_Check license`,this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}};g();var nc=class extends X{renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Array.isArray(n);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{indeterminate:r,checked:!!n,onChange:e=>{if(this.props.attr){let t;t=r?this.onChange(this.props.attr,!0):this.onChange(this.props.attr,e.target.checked),t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),_.createElement(_n,{style:{color:`red`}},e?this.props.schema.validatorErrorText?J.t(this.props.schema.validatorErrorText):J.t(`jc_Error`):null),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var rc={standard:sr,filled:Lt,outlined:Ie},ic=e=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return{inputRoot:{display:`inline-flex`,flexWrap:`wrap`,flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:`border-box`},"&.mui-variant-outlined":{paddingTop:`14px`},"&.mui-variant-filled":{paddingTop:`28px`}},input:{display:`inline-block`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,appearance:`none`,WebkitTapHighlightColor:`rgba(0,0,0,0)`,float:`left`,flex:1},chipContainer:{display:`flex`,flexFlow:`row wrap`,alignItems:`center`,cursor:`text`,marginBottom:`-2px`,minHeight:40},outlined:{"& input":{height:16,paddingTop:`4px`,paddingBottom:`12px`,marginTop:`4px`,marginBottom:`4px`}},standard:{marginTop:`18px`},filled:{"& input":{height:22,marginBottom:`4px`,marginTop:`4px`,paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${e.palette.primary[t?`dark`:`light`]}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},"&$focused:after":{transform:`scaleX(1)`},"&$error:after":{borderBottomColor:e.palette.error.main,transform:`scaleX(1)`},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${e.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:`dotted`}},error:{"&:after":{backgroundColor:e.palette.error.main,transform:`scaleX(1)`}},chip:{margin:`0 8px 8px 0`,float:`left`}}},ac={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},oc=({value:e,isFocused:t,isDisabled:n,isReadOnly:r,handleClick:i,handleDelete:a,style:o},s)=>_.createElement(Bt,{key:s,style:{...o,pointerEvents:n||r?`none`:void 0,backgroundColor:t?oe[300]:void 0},onClick:i,onDelete:a,label:e}),sc=class extends _.Component{constructor(e){super(e),K(this,`labelRef`,void 0),K(this,`labelNode`,null),K(this,`input`,void 0),K(this,`newChipKeyCodes`,void 0),K(this,`newChipKeys`,void 0),K(this,`actualInput`,null),K(this,`inputBlurTimeout`,null),K(this,`_keyPressed`,!1),K(this,`_preventChipCreation`,!1),K(this,`styles`,{}),K(this,`styleTheme`,null),K(this,`focus`,()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})}),K(this,`handleInputBlur`,e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});let t=e.target.value,n;switch(this.props.blurBehavior||`clear`){case`add-or-clear`:n={clearInputOnFail:!0};case`add`:if(this.props.delayBeforeAdd){let e=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{let r=(this.props.value||this.state.chips).length;e===r?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case`clear`:this.clearInput()}}),K(this,`handleInputFocus`,e=>{var t,n;this.setState({isFocused:!0}),(t=(n=this.props).onFocus)==null||t.call(n,e)}),K(this,`handleKeyDown`,e=>{let{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;let n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case ac.BACKSPACE:e.target.value===``&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case ac.DELETE:e.target.value===``&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case ac.LEFT_ARROW:t===null&&e.target.value===``&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case ac.RIGHT_ARROW:t!==null&&t<n.length-1?this.setState({focusedChip:t+1}):this.setState({focusedChip:null});break;default:this.setState({focusedChip:null})}}),K(this,`handleKeyUp`,e=>{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)}),K(this,`handleUpdateInput`,e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)}),K(this,`setActualInputRef`,e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)}),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:``,isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||`standard`},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||[`Enter`],this.labelRef=_.createRef(),this.input=_.createRef()}componentDidMount(){this.state.variant===`outlined`&&(this.labelNode=this.labelRef.current,this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue=``)),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:``}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();let n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{let e=this.state.chips.slice();if(e.splice(t,1)){let n=this.state.focusedChip;this.state.focusedChip===t?n=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(n=this.state.focusedChip-1),this.updateChips(e,{focusedChip:n})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput(``)}updateInput(e){this.setState({inputValue:e})}render(){let{alwaysShowPlaceholder:e,chipRenderer:t=oc,className:n,disabled:r,disableUnderline:i,error:a,FormHelperTextProps:o,fullWidth:s,fullWidthInput:c,helperText:l,id:u,InputProps:d={},InputLabelProps:f={},inputValue:p,label:m,placeholder:h,readOnly:g,required:v,rootRef:y,value:b,margin:x}=this.props,S=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=Zt.getStyle(this.props.theme,ic));let C=b||this.state.chips||[];Array.isArray(C)||(C=(C||``).toString().split(/[,\s]+/).map(e=>e.trim()));let w=p??this.state.inputValue,T=(this.props.value||w).length||w.length,E=typeof f.shrink==`boolean`?f.shrink:m!==null&&(T||this.state.isFocused||C.length),D=C.map((e,n)=>t({value:e,isDisabled:!!r,isReadOnly:!!g,isFocused:this.state.focusedChip===n,handleClick:()=>this.setState({focusedChip:n}),handleDelete:()=>this.handleDeleteChip(e,n),style:this.styles.chip},n.toString())),O={};S===`outlined`&&(O.notched=!!E,O.labelWidth=E&&this.labelNode&&this.labelNode.offsetWidth||0),S===`standard`?d.disableUnderline=!0:O.startAdornment=D;let k=rc[S];return _.createElement(Wt,{ref:y,fullWidth:s,className:n,error:a,required:C.length>0?void 0:v,onClick:this.focus,disabled:r,variant:S,component:`div`,margin:x},m&&_.createElement(rr,{htmlFor:u,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!E,focused:this.state.isFocused,variant:S,ref:this.labelRef,required:v,component:`label`,...f},m),_.createElement(vt,{component:`div`,id:`input-chip-container`,sx:{...this.styles[S],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&S===`standard`?this.styles.underline:void 0,...r?this.styles.disabled:void 0,...m?this.styles.labeled:void 0,...a?this.styles.error:void 0}},S===`standard`&&D,_.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[S]} ${m?`mui-chip-with-label`:`mui-chip-no-label`}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[S]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:u,value:w,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:r,fullWidth:c,placeholder:!T&&(E||m==null)||e?h:void 0,readOnly:g,...d,...O})),l&&_.createElement(_n,{...o,className:o==null?void 0:o.className,style:this.styles.helperText},l))}};g();var cc=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t);if(this.props.schema.delimiter&&typeof n==`string`){let e=n.split(this.props.schema.delimiter).map(e=>e.trim()).filter(e=>e);this.setState({value:e})}else this.setState({value:n||[]})}renderItem(e,t){let{attr:n,schema:r}=this.props,{value:i}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(sc,{value:i,disabled:!!t,label:this.getText(r.label),error:!!e,onAdd:e=>{let t=JSON.parse(JSON.stringify(i));t.push(e),this.setState({value:t},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,t.join(`${this.props.schema.delimiter} `)):this.onChange(n,t),e instanceof Promise&&e.catch(e=>console.error(e))}})},theme:this.props.oContext.theme,onDelete:(e,t)=>{let r=JSON.parse(JSON.stringify(i));r.splice(t,1),this.setState({value:r},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,r.join(`${this.props.schema.delimiter} `)):this.onChange(n,r),e instanceof Promise&&e.catch(e=>console.error(e))}})}}),_.createElement(_n,null,J.t(`jc_Press ENTER Key to add new item`)),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var lc=class extends X{renderColorDialog(){return this.state.showColorDialog?_.createElement(nn,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},_.createElement(kt,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.props.attr&&this.onChange(this.props.attr,this.state.colorDialogValue))})):null}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Zt.isUseBright(n);return _.createElement(_.Fragment,null,this.renderColorDialog(),_.createElement(ot,{variant:`standard`,disabled:!!t,style:{minWidth:100,width:`calc(100% - 8px)`},label:this.getText(this.props.schema.label),value:n||``,onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||``}),onChange:e=>{let t=e.target.value,n=this.props.attr&&this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(e=>console.error(`Cannot set value: ${e}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:r?`#FFF`:`#000`},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:e=>{e.stopPropagation();let t=this.props.attr&&this.onChange(this.props.attr,``);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},_.createElement(De,null)):void 0},inputLabel:{shrink:!0}}}))}};g();var uc={width:{width:`calc(100% - 85px)`},width50:{width:120,marginRight:5}},dc=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e});let t={};this.props.schema.useSystemName&&(t.useSystem=!!X.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=X.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=X.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!X.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{e=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude)){if(window.alert(J.t(`jc_Used system settings`)),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{let t=e.common.latitude+(this.props.schema.divider||`,`)+e.common.longitude;this.setState({value:t},()=>{let e=this.props.attr&&this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}}else window.alert(J.t(`jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser`))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords){if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||``),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||``)});else{let t=e.coords.latitude+(this.props.schema.divider||`,`)+e.coords.longitude;this.setState({value:t},()=>{let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return _.createElement(_.Fragment,null,this.props.schema.useSystemName?_.createElement(kn,{control:_.createElement(O,{checked:!!this.state.useSystem,onChange:e=>{let t=e.target.checked;t&&this.getSystemCoordinates().catch(e=>console.error(`Cannot determine coordinates: ${e}`)),this.setState({useSystem:t},()=>this.onChange(this.props.schema.useSystemName,t))}}),label:J.t(`jc_Use system settings for position`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width50,value:this.state.longitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({longitude:t},()=>{let e=this.onChange(this.props.schema.longitudeName,(t||``).trim());e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})},label:J.t(`jc_Longitude`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width50,value:this.state.latitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({latitude:t},()=>this.onChange(this.props.schema.latitudeName,(t||``).trim()))},label:J.t(`jc_Latitude`)}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getCoordinates(),title:J.t(`jc_Take browser position`),style:{marginRight:4}},_.createElement(Dn,null)),this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getSystemCoordinates(),title:J.t(`jc_Take position from system settings`)},_.createElement(gt,null)))}};g();var fc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Custom component "${this.props.name}" from "${this.props.url||`unknown URL`}" crashed while rendering. It was probably built for an older admin version.`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&(e.name!==this.props.name||e.url!==this.props.url)&&this.setState({error:null})}render(){return this.state.error?_.createElement(qn,{type:`error`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Cannot display the custom component "%s"`,this.props.name)),_.createElement(`div`,null,J.t(`jc_It was probably built for an older admin version. Please update the adapter.`)),_.createElement(`div`,{style:{marginTop:8,fontStyle:`italic`,wordBreak:`break-word`}},this.state.error.message||String(this.state.error)))):_.createElement(_.Fragment,null,this.props.children)}},pc=`@iobroker/gui-components`,mc=`@iobroker/adapter-react-v5`,hc=5e3,gc=new Map;async function _c(e){let t=e.lastIndexOf(`/`),n=`${t===-1?e:e.substring(0,t)}/mf-manifest.json`,r=gc.get(n);return r||(r=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),hc);try{let t=await fetch(n,{signal:e.signal});return t.ok?await t.json():null}catch{return null}finally{clearTimeout(t)}})(),gc.set(n,r)),r}function vc(e){let t=e==null?void 0:e.shared;return Array.isArray(t)?t.some(e=>(e==null?void 0:e.name)===mc)?mc:t.some(e=>(e==null?void 0:e.name)===pc)?pc:null:null}async function yc(e,t){let n=vc(await _c(e));return n===mc?{compatible:!1,declared:1,tooNew:!1}:typeof t==`number`&&Number.isFinite(t)?{compatible:t===2,declared:t,tooNew:t>2}:n===pc?{compatible:!0,declared:2,tooNew:!1}:{compatible:!1,declared:1,tooNew:!1}}g(),vs({name:`iobroker_admin`,shared:{},remotes:[]});var bc=class e extends X{constructor(e){super(e),Object.assign(this.state,{Component:null,error:``,incompatible:null})}async componentDidMount(){if(!this.props.schema.url){console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`URL is empty. Cannot load custom component!`});return}let t;t=this.props.schema.url.startsWith(`http:`)||this.props.schema.url.startsWith(`https:`)?this.props.schema.url:this.props.schema.url.startsWith(`./`)?`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,``)}`:`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;let[n,r,...i]=this.props.schema.name.split(`/`),a=i.join(`/`);if(!t){console.error(`Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema`);return}if(!n||!r||!a){console.error(`Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema`);return}let o=await yc(t,this.props.schema.guiApi);if(!o.compatible){console.warn(`Custom component "${this.props.schema.name}" from "${t}" was not started: it targets GUI API generation ${o.declared}, but this admin provides generation 2.`),this.setState({incompatible:o});return}let s=e.runningLoads[`${t}!${r}`];if(!(s instanceof Promise)){let i;if(this.props.schema.i18n===!0){let e=t.lastIndexOf(`/`),n;n=e===-1?t:t.substring(0,e);let r=J.getLanguage(),a=`${n}/i18n/${r}.json`;i=fetch(a).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>{if(r!==`en`){fetch(`${n}/i18n/en.json`).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>console.log(`Cannot load i18n "${a}": ${e}`));return}console.log(`Cannot load i18n "${a}": ${e}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n==`object`)try{J.extendTranslations(this.props.schema.i18n)}catch(e){console.error(`Cannot import i18n: ${e}`)}try{console.log(t,n,r,a),bs([{name:n,entry:t,type:`module`}]),s=ys(`${n}/${r}`),i instanceof Promise&&(s=Promise.all([s,i]).then(e=>e[0])),e.runningLoads[`${t}!${r}`]=s}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}try{var c;let e=(c=await s)==null?void 0:c.default;if(e!=null&&e[a])this.setState({Component:e[a]});else{let t=Object.keys(e||{});console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${t.join(`, `)}`})}}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}renderIncompatible(e){return _.createElement(qn,{type:`warning`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Custom component "%s" was not started`,this.props.schema.name)),_.createElement(`div`,null,e.tooNew?J.t(`jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,e.declared,2):J.t(`jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,e.declared,2))))}render(){let e=this.state.Component,t=this.props.schema||{},n=e?_.createElement(fc,{name:t.name,url:t.url},_.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate})):this.state.incompatible?this.renderIncompatible(this.state.incompatible):this.state.error?_.createElement(`div`,null,this.state.error):_.createElement(Ze,null);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),n):n}};K(bc,`runningLoads`,{});function xc(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}function Z(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sc=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),Cc={previousMonth:`Previous month`,nextMonth:`Next month`,openPreviousView:`Open previous view`,openNextView:`Open next view`,calendarViewSwitchingButtonAriaLabel:e=>e===`year`?`year view is open, switch to calendar view`:`calendar view is open, switch to year view`,start:`Start`,end:`End`,startDate:`Start date`,startTime:`Start time`,endDate:`End date`,endTime:`End time`,cancelButtonLabel:`Cancel`,clearButtonLabel:`Clear`,okButtonLabel:`OK`,todayButtonLabel:`Today`,nextStepButtonLabel:`Next`,datePickerToolbarTitle:`Select date`,dateTimePickerToolbarTitle:`Select date & time`,timePickerToolbarTitle:`Select time`,dateRangePickerToolbarTitle:`Select date range`,timeRangePickerToolbarTitle:`Select time range`,clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:`No time selected`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:`Week number`,calendarWeekNumberHeaderText:`#`,calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:`Choose date`,openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:`Choose time`,openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:`Choose range`,fieldClearLabel:`Clear`,timeTableLabel:`pick time`,dateTableLabel:`pick date`,fieldYearPlaceholder:e=>`Y`.repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType===`letter`?`MMMM`:`MM`,fieldDayPlaceholder:()=>`DD`,fieldWeekDayPlaceholder:e=>e.contentType===`letter`?`EEEE`:`EE`,fieldHoursPlaceholder:()=>`hh`,fieldMinutesPlaceholder:()=>`mm`,fieldSecondsPlaceholder:()=>`ss`,fieldMeridiemPlaceholder:()=>`aa`,year:`Year`,month:`Month`,day:`Day`,weekDay:`Week day`,hours:`Hours`,minutes:`Minutes`,seconds:`Seconds`,meridiem:`Meridiem`,empty:`Empty`},wc=Cc;Sc(Cc),g();var Tc=[`localeText`],Ec=v(null),Dc=function(e){let{localeText:t}=e,n=Z(e,Tc),{adapter:r,localeText:i}=b(Ec)??{adapter:void 0,localeText:void 0},{children:a,dateAdapter:o,dateFormats:s,dateLibInstance:c,adapterLocale:l,localeText:u}=cr({props:n,name:`MuiLocalizationProvider`}),d=p(()=>x({},u,i,t),[u,i,t]),f=p(()=>{if(!o)return r||null;let e=new o({locale:l,formats:s,instance:c});if(!e.isMUIAdapter)throw Error(xc(143));return e},[o,l,s,c,r]),m=p(()=>f?{minDate:f.date(`1900-01-01T00:00:00.000`),maxDate:f.date(`2099-12-31T00:00:00.000`)}:null,[f]),h=p(()=>({adapter:f,defaultDates:m,localeText:d}),[m,f,d]);return G(Ec.Provider,{value:h,children:a})};g();var Oc=()=>{let e=b(Ec);if(e===null)throw Error(xc(149));if(e.adapter===null)throw Error(xc(150));let t=p(()=>x({},wc,e.localeText),[e.localeText]);return p(()=>x({},e,{localeText:t}),[e,t])},kc=()=>Oc().adapter,Ac=()=>Oc().localeText,jc=[`disablePast`,`disableFuture`,`minDate`,`maxDate`,`shouldDisableDate`,`shouldDisableMonth`,`shouldDisableYear`],Mc=[`disablePast`,`disableFuture`,`minTime`,`maxTime`,`shouldDisableTime`,`minutesStep`,`ampm`,`disableIgnoringDatePartForTimeValidation`],Nc=[`minDateTime`,`maxDateTime`],Pc=[...jc,...Mc,...Nc],Fc=e=>Pc.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});g();var Ic=[`value`,`defaultValue`,`referenceDate`,`format`,`formatDensity`,`onChange`,`timezone`,`onError`,`shouldRespectLeadingZeros`,`selectedSections`,`onSelectedSectionsChange`,`fieldRef`,`startFieldRef`,`endFieldRef`,`disabled`,`readOnly`,`dateSeparator`,`autoFocus`,`focused`],Lc=(e,t)=>p(()=>{let n=x({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Ic.forEach(i),t===`date`?jc.forEach(i):t===`time`?Mc.forEach(i):t===`date-time`&&(jc.forEach(i),Mc.forEach(i),Nc.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),Rc=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),zc=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i=n??r,a;if(e!=null)a=e;else if(i.includes(t))a=t;else if(i.length>0)a=i[0];else throw Error(xc(153));return{views:i,openTo:a}},Bc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Vc=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:a,adapter:o,timezone:s})=>{let c=Bc(o,o.date(void 0,s),e);n&&o.isBefore(i,c)&&(i=c),t&&o.isAfter(r,c)&&(r=c);let l=e,u=e;for(o.isBefore(e,i)&&(l=i,u=null),o.isAfter(e,r)&&(u&&=r,l=null);l||u;){if(l&&o.isAfter(l,r)&&(l=null),u&&o.isBefore(u,i)&&(u=null),l){if(!a(l))return l;l=o.addDays(l,1)}if(u){if(!a(u))return u;u=o.addDays(u,-1)}}return null},Hc=(e,t)=>e.isValid(t)?t:null,Uc=(e,t,n)=>t==null||!e.isValid(t)?n:t,Wc=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null||e.isEqual(t,n),Gc=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},Kc=(e,t,n)=>n===`date`?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),qc=(e,t)=>{let n=e.setHours(e.date(),t===`am`?2:14);return e.format(n,`meridiem`)},Jc=[`year`,`month`,`day`],Yc=e=>Jc.includes(e),Xc=(e,{format:t,views:n},r)=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`year`])?i.year:Rc(n,[`month`])?i.month:Rc(n,[`day`])?i.dayOfMonth:Rc(n,[`month`,`year`])?`${i.month} ${i.year}`:Rc(n,[`day`,`month`])?`${i.month} ${i.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},Zc=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},Qc=[`hours`,`minutes`,`seconds`],$c=[`hours`,`minutes`,`seconds`,`meridiem`],el=e=>Qc.includes(e),tl=e=>$c.includes(e),nl=(e,t)=>e?t.getHours(e)>=12?`pm`:`am`:null,rl=(e,t,n)=>n&&(e>=12?`pm`:`am`)!==t?t===`am`?e-12:e+12:e,il=(e,t,n,r)=>{let i=rl(r.getHours(e),t,n);return r.setHours(e,i)},al=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),ol=(e,t)=>(n,r)=>e?t.isAfter(n,r):al(n,t)>al(r,t),sl=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`hours`])?r?`${i.hours12h} ${i.meridiem}`:i.hours24h:Rc(n,[`minutes`])?i.minutes:Rc(n,[`seconds`])?i.seconds:Rc(n,[`minutes`,`seconds`])?`${i.minutes}:${i.seconds}`:Rc(n,[`hours`,`minutes`,`seconds`])?r?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:r?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`},cl=(e,t)=>{let n=e.formatTokenMap[t];if(n==null)throw Error(xc(157,t));return typeof n==`string`?{type:n,contentType:n===`meridiem`?`letter`:`digit`,maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},ll=(e,t)=>{let n=[],r=e.date(void 0,`default`),i=e.startOfWeek(r),a=e.endOfWeek(r),o=i;for(;e.isBefore(o,a);)n.push(o),o=e.addDays(o,1);return n.map(n=>e.formatByString(n,t))},ul=(e,t,n,r)=>{switch(n){case`month`:return Gc(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case`weekDay`:return ll(e,r);case`meridiem`:{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},dl=`s`,fl=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],pl=e=>{let t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),dl)===`0`?fl:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),dl))},ml=(e,t)=>{if(t[0]===`0`)return e;let n=[],r=``;for(let i=0;i<e.length;i+=1){r+=e[i];let a=t.indexOf(r);a>-1&&(n.push(a.toString()),r=``)}return n.join(``)},hl=(e,t)=>t[0]===`0`?e:e.split(``).map(e=>t[Number(e)]).join(``),gl=(e,t)=>{let n=ml(e,t);return n!==` `&&!Number.isNaN(Number(n))},_l=(e,t)=>Number(e).toString().padStart(t,`0`),vl=(e,t,n,r,i)=>{if(i.type===`day`&&i.contentType===`digit-with-letter`){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let a=t.toString();return i.hasLeadingZerosInInput&&(a=_l(a,i.maxLength)),hl(a,r)},yl=(e,t,n)=>{let r=e.value||e.placeholder,i=t===`non-input`?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t===`non-input`&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(ml(r,n)).toString()),[`input-rtl`,`input-ltr`].includes(t)&&e.contentType===`digit`&&!i&&r.length===1&&(r=`${r}\u200e`),t===`input-rtl`&&(r=`\u2068${r}\u2069`),r},bl=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),xl=(e,t)=>e.formatByString(e.date(void 0,`system`),t).length===4,Sl=(e,t,n,r)=>{if(t!==`digit`)return!1;let i=e.date(void 0,`default`);switch(n){case`year`:return e.lib===`dayjs`&&r===`YY`||e.formatByString(e.setYear(i,1),r).startsWith(`0`);case`month`:return e.formatByString(e.startOfYear(i),r).length>1;case`day`:return e.formatByString(e.startOfMonth(i),r).length>1;case`weekDay`:return e.formatByString(e.startOfWeek(i),r).length>1;case`hours`:return e.formatByString(e.setHours(i,1),r).length>1;case`minutes`:return e.formatByString(e.setMinutes(i,1),r).length>1;case`seconds`:return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error(xc(158))}},Cl=(e,t,n)=>{let r=t.some(e=>e.type===`day`),i=[],a=[];for(let e=0;e<t.length;e+=1){let o=t[e];r&&o.type===`weekDay`||(i.push(o.format),a.push(yl(o,`non-input`,n)))}let o=i.join(` `),s=a.join(` `);return e.parse(s,o)},wl=e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),Tl=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:o,longestMonth:s}=Gc(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:xl(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):o,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if(n===`digit`){let n=ll(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(a),o=Number(ml(e.formatByString(e.startOfDay(r),n),t)),s=Number(ml(e.formatByString(e.endOfDay(r),n),t));return s===i?o>i?{minimum:1,maximum:o}:{minimum:0,maximum:i}:o===0?{minimum:0,maximum:s}:{minimum:1,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},El=(e,t,n,r)=>{switch(t.type){case`year`:return e.setYear(r,e.getYear(n));case`month`:return e.setMonth(r,e.getMonth(n));case`weekDay`:{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=_l(r,t.maxLength));let i=ll(e,t.format),a=i.indexOf(r),o=i.indexOf(t.value)-a;return e.addDays(n,o)}case`day`:return e.setDate(r,e.getDate(n));case`meridiem`:return il(r,e.getHours(n)<12?`am`:`pm`,!0,e);case`hours`:return e.setHours(r,e.getHours(n));case`minutes`:return e.setMinutes(r,e.getMinutes(n));case`seconds`:return e.setSeconds(r,e.getSeconds(n));default:return r}},Dl={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Ol=(e,t,n,r,i)=>[...n].sort((e,t)=>Dl[e.type]-Dl[t.type]).reduce((n,r)=>!i||r.modified?El(e,r,t,n):n,r),kl=e=>{let t={};return e.forEach((n,r)=>{let i=r===0?null:r-1,a=r===e.length-1?null:r+1;t[r]={leftIndex:i,rightIndex:a}}),{neighbors:t,startIndex:0,endIndex:e.length-1}},Al=(e,t)=>{if(e==null)return null;if(e===`all`)return`all`;if(typeof e==`string`){let n=t.findIndex(t=>t.type===e);return n===-1?null:n}return e},jl=({adapter:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),--n,n<0)throw Error(xc(154));return i},Ml=({adapter:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,a=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,`g`),o=null;for(;o=a.exec(t);)n.push({start:o.index,end:a.lastIndex-1});return n},Nl=(e,t,n,r)=>{switch(n.type){case`year`:return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,`default`),r).length,format:r});case`month`:return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case`day`:return t.fieldDayPlaceholder({format:r});case`weekDay`:return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case`hours`:return t.fieldHoursPlaceholder({format:r});case`minutes`:return t.fieldMinutesPlaceholder({format:r});case`seconds`:return t.fieldSecondsPlaceholder({format:r});case`meridiem`:return t.fieldMeridiemPlaceholder({format:r});default:return r}},Pl=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o===``)throw Error(xc(155));let c=cl(e,o),l=Sl(e,c.contentType,c.type,o),u=n?l:c.contentType===`digit`,d=e.isValid(t),f=d?e.formatByString(t,o):``,p=null;if(u){if(l)p=f===``?e.formatByString(a,o).length:f.length;else{if(c.maxLength==null)throw Error(xc(156,o));p=c.maxLength,d&&(f=hl(_l(ml(f,i),p),i))}}return x({},c,{format:o,maxLength:p,value:f,placeholder:Nl(e,r,c,o),hasLeadingZerosInFormat:l,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:``,modified:!1})},Fl=e=>{let{adapter:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),a=[],o=``,s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),c=/^([a-zA-Z]+)/,l=RegExp(`^(${s.join(`|`)})*$`),u=RegExp(`^(${s.join(`|`)})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),f=0;for(;f<n.length;){var p;let t=d(f),r=t!=null,s=(p=c.exec(n.slice(f)))==null?void 0:p[1];if(!r&&s!=null&&l.test(s)){let t=s;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),a.push(Pl(x({},e,{now:i,token:n,startSeparator:o}))),o=``}f+=s.length}else{let e=n[f];r&&(t==null?void 0:t.start)===f||(t==null?void 0:t.end)===f||(a.length===0?o+=e:(a[a.length-1].endSeparator+=e,a[a.length-1].isEndFormatSeparator=!0)),f+=1}}return a.length===0&&o.length>0&&a.push({type:`empty`,contentType:`letter`,maxLength:null,format:``,value:``,placeholder:``,hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:``,modified:!1}),a},Il=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&r!==null&&r.includes(` `)&&(r=`\u2069${r}\u2066`),t===`spacious`&&[`/`,`.`,`-`].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),Ll=e=>{let t=jl(e);e.isRtl&&(t=t.split(` `).reverse().join(` `));let n=Ml(x({},e,{expandedFormat:t})),r=Fl(x({},e,{expandedFormat:t,escapedParts:n}));return Il(x({},e,{sections:r}))};g();var Rl=v(null),zl=()=>{let e=b(Rl);if(e==null)throw Error(xc(151));return e};g();var Bl=()=>b(Rl);g();var Vl=(e={})=>{let t=Bl(),n=kc(),r=Ac(),i=p(()=>pl(n),[n]),{format:a=(t==null?void 0:t.fieldFormat)??n.formats.fullDate}=e;return p(()=>Ll({adapter:n,format:a,formatDensity:`dense`,isRtl:!1,shouldRespectLeadingZeros:!0,localeText:r,localizedDigits:i,date:null}).map(e=>`${e.startSeparator}${e.placeholder}${e.endSeparator}`).join(``),[n,r,i,a])};g();var Hl=v(()=>!0);function Ul(){return b(Hl)}g();var Wl=v(null);function Gl(){return b(Wl)}g();var Kl=v(null),ql=v({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:`desktop`,pickerOrientation:`portrait`},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>`UI`,triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function Jl(e){let{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:i,isValidContextValue:a,localeText:o,children:s}=e;return G(Rl.Provider,{value:t,children:G(Kl.Provider,{value:n,children:G(ql.Provider,{value:r,children:G(Wl.Provider,{value:i,children:G(Hl.Provider,{value:a,children:G(Dc,{localeText:o,children:s})})})})})})}g();var Yl=()=>{let e=b(Kl);if(e==null)throw Error(xc(148));return e};g();var Xl=()=>Oc().defaultDates,Zl=e=>{let t=kc(),n=l(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};g();var Ql=Yt(G(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),$l=Yt(G(`path`,{d:`M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z`}),`ArrowLeft`),eu=Yt(G(`path`,{d:`M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`ArrowRight`),tu=Yt(G(`path`,{d:`M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z`}),`Calendar`),nu=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Clock`),ru=Yt(G(`path`,{d:`M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-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-2zm0 16H5V9h14v11z`}),`DateRange`),iu=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Time`),au=Yt(G(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`);function ou(e){return Ne(`MuiPickersArrowSwitcher`,e)}ke(`MuiPickersArrowSwitcher`,[`root`,`spacer`,`button`,`previousIconButton`,`nextIconButton`,`leftArrowIcon`,`rightArrowIcon`]),g();var su=()=>b(ql);g();var cu=[`children`,`className`,`slots`,`slotProps`,`isNextDisabled`,`isNextHidden`,`onGoToNext`,`nextLabel`,`isPreviousDisabled`,`isPreviousHidden`,`onGoToPrevious`,`previousLabel`,`labelId`,`classes`],lu=[`ownerState`],uu=[`ownerState`],du=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Root`})({display:`flex`}),fu=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Spacer`})(({theme:e})=>({width:e.spacing(3)})),pu=q(mn,{name:`MuiPickersArrowSwitcher`,slot:`Button`})({variants:[{props:{isButtonHidden:!0},style:{visibility:`hidden`}}]}),mu=e=>B({root:[`root`],spacer:[`spacer`],button:[`button`],previousIconButton:[`previousIconButton`],nextIconButton:[`nextIconButton`],leftArrowIcon:[`leftArrowIcon`],rightArrowIcon:[`rightArrowIcon`]},ou,e),hu=o(function(e,t){let n=dn(),r=cr({props:e,name:`MuiPickersArrowSwitcher`}),{children:i,className:a,slots:o,slotProps:s,isNextDisabled:c,isNextHidden:l,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g,classes:_}=r,v=Z(r,cu),{ownerState:y}=su(),b=mu(_),S={isDisabled:c,isHidden:l,goTo:u,label:d},C={isDisabled:f,isHidden:p,goTo:m,label:h},w=(o==null?void 0:o.previousIconButton)??pu,T=Vn({elementType:w,externalSlotProps:s==null?void 0:s.previousIconButton,additionalProps:{size:`medium`,title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:`end`,onClick:C.goTo},ownerState:x({},y,{isButtonHidden:C.isHidden??!1}),className:Ve(b.button,b.previousIconButton)}),E=(o==null?void 0:o.nextIconButton)??pu,D=Vn({elementType:E,externalSlotProps:s==null?void 0:s.nextIconButton,additionalProps:{size:`medium`,title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:`start`,onClick:S.goTo},ownerState:x({},y,{isButtonHidden:S.isHidden??!1}),className:Ve(b.button,b.nextIconButton)}),O=(o==null?void 0:o.leftArrowIcon)??$l,k=Z(Vn({elementType:O,externalSlotProps:s==null?void 0:s.leftArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.leftArrowIcon}),lu),A=(o==null?void 0:o.rightArrowIcon)??eu,j=Z(Vn({elementType:A,externalSlotProps:s==null?void 0:s.rightArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.rightArrowIcon}),uu);return Je(du,x({ref:t,className:Ve(b.root,a),ownerState:y},v,{children:[G(w,x({},T,{children:n?G(A,x({},j)):G(O,x({},k))})),i?G(Pt,{variant:`subtitle1`,component:`span`,id:g,children:i}):G(fu,{className:b.spacer,ownerState:y}),G(E,x({},D,{children:n?G(O,x({},k)):G(A,x({},j))}))]}))}),gu={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function _u(e){let{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(t==null)return gu;let i=t.findIndex(t=>n(e.view,t)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(x({},e,{step:a}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}g();function vu({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){let d=l(n),f=l(i),p=l(i.includes(n)?n:i[0]),[m,h]=$t({name:`useViews`,state:`view`,controlled:r,default:p.current}),g=l(o?m:null),[_,v]=$t({name:`useViews`,state:`focusedView`,controlled:s,default:g.current}),y=u?u({setView:h,view:m,defaultView:p.current,views:i}):gu;a(()=>{(d.current&&d.current!==n||f.current&&f.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),f.current=i,d.current=n)},[n,h,m,i]);let b=i.indexOf(m),S=i[b-1]??null,C=i[b+1]??null,w=Y((e,t)=>{v(t?e:t=>e===t?null:t),c==null||c(e,t)}),T=Y(e=>{w(e,!0),e!==m&&(h(e),t&&t(e))}),E=Y(()=>{C&&T(C)}),D=Y((t,n,r)=>{let a=n===`finish`,o=r?i.indexOf(r)<i.length-1:!!C;e(t,a&&o?`partial`:n,r);let s=null;if(r!=null&&r!==m?s=r:a&&(s=m),s==null)return;let c=i[i.indexOf(s)+1];c==null||!y.areViewsInSameStep(s,c)||T(c)});return x({},y,{view:m,setView:T,focusedView:_,setFocusedView:w,nextView:C,previousView:S,defaultView:i.includes(n)?n:i[0],goToNextView:E,setValueAndGoToNextView:D})}g();function yu(e,{disableFuture:t,maxDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isBefore(a,n)?a:n);return!i.isAfter(o,e)},[t,n,e,i,r])}function bu(e,{disablePast:t,minDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isAfter(a,n)?a:n);return!i.isBefore(o,i.startOfMonth(e))},[t,n,e,i,r])}function xu(e,t,n,r){let i=kc(),a=p(()=>i.isValid(e)?e:null,[i,e]);return{meridiemMode:nl(a,i),handleMeridiemChange:f(e=>{n(a==null?null:il(a,e,!!t,i),r??`partial`)},[t,a,n,r,i])}}var Su=q(`div`,{slot:`internal`,shouldForwardProp:void 0})({overflow:`hidden`,width:320,maxHeight:336,display:`flex`,flexDirection:`column`,margin:`0 auto`});function Cu(e){return Ne(`MuiTimeClock`,e)}var wu=ke(`MuiTimeClock`,[`root`,`arrowSwitcher`]),Tu={x:110,y:110},Eu={x:Tu.x,y:0},Du=Eu.x-Tu.x,Ou=Eu.y-Tu.y,ku=e=>180/Math.PI*e,Au=(e,t,n)=>{let r=t-Tu.x,i=n-Tu.y,a=ku(Math.atan2(Du,Ou)-Math.atan2(r,i));a=Math.round(a/e)*e,a%=360;let o=Math.floor(a/e)||0,s=r**2+i**2;return{value:o,distance:Math.sqrt(s)}},ju=(e,t,n=1)=>{let{value:r}=Au(n*6,e,t);return r=r*n%60,r},Mu=(e,t,n)=>{let{value:r,distance:i}=Au(30,e,t),a=r||12;return n?a%=12:i<74&&(a+=12,a%=24),a};function Nu(e){return Ne(`MuiClockPointer`,e)}var Pu=ke(`MuiClockPointer`,[`root`,`thumb`]);g();var Fu=[`className`,`classes`,`isBetweenTwoClockValues`,`isInner`,`type`,`viewValue`],Iu=e=>B({root:[`root`],thumb:[`thumb`]},Nu,e),Lu=q(`div`,{name:`MuiClockPointer`,slot:`Root`})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,left:`calc(50% - 1px)`,bottom:`50%`,transformOrigin:`center bottom 0px`,variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create([`transform`,`height`])}}]})),Ru=q(`div`,{name:`MuiClockPointer`,slot:`Thumb`})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:`50%`,position:`absolute`,top:-21,left:`calc(50% - 18px)`,border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:`content-box`,variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function zu(e){let t=cr({props:e,name:`MuiClockPointer`}),{className:n,classes:r,isBetweenTwoClockValues:i,isInner:o,type:s,viewValue:c}=t,u=Z(t,Fu),d=l(s);a(()=>{d.current=s},[s]);let{ownerState:f}=su(),p=x({},f,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:i}),m=Iu(r);return G(Lu,x({style:(()=>{let e=360/(s===`hours`?12:60)*c;return s===`hours`&&c>12&&(e-=360),{height:Math.round((o?.26:.4)*220),transform:`rotateZ(${e}deg)`}})(),className:Ve(m.root,n),ownerState:p},u,{children:G(Ru,{ownerState:p,className:m.thumb})}))}function Bu(e){return Ne(`MuiClock`,e)}var Vu=ke(`MuiClock`,[`root`,`clock`,`wrapper`,`squareMask`,`pin`,`amButton`,`pmButton`,`meridiemText`,`selected`]);g();var Hu=(e,t)=>{let n={root:[`root`],clock:[`clock`],wrapper:[`wrapper`],squareMask:[`squareMask`],pin:[`pin`],amButton:[`amButton`,t.clockMeridiemMode===`am`&&`selected`],pmButton:[`pmButton`,t.clockMeridiemMode===`pm`&&`selected`],meridiemText:[`meridiemText`]};return B(n,Bu,e)},Uu=q(`div`,{name:`MuiClock`,slot:`Root`})(({theme:e})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,margin:e.spacing(2)})),Wu=q(`div`,{name:`MuiClock`,slot:`Clock`})({backgroundColor:`rgba(0,0,0,.07)`,borderRadius:`50%`,height:220,width:220,flexShrink:0,position:`relative`,pointerEvents:`none`}),Gu=q(`div`,{name:`MuiClock`,slot:`Wrapper`})({"&:focus":{outline:`none`}}),Ku=q(`div`,{name:`MuiClock`,slot:`SquareMask`})({width:`100%`,height:`100%`,position:`absolute`,pointerEvents:`auto`,outline:0,touchAction:`none`,userSelect:`none`,variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:`pointer`,borderRadius:`50%`},"&:active":{cursor:`move`}}}]}),qu=q(`div`,{name:`MuiClock`,slot:`Pin`})(({theme:e})=>({width:6,height:6,borderRadius:`50%`,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`})),Ju=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Yu=q(mn,{name:`MuiClock`,slot:`AmButton`})(({theme:e})=>x({},Ju(e,`am`),{position:`absolute`,left:8})),Xu=q(mn,{name:`MuiClock`,slot:`PmButton`})(({theme:e})=>x({},Ju(e,`pm`),{position:`absolute`,right:8})),Zu=q(Pt,{name:`MuiClock`,slot:`MeridiemText`})({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`});function Qu(e){let{ampm:t,ampmInClock:n,autoFocus:r,children:i,value:o,handleMeridiemChange:s,isTimeDisabled:c,meridiemMode:u,minutesStep:d=1,onChange:f,selectedId:p,type:m,viewValue:h,viewRange:[g,_],disabled:v=!1,readOnly:b,className:S,classes:C}=cr({props:e,name:`MuiClock`}),w=kc(),T=Ac(),{ownerState:E}=su(),D=x({},E,{isClockDisabled:v,clockMeridiemMode:u}),O=l(!1),k=l(null),A=l(null),M=l(void 0),N=Hu(C,D),ee=c(h,m),P=!t&&m===`hours`&&(h<1||h>12),F=(e,t)=>{v||b||c(e,m)||f(e,t)},I=(e,n)=>{let r=A.current;if(!r)return;let i=r.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=m===`seconds`||m===`minutes`?ju(a,o,d):Mu(a,o,!!t);F(s,n)},te=()=>{var e;O.current=!1,k.current=null,(e=M.current)==null||e.call(M)},ne=Y(e=>{e.pointerId===k.current&&(e.preventDefault(),I(e,`shallow`))}),R=Y(e=>{e.pointerId===k.current&&(te(),I(e,`finish`))}),z=Y(e=>{e.pointerId===k.current&&te()}),B=e=>{if(e.button>0||e.isPrimary===!1||v||b)return;te(),O.current=!0,k.current=e.pointerId;let t=L(A.current);t.addEventListener(`pointermove`,ne),t.addEventListener(`pointerup`,R),t.addEventListener(`pointercancel`,z),M.current=()=>{t.removeEventListener(`pointermove`,ne),t.removeEventListener(`pointerup`,R),t.removeEventListener(`pointercancel`,z),M.current=void 0},I(e.nativeEvent,`shallow`)},re=m!==`hours`&&h%5!=0,ie=m===`minutes`?d:1,ae=l(null);j(()=>{r&&ae.current.focus()},[r]),a(()=>()=>{var e;return(e=M.current)==null?void 0:e.call(M)},[]);let oe=e=>Math.max(g,Math.min(_,e)),V=e=>(e+(_+1))%(_+1);return Je(Uu,{className:Ve(N.root,S),children:[Je(Wu,{className:N.clock,children:[G(Ku,{ref:A,onPointerDown:B,ownerState:D,className:N.squareMask}),!ee&&Je(y,{children:[G(qu,{className:N.pin}),o!=null&&G(zu,{type:m,viewValue:h,isInner:P,isBetweenTwoClockValues:re})]}),G(Gu,{"aria-activedescendant":p,"aria-label":T.clockLabelText(m,o==null?null:w.format(o,t?`fullTime12h`:`fullTime24h`)),ref:ae,role:`listbox`,onKeyDown:e=>{if(!O.current)switch(e.key){case`Home`:F(g,`partial`),e.preventDefault();break;case`End`:F(_,`partial`),e.preventDefault();break;case`ArrowUp`:F(V(h+ie),`partial`),e.preventDefault();break;case`ArrowDown`:F(V(h-ie),`partial`),e.preventDefault();break;case`PageUp`:F(oe(h+5),`partial`),e.preventDefault();break;case`PageDown`:F(oe(h-5),`partial`),e.preventDefault();break;case`Enter`:case` `:F(h,`finish`),e.preventDefault()}},tabIndex:0,className:N.wrapper,children:i})]}),t&&n&&Je(y,{children:[G(Yu,{onClick:b?void 0:()=>s(`am`),disabled:v||u===null,ownerState:D,className:N.amButton,title:qc(w,`am`),children:G(Zu,{variant:`caption`,className:N.meridiemText,children:qc(w,`am`)})}),G(Xu,{disabled:v||u===null,onClick:b?void 0:()=>s(`pm`),ownerState:D,className:N.pmButton,title:qc(w,`pm`),children:G(Zu,{variant:`caption`,className:N.meridiemText,children:qc(w,`pm`)})})]})]})}function $u(e){return Ne(`MuiClockNumber`,e)}var ed=ke(`MuiClockNumber`,[`root`,`selected`,`disabled`]);g();var td=[`className`,`classes`,`disabled`,`index`,`inner`,`label`,`selected`],nd=(e,t)=>{let n={root:[`root`,t.isClockNumberSelected&&`selected`,t.isClockNumberDisabled&&`disabled`]};return B(n,$u,e)},rd=q(`span`,{name:`MuiClockNumber`,slot:`Root`,overridesResolver:(e,t)=>[t.root,{[`&.${ed.disabled}`]:t.disabled},{[`&.${ed.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:`absolute`,left:`calc((100% - 36px) / 2)`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,borderRadius:`50%`,color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${ed.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${ed.disabled}`]:{pointerEvents:`none`,color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function id(e){let t=cr({props:e,name:`MuiClockNumber`}),{className:n,classes:r,disabled:i,index:a,inner:o,label:s,selected:c}=t,l=Z(t,td),{ownerState:u}=su(),d=x({},u,{isClockNumberInInnerRing:o,isClockNumberSelected:c,isClockNumberDisabled:i}),f=nd(r,d),p=a%12/12*Math.PI*2-Math.PI/2,m=91*(o?.65:1),h=Math.round(Math.cos(p)*m),g=Math.round(Math.sin(p)*m);return G(rd,x({className:Ve(f.root,n),"aria-disabled":i?!0:void 0,"aria-selected":c?!0:void 0,role:`option`,style:{transform:`translate(${h}px, ${g+92}px`},ownerState:d},l,{children:s}))}g();var ad=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:a})=>{let o=t?a.getHours(t):null,s=[],c=+!!e,l=e?12:23,u=t=>o===null?!1:e?t===12?o===12||o===0:o===t||o-12===t:o===t;for(let t=c;t<=l;t+=1){let o=t.toString();t===0&&(o=`00`);let c=!e&&(t===0||t>12);o=a.formatNumber(o);let l=u(t);s.push(G(id,{id:l?i:void 0,index:t,inner:c,selected:l,disabled:r(t),label:o,"aria-label":n(o)},t))}return s},od=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let a=e.formatNumber;return[[5,a(`05`)],[10,a(`10`)],[15,a(`15`)],[20,a(`20`)],[25,a(`25`)],[30,a(`30`)],[35,a(`35`)],[40,a(`40`)],[45,a(`45`)],[50,a(`50`)],[55,a(`55`)],[0,a(`00`)]].map(([e,a],o)=>{let s=e===t;return G(id,{label:a,id:s?i:void 0,index:o+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)})};g();var sd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:a,valueManager:o})=>{let s=kc(),[c,l]=$t({name:e,state:`value`,controlled:n,default:r??o.emptyValue}),u=p(()=>o.getTimezone(s,c),[s,o,c]),d=Y(e=>u==null?e:o.setTimezone(s,u,e)),f=p(()=>t||u||(i?s.getTimezone(Array.isArray(i)?i[0]:i):`default`),[t,u,i,s]);return{value:p(()=>o.setTimezone(s,f,c),[o,s,f,c]),handleValueChange:Y((e,...t)=>{let n=d(e);l(n),a==null||a(n,...t)}),timezone:f}},cd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},ld=e=>Math.max(...e.map(e=>cd[e.type]??1)),ud=(e,t,n)=>{if(t===cd.year)return e.startOfYear(n);if(t===cd.month)return e.startOfMonth(n);if(t===cd.day)return e.startOfDay(n);let r=n;return t<cd.minutes&&(r=e.setMinutes(r,0)),t<cd.seconds&&(r=e.setSeconds(r,0)),t<cd.milliseconds&&(r=e.setMilliseconds(r,0)),r},dd=({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let a=i?i():ud(t,n,Kc(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=ud(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=ud(t,n,e.maxDate));let o=ol(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&o(e.minTime,a)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Bc(t,a,e.minTime))),e.maxTime!=null&&o(a,e.maxTime)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Bc(t,a,e.maxTime))),a},fd=[`value`,`referenceDate`],pd={emptyValue:null,getTodayValue:Kc,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Z(e,fd);return r.adapter.isValid(t)?t:n??dd(r)},cleanValue:Hc,areValuesEqual:Wc,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},md={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getHiddenInputValueFromSections:wl,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>x({},e,{value:``}))};g();var hd=({value:e,referenceDate:t,adapter:n,props:r,timezone:i})=>{let a=p(()=>pd.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:cd.day,timezone:i,getTodayDate:()=>Kc(n,i,`date`)}),[t,i]);return e??a};g();var gd=`ampm.ampmInClock.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.showViewSwitcher.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.timezone`.split(`.`),_d=e=>B({root:[`root`],arrowSwitcher:[`arrowSwitcher`]},Cu,e),vd=q(Su,{name:`MuiTimeClock`,slot:`Root`})({display:`flex`,flexDirection:`column`,position:`relative`}),yd=q(hu,{name:`MuiTimeClock`,slot:`ArrowSwitcher`})({position:`absolute`,right:12,top:15}),bd=[`hours`,`minutes`],xd=o(function(e,t){let n=kc(),r=cr({props:e,name:`MuiTimeClock`}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:o,slots:s,slotProps:c,value:l,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:_,disablePast:v,minutesStep:y=1,shouldDisableTime:b,showViewSwitcher:S,onChange:C,view:w,views:T=bd,openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,timezone:ee}=r,P=Z(r,gd),{value:F,handleValueChange:I,timezone:te}=sd({name:`TimeClock`,timezone:ee,value:l,defaultValue:u,referenceDate:d,onChange:C,valueManager:pd}),L=hd({value:F,referenceDate:d,adapter:n,props:r,timezone:te}),ne=Ac(),R=Zl(te),z=Le(),{ownerState:B}=su(),{view:re,setView:ie,previousView:ae,nextView:oe,setValueAndGoToNextView:V}=vu({view:w,views:T,openTo:E,onViewChange:D,onChange:I,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=xu(L,i,V),H=f((e,t)=>{let r=ol(m,n),a=t===`hours`||t===`minutes`&&T.includes(`seconds`),o=({start:e,end:t})=>!(g&&r(g,t)||h&&r(e,h)||_&&r(e,R)||v&&r(R,a?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(b)switch(t){case`hours`:return!b(n.setHours(L,e),`hours`);case`minutes`:return!b(n.setMinutes(L,e),`minutes`);case`seconds`:return!b(n.setSeconds(L,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,se,i),r=n.setHours(L,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(L,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case`seconds`:{let t=n.setSeconds(L,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[i,L,m,h,se,g,y,b,n,_,v,R,T]),U=p(()=>{switch(re){case`hours`:{let e=(e,t)=>{let r=rl(e,se,i);V(n.setHours(L,r),t,`hours`)},t=n.getHours(L),r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:ad({value:F,adapter:n,ampm:i,onChange:e,getClockNumberText:ne.hoursClockNumberText,isDisabled:e=>M||H(e,`hours`),selectedId:z}),viewRange:r}}case`minutes`:{let e=n.getMinutes(L),t=(e,t)=>{V(n.setMinutes(L,e),t,`minutes`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:ne.minutesClockNumberText,isDisabled:e=>M||H(e,`minutes`),selectedId:z}),viewRange:[0,59]}}case`seconds`:{let e=n.getSeconds(L),t=(e,t)=>{V(n.setSeconds(L,e),t,`seconds`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:ne.secondsClockNumberText,isDisabled:e=>M||H(e,`seconds`),selectedId:z}),viewRange:[0,59]}}default:throw Error(xc(147))}},[re,n,F,i,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,se,V,L,H,z,M]),le=_d(j);return Je(vd,x({ref:t,className:Ve(le.root,A),ownerState:B},P,{children:[G(Qu,x({autoFocus:o??!!O,ampmInClock:a&&T.includes(`hours`),value:F,type:re,ampm:i,minutesStep:y,isTimeDisabled:H,meridiemMode:se,handleMeridiemChange:ce,selectedId:z,disabled:M,readOnly:N},U)),S&&G(yd,{className:le.arrowSwitcher,slots:s,slotProps:c,onGoToPrevious:()=>ie(ae),isPreviousDisabled:!ae,previousLabel:ne.openPreviousView,onGoToNext:()=>ie(oe),isNextDisabled:!oe,nextLabel:ne.openNextView,ownerState:B})]}))});function Sd(e){return Ne(`MuiDigitalClock`,e)}var Cd=ke(`MuiDigitalClock`,[`root`,`list`,`item`]);function wd(e,t){return Array.isArray(t)?t.every(t=>e.indexOf(t)!==-1):e.indexOf(t)!==-1}var Td=e=>{setTimeout(e,0)},Ed=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Ed(t.shadowRoot):t:null},Dd=e=>Ed(L(e)),Od=e=>Array.from(e.children).indexOf(Dd(e)),kd=`@media (pointer: fine)`;function Ad(e){let t={};for(let n of Object.keys(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=e[n]);return t}function jd(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):t!=null&&e.push(t),e),[])}g();var Md=`ampm.timeStep.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.views.skipDisabled.timezone`.split(`.`),Nd=e=>B({root:[`root`],list:[`list`],item:[`item`]},Sd,e),Pd=q(Su,{name:`MuiDigitalClock`,slot:`Root`})({overflowY:`auto`,width:`100%`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]}),Fd=q(at,{name:`MuiDigitalClock`,slot:`List`})({padding:0}),Id=q(fe,{name:`MuiDigitalClock`,slot:`Item`,shouldForwardProp:e=>e!==`itemValue`&&e!==`formattedValue`})(({theme:e})=>({padding:`8px 16px`,margin:`2px 4px`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Ld=o(function(e,t){let n=kc(),r=l(null),i=nt(t,r),a=l(null),o=l(null),s=cr({props:e,name:`MuiDigitalClock`}),{ampm:c=n.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,slots:m,slotProps:h,value:g,defaultValue:_,referenceDate:v,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:S,disableFuture:C,disablePast:w,minutesStep:T=1,shouldDisableTime:E,onChange:D,view:O,openTo:k,onViewChange:A,focusedView:M,onFocusedViewChange:N,className:ee,classes:P,disabled:F,readOnly:I,views:te=[`hours`],skipDisabled:L=!1,timezone:ne}=s,R=Z(s,Md),{value:z,handleValueChange:B,timezone:re}=sd({name:`DigitalClock`,timezone:ne,value:g,defaultValue:_,referenceDate:v,onChange:D,valueManager:pd}),ie=Ac(),ae=Zl(re),{ownerState:oe}=su(),V=x({},oe,{hasDigitalClockAlreadyBeenRendered:!!r.current}),se=Nd(P),ce=(m==null?void 0:m.digitalClockItem)??Id,H=Vn({elementType:ce,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:V,className:se.item}),U=hd({value:z,referenceDate:v,adapter:n,props:s,timezone:re}),{setValueAndGoToNextView:le}=vu({view:O,views:te,openTo:k,onViewChange:A,onChange:Y(e=>B(e,`finish`,`hours`)),focusedView:M,onFocusedViewChange:N}),ue=Y(e=>{le(e,`finish`)});j(()=>{if(r.current===null)return;let e=r.current.querySelector(`[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]`);if(!e)return;let t=e.offsetTop;(d||M)&&e!==o.current&&(o.current=e,e.focus()),r.current.scrollTop=t-4});let de=f(e=>{let t=ol(y,n);return!!(S&&t(S,e)||b&&t(e,b)||C&&t(e,ae)||w&&t(ae,e))||!(n.getMinutes(e)%T===0&&(!E||!E(e,`hours`)))},[y,n,S,b,C,ae,w,T,E]),fe=p(()=>{let e=[],t=n.startOfDay(U);for(;n.isSameDay(U,t);)e.push(t),t=n.addMinutes(t,u);return e},[U,u,n]),pe=fe.findIndex(e=>n.isEqual(e,U));return G(Pd,x({ref:i,className:Ve(se.root,ee),ownerState:V},R,{children:G(Fd,{ref:a,role:`listbox`,"aria-label":ie.timePickerToolbarTitle,className:se.list,onKeyDown:e=>{switch(e.key){case`PageUp`:{let t=Od(a.current)-5,n=a.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(a.current)+5,n=a.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:fe.map((e,t)=>{let r=de(e);if(L&&r)return null;let i=n.isEqual(e,z),a=n.format(e,c?`fullTime12h`:`fullTime24h`);return G(ce,x({onClick:()=>!I&&ue(e),selected:i,disabled:F||r,disableRipple:I,role:`option`,"aria-disabled":I,"aria-selected":i,tabIndex:pe===t||pe===-1&&t===0?0:-1,itemValue:e,formattedValue:a},H,{children:a}),`${e.valueOf()}-${a}`)})})}))});function Rd(e){return Ne(`MuiMultiSectionDigitalClock`,e)}var zd=ke(`MuiMultiSectionDigitalClock`,[`root`]);function Bd(e){return Ne(`MuiMultiSectionDigitalClockSection`,e)}var Vd=ke(`MuiMultiSectionDigitalClockSection`,[`root`,`item`]);g();var Hd=[`autoFocus`,`onChange`,`className`,`classes`,`disabled`,`readOnly`,`items`,`active`,`slots`,`slotProps`,`skipDisabled`],Ud=e=>B({root:[`root`],item:[`item`]},Bd,e),Wd=q(at,{name:`MuiMultiSectionDigitalClockSection`,slot:`Root`})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:`hidden`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},"@media (pointer: fine)":{"&:hover":{overflowY:`auto`}},"@media (pointer: none), (pointer: coarse)":{overflowY:`auto`},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]})),Gd=q(fe,{name:`MuiMultiSectionDigitalClockSection`,slot:`Item`})(({theme:e})=>({padding:8,margin:`2px 4px`,width:48,justifyContent:`center`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Kd=o(function(e,t){let n=l(null),r=nt(t,n),i=l(null),o=l(!1),s=cr({props:e,name:`MuiMultiSectionDigitalClockSection`}),{autoFocus:c,onChange:u,className:d,classes:f,disabled:p,readOnly:m,items:h,active:g,slots:_,slotProps:v,skipDisabled:y}=s,b=Z(s,Hd),{ownerState:S}=su(),C=x({},S,{hasDigitalClockAlreadyBeenRendered:!!n.current}),w=Ud(f),T=(_==null?void 0:_.digitalClockSectionItem)??Gd;j(()=>{if(n.current===null)return;let e=n.current.querySelector(`[role="option"][tabindex="0"], [role="option"][aria-selected="true"]`);if(!e)return;let t=document.activeElement,r=i.current===e,a=!!t&&n.current.contains(t),s=r&&o.current;if(g&&c&&(!r||s)&&(i.current==null||o.current||a)&&(i.current=e,o.current=!1,e.focus()),r)return;let l=e.offsetTop,u=e.offsetHeight,d=n.current.clientHeight,f=n.current.scrollHeight,p=l-d/2+u/2,m=f-d,h=Math.min(p,m);n.current.scrollTop=Math.max(0,h)});let E=Y(e=>{let t=e.relatedTarget,r=t==null?void 0:t.parentElement,a=t==null?void 0:t.getAttribute(`role`),s=(r==null?void 0:r.nodeName)===`UL`&&r!==n.current||a===`gridcell`;o.current=s,i.current&&(r==null?void 0:r.nodeName)===`UL`&&r!==n.current&&(i.current=null)});a(()=>{g||(i.current=null)},[g]);let D=h.findIndex(e=>e.isFocused(e.value)),O=Y(e=>{switch(e.key){case`Tab`:o.current=!0;break;case`PageUp`:{let t=Od(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(n.current)+5,r=n.current.children,i=r[Math.min(r.length-1,t)];i&&i.focus(),e.preventDefault();break}}});return G(Wd,x({ref:r,className:Ve(w.root,d),ownerState:C,role:`listbox`,onKeyDown:O,onBlur:E},b,{children:h.map((e,t)=>{var n;let r=(n=e.isDisabled)==null?void 0:n.call(e,e.value),i=p||r;if(y&&i)return null;let a=e.isSelected(e.value),o=D===t||D===-1&&t===0?0:-1;return G(T,x({onClick:()=>!m&&u(e.value),selected:a,disabled:i,disableRipple:m,role:`option`,"aria-disabled":m||i||void 0,"aria-label":e.ariaLabel,"aria-selected":a,tabIndex:o,className:w.item},v==null?void 0:v.digitalClockSectionItem,{children:e.label}),e.label)})}))}),qd=({now:e,value:t,adapter:n,ampm:r,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{let c=t?n.getHours(t):null,l=[],u=(e,t)=>{let n=t??c;return n===null?!1:r?e===12?n===12||n===0:n===e||n-12===e:n===e},d=e=>u(e,n.getHours(s)),f=n.setDate(n.setMonth(n.startOfDay(e),0),15),p=r?11:23;for(let e=0;e<=p;e+=o){let t=n.format(n.setHours(f,e),r?`hours12h`:`hours24h`),o=a(parseInt(t,10).toString());t=n.formatNumber(t),l.push({value:e,label:t,isSelected:u,isDisabled:i,isFocused:d,ariaLabel:o})}return l},Jd=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{let s=t=>e!==null&&o&&e===t,c=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,o)=>{let l=r*o;return{value:l,label:t.formatNumber(i(l)),isDisabled:n,isSelected:s,isFocused:c,ariaLabel:a(l.toString())}})]};g();var Yd=`ampm.timeSteps.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.skipDisabled.timezone`.split(`.`),Xd=e=>B({root:[`root`]},Rd,e),Zd=q(Su,{name:`MuiMultiSectionDigitalClock`,slot:`Root`})(({theme:e})=>({flexDirection:`row`,width:`100%`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Qd=o(function(e,t){let n=kc(),r=dn(),i=cr({props:e,name:`MuiMultiSectionDigitalClock`}),{ampm:a=n.is12HourCycleInCurrentLocale(),timeSteps:o,autoFocus:s,slots:c,slotProps:l,value:u,defaultValue:d,referenceDate:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:_,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:S,onChange:C,view:w,views:T=[`hours`,`minutes`],openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,skipDisabled:ee=!1,timezone:P}=i,F=Z(i,Yd),{value:I,handleValueChange:te,timezone:L}=sd({name:`MultiSectionDigitalClock`,timezone:P,value:u,defaultValue:d,referenceDate:m,onChange:C,valueManager:pd}),ne=Ac(),R=Zl(L),z=p(()=>x({hours:1,minutes:5,seconds:5},o),[o]),B=hd({value:I,referenceDate:m,adapter:n,props:i,timezone:L}),re=Y((e,t,n)=>te(e,t,n)),ie=p(()=>!a||!T.includes(`hours`)||T.includes(`meridiem`)?T:[...T,`meridiem`],[a,T]),{view:ae,setValueAndGoToNextView:oe,focusedView:V}=vu({view:w,views:ie,openTo:E,onViewChange:D,onChange:re,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=xu(B,a,Y(e=>{oe(e,`finish`,`meridiem`)}),`finish`),H=f((e,t)=>{let r=ol(h,n),i=t===`hours`||t===`minutes`&&ie.includes(`seconds`),o=({start:e,end:t})=>!(_&&r(_,t)||g&&r(e,g)||v&&r(e,R)||y&&r(R,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(S)switch(t){case`hours`:return!S(n.setHours(B,e),`hours`);case`minutes`:return!S(n.setMinutes(B,e),`minutes`);case`seconds`:return!S(n.setSeconds(B,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,se,a),r=n.setHours(B,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(B,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case`seconds`:{let t=n.setSeconds(B,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[a,B,h,g,se,_,b,S,n,v,y,R,ie]),U=f(e=>{switch(e){case`hours`:return{onChange:e=>{let t=rl(e,se,a);oe(n.setHours(B,t),`finish`,`hours`)},items:qd({now:R,value:I,ampm:a,adapter:n,isDisabled:e=>H(e,`hours`),timeStep:z.hours,resolveAriaLabel:ne.hoursClockNumberText,valueOrReferenceDate:B})};case`minutes`:return{onChange:e=>{oe(n.setMinutes(B,e),`finish`,`minutes`)},items:Jd({value:n.getMinutes(B),adapter:n,isDisabled:e=>H(e,`minutes`),resolveLabel:e=>n.format(n.setMinutes(R,e),`minutes`),timeStep:z.minutes,hasValue:!!I,resolveAriaLabel:ne.minutesClockNumberText})};case`seconds`:return{onChange:e=>{oe(n.setSeconds(B,e),`finish`,`seconds`)},items:Jd({value:n.getSeconds(B),adapter:n,isDisabled:e=>H(e,`seconds`),resolveLabel:e=>n.format(n.setSeconds(R,e),`seconds`),timeStep:z.seconds,hasValue:!!I,resolveAriaLabel:ne.secondsClockNumberText})};case`meridiem`:{let e=qc(n,`am`),t=qc(n,`pm`);return{onChange:ce,items:[{value:`am`,label:e,isSelected:()=>!!I&&se===`am`,isFocused:()=>!!B&&se===`am`,ariaLabel:e},{value:`pm`,label:t,isSelected:()=>!!I&&se===`pm`,isFocused:()=>!!B&&se===`pm`,ariaLabel:t}]}}default:throw Error(xc(144,e))}},[R,I,a,n,z.hours,z.minutes,z.seconds,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,se,oe,B,H,ce]),le=p(()=>{if(!r)return ie;let e=ie.filter(e=>e!==`meridiem`);return e.reverse(),ie.includes(`meridiem`)&&e.push(`meridiem`),e},[r,ie]),ue=p(()=>ie.reduce((e,t)=>x({},e,{[t]:U(t)}),{}),[ie,U]),{ownerState:de}=su(),fe=Xd(j);return G(Zd,x({ref:t,className:Ve(fe.root,A),ownerState:de,role:`group`},F,{children:le.map(e=>G(Kd,{items:ue[e].items,onChange:ue[e].onChange,active:ae===e,autoFocus:s||V===e,disabled:M,readOnly:N,slots:c,slotProps:l,skipDisabled:ee,"aria-label":ne.selectViewText(e)},e))}))});function $d(e){return Ne(`MuiPickerDay`,e)}var ef=ke(`MuiPickerDay`,[`root`,`dayOutsideMonth`,`today`,`selected`,`disabled`,`fillerCell`]);g();function tf(e){let{disabled:t,selected:n,today:r,outsideCurrentMonth:i,day:a,disableHighlightToday:o,showDaysOutsideCurrentMonth:s}=e,c=kc(),{ownerState:l}=su();return p(()=>x({},l,{day:a,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:i??!1,isDayStartOfWeek:c.isSameDay(a,c.startOfWeek(a)),isDayEndOfWeek:c.isSameDay(a,c.endOfWeek(a)),disableHighlightToday:o??!1,showDaysOutsideCurrentMonth:s??!1}),[c,l,a,n,t,r,i,o,s])}g();var nf=[`autoFocus`,`className`,`classes`,`hidden`,`isAnimating`,`onClick`,`onDaySelect`,`onFocus`,`onBlur`,`onKeyDown`,`onMouseDown`,`onMouseEnter`,`children`,`isFirstVisibleCell`,`isLastVisibleCell`,`day`,`selected`,`disabled`,`today`,`outsideCurrentMonth`,`disableHighlightToday`,`showDaysOutsideCurrentMonth`,`isVisuallySelected`,`isDayFillerCell`],rf=(e,t)=>{let{isDaySelected:n,disableHighlightToday:r,isDayCurrent:i,isDayDisabled:a,isDayOutsideMonth:o,isDayFillerCell:s}=e;return B({root:[`root`,n&&!s&&`selected`,a&&`disabled`,!r&&i&&!n&&!s&&`today`,o&&`dayOutsideMonth`,s&&`fillerCell`]},$d,t)},af=q(Yn,{name:`MuiPickerDay`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&t.dayOutsideMonth,n.isDayFillerCell&&t.fillerCell]}})(({theme:e})=>x({"--PickerDay-horizontalMargin":`2px`,"--PickerDay-size":`36px`},e.typography.caption,{lineHeight:1,display:`flex`,width:`var(--PickerDay-size)`,height:`var(--PickerDay-size)`,borderRadius:`calc(var(--PickerDay-size) / 2)`,padding:0,backgroundColor:`transparent`,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)},marginLeft:`var(--PickerDay-horizontalMargin)`,marginRight:`var(--PickerDay-horizontalMargin)`,variants:[{props:{isDaySelected:!0},style:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:focus, &:hover":{willChange:`background-color`,backgroundColor:(e.vars||e).palette.primary.dark},[`&.${ef.disabled}`]:{opacity:.6}}},{props:{isDayOutsideMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{isDayDisabled:!0},style:{color:(e.vars||e).palette.text.disabled}},{props:{isDayFillerCell:!0},style:{opacity:0,pointerEvents:`none`}},{props:{isDayCurrent:!0,isDaySelected:!1},style:{outline:`1px solid ${(e.vars||e).palette.text.secondary}`,outlineOffset:-1}}]})),of=()=>{},sf=h(o(function(e,t){let n=cr({props:e,name:`MuiPickerDay`}),r=kc(),{autoFocus:i=!1,className:a,classes:o,isAnimating:s,onClick:c,onDaySelect:u,onFocus:d=of,onBlur:f=of,onKeyDown:p=of,onMouseDown:m=of,onMouseEnter:h=of,children:g,day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w,isDayFillerCell:T}=n,E=Z(n,nf),D=tf({day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w}),O=x({},D,{isDayFillerCell:T??(S&&!w)}),k=rf(O,o),A=l(null),M=nt(A,t);return j(()=>{i&&!y&&!s&&!S&&A.current.focus()},[i,y,s,S]),O.isDayFillerCell?G(af,{ref:M,role:E.role,"aria-colindex":E[`aria-colindex`],ownerState:O,className:Ve(k.root,a),as:`div`}):G(af,x({ref:M,centerRipple:!0,disabled:y,tabIndex:v?0:-1,onKeyDown:e=>p(e,_),onFocus:e=>d(e,_),onBlur:e=>f(e,_),onMouseEnter:e=>h(e,_),onClick:e=>{e.defaultMuiPrevented=!0,y||u(_),S&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{m(e),S&&e.preventDefault()}},E,{ownerState:O,className:Ve(k.root,a),children:g??r.format(_,`dayOfMonth`)}))})),cf=e=>e.saveQuery!=null,lf=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:i,setTempAndroidValueStr:a,updateSectionValue:o}})=>{let s=kc(),c=({keyPressed:e,sectionIndex:t},r,a)=>{let o=e.toLowerCase(),s=n.sections[t];if(n.characterQuery!=null&&(!a||a(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){let e=`${n.characterQuery.value}${o}`,a=r(e,s);if(!cf(a))return i({sectionIndex:t,value:e,sectionType:s.type}),a}let c=r(o,s);return cf(c)&&!c.saveQuery?(i(null),null):(i({sectionIndex:t,value:o,sectionType:s.type}),cf(c)?null:c)},l=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return r.length===0?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:r.length===1}},n=(e,n,i,a)=>{let o=e=>ul(s,r,n.type,e);if(n.contentType===`letter`)return t(n.format,o(n.format),e);if(i&&a!=null&&cl(s,i).contentType===`letter`){let n=o(i),r=t(i,n,e);return cf(r)?{saveQuery:!1}:x({},r,{sectionValue:a(r.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case`month`:return n(e,t,s.formats.month,e=>bl(s,e,s.formats.month,t.format));case`weekDay`:return n(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case`meridiem`:return n(e,t);default:return{saveQuery:!1}}})},u=n=>{let r=({queryValue:n,skipIfBelowMinimum:r,section:i})=>{let a=ml(n,e),o=Number(a),c=t[i.type]({currentDate:null,format:i.format,contentType:i.contentType});if(o>c.maximum)return{saveQuery:!1};if(r&&o<c.minimum)return{saveQuery:!0};let l=o*10>c.maximum||a.length===c.maximum.toString().length;return{sectionValue:vl(s,o,c,e,i),shouldGoToNextSection:l}};return c(n,(e,t)=>{if(t.contentType===`digit`||t.contentType===`digit-with-letter`)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if(t.type===`month`){let n=Sl(s,`digit`,`month`,`MM`),i=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:`MM`,hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:`digit`,maxLength:2}});if(cf(i))return i;let a=bl(s,i.sectionValue,`MM`,t.format);return x({},i,{sectionValue:a})}if(t.type===`weekDay`){let n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});if(cf(n))return n;let i=ll(s,t.format)[Number(n.sectionValue)-1];return x({},n,{sectionValue:i})}return{saveQuery:!1}},t=>gl(t,e))};return Y(t=>{let r=n.sections[t.sectionIndex],i=gl(t.keyPressed,e)?u(x({},t,{keyPressed:hl(t.keyPressed,e)})):l(t);if(i==null){a(null);return}o({section:r,newSectionValue:i.sectionValue,shouldGoToNextSection:i.shouldGoToNextSection})})},uf=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;let{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:c,minDate:l,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return`invalidDate`;case!!(i&&i(t)):return`shouldDisableDate`;case!!(a&&a(t)):return`shouldDisableMonth`;case!!(o&&o(t)):return`shouldDisableYear`;case!!(c&&r.isAfterDay(t,d)):return`disableFuture`;case!!(s&&r.isBeforeDay(t,d)):return`disablePast`;case!!(l&&r.isBeforeDay(t,l)):return`minDate`;case!!(u&&r.isAfterDay(t,u)):return`maxDate`;default:return null}};uf.valueManager=pd;var df=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;let{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:l,disableFuture:u}=r,d=e.date(void 0,n),f=ol(c,e);switch(!0){case!e.isValid(t):return`invalidDate`;case!!(i&&f(i,t)):return`minTime`;case!!(a&&f(t,a)):return`maxTime`;case!!(u&&e.isAfter(t,d)):return`disableFuture`;case!!(l&&e.isBefore(t,d)):return`disablePast`;case!!(s&&s(t,`hours`)):return`shouldDisableTime-hours`;case!!(s&&s(t,`minutes`)):return`shouldDisableTime-minutes`;case!!(s&&s(t,`seconds`)):return`shouldDisableTime-seconds`;case!!(o&&e.getMinutes(t)%o!==0):return`minutesStep`;default:return null}};df.valueManager=pd;var ff=({adapter:e,value:t,timezone:n,props:r})=>{let i=uf({adapter:e,value:t,timezone:n,props:r});return i===null?df({adapter:e,value:t,timezone:n,props:r}):i};ff.valueManager=pd,g();function pf(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=kc(),c=l(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:i,props:t}),d=n.valueManager.hasError(u);return a(()=>{o&&!n.valueManager.isSameError(u,c.current)&&o(u,r),c.current=u},[n,o,u,r]),{validationError:u,hasValidationError:d,getValidationErrorForNewValue:Y(e=>n({adapter:s,value:e,timezone:i,props:t}))}}g();var mf=5e3,hf=e=>{var t;let n=kc(),r=Ac(),i=dn(),{manager:{validator:o,valueType:s,internal_valueManager:c,internal_fieldValueManager:d},internalPropsWithDefaults:m,internalPropsWithDefaults:{value:h,defaultValue:g,referenceDate:_,onChange:v,format:y,formatDensity:b=`dense`,selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:w=!1,timezone:T},forwardedProps:{error:E}}=e,{value:D,handleValueChange:O,timezone:k}=sd({name:`a field component`,timezone:T,value:h,defaultValue:g,referenceDate:_,onChange:v,valueManager:c}),A=l(D);a(()=>{A.current=D},[D]);let{hasValidationError:j}=pf({props:m,validator:o,timezone:k,value:D,onError:m.onError}),M=p(()=>pl(n),[n]),N=p(()=>Tl(n,M,k),[n,M,k]),ee=f(e=>d.getSectionsFromValue(e,e=>Ll({adapter:n,localeText:r,localizedDigits:M,format:y,date:e,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i})),[d,y,r,M,i,w,n,b]),[P,F]=u(()=>{let e=ee(D),t={sections:e,lastExternalValue:D,lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},tempValueStrAndroid:null,characterQuery:null},r=ld(e),a=c.getInitialReferenceValue({referenceDate:_,value:D,adapter:n,props:m,granularity:r,timezone:k});return x({},t,{referenceValue:a})}),[I,te]=$t({controlled:S,default:null,name:`useField`,state:`selectedSections`}),L=e=>{te(e),C==null||C(e)},ne=p(()=>Al(I,P.sections),[I,P.sections]),R=ne===`all`?0:ne,z=p(()=>kl(P.sections),[P.sections]),B=p(()=>P.sections.every(e=>e.value===``),[P.sections]),re=p(()=>{if(R!=null)return!1;let e=P.sections.filter(e=>e.value!==``);return e.length>0&&P.sections.length-e.length>0},[P.sections,R]),ie=p(()=>E===void 0?j||re:E,[j,re,E]),ae=e=>{let t={validationError:o({adapter:n,value:e,timezone:k,props:m})};O(e,t)},oe=(e,t)=>{let n=[...P.sections];return n[e]=x({},n[e],{value:t,modified:!0}),n},V=l(null),se=Rt(),ce=e=>{R!=null&&(V.current={sectionIndex:R,value:e},se.start(0,()=>{V.current=null}))},H=()=>{c.areValuesEqual(n,D,c.emptyValue)?F(e=>x({},e,{sections:e.sections.map(e=>x({},e,{value:``})),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(c.emptyValue))},U=()=>{if(R==null)return;let e=P.sections[R];e.value!==``&&(ce(``),d.getDateFromSection(D,e)===null?F(e=>x({},e,{sections:oe(R,``),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(d.updateDateInValue(D,e,null))))},le=e=>{let t=d.parseValueStr(e,P.referenceValue,(e,t)=>{let a=n.parse(e,y);if(!n.isValid(a))return null;let o=Ll({adapter:n,localeText:r,localizedDigits:M,format:y,date:a,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i});return Ol(n,a,o,t,!1)});ae(t)},ue=Rt(),de=({section:e,newSectionValue:t,shouldGoToNextSection:r})=>{se.clear(),ue.clear();let i=d.getDateFromSection(D,e);r&&R<P.sections.length-1&&L(R+1);let a=oe(R,t),o=d.getDateSectionsFromValue(a,e),s=Cl(n,o,M);if(n.isValid(s)){let t=Ol(n,s,o,d.getDateFromSection(P.referenceValue,e),!0);return i??ue.start(0,()=>{A.current===D&&F(t=>x({},t,{sections:d.clearDateSections(P.sections,e),tempValueStrAndroid:null}))}),ae(d.updateDateInValue(D,e,t))}return o.every(e=>e.value!==``)&&(i==null||n.isValid(i))?(ce(t),ae(d.updateDateInValue(D,e,s))):(i!=null&&(ce(t),ae(d.updateDateInValue(D,e,s))),F(e=>x({},e,{sections:a,tempValueStrAndroid:null})))},fe=e=>F(t=>x({},t,{tempValueStrAndroid:e})),pe=Y(e=>{F(t=>x({},t,{characterQuery:e}))});if(D!==P.lastExternalValue){let e=V.current!=null&&!n.isValid(d.getDateFromSection(D,P.sections[V.current.sectionIndex])),t;t=e?oe(V.current.sectionIndex,V.current.value):ee(D),F(r=>x({},r,{lastExternalValue:D,sections:t,sectionsDependencies:{format:y,isRtl:i,locale:n.locale},referenceValue:e?r.referenceValue:d.updateReferenceValue(n,D,r.referenceValue),tempValueStrAndroid:null}))}if(i!==P.lastSectionsDependencies.isRtl||y!==P.lastSectionsDependencies.format||n.locale!==P.lastSectionsDependencies.locale){let e=ee(D);F(t=>x({},t,{lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}P.characterQuery!=null&&!ie&&R==null&&pe(null),P.characterQuery!=null&&((t=P.sections[P.characterQuery.sectionIndex])==null?void 0:t.type)!==P.characterQuery.sectionType&&pe(null),a(()=>{V.current!=null&&(V.current=null)});let W=Rt();return a(()=>(P.characterQuery!=null&&W.start(mf,()=>pe(null)),()=>{}),[P.characterQuery,pe,W]),a(()=>{P.tempValueStrAndroid!=null&&R!=null&&U()},[P.sections]),{activeSectionIndex:R,areAllSectionsEmpty:B,error:ie,localizedDigits:M,parsedSelectedSections:ne,sectionOrder:z,sectionsValueBoundaries:N,state:P,timezone:k,value:D,clearValue:H,clearActiveSection:U,setCharacterQuery:pe,setSelectedSections:L,setTempAndroidValueStr:fe,updateSectionValue:de,updateValueFromValueStr:le,getSectionsFromValue:ee}};g();function gf(e){let{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,i=Bl(),a=Gl(),o=nt(n.fieldRef,r?null:a==null?void 0:a.internalFieldRef,r?null:a==null?void 0:a.fieldRef),s=i==null?void 0:i.setValue,c=f((e,t)=>s==null?void 0:s(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(p(()=>a!=null&&i!=null?x({value:i.value,onChange:c,timezone:i.timezone,disabled:i.disabled,readOnly:i.readOnly,autoFocus:i.autoFocus&&!i.open,focused:i.open?!0:void 0,format:i.fieldFormat,formatDensity:a.formatDensity,selectedSections:a.selectedSections,onSelectedSectionsChange:a.onSelectedSectionsChange,fieldRef:o},n):n,[i,a,n,c,o]))}function _f(e){let{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:i}}=e;if(!n.isReady())return;let a=L(n.getRoot()).getSelection();if(!a)return;if(r==null){a.rangeCount>0&&a.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(a.getRangeAt(0).startContainer)&&a.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Dd(n.getRoot())))return;let o=new window.Range,s;s=r===`all`?n.getRoot():i.sections[r].type===`empty`?n.getSectionContainer(r):n.getSectionContent(r),o.selectNodeContents(s),s.focus(),a.removeAllRanges(),a.addRange(o)}function vf(e){let{manager:{internal_fieldValueManager:t},focused:n,setFocused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,sectionOrder:u,state:d,value:f,activeSectionIndex:p,localizedDigits:m,timezone:h,clearValue:g,clearActiveSection:_,setCharacterQuery:v,setSelectedSections:y,updateValueFromValueStr:b,updateSectionValue:x},internalPropsWithDefaults:{disabled:S=!1,readOnly:C=!1,minutesStep:w}}=e,T=kc(),E=Y(e=>{var n;if(!S)switch(!0){case(e.ctrlKey||e.metaKey)&&(((n=e.key)==null?void 0:n.toUpperCase())===`A`||String.fromCharCode(e.keyCode)===`A`)&&!e.shiftKey&&!e.altKey:e.preventDefault(),y(`all`);break;case e.key===`ArrowRight`:if(e.preventDefault(),c==null)y(u.startIndex);else if(c===`all`)y(u.endIndex);else{let e=u.neighbors[c].rightIndex;e!==null&&y(e)}break;case e.key===`ArrowLeft`:if(e.preventDefault(),c==null)y(u.endIndex);else if(c===`all`)y(u.startIndex);else{let e=u.neighbors[c].leftIndex;e!==null&&y(e)}break;case e.key===`Delete`:if(e.preventDefault(),C)break;c==null||c===`all`?g():_();break;case[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key):{if(e.preventDefault(),C||p==null)break;c===`all`&&y(p);let n=d.sections[p],r=Cf(T,h,n,e.key,l,m,t.getDateFromSection(f,n),{minutesStep:w});x({section:n,newSectionValue:r,shouldGoToNextSection:!1});break}}}),D=Rt(),O=Y(()=>{if(!(S||!i.isReady())){if(c===`all`){r(!0),D.start(0,()=>{let e=document.getSelection();if(!e||e.rangeCount===0){y(u.startIndex);return}let t=e.getRangeAt(0).startOffset;if(t===0){y(u.startIndex);return}let n=0,r=0;for(;r<t&&n<d.sections.length;){let e=d.sections[n];n+=1,r+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}y(n-1)});return}n||(r(!0),c??y(u.startIndex))}}),k=Y(e=>{if(S||!i.isReady()||c===`all`||e.button!==0)return;let t=e.target,a=i.getRoot(),o=a.contains(t);if(!o&&t!==e.currentTarget)return;let s=o?t.closest(`[data-sectionindex]`):null;if(s==null&&(!o||bf(a,e.clientX))){e.preventDefault(),n||(r(!0),y(u.startIndex));return}let l=s?Number(s.dataset.sectionindex):xf(a,e.clientX);l==null||!Number.isInteger(l)||(e.preventDefault(),r(!0),y(l))}),A=Y(e=>{if(!i.isReady()||c!==`all`)return;let t=e.target.textContent??``;i.getRoot().innerHTML=d.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),_f({focused:n,domGetters:i,stateResponse:a}),t.length===0||t.charCodeAt(0)===10?(g(),y(`all`)):t.length>1?b(t):(c===`all`&&y(0),o({keyPressed:t,sectionIndex:0}))}),j=Y(e=>{if(C||c!==`all`){e.preventDefault();return}let t=e.clipboardData.getData(`text`);e.preventDefault(),v(null),b(t)}),M=Y(()=>{if(n||S||!i.isReady())return;let e=Dd(i.getRoot());r(!0),i.getSectionIndexFromDOMElement(e)??y(u.startIndex)});return{onKeyDown:E,onBlur:Y(()=>{setTimeout(()=>{if(!i.isReady())return;let e=Dd(i.getRoot());i.getRoot().contains(e)||(r(!1),y(null))})}),onFocus:M,onClick:O,onMouseDown:k,onPaste:j,onInput:A,contentEditable:c===`all`,tabIndex:s.disabled||c===0?-1:0}}var yf=4;function bf(e,t){let n=e.querySelectorAll(`[data-sectionindex]`);if(n.length===0)return!1;let r=1/0,i=-1/0;for(let e=0;e<n.length;e+=1){let t=n[e].getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return t<r-yf||t>i+yf}function xf(e,t){let n=e.querySelectorAll(`[role="spinbutton"]`);if(n.length===0)return null;let r=0,i=1/0;for(let e=0;e<n.length;e+=1){let a=n[e].getBoundingClientRect(),o=(a.left+a.right)/2,s=Math.abs(t-o);s<i&&(i=s,r=e)}return r}function Sf(e){switch(e){case`ArrowUp`:return 1;case`ArrowDown`:return-1;case`PageUp`:return 5;case`PageDown`:return-5;default:return 0}}function Cf(e,t,n,r,i,a,o,s){let c=Sf(r),l=r===`Home`,u=r===`End`,d=n.value===``||l||u;return n.contentType===`digit`||n.contentType===`digit-with-letter`?(()=>{let r=i[n.type]({currentDate:o,format:n.format,contentType:n.contentType}),f=t=>vl(e,t,r,a,n),p=n.type===`minutes`&&s!=null&&s.minutesStep?s.minutesStep:1,m;if(d){if(n.type===`year`&&!u&&!l)return e.formatByString(e.date(void 0,t),n.format);m=c>0||l?r.minimum:r.maximum}else m=parseInt(ml(n.value,a),10)+c*p;return m%p!==0&&((c<0||l)&&(m+=p-(p+m)%p),(c>0||u)&&(m-=m%p)),m>r.maximum?f(r.minimum+(m-r.maximum-1)%(r.maximum-r.minimum+1)):m<r.minimum?f(r.maximum-(r.minimum-m-1)%(r.maximum-r.minimum+1)):f(m)})():(()=>{let r=ul(e,t,n.type,n.format);return r.length===0?n.value:d?c>0||l?r[0]:r[r.length-1]:r[((r.indexOf(n.value)+c)%r.length+r.length)%r.length]})()}g();function wf(e){let{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:i}}=e,a=Y(e=>{i(e.target.value)});return{value:p(()=>n?``:t.getHiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:a}}g();function Tf(e){let{stateResponse:{parsedSelectedSections:t,setSelectedSections:n},internalPropsWithDefaults:{disabled:r=!1}}=e,i=Y(e=>{if(r||e.isDefaultPrevented())return;let i=Number(e.currentTarget.dataset.sectionindex);Number.isInteger(i)&&t!==i&&n(i)});return f(e=>({"data-sectionindex":e,onClick:i}),[i])}g();function Ef(e){let t=kc(),n=Ac(),{focused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,state:u,value:d,localizedDigits:p,clearActiveSection:m,setCharacterQuery:h,setSelectedSections:g,updateSectionValue:_,updateValueFromValueStr:v},internalPropsWithDefaults:{disabled:y=!1,readOnly:b=!1}}=e,x=c===`all`,S=!x&&!y&&!b,C=Y(e=>{if(!i.isReady())return;let t=u.sections[e];i.getSectionContent(e).innerHTML=t.value||t.placeholder,_f({focused:r,domGetters:i,stateResponse:a})}),w=Y(e=>{if(!i.isReady())return;let t=e.target,n=t.textContent??``,r=i.getSectionIndexFromDOMElement(t),a=u.sections[r];if(b){C(r);return}if(n.length===0){if(a.value===``){C(r);return}let t=e.nativeEvent.inputType;if(t===`insertParagraph`||t===`insertLineBreak`){C(r);return}C(r),m();return}o({keyPressed:n,sectionIndex:r}),C(r)}),T=Y(e=>{e.preventDefault()}),E=Y(e=>{if(e.preventDefault(),b||y||typeof c!=`number`)return;let t=u.sections[c],n=e.clipboardData.getData(`text`),r=/^[a-zA-Z]+$/.test(n),i=/^[0-9]+$/.test(n),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);t.contentType===`letter`&&r||t.contentType===`digit`&&i||t.contentType===`digit-with-letter`&&a?(h(null),_({section:t,newSectionValue:n,shouldGoToNextSection:!0})):!r&&!i&&(h(null),v(n))}),D=Y(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`none`}),O=f(e=>()=>{y||g(e)},[y,g]);return f((e,r)=>{let i=l[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:w,onPaste:E,onMouseUp:T,onDragOver:D,onFocus:O(r),"aria-readonly":b,"aria-valuenow":Of(e,t,p),"aria-valuemin":i.minimum,"aria-valuemax":i.maximum,"aria-valuetext":e.value?Df(e,t,p):n.empty,"aria-label":n[e.type],"aria-disabled":y,tabIndex:!S||x||r>0?-1:0,contentEditable:!x&&!y&&!b,role:`spinbutton`,"data-range-position":e.dateName||void 0,spellCheck:!S&&void 0,autoCapitalize:S?`none`:void 0,autoCorrect:S?`off`:void 0,children:e.value||e.placeholder,inputMode:e.contentType===`letter`?`text`:`numeric`}},[l,x,y,b,S,n,t,p,w,E,T,D,O,s,d])}function Df(e,t,n){if(e.value)switch(e.type){case`month`:{if(e.contentType===`digit`){let r=t.setMonth(t.date(),Number(ml(e.value,n))-1);return t.isValid(r)?t.format(r,`month`):``}let r=t.parse(e.value,e.format);return r&&t.isValid(r)?t.format(r,`month`):void 0}case`day`:if(e.contentType===`digit`){let r=t.setDate(t.startOfYear(t.date()),Number(ml(e.value,n)));return t.isValid(r)?t.format(r,`dayOfMonth`):``}return e.value;case`weekDay`:return;default:return}}function Of(e,t,n){if(!e.value)return;let r=ml(e.value,n);switch(e.type){case`weekDay`:return e.contentType===`letter`?void 0:Number(r);case`meridiem`:{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?+(t.getHours(n)>=12):void 0}case`day`:return e.contentType===`digit-with-letter`?parseInt(r,10):Number(r);case`month`:{if(e.contentType===`digit`)return Number(r);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType===`letter`?void 0:Number(r)}}g();var kf=e=>{let{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:i,internal_useOpenPickerButtonAriaLabel:o}}=e,{internalProps:s,forwardedProps:c}=Lc(t,i),f=gf({manager:n,internalProps:s,skipContextFieldRefAssignment:r}),{sectionListRef:m,onBlur:h,onClick:g,onMouseDown:_,onFocus:v,onInput:y,onPaste:b,onKeyDown:S,onClear:C,clearable:w}=c,{disabled:T=!1,readOnly:E=!1,autoFocus:D=!1,focused:O,fieldRef:k}=f,A=l(null),M=nt(m,A),N=p(()=>({isReady:()=>A.current!=null,getRoot:()=>A.current.getRoot(),getSectionContainer:e=>A.current.getSectionContainer(e),getSectionContent:e=>A.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>A.current.getSectionIndexFromDOMElement(e)}),[A]),ee=hf({manager:n,internalPropsWithDefaults:f,forwardedProps:c}),{areAllSectionsEmpty:P,error:F,parsedSelectedSections:I,sectionOrder:te,state:L,value:ne,clearValue:R,setSelectedSections:z}=ee,B=lf({stateResponse:ee}),re=o(ne),[ie,ae]=u(!1);function oe(e=0){if(T||!A.current||Af(A)!=null)return;let t=Al(e,L.sections);ae(!0),A.current.getSectionContent(t).focus()}let V=vf({manager:n,internalPropsWithDefaults:f,stateResponse:ee,applyCharacterEditing:B,focused:ie,setFocused:ae,domGetters:N}),se=wf({manager:n,stateResponse:ee}),ce=Tf({stateResponse:ee,internalPropsWithDefaults:f}),H=Ef({manager:n,stateResponse:ee,applyCharacterEditing:B,internalPropsWithDefaults:f,domGetters:N,focused:ie}),U=Y(e=>{S==null||S(e),V.onKeyDown(e)}),le=Y(e=>{V.onBlur(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||h==null||h(e)}),ue=Y(e=>{V.onFocus(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||v==null||v(e)}),de=Y(e=>{e.isDefaultPrevented()||(g==null||g(e),V.onClick(e))}),fe=Y(e=>{e.isDefaultPrevented()||(_==null||_(e),V.onMouseDown(e))}),pe=Y(e=>{b==null||b(e),V.onPaste(e)}),W=Y(e=>{y==null||y(e),V.onInput(e)}),me=Y((e,...t)=>{e.preventDefault(),C==null||C(e,...t),R(),jf(A)?z(te.startIndex):oe(0)}),he=p(()=>L.sections.map((e,t)=>{let n=H(e,t);return{container:ce(t),content:n,before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n[`data-range-position`]:void 0}}}),[L.sections,ce,H]);return a(()=>{if(A.current==null)throw Error(xc(249));D&&!T&&A.current.getSectionContent(te.startIndex).focus()},[]),j(()=>{if(!(!ie||!A.current)){if(I===`all`)A.current.getRoot().focus();else if(typeof I==`number`){let e=A.current.getSectionContent(I);e&&e.focus()}}},[I,ie]),j(()=>{_f({focused:ie,domGetters:N,stateResponse:ee})}),d(k,()=>({getSections:()=>L.sections,getActiveSectionIndex:()=>Af(A),setSelectedSections:e=>{if(T||!A.current)return;let t=Al(e,L.sections);ae((t===`all`?0:t)!==null),z(e)},focusField:oe,isFieldFocused:()=>jf(A),clearValue:R})),x({},c,V,{onBlur:le,onClick:de,onMouseDown:fe,onFocus:ue,onInput:W,onPaste:pe,onKeyDown:U,onClear:me},se,{error:F,clearable:!!(w&&!P&&!E&&!T),focused:O??ie,sectionListRef:M,elements:he,areAllSectionsEmpty:P,disabled:T,readOnly:E,autoFocus:D,openPickerAriaLabel:re})};function Af(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!n||!e.current||!e.current.getRoot().contains(n)?null:e.current.getSectionIndexFromDOMElement(n)}function jf(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!!e.current&&e.current.getRoot().contains(n)}g();function Mf(){return p(()=>({valueType:`date`,validator:uf,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Pf,internal_useOpenPickerButtonAriaLabel:Nf}),[])}function Nf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Pf(e){let t=kc(),n=Ff(e);return p(()=>x({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Ff(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:Uc(t,e.minDate,n.minDate),maxDate:Uc(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}g();function If(e={}){let{ampm:t}=e;return p(()=>({valueType:`time`,validator:df,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Rf,internal_useOpenPickerButtonAriaLabel:Lf(t)}),[t])}function Lf(e){return function(t){let n=kc(),r=Ac();return p(()=>{let i=e??n.is12HourCycleInCurrentLocale()?`fullTime12h`:`fullTime24h`,a=n.isValid(t)?n.format(t,i):null;return r.openTimePickerDialogue(a)},[t,r,n])}}function Rf(e){let t=kc(),n=zf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function zf(e){return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}g();function Bf(){return p(()=>({valueType:`date-time`,validator:ff,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Hf,internal_useOpenPickerButtonAriaLabel:Vf}),[])}function Vf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Hf(e){let t=kc(),n=Uf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function Uf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:Uc(t,e.minDateTime??e.minDate,n.minDate),maxDate:Uc(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}var Wf=e=>kf({manager:Mf(),props:e});g();function Gf(e){let{ownerState:t}=su(),n=dn();return p(()=>x({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?`rtl`:`ltr`}),[t,e.disabled,e.readOnly,e.required,n])}function Kf(e){return Ne(`MuiPickersTextField`,e)}var qf=ke(`MuiPickersTextField`,[`root`,`focused`,`disabled`,`error`,`required`]);function Jf(e){return Ne(`MuiPickersInputBase`,e)}var Yf=ke(`MuiPickersInputBase`,[`root`,`focused`,`disabled`,`readOnly`,`error`,`notchedOutline`,`sectionsContainer`,`sectionContent`,`sectionBefore`,`sectionAfter`,`adornedStart`,`adornedEnd`,`input`,`inputSizeSmall`,`activeBar`]);function Xf(e){return Ne(`MuiPickersSectionList`,e)}var Zf=ke(`MuiPickersSectionList`,[`root`,`section`,`sectionContent`]);g();var Qf=[`slots`,`slotProps`,`elements`,`sectionListRef`,`classes`],$f=q(`div`,{name:`MuiPickersSectionList`,slot:`Root`})({direction:`ltr /*! @noflip */`,outline:`none`}),ep=q(`span`,{name:`MuiPickersSectionList`,slot:`Section`})({}),tp=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionSeparator`})({whiteSpace:`pre`}),np=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionContent`})({outline:`none`}),rp=e=>B({root:[`root`],section:[`section`],sectionContent:[`sectionContent`]},Xf,e);function ip(e){let{slots:t,slotProps:n,element:r,classes:i}=e,{ownerState:a}=su(),o=(t==null?void 0:t.section)??ep,s=Vn({elementType:o,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:a}),c=(t==null?void 0:t.sectionContent)??np,u=Vn({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:a}),d=(t==null?void 0:t.sectionSeparator)??tp,f=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:x({},a,{separatorPosition:`before`})}),p=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:x({},a,{separatorPosition:`after`})}),m=l(null),h=nt(u.ref,m);return Je(o,x({},s,{children:[G(d,x({},f)),G(c,x({},u,{ref:h,onBlur:e=>{let t=e.relatedTarget,n=e.currentTarget.closest(`.${Zf.root}`);if(n&&t instanceof Node&&n.contains(t)){e.stopPropagation();return}}})),G(d,x({},p))]}))}var ap=o(function(e,t){let n=cr({props:e,name:`MuiPickersSectionList`}),{slots:r,slotProps:i,elements:a,sectionListRef:o,classes:s}=n,c=Z(n,Qf),u=rp(s),{ownerState:f}=su(),p=l(null),m=nt(t,p),h=e=>{if(!p.current)throw Error(xc(145,e));return p.current};d(o,()=>({getRoot(){return h(`getRoot`)},getSectionContainer(e){return h(`getSectionContainer`).querySelector(`.${Zf.section}[data-sectionindex="${e}"]`)},getSectionContent(e){return h(`getSectionContent`).querySelector(`.${Zf.section}[data-sectionindex="${e}"] .${Zf.sectionContent}`)},getSectionIndexFromDOMElement(e){let t=h(`getSectionIndexFromDOMElement`);if(e==null||!t.contains(e))return null;let n=null;return e.classList.contains(Zf.section)?n=e:e.classList.contains(Zf.sectionContent)&&(n=e.parentElement),n==null?null:Number(n.dataset.sectionindex)}}));let g=(r==null?void 0:r.root)??$f,_=Vn({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return G(g,x({},_,{children:_.contentEditable?a.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(``):G(y,{children:a.map((e,t)=>G(ip,{slots:r,slotProps:i,element:e,classes:u},t))})}))});g();var op=v(null),sp=()=>{let e=b(op);if(e==null)throw Error(xc(146));return e};g();var cp=`elements.areAllSectionsEmpty.defaultValue.label.value.onChange.id.autoFocus.endAdornment.startAdornment.renderSuffix.slots.slotProps.contentEditable.tabIndex.onInput.onPaste.onKeyDown.fullWidth.name.readOnly.inputRef.sectionListRef.onFocus.onBlur.classes.ownerState`.split(`.`),lp=[`ref`];function up(e,t){return n=>{let r=An(e,n)??{};return x({},r,{className:Ve(t,r.className)})}}var dp=e=>Math.round(e*1e5)/1e5,fp=q(`div`,{name:`MuiPickersInputBase`,slot:`Root`})(({theme:e})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:`text`,padding:0,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,boxSizing:`border-box`,letterSpacing:`${dp(.15/16)}em`,[`&.${Yf.disabled}`]:{color:(e.vars||e).palette.action.disabled,cursor:`default`},variants:[{props:{isInputInFullWidth:!0},style:{width:`100%`}}]})),pp=q($f,{name:`MuiPickersInputBase`,slot:`SectionsContainer`})(({theme:e})=>({padding:`4px 0 5px`,fontFamily:e.typography.fontFamily,fontSize:`inherit`,lineHeight:`1.4375em`,flexGrow:1,outline:`none`,display:`flex`,flexWrap:`nowrap`,overflow:`hidden`,letterSpacing:`inherit`,width:`182px`,variants:[{props:{fieldDirection:`rtl`},style:{justifyContent:`end`}},{props:{inputSize:`small`},style:{paddingTop:1}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode===`light`?.42:.5}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0,hasStartAdornment:!1,inputHasLabel:!0,isLabelShrunk:!1},style:{opacity:0}}]})),mp=q(ep,{name:`MuiPickersInputBase`,slot:`Section`})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`,letterSpacing:`inherit`,lineHeight:`1.4375em`,display:`inline-block`,whiteSpace:`nowrap`})),hp=q(np,{name:`MuiPickersInputBase`,slot:`SectionContent`,overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:`1.4375em`,letterSpacing:`inherit`,width:`fit-content`,outline:`none`,"@supports (-webkit-app-region: drag)":{[`.${Yf.root}:not(:focus-within) &`]:{WebkitUserModify:`read-only`,userSelect:`none`}}})),gp=q(tp,{name:`MuiPickersInputBase`,slot:`Separator`})(()=>({whiteSpace:`pre`,letterSpacing:`inherit`})),_p=q(`input`,{name:`MuiPickersInputBase`,slot:`Input`,overridesResolver:(e,t)=>t.hiddenInput})(x({},ct)),vp=q(`div`,{name:`MuiPickersInputBase`,slot:`ActiveBar`})(({theme:e,ownerState:t})=>({display:`none`,position:`absolute`,height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create([`width`,`left`],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:`block`},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),yp=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:i,hasFieldError:a,inputSize:o,isInputInFullWidth:s,inputColor:c,hasStartAdornment:l,hasEndAdornment:u}=t,d={root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`readOnly`,a&&`error`,s&&`fullWidth`,`color${ce(c)}`,o===`small`&&`inputSizeSmall`,l&&`adornedStart`,u&&`adornedEnd`],notchedOutline:[`notchedOutline`],input:[`input`],sectionsContainer:[`sectionsContainer`],sectionContent:[`sectionContent`],sectionBefore:[`sectionBefore`],sectionAfter:[`sectionAfter`],activeBar:[`activeBar`]};return B(d,Jf,e)};function bp(e,t,n,r){if(e.content[`data-range-position`]!==void 0){var i;let e=(i=t.current)==null?void 0:i.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}function xp(e,t){var n,r,i;let a=0;if(((n=t.current)==null?void 0:n.getAttribute(`data-active-range-position`))===`end`)for(let n=e.length-1;n>=e.length/2;--n)a+=bp(e[n],t,n,`end`);else for(let n=0;n<e.length/2;n+=1)a+=bp(e[n],t,n,`start`);return{activeBarWidth:a,sectionOffsets:[((r=t.current)==null||(r=r.querySelector(`[data-sectionindex="0"]`))==null?void 0:r.offsetLeft)||0,((i=t.current)==null||(i=i.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:i.offsetLeft)||0]}}var Sp=o(function(e,t){let n=cr({props:e,name:`MuiPickersInputBase`}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:m,contentEditable:h,tabIndex:g,onInput:_,onPaste:v,onKeyDown:y,name:b,readOnly:S,inputRef:C,sectionListRef:w,onFocus:T,onBlur:E,classes:D,ownerState:O}=n,k=Z(n,cp),A=sp(),j=l(null),M=l(null),N=l([]),ee=nt(t,j),P=Qe();if(!P)throw Error(xc(152));let F=O??A,I=e=>{var t;(t=P.onFocus)==null||t.call(P,e),T==null||T(e)},te=e=>{I(e)},L=e=>{if(y==null||y(e),e.key===`Enter`&&!e.defaultMuiPrevented){var t,n;if((t=j.current)!=null&&t.dataset.multiInput)return;let r=(n=j.current)==null?void 0:n.closest(`form`),i=r==null?void 0:r.querySelector(`[type="submit"]`);if(!r||!i)return;e.preventDefault(),r.requestSubmit(i)}},ne=e=>{var t;(t=P.onBlur)==null||t.call(P,e),E==null||E(e)};a(()=>{P&&P.setAdornedStart(!!d)},[P,d]),a(()=>{P&&(i?P.onEmpty():P.onFilled())},[P,i]);let R=yp(D,F),z=(p==null?void 0:p.root)||fp,B=Vn({elementType:z,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:k,additionalProps:{"aria-invalid":P.error,ref:ee},className:R.root,ownerState:F}),re=(p==null?void 0:p.input)||pp,ie=(p==null?void 0:p.htmlInput)||_p,ae=Vn({elementType:ie,externalSlotProps:m==null?void 0:m.htmlInput,ownerState:F}),{ref:oe}=ae,V=Z(ae,lp),se=nt(oe,C),ce=r.some(e=>e.content[`data-range-position`]!==void 0);return a(()=>{if(!ce||!F.isPickerOpen)return;let{activeBarWidth:e,sectionOffsets:t}=xp(r,j);N.current=[t[0],t[1]],M.current&&(M.current.style.width=`${e}px`)},[r,ce,F.isPickerOpen]),Je(z,x({},B,{children:[d,G(ap,{sectionListRef:w,elements:r,contentEditable:h,tabIndex:g,className:R.sectionsContainer,onFocus:I,onBlur:ne,onInput:_,onPaste:v,onKeyDown:L,slots:{root:re,section:mp,sectionContent:hp,sectionSeparator:gp},slotProps:{root:x({},m==null?void 0:m.input,{ownerState:F}),sectionContent:up(m==null?void 0:m.sectionContent,Yf.sectionContent),sectionSeparator:({separatorPosition:e})=>({className:e===`before`?Yf.sectionBefore:Yf.sectionAfter})}}),u,f?f(x({},P)):null,G(ie,x({name:b,className:R.input,value:o,onChange:s,id:c,"aria-hidden":`true`,tabIndex:-1,readOnly:S,required:P.required,disabled:P.disabled,onFocus:te},V,{ref:se})),ce&&G(vp,{className:R.activeBar,ref:M,ownerState:{sectionOffsets:N.current}})]}))});function Cp(e){return Ne(`MuiPickersOutlinedInput`,e)}var wp=x({},Yf,ke(`MuiPickersOutlinedInput`,[`root`,`notchedOutline`,`input`]));g();var Tp=[`children`,`className`,`label`,`notched`,`shrink`],Ep=q(`fieldset`,{name:`MuiPickersOutlinedInput`,slot:`NotchedOutline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`,borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}}),Dp=q(`span`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`})),Op=q(`legend`,{slot:`internal`,shouldForwardProp:e=>cn(e)&&e!==`notched`})(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function kp(e){let{className:t,label:n,notched:r}=e,i=Z(e,Tp),a=sp();return G(Ep,x({"aria-hidden":!0,className:t},i,{ownerState:a,children:G(Op,{ownerState:a,notched:r,children:n?G(Dp,{children:n}):G(Dp,{className:`notranslate`,children:``})})}))}g();var Ap=[`label`,`autoFocus`,`ownerState`,`classes`,`notched`,`slots`,`slotProps`],jp=q(fp,{name:`MuiPickersOutlinedInput`,slot:`Root`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{padding:`0 14px`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${wp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${wp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${wp.focused} .${wp.notchedOutline}`]:{borderStyle:`solid`,borderWidth:2},[`&.${wp.error} .${wp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${wp.disabled}`]:{[`& .${wp.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},variants:Object.keys((e.vars??e).palette).filter(t=>{var n;return((n=(e.vars??e).palette[t])==null?void 0:n.main)??!1}).map(t=>({props:{inputColor:t},style:{[`&.${wp.focused}:not(.${wp.error}) .${wp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),Mp=q(pp,{name:`MuiPickersOutlinedInput`,slot:`SectionsContainer`})({padding:`16.5px 0`,variants:[{props:{inputSize:`small`},style:{padding:`8.5px 0`}}]}),Np=e=>{let t=B({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Cp,e);return x({},e,t)},Pp=o(function(e,t){let n=cr({props:e,name:`MuiPickersOutlinedInput`}),{label:r,classes:i,notched:a,slots:o,slotProps:s}=n,c=Z(n,Ap),l=Qe(),u=Np(i);return G(Sp,x({},c,{slots:x({root:jp,input:Mp},o),slotProps:s,renderSuffix:e=>{let t=a===void 0?!!(e.adornedStart||e.focused||e.filled):a;return G(kp,{shrink:t,notched:t,className:u.notchedOutline,label:r!=null&&r!==``&&l!=null&&l.required?Je(y,{children:[r,` `,`*`]}):r})},label:r,classes:u,ref:t}))});Pp.muiName=`Input`;function Fp(e){return Ne(`MuiPickersFilledInput`,e)}var Ip=x({},Yf,ke(`MuiPickersFilledInput`,[`root`,`underline`,`input`]));g();var Lp=[`label`,`autoFocus`,`disableUnderline`,`hiddenLabel`,`classes`,`slots`,`slotProps`],Rp=q(fp,{name:`MuiPickersFilledInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ip.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ip.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>{var n;return{props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t])==null?void 0:n.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Ip.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Ip.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Ip.disabled}, .${Ip.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ip.disabled}:before`]:{borderBottomStyle:`dotted`}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),zp=q(pp,{name:`MuiPickersFilledInput`,slot:`sectionsContainer`,shouldForwardProp:e=>cn(e)&&e!==`hiddenLabel`})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:`small`},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:`small`},style:{paddingTop:8,paddingBottom:9}}]}),Bp=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,n&&`underline`],input:[`input`]},Fp,e);return x({},e,r)},Vp=o(function(e,t){let n=cr({props:e,name:`MuiPickersFilledInput`}),{label:r,disableUnderline:i=!1,hiddenLabel:a=!1,classes:o,slots:s,slotProps:c}=n,l=Z(n,Lp),u=sp(),d=x({},u,{inputHasUnderline:!i}),f=Bp(o,d);return G(Sp,x({},l,{slots:x({root:Rp,input:zp},s),slotProps:x({},c,{root:x({disableUnderline:i},c==null?void 0:c.root),input:x({hiddenLabel:a},c==null?void 0:c.input)}),label:r,classes:f,ref:t,ownerState:d}))});Vp.muiName=`Input`;function Hp(e){return Ne(`MuiPickersFilledInput`,e)}var Up=x({},Yf,ke(`MuiPickersInput`,[`root`,`underline`,`input`]));g();var Wp=[`label`,`autoFocus`,`disableUnderline`,`ownerState`,`classes`,`slots`,`slotProps`],Gp=q(fp,{name:`MuiPickersInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:`red`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Up.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Up.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Up.disabled}, .${Up.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Up.disabled}:before`]:{borderBottomStyle:`dotted`}}}]}}),Kp=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,!n&&`underline`],input:[`input`]},Hp,e);return x({},e,r)},qp=o(function(e,t){let n=cr({props:e,name:`MuiPickersInput`}),{label:r,disableUnderline:i=!1,classes:a,slots:o,slotProps:s}=n,c=Z(n,Wp),l=sp(),u=x({},l,{inputHasUnderline:!i}),d=Kp(a,u);return G(Sp,x({},c,{slots:x({root:Gp},o),slotProps:x({},s,{root:x({disableUnderline:i},s==null?void 0:s.root)}),ownerState:u,label:r,classes:d,ref:t}))});qp.muiName=`Input`,g();var Jp=`onFocus.onBlur.className.classes.color.disabled.error.variant.required.hiddenLabel.inputRef.sectionListRef.elements.areAllSectionsEmpty.onClick.onMouseDown.onKeyDown.onKeyUp.onPaste.onInput.endAdornment.startAdornment.tabIndex.contentEditable.focused.value.onChange.fullWidth.id.name.helperText.label.slots.slotProps.data-active-range-position`.split(`.`),Yp={standard:qp,filled:Vp,outlined:Pp},Xp=q(mt,{name:`MuiPickersTextField`,slot:`Root`})({maxWidth:`100%`}),Zp=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:i}=t;return B({root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`required`]},Kf,e)},Qp=o(function(e,t){let n=cr({props:e,name:`MuiPickersTextField`}),{onFocus:r,onBlur:i,className:a,classes:o,color:s=`primary`,disabled:c=!1,error:u=!1,variant:d=`outlined`,required:f=!1,hiddenLabel:m=!1,inputRef:h,sectionListRef:g,elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onPaste:w,onInput:T,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,focused:A,value:j,onChange:M,fullWidth:N,id:ee,name:P,helperText:F,label:I,slots:te,slotProps:L,"data-active-range-position":ne}=n,R=Z(n,Jp),z=l(null),B=nt(t,z),re=Le(ee),ie=F&&re?`${re}-helper-text`:void 0,ae=I&&re?`${re}-label`:void 0,oe=L==null?void 0:L.input,V=L==null?void 0:L.inputLabel,se=Gf({disabled:n.disabled,required:n.required,readOnly:oe==null?void 0:oe.readOnly}),ce=p(()=>x({},se,{isFieldValueEmpty:v,isFieldFocused:A??!1,hasFieldError:u??!1,inputSize:n.size??`medium`,inputColor:s??`primary`,isInputInFullWidth:N??!1,hasStartAdornment:!!(D??(oe==null?void 0:oe.startAdornment)),hasEndAdornment:!!(E??(oe==null?void 0:oe.endAdornment)),inputHasLabel:!!I,isLabelShrunk:!!(V!=null&&V.shrink)}),[se,v,A,u,n.size,s,N,D,E,oe==null?void 0:oe.startAdornment,oe==null?void 0:oe.endAdornment,I,V==null?void 0:V.shrink]),H=Zp(o,ce),U=(te==null?void 0:te.input)??Yp[d],le=(te==null?void 0:te.root)??Xp,ue=(te==null?void 0:te.inputLabel)??Se,de=(te==null?void 0:te.formHelperText)??_t,fe={};d===`outlined`?(V&&V.shrink!==void 0&&(fe.notched=V.shrink),fe.label=I):d===`filled`&&(fe.hiddenLabel=m);let pe=Vn({elementType:le,externalSlotProps:L==null?void 0:L.root,externalForwardedProps:x({},R,{className:a}),additionalProps:{ref:B,focused:A,disabled:c,variant:d,error:u,color:s,fullWidth:N,required:f},className:H.root,ownerState:ce});return G(op.Provider,{value:ce,children:Je(le,x({},pe,{children:[I!=null&&I!==``&&G(ue,x({htmlFor:re,id:ae},V,{children:I})),G(U,x({elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onInput:T,onPaste:w,onFocus:r,onBlur:i,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,value:j,onChange:M,id:re,fullWidth:N,inputRef:h,sectionListRef:g,label:I,name:P,role:`group`,"aria-labelledby":ae,"aria-describedby":ie,"aria-live":ie?`polite`:void 0,"data-active-range-position":ne},fe,oe,{slots:x({},oe==null?void 0:oe.slots,(te==null?void 0:te.htmlInput)!==void 0&&{htmlInput:te.htmlInput}),slotProps:x({},oe==null?void 0:oe.slotProps,(L==null?void 0:L.htmlInput)!==void 0&&{htmlInput:L.htmlInput})})),F&&G(de,x({id:ie},L==null?void 0:L.formHelperText,{children:F}))]}))})});g();var $p=[`readOnly`,`onClear`,`clearable`,`clearButtonPosition`,`openPickerButtonPosition`,`openPickerAriaLabel`,`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],em=[`ownerState`],tm=[`ownerState`],nm=[`ownerState`],rm=[`ownerState`],im=[`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],am=e=>{var t;let n=e,{readOnly:r,onClear:i,clearable:a,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,InputProps:l,inputProps:u,InputLabelProps:d,FormHelperTextProps:f}=n,p=Z(n,$p);return{clearable:a,onClear:i,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,textFieldProps:x({},p,{slotProps:x({},p==null?void 0:p.slotProps,{input:x({},p==null||(t=p.slotProps)==null?void 0:t.input,{readOnly:r})})})}},om=v({slots:{},slotProps:{},inputRef:void 0});function sm(e){var t;let{fieldResponse:n,defaultOpenPickerIcon:r}=e,i=Ac(),a=Bl(),o=b(om),{textFieldProps:s,onClear:c,clearable:l,openPickerAriaLabel:u,clearButtonPosition:d=`end`,openPickerButtonPosition:f=`end`}=am(n),p=Gf(s),m=Y(e=>{e.preventDefault(),a==null||a.setOpen(!0)}),h=a?a.triggerStatus:`hidden`,g=l?d:null,_=h===`hidden`?null:f,v=o.slots.textField??Qp,y=o.slots.inputAdornment??Nn,S=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`start`},ownerState:x({},p,{position:`start`})}),em),C=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`end`},ownerState:x({},p,{position:`end`})}),tm),w=o.slots.openPickerButton??mn,T=Z(Vn({elementType:w,externalSlotProps:o.slotProps.openPickerButton,additionalProps:{disabled:h===`disabled`,onClick:m,"aria-label":u,"data-mui-picker-open-button":`true`,edge:s.variant!==`standard`&&_},ownerState:p}),nm),E=o.slots.openPickerIcon??r,D=Vn({elementType:E,externalSlotProps:o.slotProps.openPickerIcon,ownerState:p}),O=o.slots.clearButton??mn,k=Z(Vn({elementType:O,externalSlotProps:o.slotProps.clearButton,className:`clearButton`,additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:n.disabled||n.readOnly,edge:s.variant!==`standard`&&g!==_&&g},ownerState:p}),rm),A=o.slots.clearIcon??au,j=Vn({elementType:A,externalSlotProps:o.slotProps.clearIcon,additionalProps:{fontSize:`small`},ownerState:p});s.ref=nt(s.ref,a==null?void 0:a.rootRef);let M=(t=s.slotProps)==null?void 0:t.input,N={},ee=nt(M==null?void 0:M.ref,a==null?void 0:a.triggerRef);return a&&(N.ref=ee),!(M!=null&&M.startAdornment)&&(g===`start`||_===`start`)&&(N.startAdornment=Je(y,x({},S,{children:[_===`start`&&G(w,x({},T,{children:G(E,x({},D))})),g===`start`&&G(O,x({},k,{children:G(A,x({},j))}))]}))),!(M!=null&&M.endAdornment)&&(g===`end`||_===`end`)&&(N.endAdornment=Je(y,x({},C,{children:[g===`end`&&G(O,x({},k,{children:G(A,x({},j))})),_===`end`&&G(w,x({},T,{children:G(E,x({},D))}))]}))),!N.endAdornment&&!N.startAdornment&&o.slots.inputAdornment&&(N.endAdornment=G(y,x({},C))),g!=null&&(s.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s.sx)?s.sx:[s.sx]]),s.slotProps=x({},s.slotProps,{input:x({},M,N)}),G(v,x({},s))}function cm(e,t){return e?t?n=>x({},An(t,n),An(e,n)):e:t}function lm(e){let{ref:t,externalForwardedProps:n,slotProps:r}=e,i=b(om),a=Bl(),o=Gf(n),s=n??{},{InputProps:c,inputProps:l,InputLabelProps:u,FormHelperTextProps:d}=s,f=Z(s,im),p=Vn({elementType:Qp,externalSlotProps:cm(i.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:f,additionalProps:{ref:t,sx:a==null?void 0:a.rootSx,label:a==null?void 0:a.label,name:a==null?void 0:a.name,className:a==null?void 0:a.rootClassName,inputRef:i.inputRef},ownerState:o});if(a&&a.keepOpenDuringFieldFocus&&a.triggerStatus===`enabled`&&!a.open&&!a.readOnly&&!a.disabled){let e=p.onFocus,t=p.onMouseDown,n=e=>{var t;let n=e.nativeEvent??e,r=n==null||(t=n.composedPath)==null?void 0:t.call(n);if(Array.isArray(r)){for(let e of r)if(e&&e.getAttribute&&e.getAttribute(`data-mui-picker-open-button`)===`true`)return!0}let i=e.target;return i&&i.closest?!!i.closest(`[data-mui-picker-open-button="true"]`):!1};p.onFocus=t=>{e==null||e(t),!t.isDefaultPrevented()&&!n(t)&&a.setOpen(!0)},p.onMouseDown=e=>{t==null||t(e),!e.isDefaultPrevented()&&!n(e)&&a.setOpen(!0)}}return p}function um(e){let{slots:t={},slotProps:n={},inputRef:r,children:i}=e,a=p(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return G(om.Provider,{value:a,children:i})}g();var dm=[`slots`,`slotProps`],fm=o(function(e,t){let n=cr({props:e,name:`MuiDateField`}),{slots:r,slotProps:i}=n,a=Z(n,dm),o=Wf(lm({slotProps:i,ref:t,externalForwardedProps:a}));return G(um,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(sm,{fieldResponse:o,defaultOpenPickerIcon:tu})})}),pm=e=>kf({manager:If(e),props:e});g();var mm=[`slots`,`slotProps`],hm=o(function(e,t){let n=cr({props:e,name:`MuiTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,mm),o=pm(lm({slotProps:i,ref:t,externalForwardedProps:a}));return G(um,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(sm,{fieldResponse:o,defaultOpenPickerIcon:nu})})}),gm=e=>kf({manager:Bf(),props:e});g();var _m=[`slots`,`slotProps`],vm=o(function(e,t){let n=cr({props:e,name:`MuiDateTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,_m),o=gm(lm({slotProps:i,ref:t,externalForwardedProps:a}));return G(um,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(sm,{fieldResponse:o,defaultOpenPickerIcon:tu})})});g();var ym=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{let c=kc();return f(l=>uf({adapter:c,value:l,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o}})!==null,[c,e,t,n,r,i,a,o,s])};g();var bm=(e,t)=>(n,r)=>{switch(r.type){case`setVisibleDate`:return x({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case`changeMonthTimezone`:{let e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let i=t.setTimezone(n.currentMonth,e);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),x({},n,{currentMonth:i})}case`finishMonthSwitchingAnimation`:return x({},n,{isMonthSwitchingAnimating:!1});default:throw Error(`missing support`)}},xm=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,maxDate:o,minDate:s,onMonthChange:u,onYearChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:g,getCurrentMonthFromVisibleDate:_}=e,v=kc(),y=l(bm(!!m,v)).current,b=p(()=>pd.getInitialReferenceValue({value:t,adapter:v,timezone:g,props:e,referenceDate:n,granularity:cd.day}),[n,g]),[x,S]=c(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:v.setDate(b,1),slideDirection:`left`}),C=ym({shouldDisableDate:h,minDate:s,maxDate:o,disableFuture:r,disablePast:i,timezone:g});return a(()=>{S({type:`changeMonthTimezone`,newTimezone:v.getTimezone(b)})},[b,v]),{referenceDate:b,calendarState:x,setVisibleDate:Y(({target:e,reason:t})=>{if(t===`cell-interaction`&&x.focusedDay!=null&&v.isSameDay(e,x.focusedDay))return;let n=t===`cell-interaction`,a,c;if(t===`cell-interaction`)a=_(e,x.currentMonth),c=e;else if(a=v.isSameMonth(e,x.currentMonth)?x.currentMonth:v.startOfMonth(e),c=e,C(c)){let t=v.startOfMonth(e),n=v.endOfMonth(e);c=Vc({adapter:v,date:c,minDate:v.isBefore(s,t)?t:s,maxDate:v.isAfter(o,n)?n:o,disablePast:i,disableFuture:r,isDateDisabled:C,timezone:g})}let l=!v.isSameMonth(x.currentMonth,a),f=!v.isSameYear(x.currentMonth,a);l&&(u==null||u(a)),f&&(d==null||d(v.startOfYear(a))),S({type:`setVisibleDate`,month:a,direction:v.isAfterDay(a,x.currentMonth)?`left`:`right`,focusedDay:x.focusedDay!=null&&c!=null&&v.isSameDay(c,x.focusedDay)?x.focusedDay:c,skipAnimation:n})}),isDateDisabled:C,onMonthSwitchingAnimationEnd:f(()=>{S({type:`finishMonthSwitchingAnimation`})},[])}};function Sm(e,t){return Sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sm(e,t)}function Cm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Sm(e,t)}function wm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Tm(e,t){e.classList?e.classList.add(t):wm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Em(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Dm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Em(e.className,t):e.setAttribute(`class`,Em(e.className&&e.className.baseVal||``,t))}var Om={disabled:!1},km=function(e){return e.scrollTop};g();var Am=`unmounted`,jm=`exited`,Mm=`entering`,Nm=`entered`,Pm=`exiting`,Fm=function(e){Cm(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=jm,r.appearStatus=Mm):o=Nm:o=t.unmountOnExit||t.mountOnEnter?Am:jm,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:jm}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Mm):(n===`entering`||n===`entered`)&&(t=Pm)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this);n&&km(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Am})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[P.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Om.disabled){this.safeSetState({status:Nm},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Mm},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Nm},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:P.findDOMNode(this);if(!t||Om.disabled){this.safeSetState({status:jm},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Pm},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:jm},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Z(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return _.createElement(vn.Provider,{value:null},typeof n==`function`?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);Fm.contextType=vn,Fm.propTypes={};function Im(){}Fm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Im,onEntering:Im,onEntered:Im,onExit:Im,onExiting:Im,onExited:Im},Fm.UNMOUNTED=Am,Fm.EXITED=jm,Fm.ENTERING=Mm,Fm.ENTERED=Nm,Fm.EXITING=Pm,g();var Lm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Tm(e,t)})},Rm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Dm(e,t)})},zm=function(e){Cm(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&km(e),r&&(this.appliedClasses[t][n]=r,Lm(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Rm(e,r),i&&Rm(e,i),a&&Rm(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Z(e,[`classNames`]);return _.createElement(Fm,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);zm.defaultProps={classNames:``},zm.propTypes={};function Bm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}g();function Vm(e,t){var n=function(e){return t&&C(e)?t(e):e},r=Object.create(null);return e&&S.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Hm(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Um(e,t,n){return n[t]==null?e.props[t]:n[t]}function Wm(e,t){return Vm(e.children,function(n){return T(n,{onExited:t.bind(null,n),in:!0,appear:Um(n,`appear`,e),enter:Um(n,`enter`,e),exit:Um(n,`exit`,e)})})}function Gm(e,t,n){var r=Vm(e.children),i=Hm(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(C(o)){var s=a in t,c=a in r,l=t[a],u=C(l)&&!l.props.in;c&&(!s||u)?i[a]=T(o,{onExited:n.bind(null,o),in:!0,exit:Um(o,`exit`,e),enter:Um(o,`enter`,e)}):!c&&s&&!u?i[a]=T(o,{in:!1}):c&&s&&C(l)&&(i[a]=T(o,{onExited:n.bind(null,o),in:l.props.in,exit:Um(o,`exit`,e),enter:Um(o,`enter`,e)}))}}),i}g();var Km=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},qm={component:`div`,childFactory:function(e){return e}},Jm=function(e){Cm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Bm(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Wm(e,r):Gm(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Vm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Z(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Km(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?_.createElement(vn.Provider,{value:i},a):_.createElement(vn.Provider,{value:i},_.createElement(t,r,a))},t}(_.Component);Jm.propTypes={},Jm.defaultProps=qm;var Ym=e=>Ne(`MuiPickersFadeTransitionGroup`,e),Xm=ke(`MuiPickersFadeTransitionGroup`,[`root`]);g();var Zm=[`children`],Qm=e=>B({root:[`root`]},Ym,e),$m=q(Jm,{name:`MuiPickersFadeTransitionGroup`,slot:`Root`})({display:`block`,position:`relative`});function eh(e){let t=cr({props:e,name:`MuiPickersFadeTransitionGroup`}),{className:n,reduceAnimations:r,transKey:i,classes:a}=t,{children:o}=t,s=Z(t,Zm),c=Qm(a),l=ir();return r?o:G($m,{className:Ve(c.root,n),ownerState:s,children:G(rn,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:o},i)})}var th=e=>Ne(`MuiPickersSlideTransition`,e),nh=ke(`MuiPickersSlideTransition`,[`root`,`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`]);g();var rh=[`children`,`className`,`reduceAnimations`,`slideDirection`,`transKey`,`classes`],ih=(e,t)=>{let{slideDirection:n}=t,r={root:[`root`],exit:[`slideExit`],enterActive:[`slideEnterActive`],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return B(r,th,e)},ah=[`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`],oh=q(Jm,{name:`MuiPickersSlideTransition`,slot:`Root`,overridesResolver:(e,t)=>ah.reduce((e,n)=>(e.push({[`.${nh[n]}`]:t[n]}),e),[t.root])})(({theme:e})=>{let t=e.transitions.create(`transform`,{duration:e.transitions.duration.complex,easing:`cubic-bezier(0.35, 0.8, 0.4, 1)`});return{display:`block`,position:`relative`,overflowX:`hidden`,"& > *":{position:`absolute`,top:0,right:0,left:0},[`& .${nh[`slideEnter-left`]}`]:{willChange:`transform`,transform:`translate(100%)`,zIndex:1},[`& .${nh[`slideEnter-right`]}`]:{willChange:`transform`,transform:`translate(-100%)`,zIndex:1},[`& .${nh.slideEnterActive}`]:{transform:`translate(0%)`,transition:t},[`& .${nh.slideExit}`]:{transform:`translate(0%)`},[`& .${nh[`slideExitActiveLeft-left`]}`]:{willChange:`transform`,transform:`translate(-100%)`,transition:t,zIndex:0},[`& .${nh[`slideExitActiveLeft-right`]}`]:{willChange:`transform`,transform:`translate(100%)`,transition:t,zIndex:0}}});function sh(e){let t=cr({props:e,name:`MuiPickersSlideTransition`}),{children:n,className:r,reduceAnimations:i,slideDirection:a,transKey:o,classes:s}=t,c=Z(t,rh),{ownerState:l}=su(),u=x({},l,{slideDirection:a}),d=ih(s,u),f=ir();if(i)return G(`div`,{role:`none`,className:Ve(d.root,r),children:n});let p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return G(oh,{className:Ve(d.root,r),childFactory:e=>T(e,{classNames:p}),role:`none`,ownerState:u,children:G(zm,x({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},c,{children:n}),o)})}var ch=e=>Ne(`MuiDayCalendar`,e),lh=ke(`MuiDayCalendar`,[`root`,`header`,`weekDayLabel`,`loadingContainer`,`slideTransition`,`monthContainer`,`weekContainer`,`weekNumberLabel`,`weekNumber`]);g();var uh=[`parentProps`,`day`,`focusedDay`,`selectedDays`,`isDateDisabled`,`currentMonthNumber`,`isViewFocused`],dh=[`ownerState`],fh=e=>B({root:[`root`],header:[`header`],weekDayLabel:[`weekDayLabel`],loadingContainer:[`loadingContainer`],slideTransition:[`slideTransition`],monthContainer:[`monthContainer`],weekContainer:[`weekContainer`],weekNumberLabel:[`weekNumberLabel`],weekNumber:[`weekNumber`]},ch,e),ph=240,mh=q(`div`,{name:`MuiDayCalendar`,slot:`Root`})({}),hh=q(`div`,{name:`MuiDayCalendar`,slot:`Header`})({display:`flex`,justifyContent:`center`,alignItems:`center`}),gh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekDayLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.secondary})),_h=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumberLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.disabled})),vh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumber`})(({theme:e})=>x({},e.typography.caption,{width:36,height:36,padding:0,margin:`0 2px`,color:(e.vars||e).palette.text.disabled,fontSize:`0.75rem`,alignItems:`center`,justifyContent:`center`,display:`inline-flex`})),yh=q(`div`,{name:`MuiDayCalendar`,slot:`LoadingContainer`})({display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:ph}),bh=q(sh,{name:`MuiDayCalendar`,slot:`SlideTransition`})({minHeight:ph}),xh=q(`div`,{name:`MuiDayCalendar`,slot:`MonthContainer`})({overflow:`hidden`}),Sh=q(`div`,{name:`MuiDayCalendar`,slot:`WeekContainer`})({margin:`2px 0`,display:`flex`,justifyContent:`center`});function Ch(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=e,c=Z(e,uh),{currentMonth:l,disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:m,slots:h,slotProps:g,timezone:_}=t,v=kc(),y=Zl(_),b=r!=null&&v.isSameDay(n,r),S=s&&b,C=i.some(e=>v.isSameDay(e,n)),w=v.isSameDay(n,y),T=p(()=>u||a(n),[u,a,n]),E=p(()=>v.getMonth(n)!==o,[v,n,o]),D=tf({day:n,selected:C,disabled:T,today:w,outsideCurrentMonth:E,disableHighlightToday:d,showDaysOutsideCurrentMonth:m}),O=(h==null?void 0:h.day)??sf,k=Z(Vn({elementType:O,externalSlotProps:g==null?void 0:g.day,additionalProps:x({disableHighlightToday:d,showDaysOutsideCurrentMonth:m,role:`gridcell`,isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:x({},D,{day:n,isDayDisabled:T,isDaySelected:C})}),dh),A=p(()=>{let e=v.startOfMonth(l);return m?v.isSameDay(n,v.startOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]),j=p(()=>{let e=v.endOfMonth(l);return m?v.isSameDay(n,v.endOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]);return G(O,x({},k,{day:n,disabled:T,autoFocus:!E&&S,today:w,outsideCurrentMonth:E,isFirstVisibleCell:A,isLastVisibleCell:j,selected:C,tabIndex:b?0:-1,"aria-selected":C,"aria-current":w?`date`:void 0}))}function wh(e){let t=cr({props:e,name:`MuiDayCalendar`}),n=kc(),{onFocusedDayChange:r,className:i,classes:a,currentMonth:o,selectedDays:s,focusedDay:c,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:g=()=>G(`span`,{children:`…`}),slideDirection:_,TransitionProps:v,disablePast:y,disableFuture:b,minDate:S,maxDate:C,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:D=e=>n.format(e,`weekdayShort`).charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:k,gridLabelId:A,displayWeekNumber:j,fixedWeekNumber:M,timezone:N}=t,ee=Zl(N),P=fh(a),F=dn(),I=+!!j,te=ym({shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,minDate:S,maxDate:C,disablePast:y,disableFuture:b,timezone:N}),L=Ac(),ne=Y(e=>{f||u(e)}),R=e=>{te(e)||(r(e),k==null||k(!0))},z=Y((e,t)=>{switch(e.key){case`ArrowUp`:R(n.addDays(t,-7)),e.preventDefault();break;case`ArrowDown`:R(n.addDays(t,7)),e.preventDefault();break;case`ArrowLeft`:{let r=n.addDays(t,F?1:-1),i=n.addMonths(t,F?1:-1),a=Vc({adapter:n,date:r,minDate:F?r:n.startOfMonth(i),maxDate:F?n.endOfMonth(i):r,isDateDisabled:te,timezone:N});R(a||r),e.preventDefault();break}case`ArrowRight`:{let r=n.addDays(t,F?-1:1),i=n.addMonths(t,F?-1:1),a=Vc({adapter:n,date:r,minDate:F?n.startOfMonth(i):r,maxDate:F?r:n.endOfMonth(i),isDateDisabled:te,timezone:N});R(a||r),e.preventDefault();break}case`Home`:R(n.startOfWeek(t)),e.preventDefault();break;case`End`:R(n.endOfWeek(t)),e.preventDefault();break;case`PageUp`:R(n.addMonths(t,1)),e.preventDefault();break;case`PageDown`:R(n.addMonths(t,-1)),e.preventDefault();break;case`Enter`:case` `:ne(t),e.preventDefault()}}),B=Y((e,t)=>R(t)),re=Y((e,t)=>{c!=null&&n.isSameDay(c,t)&&(k==null||k(!1))}),ie=n.getMonth(o),ae=n.getYear(o),oe=p(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),V=`${ae}-${ie}`,se=p(()=>m(),[V]),ce=p(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;M&&e.length<M;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<M&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,M,n]);return Je(mh,{role:`grid`,"aria-labelledby":A,"aria-colcount":I+7,"aria-rowcount":ce.length+1,className:P.root,children:[Je(hh,{role:`row`,"aria-rowindex":1,className:P.header,children:[j&&G(_h,{variant:`caption`,role:`columnheader`,"aria-colindex":1,"aria-label":L.calendarWeekNumberHeaderLabel,className:P.weekNumberLabel,children:L.calendarWeekNumberHeaderText}),Zc(n,ee).map((e,t)=>G(gh,{variant:`caption`,role:`columnheader`,"aria-colindex":I+t+1,"aria-label":n.format(e,`weekday`),className:P.weekDayLabel,children:D(e)},t.toString()))]}),l?G(yh,{className:P.loadingContainer,children:g()}):G(bh,x({transKey:V,onExited:d,reduceAnimations:h,slideDirection:_,className:Ve(i,P.slideTransition)},v,{nodeRef:se,children:G(xh,{ref:se,role:`rowgroup`,className:P.monthContainer,children:ce.map((e,r)=>Je(Sh,{role:`row`,className:P.weekContainer,"aria-rowindex":r+2,children:[j&&G(vh,{className:P.weekNumber,role:`rowheader`,"aria-colindex":1,"aria-label":L.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:L.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>G(Ch,{parentProps:t,day:e,selectedDays:oe,isViewFocused:O,focusedDay:c,onKeyDown:z,onFocus:B,onBlur:re,onDaySelect:ne,isDateDisabled:te,currentMonthNumber:ie,"aria-colindex":I+n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Th(e){return Ne(`MuiMonthCalendar`,e)}var Eh=ke(`MuiMonthCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Dh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Oh=(e,t)=>{let n={button:[`button`,t.isMonthDisabled&&`disabled`,t.isMonthSelected&&`selected`]};return B(n,Th,e)},kh=q(`button`,{name:`MuiMonthCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Eh.disabled}`]:t.disabled},{[`&.${Eh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Eh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Eh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Ah=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Dh),m=l(null),{ownerState:h}=su(),g=x({},h,{isMonthDisabled:r,isMonthSelected:i}),_=Oh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.monthButton)??kh,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.monthButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var jh=[`autoFocus`,`className`,`currentMonth`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`shouldDisableMonth`,`readOnly`,`disableHighlightToday`,`onMonthFocus`,`hasFocus`,`onFocusedViewChange`,`monthsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Mh=e=>B({root:[`root`]},Th,e);function Nh(e,t){let n=cr({props:e,name:t}),r=Ff(n);return x({},n,r,{monthsPerRow:n.monthsPerRow??3})}var Ph=(e,t,n,r,i)=>!!(e===t&&r&&i.isSameYear(n,r)),Fh=q(`div`,{name:`MuiMonthCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`monthsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:16,padding:`8px 0`,width:320,boxSizing:`border-box`,variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),Ih=o(function(e,t){let n=Nh(e,`MuiMonthCalendar`),{autoFocus:r,className:i,currentMonth:o,classes:s,value:c,defaultValue:l,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,shouldDisableMonth:b,readOnly:S,onMonthFocus:C,hasFocus:w,onFocusedViewChange:T,monthsPerRow:E,timezone:D,gridLabelId:O,slots:k,slotProps:A}=n,j=Z(n,jh),{value:M,handleValueChange:N,timezone:ee}=sd({name:`MonthCalendar`,timezone:D,value:c,defaultValue:l,referenceDate:d,onChange:y,valueManager:pd}),P=Zl(ee),F=dn(),I=kc(),{ownerState:te}=su(),L=p(()=>pd.getInitialReferenceValue({value:M,adapter:I,props:n,timezone:ee,referenceDate:d,granularity:cd.month}),[]),ne=Mh(s),R=p(()=>I.getMonth(P),[I,P]),z=p(()=>M==null?null:I.getMonth(M),[M,I]),[B,re]=u(()=>z||I.getMonth(L)),[ie,ae]=$t({name:`MonthCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),oe=Y(e=>{ae(e),T&&T(e)}),V=f(e=>{let t=I.startOfMonth(g&&I.isAfter(P,v)?P:v),n=I.startOfMonth(h&&I.isBefore(P,_)?P:_),r=I.startOfMonth(e);return I.isBefore(r,t)||I.isAfter(r,n)?!0:b?b(r):!1},[h,g,_,v,P,b,I]),se=Y((e,t)=>{if(S)return;let n=(M&&o&&!I.isSameYear(M,o)?I.setYear(M,I.getYear(o)):M)??o??L,r=I.setMonth(n,t);N(r)}),ce=Y(e=>{V(I.setMonth(M??o??L,e))||(re(e),oe(!0),C&&C(e))});a(()=>{re(e=>z!==null&&e!==z?z:e)},[z]);let H=Y((e,t)=>{switch(e.key){case`ArrowUp`:ce((12+t-3)%12),e.preventDefault();break;case`ArrowDown`:ce((12+t+3)%12),e.preventDefault();break;case`ArrowLeft`:ce((12+t+(F?1:-1))%12),e.preventDefault();break;case`ArrowRight`:ce((12+t+(F?-1:1))%12),e.preventDefault();break;case`Enter`:case` `:se(e,t),e.preventDefault()}}),U=Y((e,t)=>{ce(t)}),le=Y((e,t)=>{B===t&&oe(!1)});return G(Fh,x({ref:t,className:Ve(ne.root,i),ownerState:te,role:`radiogroup`,"aria-labelledby":O,monthsPerRow:E},j,{children:Gc(I,o??M??L).map(e=>{let t=I.getMonth(e),n=I.format(e,`monthShort`),r=I.format(e,`month`),i=Ph(t,z,e,M,I),a=m||V(e);return G(Ah,{selected:i,value:t,onClick:se,onKeyDown:H,autoFocus:ie&&t===B,disabled:a,tabIndex:t===B&&!a?0:-1,onFocus:U,onBlur:le,"aria-current":Ph(t,R,e,P,I)?`date`:void 0,"aria-label":r,slots:k,slotProps:A,classes:s,children:n},n)})}))});function Lh(e){return Ne(`MuiYearCalendar`,e)}var Rh=ke(`MuiYearCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var zh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Bh=(e,t)=>{let n={button:[`button`,t.isYearDisabled&&`disabled`,t.isYearSelected&&`selected`]};return B(n,Lh,e)},Vh=q(`button`,{name:`MuiYearCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Rh.disabled}`]:t.disabled},{[`&.${Rh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.focusOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Rh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Rh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Hh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,zh),m=l(null),{ownerState:h}=su(),g=x({},h,{isYearDisabled:r,isYearSelected:i}),_=Bh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.yearButton)??Vh,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.yearButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var Uh=[`autoFocus`,`className`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`readOnly`,`shouldDisableYear`,`disableHighlightToday`,`onYearFocus`,`hasFocus`,`onFocusedViewChange`,`yearsOrder`,`yearsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Wh=e=>B({root:[`root`]},Lh,e);function Gh(e,t){let n=cr({props:e,name:t}),r=Ff(n);return x({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??`asc`})}var Kh=q(`div`,{name:`MuiYearCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`yearsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:12,padding:`6px 0`,overflowY:`auto`,height:`100%`,width:320,maxHeight:280,boxSizing:`border-box`,position:`relative`,variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:`0 2px`}}]}),qh=q(`div`,{name:`MuiYearCalendar`,slot:`ButtonFiller`})({height:36,width:72}),Jh=o(function(e,t){let n=Gh(e,`MuiYearCalendar`),{autoFocus:r,className:i,classes:o,value:s,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,readOnly:b,shouldDisableYear:S,onYearFocus:C,hasFocus:w,onFocusedViewChange:T,yearsOrder:E,yearsPerRow:D,timezone:O,gridLabelId:k,slots:A,slotProps:j}=n,M=Z(n,Uh),{value:N,handleValueChange:ee,timezone:P}=sd({name:`YearCalendar`,timezone:O,value:s,defaultValue:c,referenceDate:d,onChange:y,valueManager:pd}),F=Zl(P),I=dn(),te=kc(),{ownerState:L}=su(),ne=p(()=>pd.getInitialReferenceValue({value:N,adapter:te,props:n,timezone:P,referenceDate:d,granularity:cd.year}),[]),R=Wh(o),z=p(()=>te.getYear(F),[te,F]),B=p(()=>N==null?null:te.getYear(N),[N,te]),[re,ie]=u(()=>B||te.getYear(ne)),[ae,oe]=$t({name:`YearCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),V=Y(e=>{oe(e),T&&T(e)}),se=f(e=>{if(g&&te.isBeforeYear(e,F)||h&&te.isAfterYear(e,F)||v&&te.isBeforeYear(e,v)||_&&te.isAfterYear(e,_))return!0;if(!S)return!1;let t=te.startOfYear(e);return S(t)},[h,g,_,v,F,S,te]),ce=Y((e,t)=>{if(b)return;let n=te.setYear(N??ne,t);ee(n)}),H=Y(e=>{se(te.setYear(N??ne,e))||(ie(e),V(!0),C==null||C(e))});a(()=>{ie(e=>B!==null&&e!==B?B:e)},[B]);let U=E===`desc`?D*-1:D*1,le=I&&E===`asc`||!I&&E===`desc`?-1:1,ue=Y((e,t)=>{switch(e.key){case`ArrowUp`:H(t-U),e.preventDefault();break;case`ArrowDown`:H(t+U),e.preventDefault();break;case`ArrowLeft`:H(t-le),e.preventDefault();break;case`ArrowRight`:H(t+le),e.preventDefault();break;case`Enter`:case` `:ce(e,t),e.preventDefault()}}),de=Y((e,t)=>{H(t)}),fe=Y((e,t)=>{re===t&&V(!1)}),pe=l(null),W=nt(t,pe);a(()=>{if(r||pe.current===null)return;let e=pe.current.querySelector(`[tabindex="0"]`);if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=pe.current.clientHeight,a=pe.current.scrollTop,o=n+t;t>i||n<a||(pe.current.scrollTop=o-i/2-t/2)},[r]);let me=te.getYearRange([v,_]);E===`desc`&&me.reverse();let he=D-me.length%D;return he===D&&(he=0),Je(Kh,x({ref:W,className:Ve(R.root,i),ownerState:L,role:`radiogroup`,"aria-labelledby":k,yearsPerRow:D},M,{children:[me.map(e=>{let t=te.getYear(e),n=t===B,r=m||se(e);return G(Hh,{selected:n,value:t,onClick:ce,onKeyDown:ue,autoFocus:ae&&t===re,disabled:r,tabIndex:t===re&&!r?0:-1,onFocus:de,onBlur:fe,"aria-current":z===t?`date`:void 0,slots:A,slotProps:j,classes:o,children:te.format(e,`year`)},te.format(e,`year`))}),Array.from({length:he},(e,t)=>G(qh,{},t))]}))}),Yh=e=>Ne(`MuiPickersCalendarHeader`,e),Xh=ke(`MuiPickersCalendarHeader`,[`root`,`labelContainer`,`label`,`switchViewButton`,`switchViewIcon`]);g();var Zh=[`slots`,`slotProps`,`currentMonth`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onMonthChange`,`onViewChange`,`view`,`reduceAnimations`,`views`,`labelId`,`className`,`classes`,`timezone`,`format`],Qh=[`ownerState`],$h=e=>B({root:[`root`],labelContainer:[`labelContainer`],label:[`label`],switchViewButton:[`switchViewButton`],switchViewIcon:[`switchViewIcon`]},Yh,e),eg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Root`})({display:`flex`,alignItems:`center`,marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),tg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`LabelContainer`})(({theme:e})=>x({display:`flex`,overflow:`hidden`,alignItems:`center`,cursor:`pointer`,marginRight:`auto`},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),ng=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Label`})({marginRight:6}),rg=q(mn,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewButton`})({marginRight:`auto`,variants:[{props:{view:`year`},style:{[`.${Xh.switchViewIcon}`]:{transform:`rotate(180deg)`}}}]}),ig=q(Ql,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewIcon`})(({theme:e})=>({willChange:`transform`,transition:e.transitions.create(`transform`),transform:`rotate(0deg)`})),ag=o(function(e,t){let n=Ac(),r=kc(),i=cr({props:e,name:`MuiPickersCalendarHeader`}),{slots:a,slotProps:o,currentMonth:s,disabled:c,disableFuture:l,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:_,labelId:v,className:y,classes:b,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,w=Z(i,Zh),{ownerState:T}=su(),E=$h(b),D=(a==null?void 0:a.switchViewButton)??rg,O=Vn({elementType:D,externalSlotProps:o==null?void 0:o.switchViewButton,additionalProps:{size:`small`,"aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:x({},T,{view:h}),className:E.switchViewButton}),k=(a==null?void 0:a.switchViewIcon)??ig,A=Z(Vn({elementType:k,externalSlotProps:o==null?void 0:o.switchViewIcon,ownerState:T,className:E.switchViewIcon}),Qh),j=()=>p(r.addMonths(s,1)),M=()=>p(r.addMonths(s,-1)),N=yu(s,{disableFuture:l,maxDate:d,timezone:S}),ee=bu(s,{disablePast:u,minDate:f,timezone:S}),P=()=>{if(!(_.length===1||!m||c)){if(_.length===2)m(_.find(e=>e!==h)||_[0]);else{let e=+(_.indexOf(h)===0);m(_[e])}}};if(_.length===1&&_[0]===`year`)return null;let F=r.formatByString(s,C);return Je(eg,x({},w,{ownerState:T,className:Ve(E.root,y),ref:t,children:[Je(tg,{role:`none`,onClick:P,ownerState:T,"aria-live":`polite`,className:E.labelContainer,children:[G(eh,{reduceAnimations:g,transKey:F,children:G(ng,{id:v,ownerState:T,className:E.label,children:F})}),_.length>1&&!c&&G(D,x({},O,{children:G(k,x({},A))}))]}),G(rn,{in:h===`day`,appear:!g,enter:!g,children:G(hu,{slots:a,slotProps:o,onGoToPrevious:M,isPreviousDisabled:ee,previousLabel:n.previousMonth,onGoToNext:j,isNextDisabled:N,nextLabel:n.nextMonth})})]}))}),og=`@media (prefers-reduced-motion: reduce)`,sg=typeof navigator<`u`&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),cg=sg&&sg[1]?parseInt(sg[1],10):null,lg=sg&&sg[2]?parseInt(sg[2],10):null,ug=cg&&cg<10||lg&&lg<13||!1;function dg(e){let t=he(og,{defaultMatches:!1});return e??(t||ug)}var fg=e=>Ne(`MuiDateCalendar`,e),pg=ke(`MuiDateCalendar`,[`root`,`viewTransitionContainer`]);g();var mg=`autoFocus.onViewChange.value.defaultValue.referenceDate.disableFuture.disablePast.onChange.onYearChange.onMonthChange.reduceAnimations.shouldDisableDate.shouldDisableMonth.shouldDisableYear.view.views.openTo.className.classes.disabled.readOnly.minDate.maxDate.disableHighlightToday.focusedView.onFocusedViewChange.showDaysOutsideCurrentMonth.fixedWeekNumber.dayOfWeekFormatter.slots.slotProps.loading.renderLoading.displayWeekNumber.yearsOrder.yearsPerRow.monthsPerRow.timezone`.split(`.`),hg=e=>B({root:[`root`],viewTransitionContainer:[`viewTransitionContainer`]},fg,e);function gg(e,t){let n=cr({props:e,name:t}),r=dg(n.reduceAnimations),i=Ff(n);return x({},n,i,{loading:n.loading??!1,openTo:n.openTo??`day`,views:n.views??[`year`,`day`],reduceAnimations:r,renderLoading:n.renderLoading??(()=>G(`span`,{children:`…`}))})}var _g=q(Su,{name:`MuiDateCalendar`,slot:`Root`})({display:`flex`,flexDirection:`column`,height:336}),vg=q(eh,{name:`MuiDateCalendar`,slot:`ViewTransitionContainer`})({}),yg=o(function(e,t){let n=kc(),{ownerState:r}=su(),i=Le(),o=gg(e,`MuiDateCalendar`),{autoFocus:s,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:m,disablePast:h,onChange:g,onMonthChange:_,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,view:C,views:w,openTo:T,className:E,classes:D,disabled:O,readOnly:k,minDate:A,maxDate:j,disableHighlightToday:M,focusedView:N,onFocusedViewChange:ee,showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,slots:te,slotProps:L,loading:ne,renderLoading:R,displayWeekNumber:z,yearsOrder:B,yearsPerRow:re,monthsPerRow:ie,timezone:ae}=o,oe=Z(o,mg),{value:V,handleValueChange:se,timezone:ce}=sd({name:`DateCalendar`,timezone:ae,value:u,defaultValue:d,referenceDate:f,onChange:g,valueManager:pd}),{view:H,setView:U,focusedView:le,setFocusedView:ue,goToNextView:de,setValueAndGoToNextView:fe}=vu({view:C,views:w,openTo:T,onChange:se,onViewChange:c,autoFocus:s,focusedView:N,onFocusedViewChange:ee}),{referenceDate:pe,calendarState:W,setVisibleDate:me,isDateDisabled:he,onMonthSwitchingAnimationEnd:ge}=xm({value:V,referenceDate:f,reduceAnimations:v,onMonthChange:_,minDate:A,maxDate:j,shouldDisableDate:y,disablePast:h,disableFuture:m,timezone:ce,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),_e=O&&V||A,ve=O&&V||j,ye=`${i}-grid-label`,be=le!==null,xe=(te==null?void 0:te.calendarHeader)??ag,Se=Vn({elementType:xe,externalSlotProps:L==null?void 0:L.calendarHeader,additionalProps:{views:w,view:H,currentMonth:W.currentMonth,onViewChange:U,onMonthChange:e=>me({target:e,reason:`header-navigation`}),minDate:_e,maxDate:ve,disabled:O,disablePast:h,disableFuture:m,reduceAnimations:v,timezone:ce,labelId:ye},ownerState:r}),Ce=Y(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=he(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),we=Y(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=he(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),Te=Y(e=>se(e&&Bc(n,e,V??pe),`finish`,H));a(()=>{n.isValid(V)&&me({target:V,reason:`controlled-value-change`})},[V]);let Ee=hg(D),De={disablePast:h,disableFuture:m,maxDate:j,minDate:A},Oe={disableHighlightToday:M,readOnly:k,disabled:O,timezone:ce,gridLabelId:ye,slots:te,slotProps:L},ke=l(H);a(()=>{ke.current!==H&&(le===ke.current&&ue(H,!0),ke.current=H)},[le,ue,H]);let Ae=p(()=>[V],[V]);return Je(_g,x({ref:t,className:Ve(Ee.root,E),ownerState:r},oe,{children:[G(xe,x({},Se,{slots:te,slotProps:L})),G(vg,{reduceAnimations:v,className:Ee.viewTransitionContainer,transKey:H,ownerState:r,children:Je(`div`,{children:[H===`year`&&G(Jh,x({},De,Oe,{value:V,onChange:we,shouldDisableYear:S,hasFocus:be,onFocusedViewChange:e=>ue(`year`,e),yearsOrder:B,yearsPerRow:re,referenceDate:pe})),H===`month`&&G(Ih,x({},De,Oe,{currentMonth:W.currentMonth,hasFocus:be,className:E,value:V,onChange:Ce,shouldDisableMonth:b,onFocusedViewChange:e=>ue(`month`,e),monthsPerRow:ie,referenceDate:pe})),H===`day`&&G(wh,x({},W,De,Oe,{onMonthSwitchingAnimationEnd:ge,hasFocus:be,onFocusedDayChange:e=>me({target:e,reason:`cell-interaction`}),reduceAnimations:v,selectedDays:Ae,onSelectedDaysChange:Te,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,onFocusedViewChange:e=>ue(`day`,e),showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,displayWeekNumber:z,loading:ne,renderLoading:R}))]})})]}))}),bg=e=>Ne(`MuiDayCalendarSkeleton`,e),xg=ke(`MuiDayCalendarSkeleton`,[`root`,`week`,`daySkeleton`]);g();var Sg=[`className`,`classes`],Cg=e=>B({root:[`root`],week:[`week`],daySkeleton:[`daySkeleton`]},bg,e),wg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Root`})({alignSelf:`start`}),Tg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Week`})({margin:`2px 0`,display:`flex`,justifyContent:`center`}),Eg=q(ee,{name:`MuiDayCalendarSkeleton`,slot:`DaySkeleton`})({margin:`0 2px`,'&[data-day-in-month="0"]':{visibility:`hidden`}}),Dg=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function Og(e){let t=cr({props:e,name:`MuiDayCalendarSkeleton`}),{className:n,classes:r}=t,i=Z(t,Sg),a=Cg(r);return G(wg,x({className:Ve(a.root,n),ownerState:t},i,{children:Dg.map((e,t)=>G(Tg,{className:a.week,children:e.map((e,t)=>G(Eg,{variant:`circular`,width:36,height:36,className:a.daySkeleton,"data-day-in-month":e},t))},t))}))}function kg(e){return Ne(`MuiPickersToolbar`,e)}var Ag=ke(`MuiPickersToolbar`,[`root`,`title`,`content`]);g();function jg(){let{ownerState:e}=su(),t=dn();return p(()=>x({},e,{toolbarDirection:t?`rtl`:`ltr`}),[e,t])}g();var Mg=[`children`,`className`,`classes`,`toolbarTitle`,`hidden`,`titleId`,`classes`,`landscapeDirection`],Ng=e=>B({root:[`root`],title:[`title`],content:[`content`]},kg,e),Pg=q(`div`,{name:`MuiPickersToolbar`,slot:`Root`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`space-between`,padding:e.spacing(2,3),variants:[{props:{pickerOrientation:`landscape`},style:{height:`auto`,maxWidth:160,padding:16,justifyContent:`flex-start`,flexWrap:`wrap`}}]})),Fg=q(`div`,{name:`MuiPickersToolbar`,slot:`Content`,shouldForwardProp:e=>cn(e)&&e!==`landscapeDirection`})({display:`flex`,flexWrap:`wrap`,width:`100%`,flex:1,justifyContent:`space-between`,alignItems:`center`,flexDirection:`row`,variants:[{props:{pickerOrientation:`landscape`},style:{justifyContent:`flex-start`,alignItems:`flex-start`,flexDirection:`column`}},{props:{pickerOrientation:`landscape`,landscapeDirection:`row`},style:{flexDirection:`row`}}]}),Ig=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbar`}),{children:r,className:i,classes:a,toolbarTitle:o,hidden:s,titleId:c,landscapeDirection:l}=n,u=Z(n,Mg),d=jg(),f=Ng(a);return s?null:Je(Pg,x({ref:t,className:Ve(f.root,i),ownerState:d},u,{children:[G(Pt,{variant:`overline`,id:c,className:f.title,sx:{color:`text.secondary`},children:o}),G(Fg,{className:f.content,ownerState:d,landscapeDirection:l,children:r})]}))});function Lg(e){return Ne(`MuiDatePickerToolbar`,e)}var Rg=ke(`MuiDatePickerToolbar`,[`root`,`title`]);g();var zg=[`toolbarFormat`,`toolbarPlaceholder`,`className`,`classes`],Bg=e=>B({root:[`root`],title:[`title`]},Lg,e),Vg=q(Ig,{name:`MuiDatePickerToolbar`,slot:`Root`})({}),Hg=q(Pt,{name:`MuiDatePickerToolbar`,slot:`Title`})({variants:[{props:{pickerOrientation:`landscape`},style:{margin:`auto 16px auto auto`}}]}),Ug=o(function(e,t){let n=cr({props:e,name:`MuiDatePickerToolbar`}),{toolbarFormat:r,toolbarPlaceholder:i=`––`,className:a,classes:o}=n,s=Z(n,zg),c=kc(),{value:l,views:u,orientation:d}=zl(),f=Ac(),m=jg(),h=Bg(o),g=p(()=>{if(!c.isValid(l))return i;let e=Xc(c,{format:r,views:u},!0);return c.formatByString(l,e)},[l,r,i,c,u]);return G(Vg,x({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:Ve(h.root,a)},s,{children:G(Hg,{variant:`h4`,align:d===`landscape`?`left`:`center`,ownerState:m,className:h.title,children:g})}))});g();function Wg(e,t){let n=cr({props:e,name:t}),r=Ff(n),i=p(()=>{var e;return((e=n.localeText)==null?void 0:e.toolbarTitle)==null?n.localeText:x({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return x({},n,r,{localeText:i},zc({views:n.views,openTo:n.openTo,defaultViews:[`year`,`day`],defaultOpenTo:`day`}),{slots:x({toolbar:Ug},n.slots)})}var Gg=e=>e.type===`hidden`;function Kg(e){let{nodeName:t}=e;return!!([`BUTTON`,`DETAILS`,`EMBED`,`IFRAME`,`KEYGEN`,`LABEL`,`SELECT`,`TEXTAREA`].includes(t)||t===`A`&&e.hasAttribute(`href`)||e instanceof HTMLInputElement&&!Gg(e)||[`AUDIO`,`VIDEO`].includes(t)&&e.hasAttribute(`controls`)||[`IMG`,`OBJECT`].includes(t)&&e.hasAttribute(`usemap`)||e.hasAttribute(`tabindex`)&&e.tabIndex>-1)}function qg(e){return Ne(`MuiPickerPopper`,e)}ke(`MuiPickerPopper`,[`root`,`paper`]),g();var Jg=[`PaperComponent`,`ownerState`,`children`,`paperSlotProps`,`paperClasses`,`onPaperClick`,`onPaperTouchStart`],Yg=e=>B({root:[`root`],paper:[`paper`]},qg,e),Xg=q(En,{name:`MuiPickerPopper`,slot:`Root`})(({theme:e})=>({zIndex:e.zIndex.modal})),Zg=q(Gt,{name:`MuiPickerPopper`,slot:`Paper`})({outline:0,transformOrigin:`top center`,variants:[{props:({popperPlacement:e})=>new Set([`top`,`top-start`,`top-end`]).has(e),style:{transformOrigin:`bottom center`}}]});function Qg(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function $g(e,t){let n=l(!1),r=l(!1),i=l(null),o=l(!1);a(()=>{if(!e)return;function t(){o.current=!0}return document.addEventListener(`mousedown`,t,!0),document.addEventListener(`touchstart`,t,!0),()=>{document.removeEventListener(`mousedown`,t,!0),document.removeEventListener(`touchstart`,t,!0),o.current=!1}},[e]);let s=Y(e=>{if(!o.current){r.current=!1;return}let a=r.current;r.current=!1;let s=L(i.current);if(!i.current||`clientX`in e&&Qg(e,s))return;if(n.current){n.current=!1;return}let c;c=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),!c&&!a&&t(e)}),c=e=>{e.defaultMuiPrevented||(r.current=!0)};return a(()=>{if(e){let e=L(i.current),t=()=>{n.current=!0};return e.addEventListener(`touchstart`,s),e.addEventListener(`touchmove`,t),()=>{e.removeEventListener(`touchstart`,s),e.removeEventListener(`touchmove`,t)}}},[e,s]),a(()=>{if(e){let e=L(i.current);return e.addEventListener(`click`,s),()=>{e.removeEventListener(`click`,s),r.current=!1}}},[e,s]),[i,c,c]}var e_=o((e,t)=>{let{PaperComponent:n,ownerState:r,children:i,paperSlotProps:a,paperClasses:o,onPaperClick:s,onPaperTouchStart:c}=e,l=Z(e,Jg),u=Vn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:o,ownerState:r});return G(n,x({},l,u,{onClick:e=>{var t;s(e),(t=u.onClick)==null||t.call(u,e)},onTouchStart:e=>{var t;c(e),(t=u.onTouchStart)==null||t.call(u,e)},ownerState:r,children:i}))}),t_=e=>{let t=e instanceof HTMLElement?e:null;return t?Kg(t):!1};function n_(e){let{children:t,placement:n=`bottom-start`,slots:r,slotProps:i,classes:o}=cr({props:e,name:`MuiPickerPopper`}),{open:s,popupRef:c,reduceAnimations:u,keepOpenDuringFieldFocus:d}=zl(),{ownerState:f,rootRefObject:m}=su(),{dismissViews:h,getCurrentViewMode:g,onPopperExited:_,triggerElement:v,viewContainerRole:y}=su();a(()=>{function e(e){s&&e.key===`Escape`&&h()}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h,s]);let b=l(null);a(()=>{y!==`tooltip`&&g()!==`field`&&(s?b.current=Dd(m.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,y,g,m]);let S=Yg(o),[C,w,T]=$g(s,Y(e=>{d&&v&&e&&`target`in e&&v.contains(e.target)||(y===`tooltip`?Td(()=>{var e,t;(e=m.current)!=null&&e.contains(Dd(m.current))||(t=c.current)!=null&&t.contains(Dd(c.current))||h()}):(e.composedPath().some(t_)&&(b.current=null),h()))})),E=l(null),D=nt(E,c),O=nt(D,C),k=e=>{e.key===`Escape`&&(e.stopPropagation(),h())},A=(r==null?void 0:r.desktopTransition)??u?rn:ye,j=(r==null?void 0:r.desktopTrapFocus)??Sn,M=(r==null?void 0:r.desktopPaper)??Zg,N=(r==null?void 0:r.popper)??Xg,ee=Vn({elementType:N,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:y??void 0,open:s,placement:n,anchorEl:v,onKeyDown:k},className:S.root,ownerState:f}),P=p(()=>x({},f,{popperPlacement:ee.placement}),[f,ee.placement]);return G(N,x({},ee,{children:({TransitionProps:e})=>G(j,x({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:y===`tooltip`},i==null?void 0:i.desktopTrapFocus,{children:G(A,x({},e,i==null?void 0:i.desktopTransition,{onExited:t=>{var n,r,a;_==null||_(),i==null||(n=i.desktopTransition)==null||(r=n.onExited)==null||r.call(n,t),e==null||(a=e.onExited)==null||a.call(e)},children:G(e_,{PaperComponent:M,ownerState:P,ref:O,onPaperClick:w,onPaperTouchStart:T,paperClasses:S.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:t})}))}))}))}g();function r_(){return typeof window>`u`?`portrait`:window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?`landscape`:`portrait`:window.orientation&&Math.abs(Number(window.orientation))===90?`landscape`:`portrait`}function i_(e,t){let[n,r]=u(r_);return j(()=>{let e=()=>{r(r_())};return window.addEventListener(`orientationchange`,e),()=>{window.removeEventListener(`orientationchange`,e)}},[]),wd(e,[`hours`,`minutes`,`seconds`])?`portrait`:t??n}g();function a_(e){let{props:t,valueManager:n,validator:r}=e,{value:i,defaultValue:o,onChange:s,referenceDate:c,timezone:d,onAccept:f,closeOnSelect:m,open:h,onOpen:g,onClose:_}=t,{current:v}=l(o),{current:y}=l(i!==void 0),{current:b}=l(h!==void 0),S=kc(),{timezone:C,value:w,handleValueChange:T}=sd({name:`a picker component`,timezone:d,value:i,defaultValue:v,referenceDate:c,onChange:s,valueManager:n}),[E,D]=u(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:O}=pf({props:t,validator:r,timezone:C,value:w,onError:t.onError}),k=Y(e=>{let t=typeof e==`function`?e(E.open):e;b||D(e=>x({},e,{open:t})),t&&g&&g(),t||_==null||_()}),A=Y((e,t)=>{let{changeImportance:r=`accept`,skipPublicationIfPristine:i=!1,validationError:a,shortcut:o,source:s,shouldClose:c=r===`accept`}=t??{},l,u;!i&&!y&&!E.hasBeenModifiedSinceMount?(l=!0,u=r===`accept`):(l=!n.areValuesEqual(S,e,w),u=r===`accept`&&!n.areValuesEqual(S,e,E.lastCommittedValue)),D(t=>x({},t,{clockShallowValue:l?void 0:t.clockShallowValue,lastCommittedValue:u?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let d=null,p=()=>{if(!d){let t;t=s||(o?`view`:`unknown`),d={validationError:a??O(e),source:t},o&&(d.shortcut=o)}return d};l&&T(e,p()),u&&f&&f(e,p()),c&&k(!1)});w!==E.lastExternalValue&&D(e=>x({},e,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));let j=Y((e,t=`partial`)=>{if(t===`shallow`){D(t=>x({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}));return}A(e,{changeImportance:t===`finish`&&m?`accept`:`set`,source:`view`})});return a(()=>{if(b){if(h===void 0)throw Error(xc(160));D(e=>x({},e,{open:h}))}},[b,h]),{timezone:C,state:E,setValue:A,setValueFromView:j,setOpen:k,value:w,viewValue:p(()=>n.cleanValue(S,E.clockShallowValue===void 0?w:E.clockShallowValue),[S,n,E.clockShallowValue,w])}}g();var o_=[`className`,`sx`],s_=({ref:e,props:t,valueManager:n,valueType:r,variant:i,validator:a,onPopperExited:o,autoFocusView:s,rendererInterceptor:c,localeText:d,viewContainerRole:f,getStepNavigation:m})=>{let{views:h,view:g,openTo:_,onViewChange:v,viewRenderers:y,reduceAnimations:b,orientation:S,disableOpenPicker:C,closeOnSelect:w,disabled:T,readOnly:E,formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,format:A,label:M,autoFocus:N,name:ee,keepOpenDuringFieldFocus:P}=t,{className:F,sx:I}=t,te=Z(t,o_),L=Le(),ne=kc(),R=dg(b),z=i_(h,S),{current:B}=l(_??null),[re,ie]=u(null),ae=l(null),oe=l(null),V=l(null),se=nt(e,V),{timezone:ce,state:H,setOpen:U,setValue:le,setValueFromView:ue,value:de,viewValue:fe}=a_({props:t,valueManager:n,validator:a}),{view:pe,setView:W,defaultView:me,focusedView:he,setFocusedView:ge,setValueAndGoToNextView:_e,goToNextStep:ve,hasNextStep:ye,hasSeveralSteps:be}=vu({view:g,views:h,openTo:_,onChange:ue,onViewChange:v,autoFocus:s,getStepNavigation:m}),xe=Y(()=>{var e;de===null&&(e=oe.current)!=null&&e.clearValue&&oe.current.clearValue(),le(n.emptyValue,{source:`view`})}),Se=Y(()=>le(n.getTodayValue(ne,ce,r),{source:`view`})),Ce=Y(()=>le(de,{source:`view`})),we=Y(()=>le(H.lastCommittedValue,{skipPublicationIfPristine:!0,source:`view`})),Te=Y(()=>{le(de,{skipPublicationIfPristine:!0,source:`view`})}),{hasUIView:Ee,viewModeLookup:De,timeViewsCount:Oe}=p(()=>h.reduce((e,t)=>{let n=y[t]==null?`field`:`UI`;return e.viewModeLookup[t]=n,n===`UI`&&(e.hasUIView=!0,el(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[y,h]),ke=De[pe],Ae=Y(()=>ke),[je,Me]=u(ke===`UI`?pe:null);je!==pe&&De[pe]===`UI`&&Me(pe),j(()=>{ke===`field`&&H.open&&(U(!1),setTimeout(()=>{var e,t;oe==null||(e=oe.current)==null||e.setSelectedSections(pe),oe==null||(t=oe.current)==null||t.focusField(pe)}))},[pe]),j(()=>{if(!H.open)return;let e=pe;ke===`field`&&je!=null&&(e=je),e!==me&&De[e]===`UI`&&De[me]===`UI`&&(e=me),e!==pe&&W(e),ge(e,!0)},[H.open]);let Ne=p(()=>({isPickerValueEmpty:n.areValuesEqual(ne,de,n.emptyValue),isPickerOpen:H.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:z,pickerVariant:i}),[ne,n,de,H.open,z,i,t.disabled,t.readOnly]),Pe=p(()=>C||!Ee?`hidden`:T||E?`disabled`:`enabled`,[C,Ee,T,E]),Fe=Y(ve),Ie=p(()=>w&&!be?[]:[`cancel`,`nextOrAccept`],[w,be]),Re=p(()=>({setValue:le,setOpen:U,clearValue:xe,setValueToToday:Se,acceptValueChanges:Ce,cancelValueChanges:we,setView:W,goToNextStep:Fe}),[le,U,xe,Se,Ce,we,W,Fe]);return{providerProps:{localeText:d,contextValue:p(()=>x({},Re,{value:de,timezone:ce,open:H.open,views:h,view:je,initialView:B,disabled:T??!1,readOnly:E??!1,autoFocus:N??!1,variant:i,orientation:z,popupRef:ae,reduceAnimations:R,triggerRef:ie,triggerStatus:Pe,keepOpenDuringFieldFocus:!!P,hasNextStep:ye,fieldFormat:A??``,name:ee,label:M,rootSx:I,rootRef:se,rootClassName:F}),[Re,de,se,i,z,R,T,E,A,F,ee,M,I,Pe,P,ye,ce,H.open,je,h,B,N]),privateContextValue:p(()=>({dismissViews:Te,ownerState:Ne,hasUIView:Ee,getCurrentViewMode:Ae,rootRefObject:V,labelId:L,triggerElement:re,viewContainerRole:f,defaultActionBarActions:Ie,onPopperExited:o}),[Te,Ne,Ee,Ae,L,re,f,Ie,o]),actionsContextValue:Re,fieldPrivateContextValue:p(()=>({formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,internalFieldRef:oe}),[D,O,k,oe]),isValidContextValue:e=>{let r=a({adapter:ne,value:e,timezone:ce,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(je==null)return null;let e=y[je];if(e==null)return null;let t=x({},te,{views:h,timezone:ce,value:fe,onChange:_e,view:je,onViewChange:W,showViewSwitcher:Oe>1,timeViewsCount:Oe},f===`tooltip`?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:he,onFocusedViewChange:ge});return c?G(c,{viewRenderers:y,popperView:je,rendererProps:t}):e(t)},ownerState:Ne}};function c_(e){return Ne(`MuiPickersLayout`,e)}var l_=ke(`MuiPickersLayout`,[`root`,`landscape`,`contentWrapper`,`toolbar`,`actionBar`,`tabs`,`shortcuts`]);g();var u_=[`actions`],d_=q(D,{name:`MuiPickersLayout`,slot:`ActionBar`})({});function f_(e){let{actions:t}=e,n=Z(e,u_),r=Ac(),{clearValue:i,setValueToToday:a,acceptValueChanges:o,cancelValueChanges:s,goToNextStep:c,hasNextStep:l}=zl();if(t==null||t.length===0)return null;let u=t==null?void 0:t.map(e=>{switch(e){case`clear`:return G(Ln,{onClick:i,children:r.clearButtonLabel},e);case`cancel`:return G(Ln,{onClick:s,children:r.cancelButtonLabel},e);case`accept`:return G(Ln,{onClick:o,children:r.okButtonLabel},e);case`today`:return G(Ln,{onClick:a,children:r.todayButtonLabel},e);case`next`:return G(Ln,{onClick:c,children:r.nextStepButtonLabel},e);case`nextOrAccept`:return l?G(Ln,{onClick:c,children:r.nextStepButtonLabel},e):G(Ln,{onClick:o,children:r.okButtonLabel},e);default:return null}});return G(d_,x({},n,{children:u}))}var p_=h(f_),m_=[`items`,`changeImportance`],h_=[`getValue`],g_=q(le,{name:`MuiPickersLayout`,slot:`Shortcuts`})({});function __(e){let{items:t,changeImportance:n=`accept`}=e,r=Z(e,m_),{setValue:i}=Yl(),a=Ul();if(t==null||t.length===0)return null;let o=t.map(e=>{let{getValue:t}=e,r=Z(e,h_),o=t({isValid:a});return x({},r,{label:r.label,onClick:()=>{i(o,{changeImportance:n,shortcut:r,source:`view`})},disabled:!a(o)})});return G(g_,x({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:`auto`},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:o.map(e=>G(dt,{children:G(Dt,x({},e))},e.id??e.label))}))}g();var v_=[`ownerState`];function y_(e){return e.view!==null}var b_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`],toolbar:[`toolbar`],actionBar:[`actionBar`],tabs:[`tabs`],landscape:[`landscape`],shortcuts:[`shortcuts`]},c_,e)},x_=e=>{let{ownerState:t,defaultActionBarActions:n}=su(),{view:r}=zl(),i=dn(),{children:a,slots:o,slotProps:s,classes:c}=e,l=p(()=>x({},t,{layoutDirection:i?`rtl`:`ltr`,hasShortcuts:!1}),[t,i]),u=b_(c,l),d=(o==null?void 0:o.actionBar)??p_,f=Z(Vn({elementType:d,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:l}),v_),m=G(d,x({},f)),h=o==null?void 0:o.toolbar,g=Vn({elementType:h,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:l}),_=y_(g)&&h?G(h,x({},g)):null,v=a,y=o==null?void 0:o.tabs,b=r&&y?G(y,x({className:u.tabs},s==null?void 0:s.tabs)):null,S=(o==null?void 0:o.shortcuts)??__,C=Vn({elementType:S,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:l}),w=Array.isArray(C==null?void 0:C.items)&&C.items.length>0;return{toolbar:_,content:v,tabs:b,actionBar:m,shortcuts:r&&S?G(S,x({},C)):null,ownerState:x({},l,{hasShortcuts:w})}};g();var S_=[`sx`,`className`,`classes`,`children`,`slots`,`slotProps`],C_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`]},c_,e)},w_=q(`div`,{name:`MuiPickersLayout`,slot:`Root`})({display:`grid`,gridAutoColumns:`max-content auto max-content`,gridAutoRows:`max-content auto max-content`,[`& .${l_.actionBar}`]:{gridColumn:`1 / 4`,gridRow:3},variants:[{props:{pickerOrientation:`landscape`,hasShortcuts:!1},style:{[`& .${l_.toolbar}`]:{gridColumn:1,gridRow:`1 / 3`}}},{props:{pickerOrientation:`landscape`,hasShortcuts:!0},style:{[`& .${l_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1,maxWidth:`max-content`},[`& .${l_.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:`portrait`},style:{[`& .${l_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1},[`& .${l_.shortcuts}`]:{gridColumn:1,gridRow:`2 / 3`}}},{props:{hasShortcuts:!0,layoutDirection:`rtl`},style:{[`& .${l_.shortcuts}`]:{gridColumn:4}}}]}),T_=q(`div`,{name:`MuiPickersLayout`,slot:`ContentWrapper`})({gridColumn:`2 / 4`,gridRow:2,display:`flex`,flexDirection:`column`}),E_=o(function(e,t){let n=cr({props:e,name:`MuiPickersLayout`}),{toolbar:r,content:i,tabs:a,actionBar:o,shortcuts:s,ownerState:c}=x_(n),{orientation:l,variant:u}=zl(),{sx:d,className:f,classes:p}=n,m=Z(n,S_),h=C_(p,c);return Je(w_,x({ref:t,sx:d,className:Ve(h.root,f),ownerState:c},m,{children:[l===`landscape`?s:r,l===`landscape`?r:s,G(T_,{className:h.contentWrapper,ownerState:c,children:u===`desktop`?Je(y,{children:[i,a]}):Je(y,{children:[a,i]})}),o]}))});function D_(e){let{steps:t}=e;return _u({steps:t,isViewMatchingStep:(e,t)=>t.views==null||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:i})=>{let a=e.views==null?t:e.views.find(e=>i.includes(e));a!==r&&n(a)}})}var O_=[`props`,`steps`],k_=[`ownerState`],A_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,O_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=D_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=s_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`desktop`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),k_),v=a.layout??E_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),popper:x({"aria-labelledby":y},o==null?void 0:o.popper)});return{renderPicker:()=>Je(Jl,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(n_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}},j_=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I})=>G(yg,{view:e,onViewChange:t,views:n.filter(Yc),focusedView:r&&Yc(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I});g();var M_=o(function(e,t){var n;let r=kc(),i=Wg(e,`MuiDesktopDatePicker`),a=x({day:j_,month:j_,year:j_},i.viewRenderers),{renderPicker:o}=A_({ref:t,props:x({},i,{closeOnSelect:i.closeOnSelect??!0,viewRenderers:a,format:Xc(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:x({field:fm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!0},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var N_=q(Vt,{slot:`internal`})({[`& .${Gn.container}`]:{outline:0},[`& .${Gn.paper}`]:{outline:0,minWidth:320}}),P_=q(We,{slot:`internal`})({"&:first-of-type":{padding:0}});function F_(e){var t,n;let{children:r,slots:i,slotProps:a}=e,{open:o}=zl(),{dismissViews:s,onPopperExited:c}=su(),l=(i==null?void 0:i.dialog)??N_;return G(l,x({open:o,onClose:()=>{s(),c==null||c()}},a==null?void 0:a.dialog,{PaperComponent:i==null?void 0:i.mobilePaper,slots:x({transition:(i==null?void 0:i.mobileTransition)??rn},a==null||(t=a.dialog)==null?void 0:t.slots),slotProps:x({transition:a==null?void 0:a.mobileTransition,paper:a==null?void 0:a.mobilePaper},a==null||(n=a.dialog)==null?void 0:n.slotProps),children:G(P_,{children:r})}))}var I_=[`props`,`steps`],L_=[`ownerState`],R_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,I_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=D_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=s_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`mobile`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),L_),v=a.layout??E_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),mobilePaper:x({"aria-labelledby":y},o==null?void 0:o.mobilePaper)});return{renderPicker:()=>Je(Jl,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(F_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}};g();var z_=o(function(e,t){var n;let r=kc(),i=Wg(e,`MuiMobileDatePicker`),a=x({day:j_,month:j_,year:j_},i.viewRenderers),{renderPicker:o}=R_({ref:t,props:x({},i,{viewRenderers:a,format:Xc(r,i,!1),slots:x({field:fm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var B_=[`desktopModeMediaQuery`],V_=o(function(e,t){let n=cr({props:e,name:`MuiDatePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,B_);return he(r,{defaultMatches:!0})?G(M_,x({ref:t},i)):G(z_,x({ref:t},i))}),H_=[`props`,`steps`],U_=q(E_,{slot:`internal`})(({theme:e})=>({overflow:`hidden`,minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),W_=e=>{let{props:t,steps:n}=e,r=Z(e,H_),{localeText:i,slots:a,slotProps:o,displayStaticWrapperAs:s,autoFocus:c}=t,l=D_({steps:n}),{providerProps:u,renderCurrentView:d}=s_(x({},r,{props:t,variant:s,autoFocusView:c??!1,viewContainerRole:null,localeText:i,getStepNavigation:l})),f=(a==null?void 0:a.layout)??U_;return{renderPicker:()=>{var e,n;return G(Jl,x({},u,{children:G(f,x({},Ad(t),o==null?void 0:o.layout,{slots:a,slotProps:o,sx:jd(u.contextValue.rootSx,o==null||(e=o.layout)==null?void 0:e.sx),className:Ve(u.contextValue.rootClassName,o==null||(n=o.layout)==null?void 0:n.className),ref:u.contextValue.rootRef,children:d()}))}))}}};g();var G_=o(function(e,t){var n;let r=Wg(e,`MuiStaticDatePicker`),i=r.displayStaticWrapperAs??`mobile`,a=x({day:j_,month:j_,year:j_},r.viewRenderers),{renderPicker:o}=W_({ref:t,props:x({},r,{viewRenderers:a,displayStaticWrapperAs:i,yearsPerRow:r.yearsPerRow??(i===`mobile`?3:4),slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});function K_(e){return Ne(`MuiPickersToolbarText`,e)}var q_=ke(`MuiPickersToolbarText`,[`root`]);g();var J_=[`className`,`classes`,`selected`,`value`],Y_=e=>B({root:[`root`]},K_,e),X_=q(Pt,{name:`MuiPickersToolbarText`,slot:`Root`})(({theme:e})=>({transition:e.transitions.create(`color`),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),Z_=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarText`}),{className:r,classes:i,selected:a,value:o}=n,s=Z(n,J_),c=Y_(i);return G(X_,x({ref:t,className:Ve(c.root,r),component:`span`,ownerState:n},a&&{"data-selected":!0},s,{children:o}))});g();var Q_=[`align`,`className`,`classes`,`selected`,`typographyClassName`,`value`,`variant`,`width`],$_=e=>B({root:[`root`]},kg,e),ev=q(Ln,{name:`MuiPickersToolbarButton`,slot:`Root`})({padding:0,minWidth:16,textTransform:`none`}),tv=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarButton`}),{align:r,className:i,classes:a,selected:o,typographyClassName:s,value:c,variant:l,width:u}=n,d=Z(n,Q_),f=$_(a);return G(ev,x({variant:`text`,ref:t,className:Ve(f.root,i),ownerState:n},u?{sx:{width:u}}:{},d,{children:G(Z_,{align:r,className:s,variant:l,value:c,selected:o})}))});function nv(e){return Ne(`MuiTimePickerToolbar`,e)}var rv=ke(`MuiTimePickerToolbar`,[`root`,`separator`,`hourMinuteLabel`,`hourMinuteLabelLandscape`,`hourMinuteLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]),iv=[`ampm`,`ampmInClock`,`className`,`classes`],av=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],separator:[`separator`],hourMinuteLabel:[`hourMinuteLabel`,n===`landscape`&&`hourMinuteLabelLandscape`,r===`rtl`&&`hourMinuteLabelReverse`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},nv,e)},ov=q(Ig,{name:`MuiTimePickerToolbar`,slot:`Root`})({}),sv=q(Z_,{name:`MuiTimePickerToolbar`,slot:`Separator`})({outline:0,margin:`0 4px 0 2px`,cursor:`default`}),cv=q(`div`,{name:`MuiTimePickerToolbar`,slot:`HourMinuteLabel`,overridesResolver:(e,t)=>[{[`&.${rv.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${rv.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:`flex`,justifyContent:`flex-end`,alignItems:`flex-end`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{pickerOrientation:`landscape`},style:{marginTop:`auto`}}]}),lv=q(`div`,{name:`MuiTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${rv.ampmLabel}`]:t.ampmLabel},{[`&.${rv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${rv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,flexBasis:`100%`}}]});function uv(e){let t=cr({props:e,name:`MuiTimePickerToolbar`}),{ampm:n,ampmInClock:r,className:i,classes:a}=t,o=Z(t,iv),s=kc(),c=Ac(),l=jg(),u=av(a,l),{value:d,setValue:f,disabled:p,readOnly:m,view:h,setView:g,views:_}=zl(),v=!!(n&&!r&&_.includes(`hours`)),{meridiemMode:y,handleMeridiemChange:b}=xu(d,n,e=>f(e,{changeImportance:`set`,source:`view`})),S=e=>s.isValid(d)?s.format(d,e):`--`,C=G(sv,{tabIndex:-1,value:`:`,variant:`h3`,selected:!1,className:u.separator});return Je(ov,x({landscapeDirection:`row`,toolbarTitle:c.timePickerToolbarTitle,ownerState:l,className:Ve(u.root,i)},o,{children:[Je(cv,{className:u.hourMinuteLabel,ownerState:l,children:[wd(_,`hours`)&&G(tv,{tabIndex:-1,variant:`h3`,onClick:()=>g(`hours`),selected:h===`hours`,value:S(n?`hours12h`:`hours24h`)}),wd(_,[`hours`,`minutes`])&&C,wd(_,`minutes`)&&G(tv,{tabIndex:-1,variant:`h3`,onClick:()=>g(`minutes`),selected:h===`minutes`,value:S(`minutes`)}),wd(_,[`minutes`,`seconds`])&&C,wd(_,`seconds`)&&G(tv,{variant:`h3`,onClick:()=>g(`seconds`),selected:h===`seconds`,value:S(`seconds`)})]}),v&&Je(lv,{className:u.ampmSelection,ownerState:l,children:[G(tv,{disableRipple:!0,variant:`subtitle2`,selected:y===`am`,typographyClassName:u.ampmLabel,value:qc(s,`am`),onClick:m?void 0:()=>b(`am`),disabled:p}),G(tv,{disableRipple:!0,variant:`subtitle2`,selected:y===`pm`,typographyClassName:u.ampmLabel,value:qc(s,`pm`),onClick:m?void 0:()=>b(`pm`),disabled:p})]})]}))}g();function dv(e,t){var n;let r=kc(),i=cr({props:e,name:t}),a=zf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{timePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]);return x({},i,a,{ampm:o,localeText:s},zc({views:i.views,openTo:i.openTo,defaultViews:[`hours`,`minutes`],defaultOpenTo:`hours`}),{slots:x({toolbar:uv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o,ampmInClock:i.ampmInClock},(n=i.slotProps)==null?void 0:n.toolbar)})})}var fv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D})=>G(xd,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D}),pv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(Ld,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeStep:T==null?void 0:T.minutes,skipDisabled:E,timezone:D}),mv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(Qd,{view:e,onViewChange:t,focusedView:n&&tl(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D}),hv=[`views`,`format`],gv=(e,t,n)=>{let{views:r,format:i}=t,a=Z(t,hv);if(i)return i;let o=[],s=[];if(r.forEach(e=>{el(e)?s.push(e):Yc(e)&&o.push(e)}),s.length===0)return Xc(e,x({views:o},a),!1);if(o.length===0)return sl(e,x({views:s},a));let c=sl(e,x({views:s},a));return`${n?e.formats.keyboardDate:Xc(e,x({views:o},a),!1)} ${c}`},_v=(e,t,n)=>n?t.filter(e=>!tl(e)||e===`hours`):e?[...t,`meridiem`]:t,vv=(e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t;function yv({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){let i=e??24,a=x({hours:1,minutes:5,seconds:5},n),o=vv(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:_v(t,r,o)}}g();var bv=o(function(e,t){var n,r;let i=kc(),a=dv(e,`MuiDesktopTimePicker`),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:c}=yv(a),l=o?pv:mv,u=x({hours:l,minutes:l,seconds:l,meridiem:l},a.viewRenderers),d=a.ampmInClock??!0,f=((n=u.hours)==null?void 0:n.name)===mv.name?s:s.filter(e=>e!==`meridiem`),{renderPicker:p}=A_({ref:t,props:x({},a,{ampmInClock:d,timeSteps:c,viewRenderers:u,format:sl(i,a),views:o?[`hours`]:f,slots:x({field:hm},a.slots),slotProps:x({},a.slotProps,{field:e=>{var t;return x({},An((t=a.slotProps)==null?void 0:t.field,e),Fc(a))},toolbar:x({hidden:!0,ampmInClock:d},(r=a.slotProps)==null?void 0:r.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return p()});g();var xv=o(function(e,t){var n;let r=kc(),i=dv(e,`MuiMobileTimePicker`),a=x({hours:fv,minutes:fv,seconds:fv},i.viewRenderers),o=i.ampmInClock??!1,{renderPicker:s}=R_({ref:t,props:x({},i,{ampmInClock:o,viewRenderers:a,format:sl(r,i),slots:x({field:hm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1,ampmInClock:o},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});g();var Sv=[`desktopModeMediaQuery`],Cv=o(function(e,t){let n=cr({props:e,name:`MuiTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,Sv);return he(r,{defaultMatches:!0})?G(bv,x({ref:t},i)):G(xv,x({ref:t},i))});g();var wv=o(function(e,t){var n;let r=dv(e,`MuiStaticTimePicker`),i=r.displayStaticWrapperAs??`mobile`,a=r.ampmInClock??i===`desktop`,o=x({hours:fv,minutes:fv,seconds:fv},r.viewRenderers),{renderPicker:s}=W_({ref:t,props:x({},r,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:a,slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`,ampmInClock:a},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});function Tv(e){return Ne(`MuiDateTimePickerTabs`,e)}var Ev=ke(`MuiDateTimePickerTabs`,[`root`]);g();var Dv=[`dateIcon`,`timeIcon`,`hidden`,`className`,`classes`,`sx`],Ov=e=>Yc(e)?`date`:`time`,kv=e=>e===`date`?`day`:`hours`,Av=e=>B({root:[`root`]},Tv,e),jv=q(Te,{name:`MuiDateTimePickerTabs`,slot:`Root`})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${qe.indicator}`]:{bottom:`auto`,top:0}}})),Mv=function(e){let t=cr({props:e,name:`MuiDateTimePickerTabs`}),{dateIcon:n=G(ru,{}),timeIcon:r=G(iu,{}),hidden:i=typeof window>`u`||window.innerHeight<667,className:a,classes:o,sx:s}=t,c=Z(t,Dv),l=Ac(),{ownerState:u}=su(),{view:d,setView:f}=zl(),p=Av(o);return i?null:Je(jv,x({},c,{ownerState:u,variant:`fullWidth`,value:Ov(d),onChange:(e,t)=>{f(kv(t))},className:Ve(a,p.root),sx:s,children:[G(dr,{value:`date`,"aria-label":l.dateTableLabel,icon:G(y,{children:n})}),G(dr,{value:`time`,"aria-label":l.timeTableLabel,icon:G(y,{children:r})})]}))};function Nv(e){return Ne(`MuiDateTimePickerToolbar`,e)}var Pv=ke(`MuiDateTimePickerToolbar`,[`root`,`dateContainer`,`timeContainer`,`timeDigitsContainer`,`separator`,`timeLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]);g();var Fv=[`ampm`,`ampmInClock`,`toolbarFormat`,`toolbarPlaceholder`,`toolbarTitle`,`className`,`classes`],Iv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],dateContainer:[`dateContainer`],timeContainer:[`timeContainer`,r===`rtl`&&`timeLabelReverse`],timeDigitsContainer:[`timeDigitsContainer`,r===`rtl`&&`timeLabelReverse`],separator:[`separator`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},Nv,e)},Lv=q(Ig,{name:`MuiDateTimePickerToolbar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:`space-around`,position:`relative`,variants:[{props:{toolbarVariant:`desktop`},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Ag.content} .${q_.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:`desktop`,pickerOrientation:`landscape`},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{paddingLeft:24,paddingRight:0}}]})),Rv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`DateContainer`})({display:`flex`,flexDirection:`column`,alignItems:`flex-start`}),zv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,flexDirection:`row`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{gap:9,marginRight:4,alignSelf:`flex-end`}},{props:({pickerOrientation:e,toolbarVariant:t})=>e===`landscape`&&t!==`desktop`,style:{flexDirection:`column`}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e===`landscape`&&t!==`desktop`&&n===`rtl`,style:{flexDirection:`column-reverse`}}]}),Bv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeDigitsContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`},style:{gap:1.5}}]}),Vv=q(Z_,{name:`MuiDateTimePickerToolbar`,slot:`Separator`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({margin:`0 4px 0 2px`,cursor:`default`,variants:[{props:{toolbarVariant:`desktop`},style:{margin:0}}]}),Hv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${Pv.ampmLabel}`]:t.ampmLabel},{[`&.${Pv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${Pv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,width:`100%`}}]}),Uv=v(null);function Wv(e){let t=cr({props:e,name:`MuiDateTimePickerToolbar`}),{ampm:n,ampmInClock:r,toolbarFormat:i,toolbarPlaceholder:a=`––`,toolbarTitle:o,className:s,classes:c}=t,l=Z(t,Fv),{value:u,setValue:d,disabled:f,readOnly:m,variant:h,orientation:g,view:_,setView:v,views:S}=zl(),C=Ac(),w=jg(),T=Iv(c,w),E=kc(),D=b(Uv),O=D?D.value:u,k=D?D.setValue:d,A=D?D.view:_,j=D?D.setView:v,{meridiemMode:M,handleMeridiemChange:N}=xu(O,n,e=>k(e,{changeImportance:`set`,source:`view`})),ee=D!=null&&D.forceDesktopVariant?`desktop`:h,P=ee===`desktop`,F=!!(n&&!r),I=o??C.dateTimePickerToolbarTitle,te=p(()=>E.isValid(O)?i?E.formatByString(O,i):E.format(O,`shortDate`):a,[O,i,a,E]),L=(e,t)=>E.isValid(O)?E.format(O,e):t;return Je(Lv,x({className:Ve(T.root,s),toolbarTitle:I,toolbarVariant:ee},l,{ownerState:w,children:[Je(Rv,{className:T.dateContainer,ownerState:w,children:[S.includes(`year`)&&G(tv,{tabIndex:-1,variant:`subtitle1`,onClick:()=>j(`year`),selected:A===`year`,value:L(`year`,`–`)}),S.includes(`day`)&&G(tv,{tabIndex:-1,variant:P?`h5`:`h4`,onClick:()=>j(`day`),selected:A===`day`,value:te})]}),Je(zv,{className:T.timeContainer,ownerState:w,toolbarVariant:ee,children:[Je(Bv,{className:T.timeDigitsContainer,ownerState:w,toolbarVariant:ee,children:[S.includes(`hours`)&&Je(y,{children:[G(tv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`hours`),selected:A===`hours`,value:L(n?`hours12h`:`hours24h`,`--`)}),G(Vv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G(tv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`minutes`),selected:A===`minutes`||!S.includes(`minutes`)&&A===`hours`,value:L(`minutes`,`--`),disabled:!S.includes(`minutes`)})]}),S.includes(`seconds`)&&Je(y,{children:[G(Vv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G(tv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`seconds`),selected:A===`seconds`,value:L(`seconds`,`--`)})]})]}),F&&!P&&Je(Hv,{className:T.ampmSelection,ownerState:w,children:[G(tv,{variant:`subtitle2`,selected:M===`am`,typographyClassName:T.ampmLabel,value:qc(E,`am`),onClick:m?void 0:()=>N(`am`),disabled:f}),G(tv,{variant:`subtitle2`,selected:M===`pm`,typographyClassName:T.ampmLabel,value:qc(E,`pm`),onClick:m?void 0:()=>N(`pm`),disabled:f})]}),n&&P&&G(tv,{variant:`h5`,onClick:()=>j(`meridiem`),selected:A===`meridiem`,value:O&&M?qc(E,M):`--`,width:48})]})]}))}g();function Gv(e,t){var n;let r=kc(),i=cr({props:e,name:t}),a=Uf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]),{openTo:c,views:l}=zc({views:i.views,openTo:i.openTo,defaultViews:[`year`,`day`,`hours`,`minutes`],defaultOpenTo:`day`}),{shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,timeSteps:m}=yv({thresholdToRenderTimeInASingleColumn:i.thresholdToRenderTimeInASingleColumn,ampm:o,timeSteps:i.timeSteps,views:l}),h=o?[...l,`meridiem`]:l;return x({},i,a,{timeSteps:m,openTo:c,shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,viewsForFormatting:h,ampm:o,localeText:s,orientation:i.orientation??`portrait`,slots:x({toolbar:Wv,tabs:Mv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o},(n=i.slotProps)==null?void 0:n.toolbar)})})}g();var Kv=o(function(e,t){var n;let{toolbar:r,tabs:i,content:a,actionBar:o,shortcuts:s,ownerState:c}=x_(e),{orientation:l}=zl(),{sx:u,className:d,classes:f}=e,p=o&&(((n=o.props.actions)==null?void 0:n.length)??0)>0;return Je(w_,{ref:t,className:Ve(l_.root,f==null?void 0:f.root,d),sx:[{[`& .${l_.tabs}`]:{gridRow:4,gridColumn:`1 / 4`},[`& .${l_.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:c,children:[l===`landscape`?s:r,l===`landscape`?r:s,Je(T_,{className:Ve(l_.contentWrapper,f==null?void 0:f.contentWrapper),ownerState:c,sx:{display:`grid`},children:[a,i,p&&G(bt,{sx:{gridRow:3,gridColumn:`1 / 4`}})]}),o]})});g();var qv=[`openTo`,`focusedView`,`timeViewsCount`],Jv=function(e){var t,n;let{viewRenderers:r,popperView:i,rendererProps:a}=e,{openTo:o,focusedView:s,timeViewsCount:c}=a,l=Z(a,qv),u=x({},l,{autoFocus:!1,focusedView:null,sx:[{[`&.${zd.root}`]:{borderBottom:0},[`&.${zd.root}, .${Vd.root}, &.${Cd.root}`]:{maxHeight:336}}]}),d=tl(i),f=d?`day`:i,p=d?i:`hours`;return Je(y,{children:[(t=r[f])==null?void 0:t.call(r,x({},a,{view:d?`day`:i,focusedView:s&&Yc(s)?s:null,views:a.views.filter(Yc),sx:[{gridColumn:1},...u.sx]})),c>0&&Je(y,{children:[G(bt,{orientation:`vertical`,sx:{gridColumn:2}}),(n=r[p])==null?void 0:n.call(r,x({},u,{view:d?i:`hours`,focusedView:s&&tl(s)?s:null,openTo:tl(o)?o:`hours`,views:a.views.filter(tl),sx:[{gridColumn:3},...u.sx]}))]})]})},Yv=o(function(e,t){var n,r,i;let a=kc(),o=Gv(e,`MuiDesktopDateTimePicker`),s=o.shouldRenderTimeInASingleColumn?pv:mv,c=x({day:j_,month:j_,year:j_,hours:s,minutes:s,seconds:s,meridiem:s},o.viewRenderers),l=o.ampmInClock??!0,u=((n=c.hours)==null?void 0:n.name)===mv.name?o.views:o.views.filter(e=>e!==`meridiem`),{renderPicker:d}=A_({ref:t,props:x({},o,{viewRenderers:c,format:gv(a,x({},o,{views:o.viewsForFormatting})),views:u,yearsPerRow:o.yearsPerRow??4,ampmInClock:l,slots:x({field:vm,layout:Kv},o.slots),slotProps:x({},o.slotProps,{field:e=>{var t;return x({},An((t=o.slotProps)==null?void 0:t.field,e),Fc(o))},toolbar:x({hidden:!0,ampmInClock:l},(r=o.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!0},(i=o.slotProps)==null?void 0:i.tabs)})}),valueManager:pd,valueType:`date-time`,validator:ff,rendererInterceptor:Jv,steps:null});return d()});g();var Xv=[{views:Jc},{views:Qc}],Zv=o(function(e,t){var n,r,i,a,o;let s=kc(),c=Gv(e,`MuiMobileDateTimePicker`),l=c.shouldRenderTimeInASingleColumn?pv:mv,u=x({day:j_,month:j_,year:j_,hours:l,minutes:l,seconds:l,meridiem:l},c.viewRenderers),d=c.ampmInClock??!1,f=((n=u.hours)==null?void 0:n.name)===mv.name?c.views:c.views.filter(e=>e!==`meridiem`),{renderPicker:p}=R_({ref:t,props:x({},c,{viewRenderers:u,format:gv(s,x({},c,{views:c.viewsForFormatting})),views:f,ampmInClock:d,slots:x({field:vm},c.slots),slotProps:x({},c.slotProps,{field:e=>{var t;return x({},An((t=c.slotProps)==null?void 0:t.field,e),Fc(c))},toolbar:x({hidden:!1,ampmInClock:d},(r=c.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!1},(i=c.slotProps)==null?void 0:i.tabs),layout:x({},(a=c.slotProps)==null?void 0:a.layout,{sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],(o=c.slotProps)==null||(o=o.layout)==null?void 0:o.sx)})})}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Xv});return p()});g();var Qv=[`desktopModeMediaQuery`],$v=o(function(e,t){let n=cr({props:e,name:`MuiDateTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,Qv);return he(r,{defaultMatches:!0})?G(Yv,x({ref:t},i)):G(Zv,x({ref:t},i))});g();var ey=[{views:Jc},{views:Qc}],ty=o(function(e,t){var n,r,i;let a=Gv(e,`MuiStaticDateTimePicker`),o=a.displayStaticWrapperAs??`mobile`,s=a.ampmInClock??o===`desktop`,c=a.shouldRenderTimeInASingleColumn?pv:mv,l=x({day:j_,month:j_,year:j_,hours:c,minutes:c,seconds:c,meridiem:c},a.viewRenderers),u=((n=l.hours)==null?void 0:n.name)===mv.name?a.views:a.views.filter(e=>e!==`meridiem`),{renderPicker:d}=W_({ref:t,props:x({},a,{viewRenderers:l,displayStaticWrapperAs:o,views:u,ampmInClock:s,yearsPerRow:a.yearsPerRow??(o===`mobile`?3:4),slotProps:x({},a.slotProps,{tabs:x({hidden:o===`desktop`},(r=a.slotProps)==null?void 0:r.tabs),toolbar:x({hidden:o===`desktop`,ampmInClock:s},(i=a.slotProps)==null?void 0:i.toolbar)}),sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],a==null?void 0:a.sx)}),valueManager:pd,valueType:`date-time`,validator:ff,steps:ey});return d()}),ny=t({ArrowDropDownIcon:()=>Ql,ArrowLeftIcon:()=>$l,ArrowRightIcon:()=>eu,CalendarIcon:()=>tu,ClearIcon:()=>au,ClockIcon:()=>nu,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>kd,DateCalendar:()=>yg,DateField:()=>fm,DatePicker:()=>V_,DatePickerToolbar:()=>Ug,DateRangeIcon:()=>ru,DateTimeField:()=>vm,DateTimePicker:()=>$v,DateTimePickerTabs:()=>Mv,DateTimePickerToolbar:()=>Wv,DayCalendarSkeleton:()=>Og,DesktopDatePicker:()=>M_,DesktopDateTimePicker:()=>Yv,DesktopDateTimePickerLayout:()=>Kv,DesktopTimePicker:()=>bv,DigitalClock:()=>Ld,DigitalClockItem:()=>Id,LocalizationProvider:()=>Dc,MobileDatePicker:()=>z_,MobileDateTimePicker:()=>Zv,MobileTimePicker:()=>xv,MonthCalendar:()=>Ih,MultiSectionDigitalClock:()=>Qd,PickerDay:()=>sf,PickersActionBar:()=>p_,PickersCalendarHeader:()=>ag,PickersFilledInput:()=>Vp,PickersInput:()=>qp,PickersInputBase:()=>Sp,PickersLayout:()=>E_,PickersLayoutContentWrapper:()=>T_,PickersLayoutRoot:()=>w_,PickersOutlinedInput:()=>Pp,PickersShortcuts:()=>__,PickersTextField:()=>Qp,StaticDatePicker:()=>G_,StaticDateTimePicker:()=>ty,StaticTimePicker:()=>wv,TimeClock:()=>xd,TimeField:()=>hm,TimeIcon:()=>iu,TimePicker:()=>Cv,TimePickerToolbar:()=>uv,Unstable_PickersSectionList:()=>ap,Unstable_PickersSectionListRoot:()=>$f,Unstable_PickersSectionListSection:()=>ep,Unstable_PickersSectionListSectionContent:()=>np,Unstable_PickersSectionListSectionSeparator:()=>tp,YearCalendar:()=>Jh,clockClasses:()=>Vu,clockNumberClasses:()=>ed,clockPointerClasses:()=>Pu,dateCalendarClasses:()=>pg,datePickerToolbarClasses:()=>Rg,dateTimePickerTabsClasses:()=>Ev,dateTimePickerToolbarClasses:()=>Pv,dayCalendarClasses:()=>lh,dayCalendarSkeletonClasses:()=>xg,digitalClockClasses:()=>Cd,extractValidationProps:()=>Fc,getDateCalendarUtilityClass:()=>fg,getDayCalendarSkeletonUtilityClass:()=>bg,getDigitalClockUtilityClass:()=>Sd,getMonthCalendarUtilityClass:()=>Th,getMultiSectionDigitalClockUtilityClass:()=>Rd,getPickerDayUtilityClass:()=>$d,getPickersFilledInputUtilityClass:()=>Fp,getPickersInputBaseUtilityClass:()=>Jf,getPickersInputUtilityClass:()=>Hp,getPickersOutlinedInputUtilityClass:()=>Cp,getPickersSectionListUtilityClass:()=>Xf,getPickersTextFieldUtilityClass:()=>Kf,getTimeClockUtilityClass:()=>Cu,getYearCalendarUtilityClass:()=>Lh,monthCalendarClasses:()=>Eh,multiSectionDigitalClockClasses:()=>zd,multiSectionDigitalClockSectionClasses:()=>Vd,pickerDayClasses:()=>ef,pickersCalendarHeaderClasses:()=>Xh,pickersFadeTransitionGroupClasses:()=>Xm,pickersFilledInputClasses:()=>Ip,pickersInputBaseClasses:()=>Yf,pickersInputClasses:()=>Up,pickersLayoutClasses:()=>l_,pickersOutlinedInputClasses:()=>wp,pickersSectionListClasses:()=>Zf,pickersSlideTransitionClasses:()=>nh,pickersTextFieldClasses:()=>qf,renderDateViewCalendar:()=>j_,renderDigitalClockTimeView:()=>pv,renderMultiSectionDigitalClockTimeView:()=>mv,renderTimeViewClock:()=>fv,timeClockClasses:()=>wu,timePickerToolbarClasses:()=>rv,unstable_useDateField:()=>Wf,unstable_useDateTimeField:()=>gm,unstable_useTimeField:()=>pm,useDateManager:()=>Mf,useDateTimeManager:()=>Bf,useIsValidValue:()=>Ul,useParsedFormat:()=>Vl,usePickerActionsContext:()=>Yl,usePickerAdapter:()=>kc,usePickerContext:()=>zl,usePickerLayout:()=>x_,usePickerTranslations:()=>Ac,useSplitFieldProps:()=>Lc,useTimeManager:()=>If,useValidation:()=>pf,validateDate:()=>uf,validateDateTime:()=>ff,validateTime:()=>df,yearCalendarClasses:()=>Rh}),ry=t({ArrowDropDownIcon:()=>Kb,ArrowLeftIcon:()=>qb,ArrowRightIcon:()=>Jb,CalendarIcon:()=>Yb,ClearIcon:()=>$b,ClockIcon:()=>Xb,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>iy,DateCalendar:()=>ky,DateField:()=>Cy,DatePicker:()=>Wy,DatePickerToolbar:()=>Gy,DateRangeIcon:()=>Zb,DateTimeField:()=>Dy,DateTimePicker:()=>nb,DateTimePickerTabs:()=>rb,DateTimePickerToolbar:()=>ab,DayCalendarSkeleton:()=>Vy,DesktopDatePicker:()=>qy,DesktopDateTimePicker:()=>sb,DesktopDateTimePickerLayout:()=>cb,DesktopTimePicker:()=>$y,DigitalClock:()=>dy,DigitalClockItem:()=>fy,LocalizationProvider:()=>yy,MobileDatePicker:()=>Jy,MobileDateTimePicker:()=>lb,MobileTimePicker:()=>eb,MonthCalendar:()=>Fy,MultiSectionDigitalClock:()=>hy,PickerDay:()=>by,PickersActionBar:()=>bb,PickersCalendarHeader:()=>Cb,PickersFilledInput:()=>Ab,PickersInput:()=>Db,PickersInputBase:()=>Ib,PickersLayout:()=>hb,PickersLayoutContentWrapper:()=>_b,PickersLayoutRoot:()=>gb,PickersOutlinedInput:()=>Nb,PickersShortcuts:()=>xb,PickersTextField:()=>wb,StaticDatePicker:()=>Yy,StaticDateTimePicker:()=>ub,StaticTimePicker:()=>tb,TimeClock:()=>ay,TimeField:()=>Ty,TimeIcon:()=>Qb,TimePicker:()=>Xy,TimePickerToolbar:()=>Zy,Unstable_PickersSectionList:()=>zb,Unstable_PickersSectionListRoot:()=>Bb,Unstable_PickersSectionListSection:()=>Vb,Unstable_PickersSectionListSectionContent:()=>Ub,Unstable_PickersSectionListSectionSeparator:()=>Hb,YearCalendar:()=>Ry,clockClasses:()=>oy,clockNumberClasses:()=>sy,clockPointerClasses:()=>uy,dateCalendarClasses:()=>jy,datePickerToolbarClasses:()=>Ky,dateTimePickerTabsClasses:()=>ib,dateTimePickerToolbarClasses:()=>ob,dayCalendarClasses:()=>My,dayCalendarSkeletonClasses:()=>Hy,default:()=>hx,digitalClockClasses:()=>py,extractValidationProps:()=>ux,getDateCalendarUtilityClass:()=>Ay,getDayCalendarSkeletonUtilityClass:()=>Uy,getDigitalClockUtilityClass:()=>my,getMonthCalendarUtilityClass:()=>Ly,getMultiSectionDigitalClockUtilityClass:()=>vy,getPickerDayUtilityClass:()=>xy,getPickersFilledInputUtilityClass:()=>jb,getPickersInputBaseUtilityClass:()=>Rb,getPickersInputUtilityClass:()=>Ob,getPickersOutlinedInputUtilityClass:()=>Pb,getPickersSectionListUtilityClass:()=>Wb,getPickersTextFieldUtilityClass:()=>Eb,getTimeClockUtilityClass:()=>ly,getYearCalendarUtilityClass:()=>By,monthCalendarClasses:()=>Iy,multiSectionDigitalClockClasses:()=>_y,multiSectionDigitalClockSectionClasses:()=>gy,pickerDayClasses:()=>Sy,pickersCalendarHeaderClasses:()=>Sb,pickersFadeTransitionGroupClasses:()=>Ny,pickersFilledInputClasses:()=>Mb,pickersInputBaseClasses:()=>Lb,pickersInputClasses:()=>kb,pickersLayoutClasses:()=>yb,pickersOutlinedInputClasses:()=>Fb,pickersSectionListClasses:()=>Gb,pickersSlideTransitionClasses:()=>Py,pickersTextFieldClasses:()=>Tb,renderDateViewCalendar:()=>db,renderDigitalClockTimeView:()=>pb,renderMultiSectionDigitalClockTimeView:()=>mb,renderTimeViewClock:()=>fb,timeClockClasses:()=>cy,timePickerToolbarClasses:()=>Qy,unstable_useDateField:()=>wy,unstable_useDateTimeField:()=>Oy,unstable_useTimeField:()=>Ey,useDateManager:()=>fx,useDateTimeManager:()=>mx,useIsValidValue:()=>ax,useParsedFormat:()=>nx,usePickerActionsContext:()=>ix,usePickerAdapter:()=>ox,usePickerContext:()=>rx,usePickerLayout:()=>vb,usePickerTranslations:()=>ex,useSplitFieldProps:()=>tx,useTimeManager:()=>px,useValidation:()=>dx,validateDate:()=>sx,validateDateTime:()=>lx,validateTime:()=>cx,yearCalendarClasses:()=>zy}),Q=ny,iy=Q.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,ay=Q.TimeClock,oy=Q.clockClasses,sy=Q.clockNumberClasses,cy=Q.timeClockClasses,ly=Q.getTimeClockUtilityClass,uy=Q.clockPointerClasses,dy=Q.DigitalClock,fy=Q.DigitalClockItem,py=Q.digitalClockClasses,my=Q.getDigitalClockUtilityClass,hy=Q.MultiSectionDigitalClock,gy=Q.multiSectionDigitalClockSectionClasses,_y=Q.multiSectionDigitalClockClasses,vy=Q.getMultiSectionDigitalClockUtilityClass,yy=Q.LocalizationProvider,by=Q.PickerDay,xy=Q.getPickerDayUtilityClass,Sy=Q.pickerDayClasses,Cy=Q.DateField,wy=Q.unstable_useDateField,Ty=Q.TimeField,Ey=Q.unstable_useTimeField,Dy=Q.DateTimeField,Oy=Q.unstable_useDateTimeField,ky=Q.DateCalendar,Ay=Q.getDateCalendarUtilityClass,jy=Q.dateCalendarClasses,My=Q.dayCalendarClasses,Ny=Q.pickersFadeTransitionGroupClasses,Py=Q.pickersSlideTransitionClasses,Fy=Q.MonthCalendar,Iy=Q.monthCalendarClasses,Ly=Q.getMonthCalendarUtilityClass,Ry=Q.YearCalendar,zy=Q.yearCalendarClasses,By=Q.getYearCalendarUtilityClass,Vy=Q.DayCalendarSkeleton,Hy=Q.dayCalendarSkeletonClasses,Uy=Q.getDayCalendarSkeletonUtilityClass,Wy=Q.DatePicker,Gy=Q.DatePickerToolbar,Ky=Q.datePickerToolbarClasses,qy=Q.DesktopDatePicker,Jy=Q.MobileDatePicker,Yy=Q.StaticDatePicker,Xy=Q.TimePicker,Zy=Q.TimePickerToolbar,Qy=Q.timePickerToolbarClasses,$y=Q.DesktopTimePicker,eb=Q.MobileTimePicker,tb=Q.StaticTimePicker,nb=Q.DateTimePicker,rb=Q.DateTimePickerTabs,ib=Q.dateTimePickerTabsClasses,ab=Q.DateTimePickerToolbar,ob=Q.dateTimePickerToolbarClasses,sb=Q.DesktopDateTimePicker,cb=Q.DesktopDateTimePickerLayout,lb=Q.MobileDateTimePicker,ub=Q.StaticDateTimePicker,db=Q.renderDateViewCalendar,fb=Q.renderTimeViewClock,pb=Q.renderDigitalClockTimeView,mb=Q.renderMultiSectionDigitalClockTimeView,hb=Q.PickersLayout,gb=Q.PickersLayoutRoot,_b=Q.PickersLayoutContentWrapper,vb=Q.usePickerLayout,yb=Q.pickersLayoutClasses,bb=Q.PickersActionBar,xb=Q.PickersShortcuts,Sb=Q.pickersCalendarHeaderClasses,Cb=Q.PickersCalendarHeader,wb=Q.PickersTextField,Tb=Q.pickersTextFieldClasses,Eb=Q.getPickersTextFieldUtilityClass,Db=Q.PickersInput,Ob=Q.getPickersInputUtilityClass,kb=Q.pickersInputClasses,Ab=Q.PickersFilledInput,jb=Q.getPickersFilledInputUtilityClass,Mb=Q.pickersFilledInputClasses,Nb=Q.PickersOutlinedInput,Pb=Q.getPickersOutlinedInputUtilityClass,Fb=Q.pickersOutlinedInputClasses,Ib=Q.PickersInputBase,Lb=Q.pickersInputBaseClasses,Rb=Q.getPickersInputBaseUtilityClass,zb=Q.Unstable_PickersSectionList,Bb=Q.Unstable_PickersSectionListRoot,Vb=Q.Unstable_PickersSectionListSection,Hb=Q.Unstable_PickersSectionListSectionSeparator,Ub=Q.Unstable_PickersSectionListSectionContent,Wb=Q.getPickersSectionListUtilityClass,Gb=Q.pickersSectionListClasses,Kb=Q.ArrowDropDownIcon,qb=Q.ArrowLeftIcon,Jb=Q.ArrowRightIcon,Yb=Q.CalendarIcon,Xb=Q.ClockIcon,Zb=Q.DateRangeIcon,Qb=Q.TimeIcon,$b=Q.ClearIcon,ex=Q.usePickerTranslations,tx=Q.useSplitFieldProps,nx=Q.useParsedFormat,rx=Q.usePickerContext,ix=Q.usePickerActionsContext,ax=Q.useIsValidValue,ox=Q.usePickerAdapter,sx=Q.validateDate,cx=Q.validateTime,lx=Q.validateDateTime,ux=Q.extractValidationProps,dx=Q.useValidation,fx=Q.useDateManager,px=Q.useTimeManager,mx=Q.useDateTimeManager,hx=Reflect.get(ny,`default`)??ny,gx=`__mf_module_cache__`;globalThis[gx]||={share:{},remote:{}},globalThis[gx].share||={},globalThis[gx].remote||={};var _x=globalThis[gx];for(let e of Object.keys(_x.share))if(e.startsWith(`default:`)){let t=e.slice(8);_x.share[t]===void 0&&(_x.share[t]=_x.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;_x.share[t]===void 0&&(_x.share[t]=_x.share[e])}var vx=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},yx=Symbol.for(`module-federation.shared-cache-listeners`),bx=e=>{let t=e[yx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,yx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},xx=(e,t,n)=>{let r=bx(e);(r[t.canonical]||=new Set).add(n)},Sx=Symbol.for(`module-federation.shared-cache-owners`),Cx=e=>{let t=e[Sx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,Sx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},wx=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[Sx];r===void 0?o&&delete o[t.canonical]:Cx(e)[t.canonical]=r;let s=(i=e[yx])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Tx=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},Ex=vx(_x.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]});Ex===void 0&&(Ex=Tx(ry),wx(_x.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Ex,`ConfigCustomJavascriptSet`));var Dx,Ox,kx,Ax=e=>{e.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,e.TimeClock,e.clockClasses,e.clockNumberClasses,e.timeClockClasses,e.getTimeClockUtilityClass,e.clockPointerClasses,e.DigitalClock,e.DigitalClockItem,e.digitalClockClasses,e.getDigitalClockUtilityClass,e.MultiSectionDigitalClock,e.multiSectionDigitalClockSectionClasses,e.multiSectionDigitalClockClasses,e.getMultiSectionDigitalClockUtilityClass,Dx=e.LocalizationProvider,e.PickerDay,e.getPickerDayUtilityClass,e.pickerDayClasses,e.DateField,e.unstable_useDateField,e.TimeField,e.unstable_useTimeField,e.DateTimeField,e.unstable_useDateTimeField,e.DateCalendar,e.getDateCalendarUtilityClass,e.dateCalendarClasses,e.dayCalendarClasses,e.pickersFadeTransitionGroupClasses,e.pickersSlideTransitionClasses,e.MonthCalendar,e.monthCalendarClasses,e.getMonthCalendarUtilityClass,e.YearCalendar,e.yearCalendarClasses,e.getYearCalendarUtilityClass,e.DayCalendarSkeleton,e.dayCalendarSkeletonClasses,e.getDayCalendarSkeletonUtilityClass,Ox=e.DatePicker,e.DatePickerToolbar,e.datePickerToolbarClasses,e.DesktopDatePicker,e.MobileDatePicker,e.StaticDatePicker,kx=e.TimePicker,e.TimePickerToolbar,e.timePickerToolbarClasses,e.DesktopTimePicker,e.MobileTimePicker,e.StaticTimePicker,e.DateTimePicker,e.DateTimePickerTabs,e.dateTimePickerTabsClasses,e.DateTimePickerToolbar,e.dateTimePickerToolbarClasses,e.DesktopDateTimePicker,e.DesktopDateTimePickerLayout,e.MobileDateTimePicker,e.StaticDateTimePicker,e.renderDateViewCalendar,e.renderTimeViewClock,e.renderDigitalClockTimeView,e.renderMultiSectionDigitalClockTimeView,e.PickersLayout,e.PickersLayoutRoot,e.PickersLayoutContentWrapper,e.usePickerLayout,e.pickersLayoutClasses,e.PickersActionBar,e.PickersShortcuts,e.pickersCalendarHeaderClasses,e.PickersCalendarHeader,e.PickersTextField,e.pickersTextFieldClasses,e.getPickersTextFieldUtilityClass,e.PickersInput,e.getPickersInputUtilityClass,e.pickersInputClasses,e.PickersFilledInput,e.getPickersFilledInputUtilityClass,e.pickersFilledInputClasses,e.PickersOutlinedInput,e.getPickersOutlinedInputUtilityClass,e.pickersOutlinedInputClasses,e.PickersInputBase,e.pickersInputBaseClasses,e.getPickersInputBaseUtilityClass,e.Unstable_PickersSectionList,e.Unstable_PickersSectionListRoot,e.Unstable_PickersSectionListSection,e.Unstable_PickersSectionListSectionSeparator,e.Unstable_PickersSectionListSectionContent,e.getPickersSectionListUtilityClass,e.pickersSectionListClasses,e.ArrowDropDownIcon,e.ArrowLeftIcon,e.ArrowRightIcon,e.CalendarIcon,e.ClockIcon,e.DateRangeIcon,e.TimeIcon,e.ClearIcon,e.usePickerTranslations,e.useSplitFieldProps,e.useParsedFormat,e.usePickerContext,e.usePickerActionsContext,e.useIsValidValue,e.usePickerAdapter,e.validateDate,e.validateTime,e.validateDateTime,e.extractValidationProps,e.useValidation,e.useDateManager,e.useTimeManager,e.useDateTimeManager,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};xx(_x.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Ax),Ax(Ex),g();var jx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e)try{let t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return _.createElement(Ox,{sx:t=>({width:`100%`,borderBottom:`1px solid ${e?`#F00`:t.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${t.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace(`mm`,`MM`),disabled:!!t,value:this.state.value||null,onChange:e=>this.setState({value:e},()=>{try{if(this.props.attr){let e=this.state.value.toISOString();this.onChange(this.props.attr,e).catch(e=>console.warn(`Error saving value for ${this.props.attr}:`,e))}}catch{}}),label:this.getText(this.props.schema.label)})}};g();var Mx=class extends X{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){let e=this.props.oContext.DeviceManager;return _.createElement(e,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return _.createElement(`div`,null,`DeviceManager not found`)}};g();var Nx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 42px)`},fullWidthTwoButtons:{width:`calc(100% - 84px)`},fullWidthThreeButtons:{width:`calc(100% - 126x)`},dropZone:{width:`100%`,height:`100%`,position:`absolute`},dropZoneEmpty:{},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadDiv:{position:`relative`,width:`100%`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`100%`,height:`100%`,position:`absolute`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},disabledOpacity:{opacity:.3,cursor:`default`},error:{border:`2px solid red`},deleteButton:{},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},Px=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Fx=[`mp3`,`ogg`,`wav`,`aac`],Ix=[`avi`,`mp4`,`mov`],Lx=[`txt`,`log`,`html`,`htm`],Rx=[`json`,`js`,`ts`],zx=class e extends X{constructor(e){super(e),K(this,`dropzoneRef`,void 0),K(this,`imagePrefix`,void 0),K(this,`objectID`,void 0),K(this,`path`,void 0),K(this,`onFolderChanged`,(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(e=>console.error(`Cannot update files: ${e}`))}),this.state={...this.state,deleteFile:``},this.dropzoneRef=_.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??`./files`}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||`0_userdata.0`).replace(`%INSTANCE%`,(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload||``,this.path&&(this.path===`/`?this.path=``:this.path.endsWith(`/`)||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`))})}componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){let e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{let i=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,``));for(let a=0;a<i.length;a++){let o=i[a];if(o.isDir)await this.readFolder(`${e+o.file}/`,t,n);else{let i=!1;if(i=n===`*.*`&&o.file.includes(`.`)||!n||n===`*`||n===`.*`&&o.file.startsWith(`.`)?!0:RegExp(`^${n.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(o.file),i){var r;t.push({name:e+o.file,size:(r=o.stats)!=null&&r.size?Zt.formatBytes(o.stats.size):`--`})}}}}catch(t){console.error(`Cannot read "${e}": ${t}`)}return t}async readFiles(e){let t=[];e||=this.props.schema.pattern,e||=`**/*.*`;let n,r=e.lastIndexOf(`/`);if(n=r===-1?e:e.substring(r+1),e.startsWith(`**`))await this.readFolder(`/`,t,n);else{let r=e.lastIndexOf(`/`);if(r===-1)await this.readFolder(`/`,t,n);else{let i=e.substring(0,r+1);await this.readFolder(i,t,n)}}return t}onDrop(e){let t=e[0],n=new FileReader,r=this.props.schema.maxSize||2097152;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>r){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(r/1024)));return}let e=n.result;if(e===null){console.error(`Cannot read file ${t.name}`);return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,e).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(e=>window.alert(`Cannot upload file: ${e}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?_.createElement(bn,{title:J.t(`jc_Are you sure?`),text:J.t(`jc_File will be deleted`),ok:J.t(`jc_Delete`),cancel:J.t(`jc_Cancel`),onClose:e=>{let t=this.state.deleteFile;this.setState({deleteFile:``},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(e=>window.alert(`Cannot delete file: ${e}`))})}}):null}static base64ToArrayBuffer(e){let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}loadFile(){return this.props.oContext.socket.readFile(this.objectID,this.state.value,!0)}play(){this.loadFile().then(t=>{if(typeof AudioContext<`u`){let n=new AudioContext,r=e.base64ToArrayBuffer(t.file);n.decodeAudioData(r,e=>{let t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getFileIcon(e){return e!=null&&e.extension?Px.includes(e.extension)?_.createElement(`div`,{style:{...Nx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Fx.includes(e.extension)?_.createElement(zt,null):Lx.includes(e.extension)?_.createElement(Xn,null):Ix.includes(e.extension)?_.createElement(Xe,null):Rx.includes(e.extension)?_.createElement(ze,null):null:null}renderItem(e,t){if(!this.state.files)return null;let n=[];this.props.schema.withFolder||this.state.files.forEach(e=>{let t=e.name.lastIndexOf(`/`);if(t===-1)n.includes(`/`)||n.push(`/`);else{let r=e.name.substring(0,t+1);n.includes(r)||n.push(r)}});let r=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&n.length===1?`${e.name.substring(n[0].length)}`:`${e.name}${this.props.schema.noSize?``:`(${e.size})`}`,extension:e.name.toLowerCase().split(`.`).pop()}));this.props.schema.noNone||r.unshift({label:J.t(`jc_none`),value:``});let i=r.find(e=>e.value===this.state.value),a=0;this.props.schema.upload&&a++,this.props.schema.refresh&&a++;let o=this.state.value&&(this.state.value.endsWith(`.mp3`)||this.state.value.endsWith(`.ogg`)||this.state.value.endsWith(`.wav`));o&&a++;let s=_.createElement(`div`,{style:Nx.fullWidth},_.createElement(Wt,{variant:`standard`,style:{width:`calc(100% - ${a*42}px)`}},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>_.createElement(_.Fragment,null,this.getFileIcon(i),_.createElement(`span`,null,(i==null?void 0:i.label)||``)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},r.map(e=>_.createElement(z,{key:e.value,value:e.value},_.createElement(te,null,this.getFileIcon(e)),_.createElement(er,null,e.label),this.props.schema.delete&&e.value?_.createElement(Zn,{style:Nx.deleteButton,size:`small`,onClick:t=>{t.stopPropagation(),this.setState({deleteFile:e.value})}},_.createElement(me,null)):null))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&_.createElement(Zn,{onClick:()=>this.updateFiles()},_.createElement(ar,null)),this.props.schema.upload&&_.createElement(Zn,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},_.createElement(nr,null)),o&&_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)));if(!this.props.schema.upload)return _.createElement(_.Fragment,null,s,this.renderDeleteDialog());let c={"*/*":[]};if(this.props.schema.fileTypes===`image`?c={"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:this.props.schema.fileTypes===`audio`?c={"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:this.props.schema.fileTypes===`text`&&(c={"text/plain":[`.txt`]}),this.props.schema.pattern){let e=(this.props.schema.pattern.split(`/`).pop()||``).toLowerCase().replace(/.*\./,``);c=e===`png`||e===`jpg`||e===`svg`||e===`gif`||e===`apng`||e===`avif`||e===`webp`?{"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:e===`mp3`||e===`ogg`||e===`wav`?{"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:e===`ics`?{"text/calendar":[`.ics`]}:e===`txt`?{"text/plain":[`.txt`]}:e===`pem`?{"text/plain":[`.pem`]}:{"*/*":[`.${e}`]}}return _.createElement(or,{ref:this.dropzoneRef,multiple:!1,accept:c,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2097152,onDragEnter:()=>{this.setState({uploadFile:`dragging`})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:n})=>_.createElement(`div`,{style:{...Nx.uploadDiv,...this.state.uploadFile===`dragging`?Nx.uploadDivDragging:void 0,...t?Nx.disabledOpacity:void 0},...e()},_.createElement(`input`,{...n()}),this.state.uploadFile===`dragging`?_.createElement(`div`,{style:{...Nx.uploadCenterDiv,...this.state.uploadError?Nx.error:void 0}},_.createElement(`div`,{style:Nx.uploadCenterTextAndIcon},_.createElement(nr,{style:Nx.uploadCenterIcon}),_.createElement(`div`,{style:Nx.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`)))):null,s,this.renderDeleteDialog()))}};g();var Bx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 69px)`,marginRight:4},fullWidthIcon:{width:`calc(100% - 119px)`,marginRight:4},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},Vx=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Hx=[`mp3`,`ogg`,`wav`,`aac`],Ux=[`avi`,`mp4`,`mov`],Wx=[`txt`,`log`,`html`,`htm`],Gx=[`json`,`js`,`ts`],Kx=class extends X{constructor(...e){super(...e),K(this,`imagePrefix`,`../..`)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??`./files`,this.setState({value:e??``})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||``).toString().trim()?{value:n??``}:null}loadFile(){let e=this.state.value.indexOf(`/`);if(e!==-1){let t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<`u`&&e!=null&&e.file){let t=new AudioContext,n=zx.base64ToArrayBuffer(e.file);t.decodeAudioData(n,e=>{let n=t.createBufferSource();n.buffer=e,n.connect(t.destination),n.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getIcon(){let e=this.state.value.split(`.`).pop().toLowerCase();return Vx.includes(e)?_.createElement(`div`,{style:{...Bx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Hx.includes(e)?_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)):Wx.includes(e)?_.createElement(Xn,null):Ux.includes(e)?_.createElement(Xe,null):Gx.includes(e)?_.createElement(ze,null):null}renderFileBrowser(){return this.state.showFileBrowser?_.createElement(zn,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:Bx.fullWidth},n,_.createElement(ot,{variant:`standard`,style:n?Bx.fullWidthIcon:Bx.fullWidthOneButton,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),_.createElement(xt,{disabled:t,variant:`outlined`,onClick:()=>this.setState({showFileBrowser:!0})},`...`),this.renderFileBrowser())}};g();var qx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`functions`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.functions.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Jx=class extends X{constructor(...e){super(...e),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){let n=this.props.schema.url||X.getValue(this.props.data,this.props.attr);return _.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}}))}};g();var Yx=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({url:e||``}))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url?_.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}})):null}};g();var Xx=class extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.common)!=null&&e.host&&this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(e=>e.address!==`0.0.0.0`&&e.address!==`::`)),this.props.schema.onlyIp4?e=e.filter(e=>e.family===`ipv4`):this.props.schema.onlyIp6&&(e=e.filter(e=>e.family===`ipv6`)),this.props.schema.noInternal&&(e=e.filter(e=>!e.internal)),e.forEach(e=>{e.address===`0.0.0.0`?e.name=`[IPv4] 0.0.0.0 - ${J.t(`jc_Listen on all IPs`)}`:e.address===`::`&&(e.name=`[IPv6] :: - ${J.t(`jc_Listen on all IPs`)}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr),a=(n=this.state.ips)==null?void 0:n.find(e=>e.address===i);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.state.ips&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.ips?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>(a==null?void 0:a.name)||e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},(r=this.state.ips)==null?void 0:r.map((e,t)=>_.createElement(z,{key:t,value:e.address},e.name))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Zx=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({image:e||``})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?_.createElement(`div`,{style:{width:this.props.schema.width||`100%`,height:this.props.schema.height,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:_.createElement(Mt,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||`100%`,height:this.props.schema.height}})}};g();var Qx=class extends X{constructor(e){super(e),K(this,`index`,void 0),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.attr&&this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port===`3000`&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{let t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(gn,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||262144,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(e=>console.error(e))}}),onChange:e=>this.setState({value:e},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else e.startsWith(`data`)&&(e=e.split(`,`)[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,e).catch(e=>console.error(e))}})}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var $x=class extends X{renderItem(){return _.createElement(qn,{type:this.props.schema.boxType||`info`,closeable:this.props.schema.closeable===void 0||this.props.schema.closeable,storeId:this.props.schema.closed===void 0?`${!!this.props.oContext.adapterName} ${this.props.attr}`:void 0,closed:this.props.schema.closed,style:{width:`100%`,...this.props.schema.style}},this.props.schema.title?_.createElement(vt,{component:`div`,sx:{fontWeight:`bold`,fontSize:`larger`}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}};g();var eS={icon:{width:20,height:20,marginRight:4}},tS=class extends X{constructor(...e){super(...e),K(this,`onInstancesUpdate`,(e,t)=>{var n;if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;let r=this.props.schema.long?e:this.props.schema.short?e.split(`.`).pop():e.replace(/^system\.adapter\./,``),i=((n=this.state.selectOptions)==null?void 0:n.findIndex(e=>e.value===r))??-1;if(t){if(this.props.schema.adapter===`_dataSources`&&(!t.common||!t.common.getHistory))return;if(i===-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),n=typeof t.common.name==`object`?t.common.name[J.getLanguage()]||t.common.name.en:t.common.name;e.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(`.`).pop()||``:t._id.replace(/^system\.adapter\./,``),label:`${n} [${t._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${n}/${t.common.icon}`}),e.sort((e,t)=>e.label>t.label?1:e.label<t.label?-1:0),this.setState({selectOptions:e})}}else if(i!==-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),t={};this.state.value===e[i].value&&(t.value=X.NONE_VALUE),e.splice(i,1),t.selectOptions=e,this.setState(t)}})}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.adapter;t===`_dataSources`&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter===`_dataSources`?n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.getHistory}):this.props.schema.adapter?n=n.filter(e=>e==null?void 0:e._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(e=>{var t,n;return(t=this.props.schema.adapters)==null?void 0:t.includes(e==null||(n=e.common)==null?void 0:n.name)})),this.props.schema.onlyEnabled&&(n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.enabled}));let r=n.map(e=>({value:this.props.schema.long?e._id:this.props.schema.short?e._id.split(`.`).pop()||``:e._id.replace(/^system\.adapter\./,``),label:`${e.common.name} [${e._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${e.common.name}/${e.common.icon}`}));r.sort((e,t)=>e.value>t.value?1:e.value<t.value?-1:0),this.props.schema.allowDeactivate!==!1&&r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.props.schema.all&&r.unshift({label:J.t(`sch_all`),value:`*`}),this.setState({value:e||``,selectOptions:r}),await this.props.oContext.socket.subscribeObject(`system.adapter.${t?`${t}.`:``}*`,this.onInstancesUpdate)}).catch(e=>console.error(`Cannot get instances: ${e}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject(`system.adapter.*`,this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}renderItem(e,t){var n;if(!this.state.selectOptions)return null;let r=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{fullWidth:!0,key:this.props.attr,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>_.createElement(`span`,{style:{display:`flex`}},r!=null&&r.icon?_.createElement(Mt,{src:`./${r.icon}`,style:eS.icon}):null,this.getText(r==null?void 0:r.label,!0)),onChange:e=>this.setState({value:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},e.icon?_.createElement(Mt,{src:`./${e.icon}`,style:eS.icon}):null,this.getText(e.label,!0)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var nS={address:{fontSize:`smaller`,opacity:.5,marginLeft:8}},rS=class extends X{async componentDidMount(){var e;if(await super.componentDidMount(),(e=this.props.common)!=null&&e.host)try{var t,n,r;let e=await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,`system.host.${this.props.common.host}`)),i=[];if(e!=null&&(r=e.native)!=null&&(r=r.hardware)!=null&&r.networkInterfaces){let t=e.native.hardware.networkInterfaces;Object.keys(t).forEach(e=>{var n,r,a,o;if(this.props.schema.ignoreInternal&&!((n=t[e])!=null&&n.find(e=>!e.internal))||this.props.schema.ignoreLoopback&&(r=t[e])!=null&&r.find(e=>e.address===`127.0.0.1`||e.address===`::1`))return;let s=(a=t[e])==null?void 0:a.find(e=>e.family===`IPv4`);s||=(o=t[e])==null?void 0:o.find(e=>e.family===`IPv6`),i.push({value:e,address:(s==null?void 0:s.address)||``})})}this.setState({interfaces:i})}catch(e){window.alert(`Cannot read interfaces: ${e}`)}}renderItem(e,t){var n,r,i;let a=X.getValue(this.props.data,this.props.attr),o=(n=this.state.interfaces)==null?void 0:n.find(e=>e.value===a);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},(r=this.state.interfaces)!=null&&r.length&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,(i=this.state.interfaces)!=null&&i.length?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:a,renderValue:e=>o?_.createElement(`span`,null,o.value,_.createElement(`span`,{style:nS.address},o.address)):e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},this.state.interfaces.map((e,t)=>_.createElement(z,{key:t,value:e.value},_.createElement(`span`,null,e.value,_.createElement(`span`,{style:nS.address},e.address))))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:a,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var iS={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:`absolute`,right:8,top:8},languageButtonActive:{color:`primary.main`}},aS=({toggleTranslation:e,noTranslation:t,title:n,fullWidth:r,help:i,maxWidth:o,progress:s,applyDisabled:c,applyButton:l,onClose:d,children:f,titleButtonApply:p,titleButtonClose:m,onApply:h,textInput:g,defaultValue:v,overflowHidden:y})=>{let[b,x]=u(v);a(()=>{x(v)},[v]);let S=ht(),C=be(S.breakpoints.down(`md`));return _.createElement(nn,{open:!0,maxWidth:C?!1:o||`md`,fullWidth:!!r,fullScreen:C,onClose:d,sx:{"& .MuiPaper-root":C?{}:iS.modalDialog}},n&&_.createElement(Nt,null,n,J.getLanguage()!==`en`&&e?_.createElement(Zn,{size:`large`,style:{...iS.languageButton,...t?iS.languageButtonActive:{}},onClick:()=>e(),title:J.t(`jc_Disable/Enable translation`)},_.createElement(Kn,null)):null),_.createElement(Tn,{sx:{...y?iS.overflowHidden:{},...iS.content},style:{paddingTop:8}},g&&_.createElement(ot,{autoComplete:`off`,fullWidth:!0,autoFocus:!0,variant:`outlined`,size:`medium`,multiline:!0,value:b,onChange:e=>x(e.target.value)}),f,i?_.createElement(`div`,null,i):null),_.createElement(Et,null,l!==!1&&_.createElement(xt,{startIcon:_.createElement(on,null),disabled:s||c&&v===b,onClick:()=>h==null?void 0:h(g&&b||``),variant:`contained`,color:`primary`},J.t(p||`jc_Ok`)),_.createElement(xt,{color:`grey`,onClick:()=>d&&d(),disabled:s,variant:`contained`,startIcon:_.createElement(De,null)},J.t(m||`jc_Cancel`))))},oS=n(r(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
|
|
18
|
+
`+t+`]`}return r.pop(),i=t,c}}}}))})),ks=r(((e,t)=>{t.exports={}})),As=r(((t,n)=>{(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof e==`function`)try{r=ks()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t==n?e.length*4:t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),js=r(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(As()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})}));pe();var Ms=n(Os()),Ns=n(js());g();var Ps=window.innerWidth<=600?12:void 0,Fs={add:()=>_.createElement(re,null),auth:()=>_.createElement(Ht,null),backlight:()=>_.createElement(Ue,null),book:()=>_.createElement(Ft,null),delete:()=>_.createElement(me,null),dimmer:()=>_.createElement(k,null),edit:()=>_.createElement(Ke,null),error:()=>_.createElement(ur,null),group:()=>_.createElement(pt,null),help:()=>_.createElement(yt,null),identify:()=>_.createElement(Mn,null),info:()=>_.createElement(E,null),light:()=>_.createElement(Cn,null),lines:()=>_.createElement($e,null),next:()=>_.createElement(Re,null),open:()=>_.createElement(jn,null),pair:()=>_.createElement(Rn,null),pause:()=>_.createElement(yn,null),play:()=>_.createElement(Xt,null),previous:()=>_.createElement(fn,null),qrcode:()=>_.createElement(jt,null),refresh:()=>_.createElement(ar,null),save:()=>_.createElement(ne,null),search:()=>_.createElement(tr,null),send:()=>_.createElement(rt,null),settings:()=>_.createElement(V,null),socket:()=>_.createElement(wt,null),stop:()=>_.createElement(M,null),unpair:()=>_.createElement(an,null),upload:()=>_.createElement(nr,null),user:()=>_.createElement(en,null),warning:()=>_.createElement(et,null),web:()=>_.createElement(Qn,null)};function Is(e){return Object.prototype.toString.call(e)===`[object Object]`}var X=class e extends s{constructor(t){super(t),K(this,`defaultValue`,void 0),K(this,`isError`,void 0),K(this,`lang`,void 0),K(this,`defaultSendToDone`,void 0),K(this,`sendToTimeout`,void 0),K(this,`noPlaceRequired`,void 0),K(this,`reportedHidden`,!1),K(this,`calculateTimeout`,null),K(this,`AsyncFunction`,void 0),K(this,`onUpdate`,t=>{let n=e.getValue(t||this.props.data,this.props.attr)||``;this.state.value===n?this.forceUpdate():this.setState({value:n})}),K(this,`getObject`,async e=>{try{var t,n;return await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,e))||null}catch(e){return console.error(e),null}}),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=J.getLanguage(),t.schema&&(t.custom?t.schema.defaultFunc||(this.defaultValue=t.schema.default):t.schema.type!==`state`&&!t.schema.defaultFunc&&(this.defaultValue=t.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t;if((t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):this.props.schema.type!==`state`&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`))),this.props.attr){var n,r;(n=(r=this.props.oContext).registerOnForceUpdate)==null||n.call(r,this.props.attr,this.onUpdate)}let i=[`select`,`autocomplete`,`autocompleteSendTo`];if(this.defaultValue!==void 0&&this.props.attr){let t=e.getValue(this.props.data,this.props.attr);(t===void 0||i.includes(this.props.schema.type)&&(t===``||t===null))&&setTimeout(()=>{this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(e.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))},100)}else this.props.schema.defaultSendTo&&this.defaultSendTo().catch(e=>console.error(e))}async defaultSendTo(){if(this.props.alive&&this.props.schema.defaultSendTo){this.defaultSendToDone=!0;let t=this.props.schema.data;if(t===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{t=JSON.parse(e)}catch{console.error(`Cannot parse json data: ${e}`)}}else t={attr:this.props.attr,value:e.getValue(this.props.data,this.props.attr)};t===void 0&&(t=null);let n=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(n!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${n}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,n));return}}try{let r=await this.props.oContext.socket.sendTo(n,this.props.schema.defaultSendTo,t);r!=null&&this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,r,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(e.setValue(this.props.data,this.props.attr,r),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))}catch(e){console.error(e)}}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()))}componentWillUnmount(){if(this.props.attr){var e,t;(e=(t=this.props.oContext).registerOnForceUpdate)==null||e.call(t,this.props.attr)}this.sendToTimeout&&=(clearTimeout(this.sendToTimeout),null),this.calculateTimeout&&=(clearTimeout(this.calculateTimeout),null)}static getValue(t,n){if(!n)return;if(typeof n==`string`)return e.getValue(t,n.split(`.`));if(n.length===1)return t[n[0]];let r=n.shift();if(typeof r==`string`&&typeof t[r]==`object`)return e.getValue(t[r],n)}static setValue(t,n,r){if(n){if(typeof n==`string`){e.setValue(t,n.split(`.`),r);return}if(n.length===1)r===null?delete t[n[0]]:t[n[0]]=r;else{let i=n.shift();if(typeof i!=`string`)return;(!t[i]||typeof t[i]==`object`)&&(t[i]=t[i]||{}),e.setValue(t[i],n,r)}}}getText(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPattern(n,void 0,t):n}if(e&&typeof e==`object`){let n=e;return n.func?typeof n.func==`object`?this.getPattern(n.func[this.lang]||n.func.en||``,void 0,!0):this.getPattern(n.func,void 0,t):e[this.lang]||e.en||``}return e.toString()}async getTextAsync(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return Is(e)?e.func?typeof e.func==`object`?this.getPatternAsync(e.func[this.lang]||e.func.en||``,null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||``:e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let t=this.state.confirmData||this.props.schema.confirm;if(!t)return null;let n=null;return t.type===`warning`?n=_.createElement(et,null):t.type===`error`?n=_.createElement(ur,null):t.type===`info`&&(n=_.createElement(E,null)),_.createElement(bn,{title:this.getText(t.title)||J.t(`jc_Please confirm`),text:this.getText(t.text),ok:this.getText(t.ok)||J.t(`jc_Ok`),cancel:this.getText(t.cancel)||J.t(`jc_Cancel`),icon:n||void 0,onClose:t=>this.setState({confirmDialog:!1},()=>{if(t){if(this.state.confirmCallback){let e=this.state.confirmCallback;this.setState({confirmCallback:null},()=>e(!0));return}let t=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&e.setValue(t,this.state.confirmDepAttr,this.state.confirmDepNewValue),e.setValue(t,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(t))}else{let e=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{e&&e(!1)})}})})}getIcon(e){if(e||=this.props.schema.icon,!e)return null;let t=Fs[e];return t?t():((e.endsWith(`.png`)||e.endsWith(`.svg`)||e.endsWith(`.jpg`))&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),_.createElement(Mt,{src:e,style:{width:22,height:22}}))}onChangeAsync(e,t){return new Promise(n=>{let r=this.onChange(e,t,n);r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))})}async onChange(t,n,r){let i=JSON.parse(JSON.stringify(this.props.data));if(e.setValue(i,t,n),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmData:null},()=>{typeof r==`function`?r():e()})});if(this.props.schema.confirmDependsOn)for(let a=0;a<this.props.schema.confirmDependsOn.length;a++){let o=this.props.schema.confirmDependsOn[a];if(o.confirm){let a=e.getValue(i,o.attr);if(await this.execute(o.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{if(!o.confirm)throw Error(`Cannot set value: confirm is not defined for ${o.attr}`);this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmDepNewValue:a,confirmDepAttr:o.attr,confirmData:o.confirm},()=>{typeof r==`function`?r():e()})})}}let a=[];if(this.props.schema.onChangeDependsOn)for(let t=0;t<this.props.schema.onChangeDependsOn.length;t++){let n=this.props.schema.onChangeDependsOn[t];if(n.onChange){let t=e.getValue(i,n.attr),r;r=this.props.custom?await this.executeCustom(n.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(n.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`),r!==t&&n.attr&&(e.setValue(i,n.attr,r),a.push(n.attr))}}if(this.props.schema.hiddenDependsOn)for(let e=0;e<this.props.schema.hiddenDependsOn.length;e++){let t=this.props.schema.hiddenDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.labelDependsOn)for(let e=0;e<this.props.schema.labelDependsOn.length;e++){let t=this.props.schema.labelDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.helpDependsOn)for(let e=0;e<this.props.schema.helpDependsOn.length;e++){let t=this.props.schema.helpDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.onChange&&!this.props.schema.onChange.ignoreOwnChanges){let t=e.getValue(i,this.props.attr),n=this.props.custom?await this.executeCustom(this.props.schema.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(this.props.schema.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`);n!==t&&e.setValue(i,this.props.attr,n)}return this.props.custom?(this.props.onChange(t,n,()=>r==null?void 0:r()),a!=null&&a.length&&a.forEach((t,n)=>setTimeout(()=>this.props.onChange(t,e.getValue(i,t)),n*50))):this.props.onChange(i,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,i),r==null||r()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?<![\w$.])getObject\(/g,(t,n)=>{let r=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(r)?t:`await ${t}`})}debugLog(e,t,n,r){var i,a;if(!((i=this.props.schema)!=null&&i.debug))return;let o=this.props.attr||((a=this.props.schema)==null?void 0:a.attr)||``,s=`%c[jsonConfig]%c ${o?`${o} → `:``}${e}`,c={function:t,result:n,data:r??this.props.data,arrayIndex:this.props.arrayIndex};n instanceof Error?console.error(s,`background:#b71c1c;color:#fff;border-radius:3px;padding:1px 4px`,`color:#e53935`,c):console.log(s,`background:#33691e;color:#fff;border-radius:3px;padding:1px 4px`,`color:#7cb342`,c)}static isHostAllowed(e,t){if(!(e!=null&&e.os)&&!(e!=null&&e.notOs)&&(e==null?void 0:e.docker)===void 0)return!0;let n=t==null?void 0:t.os;return!(n&&(e.os&&!(Array.isArray(e.os)?e.os:[e.os]).includes(n)||e.notOs&&(Array.isArray(e.notOs)?e.notOs:[e.notOs]).includes(n))||e.docker!==void 0&&(t==null?void 0:t.docker)!==void 0&&e.docker!==t.docker)}async execute(t,n,r,i,a,o){let s;if(Is(t))s=t.func;else if(typeof t==`string`)s=t;else return t;if(!s)return n;s.includes(`getObject(`)&&(s=e.ensureAwaitGetObject(s));try{var c,l;let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`_alive`,`_common`,`_socket`,`_instance`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,s.includes(`return`)?s:`return ${s}`)(r||this.props.data||{},this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,i,a||{},this.props.changed,window.location.href,this.getObject,((c=this.props.oContext.hostInfo)==null?void 0:c.os)||``,((l=this.props.oContext.hostInfo)==null?void 0:l.arch)||``,this.props.oContext.hostInfo||{});return this.debugLog(o||`JS function`,s,e,r),e}catch(e){return this.debugLog(o||`JS function`,s,e instanceof Error?e:Error(String(e)),r),console.error(`Cannot execute ${JSON.stringify(t)}: ${e}`),n}}async executeCustom(t,n,r,i,a,o,s){let c;if(Is(t))c=t.func;else if(typeof t==`string`)c=t;else return t;if(!c)return null;c.includes(`getObject(`)&&(c=e.ensureAwaitGetObject(c));try{var l,u;let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,c.includes(`return`)?c:`return ${c}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,i||{},r||{},this.props.oContext.socket,a,o||{},this.props.changed,window.location.href,this.getObject,((l=this.props.oContext.hostInfo)==null?void 0:l.os)||``,((u=this.props.oContext.hostInfo)==null?void 0:u.arch)||``,this.props.oContext.hostInfo||{});return this.debugLog(s||`JS function`,c,e,n),e}catch(e){return this.debugLog(s||`JS function`,c,e instanceof Error?e:Error(String(e)),n),console.error(`Cannot execute ${c}: ${e}`),null}}async calculate(e){let t,n,r,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default),{error:t,disabled:n,hidden:r,defaultValue:i}}onError(e,t){var n,r;e&&(t?this.isError[e]=t:delete this.isError[e]),(n=(r=this.props).onError)==null||n.call(r,e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},this.getText(e,n)):(e=this.getText(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}static escapeString(t,n){return typeof t==`string`?(t=t.replace(/`/g,"\\`"),t=t.replace(/\${([^}]+)}/g,(t,r)=>{if(r&&typeof r==`string`&&r.startsWith(`data.`)){let t=e.getValue(n,r.replace(/^data\./,``));if(typeof t==`string`&&(t.includes(`\\`)||t.includes(`"`)))return`\${${r}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return t}),t):``}async getPatternAsync(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&(i=e.ensureAwaitGetObject(i));try{var a,o;if(this.props.custom){var s,c;let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject,((s=this.props.oContext.hostInfo)==null?void 0:s.os)||``,((c=this.props.oContext.hostInfo)==null?void 0:c.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`getObject`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject,((a=this.props.oContext.hostInfo)==null?void 0:a.os)||``,((o=this.props.oContext.hostInfo)==null?void 0:o.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}getPattern(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&console.warn(`It is not possible to use getObject function in text patterns: ${i}`);try{var a,o;if(this.props.custom){var s,c;let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,((s=this.props.oContext.hostInfo)==null?void 0:s.os)||``,((c=this.props.oContext.hostInfo)==null?void 0:c.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`_os`,`_arch`,`_host`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,((a=this.props.oContext.hostInfo)==null?void 0:a.os)||``,((o=this.props.oContext.hostInfo)==null?void 0:o.arch)||``,this.props.oContext.hostInfo||{});return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;let e=this.props.schema;if(!e)return;let{error:t,disabled:n,hidden:r,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==r||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:r,defaultValue:i}})},50)}render(){let t=this.props.schema;if(!t||this.props.expertMode===!1&&t.expertMode||!e.isHostAllowed(t,this.props.oContext.hostInfo)||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.defaultSendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),t.hideOnlyControl){let e=_.createElement(Jt,{size:{xs:t.xs||Ps,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0},style:{marginBottom:0,textAlign:`left`,...t.style,...this.props.oContext.themeType===`dark`?t.darkStyle:{}}});return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),e):e}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!0))},10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!1))},10)),t.validatorNoSaveOnError&&this.props.attr&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:!t.validatorErrorText||J.t(t.validatorErrorText)},setTimeout(e=>Object.keys(e).forEach(t=>this.props.onError(t,e[t])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));let n=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled||!1,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return n;let r=_.createElement(Jt,{title:this.getText(t.tooltip),size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0},style:{marginBottom:0,textAlign:`left`,width:t.type===`divider`||t.type===`header`?t.width||`100%`:void 0,...t.style,...this.props.oContext.themeType===`dark`?t.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?_.createElement(Jt,{container:!0,style:{width:`100%`}},_.createElement(Jt,{sx:{flex:1}},n),_.createElement(Jt,null,_.createElement(xt,{disabled:this.state.calculatedValues.disabled,variant:`outlined`,onClick:()=>this.defaultSendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):J.t(`jc_Request data by instance`)},this.getText(this.props.schema.button)))):n);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),this.renderDialogConfirm(),r):this.state.confirmDialog?_.createElement(_.Fragment,null,this.renderDialogConfirm(),r):r}};K(X,`DIFFERENT_VALUE`,`__different__`),K(X,`DIFFERENT_LABEL`,`jc___different__`),K(X,`NONE_VALUE`,``),K(X,`NONE_LABEL`,`jc_none`),g();var Ls={fullWidth:{width:`100%`},accordionSummary:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`}),accordionTitle:{},toolbar:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`,borderRadius:`3px`}),tooltip:{pointerEvents:`none`}},Rs=class extends X{constructor(e){super(e),K(this,`typingTimer`,null),K(this,`onAccordionError`,e=>(t,n)=>{let r={...this.state.accordionErrors};r[e]||(r[e]={}),t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({accordionErrors:r}),this.props.onError(t,n)}),K(this,`hasAccordionErrors`,e=>!!this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onChangeWrapper`,e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{if(this.typingTimer=null,this.props.attr){let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(e))}},300,e)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))}),K(this,`onExport`,()=>{let{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,r=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.json`,i=document.createElement(`a`);i.setAttribute(`href`,n),i.setAttribute(`download`,r),i.click()}),K(this,`onImport`,e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.json`,t.onchange=t=>{var n;let r=(n=t.target.files)==null?void 0:n[0];if(!r)return;let i=new FileReader;i.onload=t=>{try{var n;let r=JSON.parse((n=t.target)==null?void 0:n.result);if(!Array.isArray(r)){alert(J.t(`jc_Invalid JSON format. Expected an array.`));return}let i;i=e?r:[...this.state.value,...r],this.setState({value:i,activeIndex:-1},()=>this.onChangeWrapper(i))}catch{alert(J.t(`jc_Invalid JSON file.`))}},i.readAsText(r)},t.click()}),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),super.componentWillUnmount()}itemAccordion(e,t){let{value:n}=this.state,{schema:r}=this.props,i={type:`panel`,items:r.items.reduce((e,t)=>(t.attr&&(e[t.attr]=t),e),{}),style:{marginLeft:`-8px`,marginTop:`10px`,marginBottom:`10px`}};return _.createElement(RO,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(e,r)=>{if(typeof e==`string`&&e){let i=JSON.parse(JSON.stringify(n));i[t][e]=r,this.setState({value:i},()=>this.onChangeWrapper(i))}},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);let r=this.state.activeIndex-1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);let r=this.state.activeIndex+1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}renderItem(){let{schema:e}=this.props,{value:t}=this.state;return t?_.createElement(A,null,e.label||!e.noDelete?_.createElement(ue,{variant:`dense`},e.label?_.createElement(Pn,{variant:`h6`,id:`tableTitle`,component:`div`},this.getText(e.label)):null,e.noDelete?null:_.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Export configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onExport},_.createElement(it,null))),_.createElement(Ce,{title:J.t(`jc_Import and replace configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!0)},_.createElement(ut,null))),_.createElement(Ce,{title:J.t(`jc_Import and add configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!1)},_.createElement(ln,null))),_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null)))):null,t.map((n,r)=>_.createElement(Ae,{key:`${n}_${r}`,expanded:this.state.activeIndex===r,onChange:(e,t)=>this.setState({activeIndex:t?r:-1})},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,Ls.fullWidth,Ls.accordionSummary)},_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:1,width:`100%`}},e.titleAttr&&_.createElement(Pn,{style:Ls.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(r)&&_.createElement(ur,{sx:{fontSize:20,color:`error.main`}}))),_.createElement(xn,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[r],r),_.createElement(ue,{sx:Ls.toolbar},r?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:Ls.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(r)},_.createElement(hn,null))):_.createElement(`div`,{style:Ls.buttonEmpty}),r<t.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:Ls.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(r)},_.createElement(Ot,null))):_.createElement(`div`,{style:Ls.buttonEmpty}),e.noDelete?null:_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:Ls.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(r)},_.createElement(me,null))),e.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:Ls.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(r)},_.createElement(se,null))):null)))),!e.noDelete&&t.length>0?_.createElement(ue,{variant:`dense`,sx:Ls.rootTool},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null))):null,e.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}};g();var zs={root:{width:`100%`},notAlive:{color:`#a30000`}},Bs=class extends X{constructor(...e){super(...e),K(this,`aliveId`,null),K(this,`checkTimeout`,null),K(this,`onAliveChanged`,(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})})}async componentDidMount(){await super.componentDidMount();let e=await this.getInstance();this.aliveId=`${e}.alive`;let t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val),instance:e},async()=>{this.aliveId&&await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith(`system.adapter.`)&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){var e;if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;let t=(e=this.state.instance)==null?void 0:e.replace(/^system\.adapter\./,``);return _.createElement(`div`,{style:{...zs.root,...this.state.alive?void 0:zs.notAlive}},this.state.alive?this.props.schema.textAlive===void 0?J.t(`jc_Instance %s is alive`,t):this.props.schema.textAlive?J.t(this.props.schema.textAlive,t):``:this.props.schema.textNotAlive===void 0?J.t(`jc_Instance %s is not alive`,t):this.props.schema.textNotAlive?J.t(this.props.schema.textNotAlive,t):``)}};g();var Vs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)));if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)n.value!==X.DIFFERENT_VALUE&&(e[n.value]=this.getText(n.label));this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n,r=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE?([...this.state.value].filter(e=>!r.find(t=>typeof t==`object`?t.value===e:t===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>typeof e==`object`?e.value==this.state.value:e==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),_.createElement(un,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:r,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||this.getText(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},getOptionLabel:e=>typeof e==`object`?this.getText((e==null?void 0:e.label)??``):``,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}};g();var Hs=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof e==`string`&&(n=JSON.parse(e))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});let r=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(r!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${r}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,r));return}}this.props.oContext.socket.sendTo(r,this.props.schema.command||`send`,n).then(n=>{n&&Array.isArray(n)&&n.forEach(e=>t.push(typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(e=>{console.error(`Error in autocompleteSendTo:`,e),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n,r=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_LABEL?([...this.state.value].filter(e=>!r.find(t=>t.value===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>e.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),r.length?_.createElement(un,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:r,disabled:t,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||String(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},getOptionLabel:e=>this.getText(typeof e==`object`?(e==null?void 0:e.label)??``:e),onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{...n.slotProps,input:{...n.slotProps.input,endAdornment:_.createElement(_.Fragment,null,this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null,t?null:n.slotProps.input.endAdornment)}}})}):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Us={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,marginLeft:4,minWidth:48}},Ws=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,showDialog:!1})}renderItem(e,t){let{schema:n,attr:r}=this.props,{value:i,showDialog:a}=this.state;return _.createElement(Wt,{style:Us.fullWidth,variant:`standard`},n.label?_.createElement(rr,{shrink:!0},this.getText(n.label)):null,_.createElement(`div`,{style:Us.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:i??``,error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(r,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:Us.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showDialog:!0})},`...`)),a?_.createElement(Fn,{title:J.t(`jc_Define schedule`),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:J.t(`jc_Cancel`),ok:J.t(`jc_Ok`),theme:this.props.oContext.theme,onOk:e=>this.setState({showDialog:!1,value:e},()=>this.onChange(r,e))}):null)}};g();var Gs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=(await this.props.oContext.socket.getCertificates()).filter(e=>{let t=this.props.attr.toLowerCase();return t.includes(e.type)||e.type===`public`&&t.includes(`cert`)||e.type===`private`&&(t.includes(`priv`)||t.includes(`key`))?!0:!!(e.type===`chained`&&(t.includes(`chain`)||t.includes(`ca`)))}).map(e=>({label:e.name,value:e.name}));t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),onChange:e=>this.setState({value:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Ks={fullWidth:{width:`100%`},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}},qs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.props.oContext.socket.getCertificates(),n=[],r=[],i=[],a,o=await this.getCachedObject(`system.certificates`);a=o!=null&&(e=o.native)!=null&&e.collections?Object.keys(o.native.collections):null,t.forEach(e=>{e.type===`public`?n.push({label:e.name,value:e.name}):e.type===`private`?r.push({label:e.name,value:e.name}):e.type===`chained`?i.push({label:e.name,value:e.name}):(n.push({label:e.name,value:e.name}),r.push({label:e.name,value:e.name}),i.push({label:e.name,value:e.name}))}),n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),i.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:i,certsPrivateOptions:r,collectionsOptions:a})}renderItem(e,t){var n,r,i,a,o,s,c;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;let l=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString(),u=X.getValue(this.props.data,this.props.schema.certPublicName||`certPublic`),d=X.getValue(this.props.data,this.props.schema.certPrivateName||`certPrivate`),f=X.getValue(this.props.data,this.props.schema.certChainedName||`certChained`),p=(n=this.state.certsPublicOptions)==null?void 0:n.find(e=>e.value===u),m=(r=this.state.certsPrivateOptions)==null?void 0:r.find(e=>e.value===d),h=(i=this.state.certsChainOptions)==null?void 0:i.find(e=>e.value===f);return _.createElement(`div`,{style:Ks.fullWidth},this.state.collectionsOptions?_.createElement(Wt,{style:Ks.leWidth,variant:`standard`},_.createElement(rr,{shrink:!0},`Let's encrypt`),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:l,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(a=this.state.collectionsOptions)==null?void 0:a.map(e=>_.createElement(z,{key:e,value:e},e)))):null,this.state.collectionsOptions?_.createElement(`br`,null):null,this.state.collectionsOptions&&l!==`false`?_.createElement(`div`,null,J.t(`jc_Fallback custom certificates`)):null,_.createElement(Wt,{style:Ks.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Public certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:u||``,renderValue:()=>this.getText(p==null?void 0:p.label,!0),onChange:e=>this.onChange(this.props.schema.certPublicName||`certPublic`,e.target.value)},(o=this.state.certsPublicOptions)==null?void 0:o.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:Ks.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Private certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:d||``,renderValue:()=>this.getText(m==null?void 0:m.label,!0),onChange:e=>this.onChange(this.props.schema.certPrivateName||`certPrivate`,e.target.value)},(s=this.state.certsPrivateOptions)==null?void 0:s.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:Ks.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Chained certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:f||``,renderValue:()=>this.getText(h==null?void 0:h.label,!0),onChange:e=>this.onChange(this.props.schema.certChainedName||`certChained`,e.target.value)},(c=this.state.certsChainOptions)==null?void 0:c.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))))}};g();var Js=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t,n=await this.getCachedObject(`system.certificates`);t=n!=null&&(e=n.native)!=null&&e.collections?Object.keys(n.native.collections):[],this.setState({collectionsOptions:t})}renderItem(e,t){var n;if(!this.state.collectionsOptions)return null;let r=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString();return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:r,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(n=this.state.collectionsOptions)==null?void 0:n.map(e=>_.createElement(z,{key:e,value:e},e))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Ys=class extends X{async componentDidMount(){await super.componentDidMount();let e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{let t=await this.props.oContext.socket.sendTo(e,`checkDocker`,null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||``,errorDocker:t?t.daemonRunning?``:J.t(`jc_Docker is not installed or not running`):J.t(`jc_No response from admin`)})})}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr);return this.state.requesting?_.createElement(Wn,null):this.state.errorDocker&&!n?_.createElement(_n,{style:{color:`orange`}},J.t(`jc_Docker is not available`),`:\xA0`,J.t(`jc_${this.state.errorDocker}`).replace(/^jc_/,``)):_.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{checked:!!n,onChange:e=>{this.props.attr&&this.onChange(this.props.attr,e.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:_.createElement(_n,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Xs=`system.credentials.`,Zs=1,Qs=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],$s={email:`E-mail`,cloud:`Cloud`,ai:`AI`,aws:`AWS`,azure:`Azure`,custom:`Custom`},ec={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]},tc={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function nc(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${window.btoa(n)}`}var rc={anthropic:nc(tc.anthropic,`#d97757`),chatgpt:nc(tc.chatgpt,`#74aa9c`),gemini:nc(tc.gemini,`#8e75b2`),email:nc(tc.email,`#2196f3`),login:nc(tc.login,`#9e9e9e`),key:nc(tc.key,`#ffc107`),aws:nc(tc.aws,`#ff9900`),azure:nc(tc.azure,`#0089d6`)},ic={anthropic:{label:`Anthropic`,icon:rc.anthropic,form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:rc.chatgpt,form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:rc.gemini,form:`key`,type:`ai`,name:`gemini`},aws:{label:`AWS`,icon:rc.aws,form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:rc.azure,form:`azure`,type:`azure`,name:`azure`},email:{label:`E-mail`,icon:rc.email,form:`login`,type:`email`},login:{label:`Login & password`,icon:rc.login,form:`login`,type:null},key:{label:`Key`,icon:rc.key,form:`key`,type:null}};function ac(e,t,n){return _.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},e!=null&&e.icon?_.createElement(Mt,{src:e.icon,style:{width:20,height:20}}):n?_.createElement(`span`,{style:{width:20,height:20,flexShrink:0}}):null,t)}var oc=class e extends X{async componentDidMount(){if(await super.componentDidMount(),!this.props.attr)throw Error(`Missing attribute attribute`);let e=X.getValue(this.props.data,this.props.attr),t=await this.readCredentials();this.setState({value:e,selectOptions:t})}async readCredentials(){let t=[];try{let n=await this.props.oContext.socket.getObjectViewSystem(`config`,Xs,`${Xs}香`);t=Object.values(n).filter(e=>{var t;return!!e&&(!this.props.schema.credentialType||((t=e.native)==null?void 0:t.type)===this.props.schema.credentialType)}).map(t=>{var n;return{label:e.getCredentialName(t),value:t._id,icon:typeof((n=t.common)==null?void 0:n.icon)==`string`?t.common.icon:void 0}}).sort((e,t)=>e.label.localeCompare(t.label))}catch(e){console.error(`Cannot read credentials: ${e}`)}return t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),t}static getCredentialName(e){var t;let n=(t=e.common)==null?void 0:t.name,r;return r=n&&typeof n==`object`?n[J.getLanguage()]||n.en||Object.values(n)[0]||``:n||``,r||e._id.substring(19)}templateKeys(){let e=this.props.schema.credentialType;return Object.keys(ic).filter(t=>{let n=ic[t];return!e||n.type===e||n.type===null})}selectTemplate(e){let t=ic[e];this.setState({addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``})}openAddDialog(){let e=this.templateKeys()[0],t=ic[e];this.setState({addOpen:!0,addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``,addSaving:!1})}async createCredential(){let e=ic[this.state.addTemplate||``],t=(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`);if(!t){this.setState({addError:J.t(`jc_A unique name is required`)});return}let n=`${Xs}${t}`;if((this.state.selectOptions||[]).find(e=>e.value===n)){this.setState({addError:J.t(`jc_A credential with this name already exists`)});return}let r=(e==null?void 0:e.form)||`login`,i=ec[r],a=this.state.addFields||{};if(i.some(e=>e.required&&!(a[e.name]||``).trim())){this.setState({addError:J.t(`jc_Please fill in all required fields`)});return}let o=(e==null?void 0:e.type)||this.props.schema.credentialType||this.state.addType||`custom`;this.setState({addSaving:!0,addError:``});try{let s=this.props.oContext.socket,c={type:o,form:r,version:Zs,encryptedFields:i.filter(e=>e.encrypted).map(e=>e.name)};for(let e of i){let t=a[e.name]||``;c[e.name]=e.encrypted&&t?await s.encrypt(t):t}let l={_id:n,type:`config`,common:{name:t,...e!=null&&e.icon?{icon:e.icon}:{}},native:c,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}};await s.setObject(n,l);let u=this.state.selectOptions||[],d=u.find(e=>e.value===X.NONE_VALUE),f=u.filter(e=>e.value!==X.NONE_VALUE);f.push({label:t,value:n,icon:e==null?void 0:e.icon}),f.sort((e,t)=>e.label.localeCompare(t.label));let p=d?[d,...f]:f;this.setState({addOpen:!1,addSaving:!1,selectOptions:p,value:n},()=>this.onChange(this.props.attr,n))}catch(e){this.setState({addSaving:!1,addError:J.t(`jc_Cannot create credential: %s`,e.toString())})}}renderAddDialog(){if(!this.state.addOpen)return null;let e=ic[this.state.addTemplate||``],t=ec[(e==null?void 0:e.form)||`login`],n=`${Xs}${(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`)}`,r=!this.props.schema.credentialType&&(e==null?void 0:e.type)===null;return _.createElement(nn,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1})},_.createElement(Nt,null,J.t(`jc_Add credential`)),_.createElement(Tn,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8}},_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Template`)),_.createElement(Me,{variant:`standard`,value:this.state.addTemplate||``,onChange:e=>this.selectTemplate(e.target.value)},this.templateKeys().map(e=>_.createElement(z,{key:e,value:e},_.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},_.createElement(`img`,{src:ic[e].icon,width:20,height:20,alt:``}),J.t(ic[e].label)))))),r?_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Credential type`)),_.createElement(Me,{variant:`standard`,value:this.state.addType||`custom`,onChange:e=>this.setState({addType:e.target.value})},Qs.map(e=>_.createElement(z,{key:e,value:e},J.t($s[e]))))):null,_.createElement(ot,{variant:`standard`,fullWidth:!0,label:J.t(`jc_Name`),value:this.state.addName||``,error:!!this.state.addError,helperText:this.state.addName?n:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value,addError:``})}),t.map(e=>{var t;let n=((t=this.state.addFields)==null?void 0:t[e.name])||``;if(e.type===`select`){let t=e.options?[...e.options]:[];return n&&!t.find(e=>e.value===n)&&t.unshift({value:n}),_.createElement(ot,{key:e.name,select:!0,variant:`standard`,fullWidth:!0,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})},t.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label||e.value)))}return _.createElement(ot,{key:e.name,variant:`standard`,fullWidth:!0,type:e.type===`password`?`password`:`text`,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:e.type===`password`?`new-password`:`off`}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})})}),this.state.addError?_.createElement(Ct,{severity:`error`},this.state.addError):null),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,disabled:!!this.state.addSaving||!(this.state.addName||``).trim(),startIcon:_.createElement(on,null),onClick:()=>this.createCredential()},J.t(`jc_Create`)),_.createElement(xt,{variant:`contained`,color:`grey`,disabled:!!this.state.addSaving,startIcon:_.createElement(De,null),onClick:()=>this.setState({addOpen:!1})},J.t(`jc_Cancel`))))}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value),a=this.state.value&&this.state.value!==X.NONE_VALUE&&!i?this.state.value:null,o=this.state.selectOptions.some(e=>!!e.icon),s=!this.props.schema.disableCreation;return _.createElement(`div`,{style:{display:`flex`,alignItems:`flex-end`,gap:4,width:`100%`}},_.createElement(Wt,{style:{flex:1,minWidth:0},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e||!!a,displayEmpty:!0,disabled:!!t,value:this.state.value||X.NONE_VALUE,renderValue:()=>a||ac(i,this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),o),onChange:e=>this.setState({value:e.target.value===X.NONE_VALUE?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},ac(e,this.getText(e.label,this.props.schema.noTranslation!==!1),o)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),s?_.createElement(Zn,{size:`small`,disabled:!!t,title:J.t(`jc_Add credential`),onClick:()=>this.openAddDialog()},_.createElement(re,null)):null,this.renderAddDialog())}};g();var sc={fullWidth:{width:`100%`},icon:{width:24,height:24,marginRight:4},licLabel:{fontWeight:`bold`,minWidth:100,marginRight:10,textTransform:`capitalize`,display:`inline-block`},licValue:{fontWeight:`normal`},errorTitle:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`}),okTitle:e=>({color:e.palette.mode===`dark`?`#6fd56f`:`#007c00`}),errorText:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`,mb:`30px`})},cc=class e extends X{async componentDidMount(){await super.componentDidMount(),this.setState({_error:``,running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[_.createElement(`div`,{key:`error`},e)],e.push(_.createElement(xt,{key:`button`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`iobroker.net`)),this.state.allLicenses.length?e.push(_.createElement(Ye,{key:`table`},_.createElement(H,{size:`small`},_.createElement(fr,null,_.createElement(F,null,_.createElement(Ee,null,J.t(`jc_Product`)),_.createElement(Ee,null,J.t(`jc_Version`)),_.createElement(Ee,null,`UUID`),_.createElement(Ee,null,J.t(`jc_ValidTill`)),_.createElement(Ee,null,J.t(`jc_Commercial`)),_.createElement(Ee,null,`ID`))),_.createElement(_e,null,this.state.allLicenses.map(e=>_.createElement(F,{key:e.id},_.createElement(Ee,{sx:e.validName?null:sc.errorText},e.license.product),_.createElement(Ee,{sx:e.validVersion?null:sc.errorText},e.license.version),_.createElement(Ee,{sx:e.validUuid?null:sc.errorText},e.license.uuid||`--`),_.createElement(Ee,{sx:e.validTill?null:sc.errorText},e.license.validTill&&e.license.validTill!==`0000-00-00 00:00:00`?new Date(e.license.validTill).toLocaleDateString():`--`),_.createElement(Ee,null,e.license.invoice===`free`?`-`:e.license.invoice===`MANUALLY_CREATED`?`✓`:e.license.invoice),_.createElement(Ee,null,e.id))))))):(e.push(_.createElement(`div`,{key:`text1`},J.t(`jc_No one license found in license manager`))),e.push(_.createElement(`div`,{key:`text2`},J.t(`jc_Please create license`))))),_.createElement(nn,{open:!0,maxWidth:`xl`,fullWidth:this.props.fullWidth===void 0||this.props.fullWidth,onClick:()=>this.setState({_error:``,allLicenses:null})},_.createElement(Nt,null,J.t(`jc_Error`)),_.createElement(Tn,null,_.createElement(Bn,null,e)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({_error:``,allLicenses:null}),color:`primary`,autoFocus:!0,startIcon:_.createElement(on,null)},J.t(`jc_Ok`))))}return null}renderMessageDialog(){if(this.state.showLicenseData){let e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(t[n]!==null&&t[n]!==void 0){if(typeof t[n]==`object`){let r=t[n];Object.keys(r).forEach(t=>{r[t]!==null&&r[t]!==void 0&&(typeof r[t]==`object`?e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:sc.licLabel},t,`:`),JSON.stringify(r[t],null,2))):e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:sc.licLabel},n,` -`,t,`:`),r[t].toString())))})}else e.push(_.createElement(`div`,{key:n},_.createElement(`div`,{style:sc.licLabel},n.replace(/_/g,` `),`:`),t[n].toString()))}}),e.push(_.createElement(`div`,{key:`checked`},_.createElement(`div`,{style:sc.licLabel},J.t(`jc_Checked`),`:`),this.state.licenseOfflineCheck?J.t(`jc_locally`):J.t(`jc_via internet`))),_.createElement(nn,{open:!0,onClose:()=>this.setState({showLicenseData:null})},_.createElement(Nt,null,_.createElement(vt,{component:`span`,sx:this.state.result?sc.okTitle:sc.errorTitle},J.t(`jc_License %s`,this.state.result?`OK`:`INVALID`))),_.createElement(Tn,null,this.state.showLinkToProfile?_.createElement(xt,{variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`https://iobroker.net`):null,this.state._error?_.createElement(vt,{component:`div`,sx:sc.errorText},this.state._error):null,e),_.createElement(Et,null,_.createElement(xt,{onClick:()=>this.setState({showLicenseData:null,_error:``}),color:`primary`,variant:`contained`},J.t(`jc_Close`))))}return null}static parseJwt(e){let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``));try{return JSON.parse(n)}catch{return null}}static isVersionValid(e,t,n,r){if(!t||!e)return!0;let[i]=e.split(`.`);return t.startsWith(`>=`)||t.startsWith(`<=`)?parseInt(t.substring(2,10)):t.startsWith(`>`)||t.startsWith(`<`)||t.startsWith(`=`)?parseInt(t.substring(1,10)):t.startsWith(`==`)?parseInt(t.substring(2,10)):t.startsWith(`===`)&&parseInt(t.substring(3,10)),!0}async findInLicenseManager(t){var n;let r=await this.getCachedObject(`system.licenses`),i=[];if(r!=null&&(n=r.native)!=null&&(n=n.licenses)!=null&&n.length){let n=null,s=Date.now(),c;if(this.props.schema.uuid){var a;let e=await this.getCachedObject(`system.meta.uuid`);c=e==null||(a=e.native)==null?void 0:a.uuid}let l;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${t}`);l=e==null||(o=e.common)==null?void 0:o.version}if(r.native.licenses.forEach(r=>{let a=!r.validTill||r.validTill===`0000-00-00 00:00:00`||new Date(r.validTill).getTime()>s,o=(r.product||``).split(`.`),u=o[1]===t||t===`vis-2`&&o[1]===`vis`,d=!c||!r.uuid||r.uuid===c,f=e.isVersionValid(l,r.version,r.invoice,t);(!n||r.invoice!==`free`)&&a&&u&&d&&f&&(n=r),i.push({id:r.id,validName:u,validUuid:d,validVersion:f,validTill:a,license:r})}),n){let e=i.find(e=>e.id===(n==null?void 0:n.id));e&&(e.used=!0)}}return i}async checkLicense(t,n){let r;if(this.props.schema.uuid){var i;let e=await this.getCachedObject(`system.meta.uuid`);r=e==null||(i=e.native)==null?void 0:i.uuid}let a;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${n}`);a=e==null||(o=e.common)==null?void 0:o.version}let s=new AbortController,c=setTimeout(()=>{c=null,s.abort()},5e3);try{let i=await window.fetch(`https://iobroker.net/api/v1/public/cert/`,{method:`POST`,body:JSON.stringify({json:t,uuid:r}),headers:{"Content-Type":`text/plain`},signal:s.signal});c&&clearTimeout(c);let o=await i.text(),l;try{l=JSON.parse(o)}catch{}if(l!=null&&l.error)try{let n=e.parseJwt(t),r=J.t(`jc_${(n==null?void 0:n.error)||l.error||`Unknown error`}`).replace(/^jc_/,``);return this.setState({_error:r,licenseOfflineCheck:!1,showLicenseData:n,result:!1,running:!1})}catch{return console.log(`Cannot parse license`),this.setState({_error:l.error,result:!1,running:!1})}{let i=null;try{i=e.parseJwt(t)}catch{}if(l){let t=l.validTill||l.valid_till;if(t&&t!==`0000-00-00 00:00:00`&&new Date(t).getTime()<Date.now())return this.setState({_error:J.t(`jc_License expired on %s`,new Date(t).toLocaleString()),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1});let o=(l.name||``).split(`.`);return o[1]===n||o[1]===`vis`&&n===`vis-2`?r&&!l.uuid&&n===`vis-2`?this.setState({_error:J.t(`jc_License must be converted`,l.uuid),showLinkToProfile:!0,licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):r&&l.uuid&&l.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,l.uuid),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):e.isVersionValid(a,l.version,l.invoice,n)?this.setState({licenseOfflineCheck:!1,showLicenseData:i,result:!0,running:!1}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,l.version,this.props.schema.version),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,l.name),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1})}throw Error(`jc_Invalid answer from server`)}}catch(i){var l;if((i==null||(l=i.response)==null?void 0:l.status)===404)return this.setState({_error:J.t(`jc_License does not exist`),result:!1,running:!1});try{let i=e.parseJwt(t),o=((i==null?void 0:i.name)||``).split(`.`);return i!=null&&i.valid_till&&i.valid_till!==`0000-00-00 00:00:00`&&new Date(i.valid_till).getTime()<Date.now()?this.setState({_error:J.t(`jc_License expired on %s`,new Date(i.valid_till).toLocaleString()),showLicenseData:i,licenseOfflineCheck:!0,running:!1,result:!1}):o[1]===n?r&&i!=null&&i.uuid&&i.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,i==null?void 0:i.uuid),showLicenseData:i,licenseOfflineCheck:!0,result:!1,running:!1}):e.isVersionValid(a,i==null?void 0:i.version,i==null?void 0:i.invoice,n)?this.setState({running:!1,result:!0,licenseOfflineCheck:!0,showLicenseData:i}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,i==null?void 0:i.version,this.props.schema.version),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,i==null?void 0:i.name),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1})}catch{return this.setState({_error:J.t(`jc_Cannot decode license`),result:!1,licenseOfflineCheck:!0,running:!1})}}}renderAskForUpdate(){return this.state.askForUpdate?_.createElement(bn,{text:J.t(`jc_License not found in license manager. Do you want to read licenses from iobroker.net?`),ok:J.t(`jc_Yes`),onClose:async e=>{if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(``,``)}catch(e){window.alert(J.t(`jc_Cannot read licenses: %s`,e));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){let t=this.props.oContext.adapterName===`vis-2`?`vis`:this.props.oContext.adapterName;this.setState({running:!0});let n,r;if(this.props.data.useLicenseManager){if(r=await this.findInLicenseManager(t),n=r.find(e=>e.used),n&&=n.license.json,!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:J.t(`jc_Suitable license not found in license manager`),result:!1,running:!1,allLicenses:r||null}):this.setState({_error:J.t(`jc_Please enter the license`),result:!1,running:!1})}renderItem(){return _.createElement(`div`,{style:sc.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||`outlined`,color:this.props.schema.color||`primary`,style:sc.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:_.createElement(rt,null),onClick:()=>this._onClick()},this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||`jc_Check license`,this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}};g();var lc=class extends X{renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Array.isArray(n);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{indeterminate:r,checked:!!n,onChange:e=>{if(this.props.attr){let t;t=r?this.onChange(this.props.attr,!0):this.onChange(this.props.attr,e.target.checked),t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),_.createElement(_n,{style:{color:`red`}},e?this.props.schema.validatorErrorText?J.t(this.props.schema.validatorErrorText):J.t(`jc_Error`):null),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var uc={standard:sr,filled:Lt,outlined:Ie},dc=e=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return{inputRoot:{display:`inline-flex`,flexWrap:`wrap`,flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:`border-box`},"&.mui-variant-outlined":{paddingTop:`14px`},"&.mui-variant-filled":{paddingTop:`28px`}},input:{display:`inline-block`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,appearance:`none`,WebkitTapHighlightColor:`rgba(0,0,0,0)`,float:`left`,flex:1},chipContainer:{display:`flex`,flexFlow:`row wrap`,alignItems:`center`,cursor:`text`,marginBottom:`-2px`,minHeight:40},outlined:{"& input":{height:16,paddingTop:`4px`,paddingBottom:`12px`,marginTop:`4px`,marginBottom:`4px`}},standard:{marginTop:`18px`},filled:{"& input":{height:22,marginBottom:`4px`,marginTop:`4px`,paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${e.palette.primary[t?`dark`:`light`]}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},"&$focused:after":{transform:`scaleX(1)`},"&$error:after":{borderBottomColor:e.palette.error.main,transform:`scaleX(1)`},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${e.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:`dotted`}},error:{"&:after":{backgroundColor:e.palette.error.main,transform:`scaleX(1)`}},chip:{margin:`0 8px 8px 0`,float:`left`}}},fc={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},pc=({value:e,isFocused:t,isDisabled:n,isReadOnly:r,handleClick:i,handleDelete:a,style:o},s)=>_.createElement(Bt,{key:s,style:{...o,pointerEvents:n||r?`none`:void 0,backgroundColor:t?oe[300]:void 0},onClick:i,onDelete:a,label:e}),mc=class extends _.Component{constructor(e){super(e),K(this,`labelRef`,void 0),K(this,`labelNode`,null),K(this,`input`,void 0),K(this,`newChipKeyCodes`,void 0),K(this,`newChipKeys`,void 0),K(this,`actualInput`,null),K(this,`inputBlurTimeout`,null),K(this,`_keyPressed`,!1),K(this,`_preventChipCreation`,!1),K(this,`styles`,{}),K(this,`styleTheme`,null),K(this,`focus`,()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})}),K(this,`handleInputBlur`,e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});let t=e.target.value,n;switch(this.props.blurBehavior||`clear`){case`add-or-clear`:n={clearInputOnFail:!0};case`add`:if(this.props.delayBeforeAdd){let e=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{let r=(this.props.value||this.state.chips).length;e===r?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case`clear`:this.clearInput()}}),K(this,`handleInputFocus`,e=>{var t,n;this.setState({isFocused:!0}),(t=(n=this.props).onFocus)==null||t.call(n,e)}),K(this,`handleKeyDown`,e=>{let{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;let n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case fc.BACKSPACE:e.target.value===``&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case fc.DELETE:e.target.value===``&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case fc.LEFT_ARROW:t===null&&e.target.value===``&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case fc.RIGHT_ARROW:t!==null&&t<n.length-1?this.setState({focusedChip:t+1}):this.setState({focusedChip:null});break;default:this.setState({focusedChip:null})}}),K(this,`handleKeyUp`,e=>{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)}),K(this,`handleUpdateInput`,e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)}),K(this,`setActualInputRef`,e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)}),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:``,isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||`standard`},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||[`Enter`],this.labelRef=_.createRef(),this.input=_.createRef()}componentDidMount(){this.state.variant===`outlined`&&(this.labelNode=this.labelRef.current,this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue=``)),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:``}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();let n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{let e=this.state.chips.slice();if(e.splice(t,1)){let n=this.state.focusedChip;this.state.focusedChip===t?n=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(n=this.state.focusedChip-1),this.updateChips(e,{focusedChip:n})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput(``)}updateInput(e){this.setState({inputValue:e})}render(){let{alwaysShowPlaceholder:e,chipRenderer:t=pc,className:n,disabled:r,disableUnderline:i,error:a,FormHelperTextProps:o,fullWidth:s,fullWidthInput:c,helperText:l,id:u,InputProps:d={},InputLabelProps:f={},inputValue:p,label:m,placeholder:h,readOnly:g,required:v,rootRef:y,value:b,margin:x}=this.props,S=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=Zt.getStyle(this.props.theme,dc));let C=b||this.state.chips||[];Array.isArray(C)||(C=(C||``).toString().split(/[,\s]+/).map(e=>e.trim()));let w=p??this.state.inputValue,T=(this.props.value||w).length||w.length,E=typeof f.shrink==`boolean`?f.shrink:m!==null&&(T||this.state.isFocused||C.length),D=C.map((e,n)=>t({value:e,isDisabled:!!r,isReadOnly:!!g,isFocused:this.state.focusedChip===n,handleClick:()=>this.setState({focusedChip:n}),handleDelete:()=>this.handleDeleteChip(e,n),style:this.styles.chip},n.toString())),O={};S===`outlined`&&(O.notched=!!E,O.labelWidth=E&&this.labelNode&&this.labelNode.offsetWidth||0),S===`standard`?d.disableUnderline=!0:O.startAdornment=D;let k=uc[S];return _.createElement(Wt,{ref:y,fullWidth:s,className:n,error:a,required:C.length>0?void 0:v,onClick:this.focus,disabled:r,variant:S,component:`div`,margin:x},m&&_.createElement(rr,{htmlFor:u,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!E,focused:this.state.isFocused,variant:S,ref:this.labelRef,required:v,component:`label`,...f},m),_.createElement(vt,{component:`div`,id:`input-chip-container`,sx:{...this.styles[S],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&S===`standard`?this.styles.underline:void 0,...r?this.styles.disabled:void 0,...m?this.styles.labeled:void 0,...a?this.styles.error:void 0}},S===`standard`&&D,_.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[S]} ${m?`mui-chip-with-label`:`mui-chip-no-label`}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[S]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:u,value:w,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:r,fullWidth:c,placeholder:!T&&(E||m==null)||e?h:void 0,readOnly:g,...d,...O})),l&&_.createElement(_n,{...o,className:o==null?void 0:o.className,style:this.styles.helperText},l))}};g();var hc=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t);if(this.props.schema.delimiter&&typeof n==`string`){let e=n.split(this.props.schema.delimiter).map(e=>e.trim()).filter(e=>e);this.setState({value:e})}else this.setState({value:n||[]})}renderItem(e,t){let{attr:n,schema:r}=this.props,{value:i}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(mc,{value:i,disabled:!!t,label:this.getText(r.label),error:!!e,onAdd:e=>{let t=JSON.parse(JSON.stringify(i));t.push(e),this.setState({value:t},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,t.join(`${this.props.schema.delimiter} `)):this.onChange(n,t),e instanceof Promise&&e.catch(e=>console.error(e))}})},theme:this.props.oContext.theme,onDelete:(e,t)=>{let r=JSON.parse(JSON.stringify(i));r.splice(t,1),this.setState({value:r},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,r.join(`${this.props.schema.delimiter} `)):this.onChange(n,r),e instanceof Promise&&e.catch(e=>console.error(e))}})}}),_.createElement(_n,null,J.t(`jc_Press ENTER Key to add new item`)),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var gc=class extends X{renderColorDialog(){return this.state.showColorDialog?_.createElement(nn,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},_.createElement(kt,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.props.attr&&this.onChange(this.props.attr,this.state.colorDialogValue))})):null}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Zt.isUseBright(n);return _.createElement(_.Fragment,null,this.renderColorDialog(),_.createElement(ot,{variant:`standard`,disabled:!!t,style:{minWidth:100,width:`calc(100% - 8px)`},label:this.getText(this.props.schema.label),value:n||``,onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||``}),onChange:e=>{let t=e.target.value,n=this.props.attr&&this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(e=>console.error(`Cannot set value: ${e}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:r?`#FFF`:`#000`},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:e=>{e.stopPropagation();let t=this.props.attr&&this.onChange(this.props.attr,``);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},_.createElement(De,null)):void 0},inputLabel:{shrink:!0}}}))}};g();var _c={width:{width:`calc(100% - 85px)`},width50:{width:120,marginRight:5}},vc=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e});let t={};this.props.schema.useSystemName&&(t.useSystem=!!X.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=X.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=X.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!X.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{e=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude)){if(window.alert(J.t(`jc_Used system settings`)),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{let t=e.common.latitude+(this.props.schema.divider||`,`)+e.common.longitude;this.setState({value:t},()=>{let e=this.props.attr&&this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}}else window.alert(J.t(`jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser`))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords){if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||``),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||``)});else{let t=e.coords.latitude+(this.props.schema.divider||`,`)+e.coords.longitude;this.setState({value:t},()=>{let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return _.createElement(_.Fragment,null,this.props.schema.useSystemName?_.createElement(kn,{control:_.createElement(O,{checked:!!this.state.useSystem,onChange:e=>{let t=e.target.checked;t&&this.getSystemCoordinates().catch(e=>console.error(`Cannot determine coordinates: ${e}`)),this.setState({useSystem:t},()=>this.onChange(this.props.schema.useSystemName,t))}}),label:J.t(`jc_Use system settings for position`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:_c.width50,value:this.state.longitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({longitude:t},()=>{let e=this.onChange(this.props.schema.longitudeName,(t||``).trim());e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})},label:J.t(`jc_Longitude`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:_c.width50,value:this.state.latitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({latitude:t},()=>this.onChange(this.props.schema.latitudeName,(t||``).trim()))},label:J.t(`jc_Latitude`)}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:_c.width,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getCoordinates(),title:J.t(`jc_Take browser position`),style:{marginRight:4}},_.createElement(Dn,null)),this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getSystemCoordinates(),title:J.t(`jc_Take position from system settings`)},_.createElement(gt,null)))}};g();var yc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Custom component "${this.props.name}" from "${this.props.url||`unknown URL`}" crashed while rendering. It was probably built for an older admin version.`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&(e.name!==this.props.name||e.url!==this.props.url)&&this.setState({error:null})}render(){return this.state.error?_.createElement(qn,{type:`error`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Cannot display the custom component "%s"`,this.props.name)),_.createElement(`div`,null,J.t(`jc_It was probably built for an older admin version. Please update the adapter.`)),_.createElement(`div`,{style:{marginTop:8,fontStyle:`italic`,wordBreak:`break-word`}},this.state.error.message||String(this.state.error)))):_.createElement(_.Fragment,null,this.props.children)}},bc=`@iobroker/gui-components`,xc=`@iobroker/adapter-react-v5`,Sc=5e3,Cc=new Map;async function wc(e){let t=e.lastIndexOf(`/`),n=`${t===-1?e:e.substring(0,t)}/mf-manifest.json`,r=Cc.get(n);return r||(r=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),Sc);try{let t=await fetch(n,{signal:e.signal});return t.ok?await t.json():null}catch{return null}finally{clearTimeout(t)}})(),Cc.set(n,r)),r}function Tc(e){let t=e==null?void 0:e.shared;return Array.isArray(t)?t.some(e=>(e==null?void 0:e.name)===xc)?xc:t.some(e=>(e==null?void 0:e.name)===bc)?bc:null:null}async function Ec(e,t){let n=Tc(await wc(e));return n===xc?{compatible:!1,declared:1,tooNew:!1}:typeof t==`number`&&Number.isFinite(t)?{compatible:t===2,declared:t,tooNew:t>2}:n===bc?{compatible:!0,declared:2,tooNew:!1}:{compatible:!1,declared:1,tooNew:!1}}g(),Ts({name:`iobroker_admin`,shared:{},remotes:[]});var Dc=class e extends X{constructor(e){super(e),Object.assign(this.state,{Component:null,error:``,incompatible:null})}async componentDidMount(){if(!this.props.schema.url){console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`URL is empty. Cannot load custom component!`});return}let t;t=this.props.schema.url.startsWith(`http:`)||this.props.schema.url.startsWith(`https:`)?this.props.schema.url:this.props.schema.url.startsWith(`./`)?`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,``)}`:`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;let[n,r,...i]=this.props.schema.name.split(`/`),a=i.join(`/`);if(!t){console.error(`Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema`);return}if(!n||!r||!a){console.error(`Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema`);return}let o=await Ec(t,this.props.schema.guiApi);if(!o.compatible){console.warn(`Custom component "${this.props.schema.name}" from "${t}" was not started: it targets GUI API generation ${o.declared}, but this admin provides generation 2.`),this.setState({incompatible:o});return}let s=e.runningLoads[`${t}!${r}`];if(!(s instanceof Promise)){let i;if(this.props.schema.i18n===!0){let e=t.lastIndexOf(`/`),n;n=e===-1?t:t.substring(0,e);let r=J.getLanguage(),a=`${n}/i18n/${r}.json`;i=fetch(a).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>{if(r!==`en`){fetch(`${n}/i18n/en.json`).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>console.log(`Cannot load i18n "${a}": ${e}`));return}console.log(`Cannot load i18n "${a}": ${e}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n==`object`)try{J.extendTranslations(this.props.schema.i18n)}catch(e){console.error(`Cannot import i18n: ${e}`)}try{console.log(t,n,r,a),Ds([{name:n,entry:t,type:`module`}]),s=Es(`${n}/${r}`),i instanceof Promise&&(s=Promise.all([s,i]).then(e=>e[0])),e.runningLoads[`${t}!${r}`]=s}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}try{var c;let e=(c=await s)==null?void 0:c.default;if(e!=null&&e[a])this.setState({Component:e[a]});else{let t=Object.keys(e||{});console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${t.join(`, `)}`})}}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}renderIncompatible(e){return _.createElement(qn,{type:`warning`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Custom component "%s" was not started`,this.props.schema.name)),_.createElement(`div`,null,e.tooNew?J.t(`jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,e.declared,2):J.t(`jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,e.declared,2))))}render(){let e=this.state.Component,t=this.props.schema||{},n=e?_.createElement(yc,{name:t.name,url:t.url},_.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate})):this.state.incompatible?this.renderIncompatible(this.state.incompatible):this.state.error?_.createElement(`div`,null,this.state.error):_.createElement(Ze,null);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),n):n}};K(Dc,`runningLoads`,{});function Oc(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}function Z(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kc=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),Ac={previousMonth:`Previous month`,nextMonth:`Next month`,openPreviousView:`Open previous view`,openNextView:`Open next view`,calendarViewSwitchingButtonAriaLabel:e=>e===`year`?`year view is open, switch to calendar view`:`calendar view is open, switch to year view`,start:`Start`,end:`End`,startDate:`Start date`,startTime:`Start time`,endDate:`End date`,endTime:`End time`,cancelButtonLabel:`Cancel`,clearButtonLabel:`Clear`,okButtonLabel:`OK`,todayButtonLabel:`Today`,nextStepButtonLabel:`Next`,datePickerToolbarTitle:`Select date`,dateTimePickerToolbarTitle:`Select date & time`,timePickerToolbarTitle:`Select time`,dateRangePickerToolbarTitle:`Select date range`,timeRangePickerToolbarTitle:`Select time range`,clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:`No time selected`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:`Week number`,calendarWeekNumberHeaderText:`#`,calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:`Choose date`,openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:`Choose time`,openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:`Choose range`,fieldClearLabel:`Clear`,timeTableLabel:`pick time`,dateTableLabel:`pick date`,fieldYearPlaceholder:e=>`Y`.repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType===`letter`?`MMMM`:`MM`,fieldDayPlaceholder:()=>`DD`,fieldWeekDayPlaceholder:e=>e.contentType===`letter`?`EEEE`:`EE`,fieldHoursPlaceholder:()=>`hh`,fieldMinutesPlaceholder:()=>`mm`,fieldSecondsPlaceholder:()=>`ss`,fieldMeridiemPlaceholder:()=>`aa`,year:`Year`,month:`Month`,day:`Day`,weekDay:`Week day`,hours:`Hours`,minutes:`Minutes`,seconds:`Seconds`,meridiem:`Meridiem`,empty:`Empty`},jc=Ac;kc(Ac),g();var Mc=[`localeText`],Nc=v(null),Pc=function(e){let{localeText:t}=e,n=Z(e,Mc),{adapter:r,localeText:i}=b(Nc)??{adapter:void 0,localeText:void 0},{children:a,dateAdapter:o,dateFormats:s,dateLibInstance:c,adapterLocale:l,localeText:u}=cr({props:n,name:`MuiLocalizationProvider`}),d=p(()=>x({},u,i,t),[u,i,t]),f=p(()=>{if(!o)return r||null;let e=new o({locale:l,formats:s,instance:c});if(!e.isMUIAdapter)throw Error(Oc(143));return e},[o,l,s,c,r]),m=p(()=>f?{minDate:f.date(`1900-01-01T00:00:00.000`),maxDate:f.date(`2099-12-31T00:00:00.000`)}:null,[f]),h=p(()=>({adapter:f,defaultDates:m,localeText:d}),[m,f,d]);return G(Nc.Provider,{value:h,children:a})};g();var Fc=()=>{let e=b(Nc);if(e===null)throw Error(Oc(149));if(e.adapter===null)throw Error(Oc(150));let t=p(()=>x({},jc,e.localeText),[e.localeText]);return p(()=>x({},e,{localeText:t}),[e,t])},Ic=()=>Fc().adapter,Lc=()=>Fc().localeText,Rc=[`disablePast`,`disableFuture`,`minDate`,`maxDate`,`shouldDisableDate`,`shouldDisableMonth`,`shouldDisableYear`],zc=[`disablePast`,`disableFuture`,`minTime`,`maxTime`,`shouldDisableTime`,`minutesStep`,`ampm`,`disableIgnoringDatePartForTimeValidation`],Bc=[`minDateTime`,`maxDateTime`],Vc=[...Rc,...zc,...Bc],Hc=e=>Vc.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});g();var Uc=[`value`,`defaultValue`,`referenceDate`,`format`,`formatDensity`,`onChange`,`timezone`,`onError`,`shouldRespectLeadingZeros`,`selectedSections`,`onSelectedSectionsChange`,`fieldRef`,`startFieldRef`,`endFieldRef`,`disabled`,`readOnly`,`dateSeparator`,`autoFocus`,`focused`],Wc=(e,t)=>p(()=>{let n=x({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Uc.forEach(i),t===`date`?Rc.forEach(i):t===`time`?zc.forEach(i):t===`date-time`&&(Rc.forEach(i),zc.forEach(i),Bc.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),Gc=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),Kc=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i=n??r,a;if(e!=null)a=e;else if(i.includes(t))a=t;else if(i.length>0)a=i[0];else throw Error(Oc(153));return{views:i,openTo:a}},qc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Jc=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:a,adapter:o,timezone:s})=>{let c=qc(o,o.date(void 0,s),e);n&&o.isBefore(i,c)&&(i=c),t&&o.isAfter(r,c)&&(r=c);let l=e,u=e;for(o.isBefore(e,i)&&(l=i,u=null),o.isAfter(e,r)&&(u&&=r,l=null);l||u;){if(l&&o.isAfter(l,r)&&(l=null),u&&o.isBefore(u,i)&&(u=null),l){if(!a(l))return l;l=o.addDays(l,1)}if(u){if(!a(u))return u;u=o.addDays(u,-1)}}return null},Yc=(e,t)=>e.isValid(t)?t:null,Xc=(e,t,n)=>t==null||!e.isValid(t)?n:t,Zc=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null||e.isEqual(t,n),Qc=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},$c=(e,t,n)=>n===`date`?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),el=(e,t)=>{let n=e.setHours(e.date(),t===`am`?2:14);return e.format(n,`meridiem`)},tl=[`year`,`month`,`day`],nl=e=>tl.includes(e),rl=(e,{format:t,views:n},r)=>{if(t!=null)return t;let i=e.formats;return Gc(n,[`year`])?i.year:Gc(n,[`month`])?i.month:Gc(n,[`day`])?i.dayOfMonth:Gc(n,[`month`,`year`])?`${i.month} ${i.year}`:Gc(n,[`day`,`month`])?`${i.month} ${i.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},il=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},al=[`hours`,`minutes`,`seconds`],ol=[`hours`,`minutes`,`seconds`,`meridiem`],sl=e=>al.includes(e),cl=e=>ol.includes(e),ll=(e,t)=>e?t.getHours(e)>=12?`pm`:`am`:null,ul=(e,t,n)=>n&&(e>=12?`pm`:`am`)!==t?t===`am`?e-12:e+12:e,dl=(e,t,n,r)=>{let i=ul(r.getHours(e),t,n);return r.setHours(e,i)},fl=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),pl=(e,t)=>(n,r)=>e?t.isAfter(n,r):fl(n,t)>fl(r,t),ml=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;let i=e.formats;return Gc(n,[`hours`])?r?`${i.hours12h} ${i.meridiem}`:i.hours24h:Gc(n,[`minutes`])?i.minutes:Gc(n,[`seconds`])?i.seconds:Gc(n,[`minutes`,`seconds`])?`${i.minutes}:${i.seconds}`:Gc(n,[`hours`,`minutes`,`seconds`])?r?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:r?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`},hl=(e,t)=>{let n=e.formatTokenMap[t];if(n==null)throw Error(Oc(157,t));return typeof n==`string`?{type:n,contentType:n===`meridiem`?`letter`:`digit`,maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},gl=(e,t)=>{let n=[],r=e.date(void 0,`default`),i=e.startOfWeek(r),a=e.endOfWeek(r),o=i;for(;e.isBefore(o,a);)n.push(o),o=e.addDays(o,1);return n.map(n=>e.formatByString(n,t))},_l=(e,t,n,r)=>{switch(n){case`month`:return Qc(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case`weekDay`:return gl(e,r);case`meridiem`:{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},vl=`s`,yl=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],bl=e=>{let t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),vl)===`0`?yl:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),vl))},xl=(e,t)=>{if(t[0]===`0`)return e;let n=[],r=``;for(let i=0;i<e.length;i+=1){r+=e[i];let a=t.indexOf(r);a>-1&&(n.push(a.toString()),r=``)}return n.join(``)},Sl=(e,t)=>t[0]===`0`?e:e.split(``).map(e=>t[Number(e)]).join(``),Cl=(e,t)=>{let n=xl(e,t);return n!==` `&&!Number.isNaN(Number(n))},wl=(e,t)=>Number(e).toString().padStart(t,`0`),Tl=(e,t,n,r,i)=>{if(i.type===`day`&&i.contentType===`digit-with-letter`){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let a=t.toString();return i.hasLeadingZerosInInput&&(a=wl(a,i.maxLength)),Sl(a,r)},El=(e,t,n)=>{let r=e.value||e.placeholder,i=t===`non-input`?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t===`non-input`&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(xl(r,n)).toString()),[`input-rtl`,`input-ltr`].includes(t)&&e.contentType===`digit`&&!i&&r.length===1&&(r=`${r}\u200e`),t===`input-rtl`&&(r=`\u2068${r}\u2069`),r},Dl=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Ol=(e,t)=>e.formatByString(e.date(void 0,`system`),t).length===4,kl=(e,t,n,r)=>{if(t!==`digit`)return!1;let i=e.date(void 0,`default`);switch(n){case`year`:return e.lib===`dayjs`&&r===`YY`||e.formatByString(e.setYear(i,1),r).startsWith(`0`);case`month`:return e.formatByString(e.startOfYear(i),r).length>1;case`day`:return e.formatByString(e.startOfMonth(i),r).length>1;case`weekDay`:return e.formatByString(e.startOfWeek(i),r).length>1;case`hours`:return e.formatByString(e.setHours(i,1),r).length>1;case`minutes`:return e.formatByString(e.setMinutes(i,1),r).length>1;case`seconds`:return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error(Oc(158))}},Al=(e,t,n)=>{let r=t.some(e=>e.type===`day`),i=[],a=[];for(let e=0;e<t.length;e+=1){let o=t[e];r&&o.type===`weekDay`||(i.push(o.format),a.push(El(o,`non-input`,n)))}let o=i.join(` `),s=a.join(` `);return e.parse(s,o)},jl=e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),Ml=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:o,longestMonth:s}=Qc(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:Ol(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):o,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if(n===`digit`){let n=gl(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(a),o=Number(xl(e.formatByString(e.startOfDay(r),n),t)),s=Number(xl(e.formatByString(e.endOfDay(r),n),t));return s===i?o>i?{minimum:1,maximum:o}:{minimum:0,maximum:i}:o===0?{minimum:0,maximum:s}:{minimum:1,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},Nl=(e,t,n,r)=>{switch(t.type){case`year`:return e.setYear(r,e.getYear(n));case`month`:return e.setMonth(r,e.getMonth(n));case`weekDay`:{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=wl(r,t.maxLength));let i=gl(e,t.format),a=i.indexOf(r),o=i.indexOf(t.value)-a;return e.addDays(n,o)}case`day`:return e.setDate(r,e.getDate(n));case`meridiem`:return dl(r,e.getHours(n)<12?`am`:`pm`,!0,e);case`hours`:return e.setHours(r,e.getHours(n));case`minutes`:return e.setMinutes(r,e.getMinutes(n));case`seconds`:return e.setSeconds(r,e.getSeconds(n));default:return r}},Pl={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Fl=(e,t,n,r,i)=>[...n].sort((e,t)=>Pl[e.type]-Pl[t.type]).reduce((n,r)=>!i||r.modified?Nl(e,r,t,n):n,r),Il=e=>{let t={};return e.forEach((n,r)=>{let i=r===0?null:r-1,a=r===e.length-1?null:r+1;t[r]={leftIndex:i,rightIndex:a}}),{neighbors:t,startIndex:0,endIndex:e.length-1}},Ll=(e,t)=>{if(e==null)return null;if(e===`all`)return`all`;if(typeof e==`string`){let n=t.findIndex(t=>t.type===e);return n===-1?null:n}return e},Rl=({adapter:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),--n,n<0)throw Error(Oc(154));return i},zl=({adapter:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,a=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,`g`),o=null;for(;o=a.exec(t);)n.push({start:o.index,end:a.lastIndex-1});return n},Bl=(e,t,n,r)=>{switch(n.type){case`year`:return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,`default`),r).length,format:r});case`month`:return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case`day`:return t.fieldDayPlaceholder({format:r});case`weekDay`:return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case`hours`:return t.fieldHoursPlaceholder({format:r});case`minutes`:return t.fieldMinutesPlaceholder({format:r});case`seconds`:return t.fieldSecondsPlaceholder({format:r});case`meridiem`:return t.fieldMeridiemPlaceholder({format:r});default:return r}},Vl=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o===``)throw Error(Oc(155));let c=hl(e,o),l=kl(e,c.contentType,c.type,o),u=n?l:c.contentType===`digit`,d=e.isValid(t),f=d?e.formatByString(t,o):``,p=null;if(u){if(l)p=f===``?e.formatByString(a,o).length:f.length;else{if(c.maxLength==null)throw Error(Oc(156,o));p=c.maxLength,d&&(f=Sl(wl(xl(f,i),p),i))}}return x({},c,{format:o,maxLength:p,value:f,placeholder:Bl(e,r,c,o),hasLeadingZerosInFormat:l,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:``,modified:!1})},Hl=e=>{let{adapter:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),a=[],o=``,s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),c=/^([a-zA-Z]+)/,l=RegExp(`^(${s.join(`|`)})*$`),u=RegExp(`^(${s.join(`|`)})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),f=0;for(;f<n.length;){var p;let t=d(f),r=t!=null,s=(p=c.exec(n.slice(f)))==null?void 0:p[1];if(!r&&s!=null&&l.test(s)){let t=s;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),a.push(Vl(x({},e,{now:i,token:n,startSeparator:o}))),o=``}f+=s.length}else{let e=n[f];r&&(t==null?void 0:t.start)===f||(t==null?void 0:t.end)===f||(a.length===0?o+=e:(a[a.length-1].endSeparator+=e,a[a.length-1].isEndFormatSeparator=!0)),f+=1}}return a.length===0&&o.length>0&&a.push({type:`empty`,contentType:`letter`,maxLength:null,format:``,value:``,placeholder:``,hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:``,modified:!1}),a},Ul=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&r!==null&&r.includes(` `)&&(r=`\u2069${r}\u2066`),t===`spacious`&&[`/`,`.`,`-`].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),Wl=e=>{let t=Rl(e);e.isRtl&&(t=t.split(` `).reverse().join(` `));let n=zl(x({},e,{expandedFormat:t})),r=Hl(x({},e,{expandedFormat:t,escapedParts:n}));return Ul(x({},e,{sections:r}))};g();var Gl=v(null),Kl=()=>{let e=b(Gl);if(e==null)throw Error(Oc(151));return e};g();var ql=()=>b(Gl);g();var Jl=(e={})=>{let t=ql(),n=Ic(),r=Lc(),i=p(()=>bl(n),[n]),{format:a=(t==null?void 0:t.fieldFormat)??n.formats.fullDate}=e;return p(()=>Wl({adapter:n,format:a,formatDensity:`dense`,isRtl:!1,shouldRespectLeadingZeros:!0,localeText:r,localizedDigits:i,date:null}).map(e=>`${e.startSeparator}${e.placeholder}${e.endSeparator}`).join(``),[n,r,i,a])};g();var Yl=v(()=>!0);function Xl(){return b(Yl)}g();var Zl=v(null);function Ql(){return b(Zl)}g();var $l=v(null),eu=v({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:`desktop`,pickerOrientation:`portrait`},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>`UI`,triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function tu(e){let{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:i,isValidContextValue:a,localeText:o,children:s}=e;return G(Gl.Provider,{value:t,children:G($l.Provider,{value:n,children:G(eu.Provider,{value:r,children:G(Zl.Provider,{value:i,children:G(Yl.Provider,{value:a,children:G(Pc,{localeText:o,children:s})})})})})})}g();var nu=()=>{let e=b($l);if(e==null)throw Error(Oc(148));return e};g();var ru=()=>Fc().defaultDates,iu=e=>{let t=Ic(),n=l(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};g();var au=Yt(G(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),ou=Yt(G(`path`,{d:`M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z`}),`ArrowLeft`),su=Yt(G(`path`,{d:`M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`ArrowRight`),cu=Yt(G(`path`,{d:`M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z`}),`Calendar`),lu=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Clock`),uu=Yt(G(`path`,{d:`M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-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-2zm0 16H5V9h14v11z`}),`DateRange`),du=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Time`),fu=Yt(G(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`);function pu(e){return Ne(`MuiPickersArrowSwitcher`,e)}ke(`MuiPickersArrowSwitcher`,[`root`,`spacer`,`button`,`previousIconButton`,`nextIconButton`,`leftArrowIcon`,`rightArrowIcon`]),g();var mu=()=>b(eu);g();var hu=[`children`,`className`,`slots`,`slotProps`,`isNextDisabled`,`isNextHidden`,`onGoToNext`,`nextLabel`,`isPreviousDisabled`,`isPreviousHidden`,`onGoToPrevious`,`previousLabel`,`labelId`,`classes`],gu=[`ownerState`],_u=[`ownerState`],vu=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Root`})({display:`flex`}),yu=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Spacer`})(({theme:e})=>({width:e.spacing(3)})),bu=q(mn,{name:`MuiPickersArrowSwitcher`,slot:`Button`})({variants:[{props:{isButtonHidden:!0},style:{visibility:`hidden`}}]}),xu=e=>B({root:[`root`],spacer:[`spacer`],button:[`button`],previousIconButton:[`previousIconButton`],nextIconButton:[`nextIconButton`],leftArrowIcon:[`leftArrowIcon`],rightArrowIcon:[`rightArrowIcon`]},pu,e),Su=o(function(e,t){let n=dn(),r=cr({props:e,name:`MuiPickersArrowSwitcher`}),{children:i,className:a,slots:o,slotProps:s,isNextDisabled:c,isNextHidden:l,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g,classes:_}=r,v=Z(r,hu),{ownerState:y}=mu(),b=xu(_),S={isDisabled:c,isHidden:l,goTo:u,label:d},C={isDisabled:f,isHidden:p,goTo:m,label:h},w=(o==null?void 0:o.previousIconButton)??bu,T=Vn({elementType:w,externalSlotProps:s==null?void 0:s.previousIconButton,additionalProps:{size:`medium`,title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:`end`,onClick:C.goTo},ownerState:x({},y,{isButtonHidden:C.isHidden??!1}),className:Ve(b.button,b.previousIconButton)}),E=(o==null?void 0:o.nextIconButton)??bu,D=Vn({elementType:E,externalSlotProps:s==null?void 0:s.nextIconButton,additionalProps:{size:`medium`,title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:`start`,onClick:S.goTo},ownerState:x({},y,{isButtonHidden:S.isHidden??!1}),className:Ve(b.button,b.nextIconButton)}),O=(o==null?void 0:o.leftArrowIcon)??ou,k=Z(Vn({elementType:O,externalSlotProps:s==null?void 0:s.leftArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.leftArrowIcon}),gu),A=(o==null?void 0:o.rightArrowIcon)??su,j=Z(Vn({elementType:A,externalSlotProps:s==null?void 0:s.rightArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.rightArrowIcon}),_u);return Je(vu,x({ref:t,className:Ve(b.root,a),ownerState:y},v,{children:[G(w,x({},T,{children:n?G(A,x({},j)):G(O,x({},k))})),i?G(Pt,{variant:`subtitle1`,component:`span`,id:g,children:i}):G(yu,{className:b.spacer,ownerState:y}),G(E,x({},D,{children:n?G(O,x({},k)):G(A,x({},j))}))]}))}),Cu={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function wu(e){let{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(t==null)return Cu;let i=t.findIndex(t=>n(e.view,t)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(x({},e,{step:a}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}g();function Tu({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){let d=l(n),f=l(i),p=l(i.includes(n)?n:i[0]),[m,h]=$t({name:`useViews`,state:`view`,controlled:r,default:p.current}),g=l(o?m:null),[_,v]=$t({name:`useViews`,state:`focusedView`,controlled:s,default:g.current}),y=u?u({setView:h,view:m,defaultView:p.current,views:i}):Cu;a(()=>{(d.current&&d.current!==n||f.current&&f.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),f.current=i,d.current=n)},[n,h,m,i]);let b=i.indexOf(m),S=i[b-1]??null,C=i[b+1]??null,w=Y((e,t)=>{v(t?e:t=>e===t?null:t),c==null||c(e,t)}),T=Y(e=>{w(e,!0),e!==m&&(h(e),t&&t(e))}),E=Y(()=>{C&&T(C)}),D=Y((t,n,r)=>{let a=n===`finish`,o=r?i.indexOf(r)<i.length-1:!!C;e(t,a&&o?`partial`:n,r);let s=null;if(r!=null&&r!==m?s=r:a&&(s=m),s==null)return;let c=i[i.indexOf(s)+1];c==null||!y.areViewsInSameStep(s,c)||T(c)});return x({},y,{view:m,setView:T,focusedView:_,setFocusedView:w,nextView:C,previousView:S,defaultView:i.includes(n)?n:i[0],goToNextView:E,setValueAndGoToNextView:D})}g();function Eu(e,{disableFuture:t,maxDate:n,timezone:r}){let i=Ic();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isBefore(a,n)?a:n);return!i.isAfter(o,e)},[t,n,e,i,r])}function Du(e,{disablePast:t,minDate:n,timezone:r}){let i=Ic();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isAfter(a,n)?a:n);return!i.isBefore(o,i.startOfMonth(e))},[t,n,e,i,r])}function Ou(e,t,n,r){let i=Ic(),a=p(()=>i.isValid(e)?e:null,[i,e]);return{meridiemMode:ll(a,i),handleMeridiemChange:f(e=>{n(a==null?null:dl(a,e,!!t,i),r??`partial`)},[t,a,n,r,i])}}var ku=q(`div`,{slot:`internal`,shouldForwardProp:void 0})({overflow:`hidden`,width:320,maxHeight:336,display:`flex`,flexDirection:`column`,margin:`0 auto`});function Au(e){return Ne(`MuiTimeClock`,e)}var ju=ke(`MuiTimeClock`,[`root`,`arrowSwitcher`]),Mu={x:110,y:110},Nu={x:Mu.x,y:0},Pu=Nu.x-Mu.x,Fu=Nu.y-Mu.y,Iu=e=>180/Math.PI*e,Lu=(e,t,n)=>{let r=t-Mu.x,i=n-Mu.y,a=Iu(Math.atan2(Pu,Fu)-Math.atan2(r,i));a=Math.round(a/e)*e,a%=360;let o=Math.floor(a/e)||0,s=r**2+i**2;return{value:o,distance:Math.sqrt(s)}},Ru=(e,t,n=1)=>{let{value:r}=Lu(n*6,e,t);return r=r*n%60,r},zu=(e,t,n)=>{let{value:r,distance:i}=Lu(30,e,t),a=r||12;return n?a%=12:i<74&&(a+=12,a%=24),a};function Bu(e){return Ne(`MuiClockPointer`,e)}var Vu=ke(`MuiClockPointer`,[`root`,`thumb`]);g();var Hu=[`className`,`classes`,`isBetweenTwoClockValues`,`isInner`,`type`,`viewValue`],Uu=e=>B({root:[`root`],thumb:[`thumb`]},Bu,e),Wu=q(`div`,{name:`MuiClockPointer`,slot:`Root`})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,left:`calc(50% - 1px)`,bottom:`50%`,transformOrigin:`center bottom 0px`,variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create([`transform`,`height`])}}]})),Gu=q(`div`,{name:`MuiClockPointer`,slot:`Thumb`})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:`50%`,position:`absolute`,top:-21,left:`calc(50% - 18px)`,border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:`content-box`,variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function Ku(e){let t=cr({props:e,name:`MuiClockPointer`}),{className:n,classes:r,isBetweenTwoClockValues:i,isInner:o,type:s,viewValue:c}=t,u=Z(t,Hu),d=l(s);a(()=>{d.current=s},[s]);let{ownerState:f}=mu(),p=x({},f,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:i}),m=Uu(r);return G(Wu,x({style:(()=>{let e=360/(s===`hours`?12:60)*c;return s===`hours`&&c>12&&(e-=360),{height:Math.round((o?.26:.4)*220),transform:`rotateZ(${e}deg)`}})(),className:Ve(m.root,n),ownerState:p},u,{children:G(Gu,{ownerState:p,className:m.thumb})}))}function qu(e){return Ne(`MuiClock`,e)}var Ju=ke(`MuiClock`,[`root`,`clock`,`wrapper`,`squareMask`,`pin`,`amButton`,`pmButton`,`meridiemText`,`selected`]);g();var Yu=(e,t)=>{let n={root:[`root`],clock:[`clock`],wrapper:[`wrapper`],squareMask:[`squareMask`],pin:[`pin`],amButton:[`amButton`,t.clockMeridiemMode===`am`&&`selected`],pmButton:[`pmButton`,t.clockMeridiemMode===`pm`&&`selected`],meridiemText:[`meridiemText`]};return B(n,qu,e)},Xu=q(`div`,{name:`MuiClock`,slot:`Root`})(({theme:e})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,margin:e.spacing(2)})),Zu=q(`div`,{name:`MuiClock`,slot:`Clock`})({backgroundColor:`rgba(0,0,0,.07)`,borderRadius:`50%`,height:220,width:220,flexShrink:0,position:`relative`,pointerEvents:`none`}),Qu=q(`div`,{name:`MuiClock`,slot:`Wrapper`})({"&:focus":{outline:`none`}}),$u=q(`div`,{name:`MuiClock`,slot:`SquareMask`})({width:`100%`,height:`100%`,position:`absolute`,pointerEvents:`auto`,outline:0,touchAction:`none`,userSelect:`none`,variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:`pointer`,borderRadius:`50%`},"&:active":{cursor:`move`}}}]}),ed=q(`div`,{name:`MuiClock`,slot:`Pin`})(({theme:e})=>({width:6,height:6,borderRadius:`50%`,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`})),td=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),nd=q(mn,{name:`MuiClock`,slot:`AmButton`})(({theme:e})=>x({},td(e,`am`),{position:`absolute`,left:8})),rd=q(mn,{name:`MuiClock`,slot:`PmButton`})(({theme:e})=>x({},td(e,`pm`),{position:`absolute`,right:8})),id=q(Pt,{name:`MuiClock`,slot:`MeridiemText`})({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`});function ad(e){let{ampm:t,ampmInClock:n,autoFocus:r,children:i,value:o,handleMeridiemChange:s,isTimeDisabled:c,meridiemMode:u,minutesStep:d=1,onChange:f,selectedId:p,type:m,viewValue:h,viewRange:[g,_],disabled:v=!1,readOnly:b,className:S,classes:C}=cr({props:e,name:`MuiClock`}),w=Ic(),T=Lc(),{ownerState:E}=mu(),D=x({},E,{isClockDisabled:v,clockMeridiemMode:u}),O=l(!1),k=l(null),A=l(null),M=l(void 0),N=Yu(C,D),ee=c(h,m),P=!t&&m===`hours`&&(h<1||h>12),F=(e,t)=>{v||b||c(e,m)||f(e,t)},I=(e,n)=>{let r=A.current;if(!r)return;let i=r.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=m===`seconds`||m===`minutes`?Ru(a,o,d):zu(a,o,!!t);F(s,n)},te=()=>{var e;O.current=!1,k.current=null,(e=M.current)==null||e.call(M)},ne=Y(e=>{e.pointerId===k.current&&(e.preventDefault(),I(e,`shallow`))}),R=Y(e=>{e.pointerId===k.current&&(te(),I(e,`finish`))}),z=Y(e=>{e.pointerId===k.current&&te()}),B=e=>{if(e.button>0||e.isPrimary===!1||v||b)return;te(),O.current=!0,k.current=e.pointerId;let t=L(A.current);t.addEventListener(`pointermove`,ne),t.addEventListener(`pointerup`,R),t.addEventListener(`pointercancel`,z),M.current=()=>{t.removeEventListener(`pointermove`,ne),t.removeEventListener(`pointerup`,R),t.removeEventListener(`pointercancel`,z),M.current=void 0},I(e.nativeEvent,`shallow`)},re=m!==`hours`&&h%5!=0,ie=m===`minutes`?d:1,ae=l(null);j(()=>{r&&ae.current.focus()},[r]),a(()=>()=>{var e;return(e=M.current)==null?void 0:e.call(M)},[]);let oe=e=>Math.max(g,Math.min(_,e)),V=e=>(e+(_+1))%(_+1);return Je(Xu,{className:Ve(N.root,S),children:[Je(Zu,{className:N.clock,children:[G($u,{ref:A,onPointerDown:B,ownerState:D,className:N.squareMask}),!ee&&Je(y,{children:[G(ed,{className:N.pin}),o!=null&&G(Ku,{type:m,viewValue:h,isInner:P,isBetweenTwoClockValues:re})]}),G(Qu,{"aria-activedescendant":p,"aria-label":T.clockLabelText(m,o==null?null:w.format(o,t?`fullTime12h`:`fullTime24h`)),ref:ae,role:`listbox`,onKeyDown:e=>{if(!O.current)switch(e.key){case`Home`:F(g,`partial`),e.preventDefault();break;case`End`:F(_,`partial`),e.preventDefault();break;case`ArrowUp`:F(V(h+ie),`partial`),e.preventDefault();break;case`ArrowDown`:F(V(h-ie),`partial`),e.preventDefault();break;case`PageUp`:F(oe(h+5),`partial`),e.preventDefault();break;case`PageDown`:F(oe(h-5),`partial`),e.preventDefault();break;case`Enter`:case` `:F(h,`finish`),e.preventDefault()}},tabIndex:0,className:N.wrapper,children:i})]}),t&&n&&Je(y,{children:[G(nd,{onClick:b?void 0:()=>s(`am`),disabled:v||u===null,ownerState:D,className:N.amButton,title:el(w,`am`),children:G(id,{variant:`caption`,className:N.meridiemText,children:el(w,`am`)})}),G(rd,{disabled:v||u===null,onClick:b?void 0:()=>s(`pm`),ownerState:D,className:N.pmButton,title:el(w,`pm`),children:G(id,{variant:`caption`,className:N.meridiemText,children:el(w,`pm`)})})]})]})}function od(e){return Ne(`MuiClockNumber`,e)}var sd=ke(`MuiClockNumber`,[`root`,`selected`,`disabled`]);g();var cd=[`className`,`classes`,`disabled`,`index`,`inner`,`label`,`selected`],ld=(e,t)=>{let n={root:[`root`,t.isClockNumberSelected&&`selected`,t.isClockNumberDisabled&&`disabled`]};return B(n,od,e)},ud=q(`span`,{name:`MuiClockNumber`,slot:`Root`,overridesResolver:(e,t)=>[t.root,{[`&.${sd.disabled}`]:t.disabled},{[`&.${sd.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:`absolute`,left:`calc((100% - 36px) / 2)`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,borderRadius:`50%`,color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${sd.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${sd.disabled}`]:{pointerEvents:`none`,color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function dd(e){let t=cr({props:e,name:`MuiClockNumber`}),{className:n,classes:r,disabled:i,index:a,inner:o,label:s,selected:c}=t,l=Z(t,cd),{ownerState:u}=mu(),d=x({},u,{isClockNumberInInnerRing:o,isClockNumberSelected:c,isClockNumberDisabled:i}),f=ld(r,d),p=a%12/12*Math.PI*2-Math.PI/2,m=91*(o?.65:1),h=Math.round(Math.cos(p)*m),g=Math.round(Math.sin(p)*m);return G(ud,x({className:Ve(f.root,n),"aria-disabled":i?!0:void 0,"aria-selected":c?!0:void 0,role:`option`,style:{transform:`translate(${h}px, ${g+92}px`},ownerState:d},l,{children:s}))}g();var fd=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:a})=>{let o=t?a.getHours(t):null,s=[],c=+!!e,l=e?12:23,u=t=>o===null?!1:e?t===12?o===12||o===0:o===t||o-12===t:o===t;for(let t=c;t<=l;t+=1){let o=t.toString();t===0&&(o=`00`);let c=!e&&(t===0||t>12);o=a.formatNumber(o);let l=u(t);s.push(G(dd,{id:l?i:void 0,index:t,inner:c,selected:l,disabled:r(t),label:o,"aria-label":n(o)},t))}return s},pd=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let a=e.formatNumber;return[[5,a(`05`)],[10,a(`10`)],[15,a(`15`)],[20,a(`20`)],[25,a(`25`)],[30,a(`30`)],[35,a(`35`)],[40,a(`40`)],[45,a(`45`)],[50,a(`50`)],[55,a(`55`)],[0,a(`00`)]].map(([e,a],o)=>{let s=e===t;return G(dd,{label:a,id:s?i:void 0,index:o+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)})};g();var md=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:a,valueManager:o})=>{let s=Ic(),[c,l]=$t({name:e,state:`value`,controlled:n,default:r??o.emptyValue}),u=p(()=>o.getTimezone(s,c),[s,o,c]),d=Y(e=>u==null?e:o.setTimezone(s,u,e)),f=p(()=>t||u||(i?s.getTimezone(Array.isArray(i)?i[0]:i):`default`),[t,u,i,s]);return{value:p(()=>o.setTimezone(s,f,c),[o,s,f,c]),handleValueChange:Y((e,...t)=>{let n=d(e);l(n),a==null||a(n,...t)}),timezone:f}},hd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},gd=e=>Math.max(...e.map(e=>hd[e.type]??1)),_d=(e,t,n)=>{if(t===hd.year)return e.startOfYear(n);if(t===hd.month)return e.startOfMonth(n);if(t===hd.day)return e.startOfDay(n);let r=n;return t<hd.minutes&&(r=e.setMinutes(r,0)),t<hd.seconds&&(r=e.setSeconds(r,0)),t<hd.milliseconds&&(r=e.setMilliseconds(r,0)),r},vd=({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let a=i?i():_d(t,n,$c(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=_d(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=_d(t,n,e.maxDate));let o=pl(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&o(e.minTime,a)&&(a=_d(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:qc(t,a,e.minTime))),e.maxTime!=null&&o(a,e.maxTime)&&(a=_d(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:qc(t,a,e.maxTime))),a},yd=[`value`,`referenceDate`],bd={emptyValue:null,getTodayValue:$c,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Z(e,yd);return r.adapter.isValid(t)?t:n??vd(r)},cleanValue:Yc,areValuesEqual:Zc,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},xd={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getHiddenInputValueFromSections:jl,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>x({},e,{value:``}))};g();var Sd=({value:e,referenceDate:t,adapter:n,props:r,timezone:i})=>{let a=p(()=>bd.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:hd.day,timezone:i,getTodayDate:()=>$c(n,i,`date`)}),[t,i]);return e??a};g();var Cd=`ampm.ampmInClock.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.showViewSwitcher.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.timezone`.split(`.`),wd=e=>B({root:[`root`],arrowSwitcher:[`arrowSwitcher`]},Au,e),Td=q(ku,{name:`MuiTimeClock`,slot:`Root`})({display:`flex`,flexDirection:`column`,position:`relative`}),Ed=q(Su,{name:`MuiTimeClock`,slot:`ArrowSwitcher`})({position:`absolute`,right:12,top:15}),Dd=[`hours`,`minutes`],Od=o(function(e,t){let n=Ic(),r=cr({props:e,name:`MuiTimeClock`}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:o,slots:s,slotProps:c,value:l,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:_,disablePast:v,minutesStep:y=1,shouldDisableTime:b,showViewSwitcher:S,onChange:C,view:w,views:T=Dd,openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,timezone:ee}=r,P=Z(r,Cd),{value:F,handleValueChange:I,timezone:te}=md({name:`TimeClock`,timezone:ee,value:l,defaultValue:u,referenceDate:d,onChange:C,valueManager:bd}),L=Sd({value:F,referenceDate:d,adapter:n,props:r,timezone:te}),ne=Lc(),R=iu(te),z=Le(),{ownerState:B}=mu(),{view:re,setView:ie,previousView:ae,nextView:oe,setValueAndGoToNextView:V}=Tu({view:w,views:T,openTo:E,onViewChange:D,onChange:I,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=Ou(L,i,V),H=f((e,t)=>{let r=pl(m,n),a=t===`hours`||t===`minutes`&&T.includes(`seconds`),o=({start:e,end:t})=>!(g&&r(g,t)||h&&r(e,h)||_&&r(e,R)||v&&r(R,a?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(b)switch(t){case`hours`:return!b(n.setHours(L,e),`hours`);case`minutes`:return!b(n.setMinutes(L,e),`minutes`);case`seconds`:return!b(n.setSeconds(L,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=ul(e,se,i),r=n.setHours(L,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(L,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case`seconds`:{let t=n.setSeconds(L,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[i,L,m,h,se,g,y,b,n,_,v,R,T]),U=p(()=>{switch(re){case`hours`:{let e=(e,t)=>{let r=ul(e,se,i);V(n.setHours(L,r),t,`hours`)},t=n.getHours(L),r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:fd({value:F,adapter:n,ampm:i,onChange:e,getClockNumberText:ne.hoursClockNumberText,isDisabled:e=>M||H(e,`hours`),selectedId:z}),viewRange:r}}case`minutes`:{let e=n.getMinutes(L),t=(e,t)=>{V(n.setMinutes(L,e),t,`minutes`)};return{viewValue:e,onChange:t,children:pd({adapter:n,value:e,onChange:t,getClockNumberText:ne.minutesClockNumberText,isDisabled:e=>M||H(e,`minutes`),selectedId:z}),viewRange:[0,59]}}case`seconds`:{let e=n.getSeconds(L),t=(e,t)=>{V(n.setSeconds(L,e),t,`seconds`)};return{viewValue:e,onChange:t,children:pd({adapter:n,value:e,onChange:t,getClockNumberText:ne.secondsClockNumberText,isDisabled:e=>M||H(e,`seconds`),selectedId:z}),viewRange:[0,59]}}default:throw Error(Oc(147))}},[re,n,F,i,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,se,V,L,H,z,M]),le=wd(j);return Je(Td,x({ref:t,className:Ve(le.root,A),ownerState:B},P,{children:[G(ad,x({autoFocus:o??!!O,ampmInClock:a&&T.includes(`hours`),value:F,type:re,ampm:i,minutesStep:y,isTimeDisabled:H,meridiemMode:se,handleMeridiemChange:ce,selectedId:z,disabled:M,readOnly:N},U)),S&&G(Ed,{className:le.arrowSwitcher,slots:s,slotProps:c,onGoToPrevious:()=>ie(ae),isPreviousDisabled:!ae,previousLabel:ne.openPreviousView,onGoToNext:()=>ie(oe),isNextDisabled:!oe,nextLabel:ne.openNextView,ownerState:B})]}))});function kd(e){return Ne(`MuiDigitalClock`,e)}var Ad=ke(`MuiDigitalClock`,[`root`,`list`,`item`]);function jd(e,t){return Array.isArray(t)?t.every(t=>e.indexOf(t)!==-1):e.indexOf(t)!==-1}var Md=e=>{setTimeout(e,0)},Nd=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Nd(t.shadowRoot):t:null},Pd=e=>Nd(L(e)),Fd=e=>Array.from(e.children).indexOf(Pd(e)),Id=`@media (pointer: fine)`;function Ld(e){let t={};for(let n of Object.keys(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=e[n]);return t}function Rd(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):t!=null&&e.push(t),e),[])}g();var zd=`ampm.timeStep.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.views.skipDisabled.timezone`.split(`.`),Bd=e=>B({root:[`root`],list:[`list`],item:[`item`]},kd,e),Vd=q(ku,{name:`MuiDigitalClock`,slot:`Root`})({overflowY:`auto`,width:`100%`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]}),Hd=q(at,{name:`MuiDigitalClock`,slot:`List`})({padding:0}),Ud=q(fe,{name:`MuiDigitalClock`,slot:`Item`,shouldForwardProp:e=>e!==`itemValue`&&e!==`formattedValue`})(({theme:e})=>({padding:`8px 16px`,margin:`2px 4px`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Wd=o(function(e,t){let n=Ic(),r=l(null),i=nt(t,r),a=l(null),o=l(null),s=cr({props:e,name:`MuiDigitalClock`}),{ampm:c=n.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,slots:m,slotProps:h,value:g,defaultValue:_,referenceDate:v,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:S,disableFuture:C,disablePast:w,minutesStep:T=1,shouldDisableTime:E,onChange:D,view:O,openTo:k,onViewChange:A,focusedView:M,onFocusedViewChange:N,className:ee,classes:P,disabled:F,readOnly:I,views:te=[`hours`],skipDisabled:L=!1,timezone:ne}=s,R=Z(s,zd),{value:z,handleValueChange:B,timezone:re}=md({name:`DigitalClock`,timezone:ne,value:g,defaultValue:_,referenceDate:v,onChange:D,valueManager:bd}),ie=Lc(),ae=iu(re),{ownerState:oe}=mu(),V=x({},oe,{hasDigitalClockAlreadyBeenRendered:!!r.current}),se=Bd(P),ce=(m==null?void 0:m.digitalClockItem)??Ud,H=Vn({elementType:ce,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:V,className:se.item}),U=Sd({value:z,referenceDate:v,adapter:n,props:s,timezone:re}),{setValueAndGoToNextView:le}=Tu({view:O,views:te,openTo:k,onViewChange:A,onChange:Y(e=>B(e,`finish`,`hours`)),focusedView:M,onFocusedViewChange:N}),ue=Y(e=>{le(e,`finish`)});j(()=>{if(r.current===null)return;let e=r.current.querySelector(`[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]`);if(!e)return;let t=e.offsetTop;(d||M)&&e!==o.current&&(o.current=e,e.focus()),r.current.scrollTop=t-4});let de=f(e=>{let t=pl(y,n);return!!(S&&t(S,e)||b&&t(e,b)||C&&t(e,ae)||w&&t(ae,e))||!(n.getMinutes(e)%T===0&&(!E||!E(e,`hours`)))},[y,n,S,b,C,ae,w,T,E]),fe=p(()=>{let e=[],t=n.startOfDay(U);for(;n.isSameDay(U,t);)e.push(t),t=n.addMinutes(t,u);return e},[U,u,n]),pe=fe.findIndex(e=>n.isEqual(e,U));return G(Vd,x({ref:i,className:Ve(se.root,ee),ownerState:V},R,{children:G(Hd,{ref:a,role:`listbox`,"aria-label":ie.timePickerToolbarTitle,className:se.list,onKeyDown:e=>{switch(e.key){case`PageUp`:{let t=Fd(a.current)-5,n=a.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case`PageDown`:{let t=Fd(a.current)+5,n=a.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:fe.map((e,t)=>{let r=de(e);if(L&&r)return null;let i=n.isEqual(e,z),a=n.format(e,c?`fullTime12h`:`fullTime24h`);return G(ce,x({onClick:()=>!I&&ue(e),selected:i,disabled:F||r,disableRipple:I,role:`option`,"aria-disabled":I,"aria-selected":i,tabIndex:pe===t||pe===-1&&t===0?0:-1,itemValue:e,formattedValue:a},H,{children:a}),`${e.valueOf()}-${a}`)})})}))});function Gd(e){return Ne(`MuiMultiSectionDigitalClock`,e)}var Kd=ke(`MuiMultiSectionDigitalClock`,[`root`]);function qd(e){return Ne(`MuiMultiSectionDigitalClockSection`,e)}var Jd=ke(`MuiMultiSectionDigitalClockSection`,[`root`,`item`]);g();var Yd=[`autoFocus`,`onChange`,`className`,`classes`,`disabled`,`readOnly`,`items`,`active`,`slots`,`slotProps`,`skipDisabled`],Xd=e=>B({root:[`root`],item:[`item`]},qd,e),Zd=q(at,{name:`MuiMultiSectionDigitalClockSection`,slot:`Root`})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:`hidden`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},"@media (pointer: fine)":{"&:hover":{overflowY:`auto`}},"@media (pointer: none), (pointer: coarse)":{overflowY:`auto`},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]})),Qd=q(fe,{name:`MuiMultiSectionDigitalClockSection`,slot:`Item`})(({theme:e})=>({padding:8,margin:`2px 4px`,width:48,justifyContent:`center`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),$d=o(function(e,t){let n=l(null),r=nt(t,n),i=l(null),o=l(!1),s=cr({props:e,name:`MuiMultiSectionDigitalClockSection`}),{autoFocus:c,onChange:u,className:d,classes:f,disabled:p,readOnly:m,items:h,active:g,slots:_,slotProps:v,skipDisabled:y}=s,b=Z(s,Yd),{ownerState:S}=mu(),C=x({},S,{hasDigitalClockAlreadyBeenRendered:!!n.current}),w=Xd(f),T=(_==null?void 0:_.digitalClockSectionItem)??Qd;j(()=>{if(n.current===null)return;let e=n.current.querySelector(`[role="option"][tabindex="0"], [role="option"][aria-selected="true"]`);if(!e)return;let t=document.activeElement,r=i.current===e,a=!!t&&n.current.contains(t),s=r&&o.current;if(g&&c&&(!r||s)&&(i.current==null||o.current||a)&&(i.current=e,o.current=!1,e.focus()),r)return;let l=e.offsetTop,u=e.offsetHeight,d=n.current.clientHeight,f=n.current.scrollHeight,p=l-d/2+u/2,m=f-d,h=Math.min(p,m);n.current.scrollTop=Math.max(0,h)});let E=Y(e=>{let t=e.relatedTarget,r=t==null?void 0:t.parentElement,a=t==null?void 0:t.getAttribute(`role`),s=(r==null?void 0:r.nodeName)===`UL`&&r!==n.current||a===`gridcell`;o.current=s,i.current&&(r==null?void 0:r.nodeName)===`UL`&&r!==n.current&&(i.current=null)});a(()=>{g||(i.current=null)},[g]);let D=h.findIndex(e=>e.isFocused(e.value)),O=Y(e=>{switch(e.key){case`Tab`:o.current=!0;break;case`PageUp`:{let t=Fd(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case`PageDown`:{let t=Fd(n.current)+5,r=n.current.children,i=r[Math.min(r.length-1,t)];i&&i.focus(),e.preventDefault();break}}});return G(Zd,x({ref:r,className:Ve(w.root,d),ownerState:C,role:`listbox`,onKeyDown:O,onBlur:E},b,{children:h.map((e,t)=>{var n;let r=(n=e.isDisabled)==null?void 0:n.call(e,e.value),i=p||r;if(y&&i)return null;let a=e.isSelected(e.value),o=D===t||D===-1&&t===0?0:-1;return G(T,x({onClick:()=>!m&&u(e.value),selected:a,disabled:i,disableRipple:m,role:`option`,"aria-disabled":m||i||void 0,"aria-label":e.ariaLabel,"aria-selected":a,tabIndex:o,className:w.item},v==null?void 0:v.digitalClockSectionItem,{children:e.label}),e.label)})}))}),ef=({now:e,value:t,adapter:n,ampm:r,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{let c=t?n.getHours(t):null,l=[],u=(e,t)=>{let n=t??c;return n===null?!1:r?e===12?n===12||n===0:n===e||n-12===e:n===e},d=e=>u(e,n.getHours(s)),f=n.setDate(n.setMonth(n.startOfDay(e),0),15),p=r?11:23;for(let e=0;e<=p;e+=o){let t=n.format(n.setHours(f,e),r?`hours12h`:`hours24h`),o=a(parseInt(t,10).toString());t=n.formatNumber(t),l.push({value:e,label:t,isSelected:u,isDisabled:i,isFocused:d,ariaLabel:o})}return l},tf=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{let s=t=>e!==null&&o&&e===t,c=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,o)=>{let l=r*o;return{value:l,label:t.formatNumber(i(l)),isDisabled:n,isSelected:s,isFocused:c,ariaLabel:a(l.toString())}})]};g();var nf=`ampm.timeSteps.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.skipDisabled.timezone`.split(`.`),rf=e=>B({root:[`root`]},Gd,e),af=q(ku,{name:`MuiMultiSectionDigitalClock`,slot:`Root`})(({theme:e})=>({flexDirection:`row`,width:`100%`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),of=o(function(e,t){let n=Ic(),r=dn(),i=cr({props:e,name:`MuiMultiSectionDigitalClock`}),{ampm:a=n.is12HourCycleInCurrentLocale(),timeSteps:o,autoFocus:s,slots:c,slotProps:l,value:u,defaultValue:d,referenceDate:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:_,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:S,onChange:C,view:w,views:T=[`hours`,`minutes`],openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,skipDisabled:ee=!1,timezone:P}=i,F=Z(i,nf),{value:I,handleValueChange:te,timezone:L}=md({name:`MultiSectionDigitalClock`,timezone:P,value:u,defaultValue:d,referenceDate:m,onChange:C,valueManager:bd}),ne=Lc(),R=iu(L),z=p(()=>x({hours:1,minutes:5,seconds:5},o),[o]),B=Sd({value:I,referenceDate:m,adapter:n,props:i,timezone:L}),re=Y((e,t,n)=>te(e,t,n)),ie=p(()=>!a||!T.includes(`hours`)||T.includes(`meridiem`)?T:[...T,`meridiem`],[a,T]),{view:ae,setValueAndGoToNextView:oe,focusedView:V}=Tu({view:w,views:ie,openTo:E,onViewChange:D,onChange:re,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=Ou(B,a,Y(e=>{oe(e,`finish`,`meridiem`)}),`finish`),H=f((e,t)=>{let r=pl(h,n),i=t===`hours`||t===`minutes`&&ie.includes(`seconds`),o=({start:e,end:t})=>!(_&&r(_,t)||g&&r(e,g)||v&&r(e,R)||y&&r(R,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(S)switch(t){case`hours`:return!S(n.setHours(B,e),`hours`);case`minutes`:return!S(n.setMinutes(B,e),`minutes`);case`seconds`:return!S(n.setSeconds(B,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=ul(e,se,a),r=n.setHours(B,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(B,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case`seconds`:{let t=n.setSeconds(B,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[a,B,h,g,se,_,b,S,n,v,y,R,ie]),U=f(e=>{switch(e){case`hours`:return{onChange:e=>{let t=ul(e,se,a);oe(n.setHours(B,t),`finish`,`hours`)},items:ef({now:R,value:I,ampm:a,adapter:n,isDisabled:e=>H(e,`hours`),timeStep:z.hours,resolveAriaLabel:ne.hoursClockNumberText,valueOrReferenceDate:B})};case`minutes`:return{onChange:e=>{oe(n.setMinutes(B,e),`finish`,`minutes`)},items:tf({value:n.getMinutes(B),adapter:n,isDisabled:e=>H(e,`minutes`),resolveLabel:e=>n.format(n.setMinutes(R,e),`minutes`),timeStep:z.minutes,hasValue:!!I,resolveAriaLabel:ne.minutesClockNumberText})};case`seconds`:return{onChange:e=>{oe(n.setSeconds(B,e),`finish`,`seconds`)},items:tf({value:n.getSeconds(B),adapter:n,isDisabled:e=>H(e,`seconds`),resolveLabel:e=>n.format(n.setSeconds(R,e),`seconds`),timeStep:z.seconds,hasValue:!!I,resolveAriaLabel:ne.secondsClockNumberText})};case`meridiem`:{let e=el(n,`am`),t=el(n,`pm`);return{onChange:ce,items:[{value:`am`,label:e,isSelected:()=>!!I&&se===`am`,isFocused:()=>!!B&&se===`am`,ariaLabel:e},{value:`pm`,label:t,isSelected:()=>!!I&&se===`pm`,isFocused:()=>!!B&&se===`pm`,ariaLabel:t}]}}default:throw Error(Oc(144,e))}},[R,I,a,n,z.hours,z.minutes,z.seconds,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,se,oe,B,H,ce]),le=p(()=>{if(!r)return ie;let e=ie.filter(e=>e!==`meridiem`);return e.reverse(),ie.includes(`meridiem`)&&e.push(`meridiem`),e},[r,ie]),ue=p(()=>ie.reduce((e,t)=>x({},e,{[t]:U(t)}),{}),[ie,U]),{ownerState:de}=mu(),fe=rf(j);return G(af,x({ref:t,className:Ve(fe.root,A),ownerState:de,role:`group`},F,{children:le.map(e=>G($d,{items:ue[e].items,onChange:ue[e].onChange,active:ae===e,autoFocus:s||V===e,disabled:M,readOnly:N,slots:c,slotProps:l,skipDisabled:ee,"aria-label":ne.selectViewText(e)},e))}))});function sf(e){return Ne(`MuiPickerDay`,e)}var cf=ke(`MuiPickerDay`,[`root`,`dayOutsideMonth`,`today`,`selected`,`disabled`,`fillerCell`]);g();function lf(e){let{disabled:t,selected:n,today:r,outsideCurrentMonth:i,day:a,disableHighlightToday:o,showDaysOutsideCurrentMonth:s}=e,c=Ic(),{ownerState:l}=mu();return p(()=>x({},l,{day:a,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:i??!1,isDayStartOfWeek:c.isSameDay(a,c.startOfWeek(a)),isDayEndOfWeek:c.isSameDay(a,c.endOfWeek(a)),disableHighlightToday:o??!1,showDaysOutsideCurrentMonth:s??!1}),[c,l,a,n,t,r,i,o,s])}g();var uf=[`autoFocus`,`className`,`classes`,`hidden`,`isAnimating`,`onClick`,`onDaySelect`,`onFocus`,`onBlur`,`onKeyDown`,`onMouseDown`,`onMouseEnter`,`children`,`isFirstVisibleCell`,`isLastVisibleCell`,`day`,`selected`,`disabled`,`today`,`outsideCurrentMonth`,`disableHighlightToday`,`showDaysOutsideCurrentMonth`,`isVisuallySelected`,`isDayFillerCell`],df=(e,t)=>{let{isDaySelected:n,disableHighlightToday:r,isDayCurrent:i,isDayDisabled:a,isDayOutsideMonth:o,isDayFillerCell:s}=e;return B({root:[`root`,n&&!s&&`selected`,a&&`disabled`,!r&&i&&!n&&!s&&`today`,o&&`dayOutsideMonth`,s&&`fillerCell`]},sf,t)},ff=q(Yn,{name:`MuiPickerDay`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&t.dayOutsideMonth,n.isDayFillerCell&&t.fillerCell]}})(({theme:e})=>x({"--PickerDay-horizontalMargin":`2px`,"--PickerDay-size":`36px`},e.typography.caption,{lineHeight:1,display:`flex`,width:`var(--PickerDay-size)`,height:`var(--PickerDay-size)`,borderRadius:`calc(var(--PickerDay-size) / 2)`,padding:0,backgroundColor:`transparent`,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)},marginLeft:`var(--PickerDay-horizontalMargin)`,marginRight:`var(--PickerDay-horizontalMargin)`,variants:[{props:{isDaySelected:!0},style:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:focus, &:hover":{willChange:`background-color`,backgroundColor:(e.vars||e).palette.primary.dark},[`&.${cf.disabled}`]:{opacity:.6}}},{props:{isDayOutsideMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{isDayDisabled:!0},style:{color:(e.vars||e).palette.text.disabled}},{props:{isDayFillerCell:!0},style:{opacity:0,pointerEvents:`none`}},{props:{isDayCurrent:!0,isDaySelected:!1},style:{outline:`1px solid ${(e.vars||e).palette.text.secondary}`,outlineOffset:-1}}]})),pf=()=>{},mf=h(o(function(e,t){let n=cr({props:e,name:`MuiPickerDay`}),r=Ic(),{autoFocus:i=!1,className:a,classes:o,isAnimating:s,onClick:c,onDaySelect:u,onFocus:d=pf,onBlur:f=pf,onKeyDown:p=pf,onMouseDown:m=pf,onMouseEnter:h=pf,children:g,day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w,isDayFillerCell:T}=n,E=Z(n,uf),D=lf({day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w}),O=x({},D,{isDayFillerCell:T??(S&&!w)}),k=df(O,o),A=l(null),M=nt(A,t);return j(()=>{i&&!y&&!s&&!S&&A.current.focus()},[i,y,s,S]),O.isDayFillerCell?G(ff,{ref:M,role:E.role,"aria-colindex":E[`aria-colindex`],ownerState:O,className:Ve(k.root,a),as:`div`}):G(ff,x({ref:M,centerRipple:!0,disabled:y,tabIndex:v?0:-1,onKeyDown:e=>p(e,_),onFocus:e=>d(e,_),onBlur:e=>f(e,_),onMouseEnter:e=>h(e,_),onClick:e=>{e.defaultMuiPrevented=!0,y||u(_),S&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{m(e),S&&e.preventDefault()}},E,{ownerState:O,className:Ve(k.root,a),children:g??r.format(_,`dayOfMonth`)}))})),hf=e=>e.saveQuery!=null,gf=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:i,setTempAndroidValueStr:a,updateSectionValue:o}})=>{let s=Ic(),c=({keyPressed:e,sectionIndex:t},r,a)=>{let o=e.toLowerCase(),s=n.sections[t];if(n.characterQuery!=null&&(!a||a(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){let e=`${n.characterQuery.value}${o}`,a=r(e,s);if(!hf(a))return i({sectionIndex:t,value:e,sectionType:s.type}),a}let c=r(o,s);return hf(c)&&!c.saveQuery?(i(null),null):(i({sectionIndex:t,value:o,sectionType:s.type}),hf(c)?null:c)},l=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return r.length===0?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:r.length===1}},n=(e,n,i,a)=>{let o=e=>_l(s,r,n.type,e);if(n.contentType===`letter`)return t(n.format,o(n.format),e);if(i&&a!=null&&hl(s,i).contentType===`letter`){let n=o(i),r=t(i,n,e);return hf(r)?{saveQuery:!1}:x({},r,{sectionValue:a(r.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case`month`:return n(e,t,s.formats.month,e=>Dl(s,e,s.formats.month,t.format));case`weekDay`:return n(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case`meridiem`:return n(e,t);default:return{saveQuery:!1}}})},u=n=>{let r=({queryValue:n,skipIfBelowMinimum:r,section:i})=>{let a=xl(n,e),o=Number(a),c=t[i.type]({currentDate:null,format:i.format,contentType:i.contentType});if(o>c.maximum)return{saveQuery:!1};if(r&&o<c.minimum)return{saveQuery:!0};let l=o*10>c.maximum||a.length===c.maximum.toString().length;return{sectionValue:Tl(s,o,c,e,i),shouldGoToNextSection:l}};return c(n,(e,t)=>{if(t.contentType===`digit`||t.contentType===`digit-with-letter`)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if(t.type===`month`){let n=kl(s,`digit`,`month`,`MM`),i=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:`MM`,hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:`digit`,maxLength:2}});if(hf(i))return i;let a=Dl(s,i.sectionValue,`MM`,t.format);return x({},i,{sectionValue:a})}if(t.type===`weekDay`){let n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});if(hf(n))return n;let i=gl(s,t.format)[Number(n.sectionValue)-1];return x({},n,{sectionValue:i})}return{saveQuery:!1}},t=>Cl(t,e))};return Y(t=>{let r=n.sections[t.sectionIndex],i=Cl(t.keyPressed,e)?u(x({},t,{keyPressed:Sl(t.keyPressed,e)})):l(t);if(i==null){a(null);return}o({section:r,newSectionValue:i.sectionValue,shouldGoToNextSection:i.shouldGoToNextSection})})},_f=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;let{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:c,minDate:l,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return`invalidDate`;case!!(i&&i(t)):return`shouldDisableDate`;case!!(a&&a(t)):return`shouldDisableMonth`;case!!(o&&o(t)):return`shouldDisableYear`;case!!(c&&r.isAfterDay(t,d)):return`disableFuture`;case!!(s&&r.isBeforeDay(t,d)):return`disablePast`;case!!(l&&r.isBeforeDay(t,l)):return`minDate`;case!!(u&&r.isAfterDay(t,u)):return`maxDate`;default:return null}};_f.valueManager=bd;var vf=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;let{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:l,disableFuture:u}=r,d=e.date(void 0,n),f=pl(c,e);switch(!0){case!e.isValid(t):return`invalidDate`;case!!(i&&f(i,t)):return`minTime`;case!!(a&&f(t,a)):return`maxTime`;case!!(u&&e.isAfter(t,d)):return`disableFuture`;case!!(l&&e.isBefore(t,d)):return`disablePast`;case!!(s&&s(t,`hours`)):return`shouldDisableTime-hours`;case!!(s&&s(t,`minutes`)):return`shouldDisableTime-minutes`;case!!(s&&s(t,`seconds`)):return`shouldDisableTime-seconds`;case!!(o&&e.getMinutes(t)%o!==0):return`minutesStep`;default:return null}};vf.valueManager=bd;var yf=({adapter:e,value:t,timezone:n,props:r})=>{let i=_f({adapter:e,value:t,timezone:n,props:r});return i===null?vf({adapter:e,value:t,timezone:n,props:r}):i};yf.valueManager=bd,g();function bf(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=Ic(),c=l(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:i,props:t}),d=n.valueManager.hasError(u);return a(()=>{o&&!n.valueManager.isSameError(u,c.current)&&o(u,r),c.current=u},[n,o,u,r]),{validationError:u,hasValidationError:d,getValidationErrorForNewValue:Y(e=>n({adapter:s,value:e,timezone:i,props:t}))}}g();var xf=5e3,Sf=e=>{var t;let n=Ic(),r=Lc(),i=dn(),{manager:{validator:o,valueType:s,internal_valueManager:c,internal_fieldValueManager:d},internalPropsWithDefaults:m,internalPropsWithDefaults:{value:h,defaultValue:g,referenceDate:_,onChange:v,format:y,formatDensity:b=`dense`,selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:w=!1,timezone:T},forwardedProps:{error:E}}=e,{value:D,handleValueChange:O,timezone:k}=md({name:`a field component`,timezone:T,value:h,defaultValue:g,referenceDate:_,onChange:v,valueManager:c}),A=l(D);a(()=>{A.current=D},[D]);let{hasValidationError:j}=bf({props:m,validator:o,timezone:k,value:D,onError:m.onError}),M=p(()=>bl(n),[n]),N=p(()=>Ml(n,M,k),[n,M,k]),ee=f(e=>d.getSectionsFromValue(e,e=>Wl({adapter:n,localeText:r,localizedDigits:M,format:y,date:e,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i})),[d,y,r,M,i,w,n,b]),[P,F]=u(()=>{let e=ee(D),t={sections:e,lastExternalValue:D,lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},tempValueStrAndroid:null,characterQuery:null},r=gd(e),a=c.getInitialReferenceValue({referenceDate:_,value:D,adapter:n,props:m,granularity:r,timezone:k});return x({},t,{referenceValue:a})}),[I,te]=$t({controlled:S,default:null,name:`useField`,state:`selectedSections`}),L=e=>{te(e),C==null||C(e)},ne=p(()=>Ll(I,P.sections),[I,P.sections]),R=ne===`all`?0:ne,z=p(()=>Il(P.sections),[P.sections]),B=p(()=>P.sections.every(e=>e.value===``),[P.sections]),re=p(()=>{if(R!=null)return!1;let e=P.sections.filter(e=>e.value!==``);return e.length>0&&P.sections.length-e.length>0},[P.sections,R]),ie=p(()=>E===void 0?j||re:E,[j,re,E]),ae=e=>{let t={validationError:o({adapter:n,value:e,timezone:k,props:m})};O(e,t)},oe=(e,t)=>{let n=[...P.sections];return n[e]=x({},n[e],{value:t,modified:!0}),n},V=l(null),se=Rt(),ce=e=>{R!=null&&(V.current={sectionIndex:R,value:e},se.start(0,()=>{V.current=null}))},H=()=>{c.areValuesEqual(n,D,c.emptyValue)?F(e=>x({},e,{sections:e.sections.map(e=>x({},e,{value:``})),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(c.emptyValue))},U=()=>{if(R==null)return;let e=P.sections[R];e.value!==``&&(ce(``),d.getDateFromSection(D,e)===null?F(e=>x({},e,{sections:oe(R,``),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(d.updateDateInValue(D,e,null))))},le=e=>{let t=d.parseValueStr(e,P.referenceValue,(e,t)=>{let a=n.parse(e,y);if(!n.isValid(a))return null;let o=Wl({adapter:n,localeText:r,localizedDigits:M,format:y,date:a,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i});return Fl(n,a,o,t,!1)});ae(t)},ue=Rt(),de=({section:e,newSectionValue:t,shouldGoToNextSection:r})=>{se.clear(),ue.clear();let i=d.getDateFromSection(D,e);r&&R<P.sections.length-1&&L(R+1);let a=oe(R,t),o=d.getDateSectionsFromValue(a,e),s=Al(n,o,M);if(n.isValid(s)){let t=Fl(n,s,o,d.getDateFromSection(P.referenceValue,e),!0);return i??ue.start(0,()=>{A.current===D&&F(t=>x({},t,{sections:d.clearDateSections(P.sections,e),tempValueStrAndroid:null}))}),ae(d.updateDateInValue(D,e,t))}return o.every(e=>e.value!==``)&&(i==null||n.isValid(i))?(ce(t),ae(d.updateDateInValue(D,e,s))):(i!=null&&(ce(t),ae(d.updateDateInValue(D,e,s))),F(e=>x({},e,{sections:a,tempValueStrAndroid:null})))},fe=e=>F(t=>x({},t,{tempValueStrAndroid:e})),pe=Y(e=>{F(t=>x({},t,{characterQuery:e}))});if(D!==P.lastExternalValue){let e=V.current!=null&&!n.isValid(d.getDateFromSection(D,P.sections[V.current.sectionIndex])),t;t=e?oe(V.current.sectionIndex,V.current.value):ee(D),F(r=>x({},r,{lastExternalValue:D,sections:t,sectionsDependencies:{format:y,isRtl:i,locale:n.locale},referenceValue:e?r.referenceValue:d.updateReferenceValue(n,D,r.referenceValue),tempValueStrAndroid:null}))}if(i!==P.lastSectionsDependencies.isRtl||y!==P.lastSectionsDependencies.format||n.locale!==P.lastSectionsDependencies.locale){let e=ee(D);F(t=>x({},t,{lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}P.characterQuery!=null&&!ie&&R==null&&pe(null),P.characterQuery!=null&&((t=P.sections[P.characterQuery.sectionIndex])==null?void 0:t.type)!==P.characterQuery.sectionType&&pe(null),a(()=>{V.current!=null&&(V.current=null)});let W=Rt();return a(()=>(P.characterQuery!=null&&W.start(xf,()=>pe(null)),()=>{}),[P.characterQuery,pe,W]),a(()=>{P.tempValueStrAndroid!=null&&R!=null&&U()},[P.sections]),{activeSectionIndex:R,areAllSectionsEmpty:B,error:ie,localizedDigits:M,parsedSelectedSections:ne,sectionOrder:z,sectionsValueBoundaries:N,state:P,timezone:k,value:D,clearValue:H,clearActiveSection:U,setCharacterQuery:pe,setSelectedSections:L,setTempAndroidValueStr:fe,updateSectionValue:de,updateValueFromValueStr:le,getSectionsFromValue:ee}};g();function Cf(e){let{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,i=ql(),a=Ql(),o=nt(n.fieldRef,r?null:a==null?void 0:a.internalFieldRef,r?null:a==null?void 0:a.fieldRef),s=i==null?void 0:i.setValue,c=f((e,t)=>s==null?void 0:s(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(p(()=>a!=null&&i!=null?x({value:i.value,onChange:c,timezone:i.timezone,disabled:i.disabled,readOnly:i.readOnly,autoFocus:i.autoFocus&&!i.open,focused:i.open?!0:void 0,format:i.fieldFormat,formatDensity:a.formatDensity,selectedSections:a.selectedSections,onSelectedSectionsChange:a.onSelectedSectionsChange,fieldRef:o},n):n,[i,a,n,c,o]))}function wf(e){let{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:i}}=e;if(!n.isReady())return;let a=L(n.getRoot()).getSelection();if(!a)return;if(r==null){a.rangeCount>0&&a.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(a.getRangeAt(0).startContainer)&&a.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Pd(n.getRoot())))return;let o=new window.Range,s;s=r===`all`?n.getRoot():i.sections[r].type===`empty`?n.getSectionContainer(r):n.getSectionContent(r),o.selectNodeContents(s),s.focus(),a.removeAllRanges(),a.addRange(o)}function Tf(e){let{manager:{internal_fieldValueManager:t},focused:n,setFocused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,sectionOrder:u,state:d,value:f,activeSectionIndex:p,localizedDigits:m,timezone:h,clearValue:g,clearActiveSection:_,setCharacterQuery:v,setSelectedSections:y,updateValueFromValueStr:b,updateSectionValue:x},internalPropsWithDefaults:{disabled:S=!1,readOnly:C=!1,minutesStep:w}}=e,T=Ic(),E=Y(e=>{var n;if(!S)switch(!0){case(e.ctrlKey||e.metaKey)&&(((n=e.key)==null?void 0:n.toUpperCase())===`A`||String.fromCharCode(e.keyCode)===`A`)&&!e.shiftKey&&!e.altKey:e.preventDefault(),y(`all`);break;case e.key===`ArrowRight`:if(e.preventDefault(),c==null)y(u.startIndex);else if(c===`all`)y(u.endIndex);else{let e=u.neighbors[c].rightIndex;e!==null&&y(e)}break;case e.key===`ArrowLeft`:if(e.preventDefault(),c==null)y(u.endIndex);else if(c===`all`)y(u.startIndex);else{let e=u.neighbors[c].leftIndex;e!==null&&y(e)}break;case e.key===`Delete`:if(e.preventDefault(),C)break;c==null||c===`all`?g():_();break;case[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key):{if(e.preventDefault(),C||p==null)break;c===`all`&&y(p);let n=d.sections[p],r=Af(T,h,n,e.key,l,m,t.getDateFromSection(f,n),{minutesStep:w});x({section:n,newSectionValue:r,shouldGoToNextSection:!1});break}}}),D=Rt(),O=Y(()=>{if(!(S||!i.isReady())){if(c===`all`){r(!0),D.start(0,()=>{let e=document.getSelection();if(!e||e.rangeCount===0){y(u.startIndex);return}let t=e.getRangeAt(0).startOffset;if(t===0){y(u.startIndex);return}let n=0,r=0;for(;r<t&&n<d.sections.length;){let e=d.sections[n];n+=1,r+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}y(n-1)});return}n||(r(!0),c??y(u.startIndex))}}),k=Y(e=>{if(S||!i.isReady()||c===`all`||e.button!==0)return;let t=e.target,a=i.getRoot(),o=a.contains(t);if(!o&&t!==e.currentTarget)return;let s=o?t.closest(`[data-sectionindex]`):null;if(s==null&&(!o||Df(a,e.clientX))){e.preventDefault(),n||(r(!0),y(u.startIndex));return}let l=s?Number(s.dataset.sectionindex):Of(a,e.clientX);l==null||!Number.isInteger(l)||(e.preventDefault(),r(!0),y(l))}),A=Y(e=>{if(!i.isReady()||c!==`all`)return;let t=e.target.textContent??``;i.getRoot().innerHTML=d.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),wf({focused:n,domGetters:i,stateResponse:a}),t.length===0||t.charCodeAt(0)===10?(g(),y(`all`)):t.length>1?b(t):(c===`all`&&y(0),o({keyPressed:t,sectionIndex:0}))}),j=Y(e=>{if(C||c!==`all`){e.preventDefault();return}let t=e.clipboardData.getData(`text`);e.preventDefault(),v(null),b(t)}),M=Y(()=>{if(n||S||!i.isReady())return;let e=Pd(i.getRoot());r(!0),i.getSectionIndexFromDOMElement(e)??y(u.startIndex)});return{onKeyDown:E,onBlur:Y(()=>{setTimeout(()=>{if(!i.isReady())return;let e=Pd(i.getRoot());i.getRoot().contains(e)||(r(!1),y(null))})}),onFocus:M,onClick:O,onMouseDown:k,onPaste:j,onInput:A,contentEditable:c===`all`,tabIndex:s.disabled||c===0?-1:0}}var Ef=4;function Df(e,t){let n=e.querySelectorAll(`[data-sectionindex]`);if(n.length===0)return!1;let r=1/0,i=-1/0;for(let e=0;e<n.length;e+=1){let t=n[e].getBoundingClientRect();r=Math.min(r,t.left),i=Math.max(i,t.right)}return t<r-Ef||t>i+Ef}function Of(e,t){let n=e.querySelectorAll(`[role="spinbutton"]`);if(n.length===0)return null;let r=0,i=1/0;for(let e=0;e<n.length;e+=1){let a=n[e].getBoundingClientRect(),o=(a.left+a.right)/2,s=Math.abs(t-o);s<i&&(i=s,r=e)}return r}function kf(e){switch(e){case`ArrowUp`:return 1;case`ArrowDown`:return-1;case`PageUp`:return 5;case`PageDown`:return-5;default:return 0}}function Af(e,t,n,r,i,a,o,s){let c=kf(r),l=r===`Home`,u=r===`End`,d=n.value===``||l||u;return n.contentType===`digit`||n.contentType===`digit-with-letter`?(()=>{let r=i[n.type]({currentDate:o,format:n.format,contentType:n.contentType}),f=t=>Tl(e,t,r,a,n),p=n.type===`minutes`&&s!=null&&s.minutesStep?s.minutesStep:1,m;if(d){if(n.type===`year`&&!u&&!l)return e.formatByString(e.date(void 0,t),n.format);m=c>0||l?r.minimum:r.maximum}else m=parseInt(xl(n.value,a),10)+c*p;return m%p!==0&&((c<0||l)&&(m+=p-(p+m)%p),(c>0||u)&&(m-=m%p)),m>r.maximum?f(r.minimum+(m-r.maximum-1)%(r.maximum-r.minimum+1)):m<r.minimum?f(r.maximum-(r.minimum-m-1)%(r.maximum-r.minimum+1)):f(m)})():(()=>{let r=_l(e,t,n.type,n.format);return r.length===0?n.value:d?c>0||l?r[0]:r[r.length-1]:r[((r.indexOf(n.value)+c)%r.length+r.length)%r.length]})()}g();function jf(e){let{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:i}}=e,a=Y(e=>{i(e.target.value)});return{value:p(()=>n?``:t.getHiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:a}}g();function Mf(e){let{stateResponse:{parsedSelectedSections:t,setSelectedSections:n},internalPropsWithDefaults:{disabled:r=!1}}=e,i=Y(e=>{if(r||e.isDefaultPrevented())return;let i=Number(e.currentTarget.dataset.sectionindex);Number.isInteger(i)&&t!==i&&n(i)});return f(e=>({"data-sectionindex":e,onClick:i}),[i])}g();function Nf(e){let t=Ic(),n=Lc(),{focused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,state:u,value:d,localizedDigits:p,clearActiveSection:m,setCharacterQuery:h,setSelectedSections:g,updateSectionValue:_,updateValueFromValueStr:v},internalPropsWithDefaults:{disabled:y=!1,readOnly:b=!1}}=e,x=c===`all`,S=!x&&!y&&!b,C=Y(e=>{if(!i.isReady())return;let t=u.sections[e];i.getSectionContent(e).innerHTML=t.value||t.placeholder,wf({focused:r,domGetters:i,stateResponse:a})}),w=Y(e=>{if(!i.isReady())return;let t=e.target,n=t.textContent??``,r=i.getSectionIndexFromDOMElement(t),a=u.sections[r];if(b){C(r);return}if(n.length===0){if(a.value===``){C(r);return}let t=e.nativeEvent.inputType;if(t===`insertParagraph`||t===`insertLineBreak`){C(r);return}C(r),m();return}o({keyPressed:n,sectionIndex:r}),C(r)}),T=Y(e=>{e.preventDefault()}),E=Y(e=>{if(e.preventDefault(),b||y||typeof c!=`number`)return;let t=u.sections[c],n=e.clipboardData.getData(`text`),r=/^[a-zA-Z]+$/.test(n),i=/^[0-9]+$/.test(n),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);t.contentType===`letter`&&r||t.contentType===`digit`&&i||t.contentType===`digit-with-letter`&&a?(h(null),_({section:t,newSectionValue:n,shouldGoToNextSection:!0})):!r&&!i&&(h(null),v(n))}),D=Y(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`none`}),O=f(e=>()=>{y||g(e)},[y,g]);return f((e,r)=>{let i=l[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:w,onPaste:E,onMouseUp:T,onDragOver:D,onFocus:O(r),"aria-readonly":b,"aria-valuenow":Ff(e,t,p),"aria-valuemin":i.minimum,"aria-valuemax":i.maximum,"aria-valuetext":e.value?Pf(e,t,p):n.empty,"aria-label":n[e.type],"aria-disabled":y,tabIndex:!S||x||r>0?-1:0,contentEditable:!x&&!y&&!b,role:`spinbutton`,"data-range-position":e.dateName||void 0,spellCheck:!S&&void 0,autoCapitalize:S?`none`:void 0,autoCorrect:S?`off`:void 0,children:e.value||e.placeholder,inputMode:e.contentType===`letter`?`text`:`numeric`}},[l,x,y,b,S,n,t,p,w,E,T,D,O,s,d])}function Pf(e,t,n){if(e.value)switch(e.type){case`month`:{if(e.contentType===`digit`){let r=t.setMonth(t.date(),Number(xl(e.value,n))-1);return t.isValid(r)?t.format(r,`month`):``}let r=t.parse(e.value,e.format);return r&&t.isValid(r)?t.format(r,`month`):void 0}case`day`:if(e.contentType===`digit`){let r=t.setDate(t.startOfYear(t.date()),Number(xl(e.value,n)));return t.isValid(r)?t.format(r,`dayOfMonth`):``}return e.value;case`weekDay`:return;default:return}}function Ff(e,t,n){if(!e.value)return;let r=xl(e.value,n);switch(e.type){case`weekDay`:return e.contentType===`letter`?void 0:Number(r);case`meridiem`:{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?+(t.getHours(n)>=12):void 0}case`day`:return e.contentType===`digit-with-letter`?parseInt(r,10):Number(r);case`month`:{if(e.contentType===`digit`)return Number(r);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType===`letter`?void 0:Number(r)}}g();var If=e=>{let{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:i,internal_useOpenPickerButtonAriaLabel:o}}=e,{internalProps:s,forwardedProps:c}=Wc(t,i),f=Cf({manager:n,internalProps:s,skipContextFieldRefAssignment:r}),{sectionListRef:m,onBlur:h,onClick:g,onMouseDown:_,onFocus:v,onInput:y,onPaste:b,onKeyDown:S,onClear:C,clearable:w}=c,{disabled:T=!1,readOnly:E=!1,autoFocus:D=!1,focused:O,fieldRef:k}=f,A=l(null),M=nt(m,A),N=p(()=>({isReady:()=>A.current!=null,getRoot:()=>A.current.getRoot(),getSectionContainer:e=>A.current.getSectionContainer(e),getSectionContent:e=>A.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>A.current.getSectionIndexFromDOMElement(e)}),[A]),ee=Sf({manager:n,internalPropsWithDefaults:f,forwardedProps:c}),{areAllSectionsEmpty:P,error:F,parsedSelectedSections:I,sectionOrder:te,state:L,value:ne,clearValue:R,setSelectedSections:z}=ee,B=gf({stateResponse:ee}),re=o(ne),[ie,ae]=u(!1);function oe(e=0){if(T||!A.current||Lf(A)!=null)return;let t=Ll(e,L.sections);ae(!0),A.current.getSectionContent(t).focus()}let V=Tf({manager:n,internalPropsWithDefaults:f,stateResponse:ee,applyCharacterEditing:B,focused:ie,setFocused:ae,domGetters:N}),se=jf({manager:n,stateResponse:ee}),ce=Mf({stateResponse:ee,internalPropsWithDefaults:f}),H=Nf({manager:n,stateResponse:ee,applyCharacterEditing:B,internalPropsWithDefaults:f,domGetters:N,focused:ie}),U=Y(e=>{S==null||S(e),V.onKeyDown(e)}),le=Y(e=>{V.onBlur(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||h==null||h(e)}),ue=Y(e=>{V.onFocus(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||v==null||v(e)}),de=Y(e=>{e.isDefaultPrevented()||(g==null||g(e),V.onClick(e))}),fe=Y(e=>{e.isDefaultPrevented()||(_==null||_(e),V.onMouseDown(e))}),pe=Y(e=>{b==null||b(e),V.onPaste(e)}),W=Y(e=>{y==null||y(e),V.onInput(e)}),me=Y((e,...t)=>{e.preventDefault(),C==null||C(e,...t),R(),Rf(A)?z(te.startIndex):oe(0)}),he=p(()=>L.sections.map((e,t)=>{let n=H(e,t);return{container:ce(t),content:n,before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n[`data-range-position`]:void 0}}}),[L.sections,ce,H]);return a(()=>{if(A.current==null)throw Error(Oc(249));D&&!T&&A.current.getSectionContent(te.startIndex).focus()},[]),j(()=>{if(!(!ie||!A.current)){if(I===`all`)A.current.getRoot().focus();else if(typeof I==`number`){let e=A.current.getSectionContent(I);e&&e.focus()}}},[I,ie]),j(()=>{wf({focused:ie,domGetters:N,stateResponse:ee})}),d(k,()=>({getSections:()=>L.sections,getActiveSectionIndex:()=>Lf(A),setSelectedSections:e=>{if(T||!A.current)return;let t=Ll(e,L.sections);ae((t===`all`?0:t)!==null),z(e)},focusField:oe,isFieldFocused:()=>Rf(A),clearValue:R})),x({},c,V,{onBlur:le,onClick:de,onMouseDown:fe,onFocus:ue,onInput:W,onPaste:pe,onKeyDown:U,onClear:me},se,{error:F,clearable:!!(w&&!P&&!E&&!T),focused:O??ie,sectionListRef:M,elements:he,areAllSectionsEmpty:P,disabled:T,readOnly:E,autoFocus:D,openPickerAriaLabel:re})};function Lf(e){var t;let n=Pd((t=e.current)==null?void 0:t.getRoot());return!n||!e.current||!e.current.getRoot().contains(n)?null:e.current.getSectionIndexFromDOMElement(n)}function Rf(e){var t;let n=Pd((t=e.current)==null?void 0:t.getRoot());return!!e.current&&e.current.getRoot().contains(n)}g();function zf(){return p(()=>({valueType:`date`,validator:_f,internal_valueManager:bd,internal_fieldValueManager:xd,internal_useApplyDefaultValuesToFieldInternalProps:Vf,internal_useOpenPickerButtonAriaLabel:Bf}),[])}function Bf(e){let t=Ic(),n=Lc();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Vf(e){let t=Ic(),n=Hf(e);return p(()=>x({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Hf(e){let t=Ic(),n=ru();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:Xc(t,e.minDate,n.minDate),maxDate:Xc(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}g();function Uf(e={}){let{ampm:t}=e;return p(()=>({valueType:`time`,validator:vf,internal_valueManager:bd,internal_fieldValueManager:xd,internal_useApplyDefaultValuesToFieldInternalProps:Gf,internal_useOpenPickerButtonAriaLabel:Wf(t)}),[t])}function Wf(e){return function(t){let n=Ic(),r=Lc();return p(()=>{let i=e??n.is12HourCycleInCurrentLocale()?`fullTime12h`:`fullTime24h`,a=n.isValid(t)?n.format(t,i):null;return r.openTimePickerDialogue(a)},[t,r,n])}}function Gf(e){let t=Ic(),n=Kf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function Kf(e){return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}g();function qf(){return p(()=>({valueType:`date-time`,validator:yf,internal_valueManager:bd,internal_fieldValueManager:xd,internal_useApplyDefaultValuesToFieldInternalProps:Yf,internal_useOpenPickerButtonAriaLabel:Jf}),[])}function Jf(e){let t=Ic(),n=Lc();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Yf(e){let t=Ic(),n=Xf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function Xf(e){let t=Ic(),n=ru();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:Xc(t,e.minDateTime??e.minDate,n.minDate),maxDate:Xc(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}var Zf=e=>If({manager:zf(),props:e});g();function Qf(e){let{ownerState:t}=mu(),n=dn();return p(()=>x({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?`rtl`:`ltr`}),[t,e.disabled,e.readOnly,e.required,n])}function $f(e){return Ne(`MuiPickersTextField`,e)}var ep=ke(`MuiPickersTextField`,[`root`,`focused`,`disabled`,`error`,`required`]);function tp(e){return Ne(`MuiPickersInputBase`,e)}var np=ke(`MuiPickersInputBase`,[`root`,`focused`,`disabled`,`readOnly`,`error`,`notchedOutline`,`sectionsContainer`,`sectionContent`,`sectionBefore`,`sectionAfter`,`adornedStart`,`adornedEnd`,`input`,`inputSizeSmall`,`activeBar`]);function rp(e){return Ne(`MuiPickersSectionList`,e)}var ip=ke(`MuiPickersSectionList`,[`root`,`section`,`sectionContent`]);g();var ap=[`slots`,`slotProps`,`elements`,`sectionListRef`,`classes`],op=q(`div`,{name:`MuiPickersSectionList`,slot:`Root`})({direction:`ltr /*! @noflip */`,outline:`none`}),sp=q(`span`,{name:`MuiPickersSectionList`,slot:`Section`})({}),cp=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionSeparator`})({whiteSpace:`pre`}),lp=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionContent`})({outline:`none`}),up=e=>B({root:[`root`],section:[`section`],sectionContent:[`sectionContent`]},rp,e);function dp(e){let{slots:t,slotProps:n,element:r,classes:i}=e,{ownerState:a}=mu(),o=(t==null?void 0:t.section)??sp,s=Vn({elementType:o,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:a}),c=(t==null?void 0:t.sectionContent)??lp,u=Vn({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:a}),d=(t==null?void 0:t.sectionSeparator)??cp,f=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:x({},a,{separatorPosition:`before`})}),p=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:x({},a,{separatorPosition:`after`})}),m=l(null),h=nt(u.ref,m);return Je(o,x({},s,{children:[G(d,x({},f)),G(c,x({},u,{ref:h,onBlur:e=>{let t=e.relatedTarget,n=e.currentTarget.closest(`.${ip.root}`);if(n&&t instanceof Node&&n.contains(t)){e.stopPropagation();return}}})),G(d,x({},p))]}))}var fp=o(function(e,t){let n=cr({props:e,name:`MuiPickersSectionList`}),{slots:r,slotProps:i,elements:a,sectionListRef:o,classes:s}=n,c=Z(n,ap),u=up(s),{ownerState:f}=mu(),p=l(null),m=nt(t,p),h=e=>{if(!p.current)throw Error(Oc(145,e));return p.current};d(o,()=>({getRoot(){return h(`getRoot`)},getSectionContainer(e){return h(`getSectionContainer`).querySelector(`.${ip.section}[data-sectionindex="${e}"]`)},getSectionContent(e){return h(`getSectionContent`).querySelector(`.${ip.section}[data-sectionindex="${e}"] .${ip.sectionContent}`)},getSectionIndexFromDOMElement(e){let t=h(`getSectionIndexFromDOMElement`);if(e==null||!t.contains(e))return null;let n=null;return e.classList.contains(ip.section)?n=e:e.classList.contains(ip.sectionContent)&&(n=e.parentElement),n==null?null:Number(n.dataset.sectionindex)}}));let g=(r==null?void 0:r.root)??op,_=Vn({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return G(g,x({},_,{children:_.contentEditable?a.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(``):G(y,{children:a.map((e,t)=>G(dp,{slots:r,slotProps:i,element:e,classes:u},t))})}))});g();var pp=v(null),mp=()=>{let e=b(pp);if(e==null)throw Error(Oc(146));return e};g();var hp=`elements.areAllSectionsEmpty.defaultValue.label.value.onChange.id.autoFocus.endAdornment.startAdornment.renderSuffix.slots.slotProps.contentEditable.tabIndex.onInput.onPaste.onKeyDown.fullWidth.name.readOnly.inputRef.sectionListRef.onFocus.onBlur.classes.ownerState`.split(`.`),gp=[`ref`];function _p(e,t){return n=>{let r=An(e,n)??{};return x({},r,{className:Ve(t,r.className)})}}var vp=e=>Math.round(e*1e5)/1e5,yp=q(`div`,{name:`MuiPickersInputBase`,slot:`Root`})(({theme:e})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:`text`,padding:0,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,boxSizing:`border-box`,letterSpacing:`${vp(.15/16)}em`,[`&.${np.disabled}`]:{color:(e.vars||e).palette.action.disabled,cursor:`default`},variants:[{props:{isInputInFullWidth:!0},style:{width:`100%`}}]})),bp=q(op,{name:`MuiPickersInputBase`,slot:`SectionsContainer`})(({theme:e})=>({padding:`4px 0 5px`,fontFamily:e.typography.fontFamily,fontSize:`inherit`,lineHeight:`1.4375em`,flexGrow:1,outline:`none`,display:`flex`,flexWrap:`nowrap`,overflow:`hidden`,letterSpacing:`inherit`,width:`182px`,variants:[{props:{fieldDirection:`rtl`},style:{justifyContent:`end`}},{props:{inputSize:`small`},style:{paddingTop:1}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode===`light`?.42:.5}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0,hasStartAdornment:!1,inputHasLabel:!0,isLabelShrunk:!1},style:{opacity:0}}]})),xp=q(sp,{name:`MuiPickersInputBase`,slot:`Section`})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`,letterSpacing:`inherit`,lineHeight:`1.4375em`,display:`inline-block`,whiteSpace:`nowrap`})),Sp=q(lp,{name:`MuiPickersInputBase`,slot:`SectionContent`,overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:`1.4375em`,letterSpacing:`inherit`,width:`fit-content`,outline:`none`,"@supports (-webkit-app-region: drag)":{[`.${np.root}:not(:focus-within) &`]:{WebkitUserModify:`read-only`,userSelect:`none`}}})),Cp=q(cp,{name:`MuiPickersInputBase`,slot:`Separator`})(()=>({whiteSpace:`pre`,letterSpacing:`inherit`})),wp=q(`input`,{name:`MuiPickersInputBase`,slot:`Input`,overridesResolver:(e,t)=>t.hiddenInput})(x({},ct)),Tp=q(`div`,{name:`MuiPickersInputBase`,slot:`ActiveBar`})(({theme:e,ownerState:t})=>({display:`none`,position:`absolute`,height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create([`width`,`left`],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:`block`},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),Ep=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:i,hasFieldError:a,inputSize:o,isInputInFullWidth:s,inputColor:c,hasStartAdornment:l,hasEndAdornment:u}=t,d={root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`readOnly`,a&&`error`,s&&`fullWidth`,`color${ce(c)}`,o===`small`&&`inputSizeSmall`,l&&`adornedStart`,u&&`adornedEnd`],notchedOutline:[`notchedOutline`],input:[`input`],sectionsContainer:[`sectionsContainer`],sectionContent:[`sectionContent`],sectionBefore:[`sectionBefore`],sectionAfter:[`sectionAfter`],activeBar:[`activeBar`]};return B(d,tp,e)};function Dp(e,t,n,r){if(e.content[`data-range-position`]!==void 0){var i;let e=(i=t.current)==null?void 0:i.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}function Op(e,t){var n,r,i;let a=0;if(((n=t.current)==null?void 0:n.getAttribute(`data-active-range-position`))===`end`)for(let n=e.length-1;n>=e.length/2;--n)a+=Dp(e[n],t,n,`end`);else for(let n=0;n<e.length/2;n+=1)a+=Dp(e[n],t,n,`start`);return{activeBarWidth:a,sectionOffsets:[((r=t.current)==null||(r=r.querySelector(`[data-sectionindex="0"]`))==null?void 0:r.offsetLeft)||0,((i=t.current)==null||(i=i.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:i.offsetLeft)||0]}}var kp=o(function(e,t){let n=cr({props:e,name:`MuiPickersInputBase`}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:m,contentEditable:h,tabIndex:g,onInput:_,onPaste:v,onKeyDown:y,name:b,readOnly:S,inputRef:C,sectionListRef:w,onFocus:T,onBlur:E,classes:D,ownerState:O}=n,k=Z(n,hp),A=mp(),j=l(null),M=l(null),N=l([]),ee=nt(t,j),P=Qe();if(!P)throw Error(Oc(152));let F=O??A,I=e=>{var t;(t=P.onFocus)==null||t.call(P,e),T==null||T(e)},te=e=>{I(e)},L=e=>{if(y==null||y(e),e.key===`Enter`&&!e.defaultMuiPrevented){var t,n;if((t=j.current)!=null&&t.dataset.multiInput)return;let r=(n=j.current)==null?void 0:n.closest(`form`),i=r==null?void 0:r.querySelector(`[type="submit"]`);if(!r||!i)return;e.preventDefault(),r.requestSubmit(i)}},ne=e=>{var t;(t=P.onBlur)==null||t.call(P,e),E==null||E(e)};a(()=>{P&&P.setAdornedStart(!!d)},[P,d]),a(()=>{P&&(i?P.onEmpty():P.onFilled())},[P,i]);let R=Ep(D,F),z=(p==null?void 0:p.root)||yp,B=Vn({elementType:z,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:k,additionalProps:{"aria-invalid":P.error,ref:ee},className:R.root,ownerState:F}),re=(p==null?void 0:p.input)||bp,ie=(p==null?void 0:p.htmlInput)||wp,ae=Vn({elementType:ie,externalSlotProps:m==null?void 0:m.htmlInput,ownerState:F}),{ref:oe}=ae,V=Z(ae,gp),se=nt(oe,C),ce=r.some(e=>e.content[`data-range-position`]!==void 0);return a(()=>{if(!ce||!F.isPickerOpen)return;let{activeBarWidth:e,sectionOffsets:t}=Op(r,j);N.current=[t[0],t[1]],M.current&&(M.current.style.width=`${e}px`)},[r,ce,F.isPickerOpen]),Je(z,x({},B,{children:[d,G(fp,{sectionListRef:w,elements:r,contentEditable:h,tabIndex:g,className:R.sectionsContainer,onFocus:I,onBlur:ne,onInput:_,onPaste:v,onKeyDown:L,slots:{root:re,section:xp,sectionContent:Sp,sectionSeparator:Cp},slotProps:{root:x({},m==null?void 0:m.input,{ownerState:F}),sectionContent:_p(m==null?void 0:m.sectionContent,np.sectionContent),sectionSeparator:({separatorPosition:e})=>({className:e===`before`?np.sectionBefore:np.sectionAfter})}}),u,f?f(x({},P)):null,G(ie,x({name:b,className:R.input,value:o,onChange:s,id:c,"aria-hidden":`true`,tabIndex:-1,readOnly:S,required:P.required,disabled:P.disabled,onFocus:te},V,{ref:se})),ce&&G(Tp,{className:R.activeBar,ref:M,ownerState:{sectionOffsets:N.current}})]}))});function Ap(e){return Ne(`MuiPickersOutlinedInput`,e)}var jp=x({},np,ke(`MuiPickersOutlinedInput`,[`root`,`notchedOutline`,`input`]));g();var Mp=[`children`,`className`,`label`,`notched`,`shrink`],Np=q(`fieldset`,{name:`MuiPickersOutlinedInput`,slot:`NotchedOutline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`,borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}}),Pp=q(`span`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`})),Fp=q(`legend`,{slot:`internal`,shouldForwardProp:e=>cn(e)&&e!==`notched`})(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Ip(e){let{className:t,label:n,notched:r}=e,i=Z(e,Mp),a=mp();return G(Np,x({"aria-hidden":!0,className:t},i,{ownerState:a,children:G(Fp,{ownerState:a,notched:r,children:n?G(Pp,{children:n}):G(Pp,{className:`notranslate`,children:``})})}))}g();var Lp=[`label`,`autoFocus`,`ownerState`,`classes`,`notched`,`slots`,`slotProps`],Rp=q(yp,{name:`MuiPickersOutlinedInput`,slot:`Root`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{padding:`0 14px`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${jp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${jp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${jp.focused} .${jp.notchedOutline}`]:{borderStyle:`solid`,borderWidth:2},[`&.${jp.error} .${jp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${jp.disabled}`]:{[`& .${jp.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},variants:Object.keys((e.vars??e).palette).filter(t=>{var n;return((n=(e.vars??e).palette[t])==null?void 0:n.main)??!1}).map(t=>({props:{inputColor:t},style:{[`&.${jp.focused}:not(.${jp.error}) .${jp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),zp=q(bp,{name:`MuiPickersOutlinedInput`,slot:`SectionsContainer`})({padding:`16.5px 0`,variants:[{props:{inputSize:`small`},style:{padding:`8.5px 0`}}]}),Bp=e=>{let t=B({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Ap,e);return x({},e,t)},Vp=o(function(e,t){let n=cr({props:e,name:`MuiPickersOutlinedInput`}),{label:r,classes:i,notched:a,slots:o,slotProps:s}=n,c=Z(n,Lp),l=Qe(),u=Bp(i);return G(kp,x({},c,{slots:x({root:Rp,input:zp},o),slotProps:s,renderSuffix:e=>{let t=a===void 0?!!(e.adornedStart||e.focused||e.filled):a;return G(Ip,{shrink:t,notched:t,className:u.notchedOutline,label:r!=null&&r!==``&&l!=null&&l.required?Je(y,{children:[r,` `,`*`]}):r})},label:r,classes:u,ref:t}))});Vp.muiName=`Input`;function Hp(e){return Ne(`MuiPickersFilledInput`,e)}var Up=x({},np,ke(`MuiPickersFilledInput`,[`root`,`underline`,`input`]));g();var Wp=[`label`,`autoFocus`,`disableUnderline`,`hiddenLabel`,`classes`,`slots`,`slotProps`],Gp=q(yp,{name:`MuiPickersFilledInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Up.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Up.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>{var n;return{props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t])==null?void 0:n.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Up.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Up.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Up.disabled}, .${Up.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Up.disabled}:before`]:{borderBottomStyle:`dotted`}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),Kp=q(bp,{name:`MuiPickersFilledInput`,slot:`sectionsContainer`,shouldForwardProp:e=>cn(e)&&e!==`hiddenLabel`})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:`small`},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:`small`},style:{paddingTop:8,paddingBottom:9}}]}),qp=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,n&&`underline`],input:[`input`]},Hp,e);return x({},e,r)},Jp=o(function(e,t){let n=cr({props:e,name:`MuiPickersFilledInput`}),{label:r,disableUnderline:i=!1,hiddenLabel:a=!1,classes:o,slots:s,slotProps:c}=n,l=Z(n,Wp),u=mp(),d=x({},u,{inputHasUnderline:!i}),f=qp(o,d);return G(kp,x({},l,{slots:x({root:Gp,input:Kp},s),slotProps:x({},c,{root:x({disableUnderline:i},c==null?void 0:c.root),input:x({hiddenLabel:a},c==null?void 0:c.input)}),label:r,classes:f,ref:t,ownerState:d}))});Jp.muiName=`Input`;function Yp(e){return Ne(`MuiPickersFilledInput`,e)}var Xp=x({},np,ke(`MuiPickersInput`,[`root`,`underline`,`input`]));g();var Zp=[`label`,`autoFocus`,`disableUnderline`,`ownerState`,`classes`,`slots`,`slotProps`],Qp=q(yp,{name:`MuiPickersInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:`red`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Xp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Xp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Xp.disabled}, .${Xp.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Xp.disabled}:before`]:{borderBottomStyle:`dotted`}}}]}}),$p=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,!n&&`underline`],input:[`input`]},Yp,e);return x({},e,r)},em=o(function(e,t){let n=cr({props:e,name:`MuiPickersInput`}),{label:r,disableUnderline:i=!1,classes:a,slots:o,slotProps:s}=n,c=Z(n,Zp),l=mp(),u=x({},l,{inputHasUnderline:!i}),d=$p(a,u);return G(kp,x({},c,{slots:x({root:Qp},o),slotProps:x({},s,{root:x({disableUnderline:i},s==null?void 0:s.root)}),ownerState:u,label:r,classes:d,ref:t}))});em.muiName=`Input`,g();var tm=`onFocus.onBlur.className.classes.color.disabled.error.variant.required.hiddenLabel.inputRef.sectionListRef.elements.areAllSectionsEmpty.onClick.onMouseDown.onKeyDown.onKeyUp.onPaste.onInput.endAdornment.startAdornment.tabIndex.contentEditable.focused.value.onChange.fullWidth.id.name.helperText.label.slots.slotProps.data-active-range-position`.split(`.`),nm={standard:em,filled:Jp,outlined:Vp},rm=q(mt,{name:`MuiPickersTextField`,slot:`Root`})({maxWidth:`100%`}),im=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:i}=t;return B({root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`required`]},$f,e)},am=o(function(e,t){let n=cr({props:e,name:`MuiPickersTextField`}),{onFocus:r,onBlur:i,className:a,classes:o,color:s=`primary`,disabled:c=!1,error:u=!1,variant:d=`outlined`,required:f=!1,hiddenLabel:m=!1,inputRef:h,sectionListRef:g,elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onPaste:w,onInput:T,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,focused:A,value:j,onChange:M,fullWidth:N,id:ee,name:P,helperText:F,label:I,slots:te,slotProps:L,"data-active-range-position":ne}=n,R=Z(n,tm),z=l(null),B=nt(t,z),re=Le(ee),ie=F&&re?`${re}-helper-text`:void 0,ae=I&&re?`${re}-label`:void 0,oe=L==null?void 0:L.input,V=L==null?void 0:L.inputLabel,se=Qf({disabled:n.disabled,required:n.required,readOnly:oe==null?void 0:oe.readOnly}),ce=p(()=>x({},se,{isFieldValueEmpty:v,isFieldFocused:A??!1,hasFieldError:u??!1,inputSize:n.size??`medium`,inputColor:s??`primary`,isInputInFullWidth:N??!1,hasStartAdornment:!!(D??(oe==null?void 0:oe.startAdornment)),hasEndAdornment:!!(E??(oe==null?void 0:oe.endAdornment)),inputHasLabel:!!I,isLabelShrunk:!!(V!=null&&V.shrink)}),[se,v,A,u,n.size,s,N,D,E,oe==null?void 0:oe.startAdornment,oe==null?void 0:oe.endAdornment,I,V==null?void 0:V.shrink]),H=im(o,ce),U=(te==null?void 0:te.input)??nm[d],le=(te==null?void 0:te.root)??rm,ue=(te==null?void 0:te.inputLabel)??Se,de=(te==null?void 0:te.formHelperText)??_t,fe={};d===`outlined`?(V&&V.shrink!==void 0&&(fe.notched=V.shrink),fe.label=I):d===`filled`&&(fe.hiddenLabel=m);let pe=Vn({elementType:le,externalSlotProps:L==null?void 0:L.root,externalForwardedProps:x({},R,{className:a}),additionalProps:{ref:B,focused:A,disabled:c,variant:d,error:u,color:s,fullWidth:N,required:f},className:H.root,ownerState:ce});return G(pp.Provider,{value:ce,children:Je(le,x({},pe,{children:[I!=null&&I!==``&&G(ue,x({htmlFor:re,id:ae},V,{children:I})),G(U,x({elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onInput:T,onPaste:w,onFocus:r,onBlur:i,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,value:j,onChange:M,id:re,fullWidth:N,inputRef:h,sectionListRef:g,label:I,name:P,role:`group`,"aria-labelledby":ae,"aria-describedby":ie,"aria-live":ie?`polite`:void 0,"data-active-range-position":ne},fe,oe,{slots:x({},oe==null?void 0:oe.slots,(te==null?void 0:te.htmlInput)!==void 0&&{htmlInput:te.htmlInput}),slotProps:x({},oe==null?void 0:oe.slotProps,(L==null?void 0:L.htmlInput)!==void 0&&{htmlInput:L.htmlInput})})),F&&G(de,x({id:ie},L==null?void 0:L.formHelperText,{children:F}))]}))})});g();var om=[`readOnly`,`onClear`,`clearable`,`clearButtonPosition`,`openPickerButtonPosition`,`openPickerAriaLabel`,`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],sm=[`ownerState`],cm=[`ownerState`],lm=[`ownerState`],um=[`ownerState`],dm=[`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],fm=e=>{var t;let n=e,{readOnly:r,onClear:i,clearable:a,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,InputProps:l,inputProps:u,InputLabelProps:d,FormHelperTextProps:f}=n,p=Z(n,om);return{clearable:a,onClear:i,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,textFieldProps:x({},p,{slotProps:x({},p==null?void 0:p.slotProps,{input:x({},p==null||(t=p.slotProps)==null?void 0:t.input,{readOnly:r})})})}},pm=v({slots:{},slotProps:{},inputRef:void 0});function mm(e){var t;let{fieldResponse:n,defaultOpenPickerIcon:r}=e,i=Lc(),a=ql(),o=b(pm),{textFieldProps:s,onClear:c,clearable:l,openPickerAriaLabel:u,clearButtonPosition:d=`end`,openPickerButtonPosition:f=`end`}=fm(n),p=Qf(s),m=Y(e=>{e.preventDefault(),a==null||a.setOpen(!0)}),h=a?a.triggerStatus:`hidden`,g=l?d:null,_=h===`hidden`?null:f,v=o.slots.textField??am,y=o.slots.inputAdornment??Nn,S=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`start`},ownerState:x({},p,{position:`start`})}),sm),C=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`end`},ownerState:x({},p,{position:`end`})}),cm),w=o.slots.openPickerButton??mn,T=Z(Vn({elementType:w,externalSlotProps:o.slotProps.openPickerButton,additionalProps:{disabled:h===`disabled`,onClick:m,"aria-label":u,"data-mui-picker-open-button":`true`,edge:s.variant!==`standard`&&_},ownerState:p}),lm),E=o.slots.openPickerIcon??r,D=Vn({elementType:E,externalSlotProps:o.slotProps.openPickerIcon,ownerState:p}),O=o.slots.clearButton??mn,k=Z(Vn({elementType:O,externalSlotProps:o.slotProps.clearButton,className:`clearButton`,additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:n.disabled||n.readOnly,edge:s.variant!==`standard`&&g!==_&&g},ownerState:p}),um),A=o.slots.clearIcon??fu,j=Vn({elementType:A,externalSlotProps:o.slotProps.clearIcon,additionalProps:{fontSize:`small`},ownerState:p});s.ref=nt(s.ref,a==null?void 0:a.rootRef);let M=(t=s.slotProps)==null?void 0:t.input,N={},ee=nt(M==null?void 0:M.ref,a==null?void 0:a.triggerRef);return a&&(N.ref=ee),!(M!=null&&M.startAdornment)&&(g===`start`||_===`start`)&&(N.startAdornment=Je(y,x({},S,{children:[_===`start`&&G(w,x({},T,{children:G(E,x({},D))})),g===`start`&&G(O,x({},k,{children:G(A,x({},j))}))]}))),!(M!=null&&M.endAdornment)&&(g===`end`||_===`end`)&&(N.endAdornment=Je(y,x({},C,{children:[g===`end`&&G(O,x({},k,{children:G(A,x({},j))})),_===`end`&&G(w,x({},T,{children:G(E,x({},D))}))]}))),!N.endAdornment&&!N.startAdornment&&o.slots.inputAdornment&&(N.endAdornment=G(y,x({},C))),g!=null&&(s.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s.sx)?s.sx:[s.sx]]),s.slotProps=x({},s.slotProps,{input:x({},M,N)}),G(v,x({},s))}function hm(e,t){return e?t?n=>x({},An(t,n),An(e,n)):e:t}function gm(e){let{ref:t,externalForwardedProps:n,slotProps:r}=e,i=b(pm),a=ql(),o=Qf(n),s=n??{},{InputProps:c,inputProps:l,InputLabelProps:u,FormHelperTextProps:d}=s,f=Z(s,dm),p=Vn({elementType:am,externalSlotProps:hm(i.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:f,additionalProps:{ref:t,sx:a==null?void 0:a.rootSx,label:a==null?void 0:a.label,name:a==null?void 0:a.name,className:a==null?void 0:a.rootClassName,inputRef:i.inputRef},ownerState:o});if(a&&a.keepOpenDuringFieldFocus&&a.triggerStatus===`enabled`&&!a.open&&!a.readOnly&&!a.disabled){let e=p.onFocus,t=p.onMouseDown,n=e=>{var t;let n=e.nativeEvent??e,r=n==null||(t=n.composedPath)==null?void 0:t.call(n);if(Array.isArray(r)){for(let e of r)if(e&&e.getAttribute&&e.getAttribute(`data-mui-picker-open-button`)===`true`)return!0}let i=e.target;return i&&i.closest?!!i.closest(`[data-mui-picker-open-button="true"]`):!1};p.onFocus=t=>{e==null||e(t),!t.isDefaultPrevented()&&!n(t)&&a.setOpen(!0)},p.onMouseDown=e=>{t==null||t(e),!e.isDefaultPrevented()&&!n(e)&&a.setOpen(!0)}}return p}function _m(e){let{slots:t={},slotProps:n={},inputRef:r,children:i}=e,a=p(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return G(pm.Provider,{value:a,children:i})}g();var vm=[`slots`,`slotProps`],ym=o(function(e,t){let n=cr({props:e,name:`MuiDateField`}),{slots:r,slotProps:i}=n,a=Z(n,vm),o=Zf(gm({slotProps:i,ref:t,externalForwardedProps:a}));return G(_m,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(mm,{fieldResponse:o,defaultOpenPickerIcon:cu})})}),bm=e=>If({manager:Uf(e),props:e});g();var xm=[`slots`,`slotProps`],Sm=o(function(e,t){let n=cr({props:e,name:`MuiTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,xm),o=bm(gm({slotProps:i,ref:t,externalForwardedProps:a}));return G(_m,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(mm,{fieldResponse:o,defaultOpenPickerIcon:lu})})}),Cm=e=>If({manager:qf(),props:e});g();var wm=[`slots`,`slotProps`],Tm=o(function(e,t){let n=cr({props:e,name:`MuiDateTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,wm),o=Cm(gm({slotProps:i,ref:t,externalForwardedProps:a}));return G(_m,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(mm,{fieldResponse:o,defaultOpenPickerIcon:cu})})});g();var Em=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{let c=Ic();return f(l=>_f({adapter:c,value:l,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o}})!==null,[c,e,t,n,r,i,a,o,s])};g();var Dm=(e,t)=>(n,r)=>{switch(r.type){case`setVisibleDate`:return x({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case`changeMonthTimezone`:{let e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let i=t.setTimezone(n.currentMonth,e);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),x({},n,{currentMonth:i})}case`finishMonthSwitchingAnimation`:return x({},n,{isMonthSwitchingAnimating:!1});default:throw Error(`missing support`)}},Om=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,maxDate:o,minDate:s,onMonthChange:u,onYearChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:g,getCurrentMonthFromVisibleDate:_}=e,v=Ic(),y=l(Dm(!!m,v)).current,b=p(()=>bd.getInitialReferenceValue({value:t,adapter:v,timezone:g,props:e,referenceDate:n,granularity:hd.day}),[n,g]),[x,S]=c(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:v.setDate(b,1),slideDirection:`left`}),C=Em({shouldDisableDate:h,minDate:s,maxDate:o,disableFuture:r,disablePast:i,timezone:g});return a(()=>{S({type:`changeMonthTimezone`,newTimezone:v.getTimezone(b)})},[b,v]),{referenceDate:b,calendarState:x,setVisibleDate:Y(({target:e,reason:t})=>{if(t===`cell-interaction`&&x.focusedDay!=null&&v.isSameDay(e,x.focusedDay))return;let n=t===`cell-interaction`,a,c;if(t===`cell-interaction`)a=_(e,x.currentMonth),c=e;else if(a=v.isSameMonth(e,x.currentMonth)?x.currentMonth:v.startOfMonth(e),c=e,C(c)){let t=v.startOfMonth(e),n=v.endOfMonth(e);c=Jc({adapter:v,date:c,minDate:v.isBefore(s,t)?t:s,maxDate:v.isAfter(o,n)?n:o,disablePast:i,disableFuture:r,isDateDisabled:C,timezone:g})}let l=!v.isSameMonth(x.currentMonth,a),f=!v.isSameYear(x.currentMonth,a);l&&(u==null||u(a)),f&&(d==null||d(v.startOfYear(a))),S({type:`setVisibleDate`,month:a,direction:v.isAfterDay(a,x.currentMonth)?`left`:`right`,focusedDay:x.focusedDay!=null&&c!=null&&v.isSameDay(c,x.focusedDay)?x.focusedDay:c,skipAnimation:n})}),isDateDisabled:C,onMonthSwitchingAnimationEnd:f(()=>{S({type:`finishMonthSwitchingAnimation`})},[])}};function km(e,t){return km=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},km(e,t)}function Am(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,km(e,t)}function jm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Mm(e,t){e.classList?e.classList.add(t):jm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Nm(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Pm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Nm(e.className,t):e.setAttribute(`class`,Nm(e.className&&e.className.baseVal||``,t))}var Fm={disabled:!1},Im=function(e){return e.scrollTop};g();var Lm=`unmounted`,Rm=`exited`,zm=`entering`,Bm=`entered`,Vm=`exiting`,Hm=function(e){Am(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Rm,r.appearStatus=zm):o=Bm:o=t.unmountOnExit||t.mountOnEnter?Lm:Rm,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Rm}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=zm):(n===`entering`||n===`entered`)&&(t=Vm)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this);n&&Im(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Lm})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[P.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Fm.disabled){this.safeSetState({status:Bm},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:zm},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Bm},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:P.findDOMNode(this);if(!t||Fm.disabled){this.safeSetState({status:Rm},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Vm},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Rm},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Z(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return _.createElement(vn.Provider,{value:null},typeof n==`function`?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);Hm.contextType=vn,Hm.propTypes={};function Um(){}Hm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Um,onEntering:Um,onEntered:Um,onExit:Um,onExiting:Um,onExited:Um},Hm.UNMOUNTED=Lm,Hm.EXITED=Rm,Hm.ENTERING=zm,Hm.ENTERED=Bm,Hm.EXITING=Vm,g();var Wm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Mm(e,t)})},Gm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Pm(e,t)})},Km=function(e){Am(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Im(e),r&&(this.appliedClasses[t][n]=r,Wm(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Gm(e,r),i&&Gm(e,i),a&&Gm(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Z(e,[`classNames`]);return _.createElement(Hm,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);Km.defaultProps={classNames:``},Km.propTypes={};function qm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}g();function Jm(e,t){var n=function(e){return t&&C(e)?t(e):e},r=Object.create(null);return e&&S.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Ym(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Xm(e,t,n){return n[t]==null?e.props[t]:n[t]}function Zm(e,t){return Jm(e.children,function(n){return T(n,{onExited:t.bind(null,n),in:!0,appear:Xm(n,`appear`,e),enter:Xm(n,`enter`,e),exit:Xm(n,`exit`,e)})})}function Qm(e,t,n){var r=Jm(e.children),i=Ym(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(C(o)){var s=a in t,c=a in r,l=t[a],u=C(l)&&!l.props.in;c&&(!s||u)?i[a]=T(o,{onExited:n.bind(null,o),in:!0,exit:Xm(o,`exit`,e),enter:Xm(o,`enter`,e)}):!c&&s&&!u?i[a]=T(o,{in:!1}):c&&s&&C(l)&&(i[a]=T(o,{onExited:n.bind(null,o),in:l.props.in,exit:Xm(o,`exit`,e),enter:Xm(o,`enter`,e)}))}}),i}g();var $m=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},eh={component:`div`,childFactory:function(e){return e}},th=function(e){Am(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(qm(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Zm(e,r):Qm(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Jm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Z(e,[`component`,`childFactory`]),i=this.state.contextValue,a=$m(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?_.createElement(vn.Provider,{value:i},a):_.createElement(vn.Provider,{value:i},_.createElement(t,r,a))},t}(_.Component);th.propTypes={},th.defaultProps=eh;var nh=e=>Ne(`MuiPickersFadeTransitionGroup`,e),rh=ke(`MuiPickersFadeTransitionGroup`,[`root`]);g();var ih=[`children`],ah=e=>B({root:[`root`]},nh,e),oh=q(th,{name:`MuiPickersFadeTransitionGroup`,slot:`Root`})({display:`block`,position:`relative`});function sh(e){let t=cr({props:e,name:`MuiPickersFadeTransitionGroup`}),{className:n,reduceAnimations:r,transKey:i,classes:a}=t,{children:o}=t,s=Z(t,ih),c=ah(a),l=ir();return r?o:G(oh,{className:Ve(c.root,n),ownerState:s,children:G(rn,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:o},i)})}var ch=e=>Ne(`MuiPickersSlideTransition`,e),lh=ke(`MuiPickersSlideTransition`,[`root`,`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`]);g();var uh=[`children`,`className`,`reduceAnimations`,`slideDirection`,`transKey`,`classes`],dh=(e,t)=>{let{slideDirection:n}=t,r={root:[`root`],exit:[`slideExit`],enterActive:[`slideEnterActive`],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return B(r,ch,e)},fh=[`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`],ph=q(th,{name:`MuiPickersSlideTransition`,slot:`Root`,overridesResolver:(e,t)=>fh.reduce((e,n)=>(e.push({[`.${lh[n]}`]:t[n]}),e),[t.root])})(({theme:e})=>{let t=e.transitions.create(`transform`,{duration:e.transitions.duration.complex,easing:`cubic-bezier(0.35, 0.8, 0.4, 1)`});return{display:`block`,position:`relative`,overflowX:`hidden`,"& > *":{position:`absolute`,top:0,right:0,left:0},[`& .${lh[`slideEnter-left`]}`]:{willChange:`transform`,transform:`translate(100%)`,zIndex:1},[`& .${lh[`slideEnter-right`]}`]:{willChange:`transform`,transform:`translate(-100%)`,zIndex:1},[`& .${lh.slideEnterActive}`]:{transform:`translate(0%)`,transition:t},[`& .${lh.slideExit}`]:{transform:`translate(0%)`},[`& .${lh[`slideExitActiveLeft-left`]}`]:{willChange:`transform`,transform:`translate(-100%)`,transition:t,zIndex:0},[`& .${lh[`slideExitActiveLeft-right`]}`]:{willChange:`transform`,transform:`translate(100%)`,transition:t,zIndex:0}}});function mh(e){let t=cr({props:e,name:`MuiPickersSlideTransition`}),{children:n,className:r,reduceAnimations:i,slideDirection:a,transKey:o,classes:s}=t,c=Z(t,uh),{ownerState:l}=mu(),u=x({},l,{slideDirection:a}),d=dh(s,u),f=ir();if(i)return G(`div`,{role:`none`,className:Ve(d.root,r),children:n});let p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return G(ph,{className:Ve(d.root,r),childFactory:e=>T(e,{classNames:p}),role:`none`,ownerState:u,children:G(Km,x({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},c,{children:n}),o)})}var hh=e=>Ne(`MuiDayCalendar`,e),gh=ke(`MuiDayCalendar`,[`root`,`header`,`weekDayLabel`,`loadingContainer`,`slideTransition`,`monthContainer`,`weekContainer`,`weekNumberLabel`,`weekNumber`]);g();var _h=[`parentProps`,`day`,`focusedDay`,`selectedDays`,`isDateDisabled`,`currentMonthNumber`,`isViewFocused`],vh=[`ownerState`],yh=e=>B({root:[`root`],header:[`header`],weekDayLabel:[`weekDayLabel`],loadingContainer:[`loadingContainer`],slideTransition:[`slideTransition`],monthContainer:[`monthContainer`],weekContainer:[`weekContainer`],weekNumberLabel:[`weekNumberLabel`],weekNumber:[`weekNumber`]},hh,e),bh=240,xh=q(`div`,{name:`MuiDayCalendar`,slot:`Root`})({}),Sh=q(`div`,{name:`MuiDayCalendar`,slot:`Header`})({display:`flex`,justifyContent:`center`,alignItems:`center`}),Ch=q(Pt,{name:`MuiDayCalendar`,slot:`WeekDayLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.secondary})),wh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumberLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.disabled})),Th=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumber`})(({theme:e})=>x({},e.typography.caption,{width:36,height:36,padding:0,margin:`0 2px`,color:(e.vars||e).palette.text.disabled,fontSize:`0.75rem`,alignItems:`center`,justifyContent:`center`,display:`inline-flex`})),Eh=q(`div`,{name:`MuiDayCalendar`,slot:`LoadingContainer`})({display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:bh}),Dh=q(mh,{name:`MuiDayCalendar`,slot:`SlideTransition`})({minHeight:bh}),Oh=q(`div`,{name:`MuiDayCalendar`,slot:`MonthContainer`})({overflow:`hidden`}),kh=q(`div`,{name:`MuiDayCalendar`,slot:`WeekContainer`})({margin:`2px 0`,display:`flex`,justifyContent:`center`});function Ah(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=e,c=Z(e,_h),{currentMonth:l,disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:m,slots:h,slotProps:g,timezone:_}=t,v=Ic(),y=iu(_),b=r!=null&&v.isSameDay(n,r),S=s&&b,C=i.some(e=>v.isSameDay(e,n)),w=v.isSameDay(n,y),T=p(()=>u||a(n),[u,a,n]),E=p(()=>v.getMonth(n)!==o,[v,n,o]),D=lf({day:n,selected:C,disabled:T,today:w,outsideCurrentMonth:E,disableHighlightToday:d,showDaysOutsideCurrentMonth:m}),O=(h==null?void 0:h.day)??mf,k=Z(Vn({elementType:O,externalSlotProps:g==null?void 0:g.day,additionalProps:x({disableHighlightToday:d,showDaysOutsideCurrentMonth:m,role:`gridcell`,isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:x({},D,{day:n,isDayDisabled:T,isDaySelected:C})}),vh),A=p(()=>{let e=v.startOfMonth(l);return m?v.isSameDay(n,v.startOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]),j=p(()=>{let e=v.endOfMonth(l);return m?v.isSameDay(n,v.endOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]);return G(O,x({},k,{day:n,disabled:T,autoFocus:!E&&S,today:w,outsideCurrentMonth:E,isFirstVisibleCell:A,isLastVisibleCell:j,selected:C,tabIndex:b?0:-1,"aria-selected":C,"aria-current":w?`date`:void 0}))}function jh(e){let t=cr({props:e,name:`MuiDayCalendar`}),n=Ic(),{onFocusedDayChange:r,className:i,classes:a,currentMonth:o,selectedDays:s,focusedDay:c,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:g=()=>G(`span`,{children:`…`}),slideDirection:_,TransitionProps:v,disablePast:y,disableFuture:b,minDate:S,maxDate:C,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:D=e=>n.format(e,`weekdayShort`).charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:k,gridLabelId:A,displayWeekNumber:j,fixedWeekNumber:M,timezone:N}=t,ee=iu(N),P=yh(a),F=dn(),I=+!!j,te=Em({shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,minDate:S,maxDate:C,disablePast:y,disableFuture:b,timezone:N}),L=Lc(),ne=Y(e=>{f||u(e)}),R=e=>{te(e)||(r(e),k==null||k(!0))},z=Y((e,t)=>{switch(e.key){case`ArrowUp`:R(n.addDays(t,-7)),e.preventDefault();break;case`ArrowDown`:R(n.addDays(t,7)),e.preventDefault();break;case`ArrowLeft`:{let r=n.addDays(t,F?1:-1),i=n.addMonths(t,F?1:-1),a=Jc({adapter:n,date:r,minDate:F?r:n.startOfMonth(i),maxDate:F?n.endOfMonth(i):r,isDateDisabled:te,timezone:N});R(a||r),e.preventDefault();break}case`ArrowRight`:{let r=n.addDays(t,F?-1:1),i=n.addMonths(t,F?-1:1),a=Jc({adapter:n,date:r,minDate:F?n.startOfMonth(i):r,maxDate:F?r:n.endOfMonth(i),isDateDisabled:te,timezone:N});R(a||r),e.preventDefault();break}case`Home`:R(n.startOfWeek(t)),e.preventDefault();break;case`End`:R(n.endOfWeek(t)),e.preventDefault();break;case`PageUp`:R(n.addMonths(t,1)),e.preventDefault();break;case`PageDown`:R(n.addMonths(t,-1)),e.preventDefault();break;case`Enter`:case` `:ne(t),e.preventDefault()}}),B=Y((e,t)=>R(t)),re=Y((e,t)=>{c!=null&&n.isSameDay(c,t)&&(k==null||k(!1))}),ie=n.getMonth(o),ae=n.getYear(o),oe=p(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),V=`${ae}-${ie}`,se=p(()=>m(),[V]),ce=p(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;M&&e.length<M;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<M&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,M,n]);return Je(xh,{role:`grid`,"aria-labelledby":A,"aria-colcount":I+7,"aria-rowcount":ce.length+1,className:P.root,children:[Je(Sh,{role:`row`,"aria-rowindex":1,className:P.header,children:[j&&G(wh,{variant:`caption`,role:`columnheader`,"aria-colindex":1,"aria-label":L.calendarWeekNumberHeaderLabel,className:P.weekNumberLabel,children:L.calendarWeekNumberHeaderText}),il(n,ee).map((e,t)=>G(Ch,{variant:`caption`,role:`columnheader`,"aria-colindex":I+t+1,"aria-label":n.format(e,`weekday`),className:P.weekDayLabel,children:D(e)},t.toString()))]}),l?G(Eh,{className:P.loadingContainer,children:g()}):G(Dh,x({transKey:V,onExited:d,reduceAnimations:h,slideDirection:_,className:Ve(i,P.slideTransition)},v,{nodeRef:se,children:G(Oh,{ref:se,role:`rowgroup`,className:P.monthContainer,children:ce.map((e,r)=>Je(kh,{role:`row`,className:P.weekContainer,"aria-rowindex":r+2,children:[j&&G(Th,{className:P.weekNumber,role:`rowheader`,"aria-colindex":1,"aria-label":L.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:L.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>G(Ah,{parentProps:t,day:e,selectedDays:oe,isViewFocused:O,focusedDay:c,onKeyDown:z,onFocus:B,onBlur:re,onDaySelect:ne,isDateDisabled:te,currentMonthNumber:ie,"aria-colindex":I+n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Mh(e){return Ne(`MuiMonthCalendar`,e)}var Nh=ke(`MuiMonthCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Ph=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Fh=(e,t)=>{let n={button:[`button`,t.isMonthDisabled&&`disabled`,t.isMonthSelected&&`selected`]};return B(n,Mh,e)},Ih=q(`button`,{name:`MuiMonthCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Nh.disabled}`]:t.disabled},{[`&.${Nh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Nh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Nh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Lh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Ph),m=l(null),{ownerState:h}=mu(),g=x({},h,{isMonthDisabled:r,isMonthSelected:i}),_=Fh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.monthButton)??Ih,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.monthButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var Rh=[`autoFocus`,`className`,`currentMonth`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`shouldDisableMonth`,`readOnly`,`disableHighlightToday`,`onMonthFocus`,`hasFocus`,`onFocusedViewChange`,`monthsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],zh=e=>B({root:[`root`]},Mh,e);function Bh(e,t){let n=cr({props:e,name:t}),r=Hf(n);return x({},n,r,{monthsPerRow:n.monthsPerRow??3})}var Vh=(e,t,n,r,i)=>!!(e===t&&r&&i.isSameYear(n,r)),Hh=q(`div`,{name:`MuiMonthCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`monthsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:16,padding:`8px 0`,width:320,boxSizing:`border-box`,variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),Uh=o(function(e,t){let n=Bh(e,`MuiMonthCalendar`),{autoFocus:r,className:i,currentMonth:o,classes:s,value:c,defaultValue:l,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,shouldDisableMonth:b,readOnly:S,onMonthFocus:C,hasFocus:w,onFocusedViewChange:T,monthsPerRow:E,timezone:D,gridLabelId:O,slots:k,slotProps:A}=n,j=Z(n,Rh),{value:M,handleValueChange:N,timezone:ee}=md({name:`MonthCalendar`,timezone:D,value:c,defaultValue:l,referenceDate:d,onChange:y,valueManager:bd}),P=iu(ee),F=dn(),I=Ic(),{ownerState:te}=mu(),L=p(()=>bd.getInitialReferenceValue({value:M,adapter:I,props:n,timezone:ee,referenceDate:d,granularity:hd.month}),[]),ne=zh(s),R=p(()=>I.getMonth(P),[I,P]),z=p(()=>M==null?null:I.getMonth(M),[M,I]),[B,re]=u(()=>z||I.getMonth(L)),[ie,ae]=$t({name:`MonthCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),oe=Y(e=>{ae(e),T&&T(e)}),V=f(e=>{let t=I.startOfMonth(g&&I.isAfter(P,v)?P:v),n=I.startOfMonth(h&&I.isBefore(P,_)?P:_),r=I.startOfMonth(e);return I.isBefore(r,t)||I.isAfter(r,n)?!0:b?b(r):!1},[h,g,_,v,P,b,I]),se=Y((e,t)=>{if(S)return;let n=(M&&o&&!I.isSameYear(M,o)?I.setYear(M,I.getYear(o)):M)??o??L,r=I.setMonth(n,t);N(r)}),ce=Y(e=>{V(I.setMonth(M??o??L,e))||(re(e),oe(!0),C&&C(e))});a(()=>{re(e=>z!==null&&e!==z?z:e)},[z]);let H=Y((e,t)=>{switch(e.key){case`ArrowUp`:ce((12+t-3)%12),e.preventDefault();break;case`ArrowDown`:ce((12+t+3)%12),e.preventDefault();break;case`ArrowLeft`:ce((12+t+(F?1:-1))%12),e.preventDefault();break;case`ArrowRight`:ce((12+t+(F?-1:1))%12),e.preventDefault();break;case`Enter`:case` `:se(e,t),e.preventDefault()}}),U=Y((e,t)=>{ce(t)}),le=Y((e,t)=>{B===t&&oe(!1)});return G(Hh,x({ref:t,className:Ve(ne.root,i),ownerState:te,role:`radiogroup`,"aria-labelledby":O,monthsPerRow:E},j,{children:Qc(I,o??M??L).map(e=>{let t=I.getMonth(e),n=I.format(e,`monthShort`),r=I.format(e,`month`),i=Vh(t,z,e,M,I),a=m||V(e);return G(Lh,{selected:i,value:t,onClick:se,onKeyDown:H,autoFocus:ie&&t===B,disabled:a,tabIndex:t===B&&!a?0:-1,onFocus:U,onBlur:le,"aria-current":Vh(t,R,e,P,I)?`date`:void 0,"aria-label":r,slots:k,slotProps:A,classes:s,children:n},n)})}))});function Wh(e){return Ne(`MuiYearCalendar`,e)}var Gh=ke(`MuiYearCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Kh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],qh=(e,t)=>{let n={button:[`button`,t.isYearDisabled&&`disabled`,t.isYearSelected&&`selected`]};return B(n,Wh,e)},Jh=q(`button`,{name:`MuiYearCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Gh.disabled}`]:t.disabled},{[`&.${Gh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.focusOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Gh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Gh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Yh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Kh),m=l(null),{ownerState:h}=mu(),g=x({},h,{isYearDisabled:r,isYearSelected:i}),_=qh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.yearButton)??Jh,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.yearButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var Xh=[`autoFocus`,`className`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`readOnly`,`shouldDisableYear`,`disableHighlightToday`,`onYearFocus`,`hasFocus`,`onFocusedViewChange`,`yearsOrder`,`yearsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Zh=e=>B({root:[`root`]},Wh,e);function Qh(e,t){let n=cr({props:e,name:t}),r=Hf(n);return x({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??`asc`})}var $h=q(`div`,{name:`MuiYearCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`yearsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:12,padding:`6px 0`,overflowY:`auto`,height:`100%`,width:320,maxHeight:280,boxSizing:`border-box`,position:`relative`,variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:`0 2px`}}]}),eg=q(`div`,{name:`MuiYearCalendar`,slot:`ButtonFiller`})({height:36,width:72}),tg=o(function(e,t){let n=Qh(e,`MuiYearCalendar`),{autoFocus:r,className:i,classes:o,value:s,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,readOnly:b,shouldDisableYear:S,onYearFocus:C,hasFocus:w,onFocusedViewChange:T,yearsOrder:E,yearsPerRow:D,timezone:O,gridLabelId:k,slots:A,slotProps:j}=n,M=Z(n,Xh),{value:N,handleValueChange:ee,timezone:P}=md({name:`YearCalendar`,timezone:O,value:s,defaultValue:c,referenceDate:d,onChange:y,valueManager:bd}),F=iu(P),I=dn(),te=Ic(),{ownerState:L}=mu(),ne=p(()=>bd.getInitialReferenceValue({value:N,adapter:te,props:n,timezone:P,referenceDate:d,granularity:hd.year}),[]),R=Zh(o),z=p(()=>te.getYear(F),[te,F]),B=p(()=>N==null?null:te.getYear(N),[N,te]),[re,ie]=u(()=>B||te.getYear(ne)),[ae,oe]=$t({name:`YearCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),V=Y(e=>{oe(e),T&&T(e)}),se=f(e=>{if(g&&te.isBeforeYear(e,F)||h&&te.isAfterYear(e,F)||v&&te.isBeforeYear(e,v)||_&&te.isAfterYear(e,_))return!0;if(!S)return!1;let t=te.startOfYear(e);return S(t)},[h,g,_,v,F,S,te]),ce=Y((e,t)=>{if(b)return;let n=te.setYear(N??ne,t);ee(n)}),H=Y(e=>{se(te.setYear(N??ne,e))||(ie(e),V(!0),C==null||C(e))});a(()=>{ie(e=>B!==null&&e!==B?B:e)},[B]);let U=E===`desc`?D*-1:D*1,le=I&&E===`asc`||!I&&E===`desc`?-1:1,ue=Y((e,t)=>{switch(e.key){case`ArrowUp`:H(t-U),e.preventDefault();break;case`ArrowDown`:H(t+U),e.preventDefault();break;case`ArrowLeft`:H(t-le),e.preventDefault();break;case`ArrowRight`:H(t+le),e.preventDefault();break;case`Enter`:case` `:ce(e,t),e.preventDefault()}}),de=Y((e,t)=>{H(t)}),fe=Y((e,t)=>{re===t&&V(!1)}),pe=l(null),W=nt(t,pe);a(()=>{if(r||pe.current===null)return;let e=pe.current.querySelector(`[tabindex="0"]`);if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=pe.current.clientHeight,a=pe.current.scrollTop,o=n+t;t>i||n<a||(pe.current.scrollTop=o-i/2-t/2)},[r]);let me=te.getYearRange([v,_]);E===`desc`&&me.reverse();let he=D-me.length%D;return he===D&&(he=0),Je($h,x({ref:W,className:Ve(R.root,i),ownerState:L,role:`radiogroup`,"aria-labelledby":k,yearsPerRow:D},M,{children:[me.map(e=>{let t=te.getYear(e),n=t===B,r=m||se(e);return G(Yh,{selected:n,value:t,onClick:ce,onKeyDown:ue,autoFocus:ae&&t===re,disabled:r,tabIndex:t===re&&!r?0:-1,onFocus:de,onBlur:fe,"aria-current":z===t?`date`:void 0,slots:A,slotProps:j,classes:o,children:te.format(e,`year`)},te.format(e,`year`))}),Array.from({length:he},(e,t)=>G(eg,{},t))]}))}),ng=e=>Ne(`MuiPickersCalendarHeader`,e),rg=ke(`MuiPickersCalendarHeader`,[`root`,`labelContainer`,`label`,`switchViewButton`,`switchViewIcon`]);g();var ig=[`slots`,`slotProps`,`currentMonth`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onMonthChange`,`onViewChange`,`view`,`reduceAnimations`,`views`,`labelId`,`className`,`classes`,`timezone`,`format`],ag=[`ownerState`],og=e=>B({root:[`root`],labelContainer:[`labelContainer`],label:[`label`],switchViewButton:[`switchViewButton`],switchViewIcon:[`switchViewIcon`]},ng,e),sg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Root`})({display:`flex`,alignItems:`center`,marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),cg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`LabelContainer`})(({theme:e})=>x({display:`flex`,overflow:`hidden`,alignItems:`center`,cursor:`pointer`,marginRight:`auto`},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),lg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Label`})({marginRight:6}),ug=q(mn,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewButton`})({marginRight:`auto`,variants:[{props:{view:`year`},style:{[`.${rg.switchViewIcon}`]:{transform:`rotate(180deg)`}}}]}),dg=q(au,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewIcon`})(({theme:e})=>({willChange:`transform`,transition:e.transitions.create(`transform`),transform:`rotate(0deg)`})),fg=o(function(e,t){let n=Lc(),r=Ic(),i=cr({props:e,name:`MuiPickersCalendarHeader`}),{slots:a,slotProps:o,currentMonth:s,disabled:c,disableFuture:l,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:_,labelId:v,className:y,classes:b,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,w=Z(i,ig),{ownerState:T}=mu(),E=og(b),D=(a==null?void 0:a.switchViewButton)??ug,O=Vn({elementType:D,externalSlotProps:o==null?void 0:o.switchViewButton,additionalProps:{size:`small`,"aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:x({},T,{view:h}),className:E.switchViewButton}),k=(a==null?void 0:a.switchViewIcon)??dg,A=Z(Vn({elementType:k,externalSlotProps:o==null?void 0:o.switchViewIcon,ownerState:T,className:E.switchViewIcon}),ag),j=()=>p(r.addMonths(s,1)),M=()=>p(r.addMonths(s,-1)),N=Eu(s,{disableFuture:l,maxDate:d,timezone:S}),ee=Du(s,{disablePast:u,minDate:f,timezone:S}),P=()=>{if(!(_.length===1||!m||c)){if(_.length===2)m(_.find(e=>e!==h)||_[0]);else{let e=+(_.indexOf(h)===0);m(_[e])}}};if(_.length===1&&_[0]===`year`)return null;let F=r.formatByString(s,C);return Je(sg,x({},w,{ownerState:T,className:Ve(E.root,y),ref:t,children:[Je(cg,{role:`none`,onClick:P,ownerState:T,"aria-live":`polite`,className:E.labelContainer,children:[G(sh,{reduceAnimations:g,transKey:F,children:G(lg,{id:v,ownerState:T,className:E.label,children:F})}),_.length>1&&!c&&G(D,x({},O,{children:G(k,x({},A))}))]}),G(rn,{in:h===`day`,appear:!g,enter:!g,children:G(Su,{slots:a,slotProps:o,onGoToPrevious:M,isPreviousDisabled:ee,previousLabel:n.previousMonth,onGoToNext:j,isNextDisabled:N,nextLabel:n.nextMonth})})]}))}),pg=`@media (prefers-reduced-motion: reduce)`,mg=typeof navigator<`u`&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),hg=mg&&mg[1]?parseInt(mg[1],10):null,gg=mg&&mg[2]?parseInt(mg[2],10):null,_g=hg&&hg<10||gg&&gg<13||!1;function vg(e){let t=he(pg,{defaultMatches:!1});return e??(t||_g)}var yg=e=>Ne(`MuiDateCalendar`,e),bg=ke(`MuiDateCalendar`,[`root`,`viewTransitionContainer`]);g();var xg=`autoFocus.onViewChange.value.defaultValue.referenceDate.disableFuture.disablePast.onChange.onYearChange.onMonthChange.reduceAnimations.shouldDisableDate.shouldDisableMonth.shouldDisableYear.view.views.openTo.className.classes.disabled.readOnly.minDate.maxDate.disableHighlightToday.focusedView.onFocusedViewChange.showDaysOutsideCurrentMonth.fixedWeekNumber.dayOfWeekFormatter.slots.slotProps.loading.renderLoading.displayWeekNumber.yearsOrder.yearsPerRow.monthsPerRow.timezone`.split(`.`),Sg=e=>B({root:[`root`],viewTransitionContainer:[`viewTransitionContainer`]},yg,e);function Cg(e,t){let n=cr({props:e,name:t}),r=vg(n.reduceAnimations),i=Hf(n);return x({},n,i,{loading:n.loading??!1,openTo:n.openTo??`day`,views:n.views??[`year`,`day`],reduceAnimations:r,renderLoading:n.renderLoading??(()=>G(`span`,{children:`…`}))})}var wg=q(ku,{name:`MuiDateCalendar`,slot:`Root`})({display:`flex`,flexDirection:`column`,height:336}),Tg=q(sh,{name:`MuiDateCalendar`,slot:`ViewTransitionContainer`})({}),Eg=o(function(e,t){let n=Ic(),{ownerState:r}=mu(),i=Le(),o=Cg(e,`MuiDateCalendar`),{autoFocus:s,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:m,disablePast:h,onChange:g,onMonthChange:_,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,view:C,views:w,openTo:T,className:E,classes:D,disabled:O,readOnly:k,minDate:A,maxDate:j,disableHighlightToday:M,focusedView:N,onFocusedViewChange:ee,showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,slots:te,slotProps:L,loading:ne,renderLoading:R,displayWeekNumber:z,yearsOrder:B,yearsPerRow:re,monthsPerRow:ie,timezone:ae}=o,oe=Z(o,xg),{value:V,handleValueChange:se,timezone:ce}=md({name:`DateCalendar`,timezone:ae,value:u,defaultValue:d,referenceDate:f,onChange:g,valueManager:bd}),{view:H,setView:U,focusedView:le,setFocusedView:ue,goToNextView:de,setValueAndGoToNextView:fe}=Tu({view:C,views:w,openTo:T,onChange:se,onViewChange:c,autoFocus:s,focusedView:N,onFocusedViewChange:ee}),{referenceDate:pe,calendarState:W,setVisibleDate:me,isDateDisabled:he,onMonthSwitchingAnimationEnd:ge}=Om({value:V,referenceDate:f,reduceAnimations:v,onMonthChange:_,minDate:A,maxDate:j,shouldDisableDate:y,disablePast:h,disableFuture:m,timezone:ce,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),_e=O&&V||A,ve=O&&V||j,ye=`${i}-grid-label`,be=le!==null,xe=(te==null?void 0:te.calendarHeader)??fg,Se=Vn({elementType:xe,externalSlotProps:L==null?void 0:L.calendarHeader,additionalProps:{views:w,view:H,currentMonth:W.currentMonth,onViewChange:U,onMonthChange:e=>me({target:e,reason:`header-navigation`}),minDate:_e,maxDate:ve,disabled:O,disablePast:h,disableFuture:m,reduceAnimations:v,timezone:ce,labelId:ye},ownerState:r}),Ce=Y(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=he(e)?Jc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),we=Y(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=he(e)?Jc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),Te=Y(e=>se(e&&qc(n,e,V??pe),`finish`,H));a(()=>{n.isValid(V)&&me({target:V,reason:`controlled-value-change`})},[V]);let Ee=Sg(D),De={disablePast:h,disableFuture:m,maxDate:j,minDate:A},Oe={disableHighlightToday:M,readOnly:k,disabled:O,timezone:ce,gridLabelId:ye,slots:te,slotProps:L},ke=l(H);a(()=>{ke.current!==H&&(le===ke.current&&ue(H,!0),ke.current=H)},[le,ue,H]);let Ae=p(()=>[V],[V]);return Je(wg,x({ref:t,className:Ve(Ee.root,E),ownerState:r},oe,{children:[G(xe,x({},Se,{slots:te,slotProps:L})),G(Tg,{reduceAnimations:v,className:Ee.viewTransitionContainer,transKey:H,ownerState:r,children:Je(`div`,{children:[H===`year`&&G(tg,x({},De,Oe,{value:V,onChange:we,shouldDisableYear:S,hasFocus:be,onFocusedViewChange:e=>ue(`year`,e),yearsOrder:B,yearsPerRow:re,referenceDate:pe})),H===`month`&&G(Uh,x({},De,Oe,{currentMonth:W.currentMonth,hasFocus:be,className:E,value:V,onChange:Ce,shouldDisableMonth:b,onFocusedViewChange:e=>ue(`month`,e),monthsPerRow:ie,referenceDate:pe})),H===`day`&&G(jh,x({},W,De,Oe,{onMonthSwitchingAnimationEnd:ge,hasFocus:be,onFocusedDayChange:e=>me({target:e,reason:`cell-interaction`}),reduceAnimations:v,selectedDays:Ae,onSelectedDaysChange:Te,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,onFocusedViewChange:e=>ue(`day`,e),showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,displayWeekNumber:z,loading:ne,renderLoading:R}))]})})]}))}),Dg=e=>Ne(`MuiDayCalendarSkeleton`,e),Og=ke(`MuiDayCalendarSkeleton`,[`root`,`week`,`daySkeleton`]);g();var kg=[`className`,`classes`],Ag=e=>B({root:[`root`],week:[`week`],daySkeleton:[`daySkeleton`]},Dg,e),jg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Root`})({alignSelf:`start`}),Mg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Week`})({margin:`2px 0`,display:`flex`,justifyContent:`center`}),Ng=q(ee,{name:`MuiDayCalendarSkeleton`,slot:`DaySkeleton`})({margin:`0 2px`,'&[data-day-in-month="0"]':{visibility:`hidden`}}),Pg=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function Fg(e){let t=cr({props:e,name:`MuiDayCalendarSkeleton`}),{className:n,classes:r}=t,i=Z(t,kg),a=Ag(r);return G(jg,x({className:Ve(a.root,n),ownerState:t},i,{children:Pg.map((e,t)=>G(Mg,{className:a.week,children:e.map((e,t)=>G(Ng,{variant:`circular`,width:36,height:36,className:a.daySkeleton,"data-day-in-month":e},t))},t))}))}function Ig(e){return Ne(`MuiPickersToolbar`,e)}var Lg=ke(`MuiPickersToolbar`,[`root`,`title`,`content`]);g();function Rg(){let{ownerState:e}=mu(),t=dn();return p(()=>x({},e,{toolbarDirection:t?`rtl`:`ltr`}),[e,t])}g();var zg=[`children`,`className`,`classes`,`toolbarTitle`,`hidden`,`titleId`,`classes`,`landscapeDirection`],Bg=e=>B({root:[`root`],title:[`title`],content:[`content`]},Ig,e),Vg=q(`div`,{name:`MuiPickersToolbar`,slot:`Root`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`space-between`,padding:e.spacing(2,3),variants:[{props:{pickerOrientation:`landscape`},style:{height:`auto`,maxWidth:160,padding:16,justifyContent:`flex-start`,flexWrap:`wrap`}}]})),Hg=q(`div`,{name:`MuiPickersToolbar`,slot:`Content`,shouldForwardProp:e=>cn(e)&&e!==`landscapeDirection`})({display:`flex`,flexWrap:`wrap`,width:`100%`,flex:1,justifyContent:`space-between`,alignItems:`center`,flexDirection:`row`,variants:[{props:{pickerOrientation:`landscape`},style:{justifyContent:`flex-start`,alignItems:`flex-start`,flexDirection:`column`}},{props:{pickerOrientation:`landscape`,landscapeDirection:`row`},style:{flexDirection:`row`}}]}),Ug=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbar`}),{children:r,className:i,classes:a,toolbarTitle:o,hidden:s,titleId:c,landscapeDirection:l}=n,u=Z(n,zg),d=Rg(),f=Bg(a);return s?null:Je(Vg,x({ref:t,className:Ve(f.root,i),ownerState:d},u,{children:[G(Pt,{variant:`overline`,id:c,className:f.title,sx:{color:`text.secondary`},children:o}),G(Hg,{className:f.content,ownerState:d,landscapeDirection:l,children:r})]}))});function Wg(e){return Ne(`MuiDatePickerToolbar`,e)}var Gg=ke(`MuiDatePickerToolbar`,[`root`,`title`]);g();var Kg=[`toolbarFormat`,`toolbarPlaceholder`,`className`,`classes`],qg=e=>B({root:[`root`],title:[`title`]},Wg,e),Jg=q(Ug,{name:`MuiDatePickerToolbar`,slot:`Root`})({}),Yg=q(Pt,{name:`MuiDatePickerToolbar`,slot:`Title`})({variants:[{props:{pickerOrientation:`landscape`},style:{margin:`auto 16px auto auto`}}]}),Xg=o(function(e,t){let n=cr({props:e,name:`MuiDatePickerToolbar`}),{toolbarFormat:r,toolbarPlaceholder:i=`––`,className:a,classes:o}=n,s=Z(n,Kg),c=Ic(),{value:l,views:u,orientation:d}=Kl(),f=Lc(),m=Rg(),h=qg(o),g=p(()=>{if(!c.isValid(l))return i;let e=rl(c,{format:r,views:u},!0);return c.formatByString(l,e)},[l,r,i,c,u]);return G(Jg,x({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:Ve(h.root,a)},s,{children:G(Yg,{variant:`h4`,align:d===`landscape`?`left`:`center`,ownerState:m,className:h.title,children:g})}))});g();function Zg(e,t){let n=cr({props:e,name:t}),r=Hf(n),i=p(()=>{var e;return((e=n.localeText)==null?void 0:e.toolbarTitle)==null?n.localeText:x({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return x({},n,r,{localeText:i},Kc({views:n.views,openTo:n.openTo,defaultViews:[`year`,`day`],defaultOpenTo:`day`}),{slots:x({toolbar:Xg},n.slots)})}var Qg=e=>e.type===`hidden`;function $g(e){let{nodeName:t}=e;return!!([`BUTTON`,`DETAILS`,`EMBED`,`IFRAME`,`KEYGEN`,`LABEL`,`SELECT`,`TEXTAREA`].includes(t)||t===`A`&&e.hasAttribute(`href`)||e instanceof HTMLInputElement&&!Qg(e)||[`AUDIO`,`VIDEO`].includes(t)&&e.hasAttribute(`controls`)||[`IMG`,`OBJECT`].includes(t)&&e.hasAttribute(`usemap`)||e.hasAttribute(`tabindex`)&&e.tabIndex>-1)}function e_(e){return Ne(`MuiPickerPopper`,e)}ke(`MuiPickerPopper`,[`root`,`paper`]),g();var t_=[`PaperComponent`,`ownerState`,`children`,`paperSlotProps`,`paperClasses`,`onPaperClick`,`onPaperTouchStart`],n_=e=>B({root:[`root`],paper:[`paper`]},e_,e),r_=q(En,{name:`MuiPickerPopper`,slot:`Root`})(({theme:e})=>({zIndex:e.zIndex.modal})),i_=q(Gt,{name:`MuiPickerPopper`,slot:`Paper`})({outline:0,transformOrigin:`top center`,variants:[{props:({popperPlacement:e})=>new Set([`top`,`top-start`,`top-end`]).has(e),style:{transformOrigin:`bottom center`}}]});function a_(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function o_(e,t){let n=l(!1),r=l(!1),i=l(null),o=l(!1);a(()=>{if(!e)return;function t(){o.current=!0}return document.addEventListener(`mousedown`,t,!0),document.addEventListener(`touchstart`,t,!0),()=>{document.removeEventListener(`mousedown`,t,!0),document.removeEventListener(`touchstart`,t,!0),o.current=!1}},[e]);let s=Y(e=>{if(!o.current){r.current=!1;return}let a=r.current;r.current=!1;let s=L(i.current);if(!i.current||`clientX`in e&&a_(e,s))return;if(n.current){n.current=!1;return}let c;c=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),!c&&!a&&t(e)}),c=e=>{e.defaultMuiPrevented||(r.current=!0)};return a(()=>{if(e){let e=L(i.current),t=()=>{n.current=!0};return e.addEventListener(`touchstart`,s),e.addEventListener(`touchmove`,t),()=>{e.removeEventListener(`touchstart`,s),e.removeEventListener(`touchmove`,t)}}},[e,s]),a(()=>{if(e){let e=L(i.current);return e.addEventListener(`click`,s),()=>{e.removeEventListener(`click`,s),r.current=!1}}},[e,s]),[i,c,c]}var s_=o((e,t)=>{let{PaperComponent:n,ownerState:r,children:i,paperSlotProps:a,paperClasses:o,onPaperClick:s,onPaperTouchStart:c}=e,l=Z(e,t_),u=Vn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:o,ownerState:r});return G(n,x({},l,u,{onClick:e=>{var t;s(e),(t=u.onClick)==null||t.call(u,e)},onTouchStart:e=>{var t;c(e),(t=u.onTouchStart)==null||t.call(u,e)},ownerState:r,children:i}))}),c_=e=>{let t=e instanceof HTMLElement?e:null;return t?$g(t):!1};function l_(e){let{children:t,placement:n=`bottom-start`,slots:r,slotProps:i,classes:o}=cr({props:e,name:`MuiPickerPopper`}),{open:s,popupRef:c,reduceAnimations:u,keepOpenDuringFieldFocus:d}=Kl(),{ownerState:f,rootRefObject:m}=mu(),{dismissViews:h,getCurrentViewMode:g,onPopperExited:_,triggerElement:v,viewContainerRole:y}=mu();a(()=>{function e(e){s&&e.key===`Escape`&&h()}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h,s]);let b=l(null);a(()=>{y!==`tooltip`&&g()!==`field`&&(s?b.current=Pd(m.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,y,g,m]);let S=n_(o),[C,w,T]=o_(s,Y(e=>{d&&v&&e&&`target`in e&&v.contains(e.target)||(y===`tooltip`?Md(()=>{var e,t;(e=m.current)!=null&&e.contains(Pd(m.current))||(t=c.current)!=null&&t.contains(Pd(c.current))||h()}):(e.composedPath().some(c_)&&(b.current=null),h()))})),E=l(null),D=nt(E,c),O=nt(D,C),k=e=>{e.key===`Escape`&&(e.stopPropagation(),h())},A=(r==null?void 0:r.desktopTransition)??u?rn:ye,j=(r==null?void 0:r.desktopTrapFocus)??Sn,M=(r==null?void 0:r.desktopPaper)??i_,N=(r==null?void 0:r.popper)??r_,ee=Vn({elementType:N,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:y??void 0,open:s,placement:n,anchorEl:v,onKeyDown:k},className:S.root,ownerState:f}),P=p(()=>x({},f,{popperPlacement:ee.placement}),[f,ee.placement]);return G(N,x({},ee,{children:({TransitionProps:e})=>G(j,x({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:y===`tooltip`},i==null?void 0:i.desktopTrapFocus,{children:G(A,x({},e,i==null?void 0:i.desktopTransition,{onExited:t=>{var n,r,a;_==null||_(),i==null||(n=i.desktopTransition)==null||(r=n.onExited)==null||r.call(n,t),e==null||(a=e.onExited)==null||a.call(e)},children:G(s_,{PaperComponent:M,ownerState:P,ref:O,onPaperClick:w,onPaperTouchStart:T,paperClasses:S.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:t})}))}))}))}g();function u_(){return typeof window>`u`?`portrait`:window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?`landscape`:`portrait`:window.orientation&&Math.abs(Number(window.orientation))===90?`landscape`:`portrait`}function d_(e,t){let[n,r]=u(u_);return j(()=>{let e=()=>{r(u_())};return window.addEventListener(`orientationchange`,e),()=>{window.removeEventListener(`orientationchange`,e)}},[]),jd(e,[`hours`,`minutes`,`seconds`])?`portrait`:t??n}g();function f_(e){let{props:t,valueManager:n,validator:r}=e,{value:i,defaultValue:o,onChange:s,referenceDate:c,timezone:d,onAccept:f,closeOnSelect:m,open:h,onOpen:g,onClose:_}=t,{current:v}=l(o),{current:y}=l(i!==void 0),{current:b}=l(h!==void 0),S=Ic(),{timezone:C,value:w,handleValueChange:T}=md({name:`a picker component`,timezone:d,value:i,defaultValue:v,referenceDate:c,onChange:s,valueManager:n}),[E,D]=u(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:O}=bf({props:t,validator:r,timezone:C,value:w,onError:t.onError}),k=Y(e=>{let t=typeof e==`function`?e(E.open):e;b||D(e=>x({},e,{open:t})),t&&g&&g(),t||_==null||_()}),A=Y((e,t)=>{let{changeImportance:r=`accept`,skipPublicationIfPristine:i=!1,validationError:a,shortcut:o,source:s,shouldClose:c=r===`accept`}=t??{},l,u;!i&&!y&&!E.hasBeenModifiedSinceMount?(l=!0,u=r===`accept`):(l=!n.areValuesEqual(S,e,w),u=r===`accept`&&!n.areValuesEqual(S,e,E.lastCommittedValue)),D(t=>x({},t,{clockShallowValue:l?void 0:t.clockShallowValue,lastCommittedValue:u?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let d=null,p=()=>{if(!d){let t;t=s||(o?`view`:`unknown`),d={validationError:a??O(e),source:t},o&&(d.shortcut=o)}return d};l&&T(e,p()),u&&f&&f(e,p()),c&&k(!1)});w!==E.lastExternalValue&&D(e=>x({},e,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));let j=Y((e,t=`partial`)=>{if(t===`shallow`){D(t=>x({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}));return}A(e,{changeImportance:t===`finish`&&m?`accept`:`set`,source:`view`})});return a(()=>{if(b){if(h===void 0)throw Error(Oc(160));D(e=>x({},e,{open:h}))}},[b,h]),{timezone:C,state:E,setValue:A,setValueFromView:j,setOpen:k,value:w,viewValue:p(()=>n.cleanValue(S,E.clockShallowValue===void 0?w:E.clockShallowValue),[S,n,E.clockShallowValue,w])}}g();var p_=[`className`,`sx`],m_=({ref:e,props:t,valueManager:n,valueType:r,variant:i,validator:a,onPopperExited:o,autoFocusView:s,rendererInterceptor:c,localeText:d,viewContainerRole:f,getStepNavigation:m})=>{let{views:h,view:g,openTo:_,onViewChange:v,viewRenderers:y,reduceAnimations:b,orientation:S,disableOpenPicker:C,closeOnSelect:w,disabled:T,readOnly:E,formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,format:A,label:M,autoFocus:N,name:ee,keepOpenDuringFieldFocus:P}=t,{className:F,sx:I}=t,te=Z(t,p_),L=Le(),ne=Ic(),R=vg(b),z=d_(h,S),{current:B}=l(_??null),[re,ie]=u(null),ae=l(null),oe=l(null),V=l(null),se=nt(e,V),{timezone:ce,state:H,setOpen:U,setValue:le,setValueFromView:ue,value:de,viewValue:fe}=f_({props:t,valueManager:n,validator:a}),{view:pe,setView:W,defaultView:me,focusedView:he,setFocusedView:ge,setValueAndGoToNextView:_e,goToNextStep:ve,hasNextStep:ye,hasSeveralSteps:be}=Tu({view:g,views:h,openTo:_,onChange:ue,onViewChange:v,autoFocus:s,getStepNavigation:m}),xe=Y(()=>{var e;de===null&&(e=oe.current)!=null&&e.clearValue&&oe.current.clearValue(),le(n.emptyValue,{source:`view`})}),Se=Y(()=>le(n.getTodayValue(ne,ce,r),{source:`view`})),Ce=Y(()=>le(de,{source:`view`})),we=Y(()=>le(H.lastCommittedValue,{skipPublicationIfPristine:!0,source:`view`})),Te=Y(()=>{le(de,{skipPublicationIfPristine:!0,source:`view`})}),{hasUIView:Ee,viewModeLookup:De,timeViewsCount:Oe}=p(()=>h.reduce((e,t)=>{let n=y[t]==null?`field`:`UI`;return e.viewModeLookup[t]=n,n===`UI`&&(e.hasUIView=!0,sl(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[y,h]),ke=De[pe],Ae=Y(()=>ke),[je,Me]=u(ke===`UI`?pe:null);je!==pe&&De[pe]===`UI`&&Me(pe),j(()=>{ke===`field`&&H.open&&(U(!1),setTimeout(()=>{var e,t;oe==null||(e=oe.current)==null||e.setSelectedSections(pe),oe==null||(t=oe.current)==null||t.focusField(pe)}))},[pe]),j(()=>{if(!H.open)return;let e=pe;ke===`field`&&je!=null&&(e=je),e!==me&&De[e]===`UI`&&De[me]===`UI`&&(e=me),e!==pe&&W(e),ge(e,!0)},[H.open]);let Ne=p(()=>({isPickerValueEmpty:n.areValuesEqual(ne,de,n.emptyValue),isPickerOpen:H.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:z,pickerVariant:i}),[ne,n,de,H.open,z,i,t.disabled,t.readOnly]),Pe=p(()=>C||!Ee?`hidden`:T||E?`disabled`:`enabled`,[C,Ee,T,E]),Fe=Y(ve),Ie=p(()=>w&&!be?[]:[`cancel`,`nextOrAccept`],[w,be]),Re=p(()=>({setValue:le,setOpen:U,clearValue:xe,setValueToToday:Se,acceptValueChanges:Ce,cancelValueChanges:we,setView:W,goToNextStep:Fe}),[le,U,xe,Se,Ce,we,W,Fe]);return{providerProps:{localeText:d,contextValue:p(()=>x({},Re,{value:de,timezone:ce,open:H.open,views:h,view:je,initialView:B,disabled:T??!1,readOnly:E??!1,autoFocus:N??!1,variant:i,orientation:z,popupRef:ae,reduceAnimations:R,triggerRef:ie,triggerStatus:Pe,keepOpenDuringFieldFocus:!!P,hasNextStep:ye,fieldFormat:A??``,name:ee,label:M,rootSx:I,rootRef:se,rootClassName:F}),[Re,de,se,i,z,R,T,E,A,F,ee,M,I,Pe,P,ye,ce,H.open,je,h,B,N]),privateContextValue:p(()=>({dismissViews:Te,ownerState:Ne,hasUIView:Ee,getCurrentViewMode:Ae,rootRefObject:V,labelId:L,triggerElement:re,viewContainerRole:f,defaultActionBarActions:Ie,onPopperExited:o}),[Te,Ne,Ee,Ae,L,re,f,Ie,o]),actionsContextValue:Re,fieldPrivateContextValue:p(()=>({formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,internalFieldRef:oe}),[D,O,k,oe]),isValidContextValue:e=>{let r=a({adapter:ne,value:e,timezone:ce,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(je==null)return null;let e=y[je];if(e==null)return null;let t=x({},te,{views:h,timezone:ce,value:fe,onChange:_e,view:je,onViewChange:W,showViewSwitcher:Oe>1,timeViewsCount:Oe},f===`tooltip`?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:he,onFocusedViewChange:ge});return c?G(c,{viewRenderers:y,popperView:je,rendererProps:t}):e(t)},ownerState:Ne}};function h_(e){return Ne(`MuiPickersLayout`,e)}var g_=ke(`MuiPickersLayout`,[`root`,`landscape`,`contentWrapper`,`toolbar`,`actionBar`,`tabs`,`shortcuts`]);g();var __=[`actions`],v_=q(D,{name:`MuiPickersLayout`,slot:`ActionBar`})({});function y_(e){let{actions:t}=e,n=Z(e,__),r=Lc(),{clearValue:i,setValueToToday:a,acceptValueChanges:o,cancelValueChanges:s,goToNextStep:c,hasNextStep:l}=Kl();if(t==null||t.length===0)return null;let u=t==null?void 0:t.map(e=>{switch(e){case`clear`:return G(Ln,{onClick:i,children:r.clearButtonLabel},e);case`cancel`:return G(Ln,{onClick:s,children:r.cancelButtonLabel},e);case`accept`:return G(Ln,{onClick:o,children:r.okButtonLabel},e);case`today`:return G(Ln,{onClick:a,children:r.todayButtonLabel},e);case`next`:return G(Ln,{onClick:c,children:r.nextStepButtonLabel},e);case`nextOrAccept`:return l?G(Ln,{onClick:c,children:r.nextStepButtonLabel},e):G(Ln,{onClick:o,children:r.okButtonLabel},e);default:return null}});return G(v_,x({},n,{children:u}))}var b_=h(y_),x_=[`items`,`changeImportance`],S_=[`getValue`],C_=q(le,{name:`MuiPickersLayout`,slot:`Shortcuts`})({});function w_(e){let{items:t,changeImportance:n=`accept`}=e,r=Z(e,x_),{setValue:i}=nu(),a=Xl();if(t==null||t.length===0)return null;let o=t.map(e=>{let{getValue:t}=e,r=Z(e,S_),o=t({isValid:a});return x({},r,{label:r.label,onClick:()=>{i(o,{changeImportance:n,shortcut:r,source:`view`})},disabled:!a(o)})});return G(C_,x({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:`auto`},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:o.map(e=>G(dt,{children:G(Dt,x({},e))},e.id??e.label))}))}g();var T_=[`ownerState`];function E_(e){return e.view!==null}var D_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`],toolbar:[`toolbar`],actionBar:[`actionBar`],tabs:[`tabs`],landscape:[`landscape`],shortcuts:[`shortcuts`]},h_,e)},O_=e=>{let{ownerState:t,defaultActionBarActions:n}=mu(),{view:r}=Kl(),i=dn(),{children:a,slots:o,slotProps:s,classes:c}=e,l=p(()=>x({},t,{layoutDirection:i?`rtl`:`ltr`,hasShortcuts:!1}),[t,i]),u=D_(c,l),d=(o==null?void 0:o.actionBar)??b_,f=Z(Vn({elementType:d,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:l}),T_),m=G(d,x({},f)),h=o==null?void 0:o.toolbar,g=Vn({elementType:h,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:l}),_=E_(g)&&h?G(h,x({},g)):null,v=a,y=o==null?void 0:o.tabs,b=r&&y?G(y,x({className:u.tabs},s==null?void 0:s.tabs)):null,S=(o==null?void 0:o.shortcuts)??w_,C=Vn({elementType:S,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:l}),w=Array.isArray(C==null?void 0:C.items)&&C.items.length>0;return{toolbar:_,content:v,tabs:b,actionBar:m,shortcuts:r&&S?G(S,x({},C)):null,ownerState:x({},l,{hasShortcuts:w})}};g();var k_=[`sx`,`className`,`classes`,`children`,`slots`,`slotProps`],A_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`]},h_,e)},j_=q(`div`,{name:`MuiPickersLayout`,slot:`Root`})({display:`grid`,gridAutoColumns:`max-content auto max-content`,gridAutoRows:`max-content auto max-content`,[`& .${g_.actionBar}`]:{gridColumn:`1 / 4`,gridRow:3},variants:[{props:{pickerOrientation:`landscape`,hasShortcuts:!1},style:{[`& .${g_.toolbar}`]:{gridColumn:1,gridRow:`1 / 3`}}},{props:{pickerOrientation:`landscape`,hasShortcuts:!0},style:{[`& .${g_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1,maxWidth:`max-content`},[`& .${g_.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:`portrait`},style:{[`& .${g_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1},[`& .${g_.shortcuts}`]:{gridColumn:1,gridRow:`2 / 3`}}},{props:{hasShortcuts:!0,layoutDirection:`rtl`},style:{[`& .${g_.shortcuts}`]:{gridColumn:4}}}]}),M_=q(`div`,{name:`MuiPickersLayout`,slot:`ContentWrapper`})({gridColumn:`2 / 4`,gridRow:2,display:`flex`,flexDirection:`column`}),N_=o(function(e,t){let n=cr({props:e,name:`MuiPickersLayout`}),{toolbar:r,content:i,tabs:a,actionBar:o,shortcuts:s,ownerState:c}=O_(n),{orientation:l,variant:u}=Kl(),{sx:d,className:f,classes:p}=n,m=Z(n,k_),h=A_(p,c);return Je(j_,x({ref:t,sx:d,className:Ve(h.root,f),ownerState:c},m,{children:[l===`landscape`?s:r,l===`landscape`?r:s,G(M_,{className:h.contentWrapper,ownerState:c,children:u===`desktop`?Je(y,{children:[i,a]}):Je(y,{children:[a,i]})}),o]}))});function P_(e){let{steps:t}=e;return wu({steps:t,isViewMatchingStep:(e,t)=>t.views==null||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:i})=>{let a=e.views==null?t:e.views.find(e=>i.includes(e));a!==r&&n(a)}})}var F_=[`props`,`steps`],I_=[`ownerState`],L_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,F_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=P_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=m_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`desktop`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ld(n),additionalProps:x({},h&&{id:m}),ownerState:p}),I_),v=a.layout??N_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),popper:x({"aria-labelledby":y},o==null?void 0:o.popper)});return{renderPicker:()=>Je(tu,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(l_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}},R_=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I})=>G(Eg,{view:e,onViewChange:t,views:n.filter(nl),focusedView:r&&nl(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I});g();var z_=o(function(e,t){var n;let r=Ic(),i=Zg(e,`MuiDesktopDatePicker`),a=x({day:R_,month:R_,year:R_},i.viewRenderers),{renderPicker:o}=L_({ref:t,props:x({},i,{closeOnSelect:i.closeOnSelect??!0,viewRenderers:a,format:rl(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:x({field:ym},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Hc(i))},toolbar:x({hidden:!0},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:bd,valueType:`date`,validator:_f,steps:null});return o()});g();var B_=q(Vt,{slot:`internal`})({[`& .${Gn.container}`]:{outline:0},[`& .${Gn.paper}`]:{outline:0,minWidth:320}}),V_=q(We,{slot:`internal`})({"&:first-of-type":{padding:0}});function H_(e){var t,n;let{children:r,slots:i,slotProps:a}=e,{open:o}=Kl(),{dismissViews:s,onPopperExited:c}=mu(),l=(i==null?void 0:i.dialog)??B_;return G(l,x({open:o,onClose:()=>{s(),c==null||c()}},a==null?void 0:a.dialog,{PaperComponent:i==null?void 0:i.mobilePaper,slots:x({transition:(i==null?void 0:i.mobileTransition)??rn},a==null||(t=a.dialog)==null?void 0:t.slots),slotProps:x({transition:a==null?void 0:a.mobileTransition,paper:a==null?void 0:a.mobilePaper},a==null||(n=a.dialog)==null?void 0:n.slotProps),children:G(V_,{children:r})}))}var U_=[`props`,`steps`],W_=[`ownerState`],G_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,U_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=P_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=m_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`mobile`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ld(n),additionalProps:x({},h&&{id:m}),ownerState:p}),W_),v=a.layout??N_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),mobilePaper:x({"aria-labelledby":y},o==null?void 0:o.mobilePaper)});return{renderPicker:()=>Je(tu,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(H_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}};g();var K_=o(function(e,t){var n;let r=Ic(),i=Zg(e,`MuiMobileDatePicker`),a=x({day:R_,month:R_,year:R_},i.viewRenderers),{renderPicker:o}=G_({ref:t,props:x({},i,{viewRenderers:a,format:rl(r,i,!1),slots:x({field:ym},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Hc(i))},toolbar:x({hidden:!1},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:bd,valueType:`date`,validator:_f,steps:null});return o()});g();var q_=[`desktopModeMediaQuery`],J_=o(function(e,t){let n=cr({props:e,name:`MuiDatePicker`}),{desktopModeMediaQuery:r=Id}=n,i=Z(n,q_);return he(r,{defaultMatches:!0})?G(z_,x({ref:t},i)):G(K_,x({ref:t},i))}),Y_=[`props`,`steps`],X_=q(N_,{slot:`internal`})(({theme:e})=>({overflow:`hidden`,minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),Z_=e=>{let{props:t,steps:n}=e,r=Z(e,Y_),{localeText:i,slots:a,slotProps:o,displayStaticWrapperAs:s,autoFocus:c}=t,l=P_({steps:n}),{providerProps:u,renderCurrentView:d}=m_(x({},r,{props:t,variant:s,autoFocusView:c??!1,viewContainerRole:null,localeText:i,getStepNavigation:l})),f=(a==null?void 0:a.layout)??X_;return{renderPicker:()=>{var e,n;return G(tu,x({},u,{children:G(f,x({},Ld(t),o==null?void 0:o.layout,{slots:a,slotProps:o,sx:Rd(u.contextValue.rootSx,o==null||(e=o.layout)==null?void 0:e.sx),className:Ve(u.contextValue.rootClassName,o==null||(n=o.layout)==null?void 0:n.className),ref:u.contextValue.rootRef,children:d()}))}))}}};g();var Q_=o(function(e,t){var n;let r=Zg(e,`MuiStaticDatePicker`),i=r.displayStaticWrapperAs??`mobile`,a=x({day:R_,month:R_,year:R_},r.viewRenderers),{renderPicker:o}=Z_({ref:t,props:x({},r,{viewRenderers:a,displayStaticWrapperAs:i,yearsPerRow:r.yearsPerRow??(i===`mobile`?3:4),slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:bd,valueType:`date`,validator:_f,steps:null});return o()});function $_(e){return Ne(`MuiPickersToolbarText`,e)}var ev=ke(`MuiPickersToolbarText`,[`root`]);g();var tv=[`className`,`classes`,`selected`,`value`],nv=e=>B({root:[`root`]},$_,e),rv=q(Pt,{name:`MuiPickersToolbarText`,slot:`Root`})(({theme:e})=>({transition:e.transitions.create(`color`),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),iv=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarText`}),{className:r,classes:i,selected:a,value:o}=n,s=Z(n,tv),c=nv(i);return G(rv,x({ref:t,className:Ve(c.root,r),component:`span`,ownerState:n},a&&{"data-selected":!0},s,{children:o}))});g();var av=[`align`,`className`,`classes`,`selected`,`typographyClassName`,`value`,`variant`,`width`],ov=e=>B({root:[`root`]},Ig,e),sv=q(Ln,{name:`MuiPickersToolbarButton`,slot:`Root`})({padding:0,minWidth:16,textTransform:`none`}),cv=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarButton`}),{align:r,className:i,classes:a,selected:o,typographyClassName:s,value:c,variant:l,width:u}=n,d=Z(n,av),f=ov(a);return G(sv,x({variant:`text`,ref:t,className:Ve(f.root,i),ownerState:n},u?{sx:{width:u}}:{},d,{children:G(iv,{align:r,className:s,variant:l,value:c,selected:o})}))});function lv(e){return Ne(`MuiTimePickerToolbar`,e)}var uv=ke(`MuiTimePickerToolbar`,[`root`,`separator`,`hourMinuteLabel`,`hourMinuteLabelLandscape`,`hourMinuteLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]),dv=[`ampm`,`ampmInClock`,`className`,`classes`],fv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],separator:[`separator`],hourMinuteLabel:[`hourMinuteLabel`,n===`landscape`&&`hourMinuteLabelLandscape`,r===`rtl`&&`hourMinuteLabelReverse`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},lv,e)},pv=q(Ug,{name:`MuiTimePickerToolbar`,slot:`Root`})({}),mv=q(iv,{name:`MuiTimePickerToolbar`,slot:`Separator`})({outline:0,margin:`0 4px 0 2px`,cursor:`default`}),hv=q(`div`,{name:`MuiTimePickerToolbar`,slot:`HourMinuteLabel`,overridesResolver:(e,t)=>[{[`&.${uv.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${uv.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:`flex`,justifyContent:`flex-end`,alignItems:`flex-end`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{pickerOrientation:`landscape`},style:{marginTop:`auto`}}]}),gv=q(`div`,{name:`MuiTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${uv.ampmLabel}`]:t.ampmLabel},{[`&.${uv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${uv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,flexBasis:`100%`}}]});function _v(e){let t=cr({props:e,name:`MuiTimePickerToolbar`}),{ampm:n,ampmInClock:r,className:i,classes:a}=t,o=Z(t,dv),s=Ic(),c=Lc(),l=Rg(),u=fv(a,l),{value:d,setValue:f,disabled:p,readOnly:m,view:h,setView:g,views:_}=Kl(),v=!!(n&&!r&&_.includes(`hours`)),{meridiemMode:y,handleMeridiemChange:b}=Ou(d,n,e=>f(e,{changeImportance:`set`,source:`view`})),S=e=>s.isValid(d)?s.format(d,e):`--`,C=G(mv,{tabIndex:-1,value:`:`,variant:`h3`,selected:!1,className:u.separator});return Je(pv,x({landscapeDirection:`row`,toolbarTitle:c.timePickerToolbarTitle,ownerState:l,className:Ve(u.root,i)},o,{children:[Je(hv,{className:u.hourMinuteLabel,ownerState:l,children:[jd(_,`hours`)&&G(cv,{tabIndex:-1,variant:`h3`,onClick:()=>g(`hours`),selected:h===`hours`,value:S(n?`hours12h`:`hours24h`)}),jd(_,[`hours`,`minutes`])&&C,jd(_,`minutes`)&&G(cv,{tabIndex:-1,variant:`h3`,onClick:()=>g(`minutes`),selected:h===`minutes`,value:S(`minutes`)}),jd(_,[`minutes`,`seconds`])&&C,jd(_,`seconds`)&&G(cv,{variant:`h3`,onClick:()=>g(`seconds`),selected:h===`seconds`,value:S(`seconds`)})]}),v&&Je(gv,{className:u.ampmSelection,ownerState:l,children:[G(cv,{disableRipple:!0,variant:`subtitle2`,selected:y===`am`,typographyClassName:u.ampmLabel,value:el(s,`am`),onClick:m?void 0:()=>b(`am`),disabled:p}),G(cv,{disableRipple:!0,variant:`subtitle2`,selected:y===`pm`,typographyClassName:u.ampmLabel,value:el(s,`pm`),onClick:m?void 0:()=>b(`pm`),disabled:p})]})]}))}g();function vv(e,t){var n;let r=Ic(),i=cr({props:e,name:t}),a=Kf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{timePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]);return x({},i,a,{ampm:o,localeText:s},Kc({views:i.views,openTo:i.openTo,defaultViews:[`hours`,`minutes`],defaultOpenTo:`hours`}),{slots:x({toolbar:_v},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o,ampmInClock:i.ampmInClock},(n=i.slotProps)==null?void 0:n.toolbar)})})}var yv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D})=>G(Od,{view:e,onViewChange:t,focusedView:n&&sl(n)?n:null,onFocusedViewChange:r,views:i.filter(sl),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D}),bv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(Wd,{view:e,onViewChange:t,focusedView:n&&sl(n)?n:null,onFocusedViewChange:r,views:i.filter(sl),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeStep:T==null?void 0:T.minutes,skipDisabled:E,timezone:D}),xv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(of,{view:e,onViewChange:t,focusedView:n&&cl(n)?n:null,onFocusedViewChange:r,views:i.filter(sl),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D}),Sv=[`views`,`format`],Cv=(e,t,n)=>{let{views:r,format:i}=t,a=Z(t,Sv);if(i)return i;let o=[],s=[];if(r.forEach(e=>{sl(e)?s.push(e):nl(e)&&o.push(e)}),s.length===0)return rl(e,x({views:o},a),!1);if(o.length===0)return ml(e,x({views:s},a));let c=ml(e,x({views:s},a));return`${n?e.formats.keyboardDate:rl(e,x({views:o},a),!1)} ${c}`},wv=(e,t,n)=>n?t.filter(e=>!cl(e)||e===`hours`):e?[...t,`meridiem`]:t,Tv=(e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t;function Ev({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){let i=e??24,a=x({hours:1,minutes:5,seconds:5},n),o=Tv(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:wv(t,r,o)}}g();var Dv=o(function(e,t){var n,r;let i=Ic(),a=vv(e,`MuiDesktopTimePicker`),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:c}=Ev(a),l=o?bv:xv,u=x({hours:l,minutes:l,seconds:l,meridiem:l},a.viewRenderers),d=a.ampmInClock??!0,f=((n=u.hours)==null?void 0:n.name)===xv.name?s:s.filter(e=>e!==`meridiem`),{renderPicker:p}=L_({ref:t,props:x({},a,{ampmInClock:d,timeSteps:c,viewRenderers:u,format:ml(i,a),views:o?[`hours`]:f,slots:x({field:Sm},a.slots),slotProps:x({},a.slotProps,{field:e=>{var t;return x({},An((t=a.slotProps)==null?void 0:t.field,e),Hc(a))},toolbar:x({hidden:!0,ampmInClock:d},(r=a.slotProps)==null?void 0:r.toolbar)})}),valueManager:bd,valueType:`time`,validator:vf,steps:null});return p()});g();var Ov=o(function(e,t){var n;let r=Ic(),i=vv(e,`MuiMobileTimePicker`),a=x({hours:yv,minutes:yv,seconds:yv},i.viewRenderers),o=i.ampmInClock??!1,{renderPicker:s}=G_({ref:t,props:x({},i,{ampmInClock:o,viewRenderers:a,format:ml(r,i),slots:x({field:Sm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Hc(i))},toolbar:x({hidden:!1,ampmInClock:o},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:bd,valueType:`time`,validator:vf,steps:null});return s()});g();var kv=[`desktopModeMediaQuery`],Av=o(function(e,t){let n=cr({props:e,name:`MuiTimePicker`}),{desktopModeMediaQuery:r=Id}=n,i=Z(n,kv);return he(r,{defaultMatches:!0})?G(Dv,x({ref:t},i)):G(Ov,x({ref:t},i))});g();var jv=o(function(e,t){var n;let r=vv(e,`MuiStaticTimePicker`),i=r.displayStaticWrapperAs??`mobile`,a=r.ampmInClock??i===`desktop`,o=x({hours:yv,minutes:yv,seconds:yv},r.viewRenderers),{renderPicker:s}=Z_({ref:t,props:x({},r,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:a,slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`,ampmInClock:a},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:bd,valueType:`time`,validator:vf,steps:null});return s()});function Mv(e){return Ne(`MuiDateTimePickerTabs`,e)}var Nv=ke(`MuiDateTimePickerTabs`,[`root`]);g();var Pv=[`dateIcon`,`timeIcon`,`hidden`,`className`,`classes`,`sx`],Fv=e=>nl(e)?`date`:`time`,Iv=e=>e===`date`?`day`:`hours`,Lv=e=>B({root:[`root`]},Mv,e),Rv=q(Te,{name:`MuiDateTimePickerTabs`,slot:`Root`})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${qe.indicator}`]:{bottom:`auto`,top:0}}})),zv=function(e){let t=cr({props:e,name:`MuiDateTimePickerTabs`}),{dateIcon:n=G(uu,{}),timeIcon:r=G(du,{}),hidden:i=typeof window>`u`||window.innerHeight<667,className:a,classes:o,sx:s}=t,c=Z(t,Pv),l=Lc(),{ownerState:u}=mu(),{view:d,setView:f}=Kl(),p=Lv(o);return i?null:Je(Rv,x({},c,{ownerState:u,variant:`fullWidth`,value:Fv(d),onChange:(e,t)=>{f(Iv(t))},className:Ve(a,p.root),sx:s,children:[G(dr,{value:`date`,"aria-label":l.dateTableLabel,icon:G(y,{children:n})}),G(dr,{value:`time`,"aria-label":l.timeTableLabel,icon:G(y,{children:r})})]}))};function Bv(e){return Ne(`MuiDateTimePickerToolbar`,e)}var Vv=ke(`MuiDateTimePickerToolbar`,[`root`,`dateContainer`,`timeContainer`,`timeDigitsContainer`,`separator`,`timeLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]);g();var Hv=[`ampm`,`ampmInClock`,`toolbarFormat`,`toolbarPlaceholder`,`toolbarTitle`,`className`,`classes`],Uv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],dateContainer:[`dateContainer`],timeContainer:[`timeContainer`,r===`rtl`&&`timeLabelReverse`],timeDigitsContainer:[`timeDigitsContainer`,r===`rtl`&&`timeLabelReverse`],separator:[`separator`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},Bv,e)},Wv=q(Ug,{name:`MuiDateTimePickerToolbar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:`space-around`,position:`relative`,variants:[{props:{toolbarVariant:`desktop`},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Lg.content} .${ev.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:`desktop`,pickerOrientation:`landscape`},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{paddingLeft:24,paddingRight:0}}]})),Gv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`DateContainer`})({display:`flex`,flexDirection:`column`,alignItems:`flex-start`}),Kv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,flexDirection:`row`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{gap:9,marginRight:4,alignSelf:`flex-end`}},{props:({pickerOrientation:e,toolbarVariant:t})=>e===`landscape`&&t!==`desktop`,style:{flexDirection:`column`}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e===`landscape`&&t!==`desktop`&&n===`rtl`,style:{flexDirection:`column-reverse`}}]}),qv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeDigitsContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`},style:{gap:1.5}}]}),Jv=q(iv,{name:`MuiDateTimePickerToolbar`,slot:`Separator`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({margin:`0 4px 0 2px`,cursor:`default`,variants:[{props:{toolbarVariant:`desktop`},style:{margin:0}}]}),Yv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${Vv.ampmLabel}`]:t.ampmLabel},{[`&.${Vv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${Vv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,width:`100%`}}]}),Xv=v(null);function Zv(e){let t=cr({props:e,name:`MuiDateTimePickerToolbar`}),{ampm:n,ampmInClock:r,toolbarFormat:i,toolbarPlaceholder:a=`––`,toolbarTitle:o,className:s,classes:c}=t,l=Z(t,Hv),{value:u,setValue:d,disabled:f,readOnly:m,variant:h,orientation:g,view:_,setView:v,views:S}=Kl(),C=Lc(),w=Rg(),T=Uv(c,w),E=Ic(),D=b(Xv),O=D?D.value:u,k=D?D.setValue:d,A=D?D.view:_,j=D?D.setView:v,{meridiemMode:M,handleMeridiemChange:N}=Ou(O,n,e=>k(e,{changeImportance:`set`,source:`view`})),ee=D!=null&&D.forceDesktopVariant?`desktop`:h,P=ee===`desktop`,F=!!(n&&!r),I=o??C.dateTimePickerToolbarTitle,te=p(()=>E.isValid(O)?i?E.formatByString(O,i):E.format(O,`shortDate`):a,[O,i,a,E]),L=(e,t)=>E.isValid(O)?E.format(O,e):t;return Je(Wv,x({className:Ve(T.root,s),toolbarTitle:I,toolbarVariant:ee},l,{ownerState:w,children:[Je(Gv,{className:T.dateContainer,ownerState:w,children:[S.includes(`year`)&&G(cv,{tabIndex:-1,variant:`subtitle1`,onClick:()=>j(`year`),selected:A===`year`,value:L(`year`,`–`)}),S.includes(`day`)&&G(cv,{tabIndex:-1,variant:P?`h5`:`h4`,onClick:()=>j(`day`),selected:A===`day`,value:te})]}),Je(Kv,{className:T.timeContainer,ownerState:w,toolbarVariant:ee,children:[Je(qv,{className:T.timeDigitsContainer,ownerState:w,toolbarVariant:ee,children:[S.includes(`hours`)&&Je(y,{children:[G(cv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`hours`),selected:A===`hours`,value:L(n?`hours12h`:`hours24h`,`--`)}),G(Jv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G(cv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`minutes`),selected:A===`minutes`||!S.includes(`minutes`)&&A===`hours`,value:L(`minutes`,`--`),disabled:!S.includes(`minutes`)})]}),S.includes(`seconds`)&&Je(y,{children:[G(Jv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G(cv,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`seconds`),selected:A===`seconds`,value:L(`seconds`,`--`)})]})]}),F&&!P&&Je(Yv,{className:T.ampmSelection,ownerState:w,children:[G(cv,{variant:`subtitle2`,selected:M===`am`,typographyClassName:T.ampmLabel,value:el(E,`am`),onClick:m?void 0:()=>N(`am`),disabled:f}),G(cv,{variant:`subtitle2`,selected:M===`pm`,typographyClassName:T.ampmLabel,value:el(E,`pm`),onClick:m?void 0:()=>N(`pm`),disabled:f})]}),n&&P&&G(cv,{variant:`h5`,onClick:()=>j(`meridiem`),selected:A===`meridiem`,value:O&&M?el(E,M):`--`,width:48})]})]}))}g();function Qv(e,t){var n;let r=Ic(),i=cr({props:e,name:t}),a=Xf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]),{openTo:c,views:l}=Kc({views:i.views,openTo:i.openTo,defaultViews:[`year`,`day`,`hours`,`minutes`],defaultOpenTo:`day`}),{shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,timeSteps:m}=Ev({thresholdToRenderTimeInASingleColumn:i.thresholdToRenderTimeInASingleColumn,ampm:o,timeSteps:i.timeSteps,views:l}),h=o?[...l,`meridiem`]:l;return x({},i,a,{timeSteps:m,openTo:c,shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,viewsForFormatting:h,ampm:o,localeText:s,orientation:i.orientation??`portrait`,slots:x({toolbar:Zv,tabs:zv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o},(n=i.slotProps)==null?void 0:n.toolbar)})})}g();var $v=o(function(e,t){var n;let{toolbar:r,tabs:i,content:a,actionBar:o,shortcuts:s,ownerState:c}=O_(e),{orientation:l}=Kl(),{sx:u,className:d,classes:f}=e,p=o&&(((n=o.props.actions)==null?void 0:n.length)??0)>0;return Je(j_,{ref:t,className:Ve(g_.root,f==null?void 0:f.root,d),sx:[{[`& .${g_.tabs}`]:{gridRow:4,gridColumn:`1 / 4`},[`& .${g_.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:c,children:[l===`landscape`?s:r,l===`landscape`?r:s,Je(M_,{className:Ve(g_.contentWrapper,f==null?void 0:f.contentWrapper),ownerState:c,sx:{display:`grid`},children:[a,i,p&&G(bt,{sx:{gridRow:3,gridColumn:`1 / 4`}})]}),o]})});g();var ey=[`openTo`,`focusedView`,`timeViewsCount`],ty=function(e){var t,n;let{viewRenderers:r,popperView:i,rendererProps:a}=e,{openTo:o,focusedView:s,timeViewsCount:c}=a,l=Z(a,ey),u=x({},l,{autoFocus:!1,focusedView:null,sx:[{[`&.${Kd.root}`]:{borderBottom:0},[`&.${Kd.root}, .${Jd.root}, &.${Ad.root}`]:{maxHeight:336}}]}),d=cl(i),f=d?`day`:i,p=d?i:`hours`;return Je(y,{children:[(t=r[f])==null?void 0:t.call(r,x({},a,{view:d?`day`:i,focusedView:s&&nl(s)?s:null,views:a.views.filter(nl),sx:[{gridColumn:1},...u.sx]})),c>0&&Je(y,{children:[G(bt,{orientation:`vertical`,sx:{gridColumn:2}}),(n=r[p])==null?void 0:n.call(r,x({},u,{view:d?i:`hours`,focusedView:s&&cl(s)?s:null,openTo:cl(o)?o:`hours`,views:a.views.filter(cl),sx:[{gridColumn:3},...u.sx]}))]})]})},ny=o(function(e,t){var n,r,i;let a=Ic(),o=Qv(e,`MuiDesktopDateTimePicker`),s=o.shouldRenderTimeInASingleColumn?bv:xv,c=x({day:R_,month:R_,year:R_,hours:s,minutes:s,seconds:s,meridiem:s},o.viewRenderers),l=o.ampmInClock??!0,u=((n=c.hours)==null?void 0:n.name)===xv.name?o.views:o.views.filter(e=>e!==`meridiem`),{renderPicker:d}=L_({ref:t,props:x({},o,{viewRenderers:c,format:Cv(a,x({},o,{views:o.viewsForFormatting})),views:u,yearsPerRow:o.yearsPerRow??4,ampmInClock:l,slots:x({field:Tm,layout:$v},o.slots),slotProps:x({},o.slotProps,{field:e=>{var t;return x({},An((t=o.slotProps)==null?void 0:t.field,e),Hc(o))},toolbar:x({hidden:!0,ampmInClock:l},(r=o.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!0},(i=o.slotProps)==null?void 0:i.tabs)})}),valueManager:bd,valueType:`date-time`,validator:yf,rendererInterceptor:ty,steps:null});return d()});g();var ry=[{views:tl},{views:al}],iy=o(function(e,t){var n,r,i,a,o;let s=Ic(),c=Qv(e,`MuiMobileDateTimePicker`),l=c.shouldRenderTimeInASingleColumn?bv:xv,u=x({day:R_,month:R_,year:R_,hours:l,minutes:l,seconds:l,meridiem:l},c.viewRenderers),d=c.ampmInClock??!1,f=((n=u.hours)==null?void 0:n.name)===xv.name?c.views:c.views.filter(e=>e!==`meridiem`),{renderPicker:p}=G_({ref:t,props:x({},c,{viewRenderers:u,format:Cv(s,x({},c,{views:c.viewsForFormatting})),views:f,ampmInClock:d,slots:x({field:Tm},c.slots),slotProps:x({},c.slotProps,{field:e=>{var t;return x({},An((t=c.slotProps)==null?void 0:t.field,e),Hc(c))},toolbar:x({hidden:!1,ampmInClock:d},(r=c.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!1},(i=c.slotProps)==null?void 0:i.tabs),layout:x({},(a=c.slotProps)==null?void 0:a.layout,{sx:Rd([{[`& .${Kd.root}`]:{width:320},[`& .${Jd.root}`]:{flex:1,maxHeight:335,[`.${Jd.item}`]:{width:`auto`}},[`& .${Ad.root}`]:{width:320,maxHeight:336,flex:1,[`.${Ad.item}`]:{justifyContent:`center`}}}],(o=c.slotProps)==null||(o=o.layout)==null?void 0:o.sx)})})}),valueManager:bd,valueType:`date-time`,validator:yf,steps:ry});return p()});g();var ay=[`desktopModeMediaQuery`],oy=o(function(e,t){let n=cr({props:e,name:`MuiDateTimePicker`}),{desktopModeMediaQuery:r=Id}=n,i=Z(n,ay);return he(r,{defaultMatches:!0})?G(ny,x({ref:t},i)):G(iy,x({ref:t},i))});g();var sy=[{views:tl},{views:al}],cy=o(function(e,t){var n,r,i;let a=Qv(e,`MuiStaticDateTimePicker`),o=a.displayStaticWrapperAs??`mobile`,s=a.ampmInClock??o===`desktop`,c=a.shouldRenderTimeInASingleColumn?bv:xv,l=x({day:R_,month:R_,year:R_,hours:c,minutes:c,seconds:c,meridiem:c},a.viewRenderers),u=((n=l.hours)==null?void 0:n.name)===xv.name?a.views:a.views.filter(e=>e!==`meridiem`),{renderPicker:d}=Z_({ref:t,props:x({},a,{viewRenderers:l,displayStaticWrapperAs:o,views:u,ampmInClock:s,yearsPerRow:a.yearsPerRow??(o===`mobile`?3:4),slotProps:x({},a.slotProps,{tabs:x({hidden:o===`desktop`},(r=a.slotProps)==null?void 0:r.tabs),toolbar:x({hidden:o===`desktop`,ampmInClock:s},(i=a.slotProps)==null?void 0:i.toolbar)}),sx:Rd([{[`& .${Kd.root}`]:{width:320},[`& .${Jd.root}`]:{flex:1,maxHeight:335,[`.${Jd.item}`]:{width:`auto`}},[`& .${Ad.root}`]:{width:320,maxHeight:336,flex:1,[`.${Ad.item}`]:{justifyContent:`center`}}}],a==null?void 0:a.sx)}),valueManager:bd,valueType:`date-time`,validator:yf,steps:sy});return d()}),ly=t({ArrowDropDownIcon:()=>au,ArrowLeftIcon:()=>ou,ArrowRightIcon:()=>su,CalendarIcon:()=>cu,ClearIcon:()=>fu,ClockIcon:()=>lu,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>Id,DateCalendar:()=>Eg,DateField:()=>ym,DatePicker:()=>J_,DatePickerToolbar:()=>Xg,DateRangeIcon:()=>uu,DateTimeField:()=>Tm,DateTimePicker:()=>oy,DateTimePickerTabs:()=>zv,DateTimePickerToolbar:()=>Zv,DayCalendarSkeleton:()=>Fg,DesktopDatePicker:()=>z_,DesktopDateTimePicker:()=>ny,DesktopDateTimePickerLayout:()=>$v,DesktopTimePicker:()=>Dv,DigitalClock:()=>Wd,DigitalClockItem:()=>Ud,LocalizationProvider:()=>Pc,MobileDatePicker:()=>K_,MobileDateTimePicker:()=>iy,MobileTimePicker:()=>Ov,MonthCalendar:()=>Uh,MultiSectionDigitalClock:()=>of,PickerDay:()=>mf,PickersActionBar:()=>b_,PickersCalendarHeader:()=>fg,PickersFilledInput:()=>Jp,PickersInput:()=>em,PickersInputBase:()=>kp,PickersLayout:()=>N_,PickersLayoutContentWrapper:()=>M_,PickersLayoutRoot:()=>j_,PickersOutlinedInput:()=>Vp,PickersShortcuts:()=>w_,PickersTextField:()=>am,StaticDatePicker:()=>Q_,StaticDateTimePicker:()=>cy,StaticTimePicker:()=>jv,TimeClock:()=>Od,TimeField:()=>Sm,TimeIcon:()=>du,TimePicker:()=>Av,TimePickerToolbar:()=>_v,Unstable_PickersSectionList:()=>fp,Unstable_PickersSectionListRoot:()=>op,Unstable_PickersSectionListSection:()=>sp,Unstable_PickersSectionListSectionContent:()=>lp,Unstable_PickersSectionListSectionSeparator:()=>cp,YearCalendar:()=>tg,clockClasses:()=>Ju,clockNumberClasses:()=>sd,clockPointerClasses:()=>Vu,dateCalendarClasses:()=>bg,datePickerToolbarClasses:()=>Gg,dateTimePickerTabsClasses:()=>Nv,dateTimePickerToolbarClasses:()=>Vv,dayCalendarClasses:()=>gh,dayCalendarSkeletonClasses:()=>Og,digitalClockClasses:()=>Ad,extractValidationProps:()=>Hc,getDateCalendarUtilityClass:()=>yg,getDayCalendarSkeletonUtilityClass:()=>Dg,getDigitalClockUtilityClass:()=>kd,getMonthCalendarUtilityClass:()=>Mh,getMultiSectionDigitalClockUtilityClass:()=>Gd,getPickerDayUtilityClass:()=>sf,getPickersFilledInputUtilityClass:()=>Hp,getPickersInputBaseUtilityClass:()=>tp,getPickersInputUtilityClass:()=>Yp,getPickersOutlinedInputUtilityClass:()=>Ap,getPickersSectionListUtilityClass:()=>rp,getPickersTextFieldUtilityClass:()=>$f,getTimeClockUtilityClass:()=>Au,getYearCalendarUtilityClass:()=>Wh,monthCalendarClasses:()=>Nh,multiSectionDigitalClockClasses:()=>Kd,multiSectionDigitalClockSectionClasses:()=>Jd,pickerDayClasses:()=>cf,pickersCalendarHeaderClasses:()=>rg,pickersFadeTransitionGroupClasses:()=>rh,pickersFilledInputClasses:()=>Up,pickersInputBaseClasses:()=>np,pickersInputClasses:()=>Xp,pickersLayoutClasses:()=>g_,pickersOutlinedInputClasses:()=>jp,pickersSectionListClasses:()=>ip,pickersSlideTransitionClasses:()=>lh,pickersTextFieldClasses:()=>ep,renderDateViewCalendar:()=>R_,renderDigitalClockTimeView:()=>bv,renderMultiSectionDigitalClockTimeView:()=>xv,renderTimeViewClock:()=>yv,timeClockClasses:()=>ju,timePickerToolbarClasses:()=>uv,unstable_useDateField:()=>Zf,unstable_useDateTimeField:()=>Cm,unstable_useTimeField:()=>bm,useDateManager:()=>zf,useDateTimeManager:()=>qf,useIsValidValue:()=>Xl,useParsedFormat:()=>Jl,usePickerActionsContext:()=>nu,usePickerAdapter:()=>Ic,usePickerContext:()=>Kl,usePickerLayout:()=>O_,usePickerTranslations:()=>Lc,useSplitFieldProps:()=>Wc,useTimeManager:()=>Uf,useValidation:()=>bf,validateDate:()=>_f,validateDateTime:()=>yf,validateTime:()=>vf,yearCalendarClasses:()=>Gh}),uy=t({ArrowDropDownIcon:()=>$b,ArrowLeftIcon:()=>ex,ArrowRightIcon:()=>tx,CalendarIcon:()=>nx,ClearIcon:()=>ox,ClockIcon:()=>rx,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>dy,DateCalendar:()=>Iy,DateField:()=>Ay,DatePicker:()=>Zy,DatePickerToolbar:()=>Qy,DateRangeIcon:()=>ix,DateTimeField:()=>Py,DateTimePicker:()=>lb,DateTimePickerTabs:()=>ub,DateTimePickerToolbar:()=>fb,DayCalendarSkeleton:()=>Jy,DesktopDatePicker:()=>eb,DesktopDateTimePicker:()=>mb,DesktopDateTimePickerLayout:()=>hb,DesktopTimePicker:()=>ob,DigitalClock:()=>vy,DigitalClockItem:()=>yy,LocalizationProvider:()=>Ey,MobileDatePicker:()=>tb,MobileDateTimePicker:()=>gb,MobileTimePicker:()=>sb,MonthCalendar:()=>Hy,MultiSectionDigitalClock:()=>Sy,PickerDay:()=>Dy,PickersActionBar:()=>Db,PickersCalendarHeader:()=>Ab,PickersFilledInput:()=>Lb,PickersInput:()=>Pb,PickersInputBase:()=>Ub,PickersLayout:()=>Sb,PickersLayoutContentWrapper:()=>wb,PickersLayoutRoot:()=>Cb,PickersOutlinedInput:()=>Bb,PickersShortcuts:()=>Ob,PickersTextField:()=>jb,StaticDatePicker:()=>nb,StaticDateTimePicker:()=>_b,StaticTimePicker:()=>cb,TimeClock:()=>fy,TimeField:()=>My,TimeIcon:()=>ax,TimePicker:()=>rb,TimePickerToolbar:()=>ib,Unstable_PickersSectionList:()=>Kb,Unstable_PickersSectionListRoot:()=>qb,Unstable_PickersSectionListSection:()=>Jb,Unstable_PickersSectionListSectionContent:()=>Xb,Unstable_PickersSectionListSectionSeparator:()=>Yb,YearCalendar:()=>Gy,clockClasses:()=>py,clockNumberClasses:()=>my,clockPointerClasses:()=>_y,dateCalendarClasses:()=>Ry,datePickerToolbarClasses:()=>$y,dateTimePickerTabsClasses:()=>db,dateTimePickerToolbarClasses:()=>pb,dayCalendarClasses:()=>zy,dayCalendarSkeletonClasses:()=>Yy,default:()=>Sx,digitalClockClasses:()=>by,extractValidationProps:()=>_x,getDateCalendarUtilityClass:()=>Ly,getDayCalendarSkeletonUtilityClass:()=>Xy,getDigitalClockUtilityClass:()=>xy,getMonthCalendarUtilityClass:()=>Wy,getMultiSectionDigitalClockUtilityClass:()=>Ty,getPickerDayUtilityClass:()=>Oy,getPickersFilledInputUtilityClass:()=>Rb,getPickersInputBaseUtilityClass:()=>Gb,getPickersInputUtilityClass:()=>Fb,getPickersOutlinedInputUtilityClass:()=>Vb,getPickersSectionListUtilityClass:()=>Zb,getPickersTextFieldUtilityClass:()=>Nb,getTimeClockUtilityClass:()=>gy,getYearCalendarUtilityClass:()=>qy,monthCalendarClasses:()=>Uy,multiSectionDigitalClockClasses:()=>wy,multiSectionDigitalClockSectionClasses:()=>Cy,pickerDayClasses:()=>ky,pickersCalendarHeaderClasses:()=>kb,pickersFadeTransitionGroupClasses:()=>By,pickersFilledInputClasses:()=>zb,pickersInputBaseClasses:()=>Wb,pickersInputClasses:()=>Ib,pickersLayoutClasses:()=>Eb,pickersOutlinedInputClasses:()=>Hb,pickersSectionListClasses:()=>Qb,pickersSlideTransitionClasses:()=>Vy,pickersTextFieldClasses:()=>Mb,renderDateViewCalendar:()=>vb,renderDigitalClockTimeView:()=>bb,renderMultiSectionDigitalClockTimeView:()=>xb,renderTimeViewClock:()=>yb,timeClockClasses:()=>hy,timePickerToolbarClasses:()=>ab,unstable_useDateField:()=>jy,unstable_useDateTimeField:()=>Fy,unstable_useTimeField:()=>Ny,useDateManager:()=>yx,useDateTimeManager:()=>xx,useIsValidValue:()=>fx,useParsedFormat:()=>lx,usePickerActionsContext:()=>dx,usePickerAdapter:()=>px,usePickerContext:()=>ux,usePickerLayout:()=>Tb,usePickerTranslations:()=>sx,useSplitFieldProps:()=>cx,useTimeManager:()=>bx,useValidation:()=>vx,validateDate:()=>mx,validateDateTime:()=>gx,validateTime:()=>hx,yearCalendarClasses:()=>Ky}),Q=ly,dy=Q.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,fy=Q.TimeClock,py=Q.clockClasses,my=Q.clockNumberClasses,hy=Q.timeClockClasses,gy=Q.getTimeClockUtilityClass,_y=Q.clockPointerClasses,vy=Q.DigitalClock,yy=Q.DigitalClockItem,by=Q.digitalClockClasses,xy=Q.getDigitalClockUtilityClass,Sy=Q.MultiSectionDigitalClock,Cy=Q.multiSectionDigitalClockSectionClasses,wy=Q.multiSectionDigitalClockClasses,Ty=Q.getMultiSectionDigitalClockUtilityClass,Ey=Q.LocalizationProvider,Dy=Q.PickerDay,Oy=Q.getPickerDayUtilityClass,ky=Q.pickerDayClasses,Ay=Q.DateField,jy=Q.unstable_useDateField,My=Q.TimeField,Ny=Q.unstable_useTimeField,Py=Q.DateTimeField,Fy=Q.unstable_useDateTimeField,Iy=Q.DateCalendar,Ly=Q.getDateCalendarUtilityClass,Ry=Q.dateCalendarClasses,zy=Q.dayCalendarClasses,By=Q.pickersFadeTransitionGroupClasses,Vy=Q.pickersSlideTransitionClasses,Hy=Q.MonthCalendar,Uy=Q.monthCalendarClasses,Wy=Q.getMonthCalendarUtilityClass,Gy=Q.YearCalendar,Ky=Q.yearCalendarClasses,qy=Q.getYearCalendarUtilityClass,Jy=Q.DayCalendarSkeleton,Yy=Q.dayCalendarSkeletonClasses,Xy=Q.getDayCalendarSkeletonUtilityClass,Zy=Q.DatePicker,Qy=Q.DatePickerToolbar,$y=Q.datePickerToolbarClasses,eb=Q.DesktopDatePicker,tb=Q.MobileDatePicker,nb=Q.StaticDatePicker,rb=Q.TimePicker,ib=Q.TimePickerToolbar,ab=Q.timePickerToolbarClasses,ob=Q.DesktopTimePicker,sb=Q.MobileTimePicker,cb=Q.StaticTimePicker,lb=Q.DateTimePicker,ub=Q.DateTimePickerTabs,db=Q.dateTimePickerTabsClasses,fb=Q.DateTimePickerToolbar,pb=Q.dateTimePickerToolbarClasses,mb=Q.DesktopDateTimePicker,hb=Q.DesktopDateTimePickerLayout,gb=Q.MobileDateTimePicker,_b=Q.StaticDateTimePicker,vb=Q.renderDateViewCalendar,yb=Q.renderTimeViewClock,bb=Q.renderDigitalClockTimeView,xb=Q.renderMultiSectionDigitalClockTimeView,Sb=Q.PickersLayout,Cb=Q.PickersLayoutRoot,wb=Q.PickersLayoutContentWrapper,Tb=Q.usePickerLayout,Eb=Q.pickersLayoutClasses,Db=Q.PickersActionBar,Ob=Q.PickersShortcuts,kb=Q.pickersCalendarHeaderClasses,Ab=Q.PickersCalendarHeader,jb=Q.PickersTextField,Mb=Q.pickersTextFieldClasses,Nb=Q.getPickersTextFieldUtilityClass,Pb=Q.PickersInput,Fb=Q.getPickersInputUtilityClass,Ib=Q.pickersInputClasses,Lb=Q.PickersFilledInput,Rb=Q.getPickersFilledInputUtilityClass,zb=Q.pickersFilledInputClasses,Bb=Q.PickersOutlinedInput,Vb=Q.getPickersOutlinedInputUtilityClass,Hb=Q.pickersOutlinedInputClasses,Ub=Q.PickersInputBase,Wb=Q.pickersInputBaseClasses,Gb=Q.getPickersInputBaseUtilityClass,Kb=Q.Unstable_PickersSectionList,qb=Q.Unstable_PickersSectionListRoot,Jb=Q.Unstable_PickersSectionListSection,Yb=Q.Unstable_PickersSectionListSectionSeparator,Xb=Q.Unstable_PickersSectionListSectionContent,Zb=Q.getPickersSectionListUtilityClass,Qb=Q.pickersSectionListClasses,$b=Q.ArrowDropDownIcon,ex=Q.ArrowLeftIcon,tx=Q.ArrowRightIcon,nx=Q.CalendarIcon,rx=Q.ClockIcon,ix=Q.DateRangeIcon,ax=Q.TimeIcon,ox=Q.ClearIcon,sx=Q.usePickerTranslations,cx=Q.useSplitFieldProps,lx=Q.useParsedFormat,ux=Q.usePickerContext,dx=Q.usePickerActionsContext,fx=Q.useIsValidValue,px=Q.usePickerAdapter,mx=Q.validateDate,hx=Q.validateTime,gx=Q.validateDateTime,_x=Q.extractValidationProps,vx=Q.useValidation,yx=Q.useDateManager,bx=Q.useTimeManager,xx=Q.useDateTimeManager,Sx=Reflect.get(ly,`default`)??ly,Cx=`__mf_module_cache__`;globalThis[Cx]||={share:{},remote:{}},globalThis[Cx].share||={},globalThis[Cx].remote||={};var wx=globalThis[Cx];for(let e of Object.keys(wx.share))if(e.startsWith(`default:`)){let t=e.slice(8);wx.share[t]===void 0&&(wx.share[t]=wx.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;wx.share[t]===void 0&&(wx.share[t]=wx.share[e])}var Tx=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},Ex=Symbol.for(`module-federation.shared-cache-listeners`),Dx=e=>{let t=e[Ex];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,Ex,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Ox=(e,t,n)=>{let r=Dx(e);(r[t.canonical]||=new Set).add(n)},kx=Symbol.for(`module-federation.shared-cache-owners`),Ax=e=>{let t=e[kx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,kx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},jx=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[kx];r===void 0?o&&delete o[t.canonical]:Ax(e)[t.canonical]=r;let s=(i=e[Ex])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Mx=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},Nx=Tx(wx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]});Nx===void 0&&(Nx=Mx(uy),jx(wx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Nx,`ConfigCustomJavascriptSet`));var Px,Fx,Ix,Lx=e=>{e.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,e.TimeClock,e.clockClasses,e.clockNumberClasses,e.timeClockClasses,e.getTimeClockUtilityClass,e.clockPointerClasses,e.DigitalClock,e.DigitalClockItem,e.digitalClockClasses,e.getDigitalClockUtilityClass,e.MultiSectionDigitalClock,e.multiSectionDigitalClockSectionClasses,e.multiSectionDigitalClockClasses,e.getMultiSectionDigitalClockUtilityClass,Px=e.LocalizationProvider,e.PickerDay,e.getPickerDayUtilityClass,e.pickerDayClasses,e.DateField,e.unstable_useDateField,e.TimeField,e.unstable_useTimeField,e.DateTimeField,e.unstable_useDateTimeField,e.DateCalendar,e.getDateCalendarUtilityClass,e.dateCalendarClasses,e.dayCalendarClasses,e.pickersFadeTransitionGroupClasses,e.pickersSlideTransitionClasses,e.MonthCalendar,e.monthCalendarClasses,e.getMonthCalendarUtilityClass,e.YearCalendar,e.yearCalendarClasses,e.getYearCalendarUtilityClass,e.DayCalendarSkeleton,e.dayCalendarSkeletonClasses,e.getDayCalendarSkeletonUtilityClass,Fx=e.DatePicker,e.DatePickerToolbar,e.datePickerToolbarClasses,e.DesktopDatePicker,e.MobileDatePicker,e.StaticDatePicker,Ix=e.TimePicker,e.TimePickerToolbar,e.timePickerToolbarClasses,e.DesktopTimePicker,e.MobileTimePicker,e.StaticTimePicker,e.DateTimePicker,e.DateTimePickerTabs,e.dateTimePickerTabsClasses,e.DateTimePickerToolbar,e.dateTimePickerToolbarClasses,e.DesktopDateTimePicker,e.DesktopDateTimePickerLayout,e.MobileDateTimePicker,e.StaticDateTimePicker,e.renderDateViewCalendar,e.renderTimeViewClock,e.renderDigitalClockTimeView,e.renderMultiSectionDigitalClockTimeView,e.PickersLayout,e.PickersLayoutRoot,e.PickersLayoutContentWrapper,e.usePickerLayout,e.pickersLayoutClasses,e.PickersActionBar,e.PickersShortcuts,e.pickersCalendarHeaderClasses,e.PickersCalendarHeader,e.PickersTextField,e.pickersTextFieldClasses,e.getPickersTextFieldUtilityClass,e.PickersInput,e.getPickersInputUtilityClass,e.pickersInputClasses,e.PickersFilledInput,e.getPickersFilledInputUtilityClass,e.pickersFilledInputClasses,e.PickersOutlinedInput,e.getPickersOutlinedInputUtilityClass,e.pickersOutlinedInputClasses,e.PickersInputBase,e.pickersInputBaseClasses,e.getPickersInputBaseUtilityClass,e.Unstable_PickersSectionList,e.Unstable_PickersSectionListRoot,e.Unstable_PickersSectionListSection,e.Unstable_PickersSectionListSectionSeparator,e.Unstable_PickersSectionListSectionContent,e.getPickersSectionListUtilityClass,e.pickersSectionListClasses,e.ArrowDropDownIcon,e.ArrowLeftIcon,e.ArrowRightIcon,e.CalendarIcon,e.ClockIcon,e.DateRangeIcon,e.TimeIcon,e.ClearIcon,e.usePickerTranslations,e.useSplitFieldProps,e.useParsedFormat,e.usePickerContext,e.usePickerActionsContext,e.useIsValidValue,e.usePickerAdapter,e.validateDate,e.validateTime,e.validateDateTime,e.extractValidationProps,e.useValidation,e.useDateManager,e.useTimeManager,e.useDateTimeManager,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};Ox(wx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Lx),Lx(Nx),g();var Rx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e)try{let t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return _.createElement(Fx,{sx:t=>({width:`100%`,borderBottom:`1px solid ${e?`#F00`:t.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${t.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace(`mm`,`MM`),disabled:!!t,value:this.state.value||null,onChange:e=>this.setState({value:e},()=>{try{if(this.props.attr){let e=this.state.value.toISOString();this.onChange(this.props.attr,e).catch(e=>console.warn(`Error saving value for ${this.props.attr}:`,e))}}catch{}}),label:this.getText(this.props.schema.label)})}};g();var zx=class extends X{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){let e=this.props.oContext.DeviceManager;return _.createElement(e,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return _.createElement(`div`,null,`DeviceManager not found`)}};g();var Bx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 42px)`},fullWidthTwoButtons:{width:`calc(100% - 84px)`},fullWidthThreeButtons:{width:`calc(100% - 126x)`},dropZone:{width:`100%`,height:`100%`,position:`absolute`},dropZoneEmpty:{},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadDiv:{position:`relative`,width:`100%`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`100%`,height:`100%`,position:`absolute`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},disabledOpacity:{opacity:.3,cursor:`default`},error:{border:`2px solid red`},deleteButton:{},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},Vx=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Hx=[`mp3`,`ogg`,`wav`,`aac`],Ux=[`avi`,`mp4`,`mov`],Wx=[`txt`,`log`,`html`,`htm`],Gx=[`json`,`js`,`ts`],Kx=class e extends X{constructor(e){super(e),K(this,`dropzoneRef`,void 0),K(this,`imagePrefix`,void 0),K(this,`objectID`,void 0),K(this,`path`,void 0),K(this,`onFolderChanged`,(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(e=>console.error(`Cannot update files: ${e}`))}),this.state={...this.state,deleteFile:``},this.dropzoneRef=_.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??`./files`}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||`0_userdata.0`).replace(`%INSTANCE%`,(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload||``,this.path&&(this.path===`/`?this.path=``:this.path.endsWith(`/`)||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`))})}componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){let e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{let i=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,``));for(let a=0;a<i.length;a++){let o=i[a];if(o.isDir)await this.readFolder(`${e+o.file}/`,t,n);else{let i=!1;if(i=n===`*.*`&&o.file.includes(`.`)||!n||n===`*`||n===`.*`&&o.file.startsWith(`.`)?!0:RegExp(`^${n.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(o.file),i){var r;t.push({name:e+o.file,size:(r=o.stats)!=null&&r.size?Zt.formatBytes(o.stats.size):`--`})}}}}catch(t){console.error(`Cannot read "${e}": ${t}`)}return t}async readFiles(e){let t=[];e||=this.props.schema.pattern,e||=`**/*.*`;let n,r=e.lastIndexOf(`/`);if(n=r===-1?e:e.substring(r+1),e.startsWith(`**`))await this.readFolder(`/`,t,n);else{let r=e.lastIndexOf(`/`);if(r===-1)await this.readFolder(`/`,t,n);else{let i=e.substring(0,r+1);await this.readFolder(i,t,n)}}return t}onDrop(e){let t=e[0],n=new FileReader,r=this.props.schema.maxSize||2097152;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>r){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(r/1024)));return}let e=n.result;if(e===null){console.error(`Cannot read file ${t.name}`);return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,e).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(e=>window.alert(`Cannot upload file: ${e}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?_.createElement(bn,{title:J.t(`jc_Are you sure?`),text:J.t(`jc_File will be deleted`),ok:J.t(`jc_Delete`),cancel:J.t(`jc_Cancel`),onClose:e=>{let t=this.state.deleteFile;this.setState({deleteFile:``},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(e=>window.alert(`Cannot delete file: ${e}`))})}}):null}static base64ToArrayBuffer(e){let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}loadFile(){return this.props.oContext.socket.readFile(this.objectID,this.state.value,!0)}play(){this.loadFile().then(t=>{if(typeof AudioContext<`u`){let n=new AudioContext,r=e.base64ToArrayBuffer(t.file);n.decodeAudioData(r,e=>{let t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getFileIcon(e){return e!=null&&e.extension?Vx.includes(e.extension)?_.createElement(`div`,{style:{...Bx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Hx.includes(e.extension)?_.createElement(zt,null):Wx.includes(e.extension)?_.createElement(Xn,null):Ux.includes(e.extension)?_.createElement(Xe,null):Gx.includes(e.extension)?_.createElement(ze,null):null:null}renderItem(e,t){if(!this.state.files)return null;let n=[];this.props.schema.withFolder||this.state.files.forEach(e=>{let t=e.name.lastIndexOf(`/`);if(t===-1)n.includes(`/`)||n.push(`/`);else{let r=e.name.substring(0,t+1);n.includes(r)||n.push(r)}});let r=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&n.length===1?`${e.name.substring(n[0].length)}`:`${e.name}${this.props.schema.noSize?``:`(${e.size})`}`,extension:e.name.toLowerCase().split(`.`).pop()}));this.props.schema.noNone||r.unshift({label:J.t(`jc_none`),value:``});let i=r.find(e=>e.value===this.state.value),a=0;this.props.schema.upload&&a++,this.props.schema.refresh&&a++;let o=this.state.value&&(this.state.value.endsWith(`.mp3`)||this.state.value.endsWith(`.ogg`)||this.state.value.endsWith(`.wav`));o&&a++;let s=_.createElement(`div`,{style:Bx.fullWidth},_.createElement(Wt,{variant:`standard`,style:{width:`calc(100% - ${a*42}px)`}},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>_.createElement(_.Fragment,null,this.getFileIcon(i),_.createElement(`span`,null,(i==null?void 0:i.label)||``)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},r.map(e=>_.createElement(z,{key:e.value,value:e.value},_.createElement(te,null,this.getFileIcon(e)),_.createElement(er,null,e.label),this.props.schema.delete&&e.value?_.createElement(Zn,{style:Bx.deleteButton,size:`small`,onClick:t=>{t.stopPropagation(),this.setState({deleteFile:e.value})}},_.createElement(me,null)):null))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&_.createElement(Zn,{onClick:()=>this.updateFiles()},_.createElement(ar,null)),this.props.schema.upload&&_.createElement(Zn,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},_.createElement(nr,null)),o&&_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)));if(!this.props.schema.upload)return _.createElement(_.Fragment,null,s,this.renderDeleteDialog());let c={"*/*":[]};if(this.props.schema.fileTypes===`image`?c={"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:this.props.schema.fileTypes===`audio`?c={"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:this.props.schema.fileTypes===`text`&&(c={"text/plain":[`.txt`]}),this.props.schema.pattern){let e=(this.props.schema.pattern.split(`/`).pop()||``).toLowerCase().replace(/.*\./,``);c=e===`png`||e===`jpg`||e===`svg`||e===`gif`||e===`apng`||e===`avif`||e===`webp`?{"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:e===`mp3`||e===`ogg`||e===`wav`?{"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:e===`ics`?{"text/calendar":[`.ics`]}:e===`txt`?{"text/plain":[`.txt`]}:e===`pem`?{"text/plain":[`.pem`]}:{"*/*":[`.${e}`]}}return _.createElement(or,{ref:this.dropzoneRef,multiple:!1,accept:c,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2097152,onDragEnter:()=>{this.setState({uploadFile:`dragging`})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:n})=>_.createElement(`div`,{style:{...Bx.uploadDiv,...this.state.uploadFile===`dragging`?Bx.uploadDivDragging:void 0,...t?Bx.disabledOpacity:void 0},...e()},_.createElement(`input`,{...n()}),this.state.uploadFile===`dragging`?_.createElement(`div`,{style:{...Bx.uploadCenterDiv,...this.state.uploadError?Bx.error:void 0}},_.createElement(`div`,{style:Bx.uploadCenterTextAndIcon},_.createElement(nr,{style:Bx.uploadCenterIcon}),_.createElement(`div`,{style:Bx.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`)))):null,s,this.renderDeleteDialog()))}};g();var qx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 69px)`,marginRight:4},fullWidthIcon:{width:`calc(100% - 119px)`,marginRight:4},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},Jx=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Yx=[`mp3`,`ogg`,`wav`,`aac`],Xx=[`avi`,`mp4`,`mov`],Zx=[`txt`,`log`,`html`,`htm`],Qx=[`json`,`js`,`ts`],$x=class extends X{constructor(...e){super(...e),K(this,`imagePrefix`,`../..`)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??`./files`,this.setState({value:e??``})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||``).toString().trim()?{value:n??``}:null}loadFile(){let e=this.state.value.indexOf(`/`);if(e!==-1){let t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<`u`&&e!=null&&e.file){let t=new AudioContext,n=Kx.base64ToArrayBuffer(e.file);t.decodeAudioData(n,e=>{let n=t.createBufferSource();n.buffer=e,n.connect(t.destination),n.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getIcon(){let e=this.state.value.split(`.`).pop().toLowerCase();return Jx.includes(e)?_.createElement(`div`,{style:{...qx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Yx.includes(e)?_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)):Zx.includes(e)?_.createElement(Xn,null):Xx.includes(e)?_.createElement(Xe,null):Qx.includes(e)?_.createElement(ze,null):null}renderFileBrowser(){return this.state.showFileBrowser?_.createElement(zn,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:qx.fullWidth},n,_.createElement(ot,{variant:`standard`,style:n?qx.fullWidthIcon:qx.fullWidthOneButton,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),_.createElement(xt,{disabled:t,variant:`outlined`,onClick:()=>this.setState({showFileBrowser:!0})},`...`),this.renderFileBrowser())}};g();var eS=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`functions`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.functions.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var tS=class extends X{constructor(...e){super(...e),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){let n=this.props.schema.url||X.getValue(this.props.data,this.props.attr);return _.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}}))}};g();var nS=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({url:e||``}))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url?_.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}})):null}};g();var rS=class extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.common)!=null&&e.host&&this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(e=>e.address!==`0.0.0.0`&&e.address!==`::`)),this.props.schema.onlyIp4?e=e.filter(e=>e.family===`ipv4`):this.props.schema.onlyIp6&&(e=e.filter(e=>e.family===`ipv6`)),this.props.schema.noInternal&&(e=e.filter(e=>!e.internal)),e.forEach(e=>{e.address===`0.0.0.0`?e.name=`[IPv4] 0.0.0.0 - ${J.t(`jc_Listen on all IPs`)}`:e.address===`::`&&(e.name=`[IPv6] :: - ${J.t(`jc_Listen on all IPs`)}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr),a=(n=this.state.ips)==null?void 0:n.find(e=>e.address===i);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.state.ips&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.ips?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>(a==null?void 0:a.name)||e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},(r=this.state.ips)==null?void 0:r.map((e,t)=>_.createElement(z,{key:t,value:e.address},e.name))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var iS=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({image:e||``})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?_.createElement(`div`,{style:{width:this.props.schema.width||`100%`,height:this.props.schema.height,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:_.createElement(Mt,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||`100%`,height:this.props.schema.height}})}};g();var aS=class extends X{constructor(e){super(e),K(this,`index`,void 0),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.attr&&this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port===`3000`&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{let t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(gn,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||262144,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(e=>console.error(e))}}),onChange:e=>this.setState({value:e},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else e.startsWith(`data`)&&(e=e.split(`,`)[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,e).catch(e=>console.error(e))}})}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var oS=class extends X{renderItem(){return _.createElement(qn,{type:this.props.schema.boxType||`info`,closeable:this.props.schema.closeable===void 0||this.props.schema.closeable,storeId:this.props.schema.closed===void 0?`${!!this.props.oContext.adapterName} ${this.props.attr}`:void 0,closed:this.props.schema.closed,style:{width:`100%`,...this.props.schema.style}},this.props.schema.title?_.createElement(vt,{component:`div`,sx:{fontWeight:`bold`,fontSize:`larger`}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}};g();var sS={icon:{width:20,height:20,marginRight:4}},cS=class extends X{constructor(...e){super(...e),K(this,`onInstancesUpdate`,(e,t)=>{var n;if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;let r=this.props.schema.long?e:this.props.schema.short?e.split(`.`).pop():e.replace(/^system\.adapter\./,``),i=((n=this.state.selectOptions)==null?void 0:n.findIndex(e=>e.value===r))??-1;if(t){if(this.props.schema.adapter===`_dataSources`&&(!t.common||!t.common.getHistory))return;if(i===-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),n=typeof t.common.name==`object`?t.common.name[J.getLanguage()]||t.common.name.en:t.common.name;e.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(`.`).pop()||``:t._id.replace(/^system\.adapter\./,``),label:`${n} [${t._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${n}/${t.common.icon}`}),e.sort((e,t)=>e.label>t.label?1:e.label<t.label?-1:0),this.setState({selectOptions:e})}}else if(i!==-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),t={};this.state.value===e[i].value&&(t.value=X.NONE_VALUE),e.splice(i,1),t.selectOptions=e,this.setState(t)}})}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.adapter;t===`_dataSources`&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter===`_dataSources`?n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.getHistory}):this.props.schema.adapter?n=n.filter(e=>e==null?void 0:e._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(e=>{var t,n;return(t=this.props.schema.adapters)==null?void 0:t.includes(e==null||(n=e.common)==null?void 0:n.name)})),this.props.schema.onlyEnabled&&(n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.enabled}));let r=n.map(e=>({value:this.props.schema.long?e._id:this.props.schema.short?e._id.split(`.`).pop()||``:e._id.replace(/^system\.adapter\./,``),label:`${e.common.name} [${e._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${e.common.name}/${e.common.icon}`}));r.sort((e,t)=>e.value>t.value?1:e.value<t.value?-1:0),this.props.schema.allowDeactivate!==!1&&r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.props.schema.all&&r.unshift({label:J.t(`sch_all`),value:`*`}),this.setState({value:e||``,selectOptions:r}),await this.props.oContext.socket.subscribeObject(`system.adapter.${t?`${t}.`:``}*`,this.onInstancesUpdate)}).catch(e=>console.error(`Cannot get instances: ${e}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject(`system.adapter.*`,this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}renderItem(e,t){var n;if(!this.state.selectOptions)return null;let r=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{fullWidth:!0,key:this.props.attr,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>_.createElement(`span`,{style:{display:`flex`}},r!=null&&r.icon?_.createElement(Mt,{src:`./${r.icon}`,style:sS.icon}):null,this.getText(r==null?void 0:r.label,!0)),onChange:e=>this.setState({value:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},e.icon?_.createElement(Mt,{src:`./${e.icon}`,style:sS.icon}):null,this.getText(e.label,!0)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var lS={address:{fontSize:`smaller`,opacity:.5,marginLeft:8}},uS=class extends X{async componentDidMount(){var e;if(await super.componentDidMount(),(e=this.props.common)!=null&&e.host)try{var t,n,r;let e=await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,`system.host.${this.props.common.host}`)),i=[];if(e!=null&&(r=e.native)!=null&&(r=r.hardware)!=null&&r.networkInterfaces){let t=e.native.hardware.networkInterfaces;Object.keys(t).forEach(e=>{var n,r,a,o;if(this.props.schema.ignoreInternal&&!((n=t[e])!=null&&n.find(e=>!e.internal))||this.props.schema.ignoreLoopback&&(r=t[e])!=null&&r.find(e=>e.address===`127.0.0.1`||e.address===`::1`))return;let s=(a=t[e])==null?void 0:a.find(e=>e.family===`IPv4`);s||=(o=t[e])==null?void 0:o.find(e=>e.family===`IPv6`),i.push({value:e,address:(s==null?void 0:s.address)||``})})}this.setState({interfaces:i})}catch(e){window.alert(`Cannot read interfaces: ${e}`)}}renderItem(e,t){var n,r,i;let a=X.getValue(this.props.data,this.props.attr),o=(n=this.state.interfaces)==null?void 0:n.find(e=>e.value===a);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},(r=this.state.interfaces)!=null&&r.length&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,(i=this.state.interfaces)!=null&&i.length?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:a,renderValue:e=>o?_.createElement(`span`,null,o.value,_.createElement(`span`,{style:lS.address},o.address)):e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},this.state.interfaces.map((e,t)=>_.createElement(z,{key:t,value:e.value},_.createElement(`span`,null,e.value,_.createElement(`span`,{style:lS.address},e.address))))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:a,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var dS={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:`absolute`,right:8,top:8},languageButtonActive:{color:`primary.main`}},fS=({toggleTranslation:e,noTranslation:t,title:n,fullWidth:r,help:i,maxWidth:o,progress:s,applyDisabled:c,applyButton:l,onClose:d,children:f,titleButtonApply:p,titleButtonClose:m,onApply:h,textInput:g,defaultValue:v,overflowHidden:y})=>{let[b,x]=u(v);a(()=>{x(v)},[v]);let S=ht(),C=be(S.breakpoints.down(`md`));return _.createElement(nn,{open:!0,maxWidth:C?!1:o||`md`,fullWidth:!!r,fullScreen:C,onClose:d,sx:{"& .MuiPaper-root":C?{}:dS.modalDialog}},n&&_.createElement(Nt,null,n,J.getLanguage()!==`en`&&e?_.createElement(Zn,{size:`large`,style:{...dS.languageButton,...t?dS.languageButtonActive:{}},onClick:()=>e(),title:J.t(`jc_Disable/Enable translation`)},_.createElement(Kn,null)):null),_.createElement(Tn,{sx:{...y?dS.overflowHidden:{},...dS.content},style:{paddingTop:8}},g&&_.createElement(ot,{autoComplete:`off`,fullWidth:!0,autoFocus:!0,variant:`outlined`,size:`medium`,multiline:!0,value:b,onChange:e=>x(e.target.value)}),f,i?_.createElement(`div`,null,i):null),_.createElement(Et,null,l!==!1&&_.createElement(xt,{startIcon:_.createElement(on,null),disabled:s||c&&v===b,onClick:()=>h==null?void 0:h(g&&b||``),variant:`contained`,color:`primary`},J.t(p||`jc_Ok`)),_.createElement(xt,{color:`grey`,onClick:()=>d&&d(),disabled:s,variant:`contained`,startIcon:_.createElement(De,null)},J.t(m||`jc_Cancel`))))},pS=n(r(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
|
|
19
19
|
/*# sourceURL=ace/css/`+n+` */`);var l=t.createElement(`style`);l.appendChild(c.createTextNode(e)),n&&(l.id=n),i==c&&(i=t.getDocumentHead(c)),i.insertBefore(l,i.firstChild)}}}if(t.importCssString=c,t.importCssStylsheet=function(e,n){t.buildDom([`link`,{rel:`stylesheet`,href:e}],t.getDocumentHead(n))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var n=parseFloat(e.style.left),r=+t.left;Math.abs(n-r)>1&&(e.style.left=2*n-r+`px`)}if(e.style.right){var n=parseFloat(e.style.right),r=window.innerWidth-t.right;Math.abs(n-r)>1&&(e.style.right=2*n-r+`px`)}if(e.style.top){var n=parseFloat(e.style.top),r=+t.top;Math.abs(n-r)>1&&(e.style.top=2*n-r+`px`)}if(e.style.bottom){var n=parseFloat(e.style.bottom),r=window.innerHeight-t.bottom;Math.abs(n-r)>1&&(e.style.bottom=2*n-r+`px`)}},t.scrollbarWidth=function(e){var n=t.createElement(`ace_inner`);n.style.width=`100%`,n.style.minWidth=`0px`,n.style.height=`200px`,n.style.display=`block`;var r=t.createElement(`ace_outer`),i=r.style;i.position=`absolute`,i.left=`-10000px`,i.overflow=`hidden`,i.width=`200px`,i.minWidth=`0px`,i.height=`150px`,i.display=`block`,r.appendChild(n);var a=e&&e.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(r);var o=n.offsetWidth;i.overflow=`scroll`;var s=n.offsetWidth;return o===s&&(s=r.clientWidth),a.removeChild(r),o-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,``)||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||typeof window<`u`&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),typeof document<`u`){var l=document.createElement(`div`);t.HI_DPI&&l.style.transform!==void 0&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&l.style.animationName!==void 0&&(t.HAS_CSS_ANIMATION=!0),l=null}t.translate=t.HAS_CSS_TRANSFORMS?function(e,t,n){e.style.transform=`translate(`+Math.round(t)+`px, `+Math.round(n)+`px)`}:function(e,t,n){e.style.top=Math.round(n)+`px`,e.style.left=Math.round(t)+`px`}}),ace.define(`ace/lib/net`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement(`script`);i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){(n||!i.readyState||i.readyState==`loaded`||i.readyState==`complete`)&&(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement(`a`);return t.href=e,t.href}}),ace.define(`ace/lib/oop`,[`require`,`exports`,`module`],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define(`ace/lib/event_emitter`,[`require`,`exports`,`module`],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||={},this._defaultHandlers||={};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!(!n.length&&!r)){(typeof t!=`object`||!t)&&(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=a),n=n.slice();for(var o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);if(r&&!t.defaultPrevented)return r(t,this)}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||=this._defaultHandlers={_disabled_:{}},n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var a=i.indexOf(t);a!=-1&&i.splice(a,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||=this._eventRegistry[e]=[],r.indexOf(t)==-1&&r[n?`unshift`:`push`](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define(`ace/lib/report_error`,[`require`,`exports`,`module`],function(e,t,n){t.reportError=function(e,t){var n=Error(e);n.data=t,typeof console==`object`&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define(`ace/lib/default_english_messages`,[`require`,`exports`,`module`],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":`Autocomplete suggestions`,"autocomplete.popup.aria-label":`Autocomplete suggestions`,"autocomplete.popup.item.aria-roledescription":`item`,"autocomplete.loading":`Loading...`,"editor.scroller.aria-roledescription":`editor`,"editor.scroller.aria-label":`Editor content, press Enter to start editing, press Escape to exit`,"editor.gutter.aria-roledescription":`editor gutter`,"editor.gutter.aria-label":`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`,"error-marker.good-state":`Looks good!`,"prompt.recently-used":`Recently used`,"prompt.other-commands":`Other commands`,"prompt.no-matching-commands":`No matching commands`,"search-box.find.placeholder":`Search for`,"search-box.find-all.text":`All`,"search-box.replace.placeholder":`Replace with`,"search-box.replace-next.text":`Replace`,"search-box.replace-all.text":`All`,"search-box.toggle-replace.title":`Toggle Replace mode`,"search-box.toggle-regexp.title":`RegExp Search`,"search-box.toggle-case.title":`CaseSensitive Search`,"search-box.toggle-whole-word.title":`Whole Word Search`,"search-box.toggle-in-selection.title":`Search In Selection`,"search-box.search-counter":`$0 of $1`,"text-input.aria-roledescription":`editor`,"text-input.aria-label":`Cursor at row $0`,"gutter.code-folding.range.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.closed.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.open.aria-label":`Toggle code folding, row $0`,"gutter.code-folding.closed.title":`Unfold code`,"gutter.code-folding.open.title":`Fold code`,"gutter.annotation.aria-label.error":`Error, read annotations row $0`,"gutter.annotation.aria-label.warning":`Warning, read annotations row $0`,"gutter.annotation.aria-label.info":`Info, read annotations row $0`,"inline-fold.closed.title":`Unfold code`,"gutter-tooltip.aria-label.error.singular":`error`,"gutter-tooltip.aria-label.error.plural":`errors`,"gutter-tooltip.aria-label.warning.singular":`warning`,"gutter-tooltip.aria-label.warning.plural":`warnings`,"gutter-tooltip.aria-label.info.singular":`information message`,"gutter-tooltip.aria-label.info.plural":`information messages`,"gutter.annotation.aria-label.security":`Security finding, read annotations row $0`,"gutter.annotation.aria-label.hint":`Suggestion, read annotations row $0`,"gutter-tooltip.aria-label.security.singular":`security finding`,"gutter-tooltip.aria-label.security.plural":`security findings`,"gutter-tooltip.aria-label.hint.singular":`suggestion`,"gutter-tooltip.aria-label.hint.plural":`suggestions`,"editor.tooltip.disable-editing":`Editing is disabled`}}),ace.define(`ace/lib/app_config`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/report_error`,`ace/lib/default_english_messages`],function(e,t,n){"no use strict";var r=e("./oop"),i=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,o=e("./default_english_messages").defaultEnglishMessages,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this[`$`+e]!==t){var n=this.$options[e];if(!n)return c(`misspelled option "`+e+`"`);if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this[`$`+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this[`$`+e]:c(`misspelled option "`+e+`"`)}};function c(e){typeof console<`u`&&console.warn&&console.warn.apply(console,arguments)}var l,u,d=function(){function e(){this.$defaultOptions={},l=o,u=`dollarSigns`}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r==`string`&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,`initialValue`in r&&(e[`$`+r.name]=r.initialValue)}),r.implement(e,s),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];`value`in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){l=e,t&&t.placeholders&&(u=t.placeholders)},e.prototype.nls=function(e,t,n){l[e]||(c(`No message found for the key '`+e+`' in messages with id `+l.$id+`, trying to find a translation for the default string '`+t+`'.`),l[t]||c(`No message found for the default string '`+t+`' in the provided messages. Falling back to the default English message.`));var r=l[e]||l[t]||t;return n&&(u===`dollarSigns`&&(r=r.replace(/\$(\$|[\d]+)/g,function(e,t){return t==`$`?`$`:n[t]})),u===`curlyBrackets`&&(r=r.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),r},e}();d.prototype.warn=c,d.prototype.reportError=a,r.implement(d.prototype,i),t.AppConfig=d}),ace.define(`ace/theme/textmate-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-tm .ace_gutter {
|
|
20
20
|
background: #f0f0f0;
|
|
21
21
|
color: #333;
|
|
@@ -993,16 +993,16 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
993
993
|
border-left-color: transparent!important;
|
|
994
994
|
top: -5px;
|
|
995
995
|
}
|
|
996
|
-
`,`error_marker.css`,!1)}),ace.define(`ace/ace`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/editor`,`ace/edit_session`,`ace/undomanager`,`ace/virtual_renderer`,`ace/worker/worker_client`,`ace/keyboard/hash_handler`,`ace/placeholder`,`ace/multi_select`,`ace/mode/folding/fold_mode`,`ace/theme/textmate`,`ace/ext/error_marker`,`ace/config`,`ace/loader_build`],function(e,t,n){e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,a=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if(typeof e==`string`){var i=e;if(e=document.getElementById(i),!e)throw Error(`ace.edit can't find div #`+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o=``;if(e&&/input|textarea/i.test(e.tagName)){var s=e;o=s.value,e=r.createElement(`pre`),s.parentNode.replaceChild(e,s)}else e&&(o=e.textContent,e.innerHTML=``);var l=t.createEditSession(o),u=new a(new c(e),l,n),d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),u.on(`destroy`,function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=a,t.EditSession=o,t.UndoManager=s,t.VirtualRenderer=c,t.version=t.config.version}),(function(){ace.require([`ace/ace`],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();for(var i in!r&&typeof window<`u`&&(r=window),!r&&typeof self<`u`&&(r=self),r.ace||(r.ace=n),n)n.hasOwnProperty(i)&&(r.ace[i]=n[i]);r.ace.default=r.ace,typeof t==`object`&&typeof e==`object`&&t&&(t.exports=r.ace)})})()}))(),1),sS=[`minLines`,`maxLines`,`readOnly`,`highlightActiveLine`,`tabSize`,`enableBasicAutocompletion`,`enableLiveAutocompletion`,`enableSnippets`],cS=[`onChange`,`onFocus`,`onInput`,`onBlur`,`onCopy`,`onPaste`,`onSelectionChange`,`onCursorChange`,`onScroll`,`handleOptions`,`updateRef`],lS=()=>{if(typeof window<`u`&&window.ace){let e=window.ace;return e.acequire=e.require||e.acequire,e}return oS.default},uS=(e,t)=>{let n=null;return function(){let r=this,i=arguments;clearTimeout(n),n=setTimeout(()=>{e.apply(r,i)},t)}},{getOwnPropertyNames:dS,getOwnPropertySymbols:fS}=Object,{hasOwnProperty:pS}=Object.prototype;function mS(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function hS(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function gS(e){return e==null?void 0:e[Symbol.toStringTag]}function _S(e){return dS(e).concat(fS(e))}var vS=Object.hasOwn||((e,t)=>pS.call(e,t));function yS(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var bS=`__v`,xS=`__o`,SS=`_owner`,{getOwnPropertyDescriptor:CS,keys:wS}=Object;function TS(e,t){return e.byteLength===t.byteLength&&RS(new Uint8Array(e),new Uint8Array(t))}function ES(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function DS(e,t){return e.byteLength===t.byteLength&&RS(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function OS(e,t){return yS(e.getTime(),t.getTime())}function kS(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function AS(e,t){return e===t}function jS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var MS=yS;function NS(e,t,n){let r=wS(e),i=r.length;if(wS(t).length!==i)return!1;for(;i-->0;)if(!BS(e,t,n,r[i]))return!1;return!0}function PS(e,t,n){let r=_S(e),i=r.length;if(_S(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!BS(e,t,n,a)||(o=CS(e,a),s=CS(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function FS(e,t){return yS(e.valueOf(),t.valueOf())}function IS(e,t){return e.source===t.source&&e.flags===t.flags}function LS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function RS(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function zS(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function BS(e,t,n,r){return(r===SS||r===xS||r===bS)&&(e.$$typeof||t.$$typeof)?!0:vS(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var VS=`[object ArrayBuffer]`,HS=`[object Arguments]`,US=`[object Boolean]`,WS=`[object DataView]`,GS=`[object Date]`,KS=`[object Error]`,qS=`[object Map]`,JS=`[object Number]`,YS=`[object Object]`,XS=`[object RegExp]`,ZS=`[object Set]`,QS=`[object String]`,$S={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},eC=`[object URL]`,tC=Object.prototype.toString;function nC({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=tC.call(h);if(b===GS)return r(h,g,_);if(b===XS)return u(h,g,_);if(b===qS)return o(h,g,_);if(b===ZS)return d(h,g,_);if(b===YS)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===eC)return p(h,g,_);if(b===KS)return i(h,g,_);if(b===HS)return c(h,g,_);if($S[b])return f(h,g,_);if(b===VS)return e(h,g,_);if(b===WS)return n(h,g,_);if(b===US||b===JS||b===QS)return l(h,g,_);if(m){let e=m[b];if(!e){let t=gS(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function rC({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:TS,areArraysEqual:n?PS:ES,areDataViewsEqual:DS,areDatesEqual:OS,areErrorsEqual:kS,areFunctionsEqual:AS,areMapsEqual:n?mS(jS,PS):jS,areNumbersEqual:MS,areObjectsEqual:n?PS:NS,arePrimitiveWrappersEqual:FS,areRegExpsEqual:IS,areSetsEqual:n?mS(LS,PS):LS,areTypedArraysEqual:n?mS(RS,PS):RS,areUrlsEqual:zS,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=hS(r.areArraysEqual),t=hS(r.areMapsEqual),n=hS(r.areObjectsEqual),i=hS(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function iC(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function aC({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var oC=sC();sC({strict:!0}),sC({circular:!0}),sC({circular:!0,strict:!0}),sC({createInternalComparator:()=>yS}),sC({strict:!0,createInternalComparator:()=>yS}),sC({circular:!0,createInternalComparator:()=>yS}),sC({circular:!0,createInternalComparator:()=>yS,strict:!0});function sC(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=nC(rC(e));return aC({circular:t,comparator:a,createState:r,equals:n?n(a):iC(a),strict:i})}var $=n(ge(),1);g();var cC=lS(),lC=class extends s{constructor(e){super(e),cS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=uS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,onValidate:n,mode:r,focus:i,theme:a,fontSize:o,lineHeight:s,value:c,defaultValue:l,showGutter:u,wrapEnabled:d,showPrintMargin:f,scrollMargin:p=[0,0,0,0],keyboardHandler:m,onLoad:h,commands:g,annotations:_,markers:v,placeholder:y}=this.props;this.editor=cC.edit(this.refEditor),t&&t(cC);let b=Object.keys(this.props.editorProps);for(let e=0;e<b.length;e++)this.editor[b[e]]=this.props.editorProps[b[e]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(p[0],p[1],p[2],p[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof r==`string`?`ace/mode/${r}`:r),a&&a!==``&&this.editor.setTheme(`ace/theme/${a}`),this.editor.setFontSize(typeof o==`number`?`${o}px`:o),s&&(this.editor.container.style.lineHeight=typeof s==`number`?`${s}px`:`${s}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(l||c||``),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(u),this.editor.getSession().setUseWrapMode(d),this.editor.setShowPrintMargin(f),this.editor.on(`focus`,this.onFocus),this.editor.on(`blur`,this.onBlur),this.editor.on(`copy`,this.onCopy),this.editor.on(`paste`,this.onPaste),this.editor.on(`change`,this.onChange),this.editor.on(`input`,this.onInput),y&&this.updatePlaceholder(),this.editor.getSession().selection.on(`changeSelection`,this.onSelectionChange),this.editor.getSession().selection.on(`changeCursor`,this.onCursorChange),n&&this.editor.getSession().on(`changeAnnotation`,()=>{let e=this.editor.getSession().getAnnotations();this.props.onValidate(e)}),this.editor.session.on(`changeScrollTop`,this.onScroll),this.editor.getSession().setAnnotations(_||[]),v&&v.length>0&&this.handleMarkers(v);let x=this.editor.$options;sS.forEach(e=>{x.hasOwnProperty(e)?this.editor.setOption(e,this.props[e]):this.props[e]&&console.warn(`ReactAce: editor option ${e} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(g)&&g.forEach(e=>{typeof e.exec==`string`?this.editor.commands.bindKey(e.bindKey,e.exec):this.editor.commands.addCommand(e)}),m&&this.editor.setKeyboardHandler(`ace/keyboard/`+m),e&&(this.refEditor.className+=` `+e),h&&h(this.editor),this.editor.resize(),i&&this.editor.focus()}componentDidUpdate(e){let t=e,n=this.props;for(let e=0;e<sS.length;e++){let r=sS[e];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}let r=this.editor&&n.value!=null&&this.editor.getValue()!==n.value;if(r){this.silent=!0;let e=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(e),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode(typeof n.mode==`string`?`ace/mode/${n.mode}`:n.mode),n.theme!==t.theme&&this.editor.setTheme(`ace/theme/`+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(typeof n.fontSize==`number`?`${n.fontSize}px`:n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof n.lineHeight==`number`?`${n.lineHeight}px`:n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),oC(n.setOptions,t.setOptions)||this.handleOptions(n),(r||!oC(n.annotations,t.annotations))&&this.editor.getSession().setAnnotations(n.annotations||[]);let i=t.markers||[],a=n.markers||[];oC(i,a)||this.handleMarkers(a),oC(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),(e.height!==this.props.height||e.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()}handleScrollMargins(e=[0,0,0,0]){this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])}componentWillUnmount(){this.editor&&=(this.editor.destroy(),null)}onChange(e){if(this.editor&&this.props.onChange&&!this.silent){let t=this.editor.getValue();this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=this.editor.getSelection();this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=this.editor.getSelection();this.props.onCursorChange(t,e)}}onInput(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()}onFocus(e){this.props.onFocus&&this.props.onFocus(e,this.editor)}onBlur(e){this.props.onBlur&&this.props.onBlur(e,this.editor)}onCopy({text:e}){this.props.onCopy&&this.props.onCopy(e)}onPaste({text:e}){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e){let t=Object.keys(e.setOptions);for(let n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])}handleMarkers(e){let t=this.editor.getSession().getMarkers(!0);for(let e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(let e in t)t.hasOwnProperty(e)&&t[e].clazz!==`ace_active-line`&&t[e].clazz!==`ace_selected-word`&&this.editor.getSession().removeMarker(t[e].id);e.forEach(({startRow:e,startCol:t,endRow:n,endCol:r,className:i,type:a,inFront:o=!1})=>{let s=new oS.Range(e,t,n,r);this.editor.getSession().addMarker(s,i,a,o)})}updatePlaceholder(){let e=this.editor,{placeholder:t}=this.props,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?(r=e.renderer.placeholderNode=document.createElement(`div`),r.textContent=t||``,r.className=`ace_comment ace_placeholder`,r.style.padding=`0 9px`,r.style.position=`absolute`,r.style.zIndex=`3`,e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};lC.propTypes={mode:$.default.oneOfType([$.default.string,$.default.object]),focus:$.default.bool,theme:$.default.string,name:$.default.string,className:$.default.string,height:$.default.string,width:$.default.string,fontSize:$.default.oneOfType([$.default.number,$.default.string]),lineHeight:$.default.oneOfType([$.default.number,$.default.string]),showGutter:$.default.bool,onChange:$.default.func,onCopy:$.default.func,onPaste:$.default.func,onFocus:$.default.func,onInput:$.default.func,onBlur:$.default.func,onScroll:$.default.func,value:$.default.string,defaultValue:$.default.string,onLoad:$.default.func,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,onValidate:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,debounceChangePeriod:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableSnippets:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),navigateToFileEnd:$.default.bool,commands:$.default.array,placeholder:$.default.string},lC.defaultProps={name:`ace-editor`,focus:!1,mode:``,theme:``,height:`500px`,width:`500px`,fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0};var uC=r(((e,t)=>{ace.define(`ace/split`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/editor`,`ace/virtual_renderer`,`ace/edit_session`],function(e,t,n){var r=e("./lib/oop");e("./lib/lang");var i=e("./lib/event_emitter").EventEmitter,a=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,c=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS=``,this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on(`focus`,function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement(`div`);e.className=this.$editorCSS,e.style.cssText=`position: absolute; top:0px; bottom:0px`,this.$container.appendChild(e);var t=new a(new o(e,this.$theme));return t.on(`focus`,function(){this._emit(`focus`,t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw`The number of splits have to be > 0!`;if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize=``,this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n=t==null?this.$cEditor:this.$editors[t];return this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+`px`,n.container.style.top=`0px`,n.container.style.left=i*r+`px`,n.container.style.height=t+`px`,n.resize();else for(var a=t/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+`px`,n.container.style.top=i*a+`px`,n.container.style.left=`0px`,n.container.style.height=a+`px`,n.resize()}}).call(c.prototype),t.Split=c}),ace.define(`ace/ext/split`,[`require`,`exports`,`module`,`ace/ext/split`,`ace/split`],function(e,t,n){n.exports=e("../split")}),(function(){ace.require([`ace/ext/split`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g();var dC=n(uC(),1),fC=lS(),{Split:pC}=dC.default,mC=class extends s{constructor(e){super(e),cS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=uS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,mode:n,focus:r,theme:i,fontSize:a,value:o,defaultValue:s,cursorStart:c,showGutter:l,wrapEnabled:u,showPrintMargin:d,scrollMargin:f=[0,0,0,0],keyboardHandler:p,onLoad:m,commands:h,annotations:g,markers:_,splits:v}=this.props;this.editor=fC.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${i}`),t&&t(fC);let y=Object.keys(this.props.editorProps),b=new pC(this.editor.container,`ace/theme/${i}`,v);this.editor.env.split=b,this.splitEditor=b.getEditor(0),this.split=b,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);let x=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),b.forEach((e,t)=>{for(let t=0;t<y.length;t++)e[y[t]]=this.props.editorProps[y[t]];let r=s==null?void 0:s[t],m=(o==null?void 0:o[t])??``;e.session.setUndoManager(new fC.UndoManager),e.setTheme(`ace/theme/${i}`),e.renderer.setScrollMargin(f[0],f[1],f[2],f[3]),e.getSession().setMode(`ace/mode/${n}`),e.setFontSize(a),e.renderer.setShowGutter(l),e.getSession().setUseWrapMode(u),e.setShowPrintMargin(d),e.on(`focus`,e=>this.onFocus(e,t)),e.on(`blur`,this.onBlur),e.on(`input`,this.onInput),e.on(`copy`,this.onCopy),e.on(`paste`,this.onPaste),e.on(`change`,this.onChange),e.getSession().selection.on(`changeSelection`,this.onSelectionChange),e.getSession().selection.on(`changeCursor`,this.onCursorChange),e.session.on(`changeScrollTop`,this.onScroll),e.setValue(r===void 0?m:r,c);let v=(g==null?void 0:g[t])??[],b=(_==null?void 0:_[t])??[];e.getSession().setAnnotations(v),b&&b.length>0&&this.handleMarkers(b,e);for(let t=0;t<sS.length;t++){let n=sS[t];x.hasOwnProperty(n)?e.setOption(n,this.props[n]):this.props[n]&&console.warn(`ReactAce: editor option ${n} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,e),Array.isArray(h)&&h.forEach(t=>{typeof t.exec==`string`?e.commands.bindKey(t.bindKey,t.exec):e.commands.addCommand(t)}),p&&e.setKeyboardHandler(`ace/keyboard/`+p)}),e&&(this.refEditor.className+=` `+e),r&&this.splitEditor.focus();let S=this.editor.env.split;S.setOrientation(this.props.orientation===`below`?S.BELOW:S.BESIDE),S.resize(!0),m&&m(S)}componentDidUpdate(e){let t=e,n=this.props,r=this.editor.env.split;if(n.splits!==t.splits&&r.setSplits(n.splits),n.orientation!==t.orientation&&r.setOrientation(n.orientation===`below`?r.BELOW:r.BESIDE),r.forEach((e,r)=>{var i,a,o,s,c;n.mode!==t.mode&&e.getSession().setMode(`ace/mode/`+n.mode),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let r=0;r<sS.length;r++){let i=sS[r];n[i]!==t[i]&&e.setOption(i,n[i])}oC(n.setOptions,t.setOptions)||this.handleOptions(n,e);let l=((i=n.value)==null?void 0:i[r])??``;if(e.getValue()!==l){this.silent=!0;let t=e.session.selection.toJSON();e.setValue(l,n.cursorStart),e.session.selection.fromJSON(t),this.silent=!1}let u=((a=n.annotations)==null?void 0:a[r])??[];oC(u,((o=t.annotations)==null?void 0:o[r])??[])||e.getSession().setAnnotations(u);let d=((s=n.markers)==null?void 0:s[r])??[];!oC(d,((c=t.markers)==null?void 0:c[r])??[])&&Array.isArray(d)&&this.handleMarkers(d,e)}),n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}n.theme!==t.theme&&r.setTheme(`ace/theme/`+n.theme),n.focus&&!t.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(e){if(this.props.onChange&&!this.silent){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getValue())}),this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onCursorChange(t,e)}}onFocus(e,t){this.props.onFocus&&this.props.onFocus(e,t)}onInput(e){this.props.onInput&&this.props.onInput(e)}onBlur(e){this.props.onBlur&&this.props.onBlur(e)}onCopy(e){this.props.onCopy&&this.props.onCopy(e)}onPaste(e){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e,t){let n=Object.keys(e.setOptions);for(let r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])}handleMarkers(e,t){let n=t.getSession().getMarkers(!0);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);n=t.getSession().getMarkers(!1);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);e.forEach(({startRow:e,startCol:n,endRow:r,endCol:i,className:a,type:o,inFront:s=!1})=>{let c=new oS.Range(e,n,r,i);t.getSession().addMarker(c,a,o,s)})}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};mC.propTypes={className:$.default.string,debounceChangePeriod:$.default.number,defaultValue:$.default.arrayOf($.default.string),focus:$.default.bool,fontSize:$.default.oneOfType([$.default.number,$.default.string]),height:$.default.string,mode:$.default.string,name:$.default.string,onBlur:$.default.func,onChange:$.default.func,onCopy:$.default.func,onFocus:$.default.func,onInput:$.default.func,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,orientation:$.default.string,showGutter:$.default.bool,splits:$.default.number,theme:$.default.string,value:$.default.arrayOf($.default.string),width:$.default.string,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),commands:$.default.array},mC.defaultProps={name:`ace-editor`,focus:!1,orientation:`beside`,splits:2,mode:``,theme:``,height:`500px`,width:`500px`,value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};var hC=r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
996
|
+
`,`error_marker.css`,!1)}),ace.define(`ace/ace`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/editor`,`ace/edit_session`,`ace/undomanager`,`ace/virtual_renderer`,`ace/worker/worker_client`,`ace/keyboard/hash_handler`,`ace/placeholder`,`ace/multi_select`,`ace/mode/folding/fold_mode`,`ace/theme/textmate`,`ace/ext/error_marker`,`ace/config`,`ace/loader_build`],function(e,t,n){e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,a=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if(typeof e==`string`){var i=e;if(e=document.getElementById(i),!e)throw Error(`ace.edit can't find div #`+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o=``;if(e&&/input|textarea/i.test(e.tagName)){var s=e;o=s.value,e=r.createElement(`pre`),s.parentNode.replaceChild(e,s)}else e&&(o=e.textContent,e.innerHTML=``);var l=t.createEditSession(o),u=new a(new c(e),l,n),d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),u.on(`destroy`,function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=a,t.EditSession=o,t.UndoManager=s,t.VirtualRenderer=c,t.version=t.config.version}),(function(){ace.require([`ace/ace`],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();for(var i in!r&&typeof window<`u`&&(r=window),!r&&typeof self<`u`&&(r=self),r.ace||(r.ace=n),n)n.hasOwnProperty(i)&&(r.ace[i]=n[i]);r.ace.default=r.ace,typeof t==`object`&&typeof e==`object`&&t&&(t.exports=r.ace)})})()}))(),1),mS=[`minLines`,`maxLines`,`readOnly`,`highlightActiveLine`,`tabSize`,`enableBasicAutocompletion`,`enableLiveAutocompletion`,`enableSnippets`],hS=[`onChange`,`onFocus`,`onInput`,`onBlur`,`onCopy`,`onPaste`,`onSelectionChange`,`onCursorChange`,`onScroll`,`handleOptions`,`updateRef`],gS=()=>{if(typeof window<`u`&&window.ace){let e=window.ace;return e.acequire=e.require||e.acequire,e}return pS.default},_S=(e,t)=>{let n=null;return function(){let r=this,i=arguments;clearTimeout(n),n=setTimeout(()=>{e.apply(r,i)},t)}},{getOwnPropertyNames:vS,getOwnPropertySymbols:yS}=Object,{hasOwnProperty:bS}=Object.prototype;function xS(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function SS(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function CS(e){return e==null?void 0:e[Symbol.toStringTag]}function wS(e){return vS(e).concat(yS(e))}var TS=Object.hasOwn||((e,t)=>bS.call(e,t));function ES(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var DS=`__v`,OS=`__o`,kS=`_owner`,{getOwnPropertyDescriptor:AS,keys:jS}=Object;function MS(e,t){return e.byteLength===t.byteLength&&GS(new Uint8Array(e),new Uint8Array(t))}function NS(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function PS(e,t){return e.byteLength===t.byteLength&&GS(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function FS(e,t){return ES(e.getTime(),t.getTime())}function IS(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function LS(e,t){return e===t}function RS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var zS=ES;function BS(e,t,n){let r=jS(e),i=r.length;if(jS(t).length!==i)return!1;for(;i-->0;)if(!qS(e,t,n,r[i]))return!1;return!0}function VS(e,t,n){let r=wS(e),i=r.length;if(wS(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!qS(e,t,n,a)||(o=AS(e,a),s=AS(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function HS(e,t){return ES(e.valueOf(),t.valueOf())}function US(e,t){return e.source===t.source&&e.flags===t.flags}function WS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function GS(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function KS(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function qS(e,t,n,r){return(r===kS||r===OS||r===DS)&&(e.$$typeof||t.$$typeof)?!0:TS(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var JS=`[object ArrayBuffer]`,YS=`[object Arguments]`,XS=`[object Boolean]`,ZS=`[object DataView]`,QS=`[object Date]`,$S=`[object Error]`,eC=`[object Map]`,tC=`[object Number]`,nC=`[object Object]`,rC=`[object RegExp]`,iC=`[object Set]`,aC=`[object String]`,oC={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},sC=`[object URL]`,cC=Object.prototype.toString;function lC({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=cC.call(h);if(b===QS)return r(h,g,_);if(b===rC)return u(h,g,_);if(b===eC)return o(h,g,_);if(b===iC)return d(h,g,_);if(b===nC)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===sC)return p(h,g,_);if(b===$S)return i(h,g,_);if(b===YS)return c(h,g,_);if(oC[b])return f(h,g,_);if(b===JS)return e(h,g,_);if(b===ZS)return n(h,g,_);if(b===XS||b===tC||b===aC)return l(h,g,_);if(m){let e=m[b];if(!e){let t=CS(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function uC({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:MS,areArraysEqual:n?VS:NS,areDataViewsEqual:PS,areDatesEqual:FS,areErrorsEqual:IS,areFunctionsEqual:LS,areMapsEqual:n?xS(RS,VS):RS,areNumbersEqual:zS,areObjectsEqual:n?VS:BS,arePrimitiveWrappersEqual:HS,areRegExpsEqual:US,areSetsEqual:n?xS(WS,VS):WS,areTypedArraysEqual:n?xS(GS,VS):GS,areUrlsEqual:KS,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=SS(r.areArraysEqual),t=SS(r.areMapsEqual),n=SS(r.areObjectsEqual),i=SS(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function dC(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function fC({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var pC=mC();mC({strict:!0}),mC({circular:!0}),mC({circular:!0,strict:!0}),mC({createInternalComparator:()=>ES}),mC({strict:!0,createInternalComparator:()=>ES}),mC({circular:!0,createInternalComparator:()=>ES}),mC({circular:!0,createInternalComparator:()=>ES,strict:!0});function mC(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=lC(uC(e));return fC({circular:t,comparator:a,createState:r,equals:n?n(a):dC(a),strict:i})}var $=n(ge(),1);g();var hC=gS(),gC=class extends s{constructor(e){super(e),hS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=_S}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,onValidate:n,mode:r,focus:i,theme:a,fontSize:o,lineHeight:s,value:c,defaultValue:l,showGutter:u,wrapEnabled:d,showPrintMargin:f,scrollMargin:p=[0,0,0,0],keyboardHandler:m,onLoad:h,commands:g,annotations:_,markers:v,placeholder:y}=this.props;this.editor=hC.edit(this.refEditor),t&&t(hC);let b=Object.keys(this.props.editorProps);for(let e=0;e<b.length;e++)this.editor[b[e]]=this.props.editorProps[b[e]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(p[0],p[1],p[2],p[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof r==`string`?`ace/mode/${r}`:r),a&&a!==``&&this.editor.setTheme(`ace/theme/${a}`),this.editor.setFontSize(typeof o==`number`?`${o}px`:o),s&&(this.editor.container.style.lineHeight=typeof s==`number`?`${s}px`:`${s}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(l||c||``),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(u),this.editor.getSession().setUseWrapMode(d),this.editor.setShowPrintMargin(f),this.editor.on(`focus`,this.onFocus),this.editor.on(`blur`,this.onBlur),this.editor.on(`copy`,this.onCopy),this.editor.on(`paste`,this.onPaste),this.editor.on(`change`,this.onChange),this.editor.on(`input`,this.onInput),y&&this.updatePlaceholder(),this.editor.getSession().selection.on(`changeSelection`,this.onSelectionChange),this.editor.getSession().selection.on(`changeCursor`,this.onCursorChange),n&&this.editor.getSession().on(`changeAnnotation`,()=>{let e=this.editor.getSession().getAnnotations();this.props.onValidate(e)}),this.editor.session.on(`changeScrollTop`,this.onScroll),this.editor.getSession().setAnnotations(_||[]),v&&v.length>0&&this.handleMarkers(v);let x=this.editor.$options;mS.forEach(e=>{x.hasOwnProperty(e)?this.editor.setOption(e,this.props[e]):this.props[e]&&console.warn(`ReactAce: editor option ${e} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(g)&&g.forEach(e=>{typeof e.exec==`string`?this.editor.commands.bindKey(e.bindKey,e.exec):this.editor.commands.addCommand(e)}),m&&this.editor.setKeyboardHandler(`ace/keyboard/`+m),e&&(this.refEditor.className+=` `+e),h&&h(this.editor),this.editor.resize(),i&&this.editor.focus()}componentDidUpdate(e){let t=e,n=this.props;for(let e=0;e<mS.length;e++){let r=mS[e];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}let r=this.editor&&n.value!=null&&this.editor.getValue()!==n.value;if(r){this.silent=!0;let e=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(e),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode(typeof n.mode==`string`?`ace/mode/${n.mode}`:n.mode),n.theme!==t.theme&&this.editor.setTheme(`ace/theme/`+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(typeof n.fontSize==`number`?`${n.fontSize}px`:n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof n.lineHeight==`number`?`${n.lineHeight}px`:n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),pC(n.setOptions,t.setOptions)||this.handleOptions(n),(r||!pC(n.annotations,t.annotations))&&this.editor.getSession().setAnnotations(n.annotations||[]);let i=t.markers||[],a=n.markers||[];pC(i,a)||this.handleMarkers(a),pC(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),(e.height!==this.props.height||e.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()}handleScrollMargins(e=[0,0,0,0]){this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])}componentWillUnmount(){this.editor&&=(this.editor.destroy(),null)}onChange(e){if(this.editor&&this.props.onChange&&!this.silent){let t=this.editor.getValue();this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=this.editor.getSelection();this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=this.editor.getSelection();this.props.onCursorChange(t,e)}}onInput(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()}onFocus(e){this.props.onFocus&&this.props.onFocus(e,this.editor)}onBlur(e){this.props.onBlur&&this.props.onBlur(e,this.editor)}onCopy({text:e}){this.props.onCopy&&this.props.onCopy(e)}onPaste({text:e}){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e){let t=Object.keys(e.setOptions);for(let n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])}handleMarkers(e){let t=this.editor.getSession().getMarkers(!0);for(let e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(let e in t)t.hasOwnProperty(e)&&t[e].clazz!==`ace_active-line`&&t[e].clazz!==`ace_selected-word`&&this.editor.getSession().removeMarker(t[e].id);e.forEach(({startRow:e,startCol:t,endRow:n,endCol:r,className:i,type:a,inFront:o=!1})=>{let s=new pS.Range(e,t,n,r);this.editor.getSession().addMarker(s,i,a,o)})}updatePlaceholder(){let e=this.editor,{placeholder:t}=this.props,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?(r=e.renderer.placeholderNode=document.createElement(`div`),r.textContent=t||``,r.className=`ace_comment ace_placeholder`,r.style.padding=`0 9px`,r.style.position=`absolute`,r.style.zIndex=`3`,e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};gC.propTypes={mode:$.default.oneOfType([$.default.string,$.default.object]),focus:$.default.bool,theme:$.default.string,name:$.default.string,className:$.default.string,height:$.default.string,width:$.default.string,fontSize:$.default.oneOfType([$.default.number,$.default.string]),lineHeight:$.default.oneOfType([$.default.number,$.default.string]),showGutter:$.default.bool,onChange:$.default.func,onCopy:$.default.func,onPaste:$.default.func,onFocus:$.default.func,onInput:$.default.func,onBlur:$.default.func,onScroll:$.default.func,value:$.default.string,defaultValue:$.default.string,onLoad:$.default.func,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,onValidate:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,debounceChangePeriod:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableSnippets:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),navigateToFileEnd:$.default.bool,commands:$.default.array,placeholder:$.default.string},gC.defaultProps={name:`ace-editor`,focus:!1,mode:``,theme:``,height:`500px`,width:`500px`,fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0};var _C=r(((e,t)=>{ace.define(`ace/split`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/editor`,`ace/virtual_renderer`,`ace/edit_session`],function(e,t,n){var r=e("./lib/oop");e("./lib/lang");var i=e("./lib/event_emitter").EventEmitter,a=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,c=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS=``,this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on(`focus`,function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement(`div`);e.className=this.$editorCSS,e.style.cssText=`position: absolute; top:0px; bottom:0px`,this.$container.appendChild(e);var t=new a(new o(e,this.$theme));return t.on(`focus`,function(){this._emit(`focus`,t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw`The number of splits have to be > 0!`;if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize=``,this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n=t==null?this.$cEditor:this.$editors[t];return this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+`px`,n.container.style.top=`0px`,n.container.style.left=i*r+`px`,n.container.style.height=t+`px`,n.resize();else for(var a=t/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+`px`,n.container.style.top=i*a+`px`,n.container.style.left=`0px`,n.container.style.height=a+`px`,n.resize()}}).call(c.prototype),t.Split=c}),ace.define(`ace/ext/split`,[`require`,`exports`,`module`,`ace/ext/split`,`ace/split`],function(e,t,n){n.exports=e("../split")}),(function(){ace.require([`ace/ext/split`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g();var vC=n(_C(),1),yC=gS(),{Split:bC}=vC.default,xC=class extends s{constructor(e){super(e),hS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=_S}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,mode:n,focus:r,theme:i,fontSize:a,value:o,defaultValue:s,cursorStart:c,showGutter:l,wrapEnabled:u,showPrintMargin:d,scrollMargin:f=[0,0,0,0],keyboardHandler:p,onLoad:m,commands:h,annotations:g,markers:_,splits:v}=this.props;this.editor=yC.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${i}`),t&&t(yC);let y=Object.keys(this.props.editorProps),b=new bC(this.editor.container,`ace/theme/${i}`,v);this.editor.env.split=b,this.splitEditor=b.getEditor(0),this.split=b,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);let x=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),b.forEach((e,t)=>{for(let t=0;t<y.length;t++)e[y[t]]=this.props.editorProps[y[t]];let r=s==null?void 0:s[t],m=(o==null?void 0:o[t])??``;e.session.setUndoManager(new yC.UndoManager),e.setTheme(`ace/theme/${i}`),e.renderer.setScrollMargin(f[0],f[1],f[2],f[3]),e.getSession().setMode(`ace/mode/${n}`),e.setFontSize(a),e.renderer.setShowGutter(l),e.getSession().setUseWrapMode(u),e.setShowPrintMargin(d),e.on(`focus`,e=>this.onFocus(e,t)),e.on(`blur`,this.onBlur),e.on(`input`,this.onInput),e.on(`copy`,this.onCopy),e.on(`paste`,this.onPaste),e.on(`change`,this.onChange),e.getSession().selection.on(`changeSelection`,this.onSelectionChange),e.getSession().selection.on(`changeCursor`,this.onCursorChange),e.session.on(`changeScrollTop`,this.onScroll),e.setValue(r===void 0?m:r,c);let v=(g==null?void 0:g[t])??[],b=(_==null?void 0:_[t])??[];e.getSession().setAnnotations(v),b&&b.length>0&&this.handleMarkers(b,e);for(let t=0;t<mS.length;t++){let n=mS[t];x.hasOwnProperty(n)?e.setOption(n,this.props[n]):this.props[n]&&console.warn(`ReactAce: editor option ${n} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,e),Array.isArray(h)&&h.forEach(t=>{typeof t.exec==`string`?e.commands.bindKey(t.bindKey,t.exec):e.commands.addCommand(t)}),p&&e.setKeyboardHandler(`ace/keyboard/`+p)}),e&&(this.refEditor.className+=` `+e),r&&this.splitEditor.focus();let S=this.editor.env.split;S.setOrientation(this.props.orientation===`below`?S.BELOW:S.BESIDE),S.resize(!0),m&&m(S)}componentDidUpdate(e){let t=e,n=this.props,r=this.editor.env.split;if(n.splits!==t.splits&&r.setSplits(n.splits),n.orientation!==t.orientation&&r.setOrientation(n.orientation===`below`?r.BELOW:r.BESIDE),r.forEach((e,r)=>{var i,a,o,s,c;n.mode!==t.mode&&e.getSession().setMode(`ace/mode/`+n.mode),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let r=0;r<mS.length;r++){let i=mS[r];n[i]!==t[i]&&e.setOption(i,n[i])}pC(n.setOptions,t.setOptions)||this.handleOptions(n,e);let l=((i=n.value)==null?void 0:i[r])??``;if(e.getValue()!==l){this.silent=!0;let t=e.session.selection.toJSON();e.setValue(l,n.cursorStart),e.session.selection.fromJSON(t),this.silent=!1}let u=((a=n.annotations)==null?void 0:a[r])??[];pC(u,((o=t.annotations)==null?void 0:o[r])??[])||e.getSession().setAnnotations(u);let d=((s=n.markers)==null?void 0:s[r])??[];!pC(d,((c=t.markers)==null?void 0:c[r])??[])&&Array.isArray(d)&&this.handleMarkers(d,e)}),n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}n.theme!==t.theme&&r.setTheme(`ace/theme/`+n.theme),n.focus&&!t.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(e){if(this.props.onChange&&!this.silent){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getValue())}),this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onCursorChange(t,e)}}onFocus(e,t){this.props.onFocus&&this.props.onFocus(e,t)}onInput(e){this.props.onInput&&this.props.onInput(e)}onBlur(e){this.props.onBlur&&this.props.onBlur(e)}onCopy(e){this.props.onCopy&&this.props.onCopy(e)}onPaste(e){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e,t){let n=Object.keys(e.setOptions);for(let r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])}handleMarkers(e,t){let n=t.getSession().getMarkers(!0);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);n=t.getSession().getMarkers(!1);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);e.forEach(({startRow:e,startCol:n,endRow:r,endCol:i,className:a,type:o,inFront:s=!1})=>{let c=new pS.Range(e,n,r,i);t.getSession().addMarker(c,a,o,s)})}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};xC.propTypes={className:$.default.string,debounceChangePeriod:$.default.number,defaultValue:$.default.arrayOf($.default.string),focus:$.default.bool,fontSize:$.default.oneOfType([$.default.number,$.default.string]),height:$.default.string,mode:$.default.string,name:$.default.string,onBlur:$.default.func,onChange:$.default.func,onCopy:$.default.func,onFocus:$.default.func,onInput:$.default.func,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,orientation:$.default.string,showGutter:$.default.bool,splits:$.default.number,theme:$.default.string,value:$.default.arrayOf($.default.string),width:$.default.string,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),commands:$.default.array},xC.defaultProps={name:`ace-editor`,focus:!1,orientation:`beside`,splits:2,mode:``,theme:``,height:`500px`,width:`500px`,value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};var SC=r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
997
997
|
`,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&`).replace(o,`<`).replace(s,`>`).replace(c,`¶<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o){if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p)}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
|
|
998
998
|
`),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
|
|
999
999
|
`],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `}n[s+1]=o+encodeURI(this.diffs[s][1])+`
|
|
1000
|
-
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}));g();var
|
|
1000
|
+
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}));g();var CC=n(SC(),1),wC=class extends s{constructor(e){super(e),this.state={value:this.props.value},this.onChange=this.onChange.bind(this),this.diff=this.diff.bind(this)}componentDidUpdate(){let{value:e}=this.props;e!==this.state.value&&this.setState({value:e})}onChange(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}diff(){let e=new CC.default,t=this.state.value[0],n=this.state.value[1];if(t.length===0&&n.length===0)return[];let r=e.diff_main(t,n);e.diff_cleanupSemantic(r);let i=this.generateDiffedLines(r);return this.setCodeMarkers(i)}generateDiffedLines(e){let t={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},n={left:[],right:[]},r={left:1,right:1};return e.forEach(e=>{let i=e[0],a=e[1],o=a.split(`
|
|
1001
1001
|
`).length-1;if(a.length===0)return;let s=a[0],c=a[a.length-1],l=0;switch(i){case t.DIFF_EQUAL:r.left+=o,r.right+=o;break;case t.DIFF_DELETE:s===`
|
|
1002
1002
|
`&&(r.left++,o--),l=o,l===0&&n.right.push({startLine:r.right,endLine:r.right}),c===`
|
|
1003
1003
|
`&&--l,n.left.push({startLine:r.left,endLine:r.left+l}),r.left+=o;break;case t.DIFF_INSERT:s===`
|
|
1004
1004
|
`&&(r.right++,o--),l=o,l===0&&n.left.push({startLine:r.left,endLine:r.left}),c===`
|
|
1005
|
-
`&&--l,n.right.push({startLine:r.right,endLine:r.right+l}),r.right+=o;break;default:throw Error(`Diff type was not defined.`)}}),n}setCodeMarkers(e={left:[],right:[]}){let t=[],n={left:[],right:[]};for(let t=0;t<e.left.length;t++){let r={startRow:e.left[t].startLine-1,endRow:e.left[t].endLine,type:`text`,className:`codeMarker`};n.left.push(r)}for(let t=0;t<e.right.length;t++){let r={startRow:e.right[t].startLine-1,endRow:e.right[t].endLine,type:`text`,className:`codeMarker`};n.right.push(r)}return t[0]=n.left,t[1]=n.right,t}render(){let e=this.diff();return w(mC,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})}};_C.propTypes={cursorStart:$.default.number,editorProps:$.default.object,enableBasicAutocompletion:$.default.bool,enableLiveAutocompletion:$.default.bool,focus:$.default.bool,fontSize:$.default.number,height:$.default.string,highlightActiveLine:$.default.bool,maxLines:$.default.number,minLines:$.default.number,mode:$.default.string,name:$.default.string,className:$.default.string,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,onChange:$.default.func,orientation:$.default.string,readOnly:$.default.bool,scrollMargin:$.default.array,setOptions:$.default.object,showGutter:$.default.bool,showPrintMargin:$.default.bool,splits:$.default.number,style:$.default.object,tabSize:$.default.number,theme:$.default.string,value:$.default.array,width:$.default.string,wrapEnabled:$.default.bool},_C.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:`500px`,highlightActiveLine:!0,maxLines:null,minLines:null,mode:``,name:`ace-editor`,onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:`beside`,readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:`github`,value:[``,``],width:`500px`,wrapEnabled:!0};var vC=lC,yC=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json_highlight_rules`).JsonHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/json_worker`,`JsonWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/json`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/json`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),bC=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/json5_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/json_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./json_highlight_rules`).JsonHighlightRules,a=function(){i.call(this);var e=[{token:`variable`,regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:`variable`,regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:`constant.language.boolean`,regex:/(?:null)\b/},{token:`string`,regex:/'/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/'|$/,next:`start`},{defaultToken:`string`}]},{token:`string`,regex:/"(?![^"]*":)/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/"|$/,next:`start`},{defaultToken:`string`}]},{token:`constant.numeric`,regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(a,i),t.Json5HighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json5`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json5_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json5_highlight_rules`).Json5HighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(c,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id=`ace/mode/json5`}.call(c.prototype),t.Mode=c}),(function(){ace.require([`ace/mode/json5`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),xC=r(((e,t)=>{ace.define(`ace/mode/yaml_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`comment`,regex:`#.*$`},{token:`list.markup`,regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:`list.markup`,regex:/^\s*[\-?](?:$|\s)/},{token:`constant`,regex:`!![\\w//]+`},{token:`constant.language`,regex:`[&\\*][a-zA-Z0-9-_]+`},{token:[`meta.tag`,`keyword`],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:[`meta.tag`,`keyword`],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:`keyword.operator`,regex:`<<\\w*:\\w*`},{token:`keyword.operator`,regex:`-\\s*(?=[{])`},{token:`string`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]`},{token:`string`,regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,``);var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,``).length,a=parseInt(/\d+[\s+-]*$/.exec(r));return a?(i+=a-1,this.next=`mlString`):this.next=`mlStringPre`,n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:`mlString`},{token:`string`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`constant.numeric`,regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:`constant.numeric`,regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:`constant.language.boolean`,regex:`\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`text`,regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]=`mlString`),this.token},next:`mlString`},{defaultToken:`string`}],mlString:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.splice(0)):this.next=`mlString`,this.token},next:`mlString`},{token:`string`,regex:`.+`}]},this.normalizeRules()};r.inherits(a,i),t.YamlHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/coffee`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/fold_mode`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./fold_mode`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i!=-1&&r[i]==`#`){for(var o=r.length,s=e.getLength(),c=t,l=t;++t<s;){r=e.getLine(t);var u=r.search(n);if(u!=-1){if(r[u]!=`#`)break;l=t}}if(l>c){var d=e.getLine(l).length;return new a(c,o,l,d)}}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r||(r=this.commentBlock(e,n),r))return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/folding/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/coffee`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./coffee`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=/\S/,i=e.getLine(n),o=i.search(r),s=i[o]===`#`,c=i[o]===`-`;if(o!=-1){var l=i.length,u=e.getLength(),d=n,f=n;if(s){var p=this.commentBlock(e,n);if(p)return p}else if(c){var p=this.indentationBlock(e,n);if(p)return p}else for(;++n<u;){var i=e.getLine(n),m=i.search(r);if(m!=-1){if(m<=o&&i[o]!==`-`){var h=e.getTokenAt(n,0);if(!h||h.type!==`string`)break}f=n}}if(f>d){var g=e.getLine(f).length;return new a(d,l,f,g)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/),l=r[i]===`-`;if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i||s!=-1&&s==i&&l?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/yaml_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/yaml`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./yaml_highlight_rules`).YamlHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/yaml`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.lineCommentStart=[`#`],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/yaml_worker`,`YamlWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/yaml`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/yaml`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),SC=r(((e,t)=>{ace.define(`ace/theme/clouds_midnight-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-clouds-midnight .ace_gutter {
|
|
1005
|
+
`&&--l,n.right.push({startLine:r.right,endLine:r.right+l}),r.right+=o;break;default:throw Error(`Diff type was not defined.`)}}),n}setCodeMarkers(e={left:[],right:[]}){let t=[],n={left:[],right:[]};for(let t=0;t<e.left.length;t++){let r={startRow:e.left[t].startLine-1,endRow:e.left[t].endLine,type:`text`,className:`codeMarker`};n.left.push(r)}for(let t=0;t<e.right.length;t++){let r={startRow:e.right[t].startLine-1,endRow:e.right[t].endLine,type:`text`,className:`codeMarker`};n.right.push(r)}return t[0]=n.left,t[1]=n.right,t}render(){let e=this.diff();return w(xC,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})}};wC.propTypes={cursorStart:$.default.number,editorProps:$.default.object,enableBasicAutocompletion:$.default.bool,enableLiveAutocompletion:$.default.bool,focus:$.default.bool,fontSize:$.default.number,height:$.default.string,highlightActiveLine:$.default.bool,maxLines:$.default.number,minLines:$.default.number,mode:$.default.string,name:$.default.string,className:$.default.string,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,onChange:$.default.func,orientation:$.default.string,readOnly:$.default.bool,scrollMargin:$.default.array,setOptions:$.default.object,showGutter:$.default.bool,showPrintMargin:$.default.bool,splits:$.default.number,style:$.default.object,tabSize:$.default.number,theme:$.default.string,value:$.default.array,width:$.default.string,wrapEnabled:$.default.bool},wC.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:`500px`,highlightActiveLine:!0,maxLines:null,minLines:null,mode:``,name:`ace-editor`,onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:`beside`,readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:`github`,value:[``,``],width:`500px`,wrapEnabled:!0};var TC=gC,EC=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json_highlight_rules`).JsonHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/json_worker`,`JsonWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/json`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/json`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),DC=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/json5_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/json_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./json_highlight_rules`).JsonHighlightRules,a=function(){i.call(this);var e=[{token:`variable`,regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:`variable`,regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:`constant.language.boolean`,regex:/(?:null)\b/},{token:`string`,regex:/'/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/'|$/,next:`start`},{defaultToken:`string`}]},{token:`string`,regex:/"(?![^"]*":)/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/"|$/,next:`start`},{defaultToken:`string`}]},{token:`constant.numeric`,regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(a,i),t.Json5HighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json5`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json5_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json5_highlight_rules`).Json5HighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(c,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id=`ace/mode/json5`}.call(c.prototype),t.Mode=c}),(function(){ace.require([`ace/mode/json5`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),OC=r(((e,t)=>{ace.define(`ace/mode/yaml_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`comment`,regex:`#.*$`},{token:`list.markup`,regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:`list.markup`,regex:/^\s*[\-?](?:$|\s)/},{token:`constant`,regex:`!![\\w//]+`},{token:`constant.language`,regex:`[&\\*][a-zA-Z0-9-_]+`},{token:[`meta.tag`,`keyword`],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:[`meta.tag`,`keyword`],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:`keyword.operator`,regex:`<<\\w*:\\w*`},{token:`keyword.operator`,regex:`-\\s*(?=[{])`},{token:`string`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]`},{token:`string`,regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,``);var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,``).length,a=parseInt(/\d+[\s+-]*$/.exec(r));return a?(i+=a-1,this.next=`mlString`):this.next=`mlStringPre`,n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:`mlString`},{token:`string`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`constant.numeric`,regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:`constant.numeric`,regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:`constant.language.boolean`,regex:`\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`text`,regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]=`mlString`),this.token},next:`mlString`},{defaultToken:`string`}],mlString:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.splice(0)):this.next=`mlString`,this.token},next:`mlString`},{token:`string`,regex:`.+`}]},this.normalizeRules()};r.inherits(a,i),t.YamlHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/coffee`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/fold_mode`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./fold_mode`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i!=-1&&r[i]==`#`){for(var o=r.length,s=e.getLength(),c=t,l=t;++t<s;){r=e.getLine(t);var u=r.search(n);if(u!=-1){if(r[u]!=`#`)break;l=t}}if(l>c){var d=e.getLine(l).length;return new a(c,o,l,d)}}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r||(r=this.commentBlock(e,n),r))return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/folding/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/coffee`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./coffee`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=/\S/,i=e.getLine(n),o=i.search(r),s=i[o]===`#`,c=i[o]===`-`;if(o!=-1){var l=i.length,u=e.getLength(),d=n,f=n;if(s){var p=this.commentBlock(e,n);if(p)return p}else if(c){var p=this.indentationBlock(e,n);if(p)return p}else for(;++n<u;){var i=e.getLine(n),m=i.search(r);if(m!=-1){if(m<=o&&i[o]!==`-`){var h=e.getTokenAt(n,0);if(!h||h.type!==`string`)break}f=n}}if(f>d){var g=e.getLine(f).length;return new a(d,l,f,g)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/),l=r[i]===`-`;if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i||s!=-1&&s==i&&l?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/yaml_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/yaml`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./yaml_highlight_rules`).YamlHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/yaml`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.lineCommentStart=[`#`],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/yaml_worker`,`YamlWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/yaml`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/yaml`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),kC=r(((e,t)=>{ace.define(`ace/theme/clouds_midnight-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-clouds-midnight .ace_gutter {
|
|
1006
1006
|
background: #232323;
|
|
1007
1007
|
color: #929292
|
|
1008
1008
|
}
|
|
@@ -1118,7 +1118,7 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1118
1118
|
.ace-clouds-midnight .ace_indent-guide-active {
|
|
1119
1119
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1120
1120
|
}
|
|
1121
|
-
`}),ace.define(`ace/theme/clouds_midnight`,[`require`,`exports`,`module`,`ace/theme/clouds_midnight-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!0,t.cssClass=`ace-clouds-midnight`,t.cssText=e(`./clouds_midnight-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/clouds_midnight`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),
|
|
1121
|
+
`}),ace.define(`ace/theme/clouds_midnight`,[`require`,`exports`,`module`,`ace/theme/clouds_midnight-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!0,t.cssClass=`ace-clouds-midnight`,t.cssText=e(`./clouds_midnight-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/clouds_midnight`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),AC=r(((e,t)=>{ace.define(`ace/theme/chrome-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-chrome .ace_gutter {
|
|
1122
1122
|
background: #ebebeb;
|
|
1123
1123
|
color: #333;
|
|
1124
1124
|
overflow : hidden;
|
|
@@ -1276,7 +1276,7 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1276
1276
|
.ace-chrome .ace_indent-guide-active {
|
|
1277
1277
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
1278
1278
|
}
|
|
1279
|
-
`}),ace.define(`ace/theme/chrome`,[`require`,`exports`,`module`,`ace/theme/chrome-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-chrome`,t.cssText=e(`./chrome-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/chrome`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),
|
|
1279
|
+
`}),ace.define(`ace/theme/chrome`,[`require`,`exports`,`module`,`ace/theme/chrome-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-chrome`,t.cssText=e(`./chrome-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/chrome`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),jC=r(((e,t)=>{ace.define(`ace/snippets`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/lang`,`ace/range`,`ace/range_list`,`ace/keyboard/hash_handler`,`ace/tokenizer`,`ace/clipboard`,`ace/editor`],function(e,t,n){function r(e){var t=new Date().toLocaleString(`en-us`,e);return t.length==1?`0`+t:t}var i=e(`./lib/dom`),a=e(`./lib/oop`),o=e(`./lib/event_emitter`).EventEmitter,s=e(`./lib/lang`),c=e(`./range`).Range,l=e(`./range_list`).RangeList,u=e(`./keyboard/hash_handler`).HashHandler,d=e(`./tokenizer`).Tokenizer,f=e(`./clipboard`),p={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,`
|
|
1280
1280
|
`+n+`$1`):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?`YES`:`NO`},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return f.getText&&f.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,``)},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,``)},FILEPATH:function(e){return`/not implemented.txt`},WORKSPACE_NAME:function(){return`Unknown`},FULLNAME:function(){return`Unknown`},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||``},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||``},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||``},CURRENT_YEAR:r.bind(null,{year:`numeric`}),CURRENT_YEAR_SHORT:r.bind(null,{year:`2-digit`}),CURRENT_MONTH:r.bind(null,{month:`numeric`}),CURRENT_MONTH_NAME:r.bind(null,{month:`long`}),CURRENT_MONTH_NAME_SHORT:r.bind(null,{month:`short`}),CURRENT_DATE:r.bind(null,{day:`2-digit`}),CURRENT_DAY_NAME:r.bind(null,{weekday:`long`}),CURRENT_DAY_NAME_SHORT:r.bind(null,{weekday:`short`}),CURRENT_HOUR:r.bind(null,{hour:`2-digit`,hour12:!1}),CURRENT_MINUTE:r.bind(null,{minute:`2-digit`}),CURRENT_SECOND:r.bind(null,{second:`2-digit`})};p.SELECTED_TEXT=p.SELECTION;var m=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return`(?:[^\\\\`+e+`]|\\\\.)`}var r={regex:`/(`+n(`/`)+`+)/`,onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag=``,``},next:`formatString`};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return(r==`}`&&n.length||"`$\\".indexOf(r)!=-1)&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:`snippetVar`},{regex:/\n/,token:`newline`,merge:!1}],snippetVar:[{regex:`\\|`+n(`\\|`)+`*\\|`,onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:`\0`}).split(`\0`).map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:`start`},r,{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`start`}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):`:`}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r==`}`&&n.length?e=r:"`$\\".indexOf(r)==-1?r==`n`?e=`
|
|
1281
1281
|
`:r==`t`?e=` `:`ulULE`.indexOf(r)!=-1&&(e={changeCase:r,local:r>`a`}):e=r,[e]}},{regex:`/\\w*}`,onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:`formatStringVar`},{regex:/\n/,token:`newline`,merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:`formatString`},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]==`+`&&(n[0].ifEnd=n[0]),e[1]==`?`&&(n[0].expectElse=!0)},next:`formatString`},{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`formatString`}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||``;if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+`__`]||{})[t.substr(1)]||``;if(t=t.replace(/^TM_/,``),!this.variables.hasOwnProperty(t))return``;var r=this.variables[t];return typeof r==`function`&&(r=this.variables[t](e,t,n)),r??``},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||``,i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,``));var a=typeof t.fmt==`string`?this.tokenizeTmSnippet(t.fmt,`formatString`):t.fmt,o=this;return e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);for(var t=o.resolveVariables(a,n),r=`E`,i=0;i<t.length;i++){var s=t[i];if(typeof s==`object`){if(t[i]=``,s.changeCase&&s.local){var c=t[i+1];c&&typeof c==`string`&&(s.changeCase==`u`?t[i]=c[0].toUpperCase():t[i]=c[0].toLowerCase(),t[i+1]=c.substr(1))}else s.changeCase&&(r=s.changeCase)}else r==`U`?t[i]=s.toUpperCase():r==`L`&&(t[i]=s.toLowerCase())}return o.variables.__=e,t.join(``)})},e.prototype.tmFormatFunction=function(e,t,n){return t.formatFunction==`upcase`?e.toUpperCase():t.formatFunction==`downcase`?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){function n(t){var n=e.indexOf(t,o+1);n!=-1&&(o=n)}for(var r=[],i=``,a=!0,o=0;o<e.length;o++){var s=e[o];if(typeof s==`string`){r.push(s),s==`
|
|
1282
1282
|
`?(a=!0,i=``):a&&=(i=/^\t*/.exec(s)[0],/\S/.test(s));continue}if(s){if(a=!1,s.fmtString){var c=e.indexOf(s,o+1);c==-1&&(c=e.length),s.fmt=e.slice(o+1,c),o=c}if(s.text){var l=this.getVariableValue(t,s.text,i)+``;s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(r.push(l),n(s)):!l&&s.ifEnd&&n(s.ifEnd)}else s.elseEnd?n(s.elseEnd):s.tabstopId==null?s.changeCase!=null&&r.push(s):r.push(s)}}return r},e.prototype.getDisplayTextForSnippet=function(e,t){return h.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){n===void 0&&(n={});var r=h.call(this,e,t,n),i=e.getSelectionRange(),a=e.session.replace(i,r.text),o=new g(e),s=e.inVirtualSelectionMode&&e.selection.index;o.addTabstops(r.tabstops,i.start,a,s)},e.prototype.insertSnippet=function(e,t,n){n===void 0&&(n={});var r=this;if(e.inVirtualSelectionMode)return r.insertSnippetForSelection(e,t,n);e.forEachSelection(function(){r.insertSnippetForSelection(e,t,n)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||``;if(t=t.split(`/`).pop(),t===`html`||t===`php`){t===`php`&&!e.session.$mode.inlinePhp&&(t=`html`);var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r==`object`&&(r=r[0]),r.substring&&(r.substring(0,3)==`js-`?t=`javascript`:r.substring(0,4)==`css-`?t=`css`:r.substring(0,4)==`php-`&&(t=`php`))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push(`_`),n},e.prototype.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},e.prototype.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),a=r.substr(n.column),o=this.snippetMap,s;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(s=this.findMatchingSnippet(t,i,a)),!!s},this),s?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-s.replaceBefore.length,n.column+s.replaceAfter.length),this.variables.M__=s.matchBefore,this.variables.T__=s.matchAfter,this.insertSnippetForSelection(e,s.content),this.variables.M__=this.variables.T__=null,!0):!1},e.prototype.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(!(i.startRe&&!i.startRe.test(t))&&!(i.endRe&&!i.endRe.test(n))&&!(!i.startRe&&!i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[``],i.matchAfter=i.endRe?i.endRe.exec(n):[``],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:``,i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:``,i}},e.prototype.register=function(e,t){function n(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e=`(?:`+e+`)`),e||``}function r(e,t,r){return e=n(e),t=n(t),r?(e=t+e,e&&e[e.length-1]!=`$`&&(e+=`$`)):(e+=t,e&&e[0]!=`^`&&(e=`^`+e)),new RegExp(e)}function i(e){e.scope||=t||`_`,t=e.scope,a[t]||(a[t]=[],o[t]={});var n=o[t];if(e.name){var i=n[e.name];i&&c.unregister(i),n[e.name]=e}a[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join(`
|
|
@@ -1382,60 +1382,60 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1382
1382
|
animation: none;
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
`,`autocompletion.css`,!1),t.AcePopup=g,t.$singleLineEditor=h,t.getAriaId=d}),ace.define(`ace/autocomplete/inline_screenreader`,[`require`,`exports`,`module`],function(e,t,n){t.AceInlineScreenReader=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement(`div`),this.screenReaderDiv.classList.add(`ace_screenreader-only`),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on(`afterRender`,function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r=`doc-tooltip `,i=0;i<this._lines.length;i++)r+=`ace-inline-screenreader-line-${i} `;n.setAttribute(`aria-describedby`,r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement(`pre`);e.setAttribute(`id`,`ace-inline-screenreader`);for(var t=0;t<this._lines.length;t++){var n=document.createElement(`code`);n.setAttribute(`id`,`ace-inline-screenreader-line-${t}`);var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}()}),ace.define(`ace/autocomplete/inline`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete/inline_screenreader`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`./inline_screenreader`).AceInlineScreenReader;t.AceInline=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n||=``,e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||=new i(e);var a=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return t.hideInlinePreview||!a||!a.startsWith(n)?!1:(this.editor=e,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(n.length),a===``?e.removeGhostText():e.setGhostText(a),!0)},e.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},e.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&=(this.inlineScreenReader.destroy(),null)},e}()}),ace.define(`ace/autocomplete/util`,[`require`,`exports`,`module`],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var a=0;a<i;a++)t(e[a],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t-1;a>=0&&n.test(e[a]);a--)i.push(e[a]);return i.reverse().join(``)},t.retrieveFollowingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t;a<e.length&&n.test(e[a]);a++)i.push(e[a]);return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)},t.triggerAutocomplete=function(e,t){var t=t??e.session.getPrecedingCharacter();return e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define(`ace/autocomplete`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`,`ace/autocomplete/popup`,`ace/autocomplete/inline`,`ace/autocomplete/popup`,`ace/autocomplete/util`,`ace/lib/lang`,`ace/lib/dom`,`ace/snippets`,`ace/config`,`ace/lib/event`,`ace/lib/scroll`],function(e,t,n){var r=e(`./keyboard/hash_handler`).HashHandler,i=e(`./autocomplete/popup`).AcePopup,a=e(`./autocomplete/inline`).AceInline,o=e(`./autocomplete/popup`).getAriaId,s=e(`./autocomplete/util`),c=e(`./lib/lang`),l=e(`./lib/dom`),u=e(`./snippets`).snippetManager,d=e(`./config`),f=e(`./lib/event`),p=e(`./lib/scroll`).preventParentScroll,m=function(e,t){t.completer&&t.completer.destroy()},h=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=c.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=c.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=c.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new _(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle(`ace_loading`,!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls(`autocomplete.loading`,`Loading...`),value:``}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on(`click`,function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on(`show`,this.$onPopupShow.bind(this)),this.popup.on(`hide`,this.$onHidePopup.bind(this)),this.popup.on(`select`,this.$onPopupChange.bind(this)),f.addListener(this.popup.container,`mouseout`,this.mouseOutListener.bind(this)),this.popup.on(`changeHoverMarker`,this.tooltipTimer.bind(null,null)),this.popup.renderer.on(`afterRender`,this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new a,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&typeof e.completer.onSeen==`function`&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.addEventListener(`wheel`,this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener(`scroll`,this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.removeEventListener(`wheel`,this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener(`scroll`,e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var a={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(a.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,s=o<a.top?{top:o,left:a.left}:a;this.popup.tryShow(s,n,`bottom`)||this.popup.tryShow(r,n,`top`)||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var a;this.stickySelection&&(a=this.popup.data.indexOf(i)),(!a||a===-1)&&(a=0),this.popup.setRow(this.autoSelect?a:-1),a===r&&i!==this.completions.filtered[a]&&this.$onPopupChange();var s=this.inlineRenderer&&this.inlineEnabled;if(a===r&&s){var c=this.popup.getData(this.popup.getRow());this.$updateGhostText(c)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off(`changeSelection`,this.changeListener),this.editor.off(`blur`,this.blurListener),this.editor.off(`mousedown`,this.mousedownListener),this.editor.off(`mousewheel`,this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off(`afterRender`,this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||=this.popup.getData(this.popup.getRow()),!e)return!1;if(e.value===``)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on(`changeSelection`,this.changeListener),e.on(`blur`,this.blurListener),e.on(`mousedown`,this.mousedownListener),e.on(`mousewheel`,this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||=new g(e),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:r});if(i==this.completions.filterText)return;if(this.completions.setFilter(i),!this.completions.filtered.length||this.completions.filtered.length==1&&this.completions.filtered[0].value==i&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,i,t);return}if(n&&n.matches){var r=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new _(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,``,t)}var a=this.editor.getSession(),r=this.editor.getCursorPosition(),i=s.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,o,function(n,r,i){var a=r.filtered,o=s.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!a.length){var c=!this.autoShown&&this.emptyMessage;if(typeof c==`function`&&(c=this.emptyMessage(o)),c){var l=[{caption:c,value:``}];this.completions=new _(l),this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_loading`,!1),this.popup.renderer.setStyle(`ace_empty-message`,!0);return}return this.detach()}if(a.length==1&&a[0].value==o&&!a[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&a.length==1)return this.insertMatch(a[0])}this.completions=!i&&this.showLoadingState?new _(e.completionsForLoading.concat(a),r.filterText):r,this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_empty-message`,!1),this.popup.renderer.setStyle(`ace_loading`,!i)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,a=0;a<i;a++){var o=this.editor.completers[a];if(o.getDocTooltip&&n.completerId===o.id){r=o.getDocTooltip(n);break}}if(!r&&typeof n!=`string`&&(r=n),typeof r==`string`&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=l.createElement(`div`),this.tooltipNode.style.margin=`0`,this.tooltipNode.style.pointerEvents=`auto`,this.tooltipNode.style.overscrollBehavior=`contain`,this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id=`doc-tooltip`,this.tooltipNode.setAttribute(`role`,`tooltip`),this.tooltipNode.addEventListener(`wheel`,p));var t=this.editor.renderer.theme;this.tooltipNode.className=`ace_tooltip ace_doc-tooltip `+(t.isDark?`ace_dark `:``)+(t.cssClass||``);var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,i=r.container.getBoundingClientRect(),a=400,o=300,s=r.renderer.scrollBar.width||10,c=i.left,u=window.innerWidth-i.right-s,d=r.isTopdown?window.innerHeight-s-i.bottom:i.top,f=[Math.min(u/a,1),Math.min(c/a,1),Math.min(d/o,1)*.9],m=Math.max.apply(Math,f),h=n.style;h.display=`block`,m==f[0]||f[0]>=1?(h.left=i.right+1+`px`,h.right=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[1]||f[1]>=1?(h.right=window.innerWidth-i.left+`px`,h.left=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[2]&&(h.left=i.left+`px`,h.right=``,h.maxWidth=Math.min(a,window.innerWidth-i.left)+`px`,r.isTopdown?(h.top=i.bottom+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.bottom,o)+`px`):(h.top=``,h.bottom=window.innerHeight-i.top+`px`,h.maxHeight=Math.min(i.top,o)+`px`)),l.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if(t.nodeName==`A`&&t.href){t.rel=`noreferrer`,t.target=`_blank`;break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off(`destroy`,m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e?t.completer:(t.completer&&=(t.completer.destroy(),null),d.get(`sharedPopups`)?(e.$sharedInstance||=new e,t.completer=e.$sharedInstance):(t.completer=new e,t.once(`destroy`,m)),t.completer)},e}();h.prototype.commands={Up:function(e){e.completer.goTo(`up`)},Down:function(e){e.completer.goTo(`down`)},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo(`start`)},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo(`end`)},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo(`down`)},Backspace:function(e){e.execCommand(`backspace`),!s.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},h.startCommand={name:`startAutocomplete`,exec:function(e,t){var n=h.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:`Ctrl-Space|Ctrl-Shift-Space|Alt-Space`};var g=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!this.completions||!this.completions.filtered?!1:this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:`insertMatch`}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),r||i)for(var a=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0,s;s=a[o];o++)s.start.column-=r,s.end.column+=i,e.session.remove(s);t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&typeof t.completer.onInsert==`function`&&t.completer.onInsert(e,t),t.command&&t.command===`startAutocomplete`&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand(`insertstring`,n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e),a=[];this.completers=e.completers;var o=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,r,i,function(n,r){c.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:c.hideInlinePreview})})),!n&&r&&(a=a.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:a,finished:--o===0})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,i=e.matches;this.completions=new _(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,a=null;if(this.gatherCompletions(e,function(e,t){if(this.active&&(e&&(n(e,[],!0),this.detach()),t.prefix.indexOf(t.prefix)===0)){if(i){a=t;return}r(t)}}.bind(this)),i=!1,a){var o=a;a=null,r(o)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){typeof e.cancel==`function`&&e.cancel()})},e}(),_=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||``,this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var a=0,o;o=e[a];a++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var c=-1,l=0,u=0,d,f;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(i);if(p>-1)u=p;else for(var m=0;m<t.length;m++){var h=s.indexOf(i[m],c+1),g=s.indexOf(r[m],c+1);if(d=h>=0&&(g<0||h<g)?h:g,d<0)continue e;f=d-c-1,f>0&&(c===-1&&(u+=10),u+=f,l|=1<<m),c=d}}o.matchMask=l,o.exactMatch=+!u,o.$score=(o.score||0)-u,n.push(o)}}return n},e}();t.Autocomplete=h,t.CompletionProvider=g,t.FilteredList=_}),ace.define(`ace/marker_group`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal(`changeBackMarker`)},e.prototype.update=function(e,t,n,r){if(!(!this.markers||!this.markers.length))for(var i=r.firstRow,a=r.lastRow,o,s=0,c=0,l=0;l<this.markers.length;l++){var u=this.markers[l];if(!(u.range.end.row<i)&&!(u.range.start.row>a)&&(u.range.start.row===c?s++:(c=u.range.start.row,s=0),!(s>200))){var d=u.range.clipRows(i,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var f=d.toScreenRange(n);if(f.isEmpty()){o=n.getNextFoldLine(d.end.row,o),o&&o.end.row>d.end.row&&(i=o.end.row);continue}this.markerType===`fullLine`?t.drawFullLineMarker(e,f,u.className,r):f.isMultiLine()?this.markerType===`line`?t.drawMultiLineMarker(e,f,u.className,r):t.drawTextMarker(e,f,u.className,r):t.drawSingleLineMarker(e,f,u.className+` ace_br15`,r)}}}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),ace.define(`ace/autocomplete/text_completer`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){function r(e,t){return e.getTextRange(a.fromPoints({row:0,column:0},t)).split(o).length-1}function i(e,t){var n=r(e,t),i=e.getValue().split(o),a=Object.create(null),s=i[n];return i.forEach(function(e,t){if(!(!e||e===s)){var r=Math.abs(n-t),o=i.length-r;a[e]=a[e]?Math.max(o,a[e]):o}}),a}var a=e(`../range`).Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id=`textCompleter`,t.getCompletions=function(e,t,n,r,a){var o=i(t,n);a(null,Object.keys(o).map(function(e){return{caption:e,value:e,score:o[e],meta:`local`}}))}}),ace.define(`ace/ext/language_tools`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete`,`ace/config`,`ace/lib/lang`,`ace/autocomplete/util`,`ace/marker_group`,`ace/autocomplete/text_completer`,`ace/editor`,`ace/config`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`../autocomplete`).Autocomplete,a=e(`../config`),o=e(`../lib/lang`),s=e(`../autocomplete/util`),c=e(`../marker_group`).MarkerGroup,l=e(`../autocomplete/text_completer`),u={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var a=e.session.getState(n.row),o=t.$mode.getCompletions(a,t,n,r);o=o.map(function(e){return e.completerId=u.id,e}),i(null,o)},id:`keywordCompleter`},d=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||``}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},f={getCompletions:function(e,t,n,i,a){var o=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push(`html-tag`):o=r.getActiveScopes(e);var c=r.snippetMap,l=[];o.forEach(function(e){for(var t=c[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&l.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+`⇥ `:`snippet`,completerId:f.id})}},this),a(null,l)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=[`<b>`,o.escapeHTML(e.caption),`</b>`,`<hr></hr>`,o.escapeHTML(d(e.snippet))].join(``))},id:`snippetCompleter`},p=[f,l,u];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=l,t.keyWordCompleter=u,t.snippetCompleter=f;var m={name:`expandSnippet`,exec:function(e){return r.expandWithTab(e)},bindKey:`Tab`},h=function(e,t){g(t.session.$mode)},g=function(e){typeof e==`string`&&(e=a.$modes[e]),e&&(r.files||={},_(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},_=function(e,t){!t||!e||r.files[e]||(r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g(`ace/mode/`+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name===`backspace`)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name===`insertstring`&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):x(e)}},y,b=o.delayedCall(function(){x(y)},0),x=function(e){var t=e.editor,n=s.getCompletionPrefix(t),r=e.args,a=s.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||a){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e(`../editor`).Editor;e(`../config`).defineOptions(S.prototype,`editor`,{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||=Array.isArray(e)?e:p,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||=Array.isArray(e)?e:p,this.commands.on(`afterExec`,v)):this.commands.off(`afterExec`,v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on(`changeMode`,h),h(null,this)):(this.commands.removeCommand(m),this.off(`changeMode`,h))},value:!1}}),t.MarkerGroup=c}),(function(){ace.require([`ace/ext/language_tools`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g(),yC(),bC(),xC(),SC(),CC(),wC();var TC={jsonError:{border:`1px solid red`,minHeight:200},jsonNoError:{border:`1px solid #00000000`,minHeight:200}};function EC(e){return _.createElement(vC,{style:e.error===!0?TC.jsonError:e.error===!1?TC.jsonNoError:void 0,mode:e.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:e.editValueMode,showGutter:e.editValueMode,highlightActiveLine:e.editValueMode,defaultValue:e.defaultValue,theme:e.themeType===`dark`?`clouds_midnight`:`chrome`,value:e.value,readOnly:!e.onChange,onChange:t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t)},name:e.name||`UNIQUE_ID_OF_DIV1`,fontSize:e.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:e.editValueMode,tabSize:e.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}g();var DC={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},OC=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||`{}`;this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Ts.default.parse(e):JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:DC.flex},_.createElement(xt,{color:`grey`,style:DC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_JSON editor`))),o?_.createElement(aS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||{}})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...DC.wrapper,border:this.state.jsonError?`2px solid red`:`2px solid transparent`}},_.createElement(EC,{mode:this.props.schema.json5?`json5`:`json`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,jsonError:this.validateJson(e)}),name:`ConfigJsonEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?_.createElement(_n,null,this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var kC=[{value:`en`,label:`English`},{value:`de`,label:`Deutsch`},{value:`ru`,label:`русский`},{value:`pt`,label:`Portugues`},{value:`nl`,label:`Nederlands`},{value:`fr`,label:`français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Espanol`},{value:`pl`,label:`Polski`},{value:`uk`,label:`Український`},{value:`zh-cn`,label:`简体中文`}],AC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=[...kC];this.props.schema.system?t.unshift({value:``,label:J.t(`jc_System language`)}):t.unshift({value:``,label:J.t(`jc_none`)}),this.setState({value:this.props.schema.system?e||``:e||J.getLanguage(),selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value||!e.value&&!this.state.value);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:t,value:this.state.value||`_`,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation),onChange:e=>{let{value:t}=e.target;t===`_`&&(t=``),this.setState({value:t},()=>{if(this.props.attr){let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(e))}if(this.props.schema.changeGuiLanguage){if(t){var e,n;if(t===J.getLanguage())return;J.setLanguage(t),(e=(n=this.props.oContext).changeLanguage)==null||e.call(n)}else this.props.oContext.socket.getSystemConfig().then(e=>{if(e.common.language!==J.getLanguage()&&e.common.language){var t,n;J.setLanguage(e.common.language),(t=(n=this.props.oContext).changeLanguage)==null||t.call(n)}}).catch(e=>console.error(`Cannot read system config: ${e}`))}})}},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var jC=class extends X{constructor(e){super(e),K(this,`scrollRef`,void 0),this.scrollRef=_.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),X.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener(`scroll`,()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?_.createElement(nn,{maxWidth:`lg`,open:!0,onClose:(e,t)=>{t!==`escapeKeyDown`&&t!==`backdropClick`&&this.setState({showLicenseDialog:!1})}},_.createElement(Nt,null,this.props.schema.title?J.t(this.props.schema.title):J.t(`jc_License agreement`)),_.createElement(Tn,null,this.props.schema.licenseUrl?_.createElement(_.Fragment,null,this.state.loading?_.createElement(Ze,null):null,_.createElement(`pre`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?_.createElement(`div`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.props.schema.texts.map((e,t)=>this.props.schema.noTranslation?_.createElement(`p`,{key:t},e):_.createElement(`p`,{key:t},J.t(e)))):null),_.createElement(Et,null,this.props.schema.checkBox?_.createElement(kn,{control:_.createElement(O,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:J.t(this.props.schema.checkBox)}):null,_.createElement(xt,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{if(this.setState({showLicenseDialog:!1}),this.props.attr){let e=this.onChange(this.props.attr,!0);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},color:`primary`,variant:`contained`,startIcon:_.createElement(on,null)},this.props.schema.agreeText?J.t(this.props.schema.agreeText):J.t(`jc_Accept license`)),_.createElement(xt,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:`grey`,variant:`contained`,startIcon:_.createElement(De,null)},J.t(`jc_Close`)))):null}};g();var MC={indeterminate:{opacity:.5},control:{flexDirection:`row`,width:`100%`}},NC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e??=``,Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===X.DIFFERENT_VALUE?{_value:X.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(`,`,`.`),e===`-`))return null;let t=e===``?0:parseFloat(e);return e!==``&&Number.isNaN(t)?`jc_Not a number`:e!==``&&window.isFinite(t)?this.props.schema.min!==void 0&&t<this.props.schema.min?`jc_Too small`:this.props.schema.max!==void 0&&t>this.props.schema.max?`jc_Too big`:e===``||e===`-`||Number.isNaN(t)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){var n;let r=Array.isArray(this.state._value)||this.state._value===X.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0),r){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString(),value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:MC.indeterminate,fullWidth:!0,freeSolo:!0,value:r[0],getOptionSelected:(e,t)=>e.label===t.label,onChange:(e,t)=>{if(this.props.attr){let e=this.onChange(this.props.attr,t==null?void 0:t.value,()=>{this.setState({_value:t==null?void 0:t.value,oldValue:this.state._value})});e instanceof Promise&&e.catch(e=>console.error(e))}},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{...n,label:this.getText(this.props.schema.label),variant:`standard`,slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,readOnly:this.props.schema.readOnly||!1},input:{...n.slotProps.input,endAdornment:this.props.schema.unit?_.createElement(_.Fragment,null,this.getText(this.props.schema.unit,this.props.schema.noTranslation),n.slotProps.input.endAdornment):n.slotProps.input.endAdornment}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&=J.t(e));let i=parseFloat(((n=this.state._value)==null?void 0:n.toString().replace(`,`,`.`))||``);return _.createElement(Wt,{variant:`standard`,style:MC.control},_.createElement(ot,{sx:{"& .up-down":{display:`none`},"&:hover .up-down":{display:`block`}},variant:`standard`,type:Number.isNaN(i)?`text`:this.props.schema.min!==void 0&&this.props.schema.min>=0?`number`:`text`,fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??``,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value,n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{let e=parseFloat(t.toString().replace(`,`,`.`));Number.isNaN(e)?this.onChange(this.props.attr,t.toString().replace(`,`,`.`)):this.onChange(this.props.attr,e)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}};g();var PC=class extends X{constructor(e){super(e),K(this,`authWindow`,void 0),K(this,`oid`,void 0),K(this,`url`,void 0),K(this,`onTokensUpdated`,(e,t)=>{if(t!=null&&t.val){let e=JSON.parse(t.val);if(new Date(e.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:``})}),K(this,`onMessage`,e=>{if(e.origin===`https://oauth2.iobroker.in`&&(typeof e.data==`string`&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message==`string`&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){let i=(e.data||e.message).split(`:`);if(i[1]===`success`){var t;this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage(`close`,e.origin),this.authWindow=null}else{var n,r;(n=(r=this.props).onError)==null||n.call(r,i[2])}}}),this.state={...this.state,accessTokens:``,success:!1,blocked:!1,running:!1,pressed:!1,clientId:``,clientSecret:``,accessTokenError:``},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||`oauth2Tokens`}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener(`message`,this.onMessage,!1):window.attachEvent(`onmessage`,this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:X.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=X.getValue(this.props.data,this.props.schema.ownClientSecret));let t=await this.props.oContext.socket.getState(this.oid);if(t){let n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener(`message`,this.onMessage,!1):window.detachEvent(`onmessage`,this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith(`{`)&&(e=atob(e));let t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=X.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(e=>console.log(`Error occurred: ${e.toString()}`)))}catch(e){console.warn(e)}}onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:``),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||this.authWindow.closed===void 0?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n=``;if(this.state.accessTokens)try{let e=JSON.parse(this.state.accessTokens);n=new Date(e.access_token_expires_on).toLocaleString()}catch{}let r;r=this.state.accessTokens?this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):J.t(`jc_Renew %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):this.props.schema.label?this.getText(this.props.schema.label):J.t(`jc_Get %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));let i=this.getIcon();return _.createElement(`div`,{style:{width:`100%`,margin:`0 0 1rem 0`}},this.props.schema.ownClientId?_.createElement(ot,{value:this.state.clientId,onChange:e=>{let t=e.target.value;this.setState({clientId:t},()=>this.onChange(this.props.schema.ownClientId,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:J.t(`jc_OAuth Client ID`),slotProps:{input:{endAdornment:this.state.clientId?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientId:``},()=>this.onChange(this.props.schema.ownClientId,``))},_.createElement(De,null)):null}}}):null,this.props.schema.ownClientSecret?_.createElement(ot,{value:this.state.clientSecret,onChange:e=>{let t=e.target.value;this.setState({clientSecret:t},()=>this.onChange(this.props.schema.ownClientSecret,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:J.t(`jc_OAuth Client secret`),slotProps:{input:{endAdornment:this.state.clientSecret?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientSecret:``},()=>this.onChange(this.props.schema.ownClientSecret,``))},_.createElement(De,null)):null}}}):null,_.createElement(xt,{disabled:this.state.running||!!(this.props.schema.ownClientSecret&&!this.state.clientSecret)||!!(this.props.schema.ownClientId&&!this.state.clientId),endIcon:i||_.createElement(je,null),variant:`contained`,onClick:()=>this.onOpenUrl()},r),this.state.blocked?_.createElement(`div`,{style:{color:`red`,fontSize:16,marginTop:20}},J.t(`jc_Please allow popups in your browser for this page!`)):null,this.state.accessTokens?_.createElement(`div`,{style:{color:`green`,fontSize:16,marginTop:20}},this.props.alive?J.t(`jc_Successfully authorized. Token valid till %s and will be automatically renewed.`,n):J.t(`jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,n)):null,this.state.pressed?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{width:`100%`,margin:`1rem 0 1rem 0`}},_.createElement(`span`,{style:{marginRight:4}},`${J.t(`jc_If the button above does not work, you can authorize manually this app by visiting this url`)}`,`:`),_.createElement(`br`,null),_.createElement(`a`,{target:this.props.schema.identifier,href:this.url,rel:`noreferrer`},this.url)),_.createElement(ot,{value:this.state.accessTokens,label:J.t(`jc_Enter the code from that page here`),variant:`standard`,error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||``,onChange:e=>{let t=e.target.value;try{t!=null&&t.trim()&&!t.trim().startsWith(`{`)&&(t=atob(t.trim()))}catch{this.setState({accessTokenError:`Invalid access token. Cannot decode from base64`})}if(t!=null&&t.startsWith(`{`))try{let e=JSON.parse(t);e.access_token&&(e.access_token_expires_on=new Date(Date.now()+(e.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(e),accessTokenError:``},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:t,accessTokenError:`Invalid access token. Cannot parse JSON`})}else t&&this.setState({accessTokens:t,accessTokenError:`Invalid access token. Not JSON`})},fullWidth:!0})):null)}};g();var FC={flex:{display:`flex`},button:{maxHeight:48,marginLeft:4,minWidth:48}},IC=class extends X{constructor(...e){super(...e),K(this,`fillOnSelect`,[]),K(this,`onObjectChanged`,async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{let e=t&&await this.getCachedObject(t);if(e){for(let t of this.fillOnSelect)if(t.overwrite||!X.getValue(this.props.data,t.attr)){let n=X.getValue(e,t.pathInObject);typeof n==`object`&&(n=this.getText(n,!0)),await this.onChange(t.attr,n)}}}catch(e){console.error(e.toString())}})}async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;if(this.props.schema.fillOnSelect){let e=this.props.schema.fillOnSelect.split(`,`).map(e=>e.trim());for(let t of e){let e=t.split(`=>`);if(e.length===2){let t={pathInObject:e[0],attr:e[1]};(t.attr.includes(`(X)`)||t.attr.includes(`(x)`))&&(t.overwrite=!0,t.attr=t.attr.replace(/\(X\)|\(x\)/g,``)),this.fillOnSelect.push(t)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}renderItem(e,t){if(!this.state.initialized)return null;let n=this.props.oContext.socket,{schema:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},r.label?_.createElement(rr,{shrink:!0},this.getText(r.label)):null,_.createElement(`div`,{style:FC.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:a,error:!!e,disabled:t,placeholder:this.getText(r.placeholder),label:this.getText(r.label),helperText:this.renderHelp(r.help,r.helpLink,r.noTranslation),onChange:e=>{let t=Array.isArray(e.target.value)?e.target.value[0]:e.target.value;this.setState({value:t},()=>i&&void this.onObjectChanged(i,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:FC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},`...`)),o?_.createElement(wn,{imagePrefix:this.props.oContext.imagePrefix??`../..`,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:r.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:r.types?Array.isArray(r.types)?r.types:[r.types]:void 0,customFilter:r.customFilter,filters:r.filters,socket:n,selected:a,root:r.root,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({showSelectId:!1,value:t},()=>i&&void this.onObjectChanged(i,t))}}):null)}};g();var LC={fullWidth:{width:`100%`,display:`inline-block`},halfWidth1:{width:`calc(50% - 5px)`,display:`inline-block`,marginRight:8},halfWidth2:{width:`calc(50% - 5px)`,display:`inline-block`}},RC=`____ppp____`,zC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?RC:``,_visible:!1,value:e?RC:``,_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);let n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,J.t(`jc_Passwords are not equal!`));else{this.onError(this.props.attr);let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(this.props.attr,e))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;let n=_.createElement(ot,{variant:`standard`,fullWidth:!0,type:this.state._visible&&this.state.value!==RC?`text`:`password`,value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(e.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:`new-password`,endAdornment:this.state.value&&this.state.value!==RC&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?_.createElement(At,{position:`end`},_.createElement(Zn,{size:`large`,tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:`end`},this.state._visible?_.createElement($n,null):_.createElement(I,null))):void 0},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){let r=this.state._visible?null:_.createElement(ot,{variant:`standard`,fullWidth:!0,type:`password`,value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(void 0,e.target.value),label:`${this.getText(this.props.schema.label)} (${J.t(`jc_repeat`)})`,slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return _.createElement(`div`,{style:LC.fullWidth},_.createElement(`div`,{style:LC.halfWidth1},n),_.createElement(`div`,{style:LC.halfWidth2},r))}return n}};g();var BC=class extends X{constructor(...e){super(...e),K(this,`checkTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),_.createElement(ot,{variant:`standard`,fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:async()=>{Zt.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.pattern||``,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var VC={warning:{"& .Mui-error":{color:`orange`}}},HC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);e??=``,this.setState({_value:e.toString(),oldValue:e.toString()});let t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,r=await this.getCachedObject(n),i=r==null?void 0:r.common.host,a=[];t.forEach(e=>{var t,r;if(!e||e._id===n||e.common.host!==i||!((t=e.native)!=null&&t.bind))return;if(e!=null&&e.native&&e.native.secure&&e.native.leEnabled&&e.native.leUpdate){let t=parseInt(e.native.leCheckPort||e.native.lePort,10);if(t){var o;a.push({name:`${e._id.replace(`system.adapter.`,``)} (LE)`,port:t,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,bind:e.native.bind,enabled:!!((o=e.common)!=null&&o.enabled)})}}let s=parseInt(e==null||(r=e.native)==null?void 0:r.port,10);if(s){var c;a.push({name:e._id.replace(`system.adapter.`,``),bind:e.native.bind,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,port:s,enabled:!!((c=e.common)!=null&&c.enabled)})}}),this.setState({ports:a})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;let t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();let r=e===``?0:parseInt(e,10);return e!==``&&Number.isNaN(r)?`jc_Not a number`:e!==``&&window.isFinite(Number(e))?r<t?`jc_Too small`:r>n?`jc_Too big`:e===``||e===`-`||Number.isNaN(r)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0);let n=this.props.schema.min??20,r=this.props.schema.max||65535,i;if(this.state.ports){let t=parseInt(this.state._value,10);if(t){let n=this.props.data.bind,r=this.state.ports.filter(e=>{if(e.port!==t)return!1;let r=e.bind,i=e.v6bind;return!n||!r||n===`0.0.0.0`||r===`0.0.0.0`||n===`::`||i===`::`||n===r||n===i}),a=r.findIndex(e=>e.port===t&&e.enabled);if(a!==-1){let n=this.state.ports.find(e=>e.port===t&&e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port is already used by %s`,(n==null?void 0:n.name)||r[a].name)}else if(a=r.findIndex(e=>e.port===t&&!e.enabled),a!==-1){i=!0;let n=this.state.ports.find(e=>e.port===t&&!e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port could be used by %s`,(n==null?void 0:n.name)||r[a].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e==`string`&&(e=J.t(e))),_.createElement(ot,{variant:`standard`,type:`number`,fullWidth:!0,slotProps:{htmlInput:{min:n,max:r,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??``,error:!!e,disabled:!!t,sx:i?VC.warning:void 0,onChange:e=>{let t=Number(e.target.value.toString().replace(/[^0-9]/g,``)).toString(),n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{if(t.trim()===parseInt(t,10).toString()){let e=this.onChange(this.props.attr,parseInt(t,10)||0);e instanceof Promise&&e.catch(e=>{console.error(`Cannot set value for ${this.props.attr}: ${e}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var UC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`rooms`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.rooms.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(e=>console.error(`Cannot get enums: ${e}`))}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var WC={fullWidth:{width:`100%`},noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}},GC=class extends X{constructor(...e){super(...e),K(this,`initialValue`,``)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]);let t=[];for(let e of this.props.schema.options||[]){let n=e;if(Array.isArray(n.items)){t.push({label:this.getText(e.label,this.props.schema.noTranslation),value:e.value,group:!0,hidden:n.hidden,os:n.os,notOs:n.notOs,docker:n.docker,color:e.color,description:this.getText(e.description)});for(let e of n.items)t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,inGroup:!0,hidden:e.hidden,os:e.os,notOs:e.notOs,docker:e.docker,color:e.color,description:this.getText(e.description),icon:e.icon})}else t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,os:e.os,notOs:e.notOs,docker:e.docker,color:e.color,description:this.getText(e.description),icon:e.icon})}if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)!n.group&&n.value!==X.DIFFERENT_VALUE&&(e[n.value.toString()]=n.label);this.props.onFilterLabelUpdate(this.props.attr,e)}let n=Array.isArray(e)&&!this.props.schema.multiple;n&&(this.initialValue=[...e],t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE})),await this.evaluateHidden(t),n?this.setState({value:X.DIFFERENT_VALUE,selectOptions:t}):this.setState({value:e,selectOptions:t})}async evaluateHidden(e){let t=!1,n=!1;for(let r of e){let e=await this.isHidden(r);r.group?n=e:r.inGroup?e||=n:n=!1,r.hiddenValue!==e&&(r.hiddenValue=e,t=!0)}return t}async componentDidUpdate(e){if(e.data===this.props.data||!this.state.selectOptions||!this.state.selectOptions.some(e=>typeof e.hidden==`string`))return;let t=this.state.selectOptions.map(e=>({...e}));await this.evaluateHidden(t)&&this.setState({selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return X.isHostAllowed(e,this.props.oContext.hostInfo)?e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1:!0}renderRadio(e,t){var n;let r=(n=this.state.selectOptions)==null?void 0:n.filter(e=>!e.hiddenValue&&!e.group),i=this._getValue();return _.createElement(Wt,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Qt,null,this.getText(this.props.schema.label)):null,_.createElement(Oe,{row:!!this.props.schema.horizontal,value:i==null?``:i.toString(),onChange:e=>{let t=r==null?void 0:r.find(t=>t.value.toString()===e.target.value),n=t?t.value:e.target.value;this.setState({value:n},()=>{let e=this.onChange(this.props.attr,n);e instanceof Promise&&e.catch(e=>console.error(e))})}},r==null?void 0:r.map((e,t)=>_.createElement(kn,{key:t,value:e.value.toString(),control:_.createElement(sn,null),title:e.description||``,label:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},e.icon?_.createElement(Mt,{src:e.icon,style:WC.icon}):null,_.createElement(Pn,{component:`span`,style:{color:e.color}},e.label)),style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format===`radio`)return this.renderRadio(e,t);let n=this.state.selectOptions.filter(e=>!e.hiddenValue),r=this._getValue(),i=this.props.schema.multiple?null:n.find(e=>e.value==r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0,sx:this.props.table===void 0?void 0:WC.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:r||`_`,renderValue:e=>this.props.schema.multiple?_.createElement(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=n.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):i!=null&&i.color?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:WC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,{style:{color:i.color}},i.label??e),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},_.createElement(Mt,{src:i.icon,style:WC.icon}),e):e:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:WC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,null,i.label),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>{let e;e=this.state.value===X.DIFFERENT_VALUE?this.onChange(this.props.attr,this.initialValue):this.onChange(this.props.attr,this.state.value),e instanceof Promise&&e.catch(e=>console.error(e))})}},n.map((e,t)=>e.group?_.createElement(tt,{key:t,style:{color:e.color}},_.createElement(`div`,null,e.label),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},e.description):null):_.createElement(z,{key:t,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?_.createElement(O,{checked:r.includes(e.value),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r.indexOf(e.value);n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,e.icon?_.createElement(Mt,{src:e.icon,style:WC.icon}):null,_.createElement(er,{primary:e.label,secondary:e.description,slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}},style:{color:e.color}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var KC={menuPaper:{maxHeight:800}},qC=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null,this.setState({running:!0},async()=>{let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}try{let n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e);this.reportFilterLabels(n);for(let e of n)e.hiddenValue=await this.isHidden(e);this.setState({list:n,running:!1})}catch(e){console.error(`Cannot send command: ${e}`)}})}else{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value==null?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){var n;if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let r=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?J.t(`jc_Cannot retrieve options, as instance is offline`):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:r,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?_.createElement(At,{position:`end`},_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>this.setState({value:``},()=>this.onChange(this.props.attr,``))},_.createElement(De,null))):null}}});if(this.state.running)return _.createElement(Wn,{size:`24`});let i=(n=this.state.list)==null?void 0:n.filter(e=>!e.hiddenValue),a=i==null?void 0:i.find(e=>e.value===r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:this.props.schema.multiple?{"&.MuiSelect-paper":KC.menuPaper}:void 0,value:r||``,renderValue:e=>this.props.schema.multiple?_.createElement(vt,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=i==null?void 0:i.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):this.getText((a==null?void 0:a.label)||e,this.props.schema.noTranslation),onChange:e=>{let t=this.onChange(this.props.attr,e.target.value);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},i==null?void 0:i.map((e,t)=>e.group?_.createElement(tt,{key:t},_.createElement(`div`,null,this.getText(e.label,this.props.schema.noTranslation)),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},this.getText(e.description)):null):_.createElement(z,{key:t,value:e.value},this.props.schema.multiple?_.createElement(O,{checked:r==null?void 0:r.includes(e.value.toString()),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r==null?void 0:r.indexOf(e.value.toString());n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,_.createElement(er,{primary:this.getText(e.label),secondary:this.getText(e.description),slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var JC={fullWidth:{width:`100%`}};function YC(e){return e.split(`.`).reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function XC(e,t){var n;let r=e==null||(n=e.native)==null||(n=n.hardware)==null?void 0:n.networkInterfaces;if(!r)return null;let i;return Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv4`&&!e.address.startsWith(`172`)&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(YC(t)&YC(e.netmask),YC(e.address)&YC(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv6`&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(YC(t)&YC(e.netmask),YC(e.address)&YC(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(i=(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/),e.address))})}),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||(i=e.address)})}),i||null}var ZC=class extends X{async componentDidMount(){await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){let n=await this.props.oContext.socket.getCurrentInstance(),r=await this.getCachedObject(`system.adapter.${n}`);if(r){var t;let n=await this.getCachedObject(`system.host.${r==null||(t=r.common)==null?void 0:t.host}`);if(n){let t=XC(n,window.location.hostname);if(t)e=`${t}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${r.common.host} for ${r._id}`);return}}}}await new Promise(t=>{this.setState({_error:``,_message:``,hostname:e},t)}),this.props.schema.onLoaded&&this._onClick().catch(e=>console.error(e))}renderErrorDialog(){return this.state._error?_.createElement(tn,{text:this.state._error,onClose:()=>this.setState({_error:``})}):null}renderMessageDialog(){return this.state._message?_.createElement(Tt,{text:this.state._message,onClose:()=>this.setState({_message:``})}):null}renderCopyDialog(){return this.state._copyDialog?_.createElement(aS,{title:this.getText(this.state._copyDialog.title||J.t(`jc_Result`)),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{qt(this.state._copyDialog.text),window.alert(J.t(`jc_Copied`)),this.setState({_copyDialog:null})},titleButtonApply:J.t(`jc_Copy content`)},_.createElement(`div`,{style:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},_.createElement(EC,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:`CopyDialog`,themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});let e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,``)}`,t=`${window.location.protocol}//${this.state.hostname.split(`:`).length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,``)}`,n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let r=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(r)}catch{console.error(`Cannot parse json data: ${r}`)}}n??=null,this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let r;this.props.schema.timeout&&(r=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:J.t(`jc_Request timed out`),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));let i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||`send`,n).then(async e=>{if(r&&=(clearTimeout(r),void 0),e!=null&&e.error){var t;if((t=this.props.schema.error)!=null&&t[e.error]){var n;let t=this.getText(this.props.schema.error[e.error]);(n=e.args)==null||n.forEach(e=>t=t.replace(`%s`,e)),this.setState({_error:t})}else this.setState({_error:e.error?typeof e.error==`string`?J.t(e.error):JSON.stringify(e.error):J.t(`jc_Error`)})}else{var i;if(e!=null&&e.command){var a,o;(a=(o=this.props.oContext).onBackEndCommand)==null||a.call(o,e.command);return}if(e!=null&&e.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(e!=null&&e.openUrl&&this.props.schema.openUrl)window.open(e.openUrl,e.window||this.props.schema.window||`_blank`);else if(e!=null&&e.result&&(i=this.props.schema.result)!=null&&i[e.result]){var s;let t=this.getText(this.props.schema.result[e.result]);(s=e.args)==null||s.forEach(e=>t=t.replace(`%s`,e)),window.alert(t)}if(e!=null&&e.native&&this.props.schema.useNative){for(let[t,n]of Object.entries(e.native))await this.onChangeAsync(t,n);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(e.native),this.props.data),300)}else e!=null&&e.result?window.alert(typeof e.result==`object`?JSON.stringify(e.result):e.result):e!=null&&e.copyDialog?this.setState({_copyDialog:e.copyDialog}):window.alert(J.t(`jc_Ok`));e!=null&&e.saveConfig&&this.props.onChange(void 0,null,void 0,!0)}}).catch(e=>{this.props.schema.error&&this.props.schema.error[e.toString()]?this.setState({_error:this.getText(this.props.schema.error[e.toString()])}):this.setState({_error:J.t(e.toString())||J.t(`jc_Error`)})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)throw Error(`Confirm dialog requested but no confirm data provided`);let t=null;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t||void 0,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:JC.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...JC.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||``:J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(e=>console.error(e))}},this.props.schema.showProcess&&this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}};g();var QC={fullWidth:{width:`100%`}},$C=class extends X{async _onClick(){let e=this.props.schema.val;if(typeof e==`string`&&e.includes("${")){var t,n;e=await this.getPatternAsync(e,null,!0);let r=await this.getCachedObject(this.props.schema.id);(r==null||(t=r.common)==null?void 0:t.type)===`number`?e=parseFloat(e):(r==null||(n=r.common)==null?void 0:n.type)===`boolean`&&(e=e===`true`||e===!0||e===`1`||e===1)}let r=(this.props.schema.id||``).replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(r,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(e){this.props.schema.error&&this.props.schema.error[e.toString()]?window.alert(this.getText(this.props.schema.error[e.toString()])):window.alert(J.t(e.toString())||J.t(`jc_Error`))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)return null;let t;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:QC.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}};g();var ew={fullWidth:{width:`100%`},slider:{marginLeft:10,marginRight:10,width:`calc(100% - 20px)`}},tw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){let n=this.props.schema.min||0,r=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):``,a=[{value:n,label:n+i},{value:r,label:r+i}];return _.createElement(vt,{style:ew.fullWidth},this.props.schema.label?_.createElement(Pn,{gutterBottom:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{style:ew.slider,value:this.state._value,getAriaValueText:e=>e+i,step:this.props.schema.step||(r-n)/100,valueLabelDisplay:`auto`,marks:a,min:n,max:r,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({_value:t},()=>this.onChange(this.props.attr,t))}}),this.props.schema.help?_.createElement(Pn,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();function nw(e,t){return e===`edit`||e===`rename`?_.createElement(Ke,{style:t}):e===`delete`?_.createElement(me,{style:t}):e===`refresh`?_.createElement(ar,{style:t}):e===`newDevice`||e===`new`||e===`add`?_.createElement(re,{style:t}):e===`discover`||e===`search`?_.createElement(tr,{style:t}):e===`unpairDevice`||e===`unpair`?_.createElement(an,{style:t}):e===`pairDevice`||e===`pair`?_.createElement(Rn,{style:t}):e===`identify`?_.createElement(Kt,{style:t}):e===`play`?_.createElement(Xt,{style:t}):e===`stop`?_.createElement(M,{style:t}):e===`pause`?_.createElement(yn,{style:t}):e===`forward`||e===`next`?_.createElement(st,{style:t}):e===`rewind`||e===`previous`?_.createElement(de,{style:t}):e===`lamp`||e===`light`?_.createElement(Cn,{style:t}):e===`backlight`?_.createElement(ve,{style:t}):e===`dimmer`?_.createElement(ie,{style:t}):e===`socket`?_.createElement(wt,{style:t}):e===`settings`?_.createElement(V,{style:t}):e===`users`||e===`group`?_.createElement(pt,{style:t}):e===`user`?_.createElement(en,{style:t}):e===`qrcode`?_.createElement(jt,{style:t}):e===`connection`?_.createElement(R,{style:t}):e===`no-connection`?_.createElement(Fe,{style:t}):e===`visible`?_.createElement(I,{style:t}):null}g();function rw(e,t){return typeof t==`string`?{"@keyframes newStateAnimationOnceColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnceColor 2s ease-in-out`}:{"@keyframes newStateAnimationOnce":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnce 2s ease-in-out`}}var iw=class extends X{constructor(...e){super(...e),K(this,`controlTimeout`,null),K(this,`delayedUpdate`,{timer:null,value:null}),K(this,`onStateChanged`,(e,t)=>{let n=t?t.val:null;this.state.controlType===`button`||this.state.controlType===`switch`?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType===`slider`||this.state.controlType===`number`)?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n===this.state.stateValue?this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null):(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500))):(this.state.stateValue===null||this.state.stateValue===void 0?null:this.state.stateValue.toString())!==(n==null?null:n.toString())&&this.setState({stateValue:n})})}async getObjectID(){let e=(this.props.schema.oid||``).toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?`system.adapter.`:``}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var e;await super.componentDidMount();let t=await this.getObjectID(),n=await this.getCachedObject(t);if(n!=null&&(e=n.common)!=null&&e.states&&!this.props.schema.options){var r;if(Array.isArray(n==null||(r=n.common)==null?void 0:r.states)){let e={};n.common.states.forEach((t,n)=>{e[n.toString()]=t}),n.common.states=e}Object.keys(n.common.states).length||(n.common.states=void 0)}let i=this.props.schema.control||this.detectType(n);try{let e=await this.props.oContext.socket.getState(t);this.setState({stateValue:e?e.val:null,controlType:i,obj:n,objId:t},async()=>{let e=await this.getObjectID();await this.props.oContext.socket.subscribeState(e,this.onStateChanged)})}catch(e){console.error(`Cannot get state ${t}: ${e}`),this.setState({controlType:i,obj:n,objId:t})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}detectType(e){if(e||={},e.common||={},e.common.type===`boolean`){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return`button`;if(e.common.write||this.props.schema.controlled===!0)return`switch`}return`text`}return e.common.type===`number`&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?`select`:e.common.max===void 0?`input`:`slider`:`text`:e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?`select`:`input`:`text`}getNormalizedStates(){var e;let t;return this.props.schema.options?t=this.props.schema.options.map(e=>typeof e==`string`?{value:e,label:this.getText(e,this.props.schema.noTranslation)}:{value:e.value,label:this.getText(e.label,this.props.schema.noTranslation),color:e.color}):(e=this.state.obj)!=null&&e.common.states?(t=[],Object.keys(this.state.obj.common.states).forEach(e=>{t.push({value:e,label:this.getText(this.state.obj.common.states[e],this.props.schema.noTranslation)})})):t=[],t}renderItem(e,t){var n;if(!this.state.obj)return null;let r;if(this.state.controlType===`select`||!this.state.controlType&&(this.state.obj.common.type===`number`||this.state.obj.common.type===`string`)&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates(),n=e.find(e=>e.value===this.state.stateValue);r=_.createElement(Wt,{fullWidth:!0},_.createElement(rr,null,this.getText(this.props.schema.label)),_.createElement(Me,{value:this.state.stateValue??``,disabled:!!this.props.schema.readOnly||t,onChange:e=>{this.setState({stateValue:e.target.value},()=>{var e;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&this.props.oContext.socket.setState(this.state.objId,t,!1)})},renderValue:e=>n!=null&&n.color?_.createElement(`div`,{style:{color:n.color}},n.label):e},e.map(e=>_.createElement(z,{key:(e.value??``).toString(),value:e.value,style:{color:e.color}},`$`,e.label))))}else if(this.state.controlType===`button`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(n=this.state.obj.common.role)!=null&&n.includes(`button`))){let e=null;this.props.schema.falseImage&&(e=nw(this.props.schema.falseImage));let n=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);r=!n&&e?_.createElement(Zn,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},e):_.createElement(xt,{variant:this.props.schema.variant||`contained`,startIcon:e,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},n||(this.state.objId||``).split(`.`).pop())}else if(this.state.controlType===`input`||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type===`string`)r=_.createElement(`div`,{style:{width:`100%`,display:`flex`,flexDirection:`row`,gap:8,alignItems:`baseline`}},_.createElement(ot,{style:{flex:1},value:this.state.stateValue,variant:`standard`,disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:e=>{this.props.schema.setOnEnterKey&&e.key===`Enter`&&this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{var e;this.controlTimeout=null;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,t,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&_.createElement(xt,{variant:`outlined`,disabled:t,onClick:()=>{this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)}},this.getText(typeof this.props.schema.showEnterButton==`string`?this.props.schema.showEnterButton:`Set`)));else{var i,a,o,s;let e;this.props.schema.size===`normal`?e=16:this.props.schema.size===`large`?e=20:typeof this.props.schema.size==`number`&&(e=this.props.schema.size);let n=this.getText(this.props.schema.label,this.props.schema.noTranslation),c={display:`flex`,alignItems:`center`,fontSize:e||`1rem`,gap:8};this.props.schema.narrow||(c.width=`100%`,c.justifyContent=`space-between`),n.trim()&&!n.trim().endsWith(`:`)&&this.props.schema.addColon&&(n=`${n.trim()}:`);let l;this.props.schema.blinkOnUpdate&&(l=rw(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let u;this.props.schema.labelIcon&&(u=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let d;if(n&&u?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},u,n):n?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},n):u&&(d=u),this.state.controlType===`switch`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes(`switch`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=nw(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=nw(this.props.schema.trueImage,a?{marginRight:8}:void 0)),r=_.createElement(Pe,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,alignItems:`center`,fontSize:14}},_.createElement(`span`,{style:this.props.schema.falseTextStyle},n,e),r,_.createElement(`span`,{style:this.props.schema.trueTextStyle},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.controlType===`slider`||!this.state.controlType&&this.state.obj.common.type===`number`&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit===`%`)||(a=this.state.obj.common.role)!=null&&a.includes(`slider`)||(o=this.state.obj.common.role)!=null&&o.includes(`dimmer`)||(s=this.state.obj.common.role)!=null&&s.includes(`blind`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=nw(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=nw(this.props.schema.trueImage,a?{marginRight:8}:void 0));let o=this.props.schema.min??(this.state.obj.common.min||0),s=this.props.schema.max??this.state.obj.common.max??100,l=this.props.schema.step??(this.state.obj.common.step||1);r=_.createElement(Be,{style:{width:`100%`,flexGrow:1},min:o,max:s,disabled:!!this.props.schema.readOnly||t,step:l,value:this.state.stateValue,valueLabelDisplay:`auto`,valueLabelFormat:e=>{var t;let n=this.props.schema.digits===void 0?e.toString():e.toFixed(this.props.schema.digits);return this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`)),`${n}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||((t=this.state.obj)==null?void 0:t.common.unit)||``}`},onChange:(e,t)=>{Array.isArray(t)&&(t=t[0]),this.setState({stateValue:t},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},this.props.schema.controlDelay||0)})}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,width:`100%`,flexGrow:1,alignItems:`center`}},_.createElement(`span`,{style:{marginRight:16,...this.props.schema.falseTextStyle}},n,e),r,_.createElement(`span`,{style:{marginLeft:16,...this.props.schema.trueTextStyle}},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.obj.common.type===`number`&&this.state.obj.common.write&&!this.state.controlType){let e=this.props.schema.min??this.state.obj.common.min??void 0,n=this.props.schema.max??this.state.obj.common.max??void 0,i=this.props.schema.step??this.state.obj.common.step??void 0;r=_.createElement(ot,{variant:`standard`,style:{width:`100%`},value:this.state.stateValue,type:`number`,disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:e,max:n,step:i,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{if(this.controlTimeout=null,this.state.objId){let e=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,e,!1)}},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type===`boolean`){let e=null,t,n;this.state.stateValue?(t=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(e=nw(this.props.schema.falseImage,t?{marginRight:8}:void 0)),n=this.props.schema.trueTextStyle):(t=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(e=nw(this.props.schema.falseImage,t?{marginLeft:8}:void 0)),n=this.props.schema.falseTextStyle),n=Object.assign(c,n),r=_.createElement(`div`,{style:n},d,_.createElement(vt,{style:{display:`flex`,alignItems:`center`,gap:8},sx:l,key:this.props.schema.blinkOnUpdate?t:void 0},e,t||(this.state.stateValue?J.t(`jc_true`):J.t(`jc_false`))))}else{let e=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit,t=this.state.stateValue;if(t!=null&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates().find(e=>e.value.toString()===t.toString());e&&(t=e.label)}let n,i;this.state.controlType===`html`?(i=(t??``).toString(),n=_.createElement(`span`,{dangerouslySetInnerHTML:{__html:t}})):this.state.stateValue===null?(n=`null`,i=n):this.state.stateValue===void 0?(n=`undefined`,i=n):(this.props.schema.digits!==void 0&&typeof t==`number`?(n=t.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`))):n=(t??``).toString(),i=n),r=_.createElement(`div`,{style:c},d,_.createElement(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:4}},_.createElement(vt,{sx:l,key:this.props.schema.blinkOnUpdate?i:void 0},n),e?_.createElement(`span`,{style:{opacity:.7,fontSize:`smaller`}},e):null))}}return r}};g();var aw={fullWidth:e=>({width:`100%`,backgroundColor:e.palette.mode===`dark`?`#FFF`:`#000`,borderStyle:`hidden`}),primary:e=>({backgroundColor:e.palette.primary.main}),secondary:e=>({backgroundColor:e.palette.secondary.main})},ow=class extends X{renderItem(){return _.createElement(vt,{component:`hr`,sx:Zt.getStyle(this.props.oContext.theme,aw.fullWidth,this.props.schema.color===`primary`?aw.primary:this.props.schema.color===`secondary`?aw.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType===`dark`?`#333`:`#ddd`)},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}};g();var sw={header:e=>({width:`100%`,background:e.palette.primary.main,color:e.palette.primary.contrastText,padding:`4px !important`,borderRadius:`3px`,marginBlockEnd:0,marginBlockStart:0})},cw=class extends X{renderItem(){let e=`h5`;switch((this.props.schema.size||5).toString()){case`1`:e=`h1`;break;case`2`:e=`h2`;break;case`3`:e=`h3`;break;case`4`:e=`h4`;break;default:e=`h5`}return _.createElement(vt,{component:e,sx:sw.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}};g();var lw=class extends X{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(`.`)&&!e.startsWith(`http`)&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){let{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){let n=e.showInDialogSmallSize||100,r=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):``;return _.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Click to see in full size`)},_.createElement(`img`,{src:t,style:{cursor:`pointer`,width:`auto`,height:n,objectFit:`contain`},alt:``,onClick:()=>this.setState({showDialog:!0})})),` `,r?_.createElement(xt,{variant:`outlined`,color:`grey`,onClick:()=>this.setState({showDialog:!0})},r):null,this.state.showDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:`lg`},_.createElement(Tn,null,_.createElement(Mt,{src:t,style:{width:`100%`,height:`100%`,objectFit:`contain`}})),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showDialog:!1}),color:`primary`},J.t(`jc_Close`)))):null)}return _.createElement(`img`,{src:t,style:{cursor:e.href?`pointer`:void 0,width:`100%`,height:`100%`},onClick:e.href?()=>e.href&&window.open(e.href,`_blank`):void 0,alt:``})}};g();function uw(e,t,n){return typeof n==`string`?{"@keyframes newValueAnimationOnceColor":{"0%":{color:t?`${n} !important`:n},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnceColor 2s ease-in-out`}:{"@keyframes newValueAnimationOnce":{"0%":{color:t?`#00f900 !important`:`#00f900`},"80%":{color:e.palette.mode===`dark`?t?`#518851 !important`:`#518851`:t?`#008000 !important`:`#008000`},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnce 2s ease-in-out`}}function dw(e,t){return typeof t==`string`?{"@keyframes blinkAnimationColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimationColor 2s ease-in-out infinite`}:{"@keyframes blinkAnimation":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimation 2s ease-in-out infinite`}}var fw={label:{fontWeight:`bold`,whiteSpace:`nowrap`},valueImage:{maxHeight:`100%`},valueAndUnit:{display:`flex`,gap:4,alignItems:`baseline`},value:{},unit:{fontSize:`smaller`,opacity:.7}},pw=class extends X{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t==`string`&&!t.trim().endsWith(`:`)&&(t=`${t.trim()}:`),t&&(t.includes(`<a `)||t.includes(`<br`)||t.includes(`<b>`)||t.includes(`<i>`))&&(t=Zt.renderTextWithA(t));let n;this.props.schema.size===`normal`?n=16:this.props.schema.size===`large`?n=20:typeof this.props.schema.size==`number`&&(n=this.props.schema.size);let r={width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,position:`relative`,fontSize:n};this.props.schema.narrow?r.gap=8:r.justifyContent=`space-between`;let i,a;this.props.schema.data&&typeof this.props.schema.data==`object`&&this.props.schema.data.en?a=this.getText(this.props.schema.data):typeof this.props.schema.data==`object`||this.props.schema.data===void 0||this.props.schema.data===null?a=JSON.stringify(this.props.schema.data):typeof this.props.schema.data==`number`?(a=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(a=a.replace(`.`,`,`))):a=this.props.schema.data.toString();let o=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data==`boolean`)i=_.createElement(O,{checked:this.props.schema.data,disabled:!0,size:this.props.schema.size===`small`?`small`:this.props.schema.size===`large`?`large`:void 0});else if(a.startsWith(`data:image/`))i=_.createElement(`div`,{style:{...fw.value,...fw.valueImage,...this.props.schema.styleValue||void 0}},_.createElement(Mt,{src:a}));else{let e={...fw.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=_.createElement(`div`,{style:e,dangerouslySetInnerHTML:{__html:a}}):Array.isArray(this.props.schema.data)?(o=!0,i=_.createElement(`div`,{style:e},this.props.schema.data.map((e,t)=>_.createElement(`div`,{key:t},typeof e==`object`||e==null?JSON.stringify(e):e)))):a.includes(`
|
|
1386
|
-
`)?(o=!0,i=_.createElement(`div`,{style:e},Zt.renderTextWithA(a))):i=_.createElement(`div`,{style:e},a)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){let e=uw(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),t=dw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{key:a,sx:{...e,...t}},i)}else if(this.props.schema.blinkOnUpdate){let e=uw(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=_.createElement(vt,{key:a,sx:e},i)}else if(this.props.schema.blink){let e=dw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{sx:e},i)}this.props.schema.unit&&(i=_.createElement(`div`,{style:fw.valueAndUnit},i,_.createElement(`div`,{style:{...fw.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let c;this.props.schema.copyToClipboard&&(c=_.createElement(se,{className:`staticCopyButton`,style:{position:`absolute`,top:`calc(50% - 12px)`,right:0,cursor:`pointer`},onClick:()=>{Zt.copyToClipboard(a),window.alert(J.t(`jc_Copied`))}}));let l={"& .staticCopyButton":{display:`none`},"& .staticCopyButton:action":{transform:`scale(0.9)`},"&:hover .staticCopyButton":{display:`block`}};return this.props.schema.highlight&&(l[`&:hover`]={backgroundColor:this.props.oContext.themeType===`dark`?`#51515180`:`#b8b8b880`}),o&&(r.alignItems=`top`),_.createElement(vt,{component:`div`,style:r,sx:l},_.createElement(`div`,{style:{...fw.label,...this.props.schema.styleLabel||void 0}},s,t),i,c)}};g();var mw={fullWidth:{height:`100%`,width:`100%`},link:e=>({textDecoration:`underline`,color:e.palette.mode===`dark`?`#4dabf5`:`#254e72`,cursor:`pointer`})};function hw(e,t,n){let r,i=``;e?e.toString().startsWith(`#`)||e.toString().startsWith(`/`)?(r=t||`_self`,i=e):e.startsWith(`http://`)||e.startsWith(`https://`)?(r=t||`_blank`,i=e):(i=`#tab-instances/config/${n}/${e}`,r=t||`_self`):(i=`#tab-instances/config/${n}`,r=t||`_self`),r===`_self`?setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}//${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i):(i.startsWith(`#`)?i=`${window.location.protocol}//${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}//${window.location.host}${i}`),window.open(i,r))}var gw=class extends X{renderItem(e,t){if(this.props.schema.button){let e=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...mw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:e,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target,close:this.props.schema.close}):hw(e,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format===`html`)n=_.createElement(`div`,{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format===`json`)try{let e=typeof n==`string`?JSON.parse(n):n;n=_.createElement(`pre`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,margin:0}},JSON.stringify(e,null,2))}catch{}else n&&(n.includes(`<a `)||n.includes(`<br`)||n.includes(`<b>`)||n.includes(`<i>`))&&(n=Zt.renderTextWithA(n));return _.createElement(vt,{component:`span`,style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?mw.link:void 0,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target||`_blank`,close:this.props.schema.close}):hw(e,this.props.schema.target||`_blank`,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},n)}};g();var _w=1048576,vw={fullWidth:{width:`100%`},root:{width:`100%`},paper:{width:`100%`,marginBottom:16,backgroundColor:`rgba(255, 255, 255, 0.1)`},headerText:{width:`100%`},table:{minWidth:750},visuallyHidden:{border:0,clip:`rect(0 0 0 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,top:20,width:1},label:{display:`flex`,justifyContent:`space-between`},title:{flex:`1 1 100%`},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:`flex`,alignItems:`baseline`},filteredOut:{padding:10,display:`flex`,textAlign:`center`},buttonEmpty:{width:34,display:`inline-block`},buttonCell:{whiteSpace:`nowrap`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},uploadDiv:{position:`relative`,width:`100%`,minHeight:300,opacity:.9,marginTop:30,cursor:`pointer`,outline:`none`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,minHeight:300,position:`relative`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},buttonRemoveWrapper:{position:`absolute`,zIndex:222,right:0},error:{border:`2px solid red`,boxSizing:`border-box`},tooltip:{pointerEvents:`none`},cardHeader:e=>({color:e.palette.mode===`light`?e.palette.secondary.main:e.palette.text.primary,height:`100%`,fontWeight:`bold`,fontSize:20,fontStyle:`italic`,padding:`4px 16px`,backgroundColor:e.palette.primary.main,display:`flex`,justifyContent:`space-between`})};function yw(e,t,n){t||=`key`;let r=[];return Object.keys(e).forEach(i=>{let a={};a[t]=i,n?(a[n]=e[i],r.push(a)):r.push(Object.assign(a,e[i]))}),r}function bw(e,t,n){t||=`key`;let r={};return e.forEach(e=>{let i=e[t]??``;delete e[t],n?r[i]=e[n]:r[i]=e}),r}function xw(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function Sw(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}var Cw=class e extends X{constructor(t){super(t),K(this,`filterRefs`,void 0),K(this,`typingTimer`,null),K(this,`resizeTimeout`,null),K(this,`secret`,`Zgfr56gFe87jJOM`),K(this,`refDiv`,void 0),K(this,`listOfHiddenElements`,[]),K(this,`refreshBecauseOfHiddenElements`,null),K(this,`onTableRowError`,e=>(t,n)=>{let r={...this.state.tableErrors};r[e]||={},t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({tableErrors:r}),this.props.onError(t,n)}),K(this,`handleRequestSort`,(e,t=!1)=>{let{order:n,orderBy:r}=this.state,i=t?n:r===e&&n===`asc`?`desc`:`asc`,a=this.stableSort(i,e);JSON.stringify(a)!==JSON.stringify(this.state.value)&&this.setState({value:a,order:i,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,a))}),K(this,`stableSort`,(t,n)=>{let{value:r}=this.state,i=e.getComparator(t,n),a=r.map((e,t)=>({el:e,index:t}));return a.sort((e,t)=>{let n=i(e.el,t.el);return n===0?e.index-t.index:n}),a.map(e=>e.el)}),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);let n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(e=>{this.props.onError(e,void 0)}),delete n[e]);let r={};Object.keys(n).forEach(t=>{let i=parseInt(t,10);i>e?r[i-1]=n[i]:r[i]=n[i]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:r},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onChangeWrapper`,(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((e,t)=>{this.typingTimer=null;let n;if(this.props.schema.encryptedAttributes){let t=JSON.parse(JSON.stringify(e));if(t.forEach(e=>{this.props.schema.encryptedAttributes.forEach(t=>{e[t]&&(e[t]=xw(this.secret,e[t]))})}),this.props.schema.objKeyName){let e=bw(t,this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,e)}else n=this.onChange(this.props.attr,t)}else if(this.props.schema.objKeyName){let t=bw(JSON.parse(JSON.stringify(e)),this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,t)}else n=this.onChange(this.props.attr,e);n instanceof Promise&&n.catch(e=>console.error(`Cannot save: ${e}`)),t&&(this.applyFilter(!1,e),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`applyFilter`,(t,n,r)=>{n||=this.state.value;let i=n.map((e,t)=>t);if(Object.keys(this.filterRefs).forEach(r=>{let a=e.getFilterValue(this.filterRefs[r]);if(!t&&a){var o;a=a.toLowerCase();let e=(o=this.state.filterLabelMap)==null?void 0:o[r];i=i==null?void 0:i.filter(t=>{if(!n[t]||n[t][r]==null)return!1;if(n[t][r].toString().toLowerCase().includes(a))return!0;if(e){let i=e[n[t][r]];if(i!=null&&i.toLowerCase().includes(a))return!0}return!1})}else this.filterRefs[r].current&&e.setFilterValue(this.filterRefs[r],``)}),i&&i.length===n.length&&(i=null),i==null&&this.state.visibleValue===null){r==null||r();return}JSON.stringify(i)===JSON.stringify(this.state.visibleValue)?r&&r():this.setState({visibleValue:i},()=>r&&r())}),this.filterRefs={},this.props.schema.items||=[],this.props.schema.items=this.props.schema.items.filter(e=>X.isHostAllowed(e,this.props.oContext.hostInfo)),this.props.schema.items.forEach(e=>{e.filter&&e.attr&&(this.filterRefs[e.attr]=m())}),this.refDiv=_.createRef()}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[],t;if(t=this.props.schema.objKeyName?yw(e,this.props.schema.objKeyName,this.props.schema.objValueName):e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){var n;let t;try{t=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}this.secret=(t==null||(n=t.native)==null?void 0:n.secret)||this.secret,e.forEach(e=>{var t;(t=this.props.schema.encryptedAttributes)==null||t.forEach(t=>{e[t]||=Sw(this.secret,e[t])})})}let r=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`),i=[];if(r)try{i=JSON.parse(r)}catch{}this.setState({value:t,visibleValue:null,orderBy:``,order:`asc`,iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:i,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),this.resizeTimeout&&=(clearTimeout(this.resizeTimeout),null),this.refreshBecauseOfHiddenElements&&=(clearTimeout(this.refreshBecauseOfHiddenElements),null),super.componentWillUnmount()}itemTable(e,t,n,r){var i;let{schema:a}=this.props,o=(i=a.items)==null?void 0:i.find(t=>t.attr===e);if(!o)return null;let s={items:{[e]:o}};return _.createElement(jO,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(e,t)=>{let r=JSON.parse(JSON.stringify(this.state.value));r[n][e]=t,this.setState({value:r},()=>{this.validateUniqueProps(),this.onChangeWrapper(r,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:s,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(e,t)=>{let n=this.state.filterLabelMap[e],r={...n,...t};JSON.stringify(n)!==JSON.stringify(r)&&this.setState(t=>({filterLabelMap:{...t.filterLabelMap,[e]:r}}))},customComponents:this.props.customComponents,onHiddenChanged:r?(e,t)=>{if(t)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(e)||(this.listOfHiddenElements[n].push(e),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){let t=this.listOfHiddenElements[n].indexOf(e);t!==-1&&(this.listOfHiddenElements[n].splice(t,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(let n of this.props.schema.uniqueColumns){let r=[];this.state.value.find(i=>{let a=i[n];return r.includes(a)?(e||(e=n,t=a),this.onError(n,`is not unique`),!0):(r.push(a),!1)})||this.onError(n)}e?this.setState({errorMessage:J.t(`jc_Non-allowed duplicate entry "%s" in column "%s"`,t,e)}):this.setState({errorMessage:``})}static descendingComparator(e,t,n){return t[n]<e[n]?-1:+(t[n]>e[n])}static getComparator(t,n){return t===`desc`?(t,r)=>e.descendingComparator(t,r,n):(t,r)=>-e.descendingComparator(t,r,n)}static getFilterValue(e){var t;return e==null||(t=e.current)==null||(t=t.children[0])==null||(t=t.children[0])==null?void 0:t.value}static setFilterValue(e,t){e.current&&(e.current.children[0].children[0].value=t)}renderShowHideFilter(t){return!t.filter||!t.attr?null:_.createElement(Zn,{title:J.t(`jc_Show/hide filter input`),size:`small`,onClick:()=>{let n=[...this.state.filterOn];if(t.attr){let r=this.state.filterOn.indexOf(t.attr);r===-1?n.push(t.attr):n.splice(r,1),this.setState({filterOn:n},()=>{r&&e.getFilterValue(this.filterRefs[t.attr])&&(e.setFilterValue(this.filterRefs[t.attr],``),this.applyFilter())})}}},this.state.filterOn.includes(t.attr)?_.createElement(xe,null):_.createElement(U,null))}renderImportExportButtons(e){return _.createElement(_.Fragment,null,!e.noDelete&&e.import?_.createElement(Ce,{title:J.t(`jc_Import data from %s file`,`CSV`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.setState({showImportDialog:!0})},_.createElement(nr,null))):null,e.export?_.createElement(Ce,{title:J.t(`jc_Export data to %s file`,`CSV`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onExport()},_.createElement(we,null))):null,e.noDelete?null:_.createElement(Zn,{disabled:!0,size:`small`},_.createElement(me,null)))}renderAddButton(e){return _.createElement(Ce,{title:e?J.t(`jc_Cannot add items with set filter`):J.t(`jc_Add row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,color:`primary`,disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},_.createElement(re,null))))}enhancedTableHead(e,t){var n;let{schema:r}=this.props,{order:i,orderBy:a}=this.state;return _.createElement(fr,null,_.createElement(F,null,(n=r.items)==null?void 0:n.map((e,n)=>this.renderOneFilter({schema:r,style:{width:e.width},showAddButton:!n&&!r.noDelete,headCell:e,order:i,orderBy:a,index:n,doAnyFilterSet:t})),!r.noDelete&&_.createElement(Ee,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:`right`},padding:`checkbox`},this.renderImportExportButtons(r))))}onExport(){var e;let{schema:t}=this.props,{value:n}=this.state,r=(e=t.items)==null?void 0:e.map(e=>e.attr),i=r?[r.join(`;`)]:[];n.forEach(e=>{var n;let r=[];(n=t.items)==null||n.forEach(t=>{t.attr&&(e[t.attr]&&typeof e[t.attr]==`string`&&e[t.attr].includes(`;`)?r.push(`"${e[t.attr]}"`):r.push(e[t.attr]??``))}),i.push(r.join(`;`))});let a=document.createElement(`a`);a.setAttribute(`href`,`data:text/csv;charset=utf-8,${encodeURIComponent(i.join(`
|
|
1385
|
+
`,`autocompletion.css`,!1),t.AcePopup=g,t.$singleLineEditor=h,t.getAriaId=d}),ace.define(`ace/autocomplete/inline_screenreader`,[`require`,`exports`,`module`],function(e,t,n){t.AceInlineScreenReader=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement(`div`),this.screenReaderDiv.classList.add(`ace_screenreader-only`),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on(`afterRender`,function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r=`doc-tooltip `,i=0;i<this._lines.length;i++)r+=`ace-inline-screenreader-line-${i} `;n.setAttribute(`aria-describedby`,r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement(`pre`);e.setAttribute(`id`,`ace-inline-screenreader`);for(var t=0;t<this._lines.length;t++){var n=document.createElement(`code`);n.setAttribute(`id`,`ace-inline-screenreader-line-${t}`);var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}()}),ace.define(`ace/autocomplete/inline`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete/inline_screenreader`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`./inline_screenreader`).AceInlineScreenReader;t.AceInline=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n||=``,e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||=new i(e);var a=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return t.hideInlinePreview||!a||!a.startsWith(n)?!1:(this.editor=e,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(n.length),a===``?e.removeGhostText():e.setGhostText(a),!0)},e.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},e.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&=(this.inlineScreenReader.destroy(),null)},e}()}),ace.define(`ace/autocomplete/util`,[`require`,`exports`,`module`],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var a=0;a<i;a++)t(e[a],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t-1;a>=0&&n.test(e[a]);a--)i.push(e[a]);return i.reverse().join(``)},t.retrieveFollowingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t;a<e.length&&n.test(e[a]);a++)i.push(e[a]);return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)},t.triggerAutocomplete=function(e,t){var t=t??e.session.getPrecedingCharacter();return e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define(`ace/autocomplete`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`,`ace/autocomplete/popup`,`ace/autocomplete/inline`,`ace/autocomplete/popup`,`ace/autocomplete/util`,`ace/lib/lang`,`ace/lib/dom`,`ace/snippets`,`ace/config`,`ace/lib/event`,`ace/lib/scroll`],function(e,t,n){var r=e(`./keyboard/hash_handler`).HashHandler,i=e(`./autocomplete/popup`).AcePopup,a=e(`./autocomplete/inline`).AceInline,o=e(`./autocomplete/popup`).getAriaId,s=e(`./autocomplete/util`),c=e(`./lib/lang`),l=e(`./lib/dom`),u=e(`./snippets`).snippetManager,d=e(`./config`),f=e(`./lib/event`),p=e(`./lib/scroll`).preventParentScroll,m=function(e,t){t.completer&&t.completer.destroy()},h=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=c.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=c.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=c.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new _(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle(`ace_loading`,!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls(`autocomplete.loading`,`Loading...`),value:``}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on(`click`,function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on(`show`,this.$onPopupShow.bind(this)),this.popup.on(`hide`,this.$onHidePopup.bind(this)),this.popup.on(`select`,this.$onPopupChange.bind(this)),f.addListener(this.popup.container,`mouseout`,this.mouseOutListener.bind(this)),this.popup.on(`changeHoverMarker`,this.tooltipTimer.bind(null,null)),this.popup.renderer.on(`afterRender`,this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new a,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&typeof e.completer.onSeen==`function`&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.addEventListener(`wheel`,this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener(`scroll`,this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.removeEventListener(`wheel`,this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener(`scroll`,e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var a={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(a.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,s=o<a.top?{top:o,left:a.left}:a;this.popup.tryShow(s,n,`bottom`)||this.popup.tryShow(r,n,`top`)||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var a;this.stickySelection&&(a=this.popup.data.indexOf(i)),(!a||a===-1)&&(a=0),this.popup.setRow(this.autoSelect?a:-1),a===r&&i!==this.completions.filtered[a]&&this.$onPopupChange();var s=this.inlineRenderer&&this.inlineEnabled;if(a===r&&s){var c=this.popup.getData(this.popup.getRow());this.$updateGhostText(c)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off(`changeSelection`,this.changeListener),this.editor.off(`blur`,this.blurListener),this.editor.off(`mousedown`,this.mousedownListener),this.editor.off(`mousewheel`,this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off(`afterRender`,this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||=this.popup.getData(this.popup.getRow()),!e)return!1;if(e.value===``)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on(`changeSelection`,this.changeListener),e.on(`blur`,this.blurListener),e.on(`mousedown`,this.mousedownListener),e.on(`mousewheel`,this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||=new g(e),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:r});if(i==this.completions.filterText)return;if(this.completions.setFilter(i),!this.completions.filtered.length||this.completions.filtered.length==1&&this.completions.filtered[0].value==i&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,i,t);return}if(n&&n.matches){var r=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new _(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,``,t)}var a=this.editor.getSession(),r=this.editor.getCursorPosition(),i=s.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,o,function(n,r,i){var a=r.filtered,o=s.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!a.length){var c=!this.autoShown&&this.emptyMessage;if(typeof c==`function`&&(c=this.emptyMessage(o)),c){var l=[{caption:c,value:``}];this.completions=new _(l),this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_loading`,!1),this.popup.renderer.setStyle(`ace_empty-message`,!0);return}return this.detach()}if(a.length==1&&a[0].value==o&&!a[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&a.length==1)return this.insertMatch(a[0])}this.completions=!i&&this.showLoadingState?new _(e.completionsForLoading.concat(a),r.filterText):r,this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_empty-message`,!1),this.popup.renderer.setStyle(`ace_loading`,!i)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,a=0;a<i;a++){var o=this.editor.completers[a];if(o.getDocTooltip&&n.completerId===o.id){r=o.getDocTooltip(n);break}}if(!r&&typeof n!=`string`&&(r=n),typeof r==`string`&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=l.createElement(`div`),this.tooltipNode.style.margin=`0`,this.tooltipNode.style.pointerEvents=`auto`,this.tooltipNode.style.overscrollBehavior=`contain`,this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id=`doc-tooltip`,this.tooltipNode.setAttribute(`role`,`tooltip`),this.tooltipNode.addEventListener(`wheel`,p));var t=this.editor.renderer.theme;this.tooltipNode.className=`ace_tooltip ace_doc-tooltip `+(t.isDark?`ace_dark `:``)+(t.cssClass||``);var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,i=r.container.getBoundingClientRect(),a=400,o=300,s=r.renderer.scrollBar.width||10,c=i.left,u=window.innerWidth-i.right-s,d=r.isTopdown?window.innerHeight-s-i.bottom:i.top,f=[Math.min(u/a,1),Math.min(c/a,1),Math.min(d/o,1)*.9],m=Math.max.apply(Math,f),h=n.style;h.display=`block`,m==f[0]||f[0]>=1?(h.left=i.right+1+`px`,h.right=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[1]||f[1]>=1?(h.right=window.innerWidth-i.left+`px`,h.left=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[2]&&(h.left=i.left+`px`,h.right=``,h.maxWidth=Math.min(a,window.innerWidth-i.left)+`px`,r.isTopdown?(h.top=i.bottom+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.bottom,o)+`px`):(h.top=``,h.bottom=window.innerHeight-i.top+`px`,h.maxHeight=Math.min(i.top,o)+`px`)),l.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if(t.nodeName==`A`&&t.href){t.rel=`noreferrer`,t.target=`_blank`;break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off(`destroy`,m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e?t.completer:(t.completer&&=(t.completer.destroy(),null),d.get(`sharedPopups`)?(e.$sharedInstance||=new e,t.completer=e.$sharedInstance):(t.completer=new e,t.once(`destroy`,m)),t.completer)},e}();h.prototype.commands={Up:function(e){e.completer.goTo(`up`)},Down:function(e){e.completer.goTo(`down`)},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo(`start`)},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo(`end`)},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo(`down`)},Backspace:function(e){e.execCommand(`backspace`),!s.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},h.startCommand={name:`startAutocomplete`,exec:function(e,t){var n=h.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:`Ctrl-Space|Ctrl-Shift-Space|Alt-Space`};var g=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!this.completions||!this.completions.filtered?!1:this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:`insertMatch`}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),r||i)for(var a=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0,s;s=a[o];o++)s.start.column-=r,s.end.column+=i,e.session.remove(s);t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&typeof t.completer.onInsert==`function`&&t.completer.onInsert(e,t),t.command&&t.command===`startAutocomplete`&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand(`insertstring`,n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e),a=[];this.completers=e.completers;var o=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,r,i,function(n,r){c.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:c.hideInlinePreview})})),!n&&r&&(a=a.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:a,finished:--o===0})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,i=e.matches;this.completions=new _(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,a=null;if(this.gatherCompletions(e,function(e,t){if(this.active&&(e&&(n(e,[],!0),this.detach()),t.prefix.indexOf(t.prefix)===0)){if(i){a=t;return}r(t)}}.bind(this)),i=!1,a){var o=a;a=null,r(o)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){typeof e.cancel==`function`&&e.cancel()})},e}(),_=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||``,this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var a=0,o;o=e[a];a++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var c=-1,l=0,u=0,d,f;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(i);if(p>-1)u=p;else for(var m=0;m<t.length;m++){var h=s.indexOf(i[m],c+1),g=s.indexOf(r[m],c+1);if(d=h>=0&&(g<0||h<g)?h:g,d<0)continue e;f=d-c-1,f>0&&(c===-1&&(u+=10),u+=f,l|=1<<m),c=d}}o.matchMask=l,o.exactMatch=+!u,o.$score=(o.score||0)-u,n.push(o)}}return n},e}();t.Autocomplete=h,t.CompletionProvider=g,t.FilteredList=_}),ace.define(`ace/marker_group`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal(`changeBackMarker`)},e.prototype.update=function(e,t,n,r){if(!(!this.markers||!this.markers.length))for(var i=r.firstRow,a=r.lastRow,o,s=0,c=0,l=0;l<this.markers.length;l++){var u=this.markers[l];if(!(u.range.end.row<i)&&!(u.range.start.row>a)&&(u.range.start.row===c?s++:(c=u.range.start.row,s=0),!(s>200))){var d=u.range.clipRows(i,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var f=d.toScreenRange(n);if(f.isEmpty()){o=n.getNextFoldLine(d.end.row,o),o&&o.end.row>d.end.row&&(i=o.end.row);continue}this.markerType===`fullLine`?t.drawFullLineMarker(e,f,u.className,r):f.isMultiLine()?this.markerType===`line`?t.drawMultiLineMarker(e,f,u.className,r):t.drawTextMarker(e,f,u.className,r):t.drawSingleLineMarker(e,f,u.className+` ace_br15`,r)}}}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),ace.define(`ace/autocomplete/text_completer`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){function r(e,t){return e.getTextRange(a.fromPoints({row:0,column:0},t)).split(o).length-1}function i(e,t){var n=r(e,t),i=e.getValue().split(o),a=Object.create(null),s=i[n];return i.forEach(function(e,t){if(!(!e||e===s)){var r=Math.abs(n-t),o=i.length-r;a[e]=a[e]?Math.max(o,a[e]):o}}),a}var a=e(`../range`).Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id=`textCompleter`,t.getCompletions=function(e,t,n,r,a){var o=i(t,n);a(null,Object.keys(o).map(function(e){return{caption:e,value:e,score:o[e],meta:`local`}}))}}),ace.define(`ace/ext/language_tools`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete`,`ace/config`,`ace/lib/lang`,`ace/autocomplete/util`,`ace/marker_group`,`ace/autocomplete/text_completer`,`ace/editor`,`ace/config`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`../autocomplete`).Autocomplete,a=e(`../config`),o=e(`../lib/lang`),s=e(`../autocomplete/util`),c=e(`../marker_group`).MarkerGroup,l=e(`../autocomplete/text_completer`),u={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var a=e.session.getState(n.row),o=t.$mode.getCompletions(a,t,n,r);o=o.map(function(e){return e.completerId=u.id,e}),i(null,o)},id:`keywordCompleter`},d=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||``}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},f={getCompletions:function(e,t,n,i,a){var o=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push(`html-tag`):o=r.getActiveScopes(e);var c=r.snippetMap,l=[];o.forEach(function(e){for(var t=c[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&l.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+`⇥ `:`snippet`,completerId:f.id})}},this),a(null,l)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=[`<b>`,o.escapeHTML(e.caption),`</b>`,`<hr></hr>`,o.escapeHTML(d(e.snippet))].join(``))},id:`snippetCompleter`},p=[f,l,u];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=l,t.keyWordCompleter=u,t.snippetCompleter=f;var m={name:`expandSnippet`,exec:function(e){return r.expandWithTab(e)},bindKey:`Tab`},h=function(e,t){g(t.session.$mode)},g=function(e){typeof e==`string`&&(e=a.$modes[e]),e&&(r.files||={},_(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},_=function(e,t){!t||!e||r.files[e]||(r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g(`ace/mode/`+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name===`backspace`)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name===`insertstring`&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):x(e)}},y,b=o.delayedCall(function(){x(y)},0),x=function(e){var t=e.editor,n=s.getCompletionPrefix(t),r=e.args,a=s.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||a){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e(`../editor`).Editor;e(`../config`).defineOptions(S.prototype,`editor`,{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||=Array.isArray(e)?e:p,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||=Array.isArray(e)?e:p,this.commands.on(`afterExec`,v)):this.commands.off(`afterExec`,v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on(`changeMode`,h),h(null,this)):(this.commands.removeCommand(m),this.off(`changeMode`,h))},value:!1}}),t.MarkerGroup=c}),(function(){ace.require([`ace/ext/language_tools`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g(),EC(),DC(),OC(),kC(),AC(),jC();var MC={jsonError:{border:`1px solid red`,minHeight:200},jsonNoError:{border:`1px solid #00000000`,minHeight:200}};function NC(e){return _.createElement(TC,{style:e.error===!0?MC.jsonError:e.error===!1?MC.jsonNoError:void 0,mode:e.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:e.editValueMode,showGutter:e.editValueMode,highlightActiveLine:e.editValueMode,defaultValue:e.defaultValue,theme:e.themeType===`dark`?`clouds_midnight`:`chrome`,value:e.value,readOnly:!e.onChange,onChange:t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t)},name:e.name||`UNIQUE_ID_OF_DIV1`,fontSize:e.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:e.editValueMode,tabSize:e.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}g();var PC={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},FC=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||`{}`;this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Ms.default.parse(e):JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:PC.flex},_.createElement(xt,{color:`grey`,style:PC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_JSON editor`))),o?_.createElement(fS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||{}})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...PC.wrapper,border:this.state.jsonError?`2px solid red`:`2px solid transparent`}},_.createElement(NC,{mode:this.props.schema.json5?`json5`:`json`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,jsonError:this.validateJson(e)}),name:`ConfigJsonEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?_.createElement(_n,null,this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var IC=[{value:`en`,label:`English`},{value:`de`,label:`Deutsch`},{value:`ru`,label:`русский`},{value:`pt`,label:`Portugues`},{value:`nl`,label:`Nederlands`},{value:`fr`,label:`français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Espanol`},{value:`pl`,label:`Polski`},{value:`uk`,label:`Український`},{value:`zh-cn`,label:`简体中文`}],LC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=[...IC];this.props.schema.system?t.unshift({value:``,label:J.t(`jc_System language`)}):t.unshift({value:``,label:J.t(`jc_none`)}),this.setState({value:this.props.schema.system?e||``:e||J.getLanguage(),selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value||!e.value&&!this.state.value);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:t,value:this.state.value||`_`,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation),onChange:e=>{let{value:t}=e.target;t===`_`&&(t=``),this.setState({value:t},()=>{if(this.props.attr){let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(e))}if(this.props.schema.changeGuiLanguage){if(t){var e,n;if(t===J.getLanguage())return;J.setLanguage(t),(e=(n=this.props.oContext).changeLanguage)==null||e.call(n)}else this.props.oContext.socket.getSystemConfig().then(e=>{if(e.common.language!==J.getLanguage()&&e.common.language){var t,n;J.setLanguage(e.common.language),(t=(n=this.props.oContext).changeLanguage)==null||t.call(n)}}).catch(e=>console.error(`Cannot read system config: ${e}`))}})}},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var RC=class extends X{constructor(e){super(e),K(this,`scrollRef`,void 0),this.scrollRef=_.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),X.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener(`scroll`,()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?_.createElement(nn,{maxWidth:`lg`,open:!0,onClose:(e,t)=>{t!==`escapeKeyDown`&&t!==`backdropClick`&&this.setState({showLicenseDialog:!1})}},_.createElement(Nt,null,this.props.schema.title?J.t(this.props.schema.title):J.t(`jc_License agreement`)),_.createElement(Tn,null,this.props.schema.licenseUrl?_.createElement(_.Fragment,null,this.state.loading?_.createElement(Ze,null):null,_.createElement(`pre`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?_.createElement(`div`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.props.schema.texts.map((e,t)=>this.props.schema.noTranslation?_.createElement(`p`,{key:t},e):_.createElement(`p`,{key:t},J.t(e)))):null),_.createElement(Et,null,this.props.schema.checkBox?_.createElement(kn,{control:_.createElement(O,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:J.t(this.props.schema.checkBox)}):null,_.createElement(xt,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{if(this.setState({showLicenseDialog:!1}),this.props.attr){let e=this.onChange(this.props.attr,!0);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},color:`primary`,variant:`contained`,startIcon:_.createElement(on,null)},this.props.schema.agreeText?J.t(this.props.schema.agreeText):J.t(`jc_Accept license`)),_.createElement(xt,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:`grey`,variant:`contained`,startIcon:_.createElement(De,null)},J.t(`jc_Close`)))):null}};g();var zC={indeterminate:{opacity:.5},control:{flexDirection:`row`,width:`100%`}},BC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e??=``,Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===X.DIFFERENT_VALUE?{_value:X.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(`,`,`.`),e===`-`))return null;let t=e===``?0:parseFloat(e);return e!==``&&Number.isNaN(t)?`jc_Not a number`:e!==``&&window.isFinite(t)?this.props.schema.min!==void 0&&t<this.props.schema.min?`jc_Too small`:this.props.schema.max!==void 0&&t>this.props.schema.max?`jc_Too big`:e===``||e===`-`||Number.isNaN(t)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){var n;let r=Array.isArray(this.state._value)||this.state._value===X.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0),r){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString(),value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:zC.indeterminate,fullWidth:!0,freeSolo:!0,value:r[0],getOptionSelected:(e,t)=>e.label===t.label,onChange:(e,t)=>{if(this.props.attr){let e=this.onChange(this.props.attr,t==null?void 0:t.value,()=>{this.setState({_value:t==null?void 0:t.value,oldValue:this.state._value})});e instanceof Promise&&e.catch(e=>console.error(e))}},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{...n,label:this.getText(this.props.schema.label),variant:`standard`,slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,readOnly:this.props.schema.readOnly||!1},input:{...n.slotProps.input,endAdornment:this.props.schema.unit?_.createElement(_.Fragment,null,this.getText(this.props.schema.unit,this.props.schema.noTranslation),n.slotProps.input.endAdornment):n.slotProps.input.endAdornment}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&=J.t(e));let i=parseFloat(((n=this.state._value)==null?void 0:n.toString().replace(`,`,`.`))||``);return _.createElement(Wt,{variant:`standard`,style:zC.control},_.createElement(ot,{sx:{"& .up-down":{display:`none`},"&:hover .up-down":{display:`block`}},variant:`standard`,type:Number.isNaN(i)?`text`:this.props.schema.min!==void 0&&this.props.schema.min>=0?`number`:`text`,fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??``,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value,n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{let e=parseFloat(t.toString().replace(`,`,`.`));Number.isNaN(e)?this.onChange(this.props.attr,t.toString().replace(`,`,`.`)):this.onChange(this.props.attr,e)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}};g();var VC=class extends X{constructor(e){super(e),K(this,`authWindow`,void 0),K(this,`oid`,void 0),K(this,`url`,void 0),K(this,`onTokensUpdated`,(e,t)=>{if(t!=null&&t.val){let e=JSON.parse(t.val);if(new Date(e.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:``})}),K(this,`onMessage`,e=>{if(e.origin===`https://oauth2.iobroker.in`&&(typeof e.data==`string`&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message==`string`&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){let i=(e.data||e.message).split(`:`);if(i[1]===`success`){var t;this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage(`close`,e.origin),this.authWindow=null}else{var n,r;(n=(r=this.props).onError)==null||n.call(r,i[2])}}}),this.state={...this.state,accessTokens:``,success:!1,blocked:!1,running:!1,pressed:!1,clientId:``,clientSecret:``,accessTokenError:``},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||`oauth2Tokens`}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener(`message`,this.onMessage,!1):window.attachEvent(`onmessage`,this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:X.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=X.getValue(this.props.data,this.props.schema.ownClientSecret));let t=await this.props.oContext.socket.getState(this.oid);if(t){let n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener(`message`,this.onMessage,!1):window.detachEvent(`onmessage`,this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith(`{`)&&(e=atob(e));let t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=X.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(e=>console.log(`Error occurred: ${e.toString()}`)))}catch(e){console.warn(e)}}onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:``),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||this.authWindow.closed===void 0?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n=``;if(this.state.accessTokens)try{let e=JSON.parse(this.state.accessTokens);n=new Date(e.access_token_expires_on).toLocaleString()}catch{}let r;r=this.state.accessTokens?this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):J.t(`jc_Renew %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):this.props.schema.label?this.getText(this.props.schema.label):J.t(`jc_Get %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));let i=this.getIcon();return _.createElement(`div`,{style:{width:`100%`,margin:`0 0 1rem 0`}},this.props.schema.ownClientId?_.createElement(ot,{value:this.state.clientId,onChange:e=>{let t=e.target.value;this.setState({clientId:t},()=>this.onChange(this.props.schema.ownClientId,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:J.t(`jc_OAuth Client ID`),slotProps:{input:{endAdornment:this.state.clientId?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientId:``},()=>this.onChange(this.props.schema.ownClientId,``))},_.createElement(De,null)):null}}}):null,this.props.schema.ownClientSecret?_.createElement(ot,{value:this.state.clientSecret,onChange:e=>{let t=e.target.value;this.setState({clientSecret:t},()=>this.onChange(this.props.schema.ownClientSecret,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:J.t(`jc_OAuth Client secret`),slotProps:{input:{endAdornment:this.state.clientSecret?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientSecret:``},()=>this.onChange(this.props.schema.ownClientSecret,``))},_.createElement(De,null)):null}}}):null,_.createElement(xt,{disabled:this.state.running||!!(this.props.schema.ownClientSecret&&!this.state.clientSecret)||!!(this.props.schema.ownClientId&&!this.state.clientId),endIcon:i||_.createElement(je,null),variant:`contained`,onClick:()=>this.onOpenUrl()},r),this.state.blocked?_.createElement(`div`,{style:{color:`red`,fontSize:16,marginTop:20}},J.t(`jc_Please allow popups in your browser for this page!`)):null,this.state.accessTokens?_.createElement(`div`,{style:{color:`green`,fontSize:16,marginTop:20}},this.props.alive?J.t(`jc_Successfully authorized. Token valid till %s and will be automatically renewed.`,n):J.t(`jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,n)):null,this.state.pressed?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{width:`100%`,margin:`1rem 0 1rem 0`}},_.createElement(`span`,{style:{marginRight:4}},`${J.t(`jc_If the button above does not work, you can authorize manually this app by visiting this url`)}`,`:`),_.createElement(`br`,null),_.createElement(`a`,{target:this.props.schema.identifier,href:this.url,rel:`noreferrer`},this.url)),_.createElement(ot,{value:this.state.accessTokens,label:J.t(`jc_Enter the code from that page here`),variant:`standard`,error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||``,onChange:e=>{let t=e.target.value;try{t!=null&&t.trim()&&!t.trim().startsWith(`{`)&&(t=atob(t.trim()))}catch{this.setState({accessTokenError:`Invalid access token. Cannot decode from base64`})}if(t!=null&&t.startsWith(`{`))try{let e=JSON.parse(t);e.access_token&&(e.access_token_expires_on=new Date(Date.now()+(e.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(e),accessTokenError:``},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:t,accessTokenError:`Invalid access token. Cannot parse JSON`})}else t&&this.setState({accessTokens:t,accessTokenError:`Invalid access token. Not JSON`})},fullWidth:!0})):null)}};g();var HC={flex:{display:`flex`},button:{maxHeight:48,marginLeft:4,minWidth:48}},UC=class extends X{constructor(...e){super(...e),K(this,`fillOnSelect`,[]),K(this,`onObjectChanged`,async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{let e=t&&await this.getCachedObject(t);if(e){for(let t of this.fillOnSelect)if(t.overwrite||!X.getValue(this.props.data,t.attr)){let n=X.getValue(e,t.pathInObject);typeof n==`object`&&(n=this.getText(n,!0)),await this.onChange(t.attr,n)}}}catch(e){console.error(e.toString())}})}async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;if(this.props.schema.fillOnSelect){let e=this.props.schema.fillOnSelect.split(`,`).map(e=>e.trim());for(let t of e){let e=t.split(`=>`);if(e.length===2){let t={pathInObject:e[0],attr:e[1]};(t.attr.includes(`(X)`)||t.attr.includes(`(x)`))&&(t.overwrite=!0,t.attr=t.attr.replace(/\(X\)|\(x\)/g,``)),this.fillOnSelect.push(t)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}renderItem(e,t){if(!this.state.initialized)return null;let n=this.props.oContext.socket,{schema:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},r.label?_.createElement(rr,{shrink:!0},this.getText(r.label)):null,_.createElement(`div`,{style:HC.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:a,error:!!e,disabled:t,placeholder:this.getText(r.placeholder),label:this.getText(r.label),helperText:this.renderHelp(r.help,r.helpLink,r.noTranslation),onChange:e=>{let t=Array.isArray(e.target.value)?e.target.value[0]:e.target.value;this.setState({value:t},()=>i&&void this.onObjectChanged(i,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:HC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},`...`)),o?_.createElement(wn,{imagePrefix:this.props.oContext.imagePrefix??`../..`,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:r.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:r.types?Array.isArray(r.types)?r.types:[r.types]:void 0,customFilter:r.customFilter,filters:r.filters,socket:n,selected:a,root:r.root,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({showSelectId:!1,value:t},()=>i&&void this.onObjectChanged(i,t))}}):null)}};g();var WC={fullWidth:{width:`100%`,display:`inline-block`},halfWidth1:{width:`calc(50% - 5px)`,display:`inline-block`,marginRight:8},halfWidth2:{width:`calc(50% - 5px)`,display:`inline-block`}},GC=`____ppp____`,KC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?GC:``,_visible:!1,value:e?GC:``,_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);let n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,J.t(`jc_Passwords are not equal!`));else{this.onError(this.props.attr);let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(this.props.attr,e))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;let n=_.createElement(ot,{variant:`standard`,fullWidth:!0,type:this.state._visible&&this.state.value!==GC?`text`:`password`,value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(e.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:`new-password`,endAdornment:this.state.value&&this.state.value!==GC&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?_.createElement(At,{position:`end`},_.createElement(Zn,{size:`large`,tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:`end`},this.state._visible?_.createElement($n,null):_.createElement(I,null))):void 0},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){let r=this.state._visible?null:_.createElement(ot,{variant:`standard`,fullWidth:!0,type:`password`,value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(void 0,e.target.value),label:`${this.getText(this.props.schema.label)} (${J.t(`jc_repeat`)})`,slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return _.createElement(`div`,{style:WC.fullWidth},_.createElement(`div`,{style:WC.halfWidth1},n),_.createElement(`div`,{style:WC.halfWidth2},r))}return n}};g();var qC=class extends X{constructor(...e){super(...e),K(this,`checkTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),_.createElement(ot,{variant:`standard`,fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:async()=>{Zt.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.pattern||``,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var JC={warning:{"& .Mui-error":{color:`orange`}}},YC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);e??=``,this.setState({_value:e.toString(),oldValue:e.toString()});let t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,r=await this.getCachedObject(n),i=r==null?void 0:r.common.host,a=[];t.forEach(e=>{var t,r;if(!e||e._id===n||e.common.host!==i||!((t=e.native)!=null&&t.bind))return;if(e!=null&&e.native&&e.native.secure&&e.native.leEnabled&&e.native.leUpdate){let t=parseInt(e.native.leCheckPort||e.native.lePort,10);if(t){var o;a.push({name:`${e._id.replace(`system.adapter.`,``)} (LE)`,port:t,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,bind:e.native.bind,enabled:!!((o=e.common)!=null&&o.enabled)})}}let s=parseInt(e==null||(r=e.native)==null?void 0:r.port,10);if(s){var c;a.push({name:e._id.replace(`system.adapter.`,``),bind:e.native.bind,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,port:s,enabled:!!((c=e.common)!=null&&c.enabled)})}}),this.setState({ports:a})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;let t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();let r=e===``?0:parseInt(e,10);return e!==``&&Number.isNaN(r)?`jc_Not a number`:e!==``&&window.isFinite(Number(e))?r<t?`jc_Too small`:r>n?`jc_Too big`:e===``||e===`-`||Number.isNaN(r)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0);let n=this.props.schema.min??20,r=this.props.schema.max||65535,i;if(this.state.ports){let t=parseInt(this.state._value,10);if(t){let n=this.props.data.bind,r=this.state.ports.filter(e=>{if(e.port!==t)return!1;let r=e.bind,i=e.v6bind;return!n||!r||n===`0.0.0.0`||r===`0.0.0.0`||n===`::`||i===`::`||n===r||n===i}),a=r.findIndex(e=>e.port===t&&e.enabled);if(a!==-1){let n=this.state.ports.find(e=>e.port===t&&e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port is already used by %s`,(n==null?void 0:n.name)||r[a].name)}else if(a=r.findIndex(e=>e.port===t&&!e.enabled),a!==-1){i=!0;let n=this.state.ports.find(e=>e.port===t&&!e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port could be used by %s`,(n==null?void 0:n.name)||r[a].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e==`string`&&(e=J.t(e))),_.createElement(ot,{variant:`standard`,type:`number`,fullWidth:!0,slotProps:{htmlInput:{min:n,max:r,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??``,error:!!e,disabled:!!t,sx:i?JC.warning:void 0,onChange:e=>{let t=Number(e.target.value.toString().replace(/[^0-9]/g,``)).toString(),n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{if(t.trim()===parseInt(t,10).toString()){let e=this.onChange(this.props.attr,parseInt(t,10)||0);e instanceof Promise&&e.catch(e=>{console.error(`Cannot set value for ${this.props.attr}: ${e}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var XC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`rooms`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.rooms.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(e=>console.error(`Cannot get enums: ${e}`))}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var ZC={fullWidth:{width:`100%`},noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}},QC=class extends X{constructor(...e){super(...e),K(this,`initialValue`,``)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]);let t=[];for(let e of this.props.schema.options||[]){let n=e;if(Array.isArray(n.items)){t.push({label:this.getText(e.label,this.props.schema.noTranslation),value:e.value,group:!0,hidden:n.hidden,os:n.os,notOs:n.notOs,docker:n.docker,color:e.color,description:this.getText(e.description)});for(let e of n.items)t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,inGroup:!0,hidden:e.hidden,os:e.os,notOs:e.notOs,docker:e.docker,color:e.color,description:this.getText(e.description),icon:e.icon})}else t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,os:e.os,notOs:e.notOs,docker:e.docker,color:e.color,description:this.getText(e.description),icon:e.icon})}if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)!n.group&&n.value!==X.DIFFERENT_VALUE&&(e[n.value.toString()]=n.label);this.props.onFilterLabelUpdate(this.props.attr,e)}let n=Array.isArray(e)&&!this.props.schema.multiple;n&&(this.initialValue=[...e],t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE})),await this.evaluateHidden(t),n?this.setState({value:X.DIFFERENT_VALUE,selectOptions:t}):this.setState({value:e,selectOptions:t})}async evaluateHidden(e){let t=!1,n=!1;for(let r of e){let e=await this.isHidden(r);r.group?n=e:r.inGroup?e||=n:n=!1,r.hiddenValue!==e&&(r.hiddenValue=e,t=!0)}return t}async componentDidUpdate(e){if(e.data===this.props.data||!this.state.selectOptions||!this.state.selectOptions.some(e=>typeof e.hidden==`string`))return;let t=this.state.selectOptions.map(e=>({...e}));await this.evaluateHidden(t)&&this.setState({selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return X.isHostAllowed(e,this.props.oContext.hostInfo)?e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1:!0}renderRadio(e,t){var n;let r=(n=this.state.selectOptions)==null?void 0:n.filter(e=>!e.hiddenValue&&!e.group),i=this._getValue();return _.createElement(Wt,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Qt,null,this.getText(this.props.schema.label)):null,_.createElement(Oe,{row:!!this.props.schema.horizontal,value:i==null?``:i.toString(),onChange:e=>{let t=r==null?void 0:r.find(t=>t.value.toString()===e.target.value),n=t?t.value:e.target.value;this.setState({value:n},()=>{let e=this.onChange(this.props.attr,n);e instanceof Promise&&e.catch(e=>console.error(e))})}},r==null?void 0:r.map((e,t)=>_.createElement(kn,{key:t,value:e.value.toString(),control:_.createElement(sn,null),title:e.description||``,label:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},e.icon?_.createElement(Mt,{src:e.icon,style:ZC.icon}):null,_.createElement(Pn,{component:`span`,style:{color:e.color}},e.label)),style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format===`radio`)return this.renderRadio(e,t);let n=this.state.selectOptions.filter(e=>!e.hiddenValue),r=this._getValue(),i=this.props.schema.multiple?null:n.find(e=>e.value==r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0,sx:this.props.table===void 0?void 0:ZC.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:r||`_`,renderValue:e=>this.props.schema.multiple?_.createElement(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=n.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):i!=null&&i.color?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:ZC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,{style:{color:i.color}},i.label??e),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},_.createElement(Mt,{src:i.icon,style:ZC.icon}),e):e:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:ZC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,null,i.label),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>{let e;e=this.state.value===X.DIFFERENT_VALUE?this.onChange(this.props.attr,this.initialValue):this.onChange(this.props.attr,this.state.value),e instanceof Promise&&e.catch(e=>console.error(e))})}},n.map((e,t)=>e.group?_.createElement(tt,{key:t,style:{color:e.color}},_.createElement(`div`,null,e.label),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},e.description):null):_.createElement(z,{key:t,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?_.createElement(O,{checked:r.includes(e.value),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r.indexOf(e.value);n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,e.icon?_.createElement(Mt,{src:e.icon,style:ZC.icon}):null,_.createElement(er,{primary:e.label,secondary:e.description,slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}},style:{color:e.color}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var $C={menuPaper:{maxHeight:800}},ew=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null,this.setState({running:!0},async()=>{let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}try{let n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e);this.reportFilterLabels(n);for(let e of n)e.hiddenValue=await this.isHidden(e);this.setState({list:n,running:!1})}catch(e){console.error(`Cannot send command: ${e}`)}})}else{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value==null?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){var n;if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let r=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?J.t(`jc_Cannot retrieve options, as instance is offline`):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:r,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?_.createElement(At,{position:`end`},_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>this.setState({value:``},()=>this.onChange(this.props.attr,``))},_.createElement(De,null))):null}}});if(this.state.running)return _.createElement(Wn,{size:`24`});let i=(n=this.state.list)==null?void 0:n.filter(e=>!e.hiddenValue),a=i==null?void 0:i.find(e=>e.value===r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:this.props.schema.multiple?{"&.MuiSelect-paper":$C.menuPaper}:void 0,value:r||``,renderValue:e=>this.props.schema.multiple?_.createElement(vt,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=i==null?void 0:i.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):this.getText((a==null?void 0:a.label)||e,this.props.schema.noTranslation),onChange:e=>{let t=this.onChange(this.props.attr,e.target.value);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},i==null?void 0:i.map((e,t)=>e.group?_.createElement(tt,{key:t},_.createElement(`div`,null,this.getText(e.label,this.props.schema.noTranslation)),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},this.getText(e.description)):null):_.createElement(z,{key:t,value:e.value},this.props.schema.multiple?_.createElement(O,{checked:r==null?void 0:r.includes(e.value.toString()),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r==null?void 0:r.indexOf(e.value.toString());n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,_.createElement(er,{primary:this.getText(e.label),secondary:this.getText(e.description),slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var tw={fullWidth:{width:`100%`}};function nw(e){return e.split(`.`).reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function rw(e,t){var n;let r=e==null||(n=e.native)==null||(n=n.hardware)==null?void 0:n.networkInterfaces;if(!r)return null;let i;return Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv4`&&!e.address.startsWith(`172`)&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(nw(t)&nw(e.netmask),nw(e.address)&nw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv6`&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(nw(t)&nw(e.netmask),nw(e.address)&nw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(i=(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/),e.address))})}),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||(i=e.address)})}),i||null}var iw=class extends X{async componentDidMount(){await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){let n=await this.props.oContext.socket.getCurrentInstance(),r=await this.getCachedObject(`system.adapter.${n}`);if(r){var t;let n=await this.getCachedObject(`system.host.${r==null||(t=r.common)==null?void 0:t.host}`);if(n){let t=rw(n,window.location.hostname);if(t)e=`${t}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${r.common.host} for ${r._id}`);return}}}}await new Promise(t=>{this.setState({_error:``,_message:``,hostname:e},t)}),this.props.schema.onLoaded&&this._onClick().catch(e=>console.error(e))}renderErrorDialog(){return this.state._error?_.createElement(tn,{text:this.state._error,onClose:()=>this.setState({_error:``})}):null}renderMessageDialog(){return this.state._message?_.createElement(Tt,{text:this.state._message,onClose:()=>this.setState({_message:``})}):null}renderCopyDialog(){return this.state._copyDialog?_.createElement(fS,{title:this.getText(this.state._copyDialog.title||J.t(`jc_Result`)),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{qt(this.state._copyDialog.text),window.alert(J.t(`jc_Copied`)),this.setState({_copyDialog:null})},titleButtonApply:J.t(`jc_Copy content`)},_.createElement(`div`,{style:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},_.createElement(NC,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:`CopyDialog`,themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});let e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,``)}`,t=`${window.location.protocol}//${this.state.hostname.split(`:`).length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,``)}`,n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let r=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(r)}catch{console.error(`Cannot parse json data: ${r}`)}}n??=null,this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let r;this.props.schema.timeout&&(r=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:J.t(`jc_Request timed out`),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));let i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||`send`,n).then(async e=>{if(r&&=(clearTimeout(r),void 0),e!=null&&e.error){var t;if((t=this.props.schema.error)!=null&&t[e.error]){var n;let t=this.getText(this.props.schema.error[e.error]);(n=e.args)==null||n.forEach(e=>t=t.replace(`%s`,e)),this.setState({_error:t})}else this.setState({_error:e.error?typeof e.error==`string`?J.t(e.error):JSON.stringify(e.error):J.t(`jc_Error`)})}else{var i;if(e!=null&&e.command){var a,o;(a=(o=this.props.oContext).onBackEndCommand)==null||a.call(o,e.command);return}if(e!=null&&e.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(e!=null&&e.openUrl&&this.props.schema.openUrl)window.open(e.openUrl,e.window||this.props.schema.window||`_blank`);else if(e!=null&&e.result&&(i=this.props.schema.result)!=null&&i[e.result]){var s;let t=this.getText(this.props.schema.result[e.result]);(s=e.args)==null||s.forEach(e=>t=t.replace(`%s`,e)),window.alert(t)}if(e!=null&&e.native&&this.props.schema.useNative){for(let[t,n]of Object.entries(e.native))await this.onChangeAsync(t,n);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(e.native),this.props.data),300)}else e!=null&&e.result?window.alert(typeof e.result==`object`?JSON.stringify(e.result):e.result):e!=null&&e.copyDialog?this.setState({_copyDialog:e.copyDialog}):window.alert(J.t(`jc_Ok`));e!=null&&e.saveConfig&&this.props.onChange(void 0,null,void 0,!0)}}).catch(e=>{this.props.schema.error&&this.props.schema.error[e.toString()]?this.setState({_error:this.getText(this.props.schema.error[e.toString()])}):this.setState({_error:J.t(e.toString())||J.t(`jc_Error`)})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)throw Error(`Confirm dialog requested but no confirm data provided`);let t=null;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t||void 0,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:tw.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...tw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||``:J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(e=>console.error(e))}},this.props.schema.showProcess&&this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}};g();var aw={fullWidth:{width:`100%`}},ow=class extends X{async _onClick(){let e=this.props.schema.val;if(typeof e==`string`&&e.includes("${")){var t,n;e=await this.getPatternAsync(e,null,!0);let r=await this.getCachedObject(this.props.schema.id);(r==null||(t=r.common)==null?void 0:t.type)===`number`?e=parseFloat(e):(r==null||(n=r.common)==null?void 0:n.type)===`boolean`&&(e=e===`true`||e===!0||e===`1`||e===1)}let r=(this.props.schema.id||``).replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(r,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(e){this.props.schema.error&&this.props.schema.error[e.toString()]?window.alert(this.getText(this.props.schema.error[e.toString()])):window.alert(J.t(e.toString())||J.t(`jc_Error`))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)return null;let t;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:aw.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}};g();var sw={fullWidth:{width:`100%`},slider:{marginLeft:10,marginRight:10,width:`calc(100% - 20px)`}},cw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){let n=this.props.schema.min||0,r=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):``,a=[{value:n,label:n+i},{value:r,label:r+i}];return _.createElement(vt,{style:sw.fullWidth},this.props.schema.label?_.createElement(Pn,{gutterBottom:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{style:sw.slider,value:this.state._value,getAriaValueText:e=>e+i,step:this.props.schema.step||(r-n)/100,valueLabelDisplay:`auto`,marks:a,min:n,max:r,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({_value:t},()=>this.onChange(this.props.attr,t))}}),this.props.schema.help?_.createElement(Pn,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();function lw(e,t){return e===`edit`||e===`rename`?_.createElement(Ke,{style:t}):e===`delete`?_.createElement(me,{style:t}):e===`refresh`?_.createElement(ar,{style:t}):e===`newDevice`||e===`new`||e===`add`?_.createElement(re,{style:t}):e===`discover`||e===`search`?_.createElement(tr,{style:t}):e===`unpairDevice`||e===`unpair`?_.createElement(an,{style:t}):e===`pairDevice`||e===`pair`?_.createElement(Rn,{style:t}):e===`identify`?_.createElement(Kt,{style:t}):e===`play`?_.createElement(Xt,{style:t}):e===`stop`?_.createElement(M,{style:t}):e===`pause`?_.createElement(yn,{style:t}):e===`forward`||e===`next`?_.createElement(st,{style:t}):e===`rewind`||e===`previous`?_.createElement(de,{style:t}):e===`lamp`||e===`light`?_.createElement(Cn,{style:t}):e===`backlight`?_.createElement(ve,{style:t}):e===`dimmer`?_.createElement(ie,{style:t}):e===`socket`?_.createElement(wt,{style:t}):e===`settings`?_.createElement(V,{style:t}):e===`users`||e===`group`?_.createElement(pt,{style:t}):e===`user`?_.createElement(en,{style:t}):e===`qrcode`?_.createElement(jt,{style:t}):e===`connection`?_.createElement(R,{style:t}):e===`no-connection`?_.createElement(Fe,{style:t}):e===`visible`?_.createElement(I,{style:t}):null}g();function uw(e,t){return typeof t==`string`?{"@keyframes newStateAnimationOnceColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnceColor 2s ease-in-out`}:{"@keyframes newStateAnimationOnce":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnce 2s ease-in-out`}}var dw=class extends X{constructor(...e){super(...e),K(this,`controlTimeout`,null),K(this,`delayedUpdate`,{timer:null,value:null}),K(this,`onStateChanged`,(e,t)=>{let n=t?t.val:null;this.state.controlType===`button`||this.state.controlType===`switch`?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType===`slider`||this.state.controlType===`number`)?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n===this.state.stateValue?this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null):(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500))):(this.state.stateValue===null||this.state.stateValue===void 0?null:this.state.stateValue.toString())!==(n==null?null:n.toString())&&this.setState({stateValue:n})})}async getObjectID(){let e=(this.props.schema.oid||``).toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?`system.adapter.`:``}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var e;await super.componentDidMount();let t=await this.getObjectID(),n=await this.getCachedObject(t);if(n!=null&&(e=n.common)!=null&&e.states&&!this.props.schema.options){var r;if(Array.isArray(n==null||(r=n.common)==null?void 0:r.states)){let e={};n.common.states.forEach((t,n)=>{e[n.toString()]=t}),n.common.states=e}Object.keys(n.common.states).length||(n.common.states=void 0)}let i=this.props.schema.control||this.detectType(n);try{let e=await this.props.oContext.socket.getState(t);this.setState({stateValue:e?e.val:null,controlType:i,obj:n,objId:t},async()=>{let e=await this.getObjectID();await this.props.oContext.socket.subscribeState(e,this.onStateChanged)})}catch(e){console.error(`Cannot get state ${t}: ${e}`),this.setState({controlType:i,obj:n,objId:t})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}detectType(e){if(e||={},e.common||={},e.common.type===`boolean`){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return`button`;if(e.common.write||this.props.schema.controlled===!0)return`switch`}return`text`}return e.common.type===`number`&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?`select`:e.common.max===void 0?`input`:`slider`:`text`:e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?`select`:`input`:`text`}getNormalizedStates(){var e;let t;return this.props.schema.options?t=this.props.schema.options.map(e=>typeof e==`string`?{value:e,label:this.getText(e,this.props.schema.noTranslation)}:{value:e.value,label:this.getText(e.label,this.props.schema.noTranslation),color:e.color}):(e=this.state.obj)!=null&&e.common.states?(t=[],Object.keys(this.state.obj.common.states).forEach(e=>{t.push({value:e,label:this.getText(this.state.obj.common.states[e],this.props.schema.noTranslation)})})):t=[],t}renderItem(e,t){var n;if(!this.state.obj)return null;let r;if(this.state.controlType===`select`||!this.state.controlType&&(this.state.obj.common.type===`number`||this.state.obj.common.type===`string`)&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates(),n=e.find(e=>e.value===this.state.stateValue);r=_.createElement(Wt,{fullWidth:!0},_.createElement(rr,null,this.getText(this.props.schema.label)),_.createElement(Me,{value:this.state.stateValue??``,disabled:!!this.props.schema.readOnly||t,onChange:e=>{this.setState({stateValue:e.target.value},()=>{var e;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&this.props.oContext.socket.setState(this.state.objId,t,!1)})},renderValue:e=>n!=null&&n.color?_.createElement(`div`,{style:{color:n.color}},n.label):e},e.map(e=>_.createElement(z,{key:(e.value??``).toString(),value:e.value,style:{color:e.color}},`$`,e.label))))}else if(this.state.controlType===`button`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(n=this.state.obj.common.role)!=null&&n.includes(`button`))){let e=null;this.props.schema.falseImage&&(e=lw(this.props.schema.falseImage));let n=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);r=!n&&e?_.createElement(Zn,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},e):_.createElement(xt,{variant:this.props.schema.variant||`contained`,startIcon:e,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},n||(this.state.objId||``).split(`.`).pop())}else if(this.state.controlType===`input`||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type===`string`)r=_.createElement(`div`,{style:{width:`100%`,display:`flex`,flexDirection:`row`,gap:8,alignItems:`baseline`}},_.createElement(ot,{style:{flex:1},value:this.state.stateValue,variant:`standard`,disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:e=>{this.props.schema.setOnEnterKey&&e.key===`Enter`&&this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{var e;this.controlTimeout=null;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,t,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&_.createElement(xt,{variant:`outlined`,disabled:t,onClick:()=>{this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)}},this.getText(typeof this.props.schema.showEnterButton==`string`?this.props.schema.showEnterButton:`Set`)));else{var i,a,o,s;let e;this.props.schema.size===`normal`?e=16:this.props.schema.size===`large`?e=20:typeof this.props.schema.size==`number`&&(e=this.props.schema.size);let n=this.getText(this.props.schema.label,this.props.schema.noTranslation),c={display:`flex`,alignItems:`center`,fontSize:e||`1rem`,gap:8};this.props.schema.narrow||(c.width=`100%`,c.justifyContent=`space-between`),n.trim()&&!n.trim().endsWith(`:`)&&this.props.schema.addColon&&(n=`${n.trim()}:`);let l;this.props.schema.blinkOnUpdate&&(l=uw(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let u;this.props.schema.labelIcon&&(u=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let d;if(n&&u?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},u,n):n?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},n):u&&(d=u),this.state.controlType===`switch`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes(`switch`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=lw(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=lw(this.props.schema.trueImage,a?{marginRight:8}:void 0)),r=_.createElement(Pe,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,alignItems:`center`,fontSize:14}},_.createElement(`span`,{style:this.props.schema.falseTextStyle},n,e),r,_.createElement(`span`,{style:this.props.schema.trueTextStyle},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.controlType===`slider`||!this.state.controlType&&this.state.obj.common.type===`number`&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit===`%`)||(a=this.state.obj.common.role)!=null&&a.includes(`slider`)||(o=this.state.obj.common.role)!=null&&o.includes(`dimmer`)||(s=this.state.obj.common.role)!=null&&s.includes(`blind`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=lw(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=lw(this.props.schema.trueImage,a?{marginRight:8}:void 0));let o=this.props.schema.min??(this.state.obj.common.min||0),s=this.props.schema.max??this.state.obj.common.max??100,l=this.props.schema.step??(this.state.obj.common.step||1);r=_.createElement(Be,{style:{width:`100%`,flexGrow:1},min:o,max:s,disabled:!!this.props.schema.readOnly||t,step:l,value:this.state.stateValue,valueLabelDisplay:`auto`,valueLabelFormat:e=>{var t;let n=this.props.schema.digits===void 0?e.toString():e.toFixed(this.props.schema.digits);return this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`)),`${n}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||((t=this.state.obj)==null?void 0:t.common.unit)||``}`},onChange:(e,t)=>{Array.isArray(t)&&(t=t[0]),this.setState({stateValue:t},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},this.props.schema.controlDelay||0)})}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,width:`100%`,flexGrow:1,alignItems:`center`}},_.createElement(`span`,{style:{marginRight:16,...this.props.schema.falseTextStyle}},n,e),r,_.createElement(`span`,{style:{marginLeft:16,...this.props.schema.trueTextStyle}},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.obj.common.type===`number`&&this.state.obj.common.write&&!this.state.controlType){let e=this.props.schema.min??this.state.obj.common.min??void 0,n=this.props.schema.max??this.state.obj.common.max??void 0,i=this.props.schema.step??this.state.obj.common.step??void 0;r=_.createElement(ot,{variant:`standard`,style:{width:`100%`},value:this.state.stateValue,type:`number`,disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:e,max:n,step:i,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{if(this.controlTimeout=null,this.state.objId){let e=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,e,!1)}},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type===`boolean`){let e=null,t,n;this.state.stateValue?(t=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(e=lw(this.props.schema.falseImage,t?{marginRight:8}:void 0)),n=this.props.schema.trueTextStyle):(t=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(e=lw(this.props.schema.falseImage,t?{marginLeft:8}:void 0)),n=this.props.schema.falseTextStyle),n=Object.assign(c,n),r=_.createElement(`div`,{style:n},d,_.createElement(vt,{style:{display:`flex`,alignItems:`center`,gap:8},sx:l,key:this.props.schema.blinkOnUpdate?t:void 0},e,t||(this.state.stateValue?J.t(`jc_true`):J.t(`jc_false`))))}else{let e=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit,t=this.state.stateValue;if(t!=null&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates().find(e=>e.value.toString()===t.toString());e&&(t=e.label)}let n,i;this.state.controlType===`html`?(i=(t??``).toString(),n=_.createElement(`span`,{dangerouslySetInnerHTML:{__html:t}})):this.state.stateValue===null?(n=`null`,i=n):this.state.stateValue===void 0?(n=`undefined`,i=n):(this.props.schema.digits!==void 0&&typeof t==`number`?(n=t.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`))):n=(t??``).toString(),i=n),r=_.createElement(`div`,{style:c},d,_.createElement(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:4}},_.createElement(vt,{sx:l,key:this.props.schema.blinkOnUpdate?i:void 0},n),e?_.createElement(`span`,{style:{opacity:.7,fontSize:`smaller`}},e):null))}}return r}};g();var fw={fullWidth:e=>({width:`100%`,backgroundColor:e.palette.mode===`dark`?`#FFF`:`#000`,borderStyle:`hidden`}),primary:e=>({backgroundColor:e.palette.primary.main}),secondary:e=>({backgroundColor:e.palette.secondary.main})},pw=class extends X{renderItem(){return _.createElement(vt,{component:`hr`,sx:Zt.getStyle(this.props.oContext.theme,fw.fullWidth,this.props.schema.color===`primary`?fw.primary:this.props.schema.color===`secondary`?fw.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType===`dark`?`#333`:`#ddd`)},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}};g();var mw={header:e=>({width:`100%`,background:e.palette.primary.main,color:e.palette.primary.contrastText,padding:`4px !important`,borderRadius:`3px`,marginBlockEnd:0,marginBlockStart:0})},hw=class extends X{renderItem(){let e=`h5`;switch((this.props.schema.size||5).toString()){case`1`:e=`h1`;break;case`2`:e=`h2`;break;case`3`:e=`h3`;break;case`4`:e=`h4`;break;default:e=`h5`}return _.createElement(vt,{component:e,sx:mw.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}};g();var gw=class extends X{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(`.`)&&!e.startsWith(`http`)&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){let{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){let n=e.showInDialogSmallSize||100,r=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):``;return _.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Click to see in full size`)},_.createElement(`img`,{src:t,style:{cursor:`pointer`,width:`auto`,height:n,objectFit:`contain`},alt:``,onClick:()=>this.setState({showDialog:!0})})),` `,r?_.createElement(xt,{variant:`outlined`,color:`grey`,onClick:()=>this.setState({showDialog:!0})},r):null,this.state.showDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:`lg`},_.createElement(Tn,null,_.createElement(Mt,{src:t,style:{width:`100%`,height:`100%`,objectFit:`contain`}})),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showDialog:!1}),color:`primary`},J.t(`jc_Close`)))):null)}return _.createElement(`img`,{src:t,style:{cursor:e.href?`pointer`:void 0,width:`100%`,height:`100%`},onClick:e.href?()=>e.href&&window.open(e.href,`_blank`):void 0,alt:``})}};g();function _w(e,t,n){return typeof n==`string`?{"@keyframes newValueAnimationOnceColor":{"0%":{color:t?`${n} !important`:n},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnceColor 2s ease-in-out`}:{"@keyframes newValueAnimationOnce":{"0%":{color:t?`#00f900 !important`:`#00f900`},"80%":{color:e.palette.mode===`dark`?t?`#518851 !important`:`#518851`:t?`#008000 !important`:`#008000`},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnce 2s ease-in-out`}}function vw(e,t){return typeof t==`string`?{"@keyframes blinkAnimationColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimationColor 2s ease-in-out infinite`}:{"@keyframes blinkAnimation":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimation 2s ease-in-out infinite`}}var yw={label:{fontWeight:`bold`,whiteSpace:`nowrap`},valueImage:{maxHeight:`100%`},valueAndUnit:{display:`flex`,gap:4,alignItems:`baseline`},value:{},unit:{fontSize:`smaller`,opacity:.7}},bw=class extends X{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t==`string`&&!t.trim().endsWith(`:`)&&(t=`${t.trim()}:`),t&&(t.includes(`<a `)||t.includes(`<br`)||t.includes(`<b>`)||t.includes(`<i>`))&&(t=Zt.renderTextWithA(t));let n;this.props.schema.size===`normal`?n=16:this.props.schema.size===`large`?n=20:typeof this.props.schema.size==`number`&&(n=this.props.schema.size);let r={width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,position:`relative`,fontSize:n};this.props.schema.narrow?r.gap=8:r.justifyContent=`space-between`;let i,a;this.props.schema.data&&typeof this.props.schema.data==`object`&&this.props.schema.data.en?a=this.getText(this.props.schema.data):typeof this.props.schema.data==`object`||this.props.schema.data===void 0||this.props.schema.data===null?a=JSON.stringify(this.props.schema.data):typeof this.props.schema.data==`number`?(a=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(a=a.replace(`.`,`,`))):a=this.props.schema.data.toString();let o=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data==`boolean`)i=_.createElement(O,{checked:this.props.schema.data,disabled:!0,size:this.props.schema.size===`small`?`small`:this.props.schema.size===`large`?`large`:void 0});else if(a.startsWith(`data:image/`))i=_.createElement(`div`,{style:{...yw.value,...yw.valueImage,...this.props.schema.styleValue||void 0}},_.createElement(Mt,{src:a}));else{let e={...yw.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=_.createElement(`div`,{style:e,dangerouslySetInnerHTML:{__html:a}}):Array.isArray(this.props.schema.data)?(o=!0,i=_.createElement(`div`,{style:e},this.props.schema.data.map((e,t)=>_.createElement(`div`,{key:t},typeof e==`object`||e==null?JSON.stringify(e):e)))):a.includes(`
|
|
1386
|
+
`)?(o=!0,i=_.createElement(`div`,{style:e},Zt.renderTextWithA(a))):i=_.createElement(`div`,{style:e},a)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){let e=_w(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),t=vw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{key:a,sx:{...e,...t}},i)}else if(this.props.schema.blinkOnUpdate){let e=_w(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=_.createElement(vt,{key:a,sx:e},i)}else if(this.props.schema.blink){let e=vw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{sx:e},i)}this.props.schema.unit&&(i=_.createElement(`div`,{style:yw.valueAndUnit},i,_.createElement(`div`,{style:{...yw.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let c;this.props.schema.copyToClipboard&&(c=_.createElement(se,{className:`staticCopyButton`,style:{position:`absolute`,top:`calc(50% - 12px)`,right:0,cursor:`pointer`},onClick:()=>{Zt.copyToClipboard(a),window.alert(J.t(`jc_Copied`))}}));let l={"& .staticCopyButton":{display:`none`},"& .staticCopyButton:action":{transform:`scale(0.9)`},"&:hover .staticCopyButton":{display:`block`}};return this.props.schema.highlight&&(l[`&:hover`]={backgroundColor:this.props.oContext.themeType===`dark`?`#51515180`:`#b8b8b880`}),o&&(r.alignItems=`top`),_.createElement(vt,{component:`div`,style:r,sx:l},_.createElement(`div`,{style:{...yw.label,...this.props.schema.styleLabel||void 0}},s,t),i,c)}};g();var xw={fullWidth:{height:`100%`,width:`100%`},link:e=>({textDecoration:`underline`,color:e.palette.mode===`dark`?`#4dabf5`:`#254e72`,cursor:`pointer`})};function Sw(e,t,n){let r,i=``;e?e.toString().startsWith(`#`)||e.toString().startsWith(`/`)?(r=t||`_self`,i=e):e.startsWith(`http://`)||e.startsWith(`https://`)?(r=t||`_blank`,i=e):(i=`#tab-instances/config/${n}/${e}`,r=t||`_self`):(i=`#tab-instances/config/${n}`,r=t||`_self`),r===`_self`?setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}//${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i):(i.startsWith(`#`)?i=`${window.location.protocol}//${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}//${window.location.host}${i}`),window.open(i,r))}var Cw=class extends X{renderItem(e,t){if(this.props.schema.button){let e=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...xw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:e,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target,close:this.props.schema.close}):Sw(e,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format===`html`)n=_.createElement(`div`,{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format===`json`)try{let e=typeof n==`string`?JSON.parse(n):n;n=_.createElement(`pre`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,margin:0}},JSON.stringify(e,null,2))}catch{}else n&&(n.includes(`<a `)||n.includes(`<br`)||n.includes(`<b>`)||n.includes(`<i>`))&&(n=Zt.renderTextWithA(n));return _.createElement(vt,{component:`span`,style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?xw.link:void 0,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target||`_blank`,close:this.props.schema.close}):Sw(e,this.props.schema.target||`_blank`,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},n)}};g();var ww=1048576,Tw={fullWidth:{width:`100%`},root:{width:`100%`},paper:{width:`100%`,marginBottom:16,backgroundColor:`rgba(255, 255, 255, 0.1)`},headerText:{width:`100%`},table:{minWidth:750},visuallyHidden:{border:0,clip:`rect(0 0 0 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,top:20,width:1},label:{display:`flex`,justifyContent:`space-between`},title:{flex:`1 1 100%`},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:`flex`,alignItems:`baseline`},filteredOut:{padding:10,display:`flex`,textAlign:`center`},buttonEmpty:{width:34,display:`inline-block`},buttonCell:{whiteSpace:`nowrap`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},uploadDiv:{position:`relative`,width:`100%`,minHeight:300,opacity:.9,marginTop:30,cursor:`pointer`,outline:`none`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,minHeight:300,position:`relative`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},buttonRemoveWrapper:{position:`absolute`,zIndex:222,right:0},error:{border:`2px solid red`,boxSizing:`border-box`},tooltip:{pointerEvents:`none`},cardHeader:e=>({color:e.palette.mode===`light`?e.palette.secondary.main:e.palette.text.primary,height:`100%`,fontWeight:`bold`,fontSize:20,fontStyle:`italic`,padding:`4px 16px`,backgroundColor:e.palette.primary.main,display:`flex`,justifyContent:`space-between`})};function Ew(e,t,n){t||=`key`;let r=[];return Object.keys(e).forEach(i=>{let a={};a[t]=i,n?(a[n]=e[i],r.push(a)):r.push(Object.assign(a,e[i]))}),r}function Dw(e,t,n){t||=`key`;let r={};return e.forEach(e=>{let i=e[t]??``;delete e[t],n?r[i]=e[n]:r[i]=e}),r}function Ow(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function kw(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}var Aw=class e extends X{constructor(t){super(t),K(this,`filterRefs`,void 0),K(this,`typingTimer`,null),K(this,`resizeTimeout`,null),K(this,`secret`,`Zgfr56gFe87jJOM`),K(this,`refDiv`,void 0),K(this,`listOfHiddenElements`,[]),K(this,`refreshBecauseOfHiddenElements`,null),K(this,`onTableRowError`,e=>(t,n)=>{let r={...this.state.tableErrors};r[e]||={},t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({tableErrors:r}),this.props.onError(t,n)}),K(this,`handleRequestSort`,(e,t=!1)=>{let{order:n,orderBy:r}=this.state,i=t?n:r===e&&n===`asc`?`desc`:`asc`,a=this.stableSort(i,e);JSON.stringify(a)!==JSON.stringify(this.state.value)&&this.setState({value:a,order:i,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,a))}),K(this,`stableSort`,(t,n)=>{let{value:r}=this.state,i=e.getComparator(t,n),a=r.map((e,t)=>({el:e,index:t}));return a.sort((e,t)=>{let n=i(e.el,t.el);return n===0?e.index-t.index:n}),a.map(e=>e.el)}),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);let n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(e=>{this.props.onError(e,void 0)}),delete n[e]);let r={};Object.keys(n).forEach(t=>{let i=parseInt(t,10);i>e?r[i-1]=n[i]:r[i]=n[i]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:r},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onChangeWrapper`,(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((e,t)=>{this.typingTimer=null;let n;if(this.props.schema.encryptedAttributes){let t=JSON.parse(JSON.stringify(e));if(t.forEach(e=>{this.props.schema.encryptedAttributes.forEach(t=>{e[t]&&(e[t]=Ow(this.secret,e[t]))})}),this.props.schema.objKeyName){let e=Dw(t,this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,e)}else n=this.onChange(this.props.attr,t)}else if(this.props.schema.objKeyName){let t=Dw(JSON.parse(JSON.stringify(e)),this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,t)}else n=this.onChange(this.props.attr,e);n instanceof Promise&&n.catch(e=>console.error(`Cannot save: ${e}`)),t&&(this.applyFilter(!1,e),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`applyFilter`,(t,n,r)=>{n||=this.state.value;let i=n.map((e,t)=>t);if(Object.keys(this.filterRefs).forEach(r=>{let a=e.getFilterValue(this.filterRefs[r]);if(!t&&a){var o;a=a.toLowerCase();let e=(o=this.state.filterLabelMap)==null?void 0:o[r];i=i==null?void 0:i.filter(t=>{if(!n[t]||n[t][r]==null)return!1;if(n[t][r].toString().toLowerCase().includes(a))return!0;if(e){let i=e[n[t][r]];if(i!=null&&i.toLowerCase().includes(a))return!0}return!1})}else this.filterRefs[r].current&&e.setFilterValue(this.filterRefs[r],``)}),i&&i.length===n.length&&(i=null),i==null&&this.state.visibleValue===null){r==null||r();return}JSON.stringify(i)===JSON.stringify(this.state.visibleValue)?r&&r():this.setState({visibleValue:i},()=>r&&r())}),this.filterRefs={},this.props.schema.items||=[],this.props.schema.items=this.props.schema.items.filter(e=>X.isHostAllowed(e,this.props.oContext.hostInfo)),this.props.schema.items.forEach(e=>{e.filter&&e.attr&&(this.filterRefs[e.attr]=m())}),this.refDiv=_.createRef()}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[],t;if(t=this.props.schema.objKeyName?Ew(e,this.props.schema.objKeyName,this.props.schema.objValueName):e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){var n;let t;try{t=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}this.secret=(t==null||(n=t.native)==null?void 0:n.secret)||this.secret,e.forEach(e=>{var t;(t=this.props.schema.encryptedAttributes)==null||t.forEach(t=>{e[t]||=kw(this.secret,e[t])})})}let r=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`),i=[];if(r)try{i=JSON.parse(r)}catch{}this.setState({value:t,visibleValue:null,orderBy:``,order:`asc`,iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:i,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),this.resizeTimeout&&=(clearTimeout(this.resizeTimeout),null),this.refreshBecauseOfHiddenElements&&=(clearTimeout(this.refreshBecauseOfHiddenElements),null),super.componentWillUnmount()}itemTable(e,t,n,r){var i;let{schema:a}=this.props,o=(i=a.items)==null?void 0:i.find(t=>t.attr===e);if(!o)return null;let s={items:{[e]:o}};return _.createElement(RO,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(e,t)=>{let r=JSON.parse(JSON.stringify(this.state.value));r[n][e]=t,this.setState({value:r},()=>{this.validateUniqueProps(),this.onChangeWrapper(r,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:s,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(e,t)=>{let n=this.state.filterLabelMap[e],r={...n,...t};JSON.stringify(n)!==JSON.stringify(r)&&this.setState(t=>({filterLabelMap:{...t.filterLabelMap,[e]:r}}))},customComponents:this.props.customComponents,onHiddenChanged:r?(e,t)=>{if(t)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(e)||(this.listOfHiddenElements[n].push(e),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){let t=this.listOfHiddenElements[n].indexOf(e);t!==-1&&(this.listOfHiddenElements[n].splice(t,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(let n of this.props.schema.uniqueColumns){let r=[];this.state.value.find(i=>{let a=i[n];return r.includes(a)?(e||(e=n,t=a),this.onError(n,`is not unique`),!0):(r.push(a),!1)})||this.onError(n)}e?this.setState({errorMessage:J.t(`jc_Non-allowed duplicate entry "%s" in column "%s"`,t,e)}):this.setState({errorMessage:``})}static descendingComparator(e,t,n){return t[n]<e[n]?-1:+(t[n]>e[n])}static getComparator(t,n){return t===`desc`?(t,r)=>e.descendingComparator(t,r,n):(t,r)=>-e.descendingComparator(t,r,n)}static getFilterValue(e){var t;return e==null||(t=e.current)==null||(t=t.children[0])==null||(t=t.children[0])==null?void 0:t.value}static setFilterValue(e,t){e.current&&(e.current.children[0].children[0].value=t)}renderShowHideFilter(t){return!t.filter||!t.attr?null:_.createElement(Zn,{title:J.t(`jc_Show/hide filter input`),size:`small`,onClick:()=>{let n=[...this.state.filterOn];if(t.attr){let r=this.state.filterOn.indexOf(t.attr);r===-1?n.push(t.attr):n.splice(r,1),this.setState({filterOn:n},()=>{r&&e.getFilterValue(this.filterRefs[t.attr])&&(e.setFilterValue(this.filterRefs[t.attr],``),this.applyFilter())})}}},this.state.filterOn.includes(t.attr)?_.createElement(xe,null):_.createElement(U,null))}renderImportExportButtons(e){return _.createElement(_.Fragment,null,!e.noDelete&&e.import?_.createElement(Ce,{title:J.t(`jc_Import data from %s file`,`CSV`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.setState({showImportDialog:!0})},_.createElement(nr,null))):null,e.export?_.createElement(Ce,{title:J.t(`jc_Export data to %s file`,`CSV`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onExport()},_.createElement(we,null))):null,e.noDelete?null:_.createElement(Zn,{disabled:!0,size:`small`},_.createElement(me,null)))}renderAddButton(e){return _.createElement(Ce,{title:e?J.t(`jc_Cannot add items with set filter`):J.t(`jc_Add row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,color:`primary`,disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},_.createElement(re,null))))}enhancedTableHead(e,t){var n;let{schema:r}=this.props,{order:i,orderBy:a}=this.state;return _.createElement(fr,null,_.createElement(F,null,(n=r.items)==null?void 0:n.map((e,n)=>this.renderOneFilter({schema:r,style:{width:e.width},showAddButton:!n&&!r.noDelete,headCell:e,order:i,orderBy:a,index:n,doAnyFilterSet:t})),!r.noDelete&&_.createElement(Ee,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:`right`},padding:`checkbox`},this.renderImportExportButtons(r))))}onExport(){var e;let{schema:t}=this.props,{value:n}=this.state,r=(e=t.items)==null?void 0:e.map(e=>e.attr),i=r?[r.join(`;`)]:[];n.forEach(e=>{var n;let r=[];(n=t.items)==null||n.forEach(t=>{t.attr&&(e[t.attr]&&typeof e[t.attr]==`string`&&e[t.attr].includes(`;`)?r.push(`"${e[t.attr]}"`):r.push(e[t.attr]??``))}),i.push(r.join(`;`))});let a=document.createElement(`a`);a.setAttribute(`href`,`data:text/csv;charset=utf-8,${encodeURIComponent(i.join(`
|
|
1387
1387
|
`))}`);let o=new Date;a.setAttribute(`download`,`${o.getFullYear()}_${(o.getMonth()+1).toString().padStart(2,`0`)}_${o.getDate().toString().padStart(2,`0`)}_${this.props.oContext.adapterName}.${this.props.oContext.instance}_${this.props.attr}.csv`),a.style.display=`none`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}onImport(e){let t=e.split(`
|
|
1388
|
-
`).map(e=>e.replace(`\r`,``).trim()),{schema:n}=this.props,r=((t==null?void 0:t.shift())||``).split(`;`).filter(e=>{var t;return e&&((t=n.items)==null?void 0:t.find(t=>t.attr===e))}),i=[];if(t.forEach(e=>{let t=e.split(`;`),n={};for(let e=0;e<t.length;e++){let i=t[e];if(i.startsWith(`"`)){for(i=i.substring(1);e<t.length&&!i.endsWith(`"`);)i+=`;${t[++e]}`;i=i.substring(0,i.length-1)}let o=i;if(i===`true`)o=!0;else if(i===`false`)o=!1;else if(window.isFinite(i)){var a;let t=(a=this.props.schema.items)==null?void 0:a.find(t=>t.attr===r[e]);o=t&&t.type===`number`?parseFloat(i):i}else o=i;n[r[e]]=o}i.push(n)}),i.length){var a;(a=this.state.value)!=null&&a.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1})}else window.alert(`jc_No data found in file`)}isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(t=>e.getFilterValue(this.filterRefs[t]))}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onDrop(e){let t=e[0],n=new FileReader;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>_w){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(_w/1024)));return}let e=new Uint8Array(n.result).reduce((e,t)=>e+String.fromCharCode(t),``);this.onImport(e)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:`md`},_.createElement(Nt,null,J.t(`jc_Append or replace?`)),_.createElement(Tn,null,J.t(`jc_Append %s entries or replace existing?`,this.state.showTypeOfImportDialog.length)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>{let e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Append`)),_.createElement(xt,{variant:`contained`,color:`secondary`,autoFocus:!0,onClick:()=>{let e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Replace`)))):null}showImportDialog(){return this.state.showImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:`md`,fullWidth:!0},_.createElement(Nt,null,J.t(`jc_Import from %s`,`CSV`)),_.createElement(Tn,null,_.createElement(or,{multiple:!1,accept:{"text/csv":[`.csv`]},maxSize:_w,onDragEnter:()=>this.setState({uploadFile:`dragging`}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:t})=>_.createElement(`div`,{style:{...vw.uploadDiv,...this.state.uploadFile===`dragging`?vw.uploadDivDragging:void 0,...vw.dropZone,...this.state.icon?void 0:vw.dropZoneEmpty},...e()},_.createElement(`input`,{...t()}),_.createElement(`div`,{style:vw.uploadCenterDiv},_.createElement(`div`,{style:vw.uploadCenterTextAndIcon},_.createElement(nr,{style:vw.uploadCenterIcon}),_.createElement(`div`,{style:vw.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`))))))),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showImportDialog:!1}),color:`primary`,startIcon:_.createElement(De,null)},J.t(`jc_Cancel`)))):null}renderOneFilter(t){return _.createElement(Ee,{key:`${t.headCell.attr}_${t.index}`,style:t.style,align:`left`,sortDirection:t.orderBy===t.headCell.attr&&t.order},_.createElement(`div`,{style:{...vw.flex,...t.schema.showFirstAddOnTop?{flexDirection:`column`}:void 0}},t.showAddButton?this.renderAddButton(t.doAnyFilterSet):null,t.headCell.sort&&_.createElement(lt,{active:!0,style:t.orderBy===t.headCell.attr?void 0:vw.silver,direction:t.orderBy===t.headCell.attr?t.order:`asc`,onClick:()=>t.headCell.attr&&this.handleRequestSort(t.headCell.attr)}),t.headCell.filter&&t.headCell.attr&&this.state.filterOn.includes(t.headCell.attr)?_.createElement(ot,{variant:`standard`,ref:this.filterRefs[t.headCell.attr],onChange:()=>this.applyFilter(),title:J.t(`jc_You can filter entries by entering here some text`),slotProps:{input:{endAdornment:e.getFilterValue(this.filterRefs[t.headCell.attr])&&_.createElement(At,{position:`end`},_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>{e.setFilterValue(this.filterRefs[t.headCell.attr],``),this.applyFilter()}},_.createElement(De,null)))}},fullWidth:!0,placeholder:this.getText(t.headCell.title)}):_.createElement(`span`,{style:vw.headerText},this.getText(t.headCell.title)),this.renderShowHideFilter(t.headCell)))}enhancedFilterCard(){var e;let{schema:t}=this.props,{order:n,orderBy:r}=this.state,i;this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1});let a=!t.noDelete&&t.import||t.export;if(a||(e=t.items)!=null&&e.find(e=>e.sort||e.filter)){var o;return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:vw.paper},_.createElement(Ae,{style:vw.paper},_.createElement(pn,{expandIcon:_.createElement(N,null)},_.createElement(Pn,null,J.t(`jc_Filter and Data Actions`))),_.createElement(xn,null,_.createElement(H,null,_.createElement(_e,null,((o=t.items)==null?void 0:o.find(e=>e.sort||e.filter))&&t.items.map((e,a)=>_.createElement(F,{key:`${e.attr}_${a}`},this.renderOneFilter({schema:t,style:i,showAddButton:!1,headCell:e,order:n,orderBy:r,index:a,doAnyFilterSet:!1}))),a?_.createElement(F,null,_.createElement(Ee,{align:`left`,style:i},_.createElement(`span`,{style:vw.headerText},J.t(`jc_Actions`))),_.createElement(Ee,{style:i},this.renderImportExportButtons(t))):null)))))))}return null}enhancedBottomCard(){var e;let{schema:t}=this.props,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r=this.isAnyFilterSet();return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:vw.paper},_.createElement(H,null,_.createElement(_e,null,_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:n},this.renderAddButton(r))))))))}renderCards(){let{schema:e}=this.props,{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r={padding:0,borderBottom:`none`};t||=this.state.value.map((e,t)=>t);let i=this.isAnyFilterSet();return _.createElement(Jt,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((a,o)=>{var s,c,l;return _.createElement(Jt,{key:`${a}_${o}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},_.createElement(Ge,{sx:this.state.tableErrors[a]?{outline:`1px solid red`}:void 0},_.createElement(A,{style:vw.paper},this.props.schema.titleAttribute?_.createElement(vt,{sx:vw.cardHeader},_.createElement(`div`,null,this.state.value[a][this.props.schema.titleAttribute]),_.createElement(`div`,null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null,_.createElement(Ce,{title:J.t(`jc_Expand/Collapse card`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>{let e=[...this.state.collapsed],t=e.indexOf(a);t===-1?e.push(a):e.splice(t,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(e)),this.setState({collapsed:e})}},_.createElement(N,{style:{rotate:(s=this.state.collapsed)!=null&&s.includes(a)?`0deg`:`180deg`,transition:`0.3s`,transitionProperty:`rotate`}}))))):null,_.createElement(In,{in:!((c=this.state.collapsed)!=null&&c.includes(a)),timeout:`auto`,unmountOnExit:!0},_.createElement(H,null,_.createElement(_e,null,(l=e.items)==null?void 0:l.map(e=>{var t;let i=e.attr&&((t=this.listOfHiddenElements)==null||(t=t[a])==null?void 0:t.includes(e.attr));return _.createElement(F,{key:`${e.attr}_${a}`},_.createElement(Ee,{align:`left`,style:i?r:n},i?null:_.createElement(`span`,{style:vw.headerText},this.getText(e.title))),_.createElement(Ee,{align:`left`,style:i?r:n},e.attr&&this.itemTable(e.attr,this.state.value[a],a,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&_.createElement(F,null,_.createElement(Ee,{align:`left`,style:n},_.createElement(`span`,{style:vw.headerText},this.getText(`Actions`))),_.createElement(Ee,{align:`left`,style:n},!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){var e;let{schema:t}=this.props,{visibleValue:n}=this.state;n||=this.state.value.map((e,t)=>t);let r=this.isAnyFilterSet(),i;return this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1}),_.createElement(A,{style:vw.paper},this.showImportDialog(),this.showTypeOfImportDialog(),t.label?_.createElement(`div`,{style:vw.label},_.createElement(ue,{variant:`dense`,style:vw.rootTool},_.createElement(Pn,{style:vw.title,variant:`h6`,id:`tableTitle`,component:`div`},this.getText(t.label)))):null,_.createElement(Ye,null,_.createElement(H,{style:vw.table,size:`small`},this.enhancedTableHead(!r&&!this.state.orderBy?120:64,r),_.createElement(_e,null,n.map((e,a)=>{var o;return _.createElement(F,{hover:!0,key:`${e}_${a}`,sx:this.state.tableErrors[e]?{outline:`1px solid red`}:void 0},(o=t.items)==null?void 0:o.map(t=>_.createElement(Ee,{key:`${t.attr}_${e}`,align:`left`,style:i},t.attr&&this.itemTable(t.attr,this.state.value[e],e,!1))),!t.noDelete&&_.createElement(Ee,{align:`left`,style:{...i,...vw.buttonCell}},!r&&!this.state.orderBy?a?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(e)},_.createElement(hn,null))):_.createElement(`div`,{style:vw.buttonEmpty}):null,!r&&!this.state.orderBy?a<n.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(e)},_.createElement(Ot,null))):_.createElement(`div`,{style:vw.buttonEmpty}):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(e)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:vw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(e)},_.createElement(se,null))):null))}),!t.noDelete&&n.length>=(t.showSecondAddAt||5)?_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:{...i}},this.renderAddButton(r))):null)),!n.length&&this.state.value.length?_.createElement(`div`,{style:vw.filteredOut},_.createElement(Pn,{style:vw.title,variant:`h6`,id:`tableTitle`,component:`div`},J.t(`jc_All items are filtered out`),_.createElement(Zn,{size:`small`,onClick:()=>this.applyFilter(!0)},_.createElement(De,null)))):null),t.help?_.createElement(_n,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?_.createElement(`div`,{style:{display:`flex`,padding:`5px`}},_.createElement(et,{color:`error`}),_.createElement(`span`,{style:{color:`red`,alignSelf:`center`}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var e;this.resizeTimeout=null,(e=this.refDiv.current)!=null&&e.clientWidth&&this.setState({width:this.refDiv.current.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?`xs`:this.state.width<900?`sm`:this.state.width<1200?`md`:this.state.width<1536?`lg`:`xl`:`md`}renderItem(){let{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;let t=this.getCurrentBreakpoint(),n=null;return n=t&&(e.useCardFor||[`xs`]).includes(t)?this.renderCards():this.renderTable(),_.createElement(`div`,{ref:this.refDiv,style:{width:`100%`}},n)}};g();var ww={indeterminate:{opacity:.5},label:{width:`100%`,fontSize:14,marginBottom:2},helper:{width:`100%`,fontSize:12},error:{width:`100%`,fontSize:12,color:`#FF0000`}},Tw=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===X.DIFFERENT_VALUE)return{value:X.DIFFERENT_VALUE};let n=X.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){let n=Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE;if(this.props.schema.time){let n=``;return typeof this.state.value==`number`?n=this.state.value&&this.state.value<9466596e5?new Date(this.state.value*1e3).toLocaleString():new Date(this.state.value).toLocaleString():typeof this.state.value==`string`&&(n=new Date(this.state.value).toLocaleString()),_.createElement(ot,{variant:`standard`,fullWidth:!0,value:n,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue==null?this.updateTimeout&&=(clearTimeout(this.updateTimeout),null):(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:void 0})},30)),n){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString()||``,value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:ww.indeterminate,fullWidth:!0,value:r[0],onChange:(e,t)=>{let n=t?t.value:``,r=this.onChange(this.props.attr,n,()=>{this.setState({value:n,oldValue:n,jsonError:this.validateJson(t)})});r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let r,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{tabIndex:-1,style:i,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.value),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{style:i,size:`small`,tabIndex:-1,onClick:()=>this.setState({value:``,oldValue:this.state.value},()=>this.onChange(this.props.attr,``))},_.createElement(De,null)),(this.props.schema.minRows||0)<=1&&(r=_.createElement(At,{position:`end`},r))),(this.props.schema.minRows||0)>1){let n=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return _.createElement(`div`,{style:{width:`100%`,position:`relative`}},this.props.schema.label?_.createElement(`div`,{style:ww.label},this.getText(this.props.schema.label)):null,_.createElement(ft,{style:{width:`100%`,resize:`vertical`,backgroundColor:this.props.oContext.themeType===`dark`?`#363636`:`#cccccc`,color:this.props.oContext.themeType===`dark`?`#fff`:`#111`},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??``,disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t||``))},placeholder:this.getText(this.props.schema.placeholder)}),n||e||this.state.jsonError?_.createElement(`div`,{style:e?ww.error:ww.helper},e||(this.state.jsonError?J.t(`jc_Invalid JSON`):n)):null)}return _.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:r}},onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Ew={fullWidth:{width:`100%`}},Dw=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>{if(typeof e==`object`){let t=e;this.setState({text:t.text||``,style:t.style,icon:t.icon,iconStyle:t.iconStyle})}else typeof e==`string`&&this.setState({text:e||``})}).catch(e=>console.error(`Cannot send command: ${e}`))}}getLocalContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getLocalContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=nw(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||=_.createElement(Mt,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}})),this.props.schema.container===`text`?_.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.text||``),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):_.createElement(`div`,{style:{...Ew.fullWidth,...this.state.style||void 0}},e,this.props.schema.container===`html`?_.createElement(`span`,{dangerouslySetInnerHTML:{__html:this.state.text||``}}):this.state.text)}};g();var Ow=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){let n=this.props.schema.returnFormat!==`HH:mm:ss`,r=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||`00:00:00`}`));return _.createElement(kx,{sx:e=>({width:`100%`,borderBottom:`1px solid ${e.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${e.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),ampm:this.props.oContext.systemConfig.dateFormat.includes(`/`),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||`HH:mm:ss`,disabled:!!t,value:r,onChange:e=>{let t;t=e instanceof Date?e.toTimeString().split(` `)[0]:``,n&&t&&(t=t.split(`:`).slice(0,2).join(`:`)),this.setState({value:t},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||[`hours`,`minutes`,`seconds`],label:this.getText(this.props.schema.label)})}};g();function kw(e,t){let n;return n=t&&e.substring(0,t.length)===t?e.substring(t.length+1):e,n=n.replace(/\./g,`/`).replace(/_/g,` `),n}var Aw=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=X.getValue(this.props.data,this.props.attr);if(!t&&(e=this.props.customObj)!=null&&e._id){let e=kw(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:e})}else this.setState({value:t||``})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,t))}})}};g();var jw=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.getCachedObject(`system.meta.uuid`);this.setState({uuid:(t==null||(e=t.native)==null?void 0:e.uuid)||`unknown`})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:_.createElement(Zn,{tabIndex:-1,onClick:()=>{Zt.copyToClipboard(this.state.uuid||``),window.alert(J.t(`jc_Copied %s`,this.state.uuid))}},_.createElement(se,null))}},value:this.state.uuid||``,label:this.getText(this.props.schema.label)||J.t(`jc_Serial number (UUID)`),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Mw={icon:{width:16,height:16,marginRight:8}},Nw=class extends X{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{let t={},n=J.getLanguage();this.props.schema.short?e.forEach(e=>{var r,i;return t[e._id]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}):e.forEach(e=>{var r,i;return t[e._id.replace(/^system\.user\./,``)]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.state.users&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.users?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>{var t,n,r;return _.createElement(`span`,null,this.state.users&&(t=this.state.users[e])!=null&&t.icon?_.createElement(Mt,{src:this.state.users&&((n=this.state.users[e])==null?void 0:n.icon),style:Mw.icon}):null,this.state.users&&((r=this.state.users[e])==null?void 0:r.name)||e||``)},style:{color:this.state.users&&((n=this.state.users[i])==null?void 0:n.color)||void 0,backgroundColor:Zt.getInvertedColor((r=this.state.users)==null||(r=r[i])==null?void 0:r.color,this.props.oContext.themeType)},onChange:e=>this.onChange(this.props.attr,e.target.value)},this.state.users&&Object.keys(this.state.users).map(e=>_.createElement(z,{style:{color:this.state.users[e].color||void 0,backgroundColor:Zt.getInvertedColor(this.state.users[e].color,this.props.oContext.themeType)},key:e,value:e},this.state.users[e].icon?_.createElement(Mt,{src:this.state.users[e].icon,style:Mw.icon}):null,this.state.users[e].name))):_.createElement(ot,{variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}},Pw=Symbol.for(`yaml.alias`),Fw=Symbol.for(`yaml.document`),Iw=Symbol.for(`yaml.map`),Lw=Symbol.for(`yaml.pair`),Rw=Symbol.for(`yaml.scalar`),zw=Symbol.for(`yaml.seq`),Bw=Symbol.for(`yaml.node.type`),Vw=e=>!!e&&typeof e==`object`&&e[Bw]===Pw,Hw=e=>!!e&&typeof e==`object`&&e[Bw]===Fw,Uw=e=>!!e&&typeof e==`object`&&e[Bw]===Iw,Ww=e=>!!e&&typeof e==`object`&&e[Bw]===Lw,Gw=e=>!!e&&typeof e==`object`&&e[Bw]===Rw,Kw=e=>!!e&&typeof e==`object`&&e[Bw]===zw;function qw(e){if(e&&typeof e==`object`)switch(e[Bw]){case Iw:case zw:return!0}return!1}function Jw(e){if(e&&typeof e==`object`)switch(e[Bw]){case Pw:case Iw:case Rw:case zw:return!0}return!1}var Yw=e=>(Gw(e)||qw(e))&&!!e.anchor,Xw=Symbol(`break visit`),Zw=Symbol(`skip children`),Qw=Symbol(`remove node`);function $w(e,t){let n=tT(t);Hw(e)?eT(null,e.contents,n,Object.freeze([e]))===Qw&&(e.contents=null):eT(null,e,n,Object.freeze([]))}$w.BREAK=Xw,$w.SKIP=Zw,$w.REMOVE=Qw;function eT(e,t,n,r){let i=nT(e,t,n,r);if(Jw(i)||Ww(i))return rT(e,r,i),eT(e,i,n,r);if(typeof i!=`symbol`){if(qw(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=eT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Xw)return Xw;else i===Qw&&(t.items.splice(e,1),--e)}}else if(Ww(t)){r=Object.freeze(r.concat(t));let e=eT(`key`,t.key,n,r);if(e===Xw)return Xw;e===Qw&&(t.key=null);let i=eT(`value`,t.value,n,r);if(i===Xw)return Xw;i===Qw&&(t.value=null)}}return i}function tT(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function nT(e,t,n,r){var i,a,o,s,c;if(typeof n==`function`)return n(e,t,r);if(Uw(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(Kw(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(Ww(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(Gw(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(Vw(t))return(c=n.Alias)==null?void 0:c.call(n,e,t,r)}function rT(e,t,n){let r=t[t.length-1];if(qw(r))r.items[e]=n;else if(Ww(r))e===`key`?r.key=n:r.value=n;else if(Hw(r))r.contents=n;else{let e=Vw(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var iT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},aT=e=>e.replace(/[!,[\]{}]/g,e=>iT[e]),oT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+aT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Jw(e.contents)){let t={};$w(e.contents,(e,n)=>{Jw(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1389
|
-
`)}};
|
|
1390
|
-
`)?
|
|
1388
|
+
`).map(e=>e.replace(`\r`,``).trim()),{schema:n}=this.props,r=((t==null?void 0:t.shift())||``).split(`;`).filter(e=>{var t;return e&&((t=n.items)==null?void 0:t.find(t=>t.attr===e))}),i=[];if(t.forEach(e=>{let t=e.split(`;`),n={};for(let e=0;e<t.length;e++){let i=t[e];if(i.startsWith(`"`)){for(i=i.substring(1);e<t.length&&!i.endsWith(`"`);)i+=`;${t[++e]}`;i=i.substring(0,i.length-1)}let o=i;if(i===`true`)o=!0;else if(i===`false`)o=!1;else if(window.isFinite(i)){var a;let t=(a=this.props.schema.items)==null?void 0:a.find(t=>t.attr===r[e]);o=t&&t.type===`number`?parseFloat(i):i}else o=i;n[r[e]]=o}i.push(n)}),i.length){var a;(a=this.state.value)!=null&&a.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1})}else window.alert(`jc_No data found in file`)}isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(t=>e.getFilterValue(this.filterRefs[t]))}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onDrop(e){let t=e[0],n=new FileReader;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>ww){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(ww/1024)));return}let e=new Uint8Array(n.result).reduce((e,t)=>e+String.fromCharCode(t),``);this.onImport(e)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:`md`},_.createElement(Nt,null,J.t(`jc_Append or replace?`)),_.createElement(Tn,null,J.t(`jc_Append %s entries or replace existing?`,this.state.showTypeOfImportDialog.length)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>{let e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Append`)),_.createElement(xt,{variant:`contained`,color:`secondary`,autoFocus:!0,onClick:()=>{let e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Replace`)))):null}showImportDialog(){return this.state.showImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:`md`,fullWidth:!0},_.createElement(Nt,null,J.t(`jc_Import from %s`,`CSV`)),_.createElement(Tn,null,_.createElement(or,{multiple:!1,accept:{"text/csv":[`.csv`]},maxSize:ww,onDragEnter:()=>this.setState({uploadFile:`dragging`}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:t})=>_.createElement(`div`,{style:{...Tw.uploadDiv,...this.state.uploadFile===`dragging`?Tw.uploadDivDragging:void 0,...Tw.dropZone,...this.state.icon?void 0:Tw.dropZoneEmpty},...e()},_.createElement(`input`,{...t()}),_.createElement(`div`,{style:Tw.uploadCenterDiv},_.createElement(`div`,{style:Tw.uploadCenterTextAndIcon},_.createElement(nr,{style:Tw.uploadCenterIcon}),_.createElement(`div`,{style:Tw.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`))))))),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showImportDialog:!1}),color:`primary`,startIcon:_.createElement(De,null)},J.t(`jc_Cancel`)))):null}renderOneFilter(t){return _.createElement(Ee,{key:`${t.headCell.attr}_${t.index}`,style:t.style,align:`left`,sortDirection:t.orderBy===t.headCell.attr&&t.order},_.createElement(`div`,{style:{...Tw.flex,...t.schema.showFirstAddOnTop?{flexDirection:`column`}:void 0}},t.showAddButton?this.renderAddButton(t.doAnyFilterSet):null,t.headCell.sort&&_.createElement(lt,{active:!0,style:t.orderBy===t.headCell.attr?void 0:Tw.silver,direction:t.orderBy===t.headCell.attr?t.order:`asc`,onClick:()=>t.headCell.attr&&this.handleRequestSort(t.headCell.attr)}),t.headCell.filter&&t.headCell.attr&&this.state.filterOn.includes(t.headCell.attr)?_.createElement(ot,{variant:`standard`,ref:this.filterRefs[t.headCell.attr],onChange:()=>this.applyFilter(),title:J.t(`jc_You can filter entries by entering here some text`),slotProps:{input:{endAdornment:e.getFilterValue(this.filterRefs[t.headCell.attr])&&_.createElement(At,{position:`end`},_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>{e.setFilterValue(this.filterRefs[t.headCell.attr],``),this.applyFilter()}},_.createElement(De,null)))}},fullWidth:!0,placeholder:this.getText(t.headCell.title)}):_.createElement(`span`,{style:Tw.headerText},this.getText(t.headCell.title)),this.renderShowHideFilter(t.headCell)))}enhancedFilterCard(){var e;let{schema:t}=this.props,{order:n,orderBy:r}=this.state,i;this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1});let a=!t.noDelete&&t.import||t.export;if(a||(e=t.items)!=null&&e.find(e=>e.sort||e.filter)){var o;return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:Tw.paper},_.createElement(Ae,{style:Tw.paper},_.createElement(pn,{expandIcon:_.createElement(N,null)},_.createElement(Pn,null,J.t(`jc_Filter and Data Actions`))),_.createElement(xn,null,_.createElement(H,null,_.createElement(_e,null,((o=t.items)==null?void 0:o.find(e=>e.sort||e.filter))&&t.items.map((e,a)=>_.createElement(F,{key:`${e.attr}_${a}`},this.renderOneFilter({schema:t,style:i,showAddButton:!1,headCell:e,order:n,orderBy:r,index:a,doAnyFilterSet:!1}))),a?_.createElement(F,null,_.createElement(Ee,{align:`left`,style:i},_.createElement(`span`,{style:Tw.headerText},J.t(`jc_Actions`))),_.createElement(Ee,{style:i},this.renderImportExportButtons(t))):null)))))))}return null}enhancedBottomCard(){var e;let{schema:t}=this.props,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r=this.isAnyFilterSet();return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:Tw.paper},_.createElement(H,null,_.createElement(_e,null,_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:n},this.renderAddButton(r))))))))}renderCards(){let{schema:e}=this.props,{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r={padding:0,borderBottom:`none`};t||=this.state.value.map((e,t)=>t);let i=this.isAnyFilterSet();return _.createElement(Jt,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((a,o)=>{var s,c,l;return _.createElement(Jt,{key:`${a}_${o}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},_.createElement(Ge,{sx:this.state.tableErrors[a]?{outline:`1px solid red`}:void 0},_.createElement(A,{style:Tw.paper},this.props.schema.titleAttribute?_.createElement(vt,{sx:Tw.cardHeader},_.createElement(`div`,null,this.state.value[a][this.props.schema.titleAttribute]),_.createElement(`div`,null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null,_.createElement(Ce,{title:J.t(`jc_Expand/Collapse card`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>{let e=[...this.state.collapsed],t=e.indexOf(a);t===-1?e.push(a):e.splice(t,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(e)),this.setState({collapsed:e})}},_.createElement(N,{style:{rotate:(s=this.state.collapsed)!=null&&s.includes(a)?`0deg`:`180deg`,transition:`0.3s`,transitionProperty:`rotate`}}))))):null,_.createElement(In,{in:!((c=this.state.collapsed)!=null&&c.includes(a)),timeout:`auto`,unmountOnExit:!0},_.createElement(H,null,_.createElement(_e,null,(l=e.items)==null?void 0:l.map(e=>{var t;let i=e.attr&&((t=this.listOfHiddenElements)==null||(t=t[a])==null?void 0:t.includes(e.attr));return _.createElement(F,{key:`${e.attr}_${a}`},_.createElement(Ee,{align:`left`,style:i?r:n},i?null:_.createElement(`span`,{style:Tw.headerText},this.getText(e.title))),_.createElement(Ee,{align:`left`,style:i?r:n},e.attr&&this.itemTable(e.attr,this.state.value[a],a,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&_.createElement(F,null,_.createElement(Ee,{align:`left`,style:n},_.createElement(`span`,{style:Tw.headerText},this.getText(`Actions`))),_.createElement(Ee,{align:`left`,style:n},!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){var e;let{schema:t}=this.props,{visibleValue:n}=this.state;n||=this.state.value.map((e,t)=>t);let r=this.isAnyFilterSet(),i;return this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1}),_.createElement(A,{style:Tw.paper},this.showImportDialog(),this.showTypeOfImportDialog(),t.label?_.createElement(`div`,{style:Tw.label},_.createElement(ue,{variant:`dense`,style:Tw.rootTool},_.createElement(Pn,{style:Tw.title,variant:`h6`,id:`tableTitle`,component:`div`},this.getText(t.label)))):null,_.createElement(Ye,null,_.createElement(H,{style:Tw.table,size:`small`},this.enhancedTableHead(!r&&!this.state.orderBy?120:64,r),_.createElement(_e,null,n.map((e,a)=>{var o;return _.createElement(F,{hover:!0,key:`${e}_${a}`,sx:this.state.tableErrors[e]?{outline:`1px solid red`}:void 0},(o=t.items)==null?void 0:o.map(t=>_.createElement(Ee,{key:`${t.attr}_${e}`,align:`left`,style:i},t.attr&&this.itemTable(t.attr,this.state.value[e],e,!1))),!t.noDelete&&_.createElement(Ee,{align:`left`,style:{...i,...Tw.buttonCell}},!r&&!this.state.orderBy?a?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(e)},_.createElement(hn,null))):_.createElement(`div`,{style:Tw.buttonEmpty}):null,!r&&!this.state.orderBy?a<n.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(e)},_.createElement(Ot,null))):_.createElement(`div`,{style:Tw.buttonEmpty}):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(e)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:Tw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(e)},_.createElement(se,null))):null))}),!t.noDelete&&n.length>=(t.showSecondAddAt||5)?_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:{...i}},this.renderAddButton(r))):null)),!n.length&&this.state.value.length?_.createElement(`div`,{style:Tw.filteredOut},_.createElement(Pn,{style:Tw.title,variant:`h6`,id:`tableTitle`,component:`div`},J.t(`jc_All items are filtered out`),_.createElement(Zn,{size:`small`,onClick:()=>this.applyFilter(!0)},_.createElement(De,null)))):null),t.help?_.createElement(_n,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?_.createElement(`div`,{style:{display:`flex`,padding:`5px`}},_.createElement(et,{color:`error`}),_.createElement(`span`,{style:{color:`red`,alignSelf:`center`}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var e;this.resizeTimeout=null,(e=this.refDiv.current)!=null&&e.clientWidth&&this.setState({width:this.refDiv.current.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?`xs`:this.state.width<900?`sm`:this.state.width<1200?`md`:this.state.width<1536?`lg`:`xl`:`md`}renderItem(){let{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;let t=this.getCurrentBreakpoint(),n=null;return n=t&&(e.useCardFor||[`xs`]).includes(t)?this.renderCards():this.renderTable(),_.createElement(`div`,{ref:this.refDiv,style:{width:`100%`}},n)}};g();var jw={indeterminate:{opacity:.5},label:{width:`100%`,fontSize:14,marginBottom:2},helper:{width:`100%`,fontSize:12},error:{width:`100%`,fontSize:12,color:`#FF0000`}},Mw=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===X.DIFFERENT_VALUE)return{value:X.DIFFERENT_VALUE};let n=X.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){let n=Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE;if(this.props.schema.time){let n=``;return typeof this.state.value==`number`?n=this.state.value&&this.state.value<9466596e5?new Date(this.state.value*1e3).toLocaleString():new Date(this.state.value).toLocaleString():typeof this.state.value==`string`&&(n=new Date(this.state.value).toLocaleString()),_.createElement(ot,{variant:`standard`,fullWidth:!0,value:n,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue==null?this.updateTimeout&&=(clearTimeout(this.updateTimeout),null):(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:void 0})},30)),n){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString()||``,value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:jw.indeterminate,fullWidth:!0,value:r[0],onChange:(e,t)=>{let n=t?t.value:``,r=this.onChange(this.props.attr,n,()=>{this.setState({value:n,oldValue:n,jsonError:this.validateJson(t)})});r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let r,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{tabIndex:-1,style:i,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.value),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{style:i,size:`small`,tabIndex:-1,onClick:()=>this.setState({value:``,oldValue:this.state.value},()=>this.onChange(this.props.attr,``))},_.createElement(De,null)),(this.props.schema.minRows||0)<=1&&(r=_.createElement(At,{position:`end`},r))),(this.props.schema.minRows||0)>1){let n=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return _.createElement(`div`,{style:{width:`100%`,position:`relative`}},this.props.schema.label?_.createElement(`div`,{style:jw.label},this.getText(this.props.schema.label)):null,_.createElement(ft,{style:{width:`100%`,resize:`vertical`,backgroundColor:this.props.oContext.themeType===`dark`?`#363636`:`#cccccc`,color:this.props.oContext.themeType===`dark`?`#fff`:`#111`},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??``,disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t||``))},placeholder:this.getText(this.props.schema.placeholder)}),n||e||this.state.jsonError?_.createElement(`div`,{style:e?jw.error:jw.helper},e||(this.state.jsonError?J.t(`jc_Invalid JSON`):n)):null)}return _.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:r}},onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Nw={fullWidth:{width:`100%`}},Pw=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>{if(typeof e==`object`){let t=e;this.setState({text:t.text||``,style:t.style,icon:t.icon,iconStyle:t.iconStyle})}else typeof e==`string`&&this.setState({text:e||``})}).catch(e=>console.error(`Cannot send command: ${e}`))}}getLocalContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getLocalContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=lw(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||=_.createElement(Mt,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}})),this.props.schema.container===`text`?_.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.text||``),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):_.createElement(`div`,{style:{...Nw.fullWidth,...this.state.style||void 0}},e,this.props.schema.container===`html`?_.createElement(`span`,{dangerouslySetInnerHTML:{__html:this.state.text||``}}):this.state.text)}};g();var Fw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){let n=this.props.schema.returnFormat!==`HH:mm:ss`,r=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||`00:00:00`}`));return _.createElement(Ix,{sx:e=>({width:`100%`,borderBottom:`1px solid ${e.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${e.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),ampm:this.props.oContext.systemConfig.dateFormat.includes(`/`),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||`HH:mm:ss`,disabled:!!t,value:r,onChange:e=>{let t;t=e instanceof Date?e.toTimeString().split(` `)[0]:``,n&&t&&(t=t.split(`:`).slice(0,2).join(`:`)),this.setState({value:t},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||[`hours`,`minutes`,`seconds`],label:this.getText(this.props.schema.label)})}};g();function Iw(e,t){let n;return n=t&&e.substring(0,t.length)===t?e.substring(t.length+1):e,n=n.replace(/\./g,`/`).replace(/_/g,` `),n}var Lw=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=X.getValue(this.props.data,this.props.attr);if(!t&&(e=this.props.customObj)!=null&&e._id){let e=Iw(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:e})}else this.setState({value:t||``})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,t))}})}};g();var Rw=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.getCachedObject(`system.meta.uuid`);this.setState({uuid:(t==null||(e=t.native)==null?void 0:e.uuid)||`unknown`})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:_.createElement(Zn,{tabIndex:-1,onClick:()=>{Zt.copyToClipboard(this.state.uuid||``),window.alert(J.t(`jc_Copied %s`,this.state.uuid))}},_.createElement(se,null))}},value:this.state.uuid||``,label:this.getText(this.props.schema.label)||J.t(`jc_Serial number (UUID)`),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var zw={icon:{width:16,height:16,marginRight:8}},Bw=class extends X{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{let t={},n=J.getLanguage();this.props.schema.short?e.forEach(e=>{var r,i;return t[e._id]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}):e.forEach(e=>{var r,i;return t[e._id.replace(/^system\.user\./,``)]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.state.users&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.users?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>{var t,n,r;return _.createElement(`span`,null,this.state.users&&(t=this.state.users[e])!=null&&t.icon?_.createElement(Mt,{src:this.state.users&&((n=this.state.users[e])==null?void 0:n.icon),style:zw.icon}):null,this.state.users&&((r=this.state.users[e])==null?void 0:r.name)||e||``)},style:{color:this.state.users&&((n=this.state.users[i])==null?void 0:n.color)||void 0,backgroundColor:Zt.getInvertedColor((r=this.state.users)==null||(r=r[i])==null?void 0:r.color,this.props.oContext.themeType)},onChange:e=>this.onChange(this.props.attr,e.target.value)},this.state.users&&Object.keys(this.state.users).map(e=>_.createElement(z,{style:{color:this.state.users[e].color||void 0,backgroundColor:Zt.getInvertedColor(this.state.users[e].color,this.props.oContext.themeType)},key:e,value:e},this.state.users[e].icon?_.createElement(Mt,{src:this.state.users[e].icon,style:zw.icon}):null,this.state.users[e].name))):_.createElement(ot,{variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}},Vw=Symbol.for(`yaml.alias`),Hw=Symbol.for(`yaml.document`),Uw=Symbol.for(`yaml.map`),Ww=Symbol.for(`yaml.pair`),Gw=Symbol.for(`yaml.scalar`),Kw=Symbol.for(`yaml.seq`),qw=Symbol.for(`yaml.node.type`),Jw=e=>!!e&&typeof e==`object`&&e[qw]===Vw,Yw=e=>!!e&&typeof e==`object`&&e[qw]===Hw,Xw=e=>!!e&&typeof e==`object`&&e[qw]===Uw,Zw=e=>!!e&&typeof e==`object`&&e[qw]===Ww,Qw=e=>!!e&&typeof e==`object`&&e[qw]===Gw,$w=e=>!!e&&typeof e==`object`&&e[qw]===Kw;function eT(e){if(e&&typeof e==`object`)switch(e[qw]){case Uw:case Kw:return!0}return!1}function tT(e){if(e&&typeof e==`object`)switch(e[qw]){case Vw:case Uw:case Gw:case Kw:return!0}return!1}var nT=e=>(Qw(e)||eT(e))&&!!e.anchor,rT=Symbol(`break visit`),iT=Symbol(`skip children`),aT=Symbol(`remove node`);function oT(e,t){let n=cT(t);Yw(e)?sT(null,e.contents,n,Object.freeze([e]))===aT&&(e.contents=null):sT(null,e,n,Object.freeze([]))}oT.BREAK=rT,oT.SKIP=iT,oT.REMOVE=aT;function sT(e,t,n,r){let i=lT(e,t,n,r);if(tT(i)||Zw(i))return uT(e,r,i),sT(e,i,n,r);if(typeof i!=`symbol`){if(eT(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=sT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===rT)return rT;else i===aT&&(t.items.splice(e,1),--e)}}else if(Zw(t)){r=Object.freeze(r.concat(t));let e=sT(`key`,t.key,n,r);if(e===rT)return rT;e===aT&&(t.key=null);let i=sT(`value`,t.value,n,r);if(i===rT)return rT;i===aT&&(t.value=null)}}return i}function cT(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function lT(e,t,n,r){var i,a,o,s,c;if(typeof n==`function`)return n(e,t,r);if(Xw(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if($w(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(Zw(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(Qw(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(Jw(t))return(c=n.Alias)==null?void 0:c.call(n,e,t,r)}function uT(e,t,n){let r=t[t.length-1];if(eT(r))r.items[e]=n;else if(Zw(r))e===`key`?r.key=n:r.value=n;else if(Yw(r))r.contents=n;else{let e=Jw(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var dT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},fT=e=>e.replace(/[!,[\]{}]/g,e=>dT[e]),pT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+fT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&tT(e.contents)){let t={};oT(e.contents,(e,n)=>{tT(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1389
|
+
`)}};pT.defaultYaml={explicit:!1,version:`1.2`},pT.defaultTags={"!!":`tag:yaml.org,2002:`};function mT(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function hT(e){let t=new Set;return oT(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function gT(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function _T(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=hT(e);let a=gT(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Qw(t.node)||eT(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function vT(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=vT(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=vT(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=vT(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=vT(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function yT(e,t,n){if(Array.isArray(e))return e.map((e,t)=>yT(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!nT(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!(n!=null&&n.keep)?Number(e):e}var bT=class{constructor(e){Object.defineProperty(this,qw,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Yw(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=yT(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?vT(i,{"":o},``,o):o}},xT=class extends bT{constructor(e){super(Vw),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if((t==null?void 0:t.maxAliasCount)===0)throw ReferenceError(`Alias resolution is disabled`);let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],oT(e,{Node:(e,t)=>{(Jw(t)||nT(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(yT(a,null,t),n.get(a)),(o==null?void 0:o.res)===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=ST(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(mT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function ST(e,t,n){if(Jw(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(eT(t)){let r=0;for(let i of t.items){let t=ST(e,i,n);t>r&&(r=t)}return r}if(Zw(t)){let r=ST(e,t.key,n),i=ST(e,t.value,n);return Math.max(r,i)}return 1}var CT=e=>!e||typeof e!=`function`&&typeof e!=`object`,wT=class extends bT{constructor(e){super(Gw),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:yT(this.value,e,t)}toString(){return String(this.value)}};wT.BLOCK_FOLDED=`BLOCK_FOLDED`,wT.BLOCK_LITERAL=`BLOCK_LITERAL`,wT.PLAIN=`PLAIN`,wT.QUOTE_DOUBLE=`QUOTE_DOUBLE`,wT.QUOTE_SINGLE=`QUOTE_SINGLE`;var TT=`tag:yaml.org,2002:`;function ET(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>{var n;return((n=t.identify)==null?void 0:n.call(t,e))&&!t.format})}function DT(e,t,n){var r;if(Yw(e)&&(e=e.contents),tT(e))return e;if(Zw(e)){var i,a;let t=(i=(a=n.schema[Uw]).createNode)==null?void 0:i.call(a,n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:o,onAnchor:s,onTagObj:c,schema:l,sourceObjects:u}=n,d;if(o&&e&&typeof e==`object`){if(d=u.get(e),d)return d.anchor??(d.anchor=s(e)),new xT(d.anchor);d={anchor:null,node:null},u.set(e,d)}t!=null&&t.startsWith(`!!`)&&(t=TT+t.slice(2));let f=ET(e,t,l.tags);if(!f){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new wT(e);return d&&(d.node=t),t}f=e instanceof Map?l[Uw]:Symbol.iterator in Object(e)?l[Kw]:l[Uw]}c&&(c(f),delete n.onTagObj);let p=f!=null&&f.createNode?f.createNode(n.schema,e,n):typeof(f==null||(r=f.nodeClass)==null?void 0:r.from)==`function`?f.nodeClass.from(n.schema,e,n):new wT(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function OT(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return DT(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var kT=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,AT=class extends bT{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>tT(t)||Zw(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(kT(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(eT(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,OT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(eT(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Qw(i)?i.value:i:eT(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Zw(t))return!1;let n=t.value;return n==null||e&&Qw(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return eT(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(eT(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,OT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},jT=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function MT(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var NT=(e,t,n)=>e.endsWith(`
|
|
1390
|
+
`)?MT(n,t):n.includes(`
|
|
1391
1391
|
`)?`
|
|
1392
|
-
`+
|
|
1393
|
-
`)n===`block`&&(h=
|
|
1392
|
+
`+MT(n,t):(e.endsWith(` `)?``:` `)+n,PT=`flow`,FT=`block`,IT=`quoted`;function LT(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=RT(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
1393
|
+
`)n===`block`&&(h=RT(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
1394
1394
|
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
1395
|
-
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function
|
|
1396
|
-
`);r=t,i=t+1,a=e[i]}return r}var
|
|
1397
|
-
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function
|
|
1395
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function RT(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
1396
|
+
`);r=t,i=t+1,a=e[i]}return r}var zT=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),BT=e=>/^(%|---|\.\.\.)/m.test(e);function VT(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
1397
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function HT(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(BT(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
1398
1398
|
|
|
1399
1399
|
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
1400
|
-
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:
|
|
1401
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return
|
|
1400
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:LT(o,a,IT,zT(t,!1))}function UT(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
1401
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return HT(e,t);let n=t.indent||(BT(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:LT(r,n,PT,zT(t,!1))}function WT(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=HT;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?UT:i&&!t?HT:n?UT:HT}return r(e,t)}var GT;try{GT=RegExp(`(^|(?<!
|
|
1402
1402
|
))
|
|
1403
1403
|
+(?!
|
|
1404
|
-
|$)`,`g`)}catch{
|
|
1404
|
+
|$)`,`g`)}catch{GT=/\n+(?!\n|$)/g}function KT({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return WT(n,r);let l=r.indent||(r.forceBlockIndent||BT(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===wT.BLOCK_FOLDED?!1:t===wT.BLOCK_LITERAL||!VT(n,c,l.length);if(!n)return u?`|
|
|
1405
1405
|
`:`>
|
|
1406
1406
|
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
1407
1407
|
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
1408
1408
|
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
1409
|
-
`&&(p=p.slice(0,-1)),p.replace(
|
|
1409
|
+
`&&(p=p.slice(0,-1)),p.replace(GT,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
1410
1410
|
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
1411
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=
|
|
1412
|
-
`)||u&&/[[\]{},]/.test(a))return
|
|
1413
|
-
`)?
|
|
1414
|
-
`))return
|
|
1415
|
-
`:``,v){let e=l(v);S+=`\n${
|
|
1411
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=zT(r,!0);o!==`folded`&&t!==wT.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=LT(`${v}${e}${p}`,l,FT,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function qT(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
1412
|
+
`)||u&&/[[\]{},]/.test(a))return WT(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
1413
|
+
`)?WT(a,t):KT(e,t,n,r);if(!s&&!u&&i!==wT.PLAIN&&a.includes(`
|
|
1414
|
+
`))return KT(e,t,n,r);if(BT(a)){if(c===``)return t.forceBlockIndent=!0,KT(e,t,n,r);if(s&&c===l)return WT(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>{var t;return e.default&&e.tag!==`tag:yaml.org,2002:str`&&((t=e.test)==null?void 0:t.test(d))},{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n!=null&&n.some(e))return WT(a,t)}return s?d:LT(d,c,PT,zT(t,!1))}function JT(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==wT.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=wT.QUOTE_DOUBLE);let c=e=>{switch(e){case wT.BLOCK_FOLDED:case wT.BLOCK_LITERAL:return i||a?WT(o.value,t):KT(o,t,n,r);case wT.QUOTE_DOUBLE:return HT(o.value,t);case wT.QUOTE_SINGLE:return UT(o.value,t);case wT.PLAIN:return qT(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function YT(e,t){let n=Object.assign({blockQuote:!0,commentString:jT,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function XT(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Qw(t)){r=t.value;let i=e.filter(e=>{var t;return(t=e.identify)==null?void 0:t.call(e,r)});if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){var i;let e=(r==null||(i=r.constructor)==null?void 0:i.name)??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function ZT(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(Qw(e)||eT(e))&&e.anchor;a&&mT(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function QT(e,t,n,r){if(Zw(e))return e.toString(t,n,r);if(Jw(e)){var i;if(t.doc.directives)return e.toString(t);if((i=t.resolvedAliases)!=null&&i.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a,o=tT(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??=XT(t.doc.schema.tags,o);let s=ZT(o,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let c=typeof a.stringify==`function`?a.stringify(o,t,n,r):Qw(o)?JT(o,t,n,r):o.toString(t,n,r);return s?Qw(o)||c[0]===`{`||c[0]===`[`?`${s} ${c}`:`${s}\n${t.indent}${c}`:c}function $T({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=tT(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(eT(e)||!tT(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||eT(e)||(Qw(e)?e.type===wT.BLOCK_FOLDED||e.type===wT.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=QT(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=NT(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=NT(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=NT(g,n.indent,l(f))));let _,v,y;tT(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Qw(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&$w(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=QT(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
1415
|
+
`:``,v){let e=l(v);S+=`\n${MT(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
1416
1416
|
`&&y&&(S=`
|
|
1417
1417
|
|
|
1418
|
-
`):S+=`\n${n.indent}`}else if(!p&&
|
|
1418
|
+
`):S+=`\n${n.indent}`}else if(!p&&eT(t)){let e=x[0],r=x.indexOf(`
|
|
1419
1419
|
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
1420
|
-
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=
|
|
1420
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=NT(g,n.indent,l(y)):h&&i&&i(),g}function eE(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var tE=`<<`,nE={identify:e=>e===tE||typeof e==`symbol`&&e.description===tE,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new wT(Symbol(tE)),{addToJSMap:iE}),stringify:()=>tE},rE=(e,t)=>(nE.identify(t)||Qw(t)&&(!t.type||t.type===wT.PLAIN)&&nE.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(e=>e.tag===nE.tag&&e.default));function iE(e,t,n){let r=oE(e,n);if($w(r))for(let n of r.items)aE(e,t,n);else if(Array.isArray(r))for(let n of r)aE(e,t,n);else aE(e,t,r)}function aE(e,t,n){let r=oE(e,n);if(!Xw(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function oE(e,t){return e&&Jw(t)?t.resolve(e.doc,e):t}function sE(e,t,{key:n,value:r}){if(tT(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(rE(e,n))iE(e,t,r);else{let i=yT(n,``,e);if(t instanceof Map)t.set(i,yT(r,i,e));else if(t instanceof Set)t.add(i);else{let a=cE(n,i,e),o=yT(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function cE(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(tT(e)&&n!=null&&n.doc){let t=YT(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),eE(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function lE(e,t,n){return new uE(DT(e,void 0,n),DT(t,void 0,n))}var uE=class e{constructor(e,t=null){Object.defineProperty(this,qw,{value:Ww}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return tT(n)&&(n=n.clone(t)),tT(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return sE(t,t!=null&&t.mapAsMap?new Map:{},this)}toString(e,t,n){return e!=null&&e.doc?$T(this,e,t,n):JSON.stringify(this)}};function dE(e,t,n){return(t.inFlow??e.flow?pE:fE)(e,t,n)}function fE({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(tT(i))!d&&i.spaceBefore&&f.push(``),mE(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Zw(i)){let e=tT(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),mE(n,f,e.commentBefore,d))}d=!1;let s=QT(i,u,()=>o=null,()=>d=!0);o&&(s+=NT(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
1421
1421
|
`}}return e?(p+=`
|
|
1422
|
-
`+
|
|
1423
|
-
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=
|
|
1424
|
-
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function
|
|
1425
|
-
`:` `)}return
|
|
1426
|
-
`)?(r.push(`...`),r.push(
|
|
1422
|
+
`+MT(l(e),c),s&&s()):d&&o&&o(),p}function pE({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(tT(i))i.spaceBefore&&d.push(``),mE(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Zw(i)){let e=tT(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),mE(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=tT(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e!=null&&e.comment&&(a=e.comment)}a&&(l=!0);let o=QT(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
1423
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=NT(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
1424
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function mE({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=MT(t(r),e);n.push(i.trimStart())}}function hE(e,t){let n=Qw(t)?t.value:t;for(let r of e)if(Zw(r)&&(r.key===t||r.key===n||Qw(r.key)&&r.key.value===n))return r}var gE=class extends AT{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Uw,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(lE(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){var n;let r;r=Zw(e)?e:!e||typeof e!=`object`||!(`key`in e)?new uE(e,e==null?void 0:e.value):new uE(e.key,e.value);let i=hE(this.items,r.key),a=(n=this.schema)==null?void 0:n.sortMapEntries;if(i){if(!t)throw Error(`Key ${r.key} already set`);Qw(i.value)&&CT(r.value)?i.value.value=r.value:i.value=r.value}else if(a){let e=this.items.findIndex(e=>a(r,e)<0);e===-1?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){let t=hE(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=hE(this.items,e),r=n==null?void 0:n.value;return(!t&&Qw(r)?r.value:r)??void 0}has(e){return!!hE(this.items,e)}set(e,t){this.add(new uE(e,t),!0)}toJSON(e,t,n){let r=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(let e of this.items)sE(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Zw(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),dE(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},_E={collection:`map`,default:!0,nodeClass:gE,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Xw(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>gE.from(e,t,n)},vE=class extends AT{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Kw,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=yE(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=yE(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Qw(r)?r.value:r}has(e){let t=yE(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=yE(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Qw(r)&&CT(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t!=null&&t.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(yT(e,String(r++),t));return n}toString(e,t,n){return e?dE(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(DT(a,void 0,n))}}return i}};function yE(e){let t=Qw(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var bE={collection:`seq`,default:!0,nodeClass:vE,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return $w(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>vE.from(e,t,n)},xE={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),JT(e,t,n,r)}},SE={identify:e=>e==null,createNode:()=>new wT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new wT(null),stringify:({source:e},t)=>typeof e==`string`&&SE.test.test(e)?e:t.options.nullStr},CE={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new wT(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&CE.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function wE({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var TE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:wE},EE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():wE(e)}},DE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new wT(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:wE},OE=e=>typeof e==`bigint`||Number.isInteger(e),kE=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function AE(e,t,n){let{value:r}=e;return OE(r)&&r>=0?n+r.toString(t):wE(e)}var jE={identify:e=>OE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>kE(e,2,8,n),stringify:e=>AE(e,8,`0o`)},ME={identify:OE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>kE(e,0,10,n),stringify:wE},NE={identify:e=>OE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>kE(e,2,16,n),stringify:e=>AE(e,16,`0x`)},PE=[_E,bE,xE,SE,CE,jE,ME,NE,TE,EE,DE];function FE(e){return typeof e==`bigint`||Number.isInteger(e)}var IE=({value:e})=>JSON.stringify(e),LE=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:IE},{identify:e=>e==null,createNode:()=>new wT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:IE},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:IE},{identify:FE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>FE(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:IE}],RE=[_E,bE].concat(LE,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),zE={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=wT.BLOCK_LITERAL,t!==wT.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===wT.BLOCK_LITERAL?`
|
|
1425
|
+
`:` `)}return JT({comment:e,type:t,value:s},r,i,a)}};function BE(e,t){if($w(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Zw(r)){if(Xw(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new uE(new wT(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=Zw(r)?r:new uE(r)}}else t(`Expected a sequence for this tag`);return e}function VE(e,t,n){let{replacer:r}=n,i=new vE(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(lE(o,s,n))}return i}var HE={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:BE,createNode:VE},UE=class e extends vE{constructor(){super(),this.add=gE.prototype.add.bind(this),this.delete=gE.prototype.delete.bind(this),this.get=gE.prototype.get.bind(this),this.has=gE.prototype.has.bind(this),this.set=gE.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Zw(e)?(r=yT(e.key,``,t),i=yT(e.value,r,t)):r=yT(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=VE(e,t,n),i=new this;return i.items=r.items,i}};UE.tag=`tag:yaml.org,2002:omap`;var WE={collection:`seq`,identify:e=>e instanceof Map,nodeClass:UE,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=BE(e,t),r=[];for(let{key:e}of n.items)Qw(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new UE,n)},createNode:(e,t,n)=>UE.from(e,t,n)};function GE({value:e,source:t},n){return t&&(e?KE:qE).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var KE={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new wT(!0),stringify:GE},qE={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new wT(!1),stringify:GE},JE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:wE},YE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():wE(e)}},XE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new wT(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:wE},ZE=e=>typeof e==`bigint`||Number.isInteger(e);function QE(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function $E(e,t,n){let{value:r}=e;if(ZE(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return wE(e)}var eD={identify:ZE,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>QE(e,2,2,n),stringify:e=>$E(e,2,`0b`)},tD={identify:ZE,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>QE(e,1,8,n),stringify:e=>$E(e,8,`0`)},nD={identify:ZE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>QE(e,0,10,n),stringify:wE},rD={identify:ZE,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>QE(e,2,16,n),stringify:e=>$E(e,16,`0x`)},iD=class e extends gE{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Zw(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new uE(e.key,null):new uE(e,null),hE(this.items,t.key)||this.items.push(t)}get(e,t){let n=hE(this.items,e);return!t&&Zw(n)?Qw(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=hE(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new uE(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(lE(e,null,n));return i}};iD.tag=`tag:yaml.org,2002:set`;var aD={collection:`map`,identify:e=>e instanceof Set,nodeClass:iD,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>iD.from(e,t,n),resolve(e,t){if(Xw(e)){if(e.hasAllNullValues(!0))return Object.assign(new iD,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function oD(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function sD(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return wE(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var cD={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>oD(e,n),stringify:sD},lD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>oD(e,!1),stringify:sD},uD={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(uD.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=oD(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,``))??``},dD=[_E,bE,xE,SE,KE,qE,eD,tD,nD,rD,JE,YE,XE,zE,nE,WE,HE,aD,cD,lD,uD],fD=new Map([[`core`,PE],[`failsafe`,[_E,bE,xE]],[`json`,RE],[`yaml11`,dD],[`yaml-1.1`,dD]]),pD={binary:zE,bool:CE,float:DE,floatExp:EE,floatNaN:TE,floatTime:lD,int:ME,intHex:NE,intOct:jE,intTime:cD,map:_E,merge:nE,null:SE,omap:WE,pairs:HE,seq:bE,set:aD,timestamp:uD},mD={"tag:yaml.org,2002:binary":zE,"tag:yaml.org,2002:merge":nE,"tag:yaml.org,2002:omap":WE,"tag:yaml.org,2002:pairs":HE,"tag:yaml.org,2002:set":aD,"tag:yaml.org,2002:timestamp":uD};function hD(e,t,n){let r=fD.get(t);if(r&&!e)return n&&!r.includes(nE)?r.concat(nE):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(fD.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(nE)),i.reduce((e,t)=>{let n=typeof t==`string`?pD[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(pD).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var gD=(e,t)=>e.key<t.key?-1:+(e.key>t.key),_D=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?hD(e,`compat`):e?hD(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?mD:{},this.tags=hD(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Uw,{value:_E}),Object.defineProperty(this,Gw,{value:xE}),Object.defineProperty(this,Kw,{value:bE}),this.sortMapEntries=typeof a==`function`?a:a===!0?gD:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function vD(e,t){var n;let r=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(r.push(t),i=!0):e.directives.docStart&&(i=!0)}i&&r.push(`---`);let a=YT(e,t),{commentString:o}=a.options;if(e.commentBefore){r.length!==1&&r.unshift(``);let t=o(e.commentBefore);r.unshift(MT(t,``))}let s=!1,c=null;if(e.contents){if(tT(e.contents)){if(e.contents.spaceBefore&&i&&r.push(``),e.contents.commentBefore){let t=o(e.contents.commentBefore);r.push(MT(t,``))}a.forceBlockIndent=!!e.comment,c=e.contents.comment}let t=c?void 0:()=>s=!0,n=QT(e.contents,a,()=>c=null,t);c&&(n+=NT(n,``,o(c))),(n[0]===`|`||n[0]===`>`)&&r[r.length-1]===`---`?r[r.length-1]=`--- ${n}`:r.push(n)}else r.push(QT(e.contents,a));if((n=e.directives)!=null&&n.docEnd){if(e.comment){let t=o(e.comment);t.includes(`
|
|
1426
|
+
`)?(r.push(`...`),r.push(MT(t,``))):r.push(`... ${t}`)}else r.push(`...`)}else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,``)),t&&((!s||c)&&r[r.length-1]!==``&&r.push(``),r.push(MT(o(t),``)))}return r.join(`
|
|
1427
1427
|
`)+`
|
|
1428
|
-
`}var
|
|
1429
|
-
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];(t==null?void 0:t.line)===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function
|
|
1430
|
-
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(
|
|
1431
|
-
`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||
|
|
1432
|
-
`+v.comment:_.comment=v.comment);let e=new
|
|
1433
|
-
`+g.comment:c.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&
|
|
1434
|
-
`+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(!o&&!m&&!g.found){let r=h?e(n,h,g,i):t(n,g.end,m,null,g,i);c.items.push(r),u=r.range[2],
|
|
1435
|
-
`+v.comment:_.comment=v.comment);let b=new
|
|
1436
|
-
`+e.comment:c.comment=e.comment),c.range=[r.offset,h,e.offset]}else c.range=[r.offset,h,h];return c}function
|
|
1428
|
+
`}var yD=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qw,{value:Hw});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new pT({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[qw]:{value:Hw}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=tT(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){bD(this.contents)&&this.contents.add(e)}addIn(e,t){bD(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=hT(this);e.anchor=!t||n.has(t)?gT(t||`a`,n):t}return new xT(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=_T(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=DT(e,l,p);return o&&eT(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new uE(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return bD(this.contents)?this.contents.delete(e):!1}deleteIn(e){return kT(e)?this.contents!=null&&(this.contents=null,!0):bD(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return eT(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return kT(e)?!t&&Qw(this.contents)?this.contents.value:this.contents:eT(this.contents)?this.contents.getIn(e,t):void 0}has(e){return eT(this.contents)?this.contents.has(e):!1}hasIn(e){return kT(e)?this.contents!==void 0:eT(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=OT(this.schema,[e],t):bD(this.contents)&&this.contents.set(e,t)}setIn(e,t){kT(e)?this.contents=t:this.contents==null?this.contents=OT(this.schema,Array.from(e),t):bD(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new pT({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new pT({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new _D(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=yT(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?vT(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return vD(this,e)}};function bD(e){if(eT(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var xD=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},SD=class extends xD{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},CD=class extends xD{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},wD=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
1429
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];(t==null?void 0:t.line)===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function TD(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||(r==null?void 0:r.type)!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||(r==null?void 0:r.type)===`block-map`||(r==null?void 0:r.type)===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function ED(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
1430
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(ED(t.key)||ED(t.value))return!0}return!1;default:return!0}}function DD(e,t,n){if((t==null?void 0:t.type)===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&ED(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function OD(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||Qw(e)&&Qw(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var kD=`All mapping items must start at the same column`;function AD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??gE)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){var l;let{start:u,key:d,sep:f,value:p}=a,m=TD(u,{indicator:`explicit-key-ind`,next:d??(f==null?void 0:f[0]),offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),h=!m.found;if(h){if(d&&(d.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in d&&d.indent!==r.indent&&i(s,`BAD_INDENT`,kD)),!m.anchor&&!m.tag&&!f){c=m.end,m.comment&&(o.comment?o.comment+=`
|
|
1431
|
+
`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||ED(d))&&i(d??u[u.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else((l=m.found)==null?void 0:l.indent)!==r.indent&&i(s,`BAD_INDENT`,kD);n.atKey=!0;let g=m.end,_=d?e(n,d,m,i):t(n,g,u,null,m,i);n.schema.compat&&DD(r.indent,d,i),n.atKey=!1,OD(n,o.items,_)&&i(g,`DUPLICATE_KEY`,`Map keys must be unique`);let v=TD(f??[],{indicator:`map-value-ind`,next:p,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type===`block-scalar`});if(s=v.end,v.found){h&&((p==null?void 0:p.type)===`block-map`&&!v.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&m.start<v.found.offset-1024&&i(_.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=p?e(n,p,v,i):t(n,s,f,null,v,i);n.schema.compat&&DD(r.indent,p,i),s=c.range[2];let l=new uE(_,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{h&&i(_.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),v.comment&&(_.comment?_.comment+=`
|
|
1432
|
+
`+v.comment:_.comment=v.comment);let e=new uE(_);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function jD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??vE)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=TD(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)(l==null?void 0:l.type)===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&DD(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function MD(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var ND=`Block collections are not allowed within flow collections`,PD=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function FD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a==null?void 0:a.nodeClass)??(o?gE:vE))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:f,key:p,sep:m,value:h}=l,g=TD(f,{flow:s,indicator:`explicit-key-ind`,next:p??(m==null?void 0:m[0]),offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!g.found){if(!g.anchor&&!g.tag&&!m&&!h){a===0&&g.comma?i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(g.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),g.comment&&(c.comment?c.comment+=`
|
|
1433
|
+
`+g.comment:c.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&ED(p)&&i(p,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)g.comma&&i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(g.comma||i(g.start,`MISSING_CHAR`,`Missing , between ${s} items`),g.comment){let e=``;loop:for(let t of f)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];Zw(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
1434
|
+
`+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(!o&&!m&&!g.found){let r=h?e(n,h,g,i):t(n,g.end,m,null,g,i);c.items.push(r),u=r.range[2],PD(h)&&i(r.range,`BLOCK_IN_FLOW`,ND)}else{n.atKey=!0;let a=g.end,_=p?e(n,p,g,i):t(n,a,f,null,g,i);PD(p)&&i(_.range,`BLOCK_IN_FLOW`,ND),n.atKey=!1;let v=TD(m??[],{flow:s,indicator:`map-value-ind`,next:h,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(v.found){if(!o&&!g.found&&n.options.strict){if(m)for(let e of m){if(e===v.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}g.start<v.found.offset-1024&&i(v.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else if(h){var d;`source`in h&&((d=h.source)==null?void 0:d[0])===`:`?i(h,`MISSING_CHAR`,`Missing space after : in ${s}`):i(v.start,`MISSING_CHAR`,`Missing , or : between ${s} items`)}let y=h?e(n,h,v,i):v.found?t(n,v.end,m,null,v,i):null;y?PD(h)&&i(y.range,`BLOCK_IN_FLOW`,ND):v.comment&&(_.comment?_.comment+=`
|
|
1435
|
+
`+v.comment:_.comment=v.comment);let b=new uE(_,y);if(n.options.keepSourceTokens&&(b.srcToken=l),o){let e=c;OD(n,e.items,_)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(b)}else{let e=new gE(n.schema);e.flow=!0,e.items.push(b);let t=(y??_).range;e.range=[_.range[0],t[1],t[2]],c.items.push(e)}u=y?y.range[2]:v.end}}let f=o?`}`:`]`,[p,...m]=r.end,h=u;if((p==null?void 0:p.source)===f)h=p.offset+p.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${f}`:`${e} in block collection must be sufficiently indented and end with a ${f}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),p&&p.source.length!==1&&m.unshift(p)}if(m.length>0){let e=MD(m,h,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
1436
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,h,e.offset]}else c.range=[r.offset,h,h];return c}function ID(e,t,n,r,i,a){let o=n.type===`block-map`?AD(e,t,n,r,a):n.type===`block-seq`?jD(e,t,n,r,a):FD(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function LD(e,t,n,r,i){var a;let o=r.tag,s=o?t.directives.tagName(o.source,e=>i(o,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&o?e.offset>o.offset?e:o:e??o;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let c=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!o||!s||s===`!`||s===gE.tagName&&c===`map`||s===vE.tagName&&c===`seq`)return ID(e,t,n,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===c);if(!l){let r=t.schema.knownTags[s];if((r==null?void 0:r.collection)===c)t.schema.tags.push(Object.assign({},r,{default:!1})),l=r;else return r?i(o,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${c} collection, but expects ${r.collection??`scalar`}`,!0):i(o,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${s}`,!0),ID(e,t,n,i,s)}let u=ID(e,t,n,i,s,l),d=((a=l.resolve)==null?void 0:a.call(l,u,e=>i(o,`TAG_RESOLVE_FAILED`,e),t.options))??u,f=tT(d)?d:new wT(d);return f.range=u.range,f.tag=s,l!=null&&l.format&&(f.format=l.format),f}function RD(e,t,n){let r=t.offset,i=zD(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?wT.BLOCK_FOLDED:wT.BLOCK_LITERAL,o=t.source?BD(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
1437
1437
|
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
1438
|
-
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===
|
|
1438
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===wT.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
1439
1439
|
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
1440
1440
|
`:!p&&f===`
|
|
1441
1441
|
`&&(f=`
|
|
@@ -1448,47 +1448,47 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
1448
1448
|
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
1449
1449
|
`&&(d+=`
|
|
1450
1450
|
`);break;default:d+=`
|
|
1451
|
-
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function
|
|
1451
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function zD({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function BD(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function VD(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=wT.PLAIN,c=HD(a,l);break;case`single-quoted-scalar`:s=wT.QUOTE_SINGLE,c=UD(a,l);break;case`double-quoted-scalar`:s=wT.QUOTE_DOUBLE,c=GD(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=MD(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function HD(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),WD(e)}function UD(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),WD(e.slice(1,-1)).replace(/''/g,`'`)}function WD(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1452
1452
|
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1453
1453
|
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
|
1454
1454
|
`?i+=a:a=`
|
|
1455
|
-
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+((r==null?void 0:r[1])??``)}function
|
|
1455
|
+
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+((r==null?void 0:r[1])??``)}function GD(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
1456
1456
|
`){if(i===`
|
|
1457
|
-
`){let{fold:t,offset:i}=
|
|
1457
|
+
`){let{fold:t,offset:i}=KD(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=qD[i];if(a)n+=a;else if(i===`
|
|
1458
1458
|
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
1459
|
-
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=
|
|
1459
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=JD(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
1460
1460
|
`&&(a!==`\r`||e[r+2]!==`
|
|
1461
|
-
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function
|
|
1461
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function KD(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
1462
1462
|
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
1463
1463
|
`);)r===`
|
|
1464
1464
|
`&&(n+=`
|
|
1465
|
-
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var
|
|
1466
|
-
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function
|
|
1465
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var qD={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
1466
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function JD(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function YD(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?RD(e,t,r):VD(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Gw]:c?XD(e.schema,i,c,n,r):t.type===`scalar`?ZD(e,i,t,r):e.schema[Gw];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=Qw(a)?a:new wT(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new wT(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function XD(e,t,n,r,i){var a;if(n===`!`)return e[Gw];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)o.push(t);else return t}for(let e of o)if((a=e.test)!=null&&a.test(t))return e;let s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Gw])}function ZD({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>{var n;return(t.default===!0||e&&t.default===`key`)&&((n=t.test)==null?void 0:n.test(r))})||n[Gw];if(n.compat){let e=n.compat.find(e=>{var t;return e.default&&((t=e.test)==null?void 0:t.test(r))})??n[Gw];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function QD(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];(n==null?void 0:n.type)===`space`;)e+=n.source.length,n=t[++r];break}}return e}var $D={composeNode:eO,composeEmptyNode:tO};function eO(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=nO(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=YD(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=LD($D,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=tO(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!Qw(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function tO(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=YD(e,{type:`scalar`,offset:QD(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function nO({options:e},{offset:t,source:n,end:r},i){let a=new xT(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=MD(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function rO(e,t,{offset:n,start:r,value:i,end:a},o){let s=new yD(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=TD(r,{indicator:`doc-start`,next:i??(a==null?void 0:a[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?eO(c,i,l,o):tO(c,l.end,r,null,l,o);let u=s.contents.range[2],d=MD(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function iO(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function aO(e){let t=``,n=!1,r=!1;for(let a=0;a<e.length;++a){let o=e[a];switch(o[0]){case`#`:t+=(t===``?``:r?`
|
|
1467
1467
|
|
|
1468
1468
|
`:`
|
|
1469
|
-
`)+(o.substring(1)||` `),n=!0,r=!1;break;case`%`:var i;((i=e[a+1])==null?void 0:i[0])!==`#`&&(a+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var
|
|
1469
|
+
`)+(o.substring(1)||` `),n=!0,r=!1;break;case`%`:var i;((i=e[a+1])==null?void 0:i[0])!==`#`&&(a+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var oO=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=iO(e);r?this.warnings.push(new CD(i,t,n)):this.errors.push(new SD(i,t,n))},this.directives=new pT({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=aO(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(eT(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Zw(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:aO(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=iO(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=rO(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new SD(iO(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new SD(iO(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=MD(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new SD(iO(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new yD(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},sO=Symbol(`break visit`),cO=Symbol(`skip children`),lO=Symbol(`remove item`);function uO(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),dO(Object.freeze([]),e,t)}uO.BREAK=sO,uO.SKIP=cO,uO.REMOVE=lO,uO.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n==null?void 0:n[e];if(t&&`items`in t)n=t.items[r];else return}return n},uO.parentCollection=(e,t)=>{let n=uO.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function dO(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=dO(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===sO)return sO;else r===lO&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function fO(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
1470
1470
|
`:case`\r
|
|
1471
|
-
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function
|
|
1472
|
-
`:case`\r`:case` `:return!0;default:return!1}}var
|
|
1473
|
-
\r `),
|
|
1471
|
+
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function pO(e){switch(e){case void 0:case` `:case`
|
|
1472
|
+
`:case`\r`:case` `:return!0;default:return!1}}var mO=new Set(`0123456789ABCDEFabcdef`),hO=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),gO=new Set(`,[]{}`),_O=new Set(` ,[]{}
|
|
1473
|
+
\r `),vO=e=>!e||_O.has(e),yO=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
1474
1474
|
`||t===`\r`&&this.buffer[e+1]===`
|
|
1475
1475
|
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
1476
1476
|
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
1477
|
-
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&
|
|
1478
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&
|
|
1477
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&pO(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
1478
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&pO(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!pO(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&pO(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(vO),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&pO(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(vO),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||pO(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
1479
1479
|
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
1480
|
-
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>
|
|
1480
|
+
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>pO(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
1481
1481
|
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
1482
1482
|
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
1483
1483
|
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
1484
1484
|
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
1485
|
-
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(
|
|
1485
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(pO(r)||e&&gO.has(r))break;t=n}else if(pO(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
1486
1486
|
`?(n+=1,r=`
|
|
1487
|
-
`,i=this.buffer[n+1]):t=n),i===`#`||e&&
|
|
1488
|
-
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&
|
|
1487
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&gO.has(i))break;if(r===`
|
|
1488
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&gO.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(vO),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(pO(n)||t&&gO.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!pO(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(hO.has(t))t=this.buffer[++e];else if(t===`%`&&mO.has(this.buffer[e+1])&&mO.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
1489
1489
|
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
1490
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},
|
|
1490
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},bO=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function xO(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function SO(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function CO(e){switch(e==null?void 0:e.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function wO(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function TO(e){var t;if(e.length===0)return[];let n=e.length;loop:for(;--n>=0;)switch(e[n].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;((t=e[++n])==null?void 0:t.type)===`space`;);return e.splice(n,e.length)}function EO(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function DO(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!xO(t.start,`explicit-key-ind`)&&!xO(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,CO(t.value)?t.value.end?EO(t.value.end,t.sep):t.value.end=t.sep:EO(t.start,t.sep),delete t.sep)}var OO=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new yO,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=fO(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&(e==null?void 0:e.type)!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&DO(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&SO(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:SO(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=TO(wO(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
|
1491
1491
|
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1492
|
-
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){
|
|
1492
|
+
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){EO(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(!t.sep){if(xO(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=TO(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(xO(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(CO(t.key)&&!xO(t.sep,`newline`)){let e=TO(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):xO(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!xO(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){EO(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||xO(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while((e==null?void 0:e.type)===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=TO(wO(t));DO(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
1493
1493
|
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1494
|
-
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=vO(_O(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=vO(_O(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function SO(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new pO||null,prettyErrors:t}}function CO(e,t={}){let{lineCounter:n,prettyErrors:r}=SO(t),i=new xO(n==null?void 0:n.addNewLine),a=new $D(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new hD(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(_D(e,n)),o.warnings.forEach(_D(e,n))),o}function wO(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=CO(e,n);if(!i)return null;if(i.warnings.forEach(e=>qT(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}g();var TO={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},EO=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&typeof e==`string`&&(e||!this.props.schema.allowEmpty))try{wO(e)}catch(e){console.log(`Error in YAML`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:TO.flex},_.createElement(xt,{color:`grey`,style:TO.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_YAML editor`))),o?_.createElement(aS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||``})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...TO.wrapper,border:this.state.yamlError?`2px solid red`:`2px solid transparent`}},_.createElement(EC,{mode:`yaml`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,yamlError:this.validateYaml(e)}),name:`ConfigYamlEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?_.createElement(_n,null,this.state.yamlError?J.t(`jc_Invalid YAML`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var DO=class extends X{async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-bhrFL6jR.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){let e=this.state.QRCode;if(!e)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var OO=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-bhrFL6jR.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({qrData:e||``,loading:!1})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()));let e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var kO={accordion:js,alive:Ns,autocomplete:Ps,autocompleteSendTo:Fs,certCollection:Vs,certificate:Rs,certificates:Bs,checkbox:nc,checkDocker:Hs,checkLicense:tc,chip:cc,chips:cc,color:lc,coordinates:dc,credential:$s,cron:Ls,custom:bc,datePicker:jx,deviceManager:Mx,divider:ow,file:Kx,fileSelector:zx,func:qx,header:cw,iframe:Jx,iframeSendTo:Yx,image:Qx,imageSendTo:Zx,infoBox:$x,instance:tS,interface:rS,ip:Xx,jsonEditor:OC,language:AC,license:jC,number:NC,oauth2:PC,objectId:IC,password:zC,pattern:BC,port:HC,qrCode:DO,qrCodeSendTo:OO,room:UC,select:GC,selectSendTo:qC,sendto:ZC,sendTo:ZC,setState:$C,slider:tw,state:iw,staticImage:lw,staticInfo:pw,staticLink:gw,staticText:gw,table:Cw,text:Tw,textSendTo:Dw,timePicker:Ow,topic:Aw,uuid:jw,user:Nw,yamlEditor:EO},AO={fullWidth:{width:`100%`},paper:{margin:1,width:`auto !important`,overflowY:`auto`,paddingBottom:1,flex:`1 1 auto`,minHeight:0},padding:{padding:`10px`},heading:{},primary:e=>({backgroundColor:e.palette.primary.main,color:e.palette.mode===`dark`?`inherit`:`#FFF`}),secondary:e=>({backgroundColor:e.palette.secondary.main})},jO=class e extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)===`true`})}renderItems(t,n){return t?Object.keys(t).map(r=>{if(this.props.oContext.multiEdit&&t[r].noMultiEdit||!X.isHostAllowed(t[r],this.props.oContext.hostInfo))return null;let i=t[r].type||`panel`,a,o=`Use this.props.oContext.socket!`;if(i===`custom`)t[r].url?a=bc:this.props.oContext.customs&&this.props.oContext.customs[t[r].component]?a=this.props.oContext.customs[t[r].component]:(console.error(`Cannot find custom component: ${t[r].component}`),a=X),o=this.props.oContext.socket;else if(i===`component`){var s;let e=t[r].subType;if(e&&(s=this.props.customComponents)!=null&&s[e])a=this.props.customComponents[e];else return _.createElement(`div`,{key:`${r}_${this.props.index??``}`},`Component ${e} not provided`)}else a=i===`panel`?e:kO[i]||X;return _.createElement(a,{socket:o,globalData:this.props.globalData,oContext:this.props.oContext,key:`${r}_${this.props.index??``}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:AO.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:t[r],attr:r,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){let e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;let t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){let t=_.createElement(Jt,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:Zt.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:`left`},n,this.props.oContext.themeType===`dark`?e.darkStyle:void 0)});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return _.createElement(Jt,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:AO.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let r;if(e.collapsable)r=_.createElement(Ae,{key:`${this.props.attr}_${this.props.index}`,style:AO.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?`false`:`true`),this.setState({expanded:!this.state.expanded})}},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color===`primary`?AO.primary:e.color===`secondary`&&AO.secondary,{width:`100%`})},_.createElement(Pn,{style:AO.heading},this.getText(e.label))),_.createElement(xn,null,_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:`100%`,padding:`10px`}},this.renderItems(t,this.state.calculatedValues.disabled))));else{let e=Zt.getStyle(this.props.oContext.theme,this.props.style,n,{width:`100%`},this.props.isParentTab&&AO.paper);r=_.createElement(vt,{component:`div`,key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:e},_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:Zt.getStyle(this.props.oContext.theme,{width:`100%`},this.props.isParentTab&&AO.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){let t=_.createElement(Jt,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:`left`,...n}},r);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return r}};g();var MO={tabs:{height:`100%`,width:`100%`,display:`flex`,flexDirection:`column`},tabsBar:{flex:`0 0 auto`},panel:{width:`100%`,display:`block`,flex:`1 1 auto`,minHeight:0}},NO=class e extends X{constructor(t){super(t),K(this,`resizeObserver`,null),K(this,`resizeRaf`,null),K(this,`calculateTimeoutTable`,null),K(this,`pinTimeout`,null),K(this,`refDiv`,void 0),K(this,`onTabError`,(e,t)=>{let n=this.state.tab;if(!n&&e){this.props.onError(e,t);return}let r={...this.state.tabErrors};n&&(r[n]||={}),n&&e&&(t?r[n][e]=t:(delete r[n][e],Object.keys(r[n]).length===0&&delete r[n])),this.setState({tabErrors:r}),this.props.onError(e,t)}),K(this,`hasTabErrors`,e=>!!this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0),K(this,`measureWidth`,()=>{var t;let n=(t=this.refDiv.current)==null?void 0:t.clientWidth;if(!n)return;let r=this.state.useMenu;!r&&n<e.MENU_WIDTH?r=!0:r&&n>e.MENU_WIDTH+e.MENU_HYSTERESIS&&(r=!1),r!==this.state.useMenu&&this.setState({useMenu:r})}),K(this,`onHashTabsChanged`,()=>{let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>3&&e[1]===`config`){let t=e[3],n=parseInt(t,10),r;n.toString()===t?n>=0&&n<Object.keys(this.props.schema.items).length&&(r=Object.keys(this.props.schema.items)[n]):Object.keys(this.props.schema.items).includes(t)&&(r=t),r!==void 0&&r!==this.state.tab&&((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,r),this.pinWidthForTransition(),this.setState({tab:r}))}});let n;if(this.props.root){let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>=3&&e[1]===`config`){let t=e[3],r=parseInt(t,10);t&&r.toString()===t?r>=0&&r<Object.keys(this.props.schema.items).length&&(n=Object.keys(this.props.schema.items)[r]):t&&Object.keys(this.props.schema.items).includes(t)&&(n=t),window.addEventListener(`hashchange`,this.onHashTabsChanged,!1)}}n===void 0&&(n=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`)||Object.keys(this.props.schema.items)[0],Object.keys(this.props.schema.items).includes(n)||(n=Object.keys(this.props.schema.items)[0])),this.refDiv=_.createRef(),Object.assign(this.state,{tab:n,useMenu:!1,openMenu:null,tabErrors:{}})}async componentDidMount(){await super.componentDidMount(),this.measureWidth(),this.refDiv.current&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeRaf===null&&(this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.measureWidth()}))}),this.resizeObserver.observe(this.refDiv.current))}componentWillUnmount(){this.resizeRaf!==null&&(window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.calculateTimeoutTable&&=(clearTimeout(this.calculateTimeoutTable),null),this.pinTimeout&&=(clearTimeout(this.pinTimeout),null),window.removeEventListener(`hashchange`,this.onHashTabsChanged,!1),super.componentWillUnmount()}pinWidthForTransition(){var e;let t=(e=this.refDiv.current)==null?void 0:e.clientWidth;t&&(this.pinTimeout&&clearTimeout(this.pinTimeout),this.state.contentMinWidth!==t&&this.setState({contentMinWidth:t}),this.pinTimeout=setTimeout(()=>{this.pinTimeout=null,this.setState({contentMinWidth:void 0})},500))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,e),this.pinWidthForTransition(),this.setState({tab:e},()=>{if(this.props.root){let e=(window.location.hash||``).split(`/`);e.length>=3&&e[1]===`config`&&(e[3]=this.state.tab||``,window.location.hash=e.join(`/`))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;let e=this.props.schema.items,t={};for(let n in e){let r;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(!X.isHostAllowed(e[n],this.props.oContext.hostInfo)){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){let i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:r}}else{if(await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:r}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){let e=this.props.schema.items,t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;let n=[];Object.keys(e).filter(e=>{var t;return!((t=this.state.calculatedValuesTable)!=null&&(t=t[e])!=null&&t.hidden)}).map(r=>{var i;let a=this.getIcon(e[r].icon);t||=!!a,n.push({icon:a,disabled:!!((i=this.state.calculatedValuesTable)!=null&&(i=i[r])!=null&&i.disabled),label:this.getText(e[r].label),name:r})}),n.find(e=>e.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);let r;return r=this.state.useMenu&&n.length>2?_.createElement(ue,{style:{...MO.tabsBar,top:2,backgroundColor:this.props.oContext.themeType===`dark`?`#222`:`#DDD`},variant:`dense`},_.createElement(Zn,{onClick:e=>this.setState({openMenu:e.currentTarget})},_.createElement(Hn,null)),this.state.openMenu?_.createElement(ae,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(e=>{let n=this.hasTabErrors(e.name);return _.createElement(z,{disabled:e.disabled,key:e.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(e.name))},selected:e.name===this.state.tab,sx:n?{color:`error.main`}:void 0},t?_.createElement(te,null,e.icon):null,_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5,width:`100%`}},e.label,n&&_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})))})):null):_.createElement(W,{variant:`scrollable`,scrollButtons:`auto`,style:{...MO.tabsBar,...this.props.schema.tabsStyle},value:this.state.tab,onChange:(e,t)=>this.onMenuChange(t)},n.map(e=>{let t=this.hasTabErrors(e.name),n=t?_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5}},e.label,_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})):e.label;return _.createElement(He,{id:e.name,wrapped:!0,disabled:e.disabled,key:e.name,value:e.name,iconPosition:this.props.schema.iconPosition||`start`,icon:e.icon||void 0,label:n,sx:t?{"& .MuiTab-wrapper":{color:`error.main`}}:void 0})})),this.state.tab?_.createElement(`div`,{style:this.state.contentMinWidth===void 0?MO.tabs:{...MO.tabs,minWidth:this.state.contentMinWidth},ref:this.refDiv},r,_.createElement(jO,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:MO.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents})):null}};K(NO,`MENU_WIDTH`,600),K(NO,`MENU_HYSTERESIS`,40),g(),J.extendTranslations({en:{"jc_A credential with this name already exists":`A credential with this name already exists`,"jc_A unique name is required":`A unique name is required`,"jc_Accept license":`Accept license`,jc_Actions:`Actions`,"jc_Add credential":`Add credential`,"jc_Add row":`Add row`,"jc_All items are filtered out":`All items are filtered out`,jc_Append:`Append`,"jc_Append %s entries or replace existing?":`Append %s entries or replace existing?`,"jc_Append or replace?":`Append or replace?`,"jc_Are you sure?":`Are you sure?`,jc_Cancel:`Cancel`,"jc_Cannot add items with set filter":`Cannot add items with set filter`,"jc_Cannot create credential: %s":`Cannot create credential: %s`,"jc_Cannot decode license":`Cannot decode license`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Cannot determine position: System settings are empty and GPS detection is disabled in browser`,'jc_Cannot display the custom component "%s"':`Cannot display the custom component "%s"`,"jc_Cannot read licenses: %s":`Cannot read licenses: %s`,"jc_Cannot retrieve options, as instance is offline":`Cannot retrieve options, as instance is offline`,"jc_Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"jc_Cannot upload":`Cannot upload`,"jc_Chained certificate":`Chained certificate`,jc_Checked:`Checked`,"jc_Click to see in full size":`Click to see in full size`,"jc_Click to show":`Click to show`,"jc_Clone current row":`Clone current row`,jc_Close:`Close`,jc_Commercial:`Commercial`,jc_Copied:`Copied`,"jc_Copied %s":`Copied "%s"`,"jc_Copy content":`Copy content`,jc_Create:`Create`,"jc_Credential type":`Credential type`,'jc_Custom component "%s" was not started':`Custom component "%s" was not started`,"jc_Define schedule":`Define schedule`,jc_Delete:`Delete`,"jc_Delete current row":`Delete current row`,"jc_Disable/Enable translation":`Disable/Enable translation`,jc_Discard:`Discard`,"jc_Do not use let's encrypt":`Do not use let's encrypt`,"jc_Docker is not available":`Docker is not available`,"jc_Docker is not installed or not running":`Docker is not installed or not running`,"jc_Drop file here":`Drop file here`,"jc_Enter the code from that page here":`Enter the code from that page here`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expand/Collapse card`,"jc_Export configuration section":`Export configuration section`,"jc_Export data to %s file":`Export data to %s file`,"jc_Export setting to JSON file":`Export setting to JSON file`,"jc_Fallback custom certificates":`Fallback custom certificates`,"jc_File is too big. Max %sk allowed. Try use SVG.":`File is too big. Max %sk allowed. Try use SVG.`,"jc_File will be deleted":`File will be deleted`,"jc_Filter and Data Actions":`Filter and Data Actions`,"jc_Get %s access":`Get %s access`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`If the button above does not work, you can authorize manually this app by visiting this url`,"jc_Import and add configuration section":`Import and add configuration section`,"jc_Import and replace configuration section":`Import and replace configuration section`,"jc_Import data from %s file":`Import data from %s file`,"jc_Import from %s":`Import from %s`,"jc_Import settings from JSON file":`Import settings from JSON file`,"jc_Instance %s is alive":`Instance %s is alive`,"jc_Instance %s is not alive":`Instance %s is not alive`,"jc_Invalid JSON":`Invalid JSON`,"jc_Invalid JSON file.":`Invalid JSON file.`,"jc_Invalid JSON format. Expected an array.":`Invalid JSON format. Expected an array.`,"jc_Invalid YAML":`Invalid YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`It was probably built for an older admin version. Please update the adapter.`,"jc_JSON editor":`JSON editor`,jc_Latitude:`Latitude`,"jc_License %s":`License %s`,"jc_License agreement":`License agreement`,"jc_License does not exist":`License does not exist`,"jc_License expired on %s":`License expired on %s`,'jc_License for other product "%s"':`License for other product "%s"`,"jc_License is for version %s, but required version is %s":`License is for version %s, but required version is %s`,"jc_License must be converted":`License must be converted to newer version. You can do it in your iobroker.net profile.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`License not found in the license manager. Do you want to update licenses from iobroker.net?`,"jc_Listen on all IPs":`Listen on all IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Move down`,"jc_Move up":`Move up`,jc_Name:`Name`,"jc_No one license found in license manager":`No one license found in license manager`,"jc_No response from admin":`No response from admin`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,"jc_OAuth Client ID":`OAuth Client ID`,"jc_OAuth Client secret":`OAuth Client secret`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Passwords are not equal!`,"jc_Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,"jc_Please allow popups in your browser for this page!":`Please allow popups in your browser for this page!`,"jc_Please confirm":`Please confirm`,"jc_Please create license":`Please create license`,"jc_Please enter the license":`Please enter the license`,"jc_Please fill in all required fields":`Please fill in all required fields`,"jc_Port could be used by %s":`Port could be used by %s`,"jc_Port is already used by %s":`Port is already used by %s`,"jc_Press ENTER Key to add new item":`Press ENTER Key to add new item`,"jc_Private certificate":`Private certificate`,jc_Product:`Product`,"jc_Public certificate":`Public certificate`,"jc_Renew %s access":`Renew %s access`,jc_Replace:`Replace`,"jc_Request data by instance":`Request data by instance`,"jc_Request timed out":`Request timed out`,jc_Result:`Result`,jc_Save:`Save`,"jc_Save configuration?":`Save configuration?`,"jc_Serial number (UUID)":`Serial number (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serial number (UUID) "%s" in license is for other device.`,"jc_Show/hide filter input":`Show/hide filter input`,"jc_Some data are not stored. Discard?":`Some data are not stored. Discard?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Successfully authorized. Token valid till %s and will be automatically renewed.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,"jc_Suitable license not found in license manager":`Suitable license not found in license manager`,"jc_System language":`System language`,"jc_Take browser position":`Take position from browser`,"jc_Take position from system settings":`Take position from system settings`,jc_Template:`Template`,"jc_Use all available let's encrypt certificates":`Use all available let's encrypt certificates`,"jc_Use system settings for position":`Use system settings for position`,"jc_Used system settings":`Used system settings`,jc_ValidTill:`Valid till`,jc_Version:`Version`,"jc_YAML editor":`YAML editor`,jc_Yes:`Yes`,"jc_You can filter entries by entering here some text":`You can filter entries by entering here some text`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Failed to open JSON File`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Failed to parse JSON file`,jc___different__:`different`,jc_false:`FALSE`,jc_locally:`locally`,jc_none:`none`,jc_repeat:`repeat`,jc_true:`TRUE`,"jc_via internet":`via internet`,sch_all:`all`},de:{"jc_A credential with this name already exists":`Es existiert bereits eine Berechtigung mit diesem Namen.`,"jc_A unique name is required":`Ein eindeutiger Name ist erforderlich.`,"jc_Accept license":`Lizenz akzeptieren`,jc_Actions:`Aktionen`,"jc_Add credential":`Anmeldeinformationen hinzufügen`,"jc_Add row":`Zeile hinzufügen`,"jc_All items are filtered out":`Alle Elemente sind herausgefiltert`,jc_Append:`Anhängen`,"jc_Append %s entries or replace existing?":`%s Einträge anhängen oder vorhandene ersetzen?`,"jc_Append or replace?":`Anhängen oder ersetzen?`,"jc_Are you sure?":`Bist du sicher?`,jc_Cancel:`Abbrechen`,"jc_Cannot add items with set filter":`Elemente mit festgelegtem Filter können nicht hinzugefügt werden`,"jc_Cannot create credential: %s":`Anmeldeinformationen konnten nicht erstellt werden: %s`,"jc_Cannot decode license":`Lizenz kann nicht entschlüsselt werden`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert`,'jc_Cannot display the custom component "%s"':`Die benutzerdefinierte Komponente "%s" kann nicht angezeigt werden`,"jc_Cannot read licenses: %s":`Lizenzen können nicht gelesen werden: %s`,"jc_Cannot retrieve options, as instance is offline":`Optionen können nicht abgerufen werden, da die Instanz offline ist`,"jc_Cannot save configuration because of error in configuration":`Die Konfiguration konnte aufgrund eines Fehlers nicht gespeichert werden.`,"jc_Cannot upload":`Kann nicht hochladen`,"jc_Chained certificate":`Chained Zertifikat`,jc_Checked:`Geprüft`,"jc_Click to see in full size":`Klicken Sie hier, um die Vollbildansicht zu öffnen.`,"jc_Click to show":`Zum Anzeigen klicken`,"jc_Clone current row":`Aktuelle Zeile klonen`,jc_Close:`Schließen`,jc_Commercial:`Kommerziell`,jc_Copied:`Kopiert`,"jc_Copied %s":`"%s" kopiert`,"jc_Copy content":`Inhalte kopieren`,jc_Create:`Erstellen`,"jc_Credential type":`Anmeldeinformationstyp`,'jc_Custom component "%s" was not started':`Die benutzerdefinierte Komponente "%s" wurde nicht gestartet`,"jc_Define schedule":`Zeitplan definieren`,jc_Delete:`Löschen`,"jc_Delete current row":`Aktuelle Zeile löschen`,"jc_Disable/Enable translation":`Übersetzung deaktivieren/aktivieren`,jc_Discard:`Verwerfen`,"jc_Do not use let's encrypt":`Let's encrypt nicht verwenden`,"jc_Docker is not available":`Docker ist nicht verfügbar`,"jc_Docker is not installed or not running":`Docker ist nicht installiert oder läuft nicht`,"jc_Drop file here":`Datei hier ablegen`,"jc_Enter the code from that page here":`Geben Sie den Code von dieser Seite hier ein`,jc_Error:`Fehler`,"jc_Expand/Collapse card":`Karte ein-/ausklappen`,"jc_Export configuration section":`Konfigurationsabschnitt exportieren`,"jc_Export data to %s file":`Daten in %s-Datei exportieren`,"jc_Export setting to JSON file":`Einstellungen in eine JSON-Datei exportieren`,"jc_Fallback custom certificates":`Benutzerdefinierte Fallback-Zertifikate`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.`,"jc_File will be deleted":`Die Datei wird gelöscht`,"jc_Filter and Data Actions":`Filter- und Datenaktionen`,"jc_Get %s access":`%s Zugriff erhalten`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen`,"jc_Import and add configuration section":`Konfigurationsabschnitt importieren und hinzufügen`,"jc_Import and replace configuration section":`Konfigurationsabschnitt importieren und ersetzen`,"jc_Import data from %s file":`Daten aus %s-Datei importieren`,"jc_Import from %s":`Von %s importieren`,"jc_Import settings from JSON file":`Einstellungen aus einer JSON-Datei importieren`,"jc_Instance %s is alive":`Instanz %s ist aktiv`,"jc_Instance %s is not alive":`Instanz %s ist nicht aktiv`,"jc_Invalid JSON":`Ungültiges JSON`,"jc_Invalid JSON file.":`Ungültige JSON-Datei.`,"jc_Invalid JSON format. Expected an array.":`Ungültiges JSON-Format. Array erwartet.`,"jc_Invalid YAML":`Ungültiges YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Sie benötigt GUI-API-Generation %s, dieser Admin stellt aber Generation %s bereit. Bitte den Admin aktualisieren.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Sie wurde für GUI-API-Generation %s erstellt, dieser Admin stellt aber Generation %s bereit. Bitte den Adapter aktualisieren.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Sie wurde vermutlich für eine ältere Admin-Version erstellt. Bitte den Adapter aktualisieren.`,"jc_JSON editor":`JSON-Editor`,jc_Latitude:`Breite`,"jc_License %s":`Lizenz %s`,"jc_License agreement":`Lizenzvereinbarung`,"jc_License does not exist":`Lizenz existiert nicht`,"jc_License expired on %s":`Lizenz am %s abgelaufen`,'jc_License for other product "%s"':`Lizenz für anderes Produkt „%s“`,"jc_License is for version %s, but required version is %s":`Die Lizenz gilt für Version %s, benötigt wird jedoch Version %s.`,"jc_License must be converted":`Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?`,"jc_Listen on all IPs":`Zugriff von allen IPs zulassen`,jc_Longitude:`Längengrad`,"jc_Move down":`Nach unten`,"jc_Move up":`Nach oben`,jc_Name:`Name`,"jc_No one license found in license manager":`Im Lizenzmanager wurde keine Lizenz gefunden`,"jc_No response from admin":`Keine Antwort vom Administrator`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Nicht zulässiger doppelter Eintrag "%s" in Spalte "%s"`,"jc_OAuth Client ID":`OAuth-Client-ID`,"jc_OAuth Client secret":`OAuth-Client-Secret`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Passwörter sind nicht gleich!`,"jc_Place your files here or click here to open the browse dialog":`Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen`,"jc_Please allow popups in your browser for this page!":`Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!`,"jc_Please confirm":`Bitte bestätigen`,"jc_Please create license":`Bitte erstellen Sie eine Lizenz`,"jc_Please enter the license":`Bitte die Lizenz eingeben`,"jc_Please fill in all required fields":`Bitte füllen Sie alle Pflichtfelder aus.`,"jc_Port could be used by %s":`Port könnte von %s verwendet werden`,"jc_Port is already used by %s":`Port wird bereits von %s verwendet`,"jc_Press ENTER Key to add new item":`Die Eingabetaste drücken, um ein neues Element hinzuzufügen`,"jc_Private certificate":`Privates Zertifikat`,jc_Product:`Produkt`,"jc_Public certificate":`Öffentliches Zertifikat`,"jc_Renew %s access":`%s Zugriff erneuern`,jc_Replace:`Ersetzen`,"jc_Request data by instance":`Daten pro Instanz anfordern`,"jc_Request timed out":`Zeitüberschreitung der Anforderung`,jc_Result:`Ergebnis`,jc_Save:`Speichern`,"jc_Save configuration?":`Konfiguration speichern?`,"jc_Serial number (UUID)":`Seriennummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.`,"jc_Show/hide filter input":`Filtereingabe ein-/ausblenden`,"jc_Some data are not stored. Discard?":`Einige Daten werden nicht gespeichert. Verwerfen?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.`,"jc_Suitable license not found in license manager":`Passende Lizenz im Lizenzmanager nicht gefunden`,"jc_System language":`Systemsprache`,"jc_Take browser position":`Position vom Browser einnehmen`,"jc_Take position from system settings":`Position aus den Systemeinstellungen übernehmen`,jc_Template:`Vorlage`,"jc_Use all available let's encrypt certificates":`Alle verfügbaren Zertifikate von Let's encrypt benutzen`,"jc_Use system settings for position":`Systemeinstellungen für die Position verwenden`,"jc_Used system settings":`Systemeinstellungen`,jc_ValidTill:`Gültig bis`,jc_Version:`Ausführung`,"jc_YAML editor":`YAML-Editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`Sie können Einträge filtern, indem Sie hier Text eingeben`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Fehler beim Öffnen der JSON-Datei`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Fehler beim Parsen der JSON-Datei`,jc___different__:`unterschiedlich`,jc_false:`FALSCH`,jc_locally:`örtlich`,jc_none:`kein`,jc_repeat:`wiederholen`,jc_true:`WAHR`,"jc_via internet":`übers Internet`,sch_all:`alle`},ru:{"jc_A credential with this name already exists":`Учетные данные с таким именем уже существуют.`,"jc_A unique name is required":`Требуется уникальное имя.`,"jc_Accept license":`Принять лицензию`,jc_Actions:`Действия`,"jc_Add credential":`Добавить учетные данные`,"jc_Add row":`Добавить ряд`,"jc_All items are filtered out":`Все элементы отфильтрованы`,jc_Append:`Добавить`,"jc_Append %s entries or replace existing?":`Добавить записи %s или заменить существующие?`,"jc_Append or replace?":`Дополнить или заменить?`,"jc_Are you sure?":`Вы уверены?`,jc_Cancel:`Отмена`,"jc_Cannot add items with set filter":`Невозможно добавить элементы с установленным фильтром`,"jc_Cannot create credential: %s":`Не удалось создать учетные данные: %s`,"jc_Cannot decode license":`Не могу декодировать лицензию`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.`,'jc_Cannot display the custom component "%s"':`Не удается отобразить пользовательский компонент "%s"`,"jc_Cannot read licenses: %s":`Невозможно прочитать лицензии: %s`,"jc_Cannot retrieve options, as instance is offline":`Невозможно получить параметры, так как экземпляр находится в автономном режиме.`,"jc_Cannot save configuration because of error in configuration":`Невозможно сохранить конфигурацию из-за ошибки в конфигурации.`,"jc_Cannot upload":`Невозможно загрузить`,"jc_Chained certificate":`Chained сертификат`,jc_Checked:`Проверено`,"jc_Click to see in full size":`Нажмите, чтобы посмотреть в полном размере`,"jc_Click to show":`Нажмите, чтобы показать`,"jc_Clone current row":`Клонировать текущую строку`,jc_Close:`Закрыть`,jc_Commercial:`Коммерческая`,jc_Copied:`скопировано`,"jc_Copied %s":`Скопировано "%s"`,"jc_Copy content":`Копировать содержимое`,jc_Create:`Создать`,"jc_Credential type":`Тип учетных данных`,'jc_Custom component "%s" was not started':`Пользовательский компонент "%s" не был запущен.`,"jc_Define schedule":`Задать расписание`,jc_Delete:`Удалить`,"jc_Delete current row":`Удалить текущую строку`,"jc_Disable/Enable translation":`Включить/отключить перевод`,jc_Discard:`Отказаться`,"jc_Do not use let's encrypt":`Не использовать Let’s Encrypt`,"jc_Docker is not available":`Докер недоступен`,"jc_Docker is not installed or not running":`Docker не установлен или не запущен`,"jc_Drop file here":`Перетащите файл сюда`,"jc_Enter the code from that page here":`Введите код с этой страницы здесь`,jc_Error:`Ошибка`,"jc_Expand/Collapse card":`Развернуть/Свернуть карточку`,"jc_Export configuration section":`Раздел конфигурации экспорта`,"jc_Export data to %s file":`Экспорт данных в файл %s`,"jc_Export setting to JSON file":`Экспорт настроек в JSON-файл`,"jc_Fallback custom certificates":`Резервные пользовательские сертификаты`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.`,"jc_File will be deleted":`Файл будет удалён`,"jc_Filter and Data Actions":`Фильтрация и действия с данными`,"jc_Get %s access":`Получить %s доступ`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.`,"jc_Import and add configuration section":`Импорт и добавление раздела конфигурации`,"jc_Import and replace configuration section":`Импорт и замена раздела конфигурации`,"jc_Import data from %s file":`Импорт данных из файла %s`,"jc_Import from %s":`Импорт из %s`,"jc_Import settings from JSON file":`Импорт настроек из JSON-файла`,"jc_Instance %s is alive":`Экземпляр %s работает`,"jc_Instance %s is not alive":`Экземпляр %s не работает`,"jc_Invalid JSON":`Неверный JSON`,"jc_Invalid JSON file.":`Неверный файл JSON.`,"jc_Invalid JSON format. Expected an array.":`Недопустимый формат JSON. Ожидается массив.`,"jc_Invalid YAML":`Недопустимый YAML-файл`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Для этого требуется генерация API графического интерфейса пользователя %s, но администратор предоставляет генерацию %s. Пожалуйста, обновите администратора.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Он был создан для генерации API графического интерфейса пользователя %s, но этот администратор предоставляет генерацию %s. Пожалуйста, обновите адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Вероятно, он был создан для более старой версии административной панели. Пожалуйста, обновите адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Лицензия %s`,"jc_License agreement":`Лицензионное соглашение`,"jc_License does not exist":`Лицензия не существует`,"jc_License expired on %s":`Срок действия лицензии истек %s`,'jc_License for other product "%s"':`Лицензия на другой продукт "%s"`,"jc_License is for version %s, but required version is %s":`Лицензия распространяется на версию %s, но требуемая версия — %s.`,"jc_License must be converted":`Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?`,"jc_Listen on all IPs":`Слушать на всех IP`,jc_Longitude:`Долгота`,"jc_Move down":`Вниз`,"jc_Move up":`Вверх`,jc_Name:`Имя`,"jc_No one license found in license manager":`В менеджере лицензий не найдена ни одна лицензия`,"jc_No response from admin":`Нет ответа от администратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недопустимая повторяющаяся запись "%s" в столбце "%s"`,"jc_OAuth Client ID":`Идентификатор клиента OAuth`,"jc_OAuth Client secret":`Секрет клиента OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Пароли не равны!`,"jc_Place your files here or click here to open the browse dialog":`Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора`,"jc_Please allow popups in your browser for this page!":`Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!`,"jc_Please confirm":`Пожалуйста подтвердите`,"jc_Please create license":`Пожалуйста, создайте лицензию`,"jc_Please enter the license":`Пожалуйста, введите лицензию`,"jc_Please fill in all required fields":`Пожалуйста, заполните все обязательные поля.`,"jc_Port could be used by %s":`Порт может использоваться %s`,"jc_Port is already used by %s":`Порт уже используется %s`,"jc_Press ENTER Key to add new item":`Нажмите клавишу ENTER, чтобы добавить новый элемент.`,"jc_Private certificate":`Частный сертификат`,jc_Product:`Продукт`,"jc_Public certificate":`Публичный сертификат`,"jc_Renew %s access":`Продлить доступ %s`,jc_Replace:`Заменять`,"jc_Request data by instance":`Запрос данных по экземпляру`,"jc_Request timed out":`Истекло время запроса`,jc_Result:`Результат`,jc_Save:`Сохранить`,"jc_Save configuration?":`Сохранить конфигурацию?`,"jc_Serial number (UUID)":`Серийный номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.`,"jc_Show/hide filter input":`Показать/скрыть ввод фильтра`,"jc_Some data are not stored. Discard?":`Некоторые данные не сохранились. Отказаться?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.`,"jc_Suitable license not found in license manager":`Подходящая лицензия не найдена в менеджере лицензий`,"jc_System language":`Язык системы`,"jc_Take browser position":`Взять позицию из браузера`,"jc_Take position from system settings":`Занять позицию из системных настроек`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Использовать все доступные сертификаты Let’s encrypt`,"jc_Use system settings for position":`Использовать системные настройки для позиции`,"jc_Used system settings":`Системные настройки`,jc_ValidTill:`Годен до`,jc_Version:`Версия`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Да`,"jc_You can filter entries by entering here some text":`Вы можете отфильтровать записи, введя здесь текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не удалось открыть JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не удалось разобрать JSON-файл`,jc___different__:`разное`,jc_false:`ЛОЖЬ`,jc_locally:`локально`,jc_none:`ничего`,jc_repeat:`повтор`,jc_true:`истинный`,"jc_via internet":`через интернет`,sch_all:`все`},pt:{"jc_A credential with this name already exists":`Já existe uma credencial com este nome.`,"jc_A unique name is required":`É necessário um nome único.`,"jc_Accept license":`Aceitar licença`,jc_Actions:`Ações`,"jc_Add credential":`Adicionar credencial`,"jc_Add row":`Adicionar linha`,"jc_All items are filtered out":`Todos os itens são filtrados`,jc_Append:`Acrescentar`,"jc_Append %s entries or replace existing?":`Acrescentar %s entradas ou substituir as existentes?`,"jc_Append or replace?":`Acrescentar ou substituir?`,"jc_Are you sure?":`Você tem certeza?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`Não é possível adicionar itens com filtro definido`,"jc_Cannot create credential: %s":`Não foi possível criar a credencial: %s`,"jc_Cannot decode license":`Não é possível decodificar a licença`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador`,'jc_Cannot display the custom component "%s"':`Não é possível exibir o componente personalizado "%s"`,"jc_Cannot read licenses: %s":`Não é possível ler licenças: %s`,"jc_Cannot retrieve options, as instance is offline":`Não é possível recuperar opções, pois a instância está off-line`,"jc_Cannot save configuration because of error in configuration":`Não foi possível salvar a configuração devido a um erro na configuração.`,"jc_Cannot upload":`Não é possível fazer upload`,"jc_Chained certificate":`certificado encadeado`,jc_Checked:`Verificado`,"jc_Click to see in full size":`Clique para ver em tamanho real.`,"jc_Click to show":`Clique para mostrar`,"jc_Clone current row":`Clonar linha atual`,jc_Close:`Perto`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`"%s" copiado`,"jc_Copy content":`Copiar conteúdo`,jc_Create:`Crio`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`O componente personalizado "%s" não foi iniciado.`,"jc_Define schedule":`Definir cronograma`,jc_Delete:`Excluir`,"jc_Delete current row":`Excluir linha atual`,"jc_Disable/Enable translation":`Desativar/Ativar tradução`,jc_Discard:`Descartar`,"jc_Do not use let's encrypt":`Não use vamos criptografar`,"jc_Docker is not available":`O Docker não está disponível`,"jc_Docker is not installed or not running":`O Docker não está instalado ou não está em execução`,"jc_Drop file here":`Solte o arquivo aqui`,"jc_Enter the code from that page here":`Digite o código dessa página aqui`,jc_Error:`Erro`,"jc_Expand/Collapse card":`Expandir/Recolher cartão`,"jc_Export configuration section":`Seção de configuração de exportação`,"jc_Export data to %s file":`Exportar dados para o arquivo %s`,"jc_Export setting to JSON file":`Exportar configurações para arquivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`O arquivo é muito grande. Max %sk permitido. Tente usar SVG.`,"jc_File will be deleted":`O arquivo será excluído.`,"jc_Filter and Data Actions":`Ações de filtro e dados`,"jc_Get %s access":`Obtenha acesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url`,"jc_Import and add configuration section":`Seção de importação e adição de configuração`,"jc_Import and replace configuration section":`Seção de configuração de importação e substituição`,"jc_Import data from %s file":`Importar dados do arquivo %s`,"jc_Import from %s":`Importar de %s`,"jc_Import settings from JSON file":`Importar configurações de um arquivo JSON`,"jc_Instance %s is alive":`O %s da instância está ativo`,"jc_Instance %s is not alive":`O %s da instância não está ativo`,"jc_Invalid JSON":`JSON inválido`,"jc_Invalid JSON file.":`Arquivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Esperava-se uma matriz.`,"jc_Invalid YAML":`YAML inválido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`É necessário gerar %s da API da GUI, mas este painel de administração já fornece a geração %s. Por favor, atualize o painel de administração.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Foi desenvolvido para geração de API GUI %s, mas este painel de administração fornece geração %s. Por favor, atualize o adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Provavelmente foi desenvolvido para uma versão administrativa mais antiga. Por favor, atualize o adaptador.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licença %s`,"jc_License agreement":`Contrato de licença`,"jc_License does not exist":`A licença não existe`,"jc_License expired on %s":`A licença expirou em %s`,'jc_License for other product "%s"':`Licença para outro produto "%s"`,"jc_License is for version %s, but required version is %s":`A licença é para a versão %s, mas a versão necessária é %s.`,"jc_License must be converted":`A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?`,"jc_Listen on all IPs":`Ouça em todos os IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Mover para baixo`,"jc_Move up":`Subir`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nenhuma licença encontrada no gerenciador de licenças`,"jc_No response from admin":`Nenhuma resposta do administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada não permitida "%s" na coluna "%s"`,"jc_OAuth Client ID":`ID do cliente OAuth`,"jc_OAuth Client secret":`Segredo do cliente OAuth`,jc_Ok:`Está bem`,"jc_Passwords are not equal!":`As senhas não são iguais!`,"jc_Place your files here or click here to open the browse dialog":`Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação`,"jc_Please allow popups in your browser for this page!":`Por favor, permita pop-ups no seu navegador para esta página!`,"jc_Please confirm":`Por favor confirme`,"jc_Please create license":`Crie uma licença`,"jc_Please enter the license":`Por favor, insira a licença`,"jc_Please fill in all required fields":`Por favor, preencha todos os campos obrigatórios.`,"jc_Port could be used by %s":`A porta pode ser usada por %s`,"jc_Port is already used by %s":`A porta já está sendo usada por %s`,"jc_Press ENTER Key to add new item":`Pressione a tecla ENTER para adicionar um novo item`,"jc_Private certificate":`certificado privado`,jc_Product:`produtos`,"jc_Public certificate":`certificado público`,"jc_Renew %s access":`Renovar acesso %s`,jc_Replace:`Substituir`,"jc_Request data by instance":`Solicitar dados por instância`,"jc_Request timed out":`Solicitação expirou`,jc_Result:`Resultado`,jc_Save:`Salve `,"jc_Save configuration?":`Salvar configuração?`,"jc_Serial number (UUID)":`Número de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`O número de série (UUID) "%s" na licença é para outro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Alguns dados não são armazenados. Descartar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado com sucesso. Token válido até %s e será renovado automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.`,"jc_Suitable license not found in license manager":`Licença adequada não encontrada no gerenciador de licenças`,"jc_System language":`Idioma do sistema`,"jc_Take browser position":`Tomar posição do navegador`,"jc_Take position from system settings":`Tomar posição a partir das configurações do sistema`,jc_Template:`Modelo`,"jc_Use all available let's encrypt certificates":`Use todos os certificados disponíveis vamos criptografar`,"jc_Use system settings for position":`Use as configurações do sistema para a posição`,"jc_Used system settings":`Configurações do sistema usadas`,jc_ValidTill:`Válida até`,jc_Version:`Versão`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sim`,"jc_You can filter entries by entering here some text":`Você pode filtrar as entradas digitando aqui algum texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Falha ao abrir o arquivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Falha ao analisar o arquivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`Nenhum`,jc_repeat:`repetir`,jc_true:`verdadeiro`,"jc_via internet":`via internet`,sch_all:`tudo`},nl:{"jc_A credential with this name already exists":`Er bestaat al een legitimatiebewijs met deze naam.`,"jc_A unique name is required":`Een unieke naam is vereist.`,"jc_Accept license":`Accepteer licentie`,jc_Actions:`Acties`,"jc_Add credential":`Voeg inloggegevens toe`,"jc_Add row":`Voeg een rij toe`,"jc_All items are filtered out":`Alle items zijn uitgefilterd`,jc_Append:`toevoegen`,"jc_Append %s entries or replace existing?":`%s ingangen toevoegen of bestaande vervangen?`,"jc_Append or replace?":`Toevoegen of vervangen?`,"jc_Are you sure?":`Weet je het zeker?`,jc_Cancel:`Annuleer`,"jc_Cannot add items with set filter":`Kan geen items toevoegen met ingestelde filter`,"jc_Cannot create credential: %s":`Kan geen inloggegevens aanmaken: %s`,"jc_Cannot decode license":`Kan licentie niet decoderen`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser`,'jc_Cannot display the custom component "%s"':`Kan het aangepaste component "%s" niet weergeven.`,"jc_Cannot read licenses: %s":`Kan licenties niet lezen: %s`,"jc_Cannot retrieve options, as instance is offline":`Kan opties niet ophalen, omdat instantie offline is`,"jc_Cannot save configuration because of error in configuration":`Configuratie kan niet worden opgeslagen vanwege een configuratiefout.`,"jc_Cannot upload":`Kan niet uploaden`,"jc_Chained certificate":`Geketend certificaat`,jc_Checked:`Gecontroleerd`,"jc_Click to see in full size":`Klik om de afbeelding op volledige grootte te bekijken.`,"jc_Click to show":`Klik om te tonen`,"jc_Clone current row":`Kloon de huidige rij`,jc_Close:`Dichtbij`,jc_Commercial:`Reclame`,jc_Copied:`Gekopieerd`,"jc_Copied %s":`"%s" gekopieerd`,"jc_Copy content":`Inhoud kopiëren`,jc_Create:`Creëer`,"jc_Credential type":`Referentietype`,'jc_Custom component "%s" was not started':`Aangepaste component "%s" is niet gestart.`,"jc_Define schedule":`Definieer schema`,jc_Delete:`Verwijderen`,"jc_Delete current row":`Huidige rij verwijderen`,"jc_Disable/Enable translation":`Vertaling uitschakelen/inschakelen`,jc_Discard:`Weggooien`,"jc_Do not use let's encrypt":`Gebruik geen let's encrypt`,"jc_Docker is not available":`Docker is niet beschikbaar`,"jc_Docker is not installed or not running":`Docker is niet geïnstalleerd of draait niet`,"jc_Drop file here":`Zet het bestand hier neer`,"jc_Enter the code from that page here":`Voer hier de code van die pagina in`,jc_Error:`Fout`,"jc_Expand/Collapse card":`Kaart uit-/inklappen`,"jc_Export configuration section":`Sectie Exportconfiguratie`,"jc_Export data to %s file":`Exporteer gegevens naar %s bestand`,"jc_Export setting to JSON file":`Exporteer instellingen naar een JSON-bestand.`,"jc_Fallback custom certificates":`Fallback aangepaste certificaten`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.`,"jc_File will be deleted":`Het bestand wordt verwijderd.`,"jc_Filter and Data Actions":`Filter- en gegevensacties`,"jc_Get %s access":`Krijg %s toegang`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken`,"jc_Import and add configuration section":`Configuratiesectie importeren en toevoegen`,"jc_Import and replace configuration section":`Configuratiesectie importeren en vervangen`,"jc_Import data from %s file":`Importeer gegevens uit %s bestand`,"jc_Import from %s":`Importeren uit %s`,"jc_Import settings from JSON file":`Instellingen importeren vanuit een JSON-bestand`,"jc_Instance %s is alive":`Instantie %s leeft`,"jc_Instance %s is not alive":`Instantie %s is niet actief`,"jc_Invalid JSON":`Ongeldige JSON`,"jc_Invalid JSON file.":`Ongeldig JSON-bestand.`,"jc_Invalid JSON format. Expected an array.":`Ongeldige JSON-indeling. Er werd een array verwacht.`,"jc_Invalid YAML":`Ongeldige YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Het vereist GUI API-generatie %s, maar deze beheerder levert generatie %s. Graag de beheerder bijwerken.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Het is gebouwd voor GUI API-generatie %s, maar deze beheerder levert generatie %s. Update de adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Het is waarschijnlijk ontwikkeld voor een oudere beheerdersversie. Update de adapter.`,"jc_JSON editor":`JSON-editor`,jc_Latitude:`Breedtegraad`,"jc_License %s":`Licentie %s`,"jc_License agreement":`Licentieovereenkomst`,"jc_License does not exist":`Licentie bestaat niet`,"jc_License expired on %s":`Licentie verlopen op %s`,'jc_License for other product "%s"':`Licentie voor ander product "%s"`,"jc_License is for version %s, but required version is %s":`De licentie is voor versie %s, maar de vereiste versie is %s.`,"jc_License must be converted":`Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?`,"jc_Listen on all IPs":`Luister op alle IP's`,jc_Longitude:`Lengtegraad`,"jc_Move down":`Naar beneden verplaatsen`,"jc_Move up":`Omhoog gaan`,jc_Name:`Naam`,"jc_No one license found in license manager":`Geen enkele licentie gevonden in licentiebeheer`,"jc_No response from admin":`Geen reactie van de beheerder`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niet-toegestane dubbele invoer "%s" in kolom "%s"`,"jc_OAuth Client ID":`OAuth-client-ID`,"jc_OAuth Client secret":`OAuth-clientgeheim`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Wachtwoorden zijn niet gelijk!`,"jc_Place your files here or click here to open the browse dialog":`Plaats uw bestanden hier of klik hier om het bladervenster te openen`,"jc_Please allow popups in your browser for this page!":`Sta pop-ups toe in uw browser voor deze pagina!`,"jc_Please confirm":`Bevestig alstublieft`,"jc_Please create license":`Maak een licentie aan`,"jc_Please enter the license":`Voer de licentie in`,"jc_Please fill in all required fields":`Vul alle verplichte velden in.`,"jc_Port could be used by %s":`Poort kan worden gebruikt door %s`,"jc_Port is already used by %s":`Poort wordt al gebruikt door %s`,"jc_Press ENTER Key to add new item":`Druk op de ENTER-toets om een nieuw item toe te voegen`,"jc_Private certificate":`Privé certificaat`,jc_Product:`Product`,"jc_Public certificate":`Openbaar certificaat`,"jc_Renew %s access":`%s toegang verlengen`,jc_Replace:`Vervangen`,"jc_Request data by instance":`Gegevens opvragen per instantie`,"jc_Request timed out":`Verzoek verlopen`,jc_Result:`Resultaat`,jc_Save:`Sparen`,"jc_Save configuration?":`Configuratie opslaan?`,"jc_Serial number (UUID)":`Serienummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serienummer (UUID) "%s" in licentie is voor ander apparaat.`,"jc_Show/hide filter input":`Filterinvoer weergeven/verbergen`,"jc_Some data are not stored. Discard?":`Sommige gegevens worden niet opgeslagen. Weggooien?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.`,"jc_Suitable license not found in license manager":`Geschikte licentie niet gevonden in licentiebeheer`,"jc_System language":`Systeemtaal`,"jc_Take browser position":`Positie innemen vanuit de browser`,"jc_Take position from system settings":`Neem positie over van systeeminstellingen`,jc_Template:`Sjabloon`,"jc_Use all available let's encrypt certificates":`Gebruik alle beschikbare Let's Encrypt-certificaten`,"jc_Use system settings for position":`Gebruik systeeminstellingen voor positie`,"jc_Used system settings":`Gebruikte systeeminstellingen`,jc_ValidTill:`Geldig tot`,jc_Version:`Versie`,"jc_YAML editor":`YAML-editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`U kunt items filteren door hier wat tekst in te voeren`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Het openen van het JSON-bestand is mislukt.`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Het parseren van het JSON-bestand is mislukt.`,jc___different__:`verschillend`,jc_false:`ONWAAR`,jc_locally:`plaatselijk`,jc_none:`geen`,jc_repeat:`herhalen`,jc_true:`WAAR`,"jc_via internet":`via internet`,sch_all:`allemaal`},fr:{"jc_A credential with this name already exists":`Un certificat portant ce nom existe déjà.`,"jc_A unique name is required":`Un nom unique est requis.`,"jc_Accept license":`Accepter la licence`,jc_Actions:`Actes`,"jc_Add credential":`Ajouter un identifiant`,"jc_Add row":`Ajouter une rangée`,"jc_All items are filtered out":`Tous les éléments sont filtrés`,jc_Append:`Ajouter`,"jc_Append %s entries or replace existing?":`Ajouter %s entrées ou remplacer l'existant\xA0?`,"jc_Append or replace?":`Ajouter ou remplacer\xA0?`,"jc_Are you sure?":`Êtes-vous sûr?`,jc_Cancel:`Annuler`,"jc_Cannot add items with set filter":`Impossible d'ajouter des éléments avec le filtre défini`,"jc_Cannot create credential: %s":`Impossible de créer les informations d'identification\xA0: %s`,"jc_Cannot decode license":`Impossible de décoder la licence`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossible de déterminer la position\xA0: les paramètres système sont vides et la détection GPS est désactivée dans le navigateur`,'jc_Cannot display the custom component "%s"':`Impossible d'afficher le composant personnalisé « %s »`,"jc_Cannot read licenses: %s":`Impossible de lire les licences\xA0: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossible de récupérer les options, car l'instance est hors ligne`,"jc_Cannot save configuration because of error in configuration":`Impossible d'enregistrer la configuration en raison d'une erreur de configuration.`,"jc_Cannot upload":`Impossible de télécharger`,"jc_Chained certificate":`Certificat chaîné`,jc_Checked:`Vérifié`,"jc_Click to see in full size":`Cliquez pour afficher en taille réelle`,"jc_Click to show":`Cliquez pour afficher`,"jc_Clone current row":`Cloner la ligne actuelle`,jc_Close:`Fermer`,jc_Commercial:`Commercial`,jc_Copied:`Copié`,"jc_Copied %s":`"%s" copié`,"jc_Copy content":`Copier le contenu`,jc_Create:`Créer`,"jc_Credential type":`Type de justificatif d'identité`,'jc_Custom component "%s" was not started':`Le composant personnalisé « %s » n'a pas été démarré.`,"jc_Define schedule":`Définir le calendrier`,jc_Delete:`Supprimer`,"jc_Delete current row":`Supprimer la ligne actuelle`,"jc_Disable/Enable translation":`Activer/Désactiver la traduction`,jc_Discard:`Jeter`,"jc_Do not use let's encrypt":`Ne pas utiliser let's encrypt`,"jc_Docker is not available":`Docker n'est pas disponible`,"jc_Docker is not installed or not running":`Docker n'est pas installé ou n'est pas en cours d'exécution`,"jc_Drop file here":`Déposer le fichier ici`,"jc_Enter the code from that page here":`Entrez le code de cette page ici`,jc_Error:`Erreur`,"jc_Expand/Collapse card":`Carte Développer/Réduire`,"jc_Export configuration section":`Exporter la section de configuration`,"jc_Export data to %s file":`Exporter les données vers le fichier %s`,"jc_Export setting to JSON file":`Paramètres d'exportation vers un fichier JSON`,"jc_Fallback custom certificates":`Certificats personnalisés de secours`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.`,"jc_File will be deleted":`Le fichier sera supprimé`,"jc_Filter and Data Actions":`Actions sur les filtres et les données`,"jc_Get %s access":`Obtenir l'accès %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL`,"jc_Import and add configuration section":`Importer et ajouter la section de configuration`,"jc_Import and replace configuration section":`Importer et remplacer la section de configuration`,"jc_Import data from %s file":`Importer des données à partir du fichier %s`,"jc_Import from %s":`Importer depuis %s`,"jc_Import settings from JSON file":`Importer les paramètres à partir d'un fichier JSON`,"jc_Instance %s is alive":`L'instance %s est active`,"jc_Instance %s is not alive":`L'instance %s n'est pas active`,"jc_Invalid JSON":`JSON invalide`,"jc_Invalid JSON file.":`Fichier JSON invalide.`,"jc_Invalid JSON format. Expected an array.":`Format JSON invalide. Tableau attendu.`,"jc_Invalid YAML":`YAML invalide`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Cela nécessite la génération de l'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'administrateur.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Il a été conçu pour la génération d'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'adaptateur.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Il a probablement été conçu pour une version d'administration plus ancienne. Veuillez mettre à jour l'adaptateur.`,"jc_JSON editor":`Éditeur JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licence %s`,"jc_License agreement":`Accord de licence`,"jc_License does not exist":`La licence n'existe pas`,"jc_License expired on %s":`Licence expirée le %s`,'jc_License for other product "%s"':`Licence pour un autre produit "%s"`,"jc_License is for version %s, but required version is %s":`La licence concerne la version %s, mais la version requise est %s`,"jc_License must be converted":`La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net\xA0?`,"jc_Listen on all IPs":`Écoutez sur toutes les adresses IP`,jc_Longitude:`Longitude`,"jc_Move down":`Descendre`,"jc_Move up":`Déplacer vers le haut`,jc_Name:`Nom`,"jc_No one license found in license manager":`Aucune licence trouvée dans le gestionnaire de licences`,"jc_No response from admin":`Aucune réponse de l'administrateur`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrée en double non autorisée « %s » dans la colonne « %s »`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Secret client OAuth`,jc_Ok:`D'accord`,"jc_Passwords are not equal!":`Les mots de passe ne sont pas égaux !`,"jc_Place your files here or click here to open the browse dialog":`Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation`,"jc_Please allow popups in your browser for this page!":`Veuillez autoriser les popups dans votre navigateur pour cette page\xA0!`,"jc_Please confirm":`Veuillez confirmer`,"jc_Please create license":`Veuillez créer une licence`,"jc_Please enter the license":`Veuillez entrer la licence`,"jc_Please fill in all required fields":`Veuillez remplir tous les champs obligatoires.`,"jc_Port could be used by %s":`Le port pourrait être utilisé par %s`,"jc_Port is already used by %s":`Le port est déjà utilisé par %s`,"jc_Press ENTER Key to add new item":`Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément`,"jc_Private certificate":`Certificat privé`,jc_Product:`Produit`,"jc_Public certificate":`Certificat public`,"jc_Renew %s access":`Renouveler l'accès %s`,jc_Replace:`Remplacer`,"jc_Request data by instance":`Demander des données par instance`,"jc_Request timed out":`La demande a expiré`,jc_Result:`Résultat`,jc_Save:`sauver`,"jc_Save configuration?":`Enregistrer la configuration\xA0?`,"jc_Serial number (UUID)":`Numéro de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.`,"jc_Show/hide filter input":`Afficher/masquer l'entrée de filtre`,"jc_Some data are not stored. Discard?":`Certaines données ne sont pas stockées. Jeter?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.`,"jc_Suitable license not found in license manager":`Licence appropriée introuvable dans le gestionnaire de licences`,"jc_System language":`Langue du système`,"jc_Take browser position":`Prendre position depuis le navigateur`,"jc_Take position from system settings":`Prendre position à partir des paramètres système`,jc_Template:`Modèle`,"jc_Use all available let's encrypt certificates":`Utilisez tous les certificats let's encrypt disponibles`,"jc_Use system settings for position":`Utiliser les paramètres système pour la position`,"jc_Used system settings":`Paramètres système utilisés`,jc_ValidTill:`Valable jusqu'au`,jc_Version:`Version`,"jc_YAML editor":`Éditeur YAML`,jc_Yes:`Oui`,"jc_You can filter entries by entering here some text":`Vous pouvez filtrer les entrées en saisissant ici du texte`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossible d'ouvrir le fichier JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Échec de l'analyse du fichier JSON`,jc___different__:`différent`,jc_false:`FAUX`,jc_locally:`localement`,jc_none:`rien`,jc_repeat:`répéter`,jc_true:`VRAI`,"jc_via internet":`par Internet`,sch_all:`tout`},it:{"jc_A credential with this name already exists":`Esiste già una credenziale con questo nome`,"jc_A unique name is required":`È richiesto un nome univoco`,"jc_Accept license":`Accetta licenza`,jc_Actions:`Azioni`,"jc_Add credential":`Aggiungi credenziali`,"jc_Add row":`Aggiungi riga`,"jc_All items are filtered out":`Tutti gli elementi vengono filtrati`,jc_Append:`Aggiungere`,"jc_Append %s entries or replace existing?":`Aggiungi %s voci o sostituisci quelle esistenti?`,"jc_Append or replace?":`Aggiungere o sostituire?`,"jc_Are you sure?":`Sei sicuro?`,jc_Cancel:`Annulla`,"jc_Cannot add items with set filter":`Impossibile aggiungere elementi con il filtro impostato`,"jc_Cannot create credential: %s":`Impossibile creare le credenziali: %s`,"jc_Cannot decode license":`Impossibile decodificare la licenza`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser`,'jc_Cannot display the custom component "%s"':`Impossibile visualizzare il componente personalizzato "%s"`,"jc_Cannot read licenses: %s":`Impossibile leggere le licenze: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossibile recuperare le opzioni, poiché l'istanza è offline`,"jc_Cannot save configuration because of error in configuration":`Impossibile salvare la configurazione a causa di un errore nella configurazione`,"jc_Cannot upload":`Impossibile caricare`,"jc_Chained certificate":`Certificato incatenato`,jc_Checked:`Controllato`,"jc_Click to see in full size":`Clicca per visualizzare l'immagine a dimensioni intere`,"jc_Click to show":`Clicca per mostrare`,"jc_Clone current row":`Clona riga corrente`,jc_Close:`Vicino`,jc_Commercial:`Commerciale`,jc_Copied:`Copiato`,"jc_Copied %s":`"%s" copiato`,"jc_Copy content":`Copia contenuto`,jc_Create:`Creare`,"jc_Credential type":`Tipo di credenziale`,'jc_Custom component "%s" was not started':`Il componente personalizzato "%s" non è stato avviato`,"jc_Define schedule":`Definisci programma`,jc_Delete:`Elimina`,"jc_Delete current row":`Elimina la riga corrente`,"jc_Disable/Enable translation":`Disabilita/Abilita la traduzione`,jc_Discard:`Scartare`,"jc_Do not use let's encrypt":`Non utilizzare crittografiamo`,"jc_Docker is not available":`Docker non è disponibile`,"jc_Docker is not installed or not running":`Docker non è installato o non è in esecuzione`,"jc_Drop file here":`Trascina il file qui`,"jc_Enter the code from that page here":`Inserisci qui il codice da quella pagina`,jc_Error:`Errore`,"jc_Expand/Collapse card":`Espandi/Comprimi scheda`,"jc_Export configuration section":`Sezione di configurazione dell'esportazione`,"jc_Export data to %s file":`Esporta i dati nel file %s`,"jc_Export setting to JSON file":`Esporta le impostazioni in un file JSON`,"jc_Fallback custom certificates":`Certificati personalizzati di fallback`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Il file è troppo grande. Max %sk consentito. Prova a usare SVG.`,"jc_File will be deleted":`Il file verrà eliminato`,"jc_Filter and Data Actions":`Azioni sui filtri e sui dati`,"jc_Get %s access":`Ottieni l'accesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL`,"jc_Import and add configuration section":`Importa e aggiungi la sezione di configurazione`,"jc_Import and replace configuration section":`Importa e sostituisci la sezione di configurazione`,"jc_Import data from %s file":`Importa i dati dal file %s`,"jc_Import from %s":`Importa da %s`,"jc_Import settings from JSON file":`Importa le impostazioni dal file JSON`,"jc_Instance %s is alive":`Il %s dell'istanza è vivo`,"jc_Instance %s is not alive":`Il TESTO dell'istanza non è vivo`,"jc_Invalid JSON":`JSON non valido`,"jc_Invalid JSON file.":`File JSON non valido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON non valido. È previsto un array.`,"jc_Invalid YAML":`YAML non valido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Richiede la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'amministratore.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`È stato creato per la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'adattatore.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probabilmente è stato creato per una versione di amministrazione precedente. Si prega di aggiornare l'adattatore.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitudine`,"jc_License %s":`Licenza %s`,"jc_License agreement":`Contratto di licenza`,"jc_License does not exist":`La licenza non esiste`,"jc_License expired on %s":`Licenza scaduta il %s`,'jc_License for other product "%s"':`Licenza per altro prodotto "%s"`,"jc_License is for version %s, but required version is %s":`La licenza è per la versione %s, ma la versione richiesta è %s`,"jc_License must be converted":`La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?`,"jc_Listen on all IPs":`Ascolta su tutti gli IP`,jc_Longitude:`Longitudine`,"jc_Move down":`Abbassati`,"jc_Move up":`Andare avanti`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nessuna licenza trovata nel gestore delle licenze`,"jc_No response from admin":`Nessuna risposta dall'amministratore`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Voce duplicata non consentita "%s" nella colonna "%s"`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Segreto del client OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Le password non sono uguali!`,"jc_Place your files here or click here to open the browse dialog":`Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia`,"jc_Please allow popups in your browser for this page!":`Si prega di abilitare i popup nel browser per questa pagina!`,"jc_Please confirm":`Si prega di confermare`,"jc_Please create license":`Si prega di creare la licenza`,"jc_Please enter the license":`Inserisci la licenza`,"jc_Please fill in all required fields":`Si prega di compilare tutti i campi obbligatori.`,"jc_Port could be used by %s":`La porta potrebbe essere utilizzata da %s`,"jc_Port is already used by %s":`La porta è già utilizzata da %s`,"jc_Press ENTER Key to add new item":`Premere il tasto INVIO per aggiungere un nuovo elemento`,"jc_Private certificate":`Certificato privato`,jc_Product:`Prodotto`,"jc_Public certificate":`Certificato pubblico`,"jc_Renew %s access":`Rinnova l'accesso %s`,jc_Replace:`Sostituire`,"jc_Request data by instance":`Richiedi dati per istanza`,"jc_Request timed out":`Tempo scaduto per la richiesta`,jc_Result:`Risultato`,jc_Save:`Salva`,"jc_Save configuration?":`Salvare la configurazione?`,"jc_Serial number (UUID)":`Numero di serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.`,"jc_Show/hide filter input":`Mostra/nascondi input filtro`,"jc_Some data are not stored. Discard?":`Alcuni dati non vengono memorizzati. Scartare?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.`,"jc_Suitable license not found in license manager":`Licenza adatta non trovata nel gestore delle licenze`,"jc_System language":`Linguaggio di sistema`,"jc_Take browser position":`Prendi posizione dal browser`,"jc_Take position from system settings":`Prendi posizione dalle impostazioni di sistema`,jc_Template:`Modello`,"jc_Use all available let's encrypt certificates":`Usa tutti i certificati Let's Encrypt disponibili`,"jc_Use system settings for position":`Usa le impostazioni di sistema per la posizione`,"jc_Used system settings":`Impostazioni di sistema utilizzate`,jc_ValidTill:`Valido fino a`,jc_Version:`Versione`,"jc_YAML editor":`Editor YAML`,jc_Yes:`SÌ`,"jc_You can filter entries by entering here some text":`Puoi filtrare le voci inserendo qui del testo`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossibile aprire il file JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Impossibile analizzare il file JSON`,jc___different__:`diverso`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`nessuna`,jc_repeat:`ripetere`,jc_true:`VERO`,"jc_via internet":`attraverso internet`,sch_all:`tutti`},es:{"jc_A credential with this name already exists":`Ya existe una credencial con ese nombre.`,"jc_A unique name is required":`Se requiere un nombre único.`,"jc_Accept license":`Aceptar licencia`,jc_Actions:`Comportamiento`,"jc_Add credential":`Agregar credencial`,"jc_Add row":`Añadir fila`,"jc_All items are filtered out":`Todos los elementos se filtran`,jc_Append:`Adjuntar`,"jc_Append %s entries or replace existing?":`¿Agregar %s entradas o reemplazar las existentes?`,"jc_Append or replace?":`¿Agregar o reemplazar?`,"jc_Are you sure?":`¿Estás seguro?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`No se pueden agregar elementos con el filtro establecido`,"jc_Cannot create credential: %s":`No se puede crear la credencial: %s`,"jc_Cannot decode license":`No se puede decodificar la licencia`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador`,'jc_Cannot display the custom component "%s"':`No se puede mostrar el componente personalizado "%s"`,"jc_Cannot read licenses: %s":`No se pueden leer licencias: %s`,"jc_Cannot retrieve options, as instance is offline":`No se pueden recuperar las opciones, ya que la instancia está fuera de línea`,"jc_Cannot save configuration because of error in configuration":`No se puede guardar la configuración debido a un error en la configuración.`,"jc_Cannot upload":`no se puede cargar`,"jc_Chained certificate":`certificado encadenado`,jc_Checked:`Comprobado`,"jc_Click to see in full size":`Haz clic para ver en tamaño completo.`,"jc_Click to show":`Haga clic para mostrar`,"jc_Clone current row":`Clonar fila actual`,jc_Close:`Cerca`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`Copiado "%s"`,"jc_Copy content":`Copiar contenido`,jc_Create:`Crear`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`El componente personalizado "%s" no se inició.`,"jc_Define schedule":`Definir horario`,jc_Delete:`Eliminar`,"jc_Delete current row":`Eliminar fila actual`,"jc_Disable/Enable translation":`Desactivar/Activar traducción`,jc_Discard:`Desechar`,"jc_Do not use let's encrypt":`No use vamos a cifrar`,"jc_Docker is not available":`Docker no está disponible`,"jc_Docker is not installed or not running":`Docker no está instalado o no se está ejecutando`,"jc_Drop file here":`Suelta el archivo aquí`,"jc_Enter the code from that page here":`Introduzca el código de esa página aquí`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expandir/Contraer tarjeta`,"jc_Export configuration section":`Exportar sección de configuración`,"jc_Export data to %s file":`Exportar datos al archivo %s`,"jc_Export setting to JSON file":`Exportar configuración a un archivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.`,"jc_File will be deleted":`El archivo será eliminado`,"jc_Filter and Data Actions":`Acciones de filtrado y datos`,"jc_Get %s access":`Obtener %s acceso`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL`,"jc_Import and add configuration section":`Importar y agregar sección de configuración`,"jc_Import and replace configuration section":`Importar y reemplazar sección de configuración`,"jc_Import data from %s file":`Importar datos del archivo %s`,"jc_Import from %s":`Importar desde %s`,"jc_Import settings from JSON file":`Importar configuración desde un archivo JSON`,"jc_Instance %s is alive":`Instancia %s está vivo`,"jc_Instance %s is not alive":`Instancia %s no está vivo`,"jc_Invalid JSON":`JSON no válido`,"jc_Invalid JSON file.":`Archivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Se esperaba un array.`,"jc_Invalid YAML":`YAML no válido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Requiere la generación de la API de la GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el administrador.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Fue diseñado para la generación de API GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probablemente se diseñó para una versión de administración anterior. Por favor, actualice el adaptador.`,"jc_JSON editor":`editor JSON`,jc_Latitude:`Latitud`,"jc_License %s":`Licencia %s`,"jc_License agreement":`Acuerdo de licencia`,"jc_License does not exist":`La licencia no existe`,"jc_License expired on %s":`La licencia venció el %s`,'jc_License for other product "%s"':`Licencia para otro producto "%s"`,"jc_License is for version %s, but required version is %s":`La licencia es para la versión %s, pero la versión requerida es %s.`,"jc_License must be converted":`La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?`,"jc_Listen on all IPs":`Escuche en todas las IP`,jc_Longitude:`Longitud`,"jc_Move down":`Mover hacia abajo`,"jc_Move up":`Ascender`,jc_Name:`Nombre`,"jc_No one license found in license manager":`No se encontró ninguna licencia en el administrador de licencias`,"jc_No response from admin":`No hay respuesta del administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada no permitida "%s" en la columna "%s"`,"jc_OAuth Client ID":`ID de cliente OAuth`,"jc_OAuth Client secret":`Secreto de cliente OAuth`,jc_Ok:`Okay`,"jc_Passwords are not equal!":`¡Las contraseñas no son iguales!`,"jc_Place your files here or click here to open the browse dialog":`Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración`,"jc_Please allow popups in your browser for this page!":`¡Permita ventanas emergentes en su navegador para esta página!`,"jc_Please confirm":`Por favor confirmar`,"jc_Please create license":`Por favor cree una licencia`,"jc_Please enter the license":`Por favor ingrese la licencia`,"jc_Please fill in all required fields":`Por favor, rellene todos los campos obligatorios.`,"jc_Port could be used by %s":`El puerto podría ser utilizado por %s`,"jc_Port is already used by %s":`El puerto ya está en uso por %s`,"jc_Press ENTER Key to add new item":`Presione la tecla ENTER para agregar un nuevo elemento`,"jc_Private certificate":`certificado privado`,jc_Product:`Producto`,"jc_Public certificate":`Certificado público`,"jc_Renew %s access":`Renovar el acceso a %s`,jc_Replace:`Reemplazar`,"jc_Request data by instance":`Solicitar datos por instancia`,"jc_Request timed out":`Tiempo de espera agotado`,jc_Result:`Resultado`,jc_Save:`Salvar`,"jc_Save configuration?":`¿Guardar configuración?`,"jc_Serial number (UUID)":`Número de serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`El número de serie (UUID) "%s" en la licencia es para otro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Algunos datos no se almacenan. ¿Desechar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.`,"jc_Suitable license not found in license manager":`Licencia adecuada no encontrada en el administrador de licencias`,"jc_System language":`Lenguaje del sistema`,"jc_Take browser position":`Tomar posición desde el navegador`,"jc_Take position from system settings":`Tomar posición desde la configuración del sistema`,jc_Template:`Plantilla`,"jc_Use all available let's encrypt certificates":`Utilice todos los certificados let's encrypt disponibles`,"jc_Use system settings for position":`Usar la configuración del sistema para la posición`,"jc_Used system settings":`Configuraciones del sistema usadas`,jc_ValidTill:`Válida hasta`,jc_Version:`Versión`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sí`,"jc_You can filter entries by entering here some text":`Puede filtrar las entradas ingresando aquí algún texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Error al abrir el archivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Error al analizar el archivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`en la zona`,jc_none:`ninguno`,jc_repeat:`repetir`,jc_true:`VERDADERO`,"jc_via internet":`vía Internet`,sch_all:`todas`},pl:{"jc_A credential with this name already exists":`Poświadczenie o tej nazwie już istnieje`,"jc_A unique name is required":`Wymagana jest unikalna nazwa`,"jc_Accept license":`Zaakceptuj licencję`,jc_Actions:`Akcje`,"jc_Add credential":`Dodaj poświadczenie`,"jc_Add row":`Dodaj wiersz`,"jc_All items are filtered out":`Wszystkie pozycje są odfiltrowane`,jc_Append:`Dodać`,"jc_Append %s entries or replace existing?":`Dołączyć wpisy %s czy zastąpić istniejące?`,"jc_Append or replace?":`Dołączyć czy zastąpić?`,"jc_Are you sure?":`Jesteś pewny?`,jc_Cancel:`Anuluj`,"jc_Cannot add items with set filter":`Nie można dodać elementów z ustawionym filtrem`,"jc_Cannot create credential: %s":`Nie można utworzyć poświadczeń: %s`,"jc_Cannot decode license":`Nie można zdekodować licencji`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce`,'jc_Cannot display the custom component "%s"':`Nie można wyświetlić niestandardowego komponentu „%s”`,"jc_Cannot read licenses: %s":`Nie można odczytać licencji: %s`,"jc_Cannot retrieve options, as instance is offline":`Nie można pobrać opcji, ponieważ instancja jest w trybie offline`,"jc_Cannot save configuration because of error in configuration":`Nie można zapisać konfiguracji z powodu błędu w konfiguracji`,"jc_Cannot upload":`Nie można przesłać`,"jc_Chained certificate":`Certyfikat łańcuchowy`,jc_Checked:`Sprawdzony`,"jc_Click to see in full size":`Kliknij, aby zobaczyć w pełnym rozmiarze`,"jc_Click to show":`Kliknij, aby pokazać`,"jc_Clone current row":`Sklonuj bieżący wiersz`,jc_Close:`Blisko`,jc_Commercial:`Handlowy`,jc_Copied:`Skopiowano`,"jc_Copied %s":`Skopiowano "%s"`,"jc_Copy content":`Kopiuj zawartość`,jc_Create:`Stwórz`,"jc_Credential type":`Typ poświadczenia`,'jc_Custom component "%s" was not started':`Komponent niestandardowy „%s” nie został uruchomiony`,"jc_Define schedule":`Zdefiniuj harmonogram`,jc_Delete:`Usunąć`,"jc_Delete current row":`Usuń bieżący wiersz`,"jc_Disable/Enable translation":`Wyłącz/Włącz tłumaczenie`,jc_Discard:`Wyrzucać`,"jc_Do not use let's encrypt":`Nie używaj zaszyfrujmy`,"jc_Docker is not available":`Docker nie jest dostępny`,"jc_Docker is not installed or not running":`Docker nie jest zainstalowany lub nie działa`,"jc_Drop file here":`Upuść plik tutaj`,"jc_Enter the code from that page here":`Wpisz kod z tej strony tutaj`,jc_Error:`Błąd`,"jc_Expand/Collapse card":`Rozwiń/Zwiń kartę`,"jc_Export configuration section":`Sekcja konfiguracji eksportu`,"jc_Export data to %s file":`Eksportuj dane do pliku %s`,"jc_Export setting to JSON file":`Eksportuj ustawienia do pliku JSON`,"jc_Fallback custom certificates":`Niestandardowe certyfikaty zastępcze`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.`,"jc_File will be deleted":`Plik zostanie usunięty`,"jc_Filter and Data Actions":`Akcje filtrów i danych`,"jc_Get %s access":`Uzyskaj dostęp %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL`,"jc_Import and add configuration section":`Importuj i dodaj sekcję konfiguracji`,"jc_Import and replace configuration section":`Importuj i zastąp sekcję konfiguracji`,"jc_Import data from %s file":`Importuj dane z pliku %s`,"jc_Import from %s":`Importuj z %s`,"jc_Import settings from JSON file":`Importuj ustawienia z pliku JSON`,"jc_Instance %s is alive":`Instancja %s jest aktywna`,"jc_Instance %s is not alive":`Instancja TEKST nie jest aktywna`,"jc_Invalid JSON":`Nieprawidłowy JSON`,"jc_Invalid JSON file.":`Nieprawidłowy plik JSON.`,"jc_Invalid JSON format. Expected an array.":`Nieprawidłowy format JSON. Oczekiwano tablicy.`,"jc_Invalid YAML":`Nieprawidłowy plik YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Wymaga generacji interfejsu API GUI %s, ale ten administrator zapewnia generację %s. Zaktualizuj administratora.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Został stworzony do generowania interfejsu API GUI %s, ale ten administrator zapewnia generowanie %s. Proszę zaktualizować adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Prawdopodobnie został stworzony dla starszej wersji administratora. Proszę zaktualizować adapter.`,"jc_JSON editor":`Edytor JSON`,jc_Latitude:`Szerokość`,"jc_License %s":`Licencja %s`,"jc_License agreement":`Umowa licencyjna`,"jc_License does not exist":`Licencja nie istnieje`,"jc_License expired on %s":`Licencja wygasła w dniu %s`,'jc_License for other product "%s"':`Licencja na inny produkt „%s”`,"jc_License is for version %s, but required version is %s":`Licencja jest przeznaczona dla wersji %s, ale wymagana jest wersja %s`,"jc_License must be converted":`Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?`,"jc_Listen on all IPs":`Słuchaj na wszystkich adresach IP`,jc_Longitude:`Długość geograficzna`,"jc_Move down":`Padnij`,"jc_Move up":`Podnieść`,jc_Name:`Nazwa`,"jc_No one license found in license manager":`Nie znaleziono licencji w menedżerze licencji`,"jc_No response from admin":`Brak odpowiedzi od administratora`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niedozwolony duplikat wpisu „%s” w kolumnie „%s”`,"jc_OAuth Client ID":`Identyfikator klienta OAuth`,"jc_OAuth Client secret":`Tajny klucz klienta OAuth`,jc_Ok:`Dobrze`,"jc_Passwords are not equal!":`Hasła nie są równe!`,"jc_Place your files here or click here to open the browse dialog":`Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania`,"jc_Please allow popups in your browser for this page!":`Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!`,"jc_Please confirm":`Proszę potwierdzić`,"jc_Please create license":`Utwórz licencję`,"jc_Please enter the license":`Proszę wprowadzić licencję`,"jc_Please fill in all required fields":`Proszę wypełnić wszystkie wymagane pola`,"jc_Port could be used by %s":`Port może być używany przez %s`,"jc_Port is already used by %s":`Port jest już używany przez %s`,"jc_Press ENTER Key to add new item":`Naciśnij klawisz ENTER, aby dodać nowy element`,"jc_Private certificate":`Prywatny certyfikat`,jc_Product:`Produkt`,"jc_Public certificate":`Certyfikat publiczny`,"jc_Renew %s access":`Odnów dostęp %s`,jc_Replace:`Zastępować`,"jc_Request data by instance":`Żądanie danych według instancji`,"jc_Request timed out":`Upłynął limit czasu żądania`,jc_Result:`Wynik`,jc_Save:`Zapisać`,"jc_Save configuration?":`Zapisać konfigurację?`,"jc_Serial number (UUID)":`Numer seryjny (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.`,"jc_Show/hide filter input":`Pokaż/ukryj wejście filtra`,"jc_Some data are not stored. Discard?":`Niektóre dane nie są przechowywane. Wyrzucać?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.`,"jc_Suitable license not found in license manager":`Nie znaleziono odpowiedniej licencji w menedżerze licencji`,"jc_System language":`Język systemu`,"jc_Take browser position":`Zajmij pozycję z przeglądarki`,"jc_Take position from system settings":`Zajmij pozycję z ustawień systemowych`,jc_Template:`Szablon`,"jc_Use all available let's encrypt certificates":`Użyj wszystkich dostępnych certyfikatów Let's Encrypt`,"jc_Use system settings for position":`Użyj ustawień systemowych dla pozycji`,"jc_Used system settings":`Używane ustawienia systemowe`,jc_ValidTill:`Obowiązuje do`,jc_Version:`Wersja`,"jc_YAML editor":`Edytor YAML`,jc_Yes:`Tak`,"jc_You can filter entries by entering here some text":`Możesz filtrować wpisy, wpisując tutaj jakiś tekst`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Nie udało się otworzyć pliku JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Nie udało się przeanalizować pliku JSON`,jc___different__:`różne`,jc_false:`FAŁSZ`,jc_locally:`lokalnie`,jc_none:`Żaden`,jc_repeat:`powtarzać`,jc_true:`PRAWDA`,"jc_via internet":`przez internet`,sch_all:`wszystko`},uk:{"jc_A credential with this name already exists":`Облікові дані з таким ім'ям вже існують`,"jc_A unique name is required":`Потрібне унікальне ім'я`,"jc_Accept license":`Прийняти ліцензію`,jc_Actions:`Дії`,"jc_Add credential":`Додати облікові дані`,"jc_Add row":`Додати рядок`,"jc_All items are filtered out":`Усі елементи відфільтровано`,jc_Append:`Додайте`,"jc_Append %s entries or replace existing?":`Додати %s записів чи замінити наявні?`,"jc_Append or replace?":`Додати чи замінити?`,"jc_Are you sure?":`Ти впевнений?`,jc_Cancel:`Скасувати`,"jc_Cannot add items with set filter":`Неможливо додати елементи зі встановленим фільтром`,"jc_Cannot create credential: %s":`Не вдається створити облікові дані: %s`,"jc_Cannot decode license":`Неможливо розшифрувати ліцензію`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері`,'jc_Cannot display the custom component "%s"':`Не вдається відобразити користувацький компонент "%s"`,"jc_Cannot read licenses: %s":`Неможливо прочитати ліцензії: %s`,"jc_Cannot retrieve options, as instance is offline":`Неможливо отримати параметри, оскільки екземпляр офлайн`,"jc_Cannot save configuration because of error in configuration":`Не вдалося зберегти конфігурацію через помилку в конфігурації`,"jc_Cannot upload":`Неможливо завантажити`,"jc_Chained certificate":`Прикутий сертифікат`,jc_Checked:`Перевірено`,"jc_Click to see in full size":`Натисніть, щоб побачити в повному розмірі`,"jc_Click to show":`Натисніть, щоб показати`,"jc_Clone current row":`Клонувати поточний рядок`,jc_Close:`Закрити`,jc_Commercial:`Комерційний`,jc_Copied:`Скопійовано`,"jc_Copied %s":`Скопійовано "%s"`,"jc_Copy content":`Скопіюйте вміст`,jc_Create:`Створити`,"jc_Credential type":`Тип облікових даних`,'jc_Custom component "%s" was not started':`Користувацький компонент "%s" не запущено`,"jc_Define schedule":`Визначити розклад`,jc_Delete:`Видалити`,"jc_Delete current row":`Видалити поточний рядок`,"jc_Disable/Enable translation":`Вимкнути/Увімкнути переклад`,jc_Discard:`Відкинути`,"jc_Do not use let's encrypt":`Не використовуйте let's encrypt`,"jc_Docker is not available":`Докер недоступний`,"jc_Docker is not installed or not running":`Docker не встановлено або не працює`,"jc_Drop file here":`Перетягніть файл сюди`,"jc_Enter the code from that page here":`Введіть тут код з цієї сторінки`,jc_Error:`Помилка`,"jc_Expand/Collapse card":`Розгорнути/Згорнути картку`,"jc_Export configuration section":`Розділ конфігурації експорту`,"jc_Export data to %s file":`Експортувати дані у файл %s`,"jc_Export setting to JSON file":`Експорт налаштувань у файл JSON`,"jc_Fallback custom certificates":`Запасні спеціальні сертифікати`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.`,"jc_File will be deleted":`Файл буде видалено`,"jc_Filter and Data Actions":`Фільтр і дії з даними`,"jc_Get %s access":`Отримайте доступ %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням`,"jc_Import and add configuration section":`Розділ імпорту та додавання конфігурації`,"jc_Import and replace configuration section":`Розділ імпорту та заміни конфігурації`,"jc_Import data from %s file":`Імпортувати дані з файлу %s`,"jc_Import from %s":`Імпортувати з %s`,"jc_Import settings from JSON file":`Імпорт налаштувань з JSON-файлу`,"jc_Instance %s is alive":`Примірник %s живий`,"jc_Instance %s is not alive":`Примірник %s не живий`,"jc_Invalid JSON":`Недійсний JSON`,"jc_Invalid JSON file.":`Недійсний JSON-файл.`,"jc_Invalid JSON format. Expected an array.":`Недійсний формат JSON. Очікується масив.`,"jc_Invalid YAML":`Недійсний YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Потрібна генерація API графічного інтерфейсу %s, але цей адміністратор надає генерацію %s. Будь ласка, оновіть адміністраторську версію.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Його було створено для покоління GUI API %s, але цей адміністратор надає покоління %s. Будь ласка, оновіть адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Ймовірно, його було створено для старішої версії адміністратора. Будь ласка, оновіть адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Ліцензія %s`,"jc_License agreement":`Ліцензійна угода`,"jc_License does not exist":`Ліцензії не існує`,"jc_License expired on %s":`Термін дії ліцензії закінчився %s`,'jc_License for other product "%s"':`Ліцензія на інший продукт "%s"`,"jc_License is for version %s, but required version is %s":`Ліцензія для версії %s, але потрібна версія %s`,"jc_License must be converted":`Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?`,"jc_Listen on all IPs":`Прослуховування на всіх IP`,jc_Longitude:`Довгота`,"jc_Move down":`Рухатися вниз`,"jc_Move up":`Рухатися вгору`,jc_Name:`Ім'я`,"jc_No one license found in license manager":`У менеджері ліцензій не знайдено жодної ліцензії`,"jc_No response from admin":`Немає відповіді від адміністратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недозволений дублікат запису "%s" у стовпці "%s"`,"jc_OAuth Client ID":`Ідентифікатор клієнта OAuth`,"jc_OAuth Client secret":`Секрет клієнта OAuth`,jc_Ok:`В порядку`,"jc_Passwords are not equal!":`Паролі не бувають рівними!`,"jc_Place your files here or click here to open the browse dialog":`Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду`,"jc_Please allow popups in your browser for this page!":`Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!`,"jc_Please confirm":`Будь-ласка підтвердіть`,"jc_Please create license":`Будь ласка, створіть ліцензію`,"jc_Please enter the license":`Будь ласка, введіть ліцензію`,"jc_Please fill in all required fields":`Будь ласка, заповніть усі обов'язкові поля`,"jc_Port could be used by %s":`Порт може використовуватися %s`,"jc_Port is already used by %s":`Порт уже використовується %s`,"jc_Press ENTER Key to add new item":`Натисніть клавішу ENTER, щоб додати новий елемент`,"jc_Private certificate":`Приватний сертифікат`,jc_Product:`Продукт`,"jc_Public certificate":`Публічний сертифікат`,"jc_Renew %s access":`Поновити доступ %s`,jc_Replace:`Замінити`,"jc_Request data by instance":`Запит даних за екземпляром`,"jc_Request timed out":`Час запиту вичерпано`,jc_Result:`Результат`,jc_Save:`зберегти`,"jc_Save configuration?":`Зберегти конфігурацію?`,"jc_Serial number (UUID)":`Серійний номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.`,"jc_Show/hide filter input":`Показати/сховати введення фільтра`,"jc_Some data are not stored. Discard?":`Деякі дані не зберігаються. Відкинути?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.`,"jc_Suitable license not found in license manager":`Відповідна ліцензія не знайдена в менеджері ліцензій`,"jc_System language":`Системна мова`,"jc_Take browser position":`Займіть позицію з браузера`,"jc_Take position from system settings":`Займіть позицію в налаштуваннях системи`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Використовуйте всі доступні сертифікати let's encrypt`,"jc_Use system settings for position":`Використовуйте системні налаштування для позиції`,"jc_Used system settings":`Використані системні налаштування`,jc_ValidTill:`Дійсний до`,jc_Version:`Версія`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Так`,"jc_You can filter entries by entering here some text":`Ви можете фільтрувати записи, ввівши тут певний текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не вдалося відкрити JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не вдалося проаналізувати JSON-файл`,jc___different__:`інший`,jc_false:`НЕПРАВДА`,jc_locally:`локально`,jc_none:`немає`,jc_repeat:`повторити`,jc_true:`ПРАВДА`,"jc_via internet":`через інтернет`,sch_all:`все`},"zh-cn":{"jc_A credential with this name already exists":`已存在同名凭证`,"jc_A unique name is required":`需要一个唯一的名称。`,"jc_Accept license":`接受许可`,jc_Actions:`操作`,"jc_Add credential":`添加凭据`,"jc_Add row":`添加行`,"jc_All items are filtered out":`所有项目都被过滤掉`,jc_Append:`附加`,"jc_Append %s entries or replace existing?":`追加 %s 条目还是替换现有条目?`,"jc_Append or replace?":`追加还是替换?`,"jc_Are you sure?":`你确定吗?`,jc_Cancel:`取消`,"jc_Cannot add items with set filter":`无法使用设置过滤器添加项目`,"jc_Cannot create credential: %s":`无法创建凭证:%s`,"jc_Cannot decode license":`无法解码许可证`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测`,'jc_Cannot display the custom component "%s"':`无法显示自定义组件“%s”`,"jc_Cannot read licenses: %s":`无法读取许可证:%s`,"jc_Cannot retrieve options, as instance is offline":`无法检索选项,因为实例处于脱机状态`,"jc_Cannot save configuration because of error in configuration":`由于配置错误,无法保存配置。`,"jc_Cannot upload":`无法上传`,"jc_Chained certificate":`链式证书`,jc_Checked:`勾选`,"jc_Click to see in full size":`点击查看完整尺寸`,"jc_Click to show":`点击显示`,"jc_Clone current row":`克隆当前行`,jc_Close:`关`,jc_Commercial:`商业的`,jc_Copied:`复制的`,"jc_Copied %s":`复制的"%s"`,"jc_Copy content":`复制内容`,jc_Create:`创建`,"jc_Credential type":`凭证类型`,'jc_Custom component "%s" was not started':`自定义组件“%s”未启动`,"jc_Define schedule":`定义时间表`,jc_Delete:`删除`,"jc_Delete current row":`删除当前行`,"jc_Disable/Enable translation":`禁用/启用翻译`,jc_Discard:`丢弃`,"jc_Do not use let's encrypt":`不要使用让我们加密`,"jc_Docker is not available":`Docker 不可用`,"jc_Docker is not installed or not running":`Docker 未安装或未运行`,"jc_Drop file here":`将档案放在这里`,"jc_Enter the code from that page here":`在此处输入该页面的代码`,jc_Error:`错误`,"jc_Expand/Collapse card":`展开/折叠卡`,"jc_Export configuration section":`导出配置部分`,"jc_Export data to %s file":`将数据导出到 %s 文件`,"jc_Export setting to JSON file":`将设置导出到 JSON 文件`,"jc_Fallback custom certificates":`后备自定义证书`,"jc_File is too big. Max %sk allowed. Try use SVG.":`文件太大。允许的最大字节%s数。尝试使用 SVG。`,"jc_File will be deleted":`文件将被删除`,"jc_Filter and Data Actions":`过滤和数据操作`,"jc_Get %s access":`获取 %s 访问权限`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用`,"jc_Import and add configuration section":`导入并添加配置部分`,"jc_Import and replace configuration section":`导入和替换配置部分`,"jc_Import data from %s file":`从 %s 文件导入数据`,"jc_Import from %s":`从 %s 导入`,"jc_Import settings from JSON file":`从 JSON 文件导入设置`,"jc_Instance %s is alive":`实例 %s 是活动的`,"jc_Instance %s is not alive":`实例 %s 不存在`,"jc_Invalid JSON":`JSON 无效`,"jc_Invalid JSON file.":`无效的JSON文件。`,"jc_Invalid JSON format. Expected an array.":`JSON格式无效。应为数组。`,"jc_Invalid YAML":`无效的 YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`它需要生成 GUI API,但此管理员提供的是生成功能。请更新管理员。`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`它原本是为 GUI API 生成 %s 而设计的,但此管理员提供了生成 %s 的功能。请更新适配器。`,"jc_It was probably built for an older admin version. Please update the adapter.":`这可能是为旧版管理后台构建的。请更新适配器。`,"jc_JSON editor":`JSON 编辑器`,jc_Latitude:`纬度`,"jc_License %s":`许可证 %s`,"jc_License agreement":`许可协议`,"jc_License does not exist":`许可证不存在`,"jc_License expired on %s":`许可证已于 %s 过期`,'jc_License for other product "%s"':`其他产品“%s”的许可证`,"jc_License is for version %s, but required version is %s":`许可证适用于版本 %s,但所需版本为 %s。`,"jc_License must be converted":`许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?`,"jc_Listen on all IPs":`监听所有IP`,jc_Longitude:`经度`,"jc_Move down":`下移`,"jc_Move up":`提升`,jc_Name:`姓名`,"jc_No one license found in license manager":`许可证管理器中未找到任何许可证`,"jc_No response from admin":`管理员没有回应`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`列“%s”中存在不允许的重复条目“%s”。`,"jc_OAuth Client ID":`OAuth客户端ID`,"jc_OAuth Client secret":`OAuth 客户端密钥`,jc_Ok:`好`,"jc_Passwords are not equal!":`密码不相等!`,"jc_Place your files here or click here to open the browse dialog":`将文件放在此处或单击此处打开浏览对话框`,"jc_Please allow popups in your browser for this page!":`请允许浏览器弹出此页面!`,"jc_Please confirm":`请确认`,"jc_Please create license":`请创建许可证`,"jc_Please enter the license":`请输入许可证`,"jc_Please fill in all required fields":`请填写所有必填字段`,"jc_Port could be used by %s":`%s 可以使用端口`,"jc_Port is already used by %s":`端口已被 %s 使用`,"jc_Press ENTER Key to add new item":`按 ENTER 键添加新项目`,"jc_Private certificate":`私有证书`,jc_Product:`产品`,"jc_Public certificate":`公共证书`,"jc_Renew %s access":`续订 %s 访问权限`,jc_Replace:`代替`,"jc_Request data by instance":`按实例请求数据`,"jc_Request timed out":`请求超时`,jc_Result:`结果`,jc_Save:`保存`,"jc_Save configuration?":`保存配置?`,"jc_Serial number (UUID)":`序列号 (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`许可证中的序列号 (UUID)“%s”用于其他设备。`,"jc_Show/hide filter input":`显示/隐藏过滤器输入`,"jc_Some data are not stored. Discard?":`部分数据未存储。丢弃?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`授权成功。令牌有效期至 %s,并将自动续订。`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。`,"jc_Suitable license not found in license manager":`在许可证管理器中找不到合适的许可证`,"jc_System language":`系统语言`,"jc_Take browser position":`从浏览器获取位置`,"jc_Take position from system settings":`从系统设置中获取位置`,jc_Template:`模板`,"jc_Use all available let's encrypt certificates":`使用所有可用的让我们加密证书`,"jc_Use system settings for position":`使用系统设置定位`,"jc_Used system settings":`使用的系统设置`,jc_ValidTill:`有效期至`,jc_Version:`版本`,"jc_YAML editor":`YAML 编辑器`,jc_Yes:`是的`,"jc_You can filter entries by entering here some text":`您可以通过在此处输入一些文本来过滤条目`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] 打开 JSON 文件失败`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] 解析 JSON 文件失败`,jc___different__:`不同的`,jc_false:`错误的`,jc_locally:`本地`,jc_none:`没有任何`,jc_repeat:`重复`,jc_true:`真的`,"jc_via internet":`通过互联网`,sch_all:`全选`}});var PO=3e3,FO={root:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`}},IO=class e extends s{constructor(e){super(e),K(this,`forceUpdateHandlers`,void 0),K(this,`errorTimeout`,null),K(this,`errorCached`,null),K(this,`oContext`,void 0),K(this,`cachedObjects`,{}),K(this,`onCommandRunning`,e=>this.setState({commandRunning:e})),K(this,`onAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})}),K(this,`onChange`,(e,t,n,r)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,!!r),n==null||n();else if(e&&this.props.onChange){let t={changed:JSON.stringify(e)!==this.state.originalData};this.setState(t,()=>{var i,a;(i=(a=this.props).onChange)==null||i.call(a,e,!!t.changed,!!r),n==null||n()})}else if(r){var i,a;(i=(a=this.props).onChange)==null||i.call(a,null,void 0,r)}}),K(this,`onError`,(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));let n=this.errorCached;n&&e&&(t?n[e]=t:delete n[e]),this.errorTimeout&&=(clearTimeout(this.errorTimeout),null),JSON.stringify(n)===JSON.stringify(this.state.errors)?this.errorCached=null:this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached||{}},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50)}),K(this,`getCachedObject`,async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]}),K(this,`changeLanguage`,()=>{this.forceUpdate()}),K(this,`forceAttrUpdate`,(e,t)=>{Array.isArray(e)?e.forEach(e=>this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)}),K(this,`registerOnForceUpdate`,(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]}),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,hostInfo:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(e=>console.error(`Cannot read data: ${e}`))}static getDerivedStateFromProps(e,t){return e.updateData===t.updateData?null:{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}}static async loadI18n(e,t,n){if(t===!0||t&&typeof t==`string`){let r=J.getLanguage(),i=typeof t==`string`?t:`i18n`,a=await e.fileExists(`${n}.admin`,`${i}/${r}.json`),o;if(a?o=`${i}/${r}.json`:(a=await e.fileExists(`${n}.admin`,`${i}/${r}/translations.json`),a?o=`${i}/${r}/translations.json`:r!==`en`&&(a=await e.fileExists(`${n}.admin`,`${i}/en.json`),a?o=`${i}/en.json`:(a=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),a&&(o=`${i}/en/translations.json`)))),o){let t=await e.readFile(`${n}.admin`,o),i;i=t.file===void 0?t:t.file;try{let e=JSON.parse(i);J.extendTranslations(e,r)}catch(e){return console.error(`Cannot parse language file "${n}.admin/${o}: ${e}`),``}return o}return console.warn(`Cannot find i18n for ${n} / ${o}`),``}return t&&typeof t==`object`&&J.extendTranslations(t),``}async readData(){let e;try{e=this.props.socket.getCompactSystemConfig?await this.props.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)||void 0;let t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:(e==null?void 0:e.common)||{},hostInfo:await this.readHostInfo(),alive:!!(t!=null&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(e){console.error(`Cannot read system config: ${e}`)}}async readHostInfo(){var t,n,r,i,a,o,s,c;let l=((t=this.props.common)==null?void 0:t.host)||((n=this.props.instanceObj)==null||(n=n.common)==null?void 0:n.host),u=l?await this.getCachedObject(`system.host.${l}`):null,d={id:l||``,os:(u==null||(r=u.native)==null||(r=r.os)==null?void 0:r.platform)||``,osType:(u==null||(i=u.native)==null||(i=i.os)==null?void 0:i.type)||``,arch:(u==null||(a=u.native)==null||(a=a.os)==null?void 0:a.arch)||``,release:(u==null||(o=u.native)==null||(o=o.os)==null?void 0:o.release)||``,nodeVersion:(u==null||(s=u.native)==null||(s=s.process)==null||(s=s.versions)==null?void 0:s.node)||``,controllerVersion:(u==null||(c=u.common)==null?void 0:c.installedVersion)||``};if(l&&e.usesDocker(this.props.schema))try{let e=await this.props.socket.getState(`system.host.${l}.alive`);if((e==null?void 0:e.val)!==!1){let e=await this.props.socket.getHostInfoShort(l,!1,PO);if(e){var f,p;d.docker=((f=e.dockerInformation)==null?void 0:f.isDocker)??e.Platform===`docker`,(p=e.dockerInformation)!=null&&p.isOfficial&&(d.dockerVersion=e.dockerInformation.officialVersion)}}}catch(e){console.warn(`Cannot read the docker information of ${l}: ${e}`)}return d}static usesDocker(e){let t=JSON.stringify(e);return t.includes(`"docker":`)||t.includes(`_host.docker`)}flatten(e,t){return t||={},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){let t=this.flatten(e);Object.keys(t).forEach(e=>{var n,r,i,a,o;if((n=t[e].confirm)!=null&&n.alsoDependsOn){var s;(s=t[e].confirm)==null||s.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].confirmDependsOn=t[n].confirmDependsOn||[];let r={...t[e],attr:e};r.confirm&&(r.confirm.cancel=`Undo`),t[n].confirmDependsOn.push(r)}})}if((r=t[e].onChange)!=null&&r.alsoDependsOn){var c;(c=t[e].onChange)==null||c.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].onChangeDependsOn=t[n].onChangeDependsOn||[];let r={...t[e],attr:e};t[n].onChangeDependsOn.push(r)}})}if((i=t[e].hidden)!=null&&i.alsoDependsOn){var l;(l=t[e].hidden)==null||l.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].hiddenDependsOn=t[n].hiddenDependsOn||[];let r={...t[e],attr:e};t[n].hiddenDependsOn.push(r)}})}if((a=t[e].label)!=null&&a.alsoDependsOn){var u;(u=t[e].label)==null||u.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].labelDependsOn=t[n].labelDependsOn||[];let r={...t[e],attr:e};t[n].labelDependsOn.push(r)}})}if((o=t[e].help)!=null&&o.alsoDependsOn){var d;(d=t[e].help)==null||d.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].helpDependsOn=t[n].helpDependsOn||[];let r={...t[e],attr:e};t[n].helpDependsOn.push(r)}})}})}updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject,hostInfo:this.state.hostInfo||void 0},e&&this.forceUpdate()}renderItem(e){return this.oContext?e.type===`tabs`?_.createElement(NO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type===`panel`||!e.type?_.createElement(jO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null):null}render(){return!this.state.systemConfig||!this.oContext?_.createElement(Ze,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),_.createElement(`div`,{style:{...!this.props.embedded||this.props.withoutSaveButtons?FO.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}};g();var LO={root:{width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`},scroll:{height:`calc(100% - 48px)`,overflowY:`auto`},exportImportButtons:{position:`absolute`,top:5,right:0,zIndex:3},button:{marginRight:`5px`},tooltip:{pointerEvents:`none`}};function RO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function zO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function BO(e,t){if(typeof t!=`string`)return t;if(!t.startsWith(`$/aes-192-cbc:`)||!/^[0-9a-f]{48}$/.test(e))return RO(e,t);let n=t.split(`:`,3),r=window.CryptoJS.enc.Hex.parse(e),i=window.CryptoJS.enc.Hex.parse(n[1]),a=window.CryptoJS.lib.CipherParams.create({ciphertext:window.CryptoJS.enc.Hex.parse(n[2])}),o=window.CryptoJS.AES.decrypt(a,r,{iv:i});return window.CryptoJS.enc.Utf8.stringify(o)}function VO(e,t,n){if(typeof t!=`string`)return t;if(!/^[0-9a-f]{48}$/.test(e))return zO(e,t);let r;r=n?window.CryptoJS.enc.Hex.parse(n):window.CryptoJS.lib.WordArray.random(16);let i=window.CryptoJS.enc.Hex.parse(e),a=window.CryptoJS.AES.encrypt(t,i,{iv:r}).ciphertext;return`$/aes-192-cbc:${window.CryptoJS.enc.Hex.stringify(r)}:${a}`}function HO(e,t){var n;return!t||!document.getElementById(t)?new Promise(n=>{let r=document.createElement(`script`);r.setAttribute(`id`,t),r.onload=n,r.src=e,document.getElementsByTagName(`head`)[0].appendChild(r)}):(n=document.getElementById(t))==null?void 0:n.onload}var UO=class extends It{constructor(e){super(e),K(this,`fileSubscribed`,[]),K(this,`fileLangSubscribed`,``),K(this,`secret`,void 0),K(this,`handleFileSelect`,e=>{let t=e.target.files[0];if(t){let e=new FileReader;e.onload=e=>{if(!e.target)return;let t=e.target.result;try{let e=JSON.parse(t);this.setState({data:e,changed:JSON.stringify(e)!==JSON.stringify(this.state.originalData)})}catch{window.alert(J.t(`jc_[JsonConfig] Failed to parse JSON file`))}},e.readAsText(t)}else window.alert(J.t(`jc_[JsonConfig] Failed to open JSON File`))}),K(this,`onFileChange`,async(e,t,n)=>{if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{var r;await IO.loadI18n(this.props.socket,(r=this.state.schema)==null?void 0:r.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{let e=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:e||void 0,hash:(0,Es.default)(JSON.stringify(e)).toString()})}catch{}}}),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:Un(e.themeName),saveConfigDialog:!1,hash:`_`},this.secret=e.secret||``,this.getInstanceObject().then(e=>this.getConfigFile().then(t=>IO.loadI18n(this.props.socket,t==null?void 0:t.i18n,this.props.adapterName).then(n=>{n&&(this.fileLangSubscribed||(this.fileLangSubscribed=n,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),e?this.setState({schema:t||void 0,data:e.native,common:e.common,hash:(0,Es.default)(JSON.stringify(t)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&=(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),``)}getExportImportButtons(){return _.createElement(`div`,{style:LO.exportImportButtons},_.createElement(Ce,{title:this.props.t(`jc_Import settings from JSON file`),slotProps:{popper:{sx:LO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":LO.button},onClick:()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`id`,`files`),e.setAttribute(`opacity`,0),e.addEventListener(`change`,e=>this.handleFileSelect(e),!1),e.click()}},_.createElement(lr,null))),_.createElement(Ce,{title:this.props.t(`jc_Export setting to JSON file`),slotProps:{popper:{sx:LO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":LO.button},onClick:()=>{this.state.data&&Zt.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},_.createElement(lr,{style:{transform:`rotate(180deg)`}}))))}async getInstanceObject(){try{let t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t==null?void 0:t.encryptedNative)){var e;if(!this.secret){let e=await this.props.socket.getSystemConfig();await HO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`),this.secret=e.native.secret}return(e=t.encryptedNative)==null||e.forEach(e=>{t.native[e]&&(t.native[e]=BO(this.secret,t.native[e]))}),t}return t||null}catch(e){window.alert(`[JsonConfig] Cannot read instance object: ${e}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Some data are not stored. Discard?`),ok:J.t(`jc_Discard`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({confirmDialog:!1},()=>e&&It.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e[`#include`]==`string`){let n=await this._getConfigFile(e[`#include`],[...t]);return delete e[`#include`],n&&(e={...e,...n}),e}let n=Object.keys(e);for(let r=0;r<n.length;r++)e[n[r]]&&typeof e[n[r]]==`object`&&(e[n[r]]=await this.scanForInclude(e[n[r]],t));return e}async getConfigFile(e){return this._getConfigFile(e)}async _getConfigFile(e,t){if(e||=`jsonConfig.json5`,t||=[],t.includes(e))return window.alert(`[JsonConfig] Circular reference in file: ${e} => ${t.join(` => `)}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e=`jsonConfig.json`);let n=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e),r=``,i=``;if(n.file!==void 0&&(i=n.file),typeof i==`string`)r=i;else if(i.type===`Buffer`){let e=``,t=new Uint8Array(i.data),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);r=e}this.fileSubscribed.includes(e)||(this.fileSubscribed.push(e),await this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,e,this.onFileChange));try{return await this.scanForInclude(Ts.default.parse(r),t)}catch(e){window.alert(`[JsonConfig] Cannot parse json5 config!`),console.log(e)}}catch(t){this.state.schema||window.alert(`[JsonConfig] Cannot read file "${e}: ${t}`)}return null}renderSaveConfigDialog(){return this.state.saveConfigDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Save configuration?`),ok:J.t(`jc_Save`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t||=this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(let n of Object.values(t.items)){let t=this.findAttr(e,n);if(t)return t}}return null}postProcessing(e,t,n){if(n||=this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}let r=e[t];if(n.items){if(n.type===`table`){let e=r;if(!Array.isArray(e))return;for(let t of e)if(n.items)for(let e of n.items)e.attr&&this.postProcessing(t,e.attr,e)}else for(let[t,r]of Object.entries(n.items)){if(r.type===`panel`||r.type===`tabs`||r.type===`accordion`)return;this.postProcessing(e,t,r)}}else if(t&&typeof r==`string`){if(n.type===`text`)n.trim!==!1&&(e[t]=r.trim());else if(n.type===`ip`)e[t]=r.trim();else if(n.type===`number`){let i=parseFloat(r.toString().replace(`,`,`.`));e[t]=n.min!==void 0&&i<n.min?n.min:n.max!==void 0&&i>n.max?n.max:i}else if(n.type===`port`){let i=parseInt(r.toString(),10);n.min!==void 0&&i<n.min?e[t]=n.min:n.max!==void 0&&i>n.max&&(e[t]=n.max),e[t]=e[t]!==0&&i<20?20:i>65535?65535:i}else n.type===`checkbox`&&(e[t]=e[t]===!0||e[t]===`true`||e[t]===`on`||e[t]===1||e[t]===`1`)}}async onSave(e,t){if(e){let e=await this.getInstanceObject();if(!e){console.error(`Something went wrong: may be no connection?`),window.alert(`Something went wrong: may be no connection?`);return}if(!this.state.data||!this.state.schema)return;let n={};for(let t of Object.keys(this.state.data)){let r=this.findAttr(t);(!r||!r.doNotSave||r.type===`state`)&&!t.startsWith(`_`)?X.setValue(e.native,t,this.state.data[t]):(X.setValue(e.native,t,null),n[t]=this.state.data[t])}try{let t=JSON.parse(JSON.stringify(e));if(Array.isArray(t.encryptedNative)){await HO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`);for(let e of t.encryptedNative)t.native[e]&&(t.native[e]=VO(this.secret,t.native[e]))}await this.props.socket.setObject(t._id,t)}catch(e){window.alert(`[JsonConfig] Cannot set object: ${e}`)}let r={...e.native,...n};console.log(r),this.setState({changed:!1,data:r,updateData:this.state.updateData+1,originalData:r},()=>t&&It.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):It.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){let e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?_.createElement(Ze,null):_.createElement(`div`,{style:LO.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),_.createElement(IO,{key:this.state.hash,style:LO.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(J.t(`jc_Cannot save configuration because of error in configuration`)),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:!!t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:`.`}),_.createElement(Ut,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width===`xs`||this.props.width===`sm`||this.props.width===`md`,changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}},WO=t({ConfigGeneric:()=>X,ConfigPanel:()=>jO,GUI_API_GENERATION:()=>2,JsonConfig:()=>UO,JsonConfigComponent:()=>IO,checkGuiApiCompatibility:()=>yc}),GO=t({ConfigGeneric:()=>QO,ConfigPanel:()=>ZO,GUI_API_GENERATION:()=>qO,JsonConfig:()=>YO,JsonConfigComponent:()=>XO,checkGuiApiCompatibility:()=>JO,default:()=>$O}),KO=WO,qO=KO.GUI_API_GENERATION,JO=KO.checkGuiApiCompatibility,YO=KO.JsonConfig,XO=KO.JsonConfigComponent,ZO=KO.ConfigPanel,QO=KO.ConfigGeneric,$O=Reflect.get(WO,`default`)??WO,ek=`__mf_module_cache__`;globalThis[ek]||={share:{},remote:{}},globalThis[ek].share||={},globalThis[ek].remote||={};var tk=globalThis[ek];for(let e of Object.keys(tk.share))if(e.startsWith(`default:`)){let t=e.slice(8);tk.share[t]===void 0&&(tk.share[t]=tk.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;tk.share[t]===void 0&&(tk.share[t]=tk.share[e])}var nk=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},rk=Symbol.for(`module-federation.shared-cache-listeners`),ik=e=>{let t=e[rk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,rk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},ak=(e,t,n)=>{let r=ik(e);(r[t.canonical]||=new Set).add(n)},ok=Symbol.for(`module-federation.shared-cache-owners`),sk=e=>{let t=e[ok];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,ok,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},ck=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[ok];r===void 0?o&&delete o[t.canonical]:sk(e)[t.canonical]=r;let s=(i=e[rk])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},lk=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},uk=nk(tk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]});uk===void 0&&(uk=lk(GO),ck(tk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},uk,`ConfigCustomJavascriptSet`));var dk,fk=e=>{e.GUI_API_GENERATION,e.checkGuiApiCompatibility,e.JsonConfig,e.JsonConfigComponent,e.ConfigPanel,dk=e.ConfigGeneric,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};ak(tk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},fk),fk(uk);export{ry as a,ps as c,kx as i,GO as n,vs as o,Dx as r,hs as s,dk as t};
|
|
1494
|
+
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=TO(wO(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=TO(wO(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function kO(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new bO||null,prettyErrors:t}}function AO(e,t={}){let{lineCounter:n,prettyErrors:r}=kO(t),i=new OO(n==null?void 0:n.addNewLine),a=new oO(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new SD(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(wD(e,n)),o.warnings.forEach(wD(e,n))),o}function jO(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=AO(e,n);if(!i)return null;if(i.warnings.forEach(e=>eE(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}g();var MO={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},NO=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&typeof e==`string`&&(e||!this.props.schema.allowEmpty))try{jO(e)}catch(e){console.log(`Error in YAML`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:MO.flex},_.createElement(xt,{color:`grey`,style:MO.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_YAML editor`))),o?_.createElement(fS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||``})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...MO.wrapper,border:this.state.yamlError?`2px solid red`:`2px solid transparent`}},_.createElement(NC,{mode:`yaml`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,yamlError:this.validateYaml(e)}),name:`ConfigYamlEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?_.createElement(_n,null,this.state.yamlError?J.t(`jc_Invalid YAML`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var PO=class extends X{async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-D4Fc4r7w.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){let e=this.state.QRCode;if(!e)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var FO=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-D4Fc4r7w.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({qrData:e||``,loading:!1})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()));let e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var IO={accordion:Rs,alive:Bs,autocomplete:Vs,autocompleteSendTo:Hs,certCollection:Js,certificate:Gs,certificates:qs,checkbox:lc,checkDocker:Ys,checkLicense:cc,chip:hc,chips:hc,color:gc,coordinates:vc,credential:oc,cron:Ws,custom:Dc,datePicker:Rx,deviceManager:zx,divider:pw,file:$x,fileSelector:Kx,func:eS,header:hw,iframe:tS,iframeSendTo:nS,image:aS,imageSendTo:iS,infoBox:oS,instance:cS,interface:uS,ip:rS,jsonEditor:FC,language:LC,license:RC,number:BC,oauth2:VC,objectId:UC,password:KC,pattern:qC,port:YC,qrCode:PO,qrCodeSendTo:FO,room:XC,select:QC,selectSendTo:ew,sendto:iw,sendTo:iw,setState:ow,slider:cw,state:dw,staticImage:gw,staticInfo:bw,staticLink:Cw,staticText:Cw,table:Aw,text:Mw,textSendTo:Pw,timePicker:Fw,topic:Lw,uuid:Rw,user:Bw,yamlEditor:NO},LO={fullWidth:{width:`100%`},paper:{margin:1,width:`auto !important`,overflowY:`auto`,paddingBottom:1,flex:`1 1 auto`,minHeight:0},padding:{padding:`10px`},heading:{},primary:e=>({backgroundColor:e.palette.primary.main,color:e.palette.mode===`dark`?`inherit`:`#FFF`}),secondary:e=>({backgroundColor:e.palette.secondary.main})},RO=class e extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)===`true`})}renderItems(t,n){return t?Object.keys(t).map(r=>{if(this.props.oContext.multiEdit&&t[r].noMultiEdit||!X.isHostAllowed(t[r],this.props.oContext.hostInfo))return null;let i=t[r].type||`panel`,a,o=`Use this.props.oContext.socket!`;if(i===`custom`)t[r].url?a=Dc:this.props.oContext.customs&&this.props.oContext.customs[t[r].component]?a=this.props.oContext.customs[t[r].component]:(console.error(`Cannot find custom component: ${t[r].component}`),a=X),o=this.props.oContext.socket;else if(i===`component`){var s;let e=t[r].subType;if(e&&(s=this.props.customComponents)!=null&&s[e])a=this.props.customComponents[e];else return _.createElement(`div`,{key:`${r}_${this.props.index??``}`},`Component ${e} not provided`)}else a=i===`panel`?e:IO[i]||X;return _.createElement(a,{socket:o,globalData:this.props.globalData,oContext:this.props.oContext,key:`${r}_${this.props.index??``}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:LO.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:t[r],attr:r,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){let e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;let t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){let t=_.createElement(Jt,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:Zt.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:`left`},n,this.props.oContext.themeType===`dark`?e.darkStyle:void 0)});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return _.createElement(Jt,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:LO.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let r;if(e.collapsable)r=_.createElement(Ae,{key:`${this.props.attr}_${this.props.index}`,style:LO.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?`false`:`true`),this.setState({expanded:!this.state.expanded})}},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color===`primary`?LO.primary:e.color===`secondary`&&LO.secondary,{width:`100%`})},_.createElement(Pn,{style:LO.heading},this.getText(e.label))),_.createElement(xn,null,_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:`100%`,padding:`10px`}},this.renderItems(t,this.state.calculatedValues.disabled))));else{let e=Zt.getStyle(this.props.oContext.theme,this.props.style,n,{width:`100%`},this.props.isParentTab&&LO.paper);r=_.createElement(vt,{component:`div`,key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:e},_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:Zt.getStyle(this.props.oContext.theme,{width:`100%`},this.props.isParentTab&&LO.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){let t=_.createElement(Jt,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:`left`,...n}},r);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return r}};g();var zO={tabs:{height:`100%`,width:`100%`,display:`flex`,flexDirection:`column`},tabsBar:{flex:`0 0 auto`},panel:{width:`100%`,display:`block`,flex:`1 1 auto`,minHeight:0}},BO=class e extends X{constructor(t){super(t),K(this,`resizeObserver`,null),K(this,`resizeRaf`,null),K(this,`calculateTimeoutTable`,null),K(this,`pinTimeout`,null),K(this,`refDiv`,void 0),K(this,`onTabError`,(e,t)=>{let n=this.state.tab;if(!n&&e){this.props.onError(e,t);return}let r={...this.state.tabErrors};n&&(r[n]||={}),n&&e&&(t?r[n][e]=t:(delete r[n][e],Object.keys(r[n]).length===0&&delete r[n])),this.setState({tabErrors:r}),this.props.onError(e,t)}),K(this,`hasTabErrors`,e=>!!this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0),K(this,`measureWidth`,()=>{var t;let n=(t=this.refDiv.current)==null?void 0:t.clientWidth;if(!n)return;let r=this.state.useMenu;!r&&n<e.MENU_WIDTH?r=!0:r&&n>e.MENU_WIDTH+e.MENU_HYSTERESIS&&(r=!1),r!==this.state.useMenu&&this.setState({useMenu:r})}),K(this,`onHashTabsChanged`,()=>{let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>3&&e[1]===`config`){let t=e[3],n=parseInt(t,10),r;n.toString()===t?n>=0&&n<Object.keys(this.props.schema.items).length&&(r=Object.keys(this.props.schema.items)[n]):Object.keys(this.props.schema.items).includes(t)&&(r=t),r!==void 0&&r!==this.state.tab&&((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,r),this.pinWidthForTransition(),this.setState({tab:r}))}});let n;if(this.props.root){let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>=3&&e[1]===`config`){let t=e[3],r=parseInt(t,10);t&&r.toString()===t?r>=0&&r<Object.keys(this.props.schema.items).length&&(n=Object.keys(this.props.schema.items)[r]):t&&Object.keys(this.props.schema.items).includes(t)&&(n=t),window.addEventListener(`hashchange`,this.onHashTabsChanged,!1)}}n===void 0&&(n=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`)||Object.keys(this.props.schema.items)[0],Object.keys(this.props.schema.items).includes(n)||(n=Object.keys(this.props.schema.items)[0])),this.refDiv=_.createRef(),Object.assign(this.state,{tab:n,useMenu:!1,openMenu:null,tabErrors:{}})}async componentDidMount(){await super.componentDidMount(),this.measureWidth(),this.refDiv.current&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeRaf===null&&(this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.measureWidth()}))}),this.resizeObserver.observe(this.refDiv.current))}componentWillUnmount(){this.resizeRaf!==null&&(window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.calculateTimeoutTable&&=(clearTimeout(this.calculateTimeoutTable),null),this.pinTimeout&&=(clearTimeout(this.pinTimeout),null),window.removeEventListener(`hashchange`,this.onHashTabsChanged,!1),super.componentWillUnmount()}pinWidthForTransition(){var e;let t=(e=this.refDiv.current)==null?void 0:e.clientWidth;t&&(this.pinTimeout&&clearTimeout(this.pinTimeout),this.state.contentMinWidth!==t&&this.setState({contentMinWidth:t}),this.pinTimeout=setTimeout(()=>{this.pinTimeout=null,this.setState({contentMinWidth:void 0})},500))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,e),this.pinWidthForTransition(),this.setState({tab:e},()=>{if(this.props.root){let e=(window.location.hash||``).split(`/`);e.length>=3&&e[1]===`config`&&(e[3]=this.state.tab||``,window.location.hash=e.join(`/`))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;let e=this.props.schema.items,t={};for(let n in e){let r;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(!X.isHostAllowed(e[n],this.props.oContext.hostInfo)){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){let i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:r}}else{if(await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:r}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){let e=this.props.schema.items,t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;let n=[];Object.keys(e).filter(e=>{var t;return!((t=this.state.calculatedValuesTable)!=null&&(t=t[e])!=null&&t.hidden)}).map(r=>{var i;let a=this.getIcon(e[r].icon);t||=!!a,n.push({icon:a,disabled:!!((i=this.state.calculatedValuesTable)!=null&&(i=i[r])!=null&&i.disabled),label:this.getText(e[r].label),name:r})}),n.find(e=>e.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);let r;return r=this.state.useMenu&&n.length>2?_.createElement(ue,{style:{...zO.tabsBar,top:2,backgroundColor:this.props.oContext.themeType===`dark`?`#222`:`#DDD`},variant:`dense`},_.createElement(Zn,{onClick:e=>this.setState({openMenu:e.currentTarget})},_.createElement(Hn,null)),this.state.openMenu?_.createElement(ae,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(e=>{let n=this.hasTabErrors(e.name);return _.createElement(z,{disabled:e.disabled,key:e.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(e.name))},selected:e.name===this.state.tab,sx:n?{color:`error.main`}:void 0},t?_.createElement(te,null,e.icon):null,_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5,width:`100%`}},e.label,n&&_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})))})):null):_.createElement(W,{variant:`scrollable`,scrollButtons:`auto`,style:{...zO.tabsBar,...this.props.schema.tabsStyle},value:this.state.tab,onChange:(e,t)=>this.onMenuChange(t)},n.map(e=>{let t=this.hasTabErrors(e.name),n=t?_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5}},e.label,_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})):e.label;return _.createElement(He,{id:e.name,wrapped:!0,disabled:e.disabled,key:e.name,value:e.name,iconPosition:this.props.schema.iconPosition||`start`,icon:e.icon||void 0,label:n,sx:t?{"& .MuiTab-wrapper":{color:`error.main`}}:void 0})})),this.state.tab?_.createElement(`div`,{style:this.state.contentMinWidth===void 0?zO.tabs:{...zO.tabs,minWidth:this.state.contentMinWidth},ref:this.refDiv},r,_.createElement(RO,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:zO.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents})):null}};K(BO,`MENU_WIDTH`,600),K(BO,`MENU_HYSTERESIS`,40),g(),J.extendTranslations({en:{"jc_A credential with this name already exists":`A credential with this name already exists`,"jc_A unique name is required":`A unique name is required`,"jc_Accept license":`Accept license`,jc_Actions:`Actions`,"jc_Add credential":`Add credential`,"jc_Add row":`Add row`,"jc_All items are filtered out":`All items are filtered out`,jc_Append:`Append`,"jc_Append %s entries or replace existing?":`Append %s entries or replace existing?`,"jc_Append or replace?":`Append or replace?`,"jc_Are you sure?":`Are you sure?`,jc_Cancel:`Cancel`,"jc_Cannot add items with set filter":`Cannot add items with set filter`,"jc_Cannot create credential: %s":`Cannot create credential: %s`,"jc_Cannot decode license":`Cannot decode license`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Cannot determine position: System settings are empty and GPS detection is disabled in browser`,'jc_Cannot display the custom component "%s"':`Cannot display the custom component "%s"`,"jc_Cannot read licenses: %s":`Cannot read licenses: %s`,"jc_Cannot retrieve options, as instance is offline":`Cannot retrieve options, as instance is offline`,"jc_Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"jc_Cannot upload":`Cannot upload`,"jc_Chained certificate":`Chained certificate`,jc_Checked:`Checked`,"jc_Click to see in full size":`Click to see in full size`,"jc_Click to show":`Click to show`,"jc_Clone current row":`Clone current row`,jc_Close:`Close`,jc_Commercial:`Commercial`,jc_Copied:`Copied`,"jc_Copied %s":`Copied "%s"`,"jc_Copy content":`Copy content`,jc_Create:`Create`,"jc_Credential type":`Credential type`,'jc_Custom component "%s" was not started':`Custom component "%s" was not started`,"jc_Define schedule":`Define schedule`,jc_Delete:`Delete`,"jc_Delete current row":`Delete current row`,"jc_Disable/Enable translation":`Disable/Enable translation`,jc_Discard:`Discard`,"jc_Do not use let's encrypt":`Do not use let's encrypt`,"jc_Docker is not available":`Docker is not available`,"jc_Docker is not installed or not running":`Docker is not installed or not running`,"jc_Drop file here":`Drop file here`,"jc_Enter the code from that page here":`Enter the code from that page here`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expand/Collapse card`,"jc_Export configuration section":`Export configuration section`,"jc_Export data to %s file":`Export data to %s file`,"jc_Export setting to JSON file":`Export setting to JSON file`,"jc_Fallback custom certificates":`Fallback custom certificates`,"jc_File is too big. Max %sk allowed. Try use SVG.":`File is too big. Max %sk allowed. Try use SVG.`,"jc_File will be deleted":`File will be deleted`,"jc_Filter and Data Actions":`Filter and Data Actions`,"jc_Get %s access":`Get %s access`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`If the button above does not work, you can authorize manually this app by visiting this url`,"jc_Import and add configuration section":`Import and add configuration section`,"jc_Import and replace configuration section":`Import and replace configuration section`,"jc_Import data from %s file":`Import data from %s file`,"jc_Import from %s":`Import from %s`,"jc_Import settings from JSON file":`Import settings from JSON file`,"jc_Instance %s is alive":`Instance %s is alive`,"jc_Instance %s is not alive":`Instance %s is not alive`,"jc_Invalid JSON":`Invalid JSON`,"jc_Invalid JSON file.":`Invalid JSON file.`,"jc_Invalid JSON format. Expected an array.":`Invalid JSON format. Expected an array.`,"jc_Invalid YAML":`Invalid YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`It was probably built for an older admin version. Please update the adapter.`,"jc_JSON editor":`JSON editor`,jc_Latitude:`Latitude`,"jc_License %s":`License %s`,"jc_License agreement":`License agreement`,"jc_License does not exist":`License does not exist`,"jc_License expired on %s":`License expired on %s`,'jc_License for other product "%s"':`License for other product "%s"`,"jc_License is for version %s, but required version is %s":`License is for version %s, but required version is %s`,"jc_License must be converted":`License must be converted to newer version. You can do it in your iobroker.net profile.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`License not found in the license manager. Do you want to update licenses from iobroker.net?`,"jc_Listen on all IPs":`Listen on all IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Move down`,"jc_Move up":`Move up`,jc_Name:`Name`,"jc_No one license found in license manager":`No one license found in license manager`,"jc_No response from admin":`No response from admin`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,"jc_OAuth Client ID":`OAuth Client ID`,"jc_OAuth Client secret":`OAuth Client secret`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Passwords are not equal!`,"jc_Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,"jc_Please allow popups in your browser for this page!":`Please allow popups in your browser for this page!`,"jc_Please confirm":`Please confirm`,"jc_Please create license":`Please create license`,"jc_Please enter the license":`Please enter the license`,"jc_Please fill in all required fields":`Please fill in all required fields`,"jc_Port could be used by %s":`Port could be used by %s`,"jc_Port is already used by %s":`Port is already used by %s`,"jc_Press ENTER Key to add new item":`Press ENTER Key to add new item`,"jc_Private certificate":`Private certificate`,jc_Product:`Product`,"jc_Public certificate":`Public certificate`,"jc_Renew %s access":`Renew %s access`,jc_Replace:`Replace`,"jc_Request data by instance":`Request data by instance`,"jc_Request timed out":`Request timed out`,jc_Result:`Result`,jc_Save:`Save`,"jc_Save configuration?":`Save configuration?`,"jc_Serial number (UUID)":`Serial number (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serial number (UUID) "%s" in license is for other device.`,"jc_Show/hide filter input":`Show/hide filter input`,"jc_Some data are not stored. Discard?":`Some data are not stored. Discard?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Successfully authorized. Token valid till %s and will be automatically renewed.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,"jc_Suitable license not found in license manager":`Suitable license not found in license manager`,"jc_System language":`System language`,"jc_Take browser position":`Take position from browser`,"jc_Take position from system settings":`Take position from system settings`,jc_Template:`Template`,"jc_Use all available let's encrypt certificates":`Use all available let's encrypt certificates`,"jc_Use system settings for position":`Use system settings for position`,"jc_Used system settings":`Used system settings`,jc_ValidTill:`Valid till`,jc_Version:`Version`,"jc_YAML editor":`YAML editor`,jc_Yes:`Yes`,"jc_You can filter entries by entering here some text":`You can filter entries by entering here some text`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Failed to open JSON File`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Failed to parse JSON file`,jc___different__:`different`,jc_false:`FALSE`,jc_locally:`locally`,jc_none:`none`,jc_repeat:`repeat`,jc_true:`TRUE`,"jc_via internet":`via internet`,sch_all:`all`},de:{"jc_A credential with this name already exists":`Es existiert bereits eine Berechtigung mit diesem Namen.`,"jc_A unique name is required":`Ein eindeutiger Name ist erforderlich.`,"jc_Accept license":`Lizenz akzeptieren`,jc_Actions:`Aktionen`,"jc_Add credential":`Anmeldeinformationen hinzufügen`,"jc_Add row":`Zeile hinzufügen`,"jc_All items are filtered out":`Alle Elemente sind herausgefiltert`,jc_Append:`Anhängen`,"jc_Append %s entries or replace existing?":`%s Einträge anhängen oder vorhandene ersetzen?`,"jc_Append or replace?":`Anhängen oder ersetzen?`,"jc_Are you sure?":`Bist du sicher?`,jc_Cancel:`Abbrechen`,"jc_Cannot add items with set filter":`Elemente mit festgelegtem Filter können nicht hinzugefügt werden`,"jc_Cannot create credential: %s":`Anmeldeinformationen konnten nicht erstellt werden: %s`,"jc_Cannot decode license":`Lizenz kann nicht entschlüsselt werden`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert`,'jc_Cannot display the custom component "%s"':`Die benutzerdefinierte Komponente "%s" kann nicht angezeigt werden`,"jc_Cannot read licenses: %s":`Lizenzen können nicht gelesen werden: %s`,"jc_Cannot retrieve options, as instance is offline":`Optionen können nicht abgerufen werden, da die Instanz offline ist`,"jc_Cannot save configuration because of error in configuration":`Die Konfiguration konnte aufgrund eines Fehlers nicht gespeichert werden.`,"jc_Cannot upload":`Kann nicht hochladen`,"jc_Chained certificate":`Chained Zertifikat`,jc_Checked:`Geprüft`,"jc_Click to see in full size":`Klicken Sie hier, um die Vollbildansicht zu öffnen.`,"jc_Click to show":`Zum Anzeigen klicken`,"jc_Clone current row":`Aktuelle Zeile klonen`,jc_Close:`Schließen`,jc_Commercial:`Kommerziell`,jc_Copied:`Kopiert`,"jc_Copied %s":`"%s" kopiert`,"jc_Copy content":`Inhalte kopieren`,jc_Create:`Erstellen`,"jc_Credential type":`Anmeldeinformationstyp`,'jc_Custom component "%s" was not started':`Die benutzerdefinierte Komponente "%s" wurde nicht gestartet`,"jc_Define schedule":`Zeitplan definieren`,jc_Delete:`Löschen`,"jc_Delete current row":`Aktuelle Zeile löschen`,"jc_Disable/Enable translation":`Übersetzung deaktivieren/aktivieren`,jc_Discard:`Verwerfen`,"jc_Do not use let's encrypt":`Let's encrypt nicht verwenden`,"jc_Docker is not available":`Docker ist nicht verfügbar`,"jc_Docker is not installed or not running":`Docker ist nicht installiert oder läuft nicht`,"jc_Drop file here":`Datei hier ablegen`,"jc_Enter the code from that page here":`Geben Sie den Code von dieser Seite hier ein`,jc_Error:`Fehler`,"jc_Expand/Collapse card":`Karte ein-/ausklappen`,"jc_Export configuration section":`Konfigurationsabschnitt exportieren`,"jc_Export data to %s file":`Daten in %s-Datei exportieren`,"jc_Export setting to JSON file":`Einstellungen in eine JSON-Datei exportieren`,"jc_Fallback custom certificates":`Benutzerdefinierte Fallback-Zertifikate`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.`,"jc_File will be deleted":`Die Datei wird gelöscht`,"jc_Filter and Data Actions":`Filter- und Datenaktionen`,"jc_Get %s access":`%s Zugriff erhalten`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen`,"jc_Import and add configuration section":`Konfigurationsabschnitt importieren und hinzufügen`,"jc_Import and replace configuration section":`Konfigurationsabschnitt importieren und ersetzen`,"jc_Import data from %s file":`Daten aus %s-Datei importieren`,"jc_Import from %s":`Von %s importieren`,"jc_Import settings from JSON file":`Einstellungen aus einer JSON-Datei importieren`,"jc_Instance %s is alive":`Instanz %s ist aktiv`,"jc_Instance %s is not alive":`Instanz %s ist nicht aktiv`,"jc_Invalid JSON":`Ungültiges JSON`,"jc_Invalid JSON file.":`Ungültige JSON-Datei.`,"jc_Invalid JSON format. Expected an array.":`Ungültiges JSON-Format. Array erwartet.`,"jc_Invalid YAML":`Ungültiges YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Sie benötigt GUI-API-Generation %s, dieser Admin stellt aber Generation %s bereit. Bitte den Admin aktualisieren.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Sie wurde für GUI-API-Generation %s erstellt, dieser Admin stellt aber Generation %s bereit. Bitte den Adapter aktualisieren.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Sie wurde vermutlich für eine ältere Admin-Version erstellt. Bitte den Adapter aktualisieren.`,"jc_JSON editor":`JSON-Editor`,jc_Latitude:`Breite`,"jc_License %s":`Lizenz %s`,"jc_License agreement":`Lizenzvereinbarung`,"jc_License does not exist":`Lizenz existiert nicht`,"jc_License expired on %s":`Lizenz am %s abgelaufen`,'jc_License for other product "%s"':`Lizenz für anderes Produkt „%s“`,"jc_License is for version %s, but required version is %s":`Die Lizenz gilt für Version %s, benötigt wird jedoch Version %s.`,"jc_License must be converted":`Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?`,"jc_Listen on all IPs":`Zugriff von allen IPs zulassen`,jc_Longitude:`Längengrad`,"jc_Move down":`Nach unten`,"jc_Move up":`Nach oben`,jc_Name:`Name`,"jc_No one license found in license manager":`Im Lizenzmanager wurde keine Lizenz gefunden`,"jc_No response from admin":`Keine Antwort vom Administrator`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Nicht zulässiger doppelter Eintrag "%s" in Spalte "%s"`,"jc_OAuth Client ID":`OAuth-Client-ID`,"jc_OAuth Client secret":`OAuth-Client-Secret`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Passwörter sind nicht gleich!`,"jc_Place your files here or click here to open the browse dialog":`Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen`,"jc_Please allow popups in your browser for this page!":`Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!`,"jc_Please confirm":`Bitte bestätigen`,"jc_Please create license":`Bitte erstellen Sie eine Lizenz`,"jc_Please enter the license":`Bitte die Lizenz eingeben`,"jc_Please fill in all required fields":`Bitte füllen Sie alle Pflichtfelder aus.`,"jc_Port could be used by %s":`Port könnte von %s verwendet werden`,"jc_Port is already used by %s":`Port wird bereits von %s verwendet`,"jc_Press ENTER Key to add new item":`Die Eingabetaste drücken, um ein neues Element hinzuzufügen`,"jc_Private certificate":`Privates Zertifikat`,jc_Product:`Produkt`,"jc_Public certificate":`Öffentliches Zertifikat`,"jc_Renew %s access":`%s Zugriff erneuern`,jc_Replace:`Ersetzen`,"jc_Request data by instance":`Daten pro Instanz anfordern`,"jc_Request timed out":`Zeitüberschreitung der Anforderung`,jc_Result:`Ergebnis`,jc_Save:`Speichern`,"jc_Save configuration?":`Konfiguration speichern?`,"jc_Serial number (UUID)":`Seriennummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.`,"jc_Show/hide filter input":`Filtereingabe ein-/ausblenden`,"jc_Some data are not stored. Discard?":`Einige Daten werden nicht gespeichert. Verwerfen?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.`,"jc_Suitable license not found in license manager":`Passende Lizenz im Lizenzmanager nicht gefunden`,"jc_System language":`Systemsprache`,"jc_Take browser position":`Position vom Browser einnehmen`,"jc_Take position from system settings":`Position aus den Systemeinstellungen übernehmen`,jc_Template:`Vorlage`,"jc_Use all available let's encrypt certificates":`Alle verfügbaren Zertifikate von Let's encrypt benutzen`,"jc_Use system settings for position":`Systemeinstellungen für die Position verwenden`,"jc_Used system settings":`Systemeinstellungen`,jc_ValidTill:`Gültig bis`,jc_Version:`Ausführung`,"jc_YAML editor":`YAML-Editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`Sie können Einträge filtern, indem Sie hier Text eingeben`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Fehler beim Öffnen der JSON-Datei`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Fehler beim Parsen der JSON-Datei`,jc___different__:`unterschiedlich`,jc_false:`FALSCH`,jc_locally:`örtlich`,jc_none:`kein`,jc_repeat:`wiederholen`,jc_true:`WAHR`,"jc_via internet":`übers Internet`,sch_all:`alle`},ru:{"jc_A credential with this name already exists":`Учетные данные с таким именем уже существуют.`,"jc_A unique name is required":`Требуется уникальное имя.`,"jc_Accept license":`Принять лицензию`,jc_Actions:`Действия`,"jc_Add credential":`Добавить учетные данные`,"jc_Add row":`Добавить ряд`,"jc_All items are filtered out":`Все элементы отфильтрованы`,jc_Append:`Добавить`,"jc_Append %s entries or replace existing?":`Добавить записи %s или заменить существующие?`,"jc_Append or replace?":`Дополнить или заменить?`,"jc_Are you sure?":`Вы уверены?`,jc_Cancel:`Отмена`,"jc_Cannot add items with set filter":`Невозможно добавить элементы с установленным фильтром`,"jc_Cannot create credential: %s":`Не удалось создать учетные данные: %s`,"jc_Cannot decode license":`Не могу декодировать лицензию`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.`,'jc_Cannot display the custom component "%s"':`Не удается отобразить пользовательский компонент "%s"`,"jc_Cannot read licenses: %s":`Невозможно прочитать лицензии: %s`,"jc_Cannot retrieve options, as instance is offline":`Невозможно получить параметры, так как экземпляр находится в автономном режиме.`,"jc_Cannot save configuration because of error in configuration":`Невозможно сохранить конфигурацию из-за ошибки в конфигурации.`,"jc_Cannot upload":`Невозможно загрузить`,"jc_Chained certificate":`Chained сертификат`,jc_Checked:`Проверено`,"jc_Click to see in full size":`Нажмите, чтобы посмотреть в полном размере`,"jc_Click to show":`Нажмите, чтобы показать`,"jc_Clone current row":`Клонировать текущую строку`,jc_Close:`Закрыть`,jc_Commercial:`Коммерческая`,jc_Copied:`скопировано`,"jc_Copied %s":`Скопировано "%s"`,"jc_Copy content":`Копировать содержимое`,jc_Create:`Создать`,"jc_Credential type":`Тип учетных данных`,'jc_Custom component "%s" was not started':`Пользовательский компонент "%s" не был запущен.`,"jc_Define schedule":`Задать расписание`,jc_Delete:`Удалить`,"jc_Delete current row":`Удалить текущую строку`,"jc_Disable/Enable translation":`Включить/отключить перевод`,jc_Discard:`Отказаться`,"jc_Do not use let's encrypt":`Не использовать Let’s Encrypt`,"jc_Docker is not available":`Докер недоступен`,"jc_Docker is not installed or not running":`Docker не установлен или не запущен`,"jc_Drop file here":`Перетащите файл сюда`,"jc_Enter the code from that page here":`Введите код с этой страницы здесь`,jc_Error:`Ошибка`,"jc_Expand/Collapse card":`Развернуть/Свернуть карточку`,"jc_Export configuration section":`Раздел конфигурации экспорта`,"jc_Export data to %s file":`Экспорт данных в файл %s`,"jc_Export setting to JSON file":`Экспорт настроек в JSON-файл`,"jc_Fallback custom certificates":`Резервные пользовательские сертификаты`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.`,"jc_File will be deleted":`Файл будет удалён`,"jc_Filter and Data Actions":`Фильтрация и действия с данными`,"jc_Get %s access":`Получить %s доступ`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.`,"jc_Import and add configuration section":`Импорт и добавление раздела конфигурации`,"jc_Import and replace configuration section":`Импорт и замена раздела конфигурации`,"jc_Import data from %s file":`Импорт данных из файла %s`,"jc_Import from %s":`Импорт из %s`,"jc_Import settings from JSON file":`Импорт настроек из JSON-файла`,"jc_Instance %s is alive":`Экземпляр %s работает`,"jc_Instance %s is not alive":`Экземпляр %s не работает`,"jc_Invalid JSON":`Неверный JSON`,"jc_Invalid JSON file.":`Неверный файл JSON.`,"jc_Invalid JSON format. Expected an array.":`Недопустимый формат JSON. Ожидается массив.`,"jc_Invalid YAML":`Недопустимый YAML-файл`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Для этого требуется генерация API графического интерфейса пользователя %s, но администратор предоставляет генерацию %s. Пожалуйста, обновите администратора.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Он был создан для генерации API графического интерфейса пользователя %s, но этот администратор предоставляет генерацию %s. Пожалуйста, обновите адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Вероятно, он был создан для более старой версии административной панели. Пожалуйста, обновите адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Лицензия %s`,"jc_License agreement":`Лицензионное соглашение`,"jc_License does not exist":`Лицензия не существует`,"jc_License expired on %s":`Срок действия лицензии истек %s`,'jc_License for other product "%s"':`Лицензия на другой продукт "%s"`,"jc_License is for version %s, but required version is %s":`Лицензия распространяется на версию %s, но требуемая версия — %s.`,"jc_License must be converted":`Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?`,"jc_Listen on all IPs":`Слушать на всех IP`,jc_Longitude:`Долгота`,"jc_Move down":`Вниз`,"jc_Move up":`Вверх`,jc_Name:`Имя`,"jc_No one license found in license manager":`В менеджере лицензий не найдена ни одна лицензия`,"jc_No response from admin":`Нет ответа от администратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недопустимая повторяющаяся запись "%s" в столбце "%s"`,"jc_OAuth Client ID":`Идентификатор клиента OAuth`,"jc_OAuth Client secret":`Секрет клиента OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Пароли не равны!`,"jc_Place your files here or click here to open the browse dialog":`Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора`,"jc_Please allow popups in your browser for this page!":`Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!`,"jc_Please confirm":`Пожалуйста подтвердите`,"jc_Please create license":`Пожалуйста, создайте лицензию`,"jc_Please enter the license":`Пожалуйста, введите лицензию`,"jc_Please fill in all required fields":`Пожалуйста, заполните все обязательные поля.`,"jc_Port could be used by %s":`Порт может использоваться %s`,"jc_Port is already used by %s":`Порт уже используется %s`,"jc_Press ENTER Key to add new item":`Нажмите клавишу ENTER, чтобы добавить новый элемент.`,"jc_Private certificate":`Частный сертификат`,jc_Product:`Продукт`,"jc_Public certificate":`Публичный сертификат`,"jc_Renew %s access":`Продлить доступ %s`,jc_Replace:`Заменять`,"jc_Request data by instance":`Запрос данных по экземпляру`,"jc_Request timed out":`Истекло время запроса`,jc_Result:`Результат`,jc_Save:`Сохранить`,"jc_Save configuration?":`Сохранить конфигурацию?`,"jc_Serial number (UUID)":`Серийный номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.`,"jc_Show/hide filter input":`Показать/скрыть ввод фильтра`,"jc_Some data are not stored. Discard?":`Некоторые данные не сохранились. Отказаться?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.`,"jc_Suitable license not found in license manager":`Подходящая лицензия не найдена в менеджере лицензий`,"jc_System language":`Язык системы`,"jc_Take browser position":`Взять позицию из браузера`,"jc_Take position from system settings":`Занять позицию из системных настроек`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Использовать все доступные сертификаты Let’s encrypt`,"jc_Use system settings for position":`Использовать системные настройки для позиции`,"jc_Used system settings":`Системные настройки`,jc_ValidTill:`Годен до`,jc_Version:`Версия`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Да`,"jc_You can filter entries by entering here some text":`Вы можете отфильтровать записи, введя здесь текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не удалось открыть JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не удалось разобрать JSON-файл`,jc___different__:`разное`,jc_false:`ЛОЖЬ`,jc_locally:`локально`,jc_none:`ничего`,jc_repeat:`повтор`,jc_true:`истинный`,"jc_via internet":`через интернет`,sch_all:`все`},pt:{"jc_A credential with this name already exists":`Já existe uma credencial com este nome.`,"jc_A unique name is required":`É necessário um nome único.`,"jc_Accept license":`Aceitar licença`,jc_Actions:`Ações`,"jc_Add credential":`Adicionar credencial`,"jc_Add row":`Adicionar linha`,"jc_All items are filtered out":`Todos os itens são filtrados`,jc_Append:`Acrescentar`,"jc_Append %s entries or replace existing?":`Acrescentar %s entradas ou substituir as existentes?`,"jc_Append or replace?":`Acrescentar ou substituir?`,"jc_Are you sure?":`Você tem certeza?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`Não é possível adicionar itens com filtro definido`,"jc_Cannot create credential: %s":`Não foi possível criar a credencial: %s`,"jc_Cannot decode license":`Não é possível decodificar a licença`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador`,'jc_Cannot display the custom component "%s"':`Não é possível exibir o componente personalizado "%s"`,"jc_Cannot read licenses: %s":`Não é possível ler licenças: %s`,"jc_Cannot retrieve options, as instance is offline":`Não é possível recuperar opções, pois a instância está off-line`,"jc_Cannot save configuration because of error in configuration":`Não foi possível salvar a configuração devido a um erro na configuração.`,"jc_Cannot upload":`Não é possível fazer upload`,"jc_Chained certificate":`certificado encadeado`,jc_Checked:`Verificado`,"jc_Click to see in full size":`Clique para ver em tamanho real.`,"jc_Click to show":`Clique para mostrar`,"jc_Clone current row":`Clonar linha atual`,jc_Close:`Perto`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`"%s" copiado`,"jc_Copy content":`Copiar conteúdo`,jc_Create:`Crio`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`O componente personalizado "%s" não foi iniciado.`,"jc_Define schedule":`Definir cronograma`,jc_Delete:`Excluir`,"jc_Delete current row":`Excluir linha atual`,"jc_Disable/Enable translation":`Desativar/Ativar tradução`,jc_Discard:`Descartar`,"jc_Do not use let's encrypt":`Não use vamos criptografar`,"jc_Docker is not available":`O Docker não está disponível`,"jc_Docker is not installed or not running":`O Docker não está instalado ou não está em execução`,"jc_Drop file here":`Solte o arquivo aqui`,"jc_Enter the code from that page here":`Digite o código dessa página aqui`,jc_Error:`Erro`,"jc_Expand/Collapse card":`Expandir/Recolher cartão`,"jc_Export configuration section":`Seção de configuração de exportação`,"jc_Export data to %s file":`Exportar dados para o arquivo %s`,"jc_Export setting to JSON file":`Exportar configurações para arquivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`O arquivo é muito grande. Max %sk permitido. Tente usar SVG.`,"jc_File will be deleted":`O arquivo será excluído.`,"jc_Filter and Data Actions":`Ações de filtro e dados`,"jc_Get %s access":`Obtenha acesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url`,"jc_Import and add configuration section":`Seção de importação e adição de configuração`,"jc_Import and replace configuration section":`Seção de configuração de importação e substituição`,"jc_Import data from %s file":`Importar dados do arquivo %s`,"jc_Import from %s":`Importar de %s`,"jc_Import settings from JSON file":`Importar configurações de um arquivo JSON`,"jc_Instance %s is alive":`O %s da instância está ativo`,"jc_Instance %s is not alive":`O %s da instância não está ativo`,"jc_Invalid JSON":`JSON inválido`,"jc_Invalid JSON file.":`Arquivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Esperava-se uma matriz.`,"jc_Invalid YAML":`YAML inválido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`É necessário gerar %s da API da GUI, mas este painel de administração já fornece a geração %s. Por favor, atualize o painel de administração.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Foi desenvolvido para geração de API GUI %s, mas este painel de administração fornece geração %s. Por favor, atualize o adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Provavelmente foi desenvolvido para uma versão administrativa mais antiga. Por favor, atualize o adaptador.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licença %s`,"jc_License agreement":`Contrato de licença`,"jc_License does not exist":`A licença não existe`,"jc_License expired on %s":`A licença expirou em %s`,'jc_License for other product "%s"':`Licença para outro produto "%s"`,"jc_License is for version %s, but required version is %s":`A licença é para a versão %s, mas a versão necessária é %s.`,"jc_License must be converted":`A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?`,"jc_Listen on all IPs":`Ouça em todos os IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Mover para baixo`,"jc_Move up":`Subir`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nenhuma licença encontrada no gerenciador de licenças`,"jc_No response from admin":`Nenhuma resposta do administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada não permitida "%s" na coluna "%s"`,"jc_OAuth Client ID":`ID do cliente OAuth`,"jc_OAuth Client secret":`Segredo do cliente OAuth`,jc_Ok:`Está bem`,"jc_Passwords are not equal!":`As senhas não são iguais!`,"jc_Place your files here or click here to open the browse dialog":`Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação`,"jc_Please allow popups in your browser for this page!":`Por favor, permita pop-ups no seu navegador para esta página!`,"jc_Please confirm":`Por favor confirme`,"jc_Please create license":`Crie uma licença`,"jc_Please enter the license":`Por favor, insira a licença`,"jc_Please fill in all required fields":`Por favor, preencha todos os campos obrigatórios.`,"jc_Port could be used by %s":`A porta pode ser usada por %s`,"jc_Port is already used by %s":`A porta já está sendo usada por %s`,"jc_Press ENTER Key to add new item":`Pressione a tecla ENTER para adicionar um novo item`,"jc_Private certificate":`certificado privado`,jc_Product:`produtos`,"jc_Public certificate":`certificado público`,"jc_Renew %s access":`Renovar acesso %s`,jc_Replace:`Substituir`,"jc_Request data by instance":`Solicitar dados por instância`,"jc_Request timed out":`Solicitação expirou`,jc_Result:`Resultado`,jc_Save:`Salve `,"jc_Save configuration?":`Salvar configuração?`,"jc_Serial number (UUID)":`Número de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`O número de série (UUID) "%s" na licença é para outro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Alguns dados não são armazenados. Descartar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado com sucesso. Token válido até %s e será renovado automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.`,"jc_Suitable license not found in license manager":`Licença adequada não encontrada no gerenciador de licenças`,"jc_System language":`Idioma do sistema`,"jc_Take browser position":`Tomar posição do navegador`,"jc_Take position from system settings":`Tomar posição a partir das configurações do sistema`,jc_Template:`Modelo`,"jc_Use all available let's encrypt certificates":`Use todos os certificados disponíveis vamos criptografar`,"jc_Use system settings for position":`Use as configurações do sistema para a posição`,"jc_Used system settings":`Configurações do sistema usadas`,jc_ValidTill:`Válida até`,jc_Version:`Versão`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sim`,"jc_You can filter entries by entering here some text":`Você pode filtrar as entradas digitando aqui algum texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Falha ao abrir o arquivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Falha ao analisar o arquivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`Nenhum`,jc_repeat:`repetir`,jc_true:`verdadeiro`,"jc_via internet":`via internet`,sch_all:`tudo`},nl:{"jc_A credential with this name already exists":`Er bestaat al een legitimatiebewijs met deze naam.`,"jc_A unique name is required":`Een unieke naam is vereist.`,"jc_Accept license":`Accepteer licentie`,jc_Actions:`Acties`,"jc_Add credential":`Voeg inloggegevens toe`,"jc_Add row":`Voeg een rij toe`,"jc_All items are filtered out":`Alle items zijn uitgefilterd`,jc_Append:`toevoegen`,"jc_Append %s entries or replace existing?":`%s ingangen toevoegen of bestaande vervangen?`,"jc_Append or replace?":`Toevoegen of vervangen?`,"jc_Are you sure?":`Weet je het zeker?`,jc_Cancel:`Annuleer`,"jc_Cannot add items with set filter":`Kan geen items toevoegen met ingestelde filter`,"jc_Cannot create credential: %s":`Kan geen inloggegevens aanmaken: %s`,"jc_Cannot decode license":`Kan licentie niet decoderen`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser`,'jc_Cannot display the custom component "%s"':`Kan het aangepaste component "%s" niet weergeven.`,"jc_Cannot read licenses: %s":`Kan licenties niet lezen: %s`,"jc_Cannot retrieve options, as instance is offline":`Kan opties niet ophalen, omdat instantie offline is`,"jc_Cannot save configuration because of error in configuration":`Configuratie kan niet worden opgeslagen vanwege een configuratiefout.`,"jc_Cannot upload":`Kan niet uploaden`,"jc_Chained certificate":`Geketend certificaat`,jc_Checked:`Gecontroleerd`,"jc_Click to see in full size":`Klik om de afbeelding op volledige grootte te bekijken.`,"jc_Click to show":`Klik om te tonen`,"jc_Clone current row":`Kloon de huidige rij`,jc_Close:`Dichtbij`,jc_Commercial:`Reclame`,jc_Copied:`Gekopieerd`,"jc_Copied %s":`"%s" gekopieerd`,"jc_Copy content":`Inhoud kopiëren`,jc_Create:`Creëer`,"jc_Credential type":`Referentietype`,'jc_Custom component "%s" was not started':`Aangepaste component "%s" is niet gestart.`,"jc_Define schedule":`Definieer schema`,jc_Delete:`Verwijderen`,"jc_Delete current row":`Huidige rij verwijderen`,"jc_Disable/Enable translation":`Vertaling uitschakelen/inschakelen`,jc_Discard:`Weggooien`,"jc_Do not use let's encrypt":`Gebruik geen let's encrypt`,"jc_Docker is not available":`Docker is niet beschikbaar`,"jc_Docker is not installed or not running":`Docker is niet geïnstalleerd of draait niet`,"jc_Drop file here":`Zet het bestand hier neer`,"jc_Enter the code from that page here":`Voer hier de code van die pagina in`,jc_Error:`Fout`,"jc_Expand/Collapse card":`Kaart uit-/inklappen`,"jc_Export configuration section":`Sectie Exportconfiguratie`,"jc_Export data to %s file":`Exporteer gegevens naar %s bestand`,"jc_Export setting to JSON file":`Exporteer instellingen naar een JSON-bestand.`,"jc_Fallback custom certificates":`Fallback aangepaste certificaten`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.`,"jc_File will be deleted":`Het bestand wordt verwijderd.`,"jc_Filter and Data Actions":`Filter- en gegevensacties`,"jc_Get %s access":`Krijg %s toegang`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken`,"jc_Import and add configuration section":`Configuratiesectie importeren en toevoegen`,"jc_Import and replace configuration section":`Configuratiesectie importeren en vervangen`,"jc_Import data from %s file":`Importeer gegevens uit %s bestand`,"jc_Import from %s":`Importeren uit %s`,"jc_Import settings from JSON file":`Instellingen importeren vanuit een JSON-bestand`,"jc_Instance %s is alive":`Instantie %s leeft`,"jc_Instance %s is not alive":`Instantie %s is niet actief`,"jc_Invalid JSON":`Ongeldige JSON`,"jc_Invalid JSON file.":`Ongeldig JSON-bestand.`,"jc_Invalid JSON format. Expected an array.":`Ongeldige JSON-indeling. Er werd een array verwacht.`,"jc_Invalid YAML":`Ongeldige YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Het vereist GUI API-generatie %s, maar deze beheerder levert generatie %s. Graag de beheerder bijwerken.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Het is gebouwd voor GUI API-generatie %s, maar deze beheerder levert generatie %s. Update de adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Het is waarschijnlijk ontwikkeld voor een oudere beheerdersversie. Update de adapter.`,"jc_JSON editor":`JSON-editor`,jc_Latitude:`Breedtegraad`,"jc_License %s":`Licentie %s`,"jc_License agreement":`Licentieovereenkomst`,"jc_License does not exist":`Licentie bestaat niet`,"jc_License expired on %s":`Licentie verlopen op %s`,'jc_License for other product "%s"':`Licentie voor ander product "%s"`,"jc_License is for version %s, but required version is %s":`De licentie is voor versie %s, maar de vereiste versie is %s.`,"jc_License must be converted":`Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?`,"jc_Listen on all IPs":`Luister op alle IP's`,jc_Longitude:`Lengtegraad`,"jc_Move down":`Naar beneden verplaatsen`,"jc_Move up":`Omhoog gaan`,jc_Name:`Naam`,"jc_No one license found in license manager":`Geen enkele licentie gevonden in licentiebeheer`,"jc_No response from admin":`Geen reactie van de beheerder`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niet-toegestane dubbele invoer "%s" in kolom "%s"`,"jc_OAuth Client ID":`OAuth-client-ID`,"jc_OAuth Client secret":`OAuth-clientgeheim`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Wachtwoorden zijn niet gelijk!`,"jc_Place your files here or click here to open the browse dialog":`Plaats uw bestanden hier of klik hier om het bladervenster te openen`,"jc_Please allow popups in your browser for this page!":`Sta pop-ups toe in uw browser voor deze pagina!`,"jc_Please confirm":`Bevestig alstublieft`,"jc_Please create license":`Maak een licentie aan`,"jc_Please enter the license":`Voer de licentie in`,"jc_Please fill in all required fields":`Vul alle verplichte velden in.`,"jc_Port could be used by %s":`Poort kan worden gebruikt door %s`,"jc_Port is already used by %s":`Poort wordt al gebruikt door %s`,"jc_Press ENTER Key to add new item":`Druk op de ENTER-toets om een nieuw item toe te voegen`,"jc_Private certificate":`Privé certificaat`,jc_Product:`Product`,"jc_Public certificate":`Openbaar certificaat`,"jc_Renew %s access":`%s toegang verlengen`,jc_Replace:`Vervangen`,"jc_Request data by instance":`Gegevens opvragen per instantie`,"jc_Request timed out":`Verzoek verlopen`,jc_Result:`Resultaat`,jc_Save:`Sparen`,"jc_Save configuration?":`Configuratie opslaan?`,"jc_Serial number (UUID)":`Serienummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serienummer (UUID) "%s" in licentie is voor ander apparaat.`,"jc_Show/hide filter input":`Filterinvoer weergeven/verbergen`,"jc_Some data are not stored. Discard?":`Sommige gegevens worden niet opgeslagen. Weggooien?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.`,"jc_Suitable license not found in license manager":`Geschikte licentie niet gevonden in licentiebeheer`,"jc_System language":`Systeemtaal`,"jc_Take browser position":`Positie innemen vanuit de browser`,"jc_Take position from system settings":`Neem positie over van systeeminstellingen`,jc_Template:`Sjabloon`,"jc_Use all available let's encrypt certificates":`Gebruik alle beschikbare Let's Encrypt-certificaten`,"jc_Use system settings for position":`Gebruik systeeminstellingen voor positie`,"jc_Used system settings":`Gebruikte systeeminstellingen`,jc_ValidTill:`Geldig tot`,jc_Version:`Versie`,"jc_YAML editor":`YAML-editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`U kunt items filteren door hier wat tekst in te voeren`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Het openen van het JSON-bestand is mislukt.`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Het parseren van het JSON-bestand is mislukt.`,jc___different__:`verschillend`,jc_false:`ONWAAR`,jc_locally:`plaatselijk`,jc_none:`geen`,jc_repeat:`herhalen`,jc_true:`WAAR`,"jc_via internet":`via internet`,sch_all:`allemaal`},fr:{"jc_A credential with this name already exists":`Un certificat portant ce nom existe déjà.`,"jc_A unique name is required":`Un nom unique est requis.`,"jc_Accept license":`Accepter la licence`,jc_Actions:`Actes`,"jc_Add credential":`Ajouter un identifiant`,"jc_Add row":`Ajouter une rangée`,"jc_All items are filtered out":`Tous les éléments sont filtrés`,jc_Append:`Ajouter`,"jc_Append %s entries or replace existing?":`Ajouter %s entrées ou remplacer l'existant\xA0?`,"jc_Append or replace?":`Ajouter ou remplacer\xA0?`,"jc_Are you sure?":`Êtes-vous sûr?`,jc_Cancel:`Annuler`,"jc_Cannot add items with set filter":`Impossible d'ajouter des éléments avec le filtre défini`,"jc_Cannot create credential: %s":`Impossible de créer les informations d'identification\xA0: %s`,"jc_Cannot decode license":`Impossible de décoder la licence`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossible de déterminer la position\xA0: les paramètres système sont vides et la détection GPS est désactivée dans le navigateur`,'jc_Cannot display the custom component "%s"':`Impossible d'afficher le composant personnalisé « %s »`,"jc_Cannot read licenses: %s":`Impossible de lire les licences\xA0: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossible de récupérer les options, car l'instance est hors ligne`,"jc_Cannot save configuration because of error in configuration":`Impossible d'enregistrer la configuration en raison d'une erreur de configuration.`,"jc_Cannot upload":`Impossible de télécharger`,"jc_Chained certificate":`Certificat chaîné`,jc_Checked:`Vérifié`,"jc_Click to see in full size":`Cliquez pour afficher en taille réelle`,"jc_Click to show":`Cliquez pour afficher`,"jc_Clone current row":`Cloner la ligne actuelle`,jc_Close:`Fermer`,jc_Commercial:`Commercial`,jc_Copied:`Copié`,"jc_Copied %s":`"%s" copié`,"jc_Copy content":`Copier le contenu`,jc_Create:`Créer`,"jc_Credential type":`Type de justificatif d'identité`,'jc_Custom component "%s" was not started':`Le composant personnalisé « %s » n'a pas été démarré.`,"jc_Define schedule":`Définir le calendrier`,jc_Delete:`Supprimer`,"jc_Delete current row":`Supprimer la ligne actuelle`,"jc_Disable/Enable translation":`Activer/Désactiver la traduction`,jc_Discard:`Jeter`,"jc_Do not use let's encrypt":`Ne pas utiliser let's encrypt`,"jc_Docker is not available":`Docker n'est pas disponible`,"jc_Docker is not installed or not running":`Docker n'est pas installé ou n'est pas en cours d'exécution`,"jc_Drop file here":`Déposer le fichier ici`,"jc_Enter the code from that page here":`Entrez le code de cette page ici`,jc_Error:`Erreur`,"jc_Expand/Collapse card":`Carte Développer/Réduire`,"jc_Export configuration section":`Exporter la section de configuration`,"jc_Export data to %s file":`Exporter les données vers le fichier %s`,"jc_Export setting to JSON file":`Paramètres d'exportation vers un fichier JSON`,"jc_Fallback custom certificates":`Certificats personnalisés de secours`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.`,"jc_File will be deleted":`Le fichier sera supprimé`,"jc_Filter and Data Actions":`Actions sur les filtres et les données`,"jc_Get %s access":`Obtenir l'accès %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL`,"jc_Import and add configuration section":`Importer et ajouter la section de configuration`,"jc_Import and replace configuration section":`Importer et remplacer la section de configuration`,"jc_Import data from %s file":`Importer des données à partir du fichier %s`,"jc_Import from %s":`Importer depuis %s`,"jc_Import settings from JSON file":`Importer les paramètres à partir d'un fichier JSON`,"jc_Instance %s is alive":`L'instance %s est active`,"jc_Instance %s is not alive":`L'instance %s n'est pas active`,"jc_Invalid JSON":`JSON invalide`,"jc_Invalid JSON file.":`Fichier JSON invalide.`,"jc_Invalid JSON format. Expected an array.":`Format JSON invalide. Tableau attendu.`,"jc_Invalid YAML":`YAML invalide`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Cela nécessite la génération de l'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'administrateur.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Il a été conçu pour la génération d'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'adaptateur.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Il a probablement été conçu pour une version d'administration plus ancienne. Veuillez mettre à jour l'adaptateur.`,"jc_JSON editor":`Éditeur JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licence %s`,"jc_License agreement":`Accord de licence`,"jc_License does not exist":`La licence n'existe pas`,"jc_License expired on %s":`Licence expirée le %s`,'jc_License for other product "%s"':`Licence pour un autre produit "%s"`,"jc_License is for version %s, but required version is %s":`La licence concerne la version %s, mais la version requise est %s`,"jc_License must be converted":`La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net\xA0?`,"jc_Listen on all IPs":`Écoutez sur toutes les adresses IP`,jc_Longitude:`Longitude`,"jc_Move down":`Descendre`,"jc_Move up":`Déplacer vers le haut`,jc_Name:`Nom`,"jc_No one license found in license manager":`Aucune licence trouvée dans le gestionnaire de licences`,"jc_No response from admin":`Aucune réponse de l'administrateur`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrée en double non autorisée « %s » dans la colonne « %s »`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Secret client OAuth`,jc_Ok:`D'accord`,"jc_Passwords are not equal!":`Les mots de passe ne sont pas égaux !`,"jc_Place your files here or click here to open the browse dialog":`Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation`,"jc_Please allow popups in your browser for this page!":`Veuillez autoriser les popups dans votre navigateur pour cette page\xA0!`,"jc_Please confirm":`Veuillez confirmer`,"jc_Please create license":`Veuillez créer une licence`,"jc_Please enter the license":`Veuillez entrer la licence`,"jc_Please fill in all required fields":`Veuillez remplir tous les champs obligatoires.`,"jc_Port could be used by %s":`Le port pourrait être utilisé par %s`,"jc_Port is already used by %s":`Le port est déjà utilisé par %s`,"jc_Press ENTER Key to add new item":`Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément`,"jc_Private certificate":`Certificat privé`,jc_Product:`Produit`,"jc_Public certificate":`Certificat public`,"jc_Renew %s access":`Renouveler l'accès %s`,jc_Replace:`Remplacer`,"jc_Request data by instance":`Demander des données par instance`,"jc_Request timed out":`La demande a expiré`,jc_Result:`Résultat`,jc_Save:`sauver`,"jc_Save configuration?":`Enregistrer la configuration\xA0?`,"jc_Serial number (UUID)":`Numéro de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.`,"jc_Show/hide filter input":`Afficher/masquer l'entrée de filtre`,"jc_Some data are not stored. Discard?":`Certaines données ne sont pas stockées. Jeter?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.`,"jc_Suitable license not found in license manager":`Licence appropriée introuvable dans le gestionnaire de licences`,"jc_System language":`Langue du système`,"jc_Take browser position":`Prendre position depuis le navigateur`,"jc_Take position from system settings":`Prendre position à partir des paramètres système`,jc_Template:`Modèle`,"jc_Use all available let's encrypt certificates":`Utilisez tous les certificats let's encrypt disponibles`,"jc_Use system settings for position":`Utiliser les paramètres système pour la position`,"jc_Used system settings":`Paramètres système utilisés`,jc_ValidTill:`Valable jusqu'au`,jc_Version:`Version`,"jc_YAML editor":`Éditeur YAML`,jc_Yes:`Oui`,"jc_You can filter entries by entering here some text":`Vous pouvez filtrer les entrées en saisissant ici du texte`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossible d'ouvrir le fichier JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Échec de l'analyse du fichier JSON`,jc___different__:`différent`,jc_false:`FAUX`,jc_locally:`localement`,jc_none:`rien`,jc_repeat:`répéter`,jc_true:`VRAI`,"jc_via internet":`par Internet`,sch_all:`tout`},it:{"jc_A credential with this name already exists":`Esiste già una credenziale con questo nome`,"jc_A unique name is required":`È richiesto un nome univoco`,"jc_Accept license":`Accetta licenza`,jc_Actions:`Azioni`,"jc_Add credential":`Aggiungi credenziali`,"jc_Add row":`Aggiungi riga`,"jc_All items are filtered out":`Tutti gli elementi vengono filtrati`,jc_Append:`Aggiungere`,"jc_Append %s entries or replace existing?":`Aggiungi %s voci o sostituisci quelle esistenti?`,"jc_Append or replace?":`Aggiungere o sostituire?`,"jc_Are you sure?":`Sei sicuro?`,jc_Cancel:`Annulla`,"jc_Cannot add items with set filter":`Impossibile aggiungere elementi con il filtro impostato`,"jc_Cannot create credential: %s":`Impossibile creare le credenziali: %s`,"jc_Cannot decode license":`Impossibile decodificare la licenza`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser`,'jc_Cannot display the custom component "%s"':`Impossibile visualizzare il componente personalizzato "%s"`,"jc_Cannot read licenses: %s":`Impossibile leggere le licenze: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossibile recuperare le opzioni, poiché l'istanza è offline`,"jc_Cannot save configuration because of error in configuration":`Impossibile salvare la configurazione a causa di un errore nella configurazione`,"jc_Cannot upload":`Impossibile caricare`,"jc_Chained certificate":`Certificato incatenato`,jc_Checked:`Controllato`,"jc_Click to see in full size":`Clicca per visualizzare l'immagine a dimensioni intere`,"jc_Click to show":`Clicca per mostrare`,"jc_Clone current row":`Clona riga corrente`,jc_Close:`Vicino`,jc_Commercial:`Commerciale`,jc_Copied:`Copiato`,"jc_Copied %s":`"%s" copiato`,"jc_Copy content":`Copia contenuto`,jc_Create:`Creare`,"jc_Credential type":`Tipo di credenziale`,'jc_Custom component "%s" was not started':`Il componente personalizzato "%s" non è stato avviato`,"jc_Define schedule":`Definisci programma`,jc_Delete:`Elimina`,"jc_Delete current row":`Elimina la riga corrente`,"jc_Disable/Enable translation":`Disabilita/Abilita la traduzione`,jc_Discard:`Scartare`,"jc_Do not use let's encrypt":`Non utilizzare crittografiamo`,"jc_Docker is not available":`Docker non è disponibile`,"jc_Docker is not installed or not running":`Docker non è installato o non è in esecuzione`,"jc_Drop file here":`Trascina il file qui`,"jc_Enter the code from that page here":`Inserisci qui il codice da quella pagina`,jc_Error:`Errore`,"jc_Expand/Collapse card":`Espandi/Comprimi scheda`,"jc_Export configuration section":`Sezione di configurazione dell'esportazione`,"jc_Export data to %s file":`Esporta i dati nel file %s`,"jc_Export setting to JSON file":`Esporta le impostazioni in un file JSON`,"jc_Fallback custom certificates":`Certificati personalizzati di fallback`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Il file è troppo grande. Max %sk consentito. Prova a usare SVG.`,"jc_File will be deleted":`Il file verrà eliminato`,"jc_Filter and Data Actions":`Azioni sui filtri e sui dati`,"jc_Get %s access":`Ottieni l'accesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL`,"jc_Import and add configuration section":`Importa e aggiungi la sezione di configurazione`,"jc_Import and replace configuration section":`Importa e sostituisci la sezione di configurazione`,"jc_Import data from %s file":`Importa i dati dal file %s`,"jc_Import from %s":`Importa da %s`,"jc_Import settings from JSON file":`Importa le impostazioni dal file JSON`,"jc_Instance %s is alive":`Il %s dell'istanza è vivo`,"jc_Instance %s is not alive":`Il TESTO dell'istanza non è vivo`,"jc_Invalid JSON":`JSON non valido`,"jc_Invalid JSON file.":`File JSON non valido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON non valido. È previsto un array.`,"jc_Invalid YAML":`YAML non valido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Richiede la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'amministratore.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`È stato creato per la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'adattatore.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probabilmente è stato creato per una versione di amministrazione precedente. Si prega di aggiornare l'adattatore.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitudine`,"jc_License %s":`Licenza %s`,"jc_License agreement":`Contratto di licenza`,"jc_License does not exist":`La licenza non esiste`,"jc_License expired on %s":`Licenza scaduta il %s`,'jc_License for other product "%s"':`Licenza per altro prodotto "%s"`,"jc_License is for version %s, but required version is %s":`La licenza è per la versione %s, ma la versione richiesta è %s`,"jc_License must be converted":`La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?`,"jc_Listen on all IPs":`Ascolta su tutti gli IP`,jc_Longitude:`Longitudine`,"jc_Move down":`Abbassati`,"jc_Move up":`Andare avanti`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nessuna licenza trovata nel gestore delle licenze`,"jc_No response from admin":`Nessuna risposta dall'amministratore`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Voce duplicata non consentita "%s" nella colonna "%s"`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Segreto del client OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Le password non sono uguali!`,"jc_Place your files here or click here to open the browse dialog":`Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia`,"jc_Please allow popups in your browser for this page!":`Si prega di abilitare i popup nel browser per questa pagina!`,"jc_Please confirm":`Si prega di confermare`,"jc_Please create license":`Si prega di creare la licenza`,"jc_Please enter the license":`Inserisci la licenza`,"jc_Please fill in all required fields":`Si prega di compilare tutti i campi obbligatori.`,"jc_Port could be used by %s":`La porta potrebbe essere utilizzata da %s`,"jc_Port is already used by %s":`La porta è già utilizzata da %s`,"jc_Press ENTER Key to add new item":`Premere il tasto INVIO per aggiungere un nuovo elemento`,"jc_Private certificate":`Certificato privato`,jc_Product:`Prodotto`,"jc_Public certificate":`Certificato pubblico`,"jc_Renew %s access":`Rinnova l'accesso %s`,jc_Replace:`Sostituire`,"jc_Request data by instance":`Richiedi dati per istanza`,"jc_Request timed out":`Tempo scaduto per la richiesta`,jc_Result:`Risultato`,jc_Save:`Salva`,"jc_Save configuration?":`Salvare la configurazione?`,"jc_Serial number (UUID)":`Numero di serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.`,"jc_Show/hide filter input":`Mostra/nascondi input filtro`,"jc_Some data are not stored. Discard?":`Alcuni dati non vengono memorizzati. Scartare?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.`,"jc_Suitable license not found in license manager":`Licenza adatta non trovata nel gestore delle licenze`,"jc_System language":`Linguaggio di sistema`,"jc_Take browser position":`Prendi posizione dal browser`,"jc_Take position from system settings":`Prendi posizione dalle impostazioni di sistema`,jc_Template:`Modello`,"jc_Use all available let's encrypt certificates":`Usa tutti i certificati Let's Encrypt disponibili`,"jc_Use system settings for position":`Usa le impostazioni di sistema per la posizione`,"jc_Used system settings":`Impostazioni di sistema utilizzate`,jc_ValidTill:`Valido fino a`,jc_Version:`Versione`,"jc_YAML editor":`Editor YAML`,jc_Yes:`SÌ`,"jc_You can filter entries by entering here some text":`Puoi filtrare le voci inserendo qui del testo`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossibile aprire il file JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Impossibile analizzare il file JSON`,jc___different__:`diverso`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`nessuna`,jc_repeat:`ripetere`,jc_true:`VERO`,"jc_via internet":`attraverso internet`,sch_all:`tutti`},es:{"jc_A credential with this name already exists":`Ya existe una credencial con ese nombre.`,"jc_A unique name is required":`Se requiere un nombre único.`,"jc_Accept license":`Aceptar licencia`,jc_Actions:`Comportamiento`,"jc_Add credential":`Agregar credencial`,"jc_Add row":`Añadir fila`,"jc_All items are filtered out":`Todos los elementos se filtran`,jc_Append:`Adjuntar`,"jc_Append %s entries or replace existing?":`¿Agregar %s entradas o reemplazar las existentes?`,"jc_Append or replace?":`¿Agregar o reemplazar?`,"jc_Are you sure?":`¿Estás seguro?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`No se pueden agregar elementos con el filtro establecido`,"jc_Cannot create credential: %s":`No se puede crear la credencial: %s`,"jc_Cannot decode license":`No se puede decodificar la licencia`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador`,'jc_Cannot display the custom component "%s"':`No se puede mostrar el componente personalizado "%s"`,"jc_Cannot read licenses: %s":`No se pueden leer licencias: %s`,"jc_Cannot retrieve options, as instance is offline":`No se pueden recuperar las opciones, ya que la instancia está fuera de línea`,"jc_Cannot save configuration because of error in configuration":`No se puede guardar la configuración debido a un error en la configuración.`,"jc_Cannot upload":`no se puede cargar`,"jc_Chained certificate":`certificado encadenado`,jc_Checked:`Comprobado`,"jc_Click to see in full size":`Haz clic para ver en tamaño completo.`,"jc_Click to show":`Haga clic para mostrar`,"jc_Clone current row":`Clonar fila actual`,jc_Close:`Cerca`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`Copiado "%s"`,"jc_Copy content":`Copiar contenido`,jc_Create:`Crear`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`El componente personalizado "%s" no se inició.`,"jc_Define schedule":`Definir horario`,jc_Delete:`Eliminar`,"jc_Delete current row":`Eliminar fila actual`,"jc_Disable/Enable translation":`Desactivar/Activar traducción`,jc_Discard:`Desechar`,"jc_Do not use let's encrypt":`No use vamos a cifrar`,"jc_Docker is not available":`Docker no está disponible`,"jc_Docker is not installed or not running":`Docker no está instalado o no se está ejecutando`,"jc_Drop file here":`Suelta el archivo aquí`,"jc_Enter the code from that page here":`Introduzca el código de esa página aquí`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expandir/Contraer tarjeta`,"jc_Export configuration section":`Exportar sección de configuración`,"jc_Export data to %s file":`Exportar datos al archivo %s`,"jc_Export setting to JSON file":`Exportar configuración a un archivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.`,"jc_File will be deleted":`El archivo será eliminado`,"jc_Filter and Data Actions":`Acciones de filtrado y datos`,"jc_Get %s access":`Obtener %s acceso`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL`,"jc_Import and add configuration section":`Importar y agregar sección de configuración`,"jc_Import and replace configuration section":`Importar y reemplazar sección de configuración`,"jc_Import data from %s file":`Importar datos del archivo %s`,"jc_Import from %s":`Importar desde %s`,"jc_Import settings from JSON file":`Importar configuración desde un archivo JSON`,"jc_Instance %s is alive":`Instancia %s está vivo`,"jc_Instance %s is not alive":`Instancia %s no está vivo`,"jc_Invalid JSON":`JSON no válido`,"jc_Invalid JSON file.":`Archivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Se esperaba un array.`,"jc_Invalid YAML":`YAML no válido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Requiere la generación de la API de la GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el administrador.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Fue diseñado para la generación de API GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probablemente se diseñó para una versión de administración anterior. Por favor, actualice el adaptador.`,"jc_JSON editor":`editor JSON`,jc_Latitude:`Latitud`,"jc_License %s":`Licencia %s`,"jc_License agreement":`Acuerdo de licencia`,"jc_License does not exist":`La licencia no existe`,"jc_License expired on %s":`La licencia venció el %s`,'jc_License for other product "%s"':`Licencia para otro producto "%s"`,"jc_License is for version %s, but required version is %s":`La licencia es para la versión %s, pero la versión requerida es %s.`,"jc_License must be converted":`La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?`,"jc_Listen on all IPs":`Escuche en todas las IP`,jc_Longitude:`Longitud`,"jc_Move down":`Mover hacia abajo`,"jc_Move up":`Ascender`,jc_Name:`Nombre`,"jc_No one license found in license manager":`No se encontró ninguna licencia en el administrador de licencias`,"jc_No response from admin":`No hay respuesta del administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada no permitida "%s" en la columna "%s"`,"jc_OAuth Client ID":`ID de cliente OAuth`,"jc_OAuth Client secret":`Secreto de cliente OAuth`,jc_Ok:`Okay`,"jc_Passwords are not equal!":`¡Las contraseñas no son iguales!`,"jc_Place your files here or click here to open the browse dialog":`Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración`,"jc_Please allow popups in your browser for this page!":`¡Permita ventanas emergentes en su navegador para esta página!`,"jc_Please confirm":`Por favor confirmar`,"jc_Please create license":`Por favor cree una licencia`,"jc_Please enter the license":`Por favor ingrese la licencia`,"jc_Please fill in all required fields":`Por favor, rellene todos los campos obligatorios.`,"jc_Port could be used by %s":`El puerto podría ser utilizado por %s`,"jc_Port is already used by %s":`El puerto ya está en uso por %s`,"jc_Press ENTER Key to add new item":`Presione la tecla ENTER para agregar un nuevo elemento`,"jc_Private certificate":`certificado privado`,jc_Product:`Producto`,"jc_Public certificate":`Certificado público`,"jc_Renew %s access":`Renovar el acceso a %s`,jc_Replace:`Reemplazar`,"jc_Request data by instance":`Solicitar datos por instancia`,"jc_Request timed out":`Tiempo de espera agotado`,jc_Result:`Resultado`,jc_Save:`Salvar`,"jc_Save configuration?":`¿Guardar configuración?`,"jc_Serial number (UUID)":`Número de serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`El número de serie (UUID) "%s" en la licencia es para otro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Algunos datos no se almacenan. ¿Desechar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.`,"jc_Suitable license not found in license manager":`Licencia adecuada no encontrada en el administrador de licencias`,"jc_System language":`Lenguaje del sistema`,"jc_Take browser position":`Tomar posición desde el navegador`,"jc_Take position from system settings":`Tomar posición desde la configuración del sistema`,jc_Template:`Plantilla`,"jc_Use all available let's encrypt certificates":`Utilice todos los certificados let's encrypt disponibles`,"jc_Use system settings for position":`Usar la configuración del sistema para la posición`,"jc_Used system settings":`Configuraciones del sistema usadas`,jc_ValidTill:`Válida hasta`,jc_Version:`Versión`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sí`,"jc_You can filter entries by entering here some text":`Puede filtrar las entradas ingresando aquí algún texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Error al abrir el archivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Error al analizar el archivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`en la zona`,jc_none:`ninguno`,jc_repeat:`repetir`,jc_true:`VERDADERO`,"jc_via internet":`vía Internet`,sch_all:`todas`},pl:{"jc_A credential with this name already exists":`Poświadczenie o tej nazwie już istnieje`,"jc_A unique name is required":`Wymagana jest unikalna nazwa`,"jc_Accept license":`Zaakceptuj licencję`,jc_Actions:`Akcje`,"jc_Add credential":`Dodaj poświadczenie`,"jc_Add row":`Dodaj wiersz`,"jc_All items are filtered out":`Wszystkie pozycje są odfiltrowane`,jc_Append:`Dodać`,"jc_Append %s entries or replace existing?":`Dołączyć wpisy %s czy zastąpić istniejące?`,"jc_Append or replace?":`Dołączyć czy zastąpić?`,"jc_Are you sure?":`Jesteś pewny?`,jc_Cancel:`Anuluj`,"jc_Cannot add items with set filter":`Nie można dodać elementów z ustawionym filtrem`,"jc_Cannot create credential: %s":`Nie można utworzyć poświadczeń: %s`,"jc_Cannot decode license":`Nie można zdekodować licencji`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce`,'jc_Cannot display the custom component "%s"':`Nie można wyświetlić niestandardowego komponentu „%s”`,"jc_Cannot read licenses: %s":`Nie można odczytać licencji: %s`,"jc_Cannot retrieve options, as instance is offline":`Nie można pobrać opcji, ponieważ instancja jest w trybie offline`,"jc_Cannot save configuration because of error in configuration":`Nie można zapisać konfiguracji z powodu błędu w konfiguracji`,"jc_Cannot upload":`Nie można przesłać`,"jc_Chained certificate":`Certyfikat łańcuchowy`,jc_Checked:`Sprawdzony`,"jc_Click to see in full size":`Kliknij, aby zobaczyć w pełnym rozmiarze`,"jc_Click to show":`Kliknij, aby pokazać`,"jc_Clone current row":`Sklonuj bieżący wiersz`,jc_Close:`Blisko`,jc_Commercial:`Handlowy`,jc_Copied:`Skopiowano`,"jc_Copied %s":`Skopiowano "%s"`,"jc_Copy content":`Kopiuj zawartość`,jc_Create:`Stwórz`,"jc_Credential type":`Typ poświadczenia`,'jc_Custom component "%s" was not started':`Komponent niestandardowy „%s” nie został uruchomiony`,"jc_Define schedule":`Zdefiniuj harmonogram`,jc_Delete:`Usunąć`,"jc_Delete current row":`Usuń bieżący wiersz`,"jc_Disable/Enable translation":`Wyłącz/Włącz tłumaczenie`,jc_Discard:`Wyrzucać`,"jc_Do not use let's encrypt":`Nie używaj zaszyfrujmy`,"jc_Docker is not available":`Docker nie jest dostępny`,"jc_Docker is not installed or not running":`Docker nie jest zainstalowany lub nie działa`,"jc_Drop file here":`Upuść plik tutaj`,"jc_Enter the code from that page here":`Wpisz kod z tej strony tutaj`,jc_Error:`Błąd`,"jc_Expand/Collapse card":`Rozwiń/Zwiń kartę`,"jc_Export configuration section":`Sekcja konfiguracji eksportu`,"jc_Export data to %s file":`Eksportuj dane do pliku %s`,"jc_Export setting to JSON file":`Eksportuj ustawienia do pliku JSON`,"jc_Fallback custom certificates":`Niestandardowe certyfikaty zastępcze`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.`,"jc_File will be deleted":`Plik zostanie usunięty`,"jc_Filter and Data Actions":`Akcje filtrów i danych`,"jc_Get %s access":`Uzyskaj dostęp %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL`,"jc_Import and add configuration section":`Importuj i dodaj sekcję konfiguracji`,"jc_Import and replace configuration section":`Importuj i zastąp sekcję konfiguracji`,"jc_Import data from %s file":`Importuj dane z pliku %s`,"jc_Import from %s":`Importuj z %s`,"jc_Import settings from JSON file":`Importuj ustawienia z pliku JSON`,"jc_Instance %s is alive":`Instancja %s jest aktywna`,"jc_Instance %s is not alive":`Instancja TEKST nie jest aktywna`,"jc_Invalid JSON":`Nieprawidłowy JSON`,"jc_Invalid JSON file.":`Nieprawidłowy plik JSON.`,"jc_Invalid JSON format. Expected an array.":`Nieprawidłowy format JSON. Oczekiwano tablicy.`,"jc_Invalid YAML":`Nieprawidłowy plik YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Wymaga generacji interfejsu API GUI %s, ale ten administrator zapewnia generację %s. Zaktualizuj administratora.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Został stworzony do generowania interfejsu API GUI %s, ale ten administrator zapewnia generowanie %s. Proszę zaktualizować adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Prawdopodobnie został stworzony dla starszej wersji administratora. Proszę zaktualizować adapter.`,"jc_JSON editor":`Edytor JSON`,jc_Latitude:`Szerokość`,"jc_License %s":`Licencja %s`,"jc_License agreement":`Umowa licencyjna`,"jc_License does not exist":`Licencja nie istnieje`,"jc_License expired on %s":`Licencja wygasła w dniu %s`,'jc_License for other product "%s"':`Licencja na inny produkt „%s”`,"jc_License is for version %s, but required version is %s":`Licencja jest przeznaczona dla wersji %s, ale wymagana jest wersja %s`,"jc_License must be converted":`Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?`,"jc_Listen on all IPs":`Słuchaj na wszystkich adresach IP`,jc_Longitude:`Długość geograficzna`,"jc_Move down":`Padnij`,"jc_Move up":`Podnieść`,jc_Name:`Nazwa`,"jc_No one license found in license manager":`Nie znaleziono licencji w menedżerze licencji`,"jc_No response from admin":`Brak odpowiedzi od administratora`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niedozwolony duplikat wpisu „%s” w kolumnie „%s”`,"jc_OAuth Client ID":`Identyfikator klienta OAuth`,"jc_OAuth Client secret":`Tajny klucz klienta OAuth`,jc_Ok:`Dobrze`,"jc_Passwords are not equal!":`Hasła nie są równe!`,"jc_Place your files here or click here to open the browse dialog":`Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania`,"jc_Please allow popups in your browser for this page!":`Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!`,"jc_Please confirm":`Proszę potwierdzić`,"jc_Please create license":`Utwórz licencję`,"jc_Please enter the license":`Proszę wprowadzić licencję`,"jc_Please fill in all required fields":`Proszę wypełnić wszystkie wymagane pola`,"jc_Port could be used by %s":`Port może być używany przez %s`,"jc_Port is already used by %s":`Port jest już używany przez %s`,"jc_Press ENTER Key to add new item":`Naciśnij klawisz ENTER, aby dodać nowy element`,"jc_Private certificate":`Prywatny certyfikat`,jc_Product:`Produkt`,"jc_Public certificate":`Certyfikat publiczny`,"jc_Renew %s access":`Odnów dostęp %s`,jc_Replace:`Zastępować`,"jc_Request data by instance":`Żądanie danych według instancji`,"jc_Request timed out":`Upłynął limit czasu żądania`,jc_Result:`Wynik`,jc_Save:`Zapisać`,"jc_Save configuration?":`Zapisać konfigurację?`,"jc_Serial number (UUID)":`Numer seryjny (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.`,"jc_Show/hide filter input":`Pokaż/ukryj wejście filtra`,"jc_Some data are not stored. Discard?":`Niektóre dane nie są przechowywane. Wyrzucać?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.`,"jc_Suitable license not found in license manager":`Nie znaleziono odpowiedniej licencji w menedżerze licencji`,"jc_System language":`Język systemu`,"jc_Take browser position":`Zajmij pozycję z przeglądarki`,"jc_Take position from system settings":`Zajmij pozycję z ustawień systemowych`,jc_Template:`Szablon`,"jc_Use all available let's encrypt certificates":`Użyj wszystkich dostępnych certyfikatów Let's Encrypt`,"jc_Use system settings for position":`Użyj ustawień systemowych dla pozycji`,"jc_Used system settings":`Używane ustawienia systemowe`,jc_ValidTill:`Obowiązuje do`,jc_Version:`Wersja`,"jc_YAML editor":`Edytor YAML`,jc_Yes:`Tak`,"jc_You can filter entries by entering here some text":`Możesz filtrować wpisy, wpisując tutaj jakiś tekst`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Nie udało się otworzyć pliku JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Nie udało się przeanalizować pliku JSON`,jc___different__:`różne`,jc_false:`FAŁSZ`,jc_locally:`lokalnie`,jc_none:`Żaden`,jc_repeat:`powtarzać`,jc_true:`PRAWDA`,"jc_via internet":`przez internet`,sch_all:`wszystko`},uk:{"jc_A credential with this name already exists":`Облікові дані з таким ім'ям вже існують`,"jc_A unique name is required":`Потрібне унікальне ім'я`,"jc_Accept license":`Прийняти ліцензію`,jc_Actions:`Дії`,"jc_Add credential":`Додати облікові дані`,"jc_Add row":`Додати рядок`,"jc_All items are filtered out":`Усі елементи відфільтровано`,jc_Append:`Додайте`,"jc_Append %s entries or replace existing?":`Додати %s записів чи замінити наявні?`,"jc_Append or replace?":`Додати чи замінити?`,"jc_Are you sure?":`Ти впевнений?`,jc_Cancel:`Скасувати`,"jc_Cannot add items with set filter":`Неможливо додати елементи зі встановленим фільтром`,"jc_Cannot create credential: %s":`Не вдається створити облікові дані: %s`,"jc_Cannot decode license":`Неможливо розшифрувати ліцензію`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері`,'jc_Cannot display the custom component "%s"':`Не вдається відобразити користувацький компонент "%s"`,"jc_Cannot read licenses: %s":`Неможливо прочитати ліцензії: %s`,"jc_Cannot retrieve options, as instance is offline":`Неможливо отримати параметри, оскільки екземпляр офлайн`,"jc_Cannot save configuration because of error in configuration":`Не вдалося зберегти конфігурацію через помилку в конфігурації`,"jc_Cannot upload":`Неможливо завантажити`,"jc_Chained certificate":`Прикутий сертифікат`,jc_Checked:`Перевірено`,"jc_Click to see in full size":`Натисніть, щоб побачити в повному розмірі`,"jc_Click to show":`Натисніть, щоб показати`,"jc_Clone current row":`Клонувати поточний рядок`,jc_Close:`Закрити`,jc_Commercial:`Комерційний`,jc_Copied:`Скопійовано`,"jc_Copied %s":`Скопійовано "%s"`,"jc_Copy content":`Скопіюйте вміст`,jc_Create:`Створити`,"jc_Credential type":`Тип облікових даних`,'jc_Custom component "%s" was not started':`Користувацький компонент "%s" не запущено`,"jc_Define schedule":`Визначити розклад`,jc_Delete:`Видалити`,"jc_Delete current row":`Видалити поточний рядок`,"jc_Disable/Enable translation":`Вимкнути/Увімкнути переклад`,jc_Discard:`Відкинути`,"jc_Do not use let's encrypt":`Не використовуйте let's encrypt`,"jc_Docker is not available":`Докер недоступний`,"jc_Docker is not installed or not running":`Docker не встановлено або не працює`,"jc_Drop file here":`Перетягніть файл сюди`,"jc_Enter the code from that page here":`Введіть тут код з цієї сторінки`,jc_Error:`Помилка`,"jc_Expand/Collapse card":`Розгорнути/Згорнути картку`,"jc_Export configuration section":`Розділ конфігурації експорту`,"jc_Export data to %s file":`Експортувати дані у файл %s`,"jc_Export setting to JSON file":`Експорт налаштувань у файл JSON`,"jc_Fallback custom certificates":`Запасні спеціальні сертифікати`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.`,"jc_File will be deleted":`Файл буде видалено`,"jc_Filter and Data Actions":`Фільтр і дії з даними`,"jc_Get %s access":`Отримайте доступ %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням`,"jc_Import and add configuration section":`Розділ імпорту та додавання конфігурації`,"jc_Import and replace configuration section":`Розділ імпорту та заміни конфігурації`,"jc_Import data from %s file":`Імпортувати дані з файлу %s`,"jc_Import from %s":`Імпортувати з %s`,"jc_Import settings from JSON file":`Імпорт налаштувань з JSON-файлу`,"jc_Instance %s is alive":`Примірник %s живий`,"jc_Instance %s is not alive":`Примірник %s не живий`,"jc_Invalid JSON":`Недійсний JSON`,"jc_Invalid JSON file.":`Недійсний JSON-файл.`,"jc_Invalid JSON format. Expected an array.":`Недійсний формат JSON. Очікується масив.`,"jc_Invalid YAML":`Недійсний YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Потрібна генерація API графічного інтерфейсу %s, але цей адміністратор надає генерацію %s. Будь ласка, оновіть адміністраторську версію.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Його було створено для покоління GUI API %s, але цей адміністратор надає покоління %s. Будь ласка, оновіть адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Ймовірно, його було створено для старішої версії адміністратора. Будь ласка, оновіть адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Ліцензія %s`,"jc_License agreement":`Ліцензійна угода`,"jc_License does not exist":`Ліцензії не існує`,"jc_License expired on %s":`Термін дії ліцензії закінчився %s`,'jc_License for other product "%s"':`Ліцензія на інший продукт "%s"`,"jc_License is for version %s, but required version is %s":`Ліцензія для версії %s, але потрібна версія %s`,"jc_License must be converted":`Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?`,"jc_Listen on all IPs":`Прослуховування на всіх IP`,jc_Longitude:`Довгота`,"jc_Move down":`Рухатися вниз`,"jc_Move up":`Рухатися вгору`,jc_Name:`Ім'я`,"jc_No one license found in license manager":`У менеджері ліцензій не знайдено жодної ліцензії`,"jc_No response from admin":`Немає відповіді від адміністратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недозволений дублікат запису "%s" у стовпці "%s"`,"jc_OAuth Client ID":`Ідентифікатор клієнта OAuth`,"jc_OAuth Client secret":`Секрет клієнта OAuth`,jc_Ok:`В порядку`,"jc_Passwords are not equal!":`Паролі не бувають рівними!`,"jc_Place your files here or click here to open the browse dialog":`Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду`,"jc_Please allow popups in your browser for this page!":`Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!`,"jc_Please confirm":`Будь-ласка підтвердіть`,"jc_Please create license":`Будь ласка, створіть ліцензію`,"jc_Please enter the license":`Будь ласка, введіть ліцензію`,"jc_Please fill in all required fields":`Будь ласка, заповніть усі обов'язкові поля`,"jc_Port could be used by %s":`Порт може використовуватися %s`,"jc_Port is already used by %s":`Порт уже використовується %s`,"jc_Press ENTER Key to add new item":`Натисніть клавішу ENTER, щоб додати новий елемент`,"jc_Private certificate":`Приватний сертифікат`,jc_Product:`Продукт`,"jc_Public certificate":`Публічний сертифікат`,"jc_Renew %s access":`Поновити доступ %s`,jc_Replace:`Замінити`,"jc_Request data by instance":`Запит даних за екземпляром`,"jc_Request timed out":`Час запиту вичерпано`,jc_Result:`Результат`,jc_Save:`зберегти`,"jc_Save configuration?":`Зберегти конфігурацію?`,"jc_Serial number (UUID)":`Серійний номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.`,"jc_Show/hide filter input":`Показати/сховати введення фільтра`,"jc_Some data are not stored. Discard?":`Деякі дані не зберігаються. Відкинути?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.`,"jc_Suitable license not found in license manager":`Відповідна ліцензія не знайдена в менеджері ліцензій`,"jc_System language":`Системна мова`,"jc_Take browser position":`Займіть позицію з браузера`,"jc_Take position from system settings":`Займіть позицію в налаштуваннях системи`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Використовуйте всі доступні сертифікати let's encrypt`,"jc_Use system settings for position":`Використовуйте системні налаштування для позиції`,"jc_Used system settings":`Використані системні налаштування`,jc_ValidTill:`Дійсний до`,jc_Version:`Версія`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Так`,"jc_You can filter entries by entering here some text":`Ви можете фільтрувати записи, ввівши тут певний текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не вдалося відкрити JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не вдалося проаналізувати JSON-файл`,jc___different__:`інший`,jc_false:`НЕПРАВДА`,jc_locally:`локально`,jc_none:`немає`,jc_repeat:`повторити`,jc_true:`ПРАВДА`,"jc_via internet":`через інтернет`,sch_all:`все`},"zh-cn":{"jc_A credential with this name already exists":`已存在同名凭证`,"jc_A unique name is required":`需要一个唯一的名称。`,"jc_Accept license":`接受许可`,jc_Actions:`操作`,"jc_Add credential":`添加凭据`,"jc_Add row":`添加行`,"jc_All items are filtered out":`所有项目都被过滤掉`,jc_Append:`附加`,"jc_Append %s entries or replace existing?":`追加 %s 条目还是替换现有条目?`,"jc_Append or replace?":`追加还是替换?`,"jc_Are you sure?":`你确定吗?`,jc_Cancel:`取消`,"jc_Cannot add items with set filter":`无法使用设置过滤器添加项目`,"jc_Cannot create credential: %s":`无法创建凭证:%s`,"jc_Cannot decode license":`无法解码许可证`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测`,'jc_Cannot display the custom component "%s"':`无法显示自定义组件“%s”`,"jc_Cannot read licenses: %s":`无法读取许可证:%s`,"jc_Cannot retrieve options, as instance is offline":`无法检索选项,因为实例处于脱机状态`,"jc_Cannot save configuration because of error in configuration":`由于配置错误,无法保存配置。`,"jc_Cannot upload":`无法上传`,"jc_Chained certificate":`链式证书`,jc_Checked:`勾选`,"jc_Click to see in full size":`点击查看完整尺寸`,"jc_Click to show":`点击显示`,"jc_Clone current row":`克隆当前行`,jc_Close:`关`,jc_Commercial:`商业的`,jc_Copied:`复制的`,"jc_Copied %s":`复制的"%s"`,"jc_Copy content":`复制内容`,jc_Create:`创建`,"jc_Credential type":`凭证类型`,'jc_Custom component "%s" was not started':`自定义组件“%s”未启动`,"jc_Define schedule":`定义时间表`,jc_Delete:`删除`,"jc_Delete current row":`删除当前行`,"jc_Disable/Enable translation":`禁用/启用翻译`,jc_Discard:`丢弃`,"jc_Do not use let's encrypt":`不要使用让我们加密`,"jc_Docker is not available":`Docker 不可用`,"jc_Docker is not installed or not running":`Docker 未安装或未运行`,"jc_Drop file here":`将档案放在这里`,"jc_Enter the code from that page here":`在此处输入该页面的代码`,jc_Error:`错误`,"jc_Expand/Collapse card":`展开/折叠卡`,"jc_Export configuration section":`导出配置部分`,"jc_Export data to %s file":`将数据导出到 %s 文件`,"jc_Export setting to JSON file":`将设置导出到 JSON 文件`,"jc_Fallback custom certificates":`后备自定义证书`,"jc_File is too big. Max %sk allowed. Try use SVG.":`文件太大。允许的最大字节%s数。尝试使用 SVG。`,"jc_File will be deleted":`文件将被删除`,"jc_Filter and Data Actions":`过滤和数据操作`,"jc_Get %s access":`获取 %s 访问权限`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用`,"jc_Import and add configuration section":`导入并添加配置部分`,"jc_Import and replace configuration section":`导入和替换配置部分`,"jc_Import data from %s file":`从 %s 文件导入数据`,"jc_Import from %s":`从 %s 导入`,"jc_Import settings from JSON file":`从 JSON 文件导入设置`,"jc_Instance %s is alive":`实例 %s 是活动的`,"jc_Instance %s is not alive":`实例 %s 不存在`,"jc_Invalid JSON":`JSON 无效`,"jc_Invalid JSON file.":`无效的JSON文件。`,"jc_Invalid JSON format. Expected an array.":`JSON格式无效。应为数组。`,"jc_Invalid YAML":`无效的 YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`它需要生成 GUI API,但此管理员提供的是生成功能。请更新管理员。`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`它原本是为 GUI API 生成 %s 而设计的,但此管理员提供了生成 %s 的功能。请更新适配器。`,"jc_It was probably built for an older admin version. Please update the adapter.":`这可能是为旧版管理后台构建的。请更新适配器。`,"jc_JSON editor":`JSON 编辑器`,jc_Latitude:`纬度`,"jc_License %s":`许可证 %s`,"jc_License agreement":`许可协议`,"jc_License does not exist":`许可证不存在`,"jc_License expired on %s":`许可证已于 %s 过期`,'jc_License for other product "%s"':`其他产品“%s”的许可证`,"jc_License is for version %s, but required version is %s":`许可证适用于版本 %s,但所需版本为 %s。`,"jc_License must be converted":`许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?`,"jc_Listen on all IPs":`监听所有IP`,jc_Longitude:`经度`,"jc_Move down":`下移`,"jc_Move up":`提升`,jc_Name:`姓名`,"jc_No one license found in license manager":`许可证管理器中未找到任何许可证`,"jc_No response from admin":`管理员没有回应`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`列“%s”中存在不允许的重复条目“%s”。`,"jc_OAuth Client ID":`OAuth客户端ID`,"jc_OAuth Client secret":`OAuth 客户端密钥`,jc_Ok:`好`,"jc_Passwords are not equal!":`密码不相等!`,"jc_Place your files here or click here to open the browse dialog":`将文件放在此处或单击此处打开浏览对话框`,"jc_Please allow popups in your browser for this page!":`请允许浏览器弹出此页面!`,"jc_Please confirm":`请确认`,"jc_Please create license":`请创建许可证`,"jc_Please enter the license":`请输入许可证`,"jc_Please fill in all required fields":`请填写所有必填字段`,"jc_Port could be used by %s":`%s 可以使用端口`,"jc_Port is already used by %s":`端口已被 %s 使用`,"jc_Press ENTER Key to add new item":`按 ENTER 键添加新项目`,"jc_Private certificate":`私有证书`,jc_Product:`产品`,"jc_Public certificate":`公共证书`,"jc_Renew %s access":`续订 %s 访问权限`,jc_Replace:`代替`,"jc_Request data by instance":`按实例请求数据`,"jc_Request timed out":`请求超时`,jc_Result:`结果`,jc_Save:`保存`,"jc_Save configuration?":`保存配置?`,"jc_Serial number (UUID)":`序列号 (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`许可证中的序列号 (UUID)“%s”用于其他设备。`,"jc_Show/hide filter input":`显示/隐藏过滤器输入`,"jc_Some data are not stored. Discard?":`部分数据未存储。丢弃?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`授权成功。令牌有效期至 %s,并将自动续订。`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。`,"jc_Suitable license not found in license manager":`在许可证管理器中找不到合适的许可证`,"jc_System language":`系统语言`,"jc_Take browser position":`从浏览器获取位置`,"jc_Take position from system settings":`从系统设置中获取位置`,jc_Template:`模板`,"jc_Use all available let's encrypt certificates":`使用所有可用的让我们加密证书`,"jc_Use system settings for position":`使用系统设置定位`,"jc_Used system settings":`使用的系统设置`,jc_ValidTill:`有效期至`,jc_Version:`版本`,"jc_YAML editor":`YAML 编辑器`,jc_Yes:`是的`,"jc_You can filter entries by entering here some text":`您可以通过在此处输入一些文本来过滤条目`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] 打开 JSON 文件失败`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] 解析 JSON 文件失败`,jc___different__:`不同的`,jc_false:`错误的`,jc_locally:`本地`,jc_none:`没有任何`,jc_repeat:`重复`,jc_true:`真的`,"jc_via internet":`通过互联网`,sch_all:`全选`}});var VO=3e3,HO={root:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`}},UO=class e extends s{constructor(e){super(e),K(this,`forceUpdateHandlers`,void 0),K(this,`errorTimeout`,null),K(this,`errorCached`,null),K(this,`oContext`,void 0),K(this,`cachedObjects`,{}),K(this,`onCommandRunning`,e=>this.setState({commandRunning:e})),K(this,`onAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})}),K(this,`onChange`,(e,t,n,r)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,!!r),n==null||n();else if(e&&this.props.onChange){let t={changed:JSON.stringify(e)!==this.state.originalData};this.setState(t,()=>{var i,a;(i=(a=this.props).onChange)==null||i.call(a,e,!!t.changed,!!r),n==null||n()})}else if(r){var i,a;(i=(a=this.props).onChange)==null||i.call(a,null,void 0,r)}}),K(this,`onError`,(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));let n=this.errorCached;n&&e&&(t?n[e]=t:delete n[e]),this.errorTimeout&&=(clearTimeout(this.errorTimeout),null),JSON.stringify(n)===JSON.stringify(this.state.errors)?this.errorCached=null:this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached||{}},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50)}),K(this,`getCachedObject`,async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]}),K(this,`changeLanguage`,()=>{this.forceUpdate()}),K(this,`forceAttrUpdate`,(e,t)=>{Array.isArray(e)?e.forEach(e=>this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)}),K(this,`registerOnForceUpdate`,(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]}),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,hostInfo:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(e=>console.error(`Cannot read data: ${e}`))}static getDerivedStateFromProps(e,t){return e.updateData===t.updateData?null:{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}}static async loadI18n(e,t,n){if(t===!0||t&&typeof t==`string`){let r=J.getLanguage(),i=typeof t==`string`?t:`i18n`,a=await e.fileExists(`${n}.admin`,`${i}/${r}.json`),o;if(a?o=`${i}/${r}.json`:(a=await e.fileExists(`${n}.admin`,`${i}/${r}/translations.json`),a?o=`${i}/${r}/translations.json`:r!==`en`&&(a=await e.fileExists(`${n}.admin`,`${i}/en.json`),a?o=`${i}/en.json`:(a=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),a&&(o=`${i}/en/translations.json`)))),o){let t=await e.readFile(`${n}.admin`,o),i;i=t.file===void 0?t:t.file;try{let e=JSON.parse(i);J.extendTranslations(e,r)}catch(e){return console.error(`Cannot parse language file "${n}.admin/${o}: ${e}`),``}return o}return console.warn(`Cannot find i18n for ${n} / ${o}`),``}return t&&typeof t==`object`&&J.extendTranslations(t),``}async readData(){let e;try{e=this.props.socket.getCompactSystemConfig?await this.props.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)||void 0;let t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:(e==null?void 0:e.common)||{},hostInfo:await this.readHostInfo(),alive:!!(t!=null&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(e){console.error(`Cannot read system config: ${e}`)}}async readHostInfo(){var t,n,r,i,a,o,s,c;let l=((t=this.props.common)==null?void 0:t.host)||((n=this.props.instanceObj)==null||(n=n.common)==null?void 0:n.host),u=l?await this.getCachedObject(`system.host.${l}`):null,d={id:l||``,os:(u==null||(r=u.native)==null||(r=r.os)==null?void 0:r.platform)||``,osType:(u==null||(i=u.native)==null||(i=i.os)==null?void 0:i.type)||``,arch:(u==null||(a=u.native)==null||(a=a.os)==null?void 0:a.arch)||``,release:(u==null||(o=u.native)==null||(o=o.os)==null?void 0:o.release)||``,nodeVersion:(u==null||(s=u.native)==null||(s=s.process)==null||(s=s.versions)==null?void 0:s.node)||``,controllerVersion:(u==null||(c=u.common)==null?void 0:c.installedVersion)||``};if(l&&e.usesDocker(this.props.schema))try{let e=await this.props.socket.getState(`system.host.${l}.alive`);if((e==null?void 0:e.val)!==!1){let e=await this.props.socket.getHostInfoShort(l,!1,VO);if(e){var f,p;d.docker=((f=e.dockerInformation)==null?void 0:f.isDocker)??e.Platform===`docker`,(p=e.dockerInformation)!=null&&p.isOfficial&&(d.dockerVersion=e.dockerInformation.officialVersion)}}}catch(e){console.warn(`Cannot read the docker information of ${l}: ${e}`)}return d}static usesDocker(e){let t=JSON.stringify(e);return t.includes(`"docker":`)||t.includes(`_host.docker`)}flatten(e,t){return t||={},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){let t=this.flatten(e);Object.keys(t).forEach(e=>{var n,r,i,a,o;if((n=t[e].confirm)!=null&&n.alsoDependsOn){var s;(s=t[e].confirm)==null||s.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].confirmDependsOn=t[n].confirmDependsOn||[];let r={...t[e],attr:e};r.confirm&&(r.confirm.cancel=`Undo`),t[n].confirmDependsOn.push(r)}})}if((r=t[e].onChange)!=null&&r.alsoDependsOn){var c;(c=t[e].onChange)==null||c.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].onChangeDependsOn=t[n].onChangeDependsOn||[];let r={...t[e],attr:e};t[n].onChangeDependsOn.push(r)}})}if((i=t[e].hidden)!=null&&i.alsoDependsOn){var l;(l=t[e].hidden)==null||l.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].hiddenDependsOn=t[n].hiddenDependsOn||[];let r={...t[e],attr:e};t[n].hiddenDependsOn.push(r)}})}if((a=t[e].label)!=null&&a.alsoDependsOn){var u;(u=t[e].label)==null||u.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].labelDependsOn=t[n].labelDependsOn||[];let r={...t[e],attr:e};t[n].labelDependsOn.push(r)}})}if((o=t[e].help)!=null&&o.alsoDependsOn){var d;(d=t[e].help)==null||d.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].helpDependsOn=t[n].helpDependsOn||[];let r={...t[e],attr:e};t[n].helpDependsOn.push(r)}})}})}updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject,hostInfo:this.state.hostInfo||void 0},e&&this.forceUpdate()}renderItem(e){return this.oContext?e.type===`tabs`?_.createElement(BO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type===`panel`||!e.type?_.createElement(RO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null):null}render(){return!this.state.systemConfig||!this.oContext?_.createElement(Ze,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),_.createElement(`div`,{style:{...!this.props.embedded||this.props.withoutSaveButtons?HO.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}};g();var WO={root:{width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`},scroll:{height:`calc(100% - 48px)`,overflowY:`auto`},exportImportButtons:{position:`absolute`,top:5,right:0,zIndex:3},button:{marginRight:`5px`},tooltip:{pointerEvents:`none`}};function GO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function KO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function qO(e,t){if(typeof t!=`string`)return t;if(!t.startsWith(`$/aes-192-cbc:`)||!/^[0-9a-f]{48}$/.test(e))return GO(e,t);let n=t.split(`:`,3),r=window.CryptoJS.enc.Hex.parse(e),i=window.CryptoJS.enc.Hex.parse(n[1]),a=window.CryptoJS.lib.CipherParams.create({ciphertext:window.CryptoJS.enc.Hex.parse(n[2])}),o=window.CryptoJS.AES.decrypt(a,r,{iv:i});return window.CryptoJS.enc.Utf8.stringify(o)}function JO(e,t,n){if(typeof t!=`string`)return t;if(!/^[0-9a-f]{48}$/.test(e))return KO(e,t);let r;r=n?window.CryptoJS.enc.Hex.parse(n):window.CryptoJS.lib.WordArray.random(16);let i=window.CryptoJS.enc.Hex.parse(e),a=window.CryptoJS.AES.encrypt(t,i,{iv:r}).ciphertext;return`$/aes-192-cbc:${window.CryptoJS.enc.Hex.stringify(r)}:${a}`}function YO(e,t){var n;return!t||!document.getElementById(t)?new Promise(n=>{let r=document.createElement(`script`);r.setAttribute(`id`,t),r.onload=n,r.src=e,document.getElementsByTagName(`head`)[0].appendChild(r)}):(n=document.getElementById(t))==null?void 0:n.onload}var XO=class extends It{constructor(e){super(e),K(this,`fileSubscribed`,[]),K(this,`fileLangSubscribed`,``),K(this,`secret`,void 0),K(this,`handleFileSelect`,e=>{let t=e.target.files[0];if(t){let e=new FileReader;e.onload=e=>{if(!e.target)return;let t=e.target.result;try{let e=JSON.parse(t);this.setState({data:e,changed:JSON.stringify(e)!==JSON.stringify(this.state.originalData)})}catch{window.alert(J.t(`jc_[JsonConfig] Failed to parse JSON file`))}},e.readAsText(t)}else window.alert(J.t(`jc_[JsonConfig] Failed to open JSON File`))}),K(this,`onFileChange`,async(e,t,n)=>{if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{var r;await UO.loadI18n(this.props.socket,(r=this.state.schema)==null?void 0:r.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{let e=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:e||void 0,hash:(0,Ns.default)(JSON.stringify(e)).toString()})}catch{}}}),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:Un(e.themeName),saveConfigDialog:!1,hash:`_`},this.secret=e.secret||``,this.getInstanceObject().then(e=>this.getConfigFile().then(t=>UO.loadI18n(this.props.socket,t==null?void 0:t.i18n,this.props.adapterName).then(n=>{n&&(this.fileLangSubscribed||(this.fileLangSubscribed=n,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),e?this.setState({schema:t||void 0,data:e.native,common:e.common,hash:(0,Ns.default)(JSON.stringify(t)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&=(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),``)}getExportImportButtons(){return _.createElement(`div`,{style:WO.exportImportButtons},_.createElement(Ce,{title:this.props.t(`jc_Import settings from JSON file`),slotProps:{popper:{sx:WO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":WO.button},onClick:()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`id`,`files`),e.setAttribute(`opacity`,0),e.addEventListener(`change`,e=>this.handleFileSelect(e),!1),e.click()}},_.createElement(lr,null))),_.createElement(Ce,{title:this.props.t(`jc_Export setting to JSON file`),slotProps:{popper:{sx:WO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":WO.button},onClick:()=>{this.state.data&&Zt.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},_.createElement(lr,{style:{transform:`rotate(180deg)`}}))))}async getInstanceObject(){try{let t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t==null?void 0:t.encryptedNative)){var e;if(!this.secret){let e=await this.props.socket.getSystemConfig();await YO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`),this.secret=e.native.secret}return(e=t.encryptedNative)==null||e.forEach(e=>{t.native[e]&&(t.native[e]=qO(this.secret,t.native[e]))}),t}return t||null}catch(e){window.alert(`[JsonConfig] Cannot read instance object: ${e}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Some data are not stored. Discard?`),ok:J.t(`jc_Discard`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({confirmDialog:!1},()=>e&&It.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e[`#include`]==`string`){let n=await this._getConfigFile(e[`#include`],[...t]);return delete e[`#include`],n&&(e={...e,...n}),e}let n=Object.keys(e);for(let r=0;r<n.length;r++)e[n[r]]&&typeof e[n[r]]==`object`&&(e[n[r]]=await this.scanForInclude(e[n[r]],t));return e}async getConfigFile(e){return this._getConfigFile(e)}async _getConfigFile(e,t){if(e||=`jsonConfig.json5`,t||=[],t.includes(e))return window.alert(`[JsonConfig] Circular reference in file: ${e} => ${t.join(` => `)}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e=`jsonConfig.json`);let n=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e),r=``,i=``;if(n.file!==void 0&&(i=n.file),typeof i==`string`)r=i;else if(i.type===`Buffer`){let e=``,t=new Uint8Array(i.data),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);r=e}this.fileSubscribed.includes(e)||(this.fileSubscribed.push(e),await this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,e,this.onFileChange));try{return await this.scanForInclude(Ms.default.parse(r),t)}catch(e){window.alert(`[JsonConfig] Cannot parse json5 config!`),console.log(e)}}catch(t){this.state.schema||window.alert(`[JsonConfig] Cannot read file "${e}: ${t}`)}return null}renderSaveConfigDialog(){return this.state.saveConfigDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Save configuration?`),ok:J.t(`jc_Save`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t||=this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(let n of Object.values(t.items)){let t=this.findAttr(e,n);if(t)return t}}return null}postProcessing(e,t,n){if(n||=this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}let r=e[t];if(n.items){if(n.type===`table`){let e=r;if(!Array.isArray(e))return;for(let t of e)if(n.items)for(let e of n.items)e.attr&&this.postProcessing(t,e.attr,e)}else for(let[t,r]of Object.entries(n.items)){if(r.type===`panel`||r.type===`tabs`||r.type===`accordion`)return;this.postProcessing(e,t,r)}}else if(t&&typeof r==`string`){if(n.type===`text`)n.trim!==!1&&(e[t]=r.trim());else if(n.type===`ip`)e[t]=r.trim();else if(n.type===`number`){let i=parseFloat(r.toString().replace(`,`,`.`));e[t]=n.min!==void 0&&i<n.min?n.min:n.max!==void 0&&i>n.max?n.max:i}else if(n.type===`port`){let i=parseInt(r.toString(),10);n.min!==void 0&&i<n.min?e[t]=n.min:n.max!==void 0&&i>n.max&&(e[t]=n.max),e[t]=e[t]!==0&&i<20?20:i>65535?65535:i}else n.type===`checkbox`&&(e[t]=e[t]===!0||e[t]===`true`||e[t]===`on`||e[t]===1||e[t]===`1`)}}async onSave(e,t){if(e){let e=await this.getInstanceObject();if(!e){console.error(`Something went wrong: may be no connection?`),window.alert(`Something went wrong: may be no connection?`);return}if(!this.state.data||!this.state.schema)return;let n={};for(let t of Object.keys(this.state.data)){let r=this.findAttr(t);(!r||!r.doNotSave||r.type===`state`)&&!t.startsWith(`_`)?X.setValue(e.native,t,this.state.data[t]):(X.setValue(e.native,t,null),n[t]=this.state.data[t])}try{let t=JSON.parse(JSON.stringify(e));if(Array.isArray(t.encryptedNative)){await YO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`);for(let e of t.encryptedNative)t.native[e]&&(t.native[e]=JO(this.secret,t.native[e]))}await this.props.socket.setObject(t._id,t)}catch(e){window.alert(`[JsonConfig] Cannot set object: ${e}`)}let r={...e.native,...n};console.log(r),this.setState({changed:!1,data:r,updateData:this.state.updateData+1,originalData:r},()=>t&&It.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):It.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){let e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?_.createElement(Ze,null):_.createElement(`div`,{style:WO.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),_.createElement(UO,{key:this.state.hash,style:WO.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(J.t(`jc_Cannot save configuration because of error in configuration`)),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:!!t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:`.`}),_.createElement(Ut,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width===`xs`||this.props.width===`sm`||this.props.width===`md`,changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}},ZO=t({ConfigGeneric:()=>X,ConfigPanel:()=>RO,GUI_API_GENERATION:()=>2,JsonConfig:()=>XO,JsonConfigComponent:()=>UO,checkGuiApiCompatibility:()=>Ec}),QO=t({ConfigGeneric:()=>ak,ConfigPanel:()=>ik,GUI_API_GENERATION:()=>ek,JsonConfig:()=>nk,JsonConfigComponent:()=>rk,checkGuiApiCompatibility:()=>tk,default:()=>ok}),$O=ZO,ek=$O.GUI_API_GENERATION,tk=$O.checkGuiApiCompatibility,nk=$O.JsonConfig,rk=$O.JsonConfigComponent,ik=$O.ConfigPanel,ak=$O.ConfigGeneric,ok=Reflect.get(ZO,`default`)??ZO,sk=`__mf_module_cache__`;globalThis[sk]||={share:{},remote:{}},globalThis[sk].share||={},globalThis[sk].remote||={};var ck=globalThis[sk];for(let e of Object.keys(ck.share))if(e.startsWith(`default:`)){let t=e.slice(8);ck.share[t]===void 0&&(ck.share[t]=ck.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;ck.share[t]===void 0&&(ck.share[t]=ck.share[e])}var lk=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},uk=Symbol.for(`module-federation.shared-cache-listeners`),dk=e=>{let t=e[uk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,uk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},fk=(e,t,n)=>{let r=dk(e);(r[t.canonical]||=new Set).add(n)},pk=Symbol.for(`module-federation.shared-cache-owners`),mk=e=>{let t=e[pk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,pk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},hk=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[pk];r===void 0?o&&delete o[t.canonical]:mk(e)[t.canonical]=r;let s=(i=e[uk])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},gk=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},_k=lk(ck.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]});_k===void 0&&(_k=gk(QO),hk(ck.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},_k,`ConfigCustomJavascriptSet`));var vk,yk=e=>{e.GUI_API_GENERATION,e.checkGuiApiCompatibility,e.JsonConfig,e.JsonConfigComponent,e.ConfigPanel,vk=e.ConfigGeneric,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};fk(ck.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},yk),yk(_k);export{uy as a,bs as c,Ix as i,QO as n,Ts as o,Px as r,Ss as s,vk as t};
|