diff --git a/CHANGELOG_OLD.md b/CHANGELOG_OLD.md index 2a07b1200..eeef46ff2 100644 --- a/CHANGELOG_OLD.md +++ b/CHANGELOG_OLD.md @@ -1,4 +1,8 @@ The newest change log is in README.md +## 8.8.0 (2024-08-05) +* (@klein0r) Added option to register notifications via scripts +* (@klein0r) Fixed sendTo block with an empty name list + ## 8.7.7 (2024-08-04) * (@klein0r) Fixed import scripts dialog * (@klein0r) Allowed removing all custom packages (empty list) diff --git a/README.md b/README.md index 08fd7283d..6b1025d11 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Executes Javascript, Typescript Scripts. -### **WORK IN PROGRESS** +### 8.9.2 (2025-04-27) * (@GermanBluefox) Updated packages for GUI * (@GermanBluefox) Used TypeScript for an admin component @@ -46,10 +46,6 @@ Executes Javascript, Typescript Scripts. ### 8.8.2 (2024-08-07) * (bluefox) updated dependencies -### 8.8.0 (2024-08-05) -* (@klein0r) Added option to register notifications via scripts -* (@klein0r) Fixed sendTo block with an empty name list - ## License The MIT License (MIT) diff --git a/admin/assets/createSvgIcon-BdRvDw53.js b/admin/assets/createSvgIcon-BdRvDw53.js new file mode 100644 index 000000000..d711ddd54 --- /dev/null +++ b/admin/assets/createSvgIcon-BdRvDw53.js @@ -0,0 +1,30 @@ +import{i as I,a as Wt}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{g as Ur}from"./_commonjsHelpers-Cpj98o6Y.js";import{i as Yr,a as qr}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";var ur={exports:{}},Ge={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xr=I,Qr=Symbol.for("react.element"),Zr=Symbol.for("react.fragment"),Jr=Object.prototype.hasOwnProperty,en=Xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tn={key:!0,ref:!0,__self:!0,__source:!0};function fr(e,t,r){var n,a={},o=null,s=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)Jr.call(t,n)&&!tn.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Qr,type:e,key:o,ref:s,props:a,_owner:en.current}}Ge.Fragment=Zr;Ge.jsx=fr;Ge.jsxs=fr;ur.exports=Ge;var ze=ur.exports;function se(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const rn="$$material";function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?j(be,--V):0,he--,z===10&&(he=1,Ke--),z}function Y(){return z=V2||Te(z)>3?"":" "}function yn(e,t){for(;--t&&Y()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return _e(e,Fe()+(t<6&&re()==32&&Y()==32))}function bt(e){for(;Y();)switch(z){case e:return V;case 34:case 39:e!==34&&e!==39&&bt(z);break;case 40:e===41&&bt(e);break;case 92:Y();break}return V}function bn(e,t){for(;Y()&&e+z!==57;)if(e+z===84&&re()===47)break;return"/*"+_e(t,V-1)+"*"+He(e===47?e:Y())}function Sn(e){for(;!Te(re());)Y();return _e(e,V)}function vn(e){return yr(Le("",null,null,null,[""],e=gr(e),0,[0],e))}function Le(e,t,r,n,a,o,s,c,u){for(var f=0,p=0,d=s,m=0,b=0,g=0,h=1,v=1,S=1,$=0,x="",C=a,k=o,A=n,w=x;v;)switch(g=$,$=Y()){case 40:if(g!=108&&j(w,d-1)==58){yt(w+=_(Me($),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:w+=Me($);break;case 9:case 10:case 13:case 32:w+=gn(g);break;case 92:w+=yn(Fe()-1,7);continue;case 47:switch(re()){case 42:case 47:Re(Cn(bn(Y(),Fe()),t,r),u);break;default:w+="/"}break;case 123*h:c[f++]=ee(w)*S;case 125*h:case 59:case 0:switch($){case 0:case 125:v=0;case 59+p:S==-1&&(w=_(w,/\f/g,"")),b>0&&ee(w)-d&&Re(b>32?Ht(w+";",n,r,d-1):Ht(_(w," ","")+";",n,r,d-2),u);break;case 59:w+=";";default:if(Re(A=Gt(w,t,r,f,p,a,c,x,C=[],k=[],d),o),$===123)if(p===0)Le(w,t,A,A,C,o,d,c,k);else switch(m===99&&j(w,3)===110?100:m){case 100:case 108:case 109:case 115:Le(e,A,A,n&&Re(Gt(e,A,A,0,0,a,c,x,a,C=[],d),k),a,k,d,c,n?C:k);break;default:Le(w,A,A,A,[""],k,0,c,k)}}f=p=b=0,h=S=1,x=w="",d=s;break;case 58:d=1+ee(w),b=g;default:if(h<1){if($==123)--h;else if($==125&&h++==0&&hn()==125)continue}switch(w+=He($),$*h){case 38:S=p>0?1:(w+="\f",-1);break;case 44:c[f++]=(ee(w)-1)*S,S=1;break;case 64:re()===45&&(w+=Me(Y())),m=re(),p=d=ee(x=w+=Sn(Fe())),$++;break;case 45:g===45&&ee(w)==2&&(h=0)}}return o}function Gt(e,t,r,n,a,o,s,c,u,f,p){for(var d=a-1,m=a===0?o:[""],b=Tt(m),g=0,h=0,v=0;g0?m[S]+" "+$:_($,/&\f/g,m[S])))&&(u[v++]=x);return Ve(e,t,r,a===0?kt:c,u,f,p)}function Cn(e,t,r){return Ve(e,t,r,dr,He(pn()),Ae(e,2,-2),0)}function Ht(e,t,r,n){return Ve(e,t,r,At,Ae(e,0,n),Ae(e,n+1,-1),n)}function me(e,t){for(var r="",n=Tt(e),a=0;a6)switch(j(e,t+1)){case 109:if(j(e,t+4)!==45)break;case 102:return _(e,/(.+:)(.+)-([^]+)/,"$1"+P+"$2-$3$1"+je+(j(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yt(e,"stretch")?Sr(_(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(j(e,t+1)!==115)break;case 6444:switch(j(e,ee(e)-3-(~yt(e,"!important")&&10))){case 107:return _(e,":",":"+P)+e;case 101:return _(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+P+(j(e,14)===45?"inline-":"")+"box$3$1"+P+"$2$3$1"+W+"$2box$3")+e}break;case 5936:switch(j(e,t+11)){case 114:return P+e+W+_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return P+e+W+_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return P+e+W+_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return P+e+W+e+e}return e}var En=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case At:t.return=Sr(t.value,t.length);break;case mr:return me([ve(t,{value:_(t.value,"@","@"+P)})],a);case kt:if(t.length)return mn(t.props,function(o){switch(dn(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return me([ve(t,{props:[_(o,/:(read-\w+)/,":"+je+"$1")]})],a);case"::placeholder":return me([ve(t,{props:[_(o,/:(plac\w+)/,":"+P+"input-$1")]}),ve(t,{props:[_(o,/:(plac\w+)/,":"+je+"$1")]}),ve(t,{props:[_(o,/:(plac\w+)/,W+"input-$1")]})],a)}return""})}},On=[En],Rn=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var a=t.stylisPlugins||On,o={},s,c=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),S=1;S=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Fn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Mn=/[A-Z]|^ms/g,Ln=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wr=function(t){return t.charCodeAt(1)===45},Vt=function(t){return t!=null&&typeof t!="boolean"},dt=br(function(e){return wr(e)?e:e.replace(Mn,"-$&").toLowerCase()}),Ut=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ln,function(n,a,o){return te={name:a,styles:o,next:te},a})}return Fn[t]!==1&&!wr(t)&&typeof r=="number"&&r!==0?r+"px":r};function $e(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return te={name:a.name,styles:a.styles,next:te},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)te={name:s.name,styles:s.styles,next:te},s=s.next;var c=o.styles+";";return c}return Nn(e,t,r)}case"function":{if(e!==void 0){var u=te,f=r(e);return te=u,$e(e,t,f)}break}}var p=r;if(t==null)return p;var d=t[p];return d!==void 0?d:p}function Nn(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a96?Hn:Kn},Xt=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Vn=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return $t(r,n,a),kr(function(){return Cr(r,n,a)}),null},Un=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var c=Xt(t,r,n),u=c||qt(a),f=!u("as");return function(){var p=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)d.push.apply(d,p);else{var m=p[0];d.push(m[0]);for(var b=p.length,g=1;gqn("prop-types",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),Zn=await Qn.then(e=>e());var Jn=Zn;const Ai=Ur(Jn);/** + * @mui/styled-engine v6.4.11 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function ea(e,t){return vt(e,t)}function ta(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Qt=[];function Zt(e){return Qt[0]=e,Pt(Qt)}var Pr={exports:{}},R={};/** + * @license React + * react-is.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Et=Symbol.for("react.transitional.element"),Ot=Symbol.for("react.portal"),Ue=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),qe=Symbol.for("react.profiler"),Xe=Symbol.for("react.consumer"),Qe=Symbol.for("react.context"),Ze=Symbol.for("react.forward_ref"),Je=Symbol.for("react.suspense"),et=Symbol.for("react.suspense_list"),tt=Symbol.for("react.memo"),rt=Symbol.for("react.lazy"),ra=Symbol.for("react.view_transition"),na=Symbol.for("react.client.reference");function X(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Et:switch(e=e.type,e){case Ue:case qe:case Ye:case Je:case et:case ra:return e;default:switch(e=e&&e.$$typeof,e){case Qe:case Ze:case rt:case tt:return e;case Xe:return e;default:return t}}case Ot:return t}}}R.ContextConsumer=Xe;R.ContextProvider=Qe;R.Element=Et;R.ForwardRef=Ze;R.Fragment=Ue;R.Lazy=rt;R.Memo=tt;R.Portal=Ot;R.Profiler=qe;R.StrictMode=Ye;R.Suspense=Je;R.SuspenseList=et;R.isContextConsumer=function(e){return X(e)===Xe};R.isContextProvider=function(e){return X(e)===Qe};R.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Et};R.isForwardRef=function(e){return X(e)===Ze};R.isFragment=function(e){return X(e)===Ue};R.isLazy=function(e){return X(e)===rt};R.isMemo=function(e){return X(e)===tt};R.isPortal=function(e){return X(e)===Ot};R.isProfiler=function(e){return X(e)===qe};R.isStrictMode=function(e){return X(e)===Ye};R.isSuspense=function(e){return X(e)===Je};R.isSuspenseList=function(e){return X(e)===et};R.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ue||e===qe||e===Ye||e===Je||e===et||typeof e=="object"&&e!==null&&(e.$$typeof===rt||e.$$typeof===tt||e.$$typeof===Qe||e.$$typeof===Xe||e.$$typeof===Ze||e.$$typeof===na||e.getModuleId!==void 0)};R.typeOf=X;Pr.exports=R;var _r=Pr.exports;function ae(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Er(e){if(I.isValidElement(e)||_r.isValidElementType(e)||!ae(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Er(e[r])}),t}function K(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return ae(e)&&ae(t)&&Object.keys(t).forEach(a=>{I.isValidElement(t[a])||_r.isValidElementType(t[a])?n[a]=t[a]:ae(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&ae(e[a])?n[a]=K(e[a],t[a],r):r.clone?n[a]=ae(t[a])?Er(t[a]):t[a]:n[a]=t[a]}),n}const aa=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function oa(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=aa(t),s=Object.keys(o);function c(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function f(m,b){const g=s.indexOf(b);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(g!==-1&&typeof t[s[g]]=="number"?t[s[g]]:b)-n/100}${r})`}function p(m){return s.indexOf(m)+1n.startsWith("@container")).sort((n,a)=>{var s,c;const o=/min-width:\s*([0-9.]+)/;return+(((s=n.match(o))==null?void 0:s[1])||0)-+(((c=a.match(o))==null?void 0:c[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function sa(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function ca(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function la(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...c)=>t(e.breakpoints.up(...c),s),o.down=(...c)=>t(e.breakpoints.down(...c),s),o.between=(...c)=>t(e.breakpoints.between(...c),s),o.only=(...c)=>t(e.breakpoints.only(...c),s),o.not=(...c)=>{const u=t(e.breakpoints.not(...c),s);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const ua={borderRadius:4};function ke(e,t){return t?K(e,t,{clone:!1}):e}const nt={xs:0,sm:600,md:900,lg:1200,xl:1536},Jt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nt[e]}px)`},fa={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:nt[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function oe(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||Jt;return t.reduce((s,c,u)=>(s[o.up(o.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Jt;return Object.keys(t).reduce((s,c)=>{if(sa(o.keys,c)){const u=ca(n.containerQueries?n:fa,c);u&&(s[u]=r(t[c],c))}else if(Object.keys(o.values||nt).includes(c)){const u=o.up(c);s[u]=r(t[c],c)}else{const u=c;s[u]=t[u]}return s},{})}return r(t)}function Or(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Rr(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Ti(e,...t){const r=Or(e),n=[r,...t].reduce((a,o)=>K(a,o),{});return Rr(Object.keys(r),n)}function da(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,o)=>{o{e[a]!=null&&(r[a]=!0)}),r}function $i({values:e,breakpoints:t,base:r}){const n=r||da(e,t),a=Object.keys(n);if(a.length===0)return e;let o;return a.reduce((s,c,u)=>(Array.isArray(e)?(s[c]=e[u]!=null?e[u]:e[o],o=u):typeof e=="object"?(s[c]=e[c]!=null?e[c]:e[o],o=c):s[c]=e,s),{})}function ge(e){if(typeof e!="string")throw new Error(se(7));return e.charAt(0).toUpperCase()+e.slice(1)}function at(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function De(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=at(e,r)||n,t&&(a=t(a,n,e)),a}function N(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const c=s[t],u=s.theme,f=at(u,n)||{};return oe(s,c,d=>{let m=De(f,a,d);return d===m&&typeof d=="string"&&(m=De(f,a,`${t}${d==="default"?"":ge(d)}`,d)),r===!1?m:{[r]:m}})};return o.propTypes={},o.filterProps=[t],o}function ma(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const pa={m:"margin",p:"padding"},ha={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},er={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ga=ma(e=>{if(e.length>2)if(er[e])e=er[e];else return[e];const[t,r]=e.split(""),n=pa[t],a=ha[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),Rt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Rt,...Bt];function Ee(e,t,r,n){const a=at(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:typeof a=="string"?`calc(${o} * ${a})`:a*o:Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o),c=a[s];return o>=0?c:typeof c=="number"?-c:`-${c}`}:typeof a=="function"?a:()=>{}}function It(e){return Ee(e,"spacing",8)}function Oe(e,t){return typeof t=="string"||t==null?t:e(t)}function ya(e,t){return r=>e.reduce((n,a)=>(n[a]=Oe(t,r),n),{})}function ba(e,t,r,n){if(!t.includes(r))return null;const a=ga(r),o=ya(a,n),s=e[r];return oe(e,s,o)}function Br(e,t){const r=It(e.theme);return Object.keys(e).map(n=>ba(e,t,n,r)).reduce(ke,{})}function M(e){return Br(e,Rt)}M.propTypes={};M.filterProps=Rt;function L(e){return Br(e,Bt)}L.propTypes={};L.filterProps=Bt;function Ir(e=8,t=It({spacing:e})){if(e.mui)return e;const r=(...n)=>(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function ot(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?ke(a,t[o](n)):a,{});return r.propTypes={},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function q(e){return typeof e!="number"?e:`${e}px solid`}function Q(e,t){return N({prop:e,themeKey:"borders",transform:t})}const Sa=Q("border",q),va=Q("borderTop",q),Ca=Q("borderRight",q),wa=Q("borderBottom",q),xa=Q("borderLeft",q),ka=Q("borderColor"),Aa=Q("borderTopColor"),Ta=Q("borderRightColor"),$a=Q("borderBottomColor"),Pa=Q("borderLeftColor"),_a=Q("outline",q),Ea=Q("outlineColor"),it=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ee(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Oe(t,n)});return oe(e,e.borderRadius,r)}return null};it.propTypes={};it.filterProps=["borderRadius"];ot(Sa,va,Ca,wa,xa,ka,Aa,Ta,$a,Pa,it,_a,Ea);const st=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ee(e.theme,"spacing",8),r=n=>({gap:Oe(t,n)});return oe(e,e.gap,r)}return null};st.propTypes={};st.filterProps=["gap"];const ct=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ee(e.theme,"spacing",8),r=n=>({columnGap:Oe(t,n)});return oe(e,e.columnGap,r)}return null};ct.propTypes={};ct.filterProps=["columnGap"];const lt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ee(e.theme,"spacing",8),r=n=>({rowGap:Oe(t,n)});return oe(e,e.rowGap,r)}return null};lt.propTypes={};lt.filterProps=["rowGap"];const Oa=N({prop:"gridColumn"}),Ra=N({prop:"gridRow"}),Ba=N({prop:"gridAutoFlow"}),Ia=N({prop:"gridAutoColumns"}),Fa=N({prop:"gridAutoRows"}),Ma=N({prop:"gridTemplateColumns"}),La=N({prop:"gridTemplateRows"}),Na=N({prop:"gridTemplateAreas"}),za=N({prop:"gridArea"});ot(st,ct,lt,Oa,Ra,Ba,Ia,Fa,Ma,La,Na,za);function pe(e,t){return t==="grey"?t:e}const ja=N({prop:"color",themeKey:"palette",transform:pe}),Da=N({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:pe}),Wa=N({prop:"backgroundColor",themeKey:"palette",transform:pe});ot(ja,Da,Wa);function U(e){return e<=1&&e!==0?`${e*100}%`:e}const Ga=N({prop:"width",transform:U}),Ft=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,s,c,u;const n=((s=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:s[r])||nt[r];return n?((u=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:U(r)}};return oe(e,e.maxWidth,t)}return null};Ft.filterProps=["maxWidth"];const Ha=N({prop:"minWidth",transform:U}),Ka=N({prop:"height",transform:U}),Va=N({prop:"maxHeight",transform:U}),Ua=N({prop:"minHeight",transform:U});N({prop:"size",cssProperty:"width",transform:U});N({prop:"size",cssProperty:"height",transform:U});const Ya=N({prop:"boxSizing"});ot(Ga,Ft,Ha,Ka,Va,Ua,Ya);const ut={border:{themeKey:"borders",transform:q},borderTop:{themeKey:"borders",transform:q},borderRight:{themeKey:"borders",transform:q},borderBottom:{themeKey:"borders",transform:q},borderLeft:{themeKey:"borders",transform:q},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:q},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:it},color:{themeKey:"palette",transform:pe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:pe},backgroundColor:{themeKey:"palette",transform:pe},p:{style:L},pt:{style:L},pr:{style:L},pb:{style:L},pl:{style:L},px:{style:L},py:{style:L},padding:{style:L},paddingTop:{style:L},paddingRight:{style:L},paddingBottom:{style:L},paddingLeft:{style:L},paddingX:{style:L},paddingY:{style:L},paddingInline:{style:L},paddingInlineStart:{style:L},paddingInlineEnd:{style:L},paddingBlock:{style:L},paddingBlockStart:{style:L},paddingBlockEnd:{style:L},m:{style:M},mt:{style:M},mr:{style:M},mb:{style:M},ml:{style:M},mx:{style:M},my:{style:M},margin:{style:M},marginTop:{style:M},marginRight:{style:M},marginBottom:{style:M},marginLeft:{style:M},marginX:{style:M},marginY:{style:M},marginInline:{style:M},marginInlineStart:{style:M},marginInlineEnd:{style:M},marginBlock:{style:M},marginBlockStart:{style:M},marginBlockEnd:{style:M},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:st},rowGap:{style:lt},columnGap:{style:ct},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:U},maxWidth:{style:Ft},minWidth:{transform:U},height:{transform:U},maxHeight:{transform:U},minHeight:{transform:U},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function qa(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Xa(e,t){return typeof e=="function"?e(t):e}function Qa(){function e(r,n,a,o){const s={[r]:n,theme:a},c=o[r];if(!c)return{[r]:n};const{cssProperty:u=r,themeKey:f,transform:p,style:d}=c;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const m=at(a,f)||{};return d?d(s):oe(s,n,g=>{let h=De(m,p,g);return g===h&&typeof g=="string"&&(h=De(m,p,`${r}${g==="default"?"":ge(g)}`,g)),u===!1?h:{[u]:h}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const o=a.unstable_sxConfig??ut;function s(c){let u=c;if(typeof c=="function")u=c(a);else if(typeof c!="object")return c;if(!u)return null;const f=Or(a.breakpoints),p=Object.keys(f);let d=f;return Object.keys(u).forEach(m=>{const b=Xa(u[m],a);if(b!=null)if(typeof b=="object")if(o[m])d=ke(d,e(m,b,a,o));else{const g=oe({theme:a},b,h=>({[m]:h}));qa(g,b)?d[m]=t({sx:b,theme:a}):d=ke(d,g)}else d=ke(d,e(m,b,a,o))}),ia(a,Rr(p,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const ye=Qa();ye.filterProps=["sx"];function Za(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function Fr(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,c=oa(r),u=Ir(a);let f=K({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:u,shape:{...ua,...o}},s);return f=la(f),f.applyStyles=Za,f=t.reduce((p,d)=>K(p,d),f),f.unstable_sxConfig={...ut,...s==null?void 0:s.unstable_sxConfig},f.unstable_sx=function(d){return ye({sx:d,theme:this})},f}function Ja(e){return Object.keys(e).length===0}function Pi(e=null){const t=I.useContext(_t);return!t||Ja(t)?e:t}const tr=e=>e,eo=()=>{let e=tr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=tr}}},to=eo();function Mr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{n[a]=Lr(e,a,r)}),n}function Nr(e){const{variants:t,...r}=e,n={variants:t,style:Zt(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Zt(a.style))}),n}const oo=Fr();function mt(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function io(e){return e?(t,r)=>r[e]:null}function so(e,t,r){e.theme=uo(e.theme)?r:e.theme[t]||e.theme}function Ne(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Ne(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...o}=r;n=o}return zr(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function zr(e,t,r=[]){var a;let n;e:for(let o=0;o{ta(c,k=>k.filter(A=>A!==ye));const{name:f,slot:p,skipVariantsResolver:d,skipSx:m,overridesResolver:b=io(mo(p)),...g}=u,h=d!==void 0?d:p&&p!=="Root"&&p!=="root"||!1,v=m||!1;let S=mt;p==="Root"||p==="root"?S=n:p?S=a:fo(c)&&(S=void 0);const $=ea(c,{shouldForwardProp:S,label:lo(),...g}),x=k=>{if(typeof k=="function"&&k.__emotion_real!==k)return function(w){return Ne(w,k)};if(ae(k)){const A=Nr(k);return A.variants?function(D){return Ne(D,A)}:A.style}return k},C=(...k)=>{const A=[],w=k.map(x),D=[];if(A.push(o),f&&b&&D.push(function(T){var Se,jt;const G=(jt=(Se=T.theme.components)==null?void 0:Se[f])==null?void 0:jt.styleOverrides;if(!G)return null;const Z={};for(const Dt in G)Z[Dt]=Ne(T,G[Dt]);return b(T,Z)}),f&&!h&&D.push(function(T){var Z,Se;const B=T.theme,G=(Se=(Z=B==null?void 0:B.components)==null?void 0:Z[f])==null?void 0:Se.variants;return G?zr(T,G):null}),v||D.push(ye),Array.isArray(w[0])){const y=w.shift(),T=new Array(A.length).fill(""),B=new Array(D.length).fill("");let G;G=[...T,...y,...B],G.raw=[...T,...y.raw,...B],A.unshift(G)}const H=[...A,...w,...D],i=$(...H);return c.muiName&&(i.muiName=c.muiName),i};return $.withConfig&&(C.withConfig=$.withConfig),C}}function lo(e,t){return void 0}function uo(e){for(const t in e)return!1;return!0}function fo(e){return typeof e=="string"&&e.charCodeAt(0)>96}function mo(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ct(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const a=n;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const o=e[a],s=t[a];if(!s)r[a]=o||{};else if(!o)r[a]=s;else{r[a]={...s};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const u=c;r[a][u]=Ct(o[u],s[u])}}}else r[a]===void 0&&(r[a]=e[a])}return r}function po(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Mt(e,t=0,r=1){return po(e,t,r)}function ho(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function go(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function ie(e){if(e.type)return e;if(e.charAt(0)==="#")return ie(ho(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(se(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(se(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const yo=e=>{const t=ie(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},we=(e,t)=>{try{return yo(e)}catch{return e}};function ft(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function _i(e){if(e.startsWith("#"))return e;const{values:t}=ie(e);return`#${t.map((r,n)=>go(n===3?Math.round(255*r):r)).join("")}`}function jr(e){e=ie(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(f,p=(f+r/30)%12)=>a-o*Math.max(Math.min(p-3,9-p,1),-1);let c="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(c+="a",u.push(t[3])),ft({type:c,values:u})}function wt(e){e=ie(e);let t=e.type==="hsl"||e.type==="hsla"?ie(jr(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bo(e,t){const r=wt(e),n=wt(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function So(e,t){return e=ie(e),t=Mt(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ft(e)}function Be(e,t,r){try{return So(e,t)}catch{return e}}function Lt(e,t){if(e=ie(e),t=Mt(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return ft(e)}function E(e,t,r){try{return Lt(e,t)}catch{return e}}function Nt(e,t){if(e=ie(e),t=Mt(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return ft(e)}function O(e,t,r){try{return Nt(e,t)}catch{return e}}function vo(e,t=.15){return wt(e)>.5?Lt(e,t):Nt(e,t)}function Ie(e,t,r){try{return vo(e,t)}catch{return e}}function Co(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",c=!0;for(let u=0;u`var(--${e?`${e}-`:""}${n}${t(...a)})`}const nr=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},To=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([c,u])=>{(!r||r&&!r([...o,c]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?n(u,[...o,c],Array.isArray(u)?[...s,c]:s):t([...o,c],u,s))})}n(e)},$o=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function pt(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return To(e,(c,u,f)=>{if((typeof u=="string"||typeof u=="number")&&(!n||!n(c,u))){const p=`--${r?`${r}-`:""}${c.join("-")}`,d=$o(c,u);Object.assign(a,{[p]:d}),nr(o,c,`var(${p})`,f),nr(s,c,`var(${p}, ${d})`,f)}},c=>c[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function Po(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c="light",...u}=e,{vars:f,css:p,varsWithDefaults:d}=pt(u,t);let m=d;const b={},{[c]:g,...h}=o;if(Object.entries(h||{}).forEach(([x,C])=>{const{vars:k,css:A,varsWithDefaults:w}=pt(C,t);m=K(m,w),b[x]={css:A,vars:k}}),g){const{css:x,vars:C,varsWithDefaults:k}=pt(g,t);m=K(m,k),b[c]={css:x,vars:C}}function v(x,C){var A,w;let k=a;if(a==="class"&&(k=".%s"),a==="data"&&(k="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(k=`[${a}="%s"]`),x){if(k==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${((w=(A=o[x])==null?void 0:A.palette)==null?void 0:w.mode)||x})`]:{":root":C}};if(k)return e.defaultColorScheme===x?`:root, ${k.replace("%s",String(x))}`:k.replace("%s",String(x))}return":root"}return{vars:m,generateThemeVars:()=>{let x={...f};return Object.entries(b).forEach(([,{vars:C}])=>{x=K(x,C)}),x},generateStyleSheets:()=>{var D,H;const x=[],C=e.defaultColorScheme||"light";function k(i,y){Object.keys(y).length&&x.push(typeof i=="string"?{[i]:{...y}}:i)}k(r(void 0,{...p}),p);const{[C]:A,...w}=b;if(A){const{css:i}=A,y=(H=(D=o[C])==null?void 0:D.palette)==null?void 0:H.mode,T=!n&&y?{colorScheme:y,...i}:{...i};k(r(C,{...T}),T)}return Object.entries(w).forEach(([i,{css:y}])=>{var G,Z;const T=(Z=(G=o[i])==null?void 0:G.palette)==null?void 0:Z.mode,B=!n&&T?{colorScheme:T,...y}:{...y};k(r(i,{...B}),B)}),x}}}function _o(e){return function(r){return e==="media"?`@media (prefers-color-scheme: ${r})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Pe={black:"#000",white:"#fff"},Eo={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ce={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},le={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ce={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ue={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},fe={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},de={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Wr(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Pe.white,default:Pe.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Oo=Wr();function Gr(){return{text:{primary:Pe.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Pe.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ar=Gr();function or(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Nt(e.main,a):t==="dark"&&(e.dark=Lt(e.main,o)))}function Ro(e="light"){return e==="dark"?{main:ue[200],light:ue[50],dark:ue[400]}:{main:ue[700],light:ue[400],dark:ue[800]}}function Bo(e="light"){return e==="dark"?{main:ce[200],light:ce[50],dark:ce[400]}:{main:ce[500],light:ce[300],dark:ce[700]}}function Io(e="light"){return e==="dark"?{main:le[500],light:le[300],dark:le[700]}:{main:le[700],light:le[400],dark:le[800]}}function Fo(e="light"){return e==="dark"?{main:fe[400],light:fe[300],dark:fe[700]}:{main:fe[700],light:fe[500],dark:fe[900]}}function Mo(e="light"){return e==="dark"?{main:de[400],light:de[300],dark:de[700]}:{main:de[800],light:de[500],dark:de[900]}}function Lo(e="light"){return e==="dark"?{main:Ce[400],light:Ce[300],dark:Ce[700]}:{main:"#ed6c02",light:Ce[500],dark:Ce[900]}}function zt(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||Ro(t),s=e.secondary||Bo(t),c=e.error||Io(t),u=e.info||Fo(t),f=e.success||Mo(t),p=e.warning||Lo(t);function d(h){return bo(h,ar.text.primary)>=r?ar.text.primary:Oo.text.primary}const m=({color:h,name:v,mainShade:S=500,lightShade:$=300,darkShade:x=700})=>{if(h={...h},!h.main&&h[S]&&(h.main=h[S]),!h.hasOwnProperty("main"))throw new Error(se(11,v?` (${v})`:"",S));if(typeof h.main!="string")throw new Error(se(12,v?` (${v})`:"",JSON.stringify(h.main)));return or(h,"light",$,n),or(h,"dark",x,n),h.contrastText||(h.contrastText=d(h.main)),h};let b;return t==="light"?b=Wr():t==="dark"&&(b=Gr()),K({common:{...Pe},mode:t,primary:m({color:o,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:p,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:f,name:"success"}),grey:Eo,contrastThreshold:r,getContrastText:d,augmentColor:m,tonalOffset:n,...b},a)}function No(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function zo(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function jo(e){return Math.round(e*1e5)/1e5}const ir={textTransform:"uppercase"},sr='"Roboto", "Helvetica", "Arial", sans-serif';function Do(e,t){const{fontFamily:r=sr,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:f,pxToRem:p,...d}=typeof t=="function"?t(e):t,m=n/14,b=p||(v=>`${v/u*m}rem`),g=(v,S,$,x,C)=>({fontFamily:r,fontWeight:v,fontSize:b(S),lineHeight:$,...r===sr?{letterSpacing:`${jo(x/S)}em`}:{},...C,...f}),h={h1:g(a,96,1.167,-1.5),h2:g(a,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(s,14,1.75,.4,ir),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,ir),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return K({htmlFontSize:u,pxToRem:b,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:c,...h},d,{clone:!1})}const Wo=.2,Go=.14,Ho=.12;function F(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Wo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Go})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ho})`].join(",")}const Ko=["none",F(0,2,1,-1,0,1,1,0,0,1,3,0),F(0,3,1,-2,0,2,2,0,0,1,5,0),F(0,3,3,-2,0,3,4,0,0,1,8,0),F(0,2,4,-1,0,4,5,0,0,1,10,0),F(0,3,5,-1,0,5,8,0,0,1,14,0),F(0,3,5,-1,0,6,10,0,0,1,18,0),F(0,4,5,-2,0,7,10,1,0,2,16,1),F(0,5,5,-3,0,8,10,1,0,3,14,2),F(0,5,6,-3,0,9,12,1,0,3,16,2),F(0,6,6,-3,0,10,14,1,0,4,18,3),F(0,6,7,-4,0,11,15,1,0,4,20,3),F(0,7,8,-4,0,12,17,2,0,5,22,4),F(0,7,8,-4,0,13,19,2,0,5,24,4),F(0,7,9,-4,0,14,21,2,0,5,26,4),F(0,8,9,-5,0,15,22,2,0,6,28,5),F(0,8,10,-5,0,16,24,2,0,6,30,5),F(0,8,11,-5,0,17,26,2,0,6,32,5),F(0,9,11,-5,0,18,28,2,0,7,34,6),F(0,9,12,-6,0,19,29,2,0,7,36,6),F(0,10,13,-6,0,20,31,3,0,8,38,7),F(0,10,13,-6,0,21,33,3,0,8,40,7),F(0,10,14,-6,0,22,35,3,0,8,42,7),F(0,11,14,-7,0,23,36,3,0,9,44,8),F(0,11,15,-7,0,24,38,3,0,9,46,8)],Vo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Uo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function cr(e){return`${Math.round(e)}ms`}function Yo(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qo(e){const t={...Vo,...e.easing},r={...Uo,...e.duration};return{getAutoHeightDuration:Yo,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:c=t.easeInOut,delay:u=0,...f}=o;return(Array.isArray(a)?a:[a]).map(p=>`${p} ${typeof s=="string"?s:cr(s)} ${c} ${typeof u=="string"?u:cr(u)}`).join(",")},...e,easing:t,duration:r}}const Xo={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Qo(e){return ae(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Hr(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;oK(b,g),m),m.unstable_sxConfig={...ut,...f==null?void 0:f.unstable_sxConfig},m.unstable_sx=function(g){return ye({sx:g,theme:this})},m.toRuntimeSource=Hr,m}function Oi(...e){return We(...e)}function Zo(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Jo=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Zo(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Kr(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Vr(e){return e==="dark"?Jo:[]}function ei(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=zt(t);return{palette:o,opacity:{...Kr(o.mode),...r},overlays:n||Vr(o.mode),...a}}function ti(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const ri=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ni=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return ri(e.cssVarPrefix).forEach(c=>{s[c]=r[c],delete r[c]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function ai(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function l(e,t,r){!e[t]&&r&&(e[t]=r)}function xe(e){return typeof e!="string"||!e.startsWith("hsl")?e:jr(e)}function ne(e,t){`${t}Channel`in e||(e[`${t}Channel`]=we(xe(e[t])))}function oi(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const J=e=>{try{return e()}catch{}},ii=(e="mui")=>Ao(e);function ht(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=ei({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=We({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Kr(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Vr(a)},s}function si(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=ti,colorSchemeSelector:c=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...f}=e,p=Object.keys(r)[0],d=n||(r.light&&p!=="light"?"light":p),m=ii(o),{[d]:b,light:g,dark:h,...v}=r,S={...v};let $=b;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&($=!0),!$)throw new Error(se(21,d));const x=ht(S,$,f,d);g&&!S.light&&ht(S,g,void 0,"light"),h&&!S.dark&&ht(S,h,void 0,"dark");let C={defaultColorScheme:d,...x,cssVarPrefix:o,colorSchemeSelector:c,rootSelector:u,getCssVar:m,colorSchemes:S,font:{...No(x.typography),...x.font},spacing:oi(f.spacing)};Object.keys(C.colorSchemes).forEach(H=>{const i=C.colorSchemes[H].palette,y=T=>{const B=T.split("-"),G=B[1],Z=B[2];return m(T,i[G][Z])};if(i.mode==="light"&&(l(i.common,"background","#fff"),l(i.common,"onBackground","#000")),i.mode==="dark"&&(l(i.common,"background","#000"),l(i.common,"onBackground","#fff")),ai(i,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),i.mode==="light"){l(i.Alert,"errorColor",E(i.error.light,.6)),l(i.Alert,"infoColor",E(i.info.light,.6)),l(i.Alert,"successColor",E(i.success.light,.6)),l(i.Alert,"warningColor",E(i.warning.light,.6)),l(i.Alert,"errorFilledBg",y("palette-error-main")),l(i.Alert,"infoFilledBg",y("palette-info-main")),l(i.Alert,"successFilledBg",y("palette-success-main")),l(i.Alert,"warningFilledBg",y("palette-warning-main")),l(i.Alert,"errorFilledColor",J(()=>i.getContrastText(i.error.main))),l(i.Alert,"infoFilledColor",J(()=>i.getContrastText(i.info.main))),l(i.Alert,"successFilledColor",J(()=>i.getContrastText(i.success.main))),l(i.Alert,"warningFilledColor",J(()=>i.getContrastText(i.warning.main))),l(i.Alert,"errorStandardBg",O(i.error.light,.9)),l(i.Alert,"infoStandardBg",O(i.info.light,.9)),l(i.Alert,"successStandardBg",O(i.success.light,.9)),l(i.Alert,"warningStandardBg",O(i.warning.light,.9)),l(i.Alert,"errorIconColor",y("palette-error-main")),l(i.Alert,"infoIconColor",y("palette-info-main")),l(i.Alert,"successIconColor",y("palette-success-main")),l(i.Alert,"warningIconColor",y("palette-warning-main")),l(i.AppBar,"defaultBg",y("palette-grey-100")),l(i.Avatar,"defaultBg",y("palette-grey-400")),l(i.Button,"inheritContainedBg",y("palette-grey-300")),l(i.Button,"inheritContainedHoverBg",y("palette-grey-A100")),l(i.Chip,"defaultBorder",y("palette-grey-400")),l(i.Chip,"defaultAvatarColor",y("palette-grey-700")),l(i.Chip,"defaultIconColor",y("palette-grey-700")),l(i.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),l(i.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),l(i.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),l(i.LinearProgress,"primaryBg",O(i.primary.main,.62)),l(i.LinearProgress,"secondaryBg",O(i.secondary.main,.62)),l(i.LinearProgress,"errorBg",O(i.error.main,.62)),l(i.LinearProgress,"infoBg",O(i.info.main,.62)),l(i.LinearProgress,"successBg",O(i.success.main,.62)),l(i.LinearProgress,"warningBg",O(i.warning.main,.62)),l(i.Skeleton,"bg",`rgba(${y("palette-text-primaryChannel")} / 0.11)`),l(i.Slider,"primaryTrack",O(i.primary.main,.62)),l(i.Slider,"secondaryTrack",O(i.secondary.main,.62)),l(i.Slider,"errorTrack",O(i.error.main,.62)),l(i.Slider,"infoTrack",O(i.info.main,.62)),l(i.Slider,"successTrack",O(i.success.main,.62)),l(i.Slider,"warningTrack",O(i.warning.main,.62));const T=Ie(i.background.default,.8);l(i.SnackbarContent,"bg",T),l(i.SnackbarContent,"color",J(()=>i.getContrastText(T))),l(i.SpeedDialAction,"fabHoverBg",Ie(i.background.paper,.15)),l(i.StepConnector,"border",y("palette-grey-400")),l(i.StepContent,"border",y("palette-grey-400")),l(i.Switch,"defaultColor",y("palette-common-white")),l(i.Switch,"defaultDisabledColor",y("palette-grey-100")),l(i.Switch,"primaryDisabledColor",O(i.primary.main,.62)),l(i.Switch,"secondaryDisabledColor",O(i.secondary.main,.62)),l(i.Switch,"errorDisabledColor",O(i.error.main,.62)),l(i.Switch,"infoDisabledColor",O(i.info.main,.62)),l(i.Switch,"successDisabledColor",O(i.success.main,.62)),l(i.Switch,"warningDisabledColor",O(i.warning.main,.62)),l(i.TableCell,"border",O(Be(i.divider,1),.88)),l(i.Tooltip,"bg",Be(i.grey[700],.92))}if(i.mode==="dark"){l(i.Alert,"errorColor",O(i.error.light,.6)),l(i.Alert,"infoColor",O(i.info.light,.6)),l(i.Alert,"successColor",O(i.success.light,.6)),l(i.Alert,"warningColor",O(i.warning.light,.6)),l(i.Alert,"errorFilledBg",y("palette-error-dark")),l(i.Alert,"infoFilledBg",y("palette-info-dark")),l(i.Alert,"successFilledBg",y("palette-success-dark")),l(i.Alert,"warningFilledBg",y("palette-warning-dark")),l(i.Alert,"errorFilledColor",J(()=>i.getContrastText(i.error.dark))),l(i.Alert,"infoFilledColor",J(()=>i.getContrastText(i.info.dark))),l(i.Alert,"successFilledColor",J(()=>i.getContrastText(i.success.dark))),l(i.Alert,"warningFilledColor",J(()=>i.getContrastText(i.warning.dark))),l(i.Alert,"errorStandardBg",E(i.error.light,.9)),l(i.Alert,"infoStandardBg",E(i.info.light,.9)),l(i.Alert,"successStandardBg",E(i.success.light,.9)),l(i.Alert,"warningStandardBg",E(i.warning.light,.9)),l(i.Alert,"errorIconColor",y("palette-error-main")),l(i.Alert,"infoIconColor",y("palette-info-main")),l(i.Alert,"successIconColor",y("palette-success-main")),l(i.Alert,"warningIconColor",y("palette-warning-main")),l(i.AppBar,"defaultBg",y("palette-grey-900")),l(i.AppBar,"darkBg",y("palette-background-paper")),l(i.AppBar,"darkColor",y("palette-text-primary")),l(i.Avatar,"defaultBg",y("palette-grey-600")),l(i.Button,"inheritContainedBg",y("palette-grey-800")),l(i.Button,"inheritContainedHoverBg",y("palette-grey-700")),l(i.Chip,"defaultBorder",y("palette-grey-700")),l(i.Chip,"defaultAvatarColor",y("palette-grey-300")),l(i.Chip,"defaultIconColor",y("palette-grey-300")),l(i.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),l(i.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),l(i.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),l(i.LinearProgress,"primaryBg",E(i.primary.main,.5)),l(i.LinearProgress,"secondaryBg",E(i.secondary.main,.5)),l(i.LinearProgress,"errorBg",E(i.error.main,.5)),l(i.LinearProgress,"infoBg",E(i.info.main,.5)),l(i.LinearProgress,"successBg",E(i.success.main,.5)),l(i.LinearProgress,"warningBg",E(i.warning.main,.5)),l(i.Skeleton,"bg",`rgba(${y("palette-text-primaryChannel")} / 0.13)`),l(i.Slider,"primaryTrack",E(i.primary.main,.5)),l(i.Slider,"secondaryTrack",E(i.secondary.main,.5)),l(i.Slider,"errorTrack",E(i.error.main,.5)),l(i.Slider,"infoTrack",E(i.info.main,.5)),l(i.Slider,"successTrack",E(i.success.main,.5)),l(i.Slider,"warningTrack",E(i.warning.main,.5));const T=Ie(i.background.default,.98);l(i.SnackbarContent,"bg",T),l(i.SnackbarContent,"color",J(()=>i.getContrastText(T))),l(i.SpeedDialAction,"fabHoverBg",Ie(i.background.paper,.15)),l(i.StepConnector,"border",y("palette-grey-600")),l(i.StepContent,"border",y("palette-grey-600")),l(i.Switch,"defaultColor",y("palette-grey-300")),l(i.Switch,"defaultDisabledColor",y("palette-grey-600")),l(i.Switch,"primaryDisabledColor",E(i.primary.main,.55)),l(i.Switch,"secondaryDisabledColor",E(i.secondary.main,.55)),l(i.Switch,"errorDisabledColor",E(i.error.main,.55)),l(i.Switch,"infoDisabledColor",E(i.info.main,.55)),l(i.Switch,"successDisabledColor",E(i.success.main,.55)),l(i.Switch,"warningDisabledColor",E(i.warning.main,.55)),l(i.TableCell,"border",E(Be(i.divider,1),.68)),l(i.Tooltip,"bg",Be(i.grey[700],.92))}ne(i.background,"default"),ne(i.background,"paper"),ne(i.common,"background"),ne(i.common,"onBackground"),ne(i,"divider"),Object.keys(i).forEach(T=>{const B=i[T];T!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&l(i[T],"mainChannel",we(xe(B.main))),B.light&&l(i[T],"lightChannel",we(xe(B.light))),B.dark&&l(i[T],"darkChannel",we(xe(B.dark))),B.contrastText&&l(i[T],"contrastTextChannel",we(xe(B.contrastText))),T==="text"&&(ne(i[T],"primary"),ne(i[T],"secondary")),T==="action"&&(B.active&&ne(i[T],"active"),B.selected&&ne(i[T],"selected")))})}),C=t.reduce((H,i)=>K(H,i),C);const k={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:ni(C)},{vars:A,generateThemeVars:w,generateStyleSheets:D}=Po(C,k);return C.vars=A,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([H,i])=>{C[H]=i}),C.generateThemeVars=w,C.generateStyleSheets=D,C.generateSpacing=function(){return Ir(f.spacing,It(this))},C.getColorSchemeSelector=_o(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...ut,...f==null?void 0:f.unstable_sxConfig},C.unstable_sx=function(i){return ye({sx:i,theme:this})},C.toRuntimeSource=Hr,C}function lr(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:zt({...r===!0?{}:r.palette,mode:t})})}function ci(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...s}=e,c=o||"light",u=a==null?void 0:a[c],f={...a,...r?{[c]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return We(e,...t);let p=r;"palette"in e||f[c]&&(f[c]!==!0?p=f[c].palette:c==="dark"&&(p={mode:"dark"}));const d=We({...e,palette:p},...t);return d.defaultColorScheme=c,d.colorSchemes=f,d.palette.mode==="light"&&(d.colorSchemes.light={...f.light!==!0&&f.light,palette:d.palette},lr(d,"dark",f.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:d.palette},lr(d,"light",f.light)),d}return!r&&!("light"in f)&&c==="light"&&(f.light=!0),si({...s,colorSchemes:f,defaultColorScheme:c,...typeof n!="boolean"&&n},...t)}const li=ci();function ui(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const fi=e=>ui(e)&&e!=="classes",di=co({themeId:rn,defaultTheme:li,rootShouldForwardProp:fi}),mi=ko;function pi(e){return xo(e)}function hi(e){return Lr("MuiSvgIcon",e)}const Ri=ao("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),gi=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(r)}`]};return Co(a,hi,n)},yi=di("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ge(r.color)}`],t[`fontSize${ge(r.fontSize)}`]]}})(mi(({theme:e})=>{var t,r,n,a,o,s,c,u,f,p,d,m,b,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((p=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:p.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var v,S;return{props:{color:h},style:{color:(S=(v=(e.vars??e).palette)==null?void 0:v[h])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(m=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(g=(b=(e.vars??e).palette)==null?void 0:b.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),xt=I.forwardRef(function(t,r){const n=pi({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:c="svg",fontSize:u="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:d,viewBox:m="0 0 24 24",...b}=n,g=I.isValidElement(a)&&a.type==="svg",h={...n,color:s,component:c,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:m,hasSvgAsChild:g},v={};p||(v.viewBox=m);const S=gi(h);return ze.jsxs(yi,{as:c,className:ro(S.root,o),focusable:"false",color:f,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...v,...b,...g&&a.props,ownerState:h,children:[g?a.props.children:a,d?ze.jsx("title",{children:d}):null]})});xt.muiName="SvgIcon";function Bi(e,t){function r(n,a){return ze.jsx(xt,{"data-testid":`${t}Icon`,ref:a,...n,children:e})}return r.muiName=xt.muiName,I.memo(I.forwardRef(r))}export{xt as $,Oe as A,Ir as B,oa as C,se as D,li as E,si as F,ue as G,Pe as H,fe as I,ce as J,to as K,ao as L,pi as M,Uo as N,di as O,Ai as P,mi as Q,Zo as R,Lt as S,rn as T,Nt as U,vo as V,fi as W,at as X,ui as Y,po as Z,gt as _,Eo as a,ho as a0,_i as a1,jr as a2,ie as a3,ft as a4,bo as a5,wt as a6,Oi as a7,qo as a8,Vo as a9,ei as aa,ti as ab,Do as ac,zo as ad,ri as ae,Ri as af,hi as ag,Pt as ah,Tr as ai,_t as aj,Ci as ak,Cr as al,$r as am,ki as an,xi as ao,wi as ap,Rn as aq,on as ar,Ei as as,ci as b,Bi as c,So as d,ae as e,ut as f,de as g,ye as h,Gn as i,ze as j,ro as k,co as l,Ct as m,ge as n,Ce as o,Co as p,Fr as q,le as r,ea as s,Lr as t,Pi as u,oe as v,$i as w,It as x,K as y,Ti as z}; diff --git a/admin/assets/createSvgIcon-ChB2N0i2.js b/admin/assets/createSvgIcon-ChB2N0i2.js deleted file mode 100644 index 80b280b7c..000000000 --- a/admin/assets/createSvgIcon-ChB2N0i2.js +++ /dev/null @@ -1,30 +0,0 @@ -import{i as I,a as Wt}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{g as Ur}from"./_commonjsHelpers-Cpj98o6Y.js";import{i as Yr,a as qr}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";var ur={exports:{}},Ge={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xr=I,Qr=Symbol.for("react.element"),Zr=Symbol.for("react.fragment"),Jr=Object.prototype.hasOwnProperty,en=Xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tn={key:!0,ref:!0,__self:!0,__source:!0};function fr(e,t,r){var n,a={},o=null,s=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)Jr.call(t,n)&&!tn.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Qr,type:e,key:o,ref:s,props:a,_owner:en.current}}Ge.Fragment=Zr;Ge.jsx=fr;Ge.jsxs=fr;ur.exports=Ge;var ze=ur.exports;function se(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const rn="$$material";function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?j(be,--V):0,he--,z===10&&(he=1,Ke--),z}function Y(){return z=V2||Te(z)>3?"":" "}function yn(e,t){for(;--t&&Y()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return Ee(e,Fe()+(t<6&&re()==32&&Y()==32))}function bt(e){for(;Y();)switch(z){case e:return V;case 34:case 39:e!==34&&e!==39&&bt(z);break;case 40:e===41&&bt(e);break;case 92:Y();break}return V}function bn(e,t){for(;Y()&&e+z!==57;)if(e+z===84&&re()===47)break;return"/*"+Ee(t,V-1)+"*"+He(e===47?e:Y())}function Sn(e){for(;!Te(re());)Y();return Ee(e,V)}function vn(e){return yr(Le("",null,null,null,[""],e=gr(e),0,[0],e))}function Le(e,t,r,n,a,o,s,c,u){for(var f=0,p=0,d=s,m=0,b=0,g=0,h=1,v=1,S=1,$=0,w="",C=a,k=o,A=n,x=w;v;)switch(g=$,$=Y()){case 40:if(g!=108&&j(x,d-1)==58){yt(x+=E(Me($),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:x+=Me($);break;case 9:case 10:case 13:case 32:x+=gn(g);break;case 92:x+=yn(Fe()-1,7);continue;case 47:switch(re()){case 42:case 47:Re(Cn(bn(Y(),Fe()),t,r),u);break;default:x+="/"}break;case 123*h:c[f++]=ee(x)*S;case 125*h:case 59:case 0:switch($){case 0:case 125:v=0;case 59+p:S==-1&&(x=E(x,/\f/g,"")),b>0&&ee(x)-d&&Re(b>32?Ht(x+";",n,r,d-1):Ht(E(x," ","")+";",n,r,d-2),u);break;case 59:x+=";";default:if(Re(A=Gt(x,t,r,f,p,a,c,w,C=[],k=[],d),o),$===123)if(p===0)Le(x,t,A,A,C,o,d,c,k);else switch(m===99&&j(x,3)===110?100:m){case 100:case 108:case 109:case 115:Le(e,A,A,n&&Re(Gt(e,A,A,0,0,a,c,w,a,C=[],d),k),a,k,d,c,n?C:k);break;default:Le(x,A,A,A,[""],k,0,c,k)}}f=p=b=0,h=S=1,w=x="",d=s;break;case 58:d=1+ee(x),b=g;default:if(h<1){if($==123)--h;else if($==125&&h++==0&&hn()==125)continue}switch(x+=He($),$*h){case 38:S=p>0?1:(x+="\f",-1);break;case 44:c[f++]=(ee(x)-1)*S,S=1;break;case 64:re()===45&&(x+=Me(Y())),m=re(),p=d=ee(w=x+=Sn(Fe())),$++;break;case 45:g===45&&ee(x)==2&&(h=0)}}return o}function Gt(e,t,r,n,a,o,s,c,u,f,p){for(var d=a-1,m=a===0?o:[""],b=Tt(m),g=0,h=0,v=0;g0?m[S]+" "+$:E($,/&\f/g,m[S])))&&(u[v++]=w);return Ve(e,t,r,a===0?kt:c,u,f,p)}function Cn(e,t,r){return Ve(e,t,r,dr,He(pn()),Ae(e,2,-2),0)}function Ht(e,t,r,n){return Ve(e,t,r,At,Ae(e,0,n),Ae(e,n+1,-1),n)}function me(e,t){for(var r="",n=Tt(e),a=0;a6)switch(j(e,t+1)){case 109:if(j(e,t+4)!==45)break;case 102:return E(e,/(.+:)(.+)-([^]+)/,"$1"+P+"$2-$3$1"+je+(j(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yt(e,"stretch")?Sr(E(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(j(e,t+1)!==115)break;case 6444:switch(j(e,ee(e)-3-(~yt(e,"!important")&&10))){case 107:return E(e,":",":"+P)+e;case 101:return E(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+P+(j(e,14)===45?"inline-":"")+"box$3$1"+P+"$2$3$1"+W+"$2box$3")+e}break;case 5936:switch(j(e,t+11)){case 114:return P+e+W+E(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return P+e+W+E(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return P+e+W+E(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return P+e+W+e+e}return e}var _n=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case At:t.return=Sr(t.value,t.length);break;case mr:return me([ve(t,{value:E(t.value,"@","@"+P)})],a);case kt:if(t.length)return mn(t.props,function(o){switch(dn(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return me([ve(t,{props:[E(o,/:(read-\w+)/,":"+je+"$1")]})],a);case"::placeholder":return me([ve(t,{props:[E(o,/:(plac\w+)/,":"+P+"input-$1")]}),ve(t,{props:[E(o,/:(plac\w+)/,":"+je+"$1")]}),ve(t,{props:[E(o,/:(plac\w+)/,W+"input-$1")]})],a)}return""})}},On=[_n],Rn=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var a=t.stylisPlugins||On,o={},s,c=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),S=1;S=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Fn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Mn=/[A-Z]|^ms/g,Ln=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xr=function(t){return t.charCodeAt(1)===45},Vt=function(t){return t!=null&&typeof t!="boolean"},dt=br(function(e){return xr(e)?e:e.replace(Mn,"-$&").toLowerCase()}),Ut=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ln,function(n,a,o){return te={name:a,styles:o,next:te},a})}return Fn[t]!==1&&!xr(t)&&typeof r=="number"&&r!==0?r+"px":r};function $e(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return te={name:a.name,styles:a.styles,next:te},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)te={name:s.name,styles:s.styles,next:te},s=s.next;var c=o.styles+";";return c}return Nn(e,t,r)}case"function":{if(e!==void 0){var u=te,f=r(e);return te=u,$e(e,t,f)}break}}var p=r;if(t==null)return p;var d=t[p];return d!==void 0?d:p}function Nn(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a96?Hn:Kn},Xt=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Vn=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return $t(r,n,a),kr(function(){return Cr(r,n,a)}),null},Un=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var c=Xt(t,r,n),u=c||qt(a),f=!u("as");return function(){var p=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)d.push.apply(d,p);else{var m=p[0];d.push(m[0]);for(var b=p.length,g=1;gqn("prop-types",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),Zn=await Qn.then(e=>e());var Jn=Zn;const Ai=Ur(Jn);/** - * @mui/styled-engine v6.4.11 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function ea(e,t){return vt(e,t)}function ta(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Qt=[];function Zt(e){return Qt[0]=e,Pt(Qt)}var Pr={exports:{}},R={};/** - * @license React - * react-is.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var _t=Symbol.for("react.transitional.element"),Ot=Symbol.for("react.portal"),Ue=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),qe=Symbol.for("react.profiler"),Xe=Symbol.for("react.consumer"),Qe=Symbol.for("react.context"),Ze=Symbol.for("react.forward_ref"),Je=Symbol.for("react.suspense"),et=Symbol.for("react.suspense_list"),tt=Symbol.for("react.memo"),rt=Symbol.for("react.lazy"),ra=Symbol.for("react.offscreen"),na=Symbol.for("react.client.reference");function X(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _t:switch(e=e.type,e){case Ue:case qe:case Ye:case Je:case et:return e;default:switch(e=e&&e.$$typeof,e){case Qe:case Ze:case rt:case tt:return e;case Xe:return e;default:return t}}case Ot:return t}}}R.ContextConsumer=Xe;R.ContextProvider=Qe;R.Element=_t;R.ForwardRef=Ze;R.Fragment=Ue;R.Lazy=rt;R.Memo=tt;R.Portal=Ot;R.Profiler=qe;R.StrictMode=Ye;R.Suspense=Je;R.SuspenseList=et;R.isContextConsumer=function(e){return X(e)===Xe};R.isContextProvider=function(e){return X(e)===Qe};R.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_t};R.isForwardRef=function(e){return X(e)===Ze};R.isFragment=function(e){return X(e)===Ue};R.isLazy=function(e){return X(e)===rt};R.isMemo=function(e){return X(e)===tt};R.isPortal=function(e){return X(e)===Ot};R.isProfiler=function(e){return X(e)===qe};R.isStrictMode=function(e){return X(e)===Ye};R.isSuspense=function(e){return X(e)===Je};R.isSuspenseList=function(e){return X(e)===et};R.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ue||e===qe||e===Ye||e===Je||e===et||e===ra||typeof e=="object"&&e!==null&&(e.$$typeof===rt||e.$$typeof===tt||e.$$typeof===Qe||e.$$typeof===Xe||e.$$typeof===Ze||e.$$typeof===na||e.getModuleId!==void 0)};R.typeOf=X;Pr.exports=R;var Er=Pr.exports;function ae(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _r(e){if(I.isValidElement(e)||Er.isValidElementType(e)||!ae(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=_r(e[r])}),t}function K(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return ae(e)&&ae(t)&&Object.keys(t).forEach(a=>{I.isValidElement(t[a])||Er.isValidElementType(t[a])?n[a]=t[a]:ae(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&ae(e[a])?n[a]=K(e[a],t[a],r):r.clone?n[a]=ae(t[a])?_r(t[a]):t[a]:n[a]=t[a]}),n}const aa=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function oa(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=aa(t),s=Object.keys(o);function c(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function f(m,b){const g=s.indexOf(b);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(g!==-1&&typeof t[s[g]]=="number"?t[s[g]]:b)-n/100}${r})`}function p(m){return s.indexOf(m)+1n.startsWith("@container")).sort((n,a)=>{var s,c;const o=/min-width:\s*([0-9.]+)/;return+(((s=n.match(o))==null?void 0:s[1])||0)-+(((c=a.match(o))==null?void 0:c[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function sa(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function ca(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function la(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...c)=>t(e.breakpoints.up(...c),s),o.down=(...c)=>t(e.breakpoints.down(...c),s),o.between=(...c)=>t(e.breakpoints.between(...c),s),o.only=(...c)=>t(e.breakpoints.only(...c),s),o.not=(...c)=>{const u=t(e.breakpoints.not(...c),s);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const ua={borderRadius:4};function ke(e,t){return t?K(e,t,{clone:!1}):e}const nt={xs:0,sm:600,md:900,lg:1200,xl:1536},Jt={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nt[e]}px)`},fa={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:nt[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function oe(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||Jt;return t.reduce((s,c,u)=>(s[o.up(o.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Jt;return Object.keys(t).reduce((s,c)=>{if(sa(o.keys,c)){const u=ca(n.containerQueries?n:fa,c);u&&(s[u]=r(t[c],c))}else if(Object.keys(o.values||nt).includes(c)){const u=o.up(c);s[u]=r(t[c],c)}else{const u=c;s[u]=t[u]}return s},{})}return r(t)}function Or(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Rr(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Ti(e,...t){const r=Or(e),n=[r,...t].reduce((a,o)=>K(a,o),{});return Rr(Object.keys(r),n)}function da(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,o)=>{o{e[a]!=null&&(r[a]=!0)}),r}function $i({values:e,breakpoints:t,base:r}){const n=r||da(e,t),a=Object.keys(n);if(a.length===0)return e;let o;return a.reduce((s,c,u)=>(Array.isArray(e)?(s[c]=e[u]!=null?e[u]:e[o],o=u):typeof e=="object"?(s[c]=e[c]!=null?e[c]:e[o],o=c):s[c]=e,s),{})}function ge(e){if(typeof e!="string")throw new Error(se(7));return e.charAt(0).toUpperCase()+e.slice(1)}function at(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function De(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=at(e,r)||n,t&&(a=t(a,n,e)),a}function N(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const c=s[t],u=s.theme,f=at(u,n)||{};return oe(s,c,d=>{let m=De(f,a,d);return d===m&&typeof d=="string"&&(m=De(f,a,`${t}${d==="default"?"":ge(d)}`,d)),r===!1?m:{[r]:m}})};return o.propTypes={},o.filterProps=[t],o}function ma(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const pa={m:"margin",p:"padding"},ha={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},er={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ga=ma(e=>{if(e.length>2)if(er[e])e=er[e];else return[e];const[t,r]=e.split(""),n=pa[t],a=ha[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),Rt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Rt,...Bt];function _e(e,t,r,n){const a=at(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:typeof a=="string"?`calc(${o} * ${a})`:a*o:Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o),c=a[s];return o>=0?c:typeof c=="number"?-c:`-${c}`}:typeof a=="function"?a:()=>{}}function It(e){return _e(e,"spacing",8)}function Oe(e,t){return typeof t=="string"||t==null?t:e(t)}function ya(e,t){return r=>e.reduce((n,a)=>(n[a]=Oe(t,r),n),{})}function ba(e,t,r,n){if(!t.includes(r))return null;const a=ga(r),o=ya(a,n),s=e[r];return oe(e,s,o)}function Br(e,t){const r=It(e.theme);return Object.keys(e).map(n=>ba(e,t,n,r)).reduce(ke,{})}function M(e){return Br(e,Rt)}M.propTypes={};M.filterProps=Rt;function L(e){return Br(e,Bt)}L.propTypes={};L.filterProps=Bt;function Ir(e=8,t=It({spacing:e})){if(e.mui)return e;const r=(...n)=>(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function ot(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?ke(a,t[o](n)):a,{});return r.propTypes={},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function q(e){return typeof e!="number"?e:`${e}px solid`}function Q(e,t){return N({prop:e,themeKey:"borders",transform:t})}const Sa=Q("border",q),va=Q("borderTop",q),Ca=Q("borderRight",q),xa=Q("borderBottom",q),wa=Q("borderLeft",q),ka=Q("borderColor"),Aa=Q("borderTopColor"),Ta=Q("borderRightColor"),$a=Q("borderBottomColor"),Pa=Q("borderLeftColor"),Ea=Q("outline",q),_a=Q("outlineColor"),it=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_e(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Oe(t,n)});return oe(e,e.borderRadius,r)}return null};it.propTypes={};it.filterProps=["borderRadius"];ot(Sa,va,Ca,xa,wa,ka,Aa,Ta,$a,Pa,it,Ea,_a);const st=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_e(e.theme,"spacing",8),r=n=>({gap:Oe(t,n)});return oe(e,e.gap,r)}return null};st.propTypes={};st.filterProps=["gap"];const ct=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_e(e.theme,"spacing",8),r=n=>({columnGap:Oe(t,n)});return oe(e,e.columnGap,r)}return null};ct.propTypes={};ct.filterProps=["columnGap"];const lt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_e(e.theme,"spacing",8),r=n=>({rowGap:Oe(t,n)});return oe(e,e.rowGap,r)}return null};lt.propTypes={};lt.filterProps=["rowGap"];const Oa=N({prop:"gridColumn"}),Ra=N({prop:"gridRow"}),Ba=N({prop:"gridAutoFlow"}),Ia=N({prop:"gridAutoColumns"}),Fa=N({prop:"gridAutoRows"}),Ma=N({prop:"gridTemplateColumns"}),La=N({prop:"gridTemplateRows"}),Na=N({prop:"gridTemplateAreas"}),za=N({prop:"gridArea"});ot(st,ct,lt,Oa,Ra,Ba,Ia,Fa,Ma,La,Na,za);function pe(e,t){return t==="grey"?t:e}const ja=N({prop:"color",themeKey:"palette",transform:pe}),Da=N({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:pe}),Wa=N({prop:"backgroundColor",themeKey:"palette",transform:pe});ot(ja,Da,Wa);function U(e){return e<=1&&e!==0?`${e*100}%`:e}const Ga=N({prop:"width",transform:U}),Ft=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,s,c,u;const n=((s=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:s[r])||nt[r];return n?((u=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:U(r)}};return oe(e,e.maxWidth,t)}return null};Ft.filterProps=["maxWidth"];const Ha=N({prop:"minWidth",transform:U}),Ka=N({prop:"height",transform:U}),Va=N({prop:"maxHeight",transform:U}),Ua=N({prop:"minHeight",transform:U});N({prop:"size",cssProperty:"width",transform:U});N({prop:"size",cssProperty:"height",transform:U});const Ya=N({prop:"boxSizing"});ot(Ga,Ft,Ha,Ka,Va,Ua,Ya);const ut={border:{themeKey:"borders",transform:q},borderTop:{themeKey:"borders",transform:q},borderRight:{themeKey:"borders",transform:q},borderBottom:{themeKey:"borders",transform:q},borderLeft:{themeKey:"borders",transform:q},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:q},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:it},color:{themeKey:"palette",transform:pe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:pe},backgroundColor:{themeKey:"palette",transform:pe},p:{style:L},pt:{style:L},pr:{style:L},pb:{style:L},pl:{style:L},px:{style:L},py:{style:L},padding:{style:L},paddingTop:{style:L},paddingRight:{style:L},paddingBottom:{style:L},paddingLeft:{style:L},paddingX:{style:L},paddingY:{style:L},paddingInline:{style:L},paddingInlineStart:{style:L},paddingInlineEnd:{style:L},paddingBlock:{style:L},paddingBlockStart:{style:L},paddingBlockEnd:{style:L},m:{style:M},mt:{style:M},mr:{style:M},mb:{style:M},ml:{style:M},mx:{style:M},my:{style:M},margin:{style:M},marginTop:{style:M},marginRight:{style:M},marginBottom:{style:M},marginLeft:{style:M},marginX:{style:M},marginY:{style:M},marginInline:{style:M},marginInlineStart:{style:M},marginInlineEnd:{style:M},marginBlock:{style:M},marginBlockStart:{style:M},marginBlockEnd:{style:M},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:st},rowGap:{style:lt},columnGap:{style:ct},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:U},maxWidth:{style:Ft},minWidth:{transform:U},height:{transform:U},maxHeight:{transform:U},minHeight:{transform:U},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function qa(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Xa(e,t){return typeof e=="function"?e(t):e}function Qa(){function e(r,n,a,o){const s={[r]:n,theme:a},c=o[r];if(!c)return{[r]:n};const{cssProperty:u=r,themeKey:f,transform:p,style:d}=c;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const m=at(a,f)||{};return d?d(s):oe(s,n,g=>{let h=De(m,p,g);return g===h&&typeof g=="string"&&(h=De(m,p,`${r}${g==="default"?"":ge(g)}`,g)),u===!1?h:{[u]:h}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const o=a.unstable_sxConfig??ut;function s(c){let u=c;if(typeof c=="function")u=c(a);else if(typeof c!="object")return c;if(!u)return null;const f=Or(a.breakpoints),p=Object.keys(f);let d=f;return Object.keys(u).forEach(m=>{const b=Xa(u[m],a);if(b!=null)if(typeof b=="object")if(o[m])d=ke(d,e(m,b,a,o));else{const g=oe({theme:a},b,h=>({[m]:h}));qa(g,b)?d[m]=t({sx:b,theme:a}):d=ke(d,g)}else d=ke(d,e(m,b,a,o))}),ia(a,Rr(p,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const ye=Qa();ye.filterProps=["sx"];function Za(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function Fr(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,c=oa(r),u=Ir(a);let f=K({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:u,shape:{...ua,...o}},s);return f=la(f),f.applyStyles=Za,f=t.reduce((p,d)=>K(p,d),f),f.unstable_sxConfig={...ut,...s==null?void 0:s.unstable_sxConfig},f.unstable_sx=function(d){return ye({sx:d,theme:this})},f}function Ja(e){return Object.keys(e).length===0}function Pi(e=null){const t=I.useContext(Et);return!t||Ja(t)?e:t}const tr=e=>e,eo=()=>{let e=tr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=tr}}},to=eo();function Mr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{n[a]=Lr(e,a,r)}),n}function Nr(e){const{variants:t,...r}=e,n={variants:t,style:Zt(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Zt(a.style))}),n}const oo=Fr();function mt(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function io(e){return e?(t,r)=>r[e]:null}function so(e,t,r){e.theme=uo(e.theme)?r:e.theme[t]||e.theme}function Ne(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Ne(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...o}=r;n=o}return zr(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function zr(e,t,r=[]){var a;let n;e:for(let o=0;o{ta(c,k=>k.filter(A=>A!==ye));const{name:f,slot:p,skipVariantsResolver:d,skipSx:m,overridesResolver:b=io(mo(p)),...g}=u,h=d!==void 0?d:p&&p!=="Root"&&p!=="root"||!1,v=m||!1;let S=mt;p==="Root"||p==="root"?S=n:p?S=a:fo(c)&&(S=void 0);const $=ea(c,{shouldForwardProp:S,label:lo(),...g}),w=k=>{if(typeof k=="function"&&k.__emotion_real!==k)return function(x){return Ne(x,k)};if(ae(k)){const A=Nr(k);return A.variants?function(D){return Ne(D,A)}:A.style}return k},C=(...k)=>{const A=[],x=k.map(w),D=[];if(A.push(o),f&&b&&D.push(function(T){var Se,jt;const G=(jt=(Se=T.theme.components)==null?void 0:Se[f])==null?void 0:jt.styleOverrides;if(!G)return null;const Z={};for(const Dt in G)Z[Dt]=Ne(T,G[Dt]);return b(T,Z)}),f&&!h&&D.push(function(T){var Z,Se;const B=T.theme,G=(Se=(Z=B==null?void 0:B.components)==null?void 0:Z[f])==null?void 0:Se.variants;return G?zr(T,G):null}),v||D.push(ye),Array.isArray(x[0])){const y=x.shift(),T=new Array(A.length).fill(""),B=new Array(D.length).fill("");let G;G=[...T,...y,...B],G.raw=[...T,...y.raw,...B],A.unshift(G)}const H=[...A,...x,...D],i=$(...H);return c.muiName&&(i.muiName=c.muiName),i};return $.withConfig&&(C.withConfig=$.withConfig),C}}function lo(e,t){return void 0}function uo(e){for(const t in e)return!1;return!0}function fo(e){return typeof e=="string"&&e.charCodeAt(0)>96}function mo(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ct(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const a=n;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const o=e[a],s=t[a];if(!s)r[a]=o||{};else if(!o)r[a]=s;else{r[a]={...s};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const u=c;r[a][u]=Ct(o[u],s[u])}}}else r[a]===void 0&&(r[a]=e[a])}return r}function po(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Mt(e,t=0,r=1){return po(e,t,r)}function ho(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function go(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function ie(e){if(e.type)return e;if(e.charAt(0)==="#")return ie(ho(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(se(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(se(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const yo=e=>{const t=ie(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},xe=(e,t)=>{try{return yo(e)}catch{return e}};function ft(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Ei(e){if(e.startsWith("#"))return e;const{values:t}=ie(e);return`#${t.map((r,n)=>go(n===3?Math.round(255*r):r)).join("")}`}function jr(e){e=ie(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(f,p=(f+r/30)%12)=>a-o*Math.max(Math.min(p-3,9-p,1),-1);let c="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(c+="a",u.push(t[3])),ft({type:c,values:u})}function xt(e){e=ie(e);let t=e.type==="hsl"||e.type==="hsla"?ie(jr(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bo(e,t){const r=xt(e),n=xt(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function So(e,t){return e=ie(e),t=Mt(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ft(e)}function Be(e,t,r){try{return So(e,t)}catch{return e}}function Lt(e,t){if(e=ie(e),t=Mt(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return ft(e)}function _(e,t,r){try{return Lt(e,t)}catch{return e}}function Nt(e,t){if(e=ie(e),t=Mt(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return ft(e)}function O(e,t,r){try{return Nt(e,t)}catch{return e}}function vo(e,t=.15){return xt(e)>.5?Lt(e,t):Nt(e,t)}function Ie(e,t,r){try{return vo(e,t)}catch{return e}}function Co(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",c=!0;for(let u=0;u`var(--${e?`${e}-`:""}${n}${t(...a)})`}const nr=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},To=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([c,u])=>{(!r||r&&!r([...o,c]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?n(u,[...o,c],Array.isArray(u)?[...s,c]:s):t([...o,c],u,s))})}n(e)},$o=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function pt(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return To(e,(c,u,f)=>{if((typeof u=="string"||typeof u=="number")&&(!n||!n(c,u))){const p=`--${r?`${r}-`:""}${c.join("-")}`,d=$o(c,u);Object.assign(a,{[p]:d}),nr(o,c,`var(${p})`,f),nr(s,c,`var(${p}, ${d})`,f)}},c=>c[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function Po(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c="light",...u}=e,{vars:f,css:p,varsWithDefaults:d}=pt(u,t);let m=d;const b={},{[c]:g,...h}=o;if(Object.entries(h||{}).forEach(([w,C])=>{const{vars:k,css:A,varsWithDefaults:x}=pt(C,t);m=K(m,x),b[w]={css:A,vars:k}}),g){const{css:w,vars:C,varsWithDefaults:k}=pt(g,t);m=K(m,k),b[c]={css:w,vars:C}}function v(w,C){var A,x;let k=a;if(a==="class"&&(k=".%s"),a==="data"&&(k="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(k=`[${a}="%s"]`),w){if(k==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((x=(A=o[w])==null?void 0:A.palette)==null?void 0:x.mode)||w})`]:{":root":C}};if(k)return e.defaultColorScheme===w?`:root, ${k.replace("%s",String(w))}`:k.replace("%s",String(w))}return":root"}return{vars:m,generateThemeVars:()=>{let w={...f};return Object.entries(b).forEach(([,{vars:C}])=>{w=K(w,C)}),w},generateStyleSheets:()=>{var D,H;const w=[],C=e.defaultColorScheme||"light";function k(i,y){Object.keys(y).length&&w.push(typeof i=="string"?{[i]:{...y}}:i)}k(r(void 0,{...p}),p);const{[C]:A,...x}=b;if(A){const{css:i}=A,y=(H=(D=o[C])==null?void 0:D.palette)==null?void 0:H.mode,T=!n&&y?{colorScheme:y,...i}:{...i};k(r(C,{...T}),T)}return Object.entries(x).forEach(([i,{css:y}])=>{var G,Z;const T=(Z=(G=o[i])==null?void 0:G.palette)==null?void 0:Z.mode,B=!n&&T?{colorScheme:T,...y}:{...y};k(r(i,{...B}),B)}),w}}}function Eo(e){return function(r){return e==="media"?`@media (prefers-color-scheme: ${r})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Pe={black:"#000",white:"#fff"},_o={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ce={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},le={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ce={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ue={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},fe={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},de={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Wr(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Pe.white,default:Pe.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Oo=Wr();function Gr(){return{text:{primary:Pe.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Pe.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ar=Gr();function or(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Nt(e.main,a):t==="dark"&&(e.dark=Lt(e.main,o)))}function Ro(e="light"){return e==="dark"?{main:ue[200],light:ue[50],dark:ue[400]}:{main:ue[700],light:ue[400],dark:ue[800]}}function Bo(e="light"){return e==="dark"?{main:ce[200],light:ce[50],dark:ce[400]}:{main:ce[500],light:ce[300],dark:ce[700]}}function Io(e="light"){return e==="dark"?{main:le[500],light:le[300],dark:le[700]}:{main:le[700],light:le[400],dark:le[800]}}function Fo(e="light"){return e==="dark"?{main:fe[400],light:fe[300],dark:fe[700]}:{main:fe[700],light:fe[500],dark:fe[900]}}function Mo(e="light"){return e==="dark"?{main:de[400],light:de[300],dark:de[700]}:{main:de[800],light:de[500],dark:de[900]}}function Lo(e="light"){return e==="dark"?{main:Ce[400],light:Ce[300],dark:Ce[700]}:{main:"#ed6c02",light:Ce[500],dark:Ce[900]}}function zt(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||Ro(t),s=e.secondary||Bo(t),c=e.error||Io(t),u=e.info||Fo(t),f=e.success||Mo(t),p=e.warning||Lo(t);function d(h){return bo(h,ar.text.primary)>=r?ar.text.primary:Oo.text.primary}const m=({color:h,name:v,mainShade:S=500,lightShade:$=300,darkShade:w=700})=>{if(h={...h},!h.main&&h[S]&&(h.main=h[S]),!h.hasOwnProperty("main"))throw new Error(se(11,v?` (${v})`:"",S));if(typeof h.main!="string")throw new Error(se(12,v?` (${v})`:"",JSON.stringify(h.main)));return or(h,"light",$,n),or(h,"dark",w,n),h.contrastText||(h.contrastText=d(h.main)),h};let b;return t==="light"?b=Wr():t==="dark"&&(b=Gr()),K({common:{...Pe},mode:t,primary:m({color:o,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:p,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:f,name:"success"}),grey:_o,contrastThreshold:r,getContrastText:d,augmentColor:m,tonalOffset:n,...b},a)}function No(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function zo(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function jo(e){return Math.round(e*1e5)/1e5}const ir={textTransform:"uppercase"},sr='"Roboto", "Helvetica", "Arial", sans-serif';function Do(e,t){const{fontFamily:r=sr,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:f,pxToRem:p,...d}=typeof t=="function"?t(e):t,m=n/14,b=p||(v=>`${v/u*m}rem`),g=(v,S,$,w,C)=>({fontFamily:r,fontWeight:v,fontSize:b(S),lineHeight:$,...r===sr?{letterSpacing:`${jo(w/S)}em`}:{},...C,...f}),h={h1:g(a,96,1.167,-1.5),h2:g(a,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(s,14,1.75,.4,ir),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,ir),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return K({htmlFontSize:u,pxToRem:b,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:c,...h},d,{clone:!1})}const Wo=.2,Go=.14,Ho=.12;function F(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Wo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Go})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ho})`].join(",")}const Ko=["none",F(0,2,1,-1,0,1,1,0,0,1,3,0),F(0,3,1,-2,0,2,2,0,0,1,5,0),F(0,3,3,-2,0,3,4,0,0,1,8,0),F(0,2,4,-1,0,4,5,0,0,1,10,0),F(0,3,5,-1,0,5,8,0,0,1,14,0),F(0,3,5,-1,0,6,10,0,0,1,18,0),F(0,4,5,-2,0,7,10,1,0,2,16,1),F(0,5,5,-3,0,8,10,1,0,3,14,2),F(0,5,6,-3,0,9,12,1,0,3,16,2),F(0,6,6,-3,0,10,14,1,0,4,18,3),F(0,6,7,-4,0,11,15,1,0,4,20,3),F(0,7,8,-4,0,12,17,2,0,5,22,4),F(0,7,8,-4,0,13,19,2,0,5,24,4),F(0,7,9,-4,0,14,21,2,0,5,26,4),F(0,8,9,-5,0,15,22,2,0,6,28,5),F(0,8,10,-5,0,16,24,2,0,6,30,5),F(0,8,11,-5,0,17,26,2,0,6,32,5),F(0,9,11,-5,0,18,28,2,0,7,34,6),F(0,9,12,-6,0,19,29,2,0,7,36,6),F(0,10,13,-6,0,20,31,3,0,8,38,7),F(0,10,13,-6,0,21,33,3,0,8,40,7),F(0,10,14,-6,0,22,35,3,0,8,42,7),F(0,11,14,-7,0,23,36,3,0,9,44,8),F(0,11,15,-7,0,24,38,3,0,9,46,8)],Vo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Uo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function cr(e){return`${Math.round(e)}ms`}function Yo(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qo(e){const t={...Vo,...e.easing},r={...Uo,...e.duration};return{getAutoHeightDuration:Yo,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:c=t.easeInOut,delay:u=0,...f}=o;return(Array.isArray(a)?a:[a]).map(p=>`${p} ${typeof s=="string"?s:cr(s)} ${c} ${typeof u=="string"?u:cr(u)}`).join(",")},...e,easing:t,duration:r}}const Xo={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Qo(e){return ae(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Hr(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;oK(b,g),m),m.unstable_sxConfig={...ut,...f==null?void 0:f.unstable_sxConfig},m.unstable_sx=function(g){return ye({sx:g,theme:this})},m.toRuntimeSource=Hr,m}function Oi(...e){return We(...e)}function Zo(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Jo=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Zo(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Kr(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Vr(e){return e==="dark"?Jo:[]}function ei(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=zt(t);return{palette:o,opacity:{...Kr(o.mode),...r},overlays:n||Vr(o.mode),...a}}function ti(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const ri=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ni=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return ri(e.cssVarPrefix).forEach(c=>{s[c]=r[c],delete r[c]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function ai(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function l(e,t,r){!e[t]&&r&&(e[t]=r)}function we(e){return typeof e!="string"||!e.startsWith("hsl")?e:jr(e)}function ne(e,t){`${t}Channel`in e||(e[`${t}Channel`]=xe(we(e[t])))}function oi(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const J=e=>{try{return e()}catch{}},ii=(e="mui")=>Ao(e);function ht(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=ei({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=We({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Kr(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Vr(a)},s}function si(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=ti,colorSchemeSelector:c=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...f}=e,p=Object.keys(r)[0],d=n||(r.light&&p!=="light"?"light":p),m=ii(o),{[d]:b,light:g,dark:h,...v}=r,S={...v};let $=b;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&($=!0),!$)throw new Error(se(21,d));const w=ht(S,$,f,d);g&&!S.light&&ht(S,g,void 0,"light"),h&&!S.dark&&ht(S,h,void 0,"dark");let C={defaultColorScheme:d,...w,cssVarPrefix:o,colorSchemeSelector:c,rootSelector:u,getCssVar:m,colorSchemes:S,font:{...No(w.typography),...w.font},spacing:oi(f.spacing)};Object.keys(C.colorSchemes).forEach(H=>{const i=C.colorSchemes[H].palette,y=T=>{const B=T.split("-"),G=B[1],Z=B[2];return m(T,i[G][Z])};if(i.mode==="light"&&(l(i.common,"background","#fff"),l(i.common,"onBackground","#000")),i.mode==="dark"&&(l(i.common,"background","#000"),l(i.common,"onBackground","#fff")),ai(i,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),i.mode==="light"){l(i.Alert,"errorColor",_(i.error.light,.6)),l(i.Alert,"infoColor",_(i.info.light,.6)),l(i.Alert,"successColor",_(i.success.light,.6)),l(i.Alert,"warningColor",_(i.warning.light,.6)),l(i.Alert,"errorFilledBg",y("palette-error-main")),l(i.Alert,"infoFilledBg",y("palette-info-main")),l(i.Alert,"successFilledBg",y("palette-success-main")),l(i.Alert,"warningFilledBg",y("palette-warning-main")),l(i.Alert,"errorFilledColor",J(()=>i.getContrastText(i.error.main))),l(i.Alert,"infoFilledColor",J(()=>i.getContrastText(i.info.main))),l(i.Alert,"successFilledColor",J(()=>i.getContrastText(i.success.main))),l(i.Alert,"warningFilledColor",J(()=>i.getContrastText(i.warning.main))),l(i.Alert,"errorStandardBg",O(i.error.light,.9)),l(i.Alert,"infoStandardBg",O(i.info.light,.9)),l(i.Alert,"successStandardBg",O(i.success.light,.9)),l(i.Alert,"warningStandardBg",O(i.warning.light,.9)),l(i.Alert,"errorIconColor",y("palette-error-main")),l(i.Alert,"infoIconColor",y("palette-info-main")),l(i.Alert,"successIconColor",y("palette-success-main")),l(i.Alert,"warningIconColor",y("palette-warning-main")),l(i.AppBar,"defaultBg",y("palette-grey-100")),l(i.Avatar,"defaultBg",y("palette-grey-400")),l(i.Button,"inheritContainedBg",y("palette-grey-300")),l(i.Button,"inheritContainedHoverBg",y("palette-grey-A100")),l(i.Chip,"defaultBorder",y("palette-grey-400")),l(i.Chip,"defaultAvatarColor",y("palette-grey-700")),l(i.Chip,"defaultIconColor",y("palette-grey-700")),l(i.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),l(i.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),l(i.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),l(i.LinearProgress,"primaryBg",O(i.primary.main,.62)),l(i.LinearProgress,"secondaryBg",O(i.secondary.main,.62)),l(i.LinearProgress,"errorBg",O(i.error.main,.62)),l(i.LinearProgress,"infoBg",O(i.info.main,.62)),l(i.LinearProgress,"successBg",O(i.success.main,.62)),l(i.LinearProgress,"warningBg",O(i.warning.main,.62)),l(i.Skeleton,"bg",`rgba(${y("palette-text-primaryChannel")} / 0.11)`),l(i.Slider,"primaryTrack",O(i.primary.main,.62)),l(i.Slider,"secondaryTrack",O(i.secondary.main,.62)),l(i.Slider,"errorTrack",O(i.error.main,.62)),l(i.Slider,"infoTrack",O(i.info.main,.62)),l(i.Slider,"successTrack",O(i.success.main,.62)),l(i.Slider,"warningTrack",O(i.warning.main,.62));const T=Ie(i.background.default,.8);l(i.SnackbarContent,"bg",T),l(i.SnackbarContent,"color",J(()=>i.getContrastText(T))),l(i.SpeedDialAction,"fabHoverBg",Ie(i.background.paper,.15)),l(i.StepConnector,"border",y("palette-grey-400")),l(i.StepContent,"border",y("palette-grey-400")),l(i.Switch,"defaultColor",y("palette-common-white")),l(i.Switch,"defaultDisabledColor",y("palette-grey-100")),l(i.Switch,"primaryDisabledColor",O(i.primary.main,.62)),l(i.Switch,"secondaryDisabledColor",O(i.secondary.main,.62)),l(i.Switch,"errorDisabledColor",O(i.error.main,.62)),l(i.Switch,"infoDisabledColor",O(i.info.main,.62)),l(i.Switch,"successDisabledColor",O(i.success.main,.62)),l(i.Switch,"warningDisabledColor",O(i.warning.main,.62)),l(i.TableCell,"border",O(Be(i.divider,1),.88)),l(i.Tooltip,"bg",Be(i.grey[700],.92))}if(i.mode==="dark"){l(i.Alert,"errorColor",O(i.error.light,.6)),l(i.Alert,"infoColor",O(i.info.light,.6)),l(i.Alert,"successColor",O(i.success.light,.6)),l(i.Alert,"warningColor",O(i.warning.light,.6)),l(i.Alert,"errorFilledBg",y("palette-error-dark")),l(i.Alert,"infoFilledBg",y("palette-info-dark")),l(i.Alert,"successFilledBg",y("palette-success-dark")),l(i.Alert,"warningFilledBg",y("palette-warning-dark")),l(i.Alert,"errorFilledColor",J(()=>i.getContrastText(i.error.dark))),l(i.Alert,"infoFilledColor",J(()=>i.getContrastText(i.info.dark))),l(i.Alert,"successFilledColor",J(()=>i.getContrastText(i.success.dark))),l(i.Alert,"warningFilledColor",J(()=>i.getContrastText(i.warning.dark))),l(i.Alert,"errorStandardBg",_(i.error.light,.9)),l(i.Alert,"infoStandardBg",_(i.info.light,.9)),l(i.Alert,"successStandardBg",_(i.success.light,.9)),l(i.Alert,"warningStandardBg",_(i.warning.light,.9)),l(i.Alert,"errorIconColor",y("palette-error-main")),l(i.Alert,"infoIconColor",y("palette-info-main")),l(i.Alert,"successIconColor",y("palette-success-main")),l(i.Alert,"warningIconColor",y("palette-warning-main")),l(i.AppBar,"defaultBg",y("palette-grey-900")),l(i.AppBar,"darkBg",y("palette-background-paper")),l(i.AppBar,"darkColor",y("palette-text-primary")),l(i.Avatar,"defaultBg",y("palette-grey-600")),l(i.Button,"inheritContainedBg",y("palette-grey-800")),l(i.Button,"inheritContainedHoverBg",y("palette-grey-700")),l(i.Chip,"defaultBorder",y("palette-grey-700")),l(i.Chip,"defaultAvatarColor",y("palette-grey-300")),l(i.Chip,"defaultIconColor",y("palette-grey-300")),l(i.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),l(i.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),l(i.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),l(i.LinearProgress,"primaryBg",_(i.primary.main,.5)),l(i.LinearProgress,"secondaryBg",_(i.secondary.main,.5)),l(i.LinearProgress,"errorBg",_(i.error.main,.5)),l(i.LinearProgress,"infoBg",_(i.info.main,.5)),l(i.LinearProgress,"successBg",_(i.success.main,.5)),l(i.LinearProgress,"warningBg",_(i.warning.main,.5)),l(i.Skeleton,"bg",`rgba(${y("palette-text-primaryChannel")} / 0.13)`),l(i.Slider,"primaryTrack",_(i.primary.main,.5)),l(i.Slider,"secondaryTrack",_(i.secondary.main,.5)),l(i.Slider,"errorTrack",_(i.error.main,.5)),l(i.Slider,"infoTrack",_(i.info.main,.5)),l(i.Slider,"successTrack",_(i.success.main,.5)),l(i.Slider,"warningTrack",_(i.warning.main,.5));const T=Ie(i.background.default,.98);l(i.SnackbarContent,"bg",T),l(i.SnackbarContent,"color",J(()=>i.getContrastText(T))),l(i.SpeedDialAction,"fabHoverBg",Ie(i.background.paper,.15)),l(i.StepConnector,"border",y("palette-grey-600")),l(i.StepContent,"border",y("palette-grey-600")),l(i.Switch,"defaultColor",y("palette-grey-300")),l(i.Switch,"defaultDisabledColor",y("palette-grey-600")),l(i.Switch,"primaryDisabledColor",_(i.primary.main,.55)),l(i.Switch,"secondaryDisabledColor",_(i.secondary.main,.55)),l(i.Switch,"errorDisabledColor",_(i.error.main,.55)),l(i.Switch,"infoDisabledColor",_(i.info.main,.55)),l(i.Switch,"successDisabledColor",_(i.success.main,.55)),l(i.Switch,"warningDisabledColor",_(i.warning.main,.55)),l(i.TableCell,"border",_(Be(i.divider,1),.68)),l(i.Tooltip,"bg",Be(i.grey[700],.92))}ne(i.background,"default"),ne(i.background,"paper"),ne(i.common,"background"),ne(i.common,"onBackground"),ne(i,"divider"),Object.keys(i).forEach(T=>{const B=i[T];T!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&l(i[T],"mainChannel",xe(we(B.main))),B.light&&l(i[T],"lightChannel",xe(we(B.light))),B.dark&&l(i[T],"darkChannel",xe(we(B.dark))),B.contrastText&&l(i[T],"contrastTextChannel",xe(we(B.contrastText))),T==="text"&&(ne(i[T],"primary"),ne(i[T],"secondary")),T==="action"&&(B.active&&ne(i[T],"active"),B.selected&&ne(i[T],"selected")))})}),C=t.reduce((H,i)=>K(H,i),C);const k={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:ni(C)},{vars:A,generateThemeVars:x,generateStyleSheets:D}=Po(C,k);return C.vars=A,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([H,i])=>{C[H]=i}),C.generateThemeVars=x,C.generateStyleSheets=D,C.generateSpacing=function(){return Ir(f.spacing,It(this))},C.getColorSchemeSelector=Eo(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...ut,...f==null?void 0:f.unstable_sxConfig},C.unstable_sx=function(i){return ye({sx:i,theme:this})},C.toRuntimeSource=Hr,C}function lr(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:zt({...r===!0?{}:r.palette,mode:t})})}function ci(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...s}=e,c=o||"light",u=a==null?void 0:a[c],f={...a,...r?{[c]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return We(e,...t);let p=r;"palette"in e||f[c]&&(f[c]!==!0?p=f[c].palette:c==="dark"&&(p={mode:"dark"}));const d=We({...e,palette:p},...t);return d.defaultColorScheme=c,d.colorSchemes=f,d.palette.mode==="light"&&(d.colorSchemes.light={...f.light!==!0&&f.light,palette:d.palette},lr(d,"dark",f.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:d.palette},lr(d,"light",f.light)),d}return!r&&!("light"in f)&&c==="light"&&(f.light=!0),si({...s,colorSchemes:f,defaultColorScheme:c,...typeof n!="boolean"&&n},...t)}const li=ci();function ui(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const fi=e=>ui(e)&&e!=="classes",di=co({themeId:rn,defaultTheme:li,rootShouldForwardProp:fi}),mi=ko;function pi(e){return wo(e)}function hi(e){return Lr("MuiSvgIcon",e)}const Ri=ao("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),gi=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(r)}`]};return Co(a,hi,n)},yi=di("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ge(r.color)}`],t[`fontSize${ge(r.fontSize)}`]]}})(mi(({theme:e})=>{var t,r,n,a,o,s,c,u,f,p,d,m,b,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((p=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:p.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var v,S;return{props:{color:h},style:{color:(S=(v=(e.vars??e).palette)==null?void 0:v[h])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(m=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(g=(b=(e.vars??e).palette)==null?void 0:b.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wt=I.forwardRef(function(t,r){const n=pi({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:c="svg",fontSize:u="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:d,viewBox:m="0 0 24 24",...b}=n,g=I.isValidElement(a)&&a.type==="svg",h={...n,color:s,component:c,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:m,hasSvgAsChild:g},v={};p||(v.viewBox=m);const S=gi(h);return ze.jsxs(yi,{as:c,className:ro(S.root,o),focusable:"false",color:f,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...v,...b,...g&&a.props,ownerState:h,children:[g?a.props.children:a,d?ze.jsx("title",{children:d}):null]})});wt.muiName="SvgIcon";function Bi(e,t){function r(n,a){return ze.jsx(wt,{"data-testid":`${t}Icon`,ref:a,...n,children:e})}return r.muiName=wt.muiName,I.memo(I.forwardRef(r))}export{wt as $,Oe as A,Ir as B,oa as C,se as D,li as E,si as F,ue as G,Pe as H,fe as I,ce as J,to as K,ao as L,pi as M,Uo as N,di as O,Ai as P,mi as Q,Zo as R,Lt as S,rn as T,Nt as U,vo as V,fi as W,at as X,ui as Y,po as Z,gt as _,_o as a,ho as a0,Ei as a1,jr as a2,ie as a3,ft as a4,bo as a5,xt as a6,Oi as a7,qo as a8,Vo as a9,ei as aa,ti as ab,Do as ac,zo as ad,ri as ae,Ri as af,hi as ag,Pt as ah,Tr as ai,Et as aj,Ci as ak,Cr as al,$r as am,ki as an,wi as ao,xi as ap,Rn as aq,on as ar,_i as as,ci as b,Bi as c,So as d,ae as e,ut as f,de as g,ye as h,Gn as i,ze as j,ro as k,co as l,Ct as m,ge as n,Ce as o,Co as p,Fr as q,le as r,ea as s,Lr as t,Pi as u,oe as v,$i as w,It as x,K as y,Ti as z}; diff --git a/admin/assets/index-Cr2oG0C6.js b/admin/assets/index-Cqphet5i.js similarity index 99% rename from admin/assets/index-Cr2oG0C6.js rename to admin/assets/index-Cqphet5i.js index 26e0637a5..c8b9971b2 100644 --- a/admin/assets/index-Cr2oG0C6.js +++ b/admin/assets/index-Cqphet5i.js @@ -1,4 +1,4 @@ -import{i as I_,a as JI}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{j as f,c as Er,g as c0,r as u0,_ as x_,i as fS,P as Ve}from"./createSvgIcon-ChB2N0i2.js";import{i as d0,y as KI,_ as YI,a as qI,m as XI,S as mS,T as bS}from"./inheritsLoose-VBbEsHHj.js";import{R as ze,i as $e}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as D,I as Ja,a as qo,b as ZI,C as QI,c as D_,M as Ef,d as nv,e as H$,f as h0,F as ex,g as tx,h as sv,j as A_,k as nx,l as $w,m as vf,n as sx,o as Th,p as rx,q as Lv,r as ix,s as ox,t as ax,u as lx,v as cx,w as ux,x as p0,y as g0,z as dx,_ as hx,A as px,D as f0,B as Pv,E as m0,S as gx,L as fx,G as mx,H as O_,J as b0,K as bx,N as $x,O as vx,P as yx,Q as _x,R as wx,T as Cx,U as $S,V as Sx,W as vS,X as Tx,Y as Ex,Z as kx,$ as Ix,a0 as xx,a1 as Dx,a2 as Ax,a3 as Ox}from"./index-B0CiKPEe.js";import{g as Ka,c as Jo}from"./_commonjsHelpers-Cpj98o6Y.js";import{_ as Rx}from"./preload-helper-Dp1pzeXC.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();var $0,yS=d0;$0=yS.createRoot,yS.hydrateRoot;var v0={exports:{}},Rn={};/** @license React v17.0.2 +import{i as I_,a as JI}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{j as f,c as Er,g as c0,r as u0,_ as x_,i as fS,P as Ve}from"./createSvgIcon-BdRvDw53.js";import{i as d0,y as KI,_ as YI,a as qI,m as XI,S as mS,T as bS}from"./inheritsLoose-BW-3V39H.js";import{R as ze,i as $e}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as D,I as Ja,a as qo,b as ZI,C as QI,c as D_,M as Ef,d as nv,e as H$,f as h0,F as ex,g as tx,h as sv,j as A_,k as nx,l as $w,m as vf,n as sx,o as Th,p as rx,q as Lv,r as ix,s as ox,t as ax,u as lx,v as cx,w as ux,x as p0,y as g0,z as dx,_ as hx,A as px,D as f0,B as Pv,E as m0,S as gx,L as fx,G as mx,H as O_,J as b0,K as bx,N as $x,O as vx,P as yx,Q as _x,R as wx,T as Cx,U as $S,V as Sx,W as vS,X as Tx,Y as Ex,Z as kx,$ as Ix,a0 as xx,a1 as Dx,a2 as Ax,a3 as Ox}from"./index-qABB1JVe.js";import{g as Ka,c as Jo}from"./_commonjsHelpers-Cpj98o6Y.js";import{_ as Rx}from"./preload-helper-Dp1pzeXC.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();var $0,yS=d0;$0=yS.createRoot,yS.hydrateRoot;var v0={exports:{}},Rn={};/** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. diff --git a/admin/assets/index-GB1Q3dtw.js b/admin/assets/index-DJfSBoBB.js similarity index 99% rename from admin/assets/index-GB1Q3dtw.js rename to admin/assets/index-DJfSBoBB.js index aa1925c97..3a7f49b0a 100644 --- a/admin/assets/index-GB1Q3dtw.js +++ b/admin/assets/index-DJfSBoBB.js @@ -1,4 +1,4 @@ -import{j as f,e as hl,f as yl,s as xl,h as Cl,k as j,l as Sl,m as ps,u as wl,n as B,p as G,q as ds,t as V,v as br,w as Io,x as Rl,y as Sr,z as $l,A as Os,B as Pl,C as kl,b as si,D as Eo,E as ai,T as pn,F as Il,G as Tl,H as Ml,g as Ll,a as Al,I as Bl,o as El,J as Ol,r as Nl,K as ii,_ as zl,L as K,M as _,N as jl,O as P,Q as W,d as kt,R as Ns,c as Qt,S as Lo,U as Ao,V as tn,W as ae,P as he,X as Ar,Y as wr,Z as wo,$ as Dl}from"./createSvgIcon-ChB2N0i2.js";import{aa as pR,a7 as dR,a8 as uR,a3 as fR,a9 as gR,a5 as mR,a6 as bR,ag as vR,a0 as hR,a2 as yR,ad as xR,ac as CR,ae as SR,a4 as wR,a1 as RR,ab as $R,af as PR}from"./createSvgIcon-ChB2N0i2.js";import{G as Fl,u as ve,y as Wl,_ as li,R as Br,a as ci,k as Je,c as Oo,i as Hn,b as Ke}from"./inheritsLoose-VBbEsHHj.js";import{C as IR,E as TR,S as MR,T as LR,g as AR,d as BR}from"./inheritsLoose-VBbEsHHj.js";import{i as d,a as pi,R as ro}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{a as dn,u as le}from"./useTheme-Do7i4pX2.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";function Ul({styles:t,themeId:e,defaultTheme:o={}}){const r=dn(o),n=typeof t=="function"?t(e&&r[e]||r):t;return f.jsx(Fl,{styles:n})}const Hl=t=>{var r;const e={systemProps:{},otherProps:{}},o=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??yl;return Object.keys(t).forEach(n=>{o[n]?e.systemProps[n]=t[n]:e.otherProps[n]=t[n]}),e};function Rr(t){const{sx:e,...o}=t,{systemProps:r,otherProps:n}=Hl(o);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...a)=>{const i=e(...a);return hl(i)?{...r,...i}:r}:s={...r,...e},{...n,sx:s}}function Vl(t={}){const{themeId:e,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:n}=t,s=xl("div",{shouldForwardProp:i=>i!=="theme"&&i!=="sx"&&i!=="as"})(Cl);return d.forwardRef(function(l,c){const p=dn(o),{className:u,component:m="div",...g}=Rr(l);return f.jsx(s,{as:m,ref:c,className:j(u,n?n(r):r),theme:e&&p[e]||p,...g})})}const us=Sl();function fs(t){const{theme:e,name:o,props:r}=t;return!e||!e.components||!e.components[o]||!e.components[o].defaultProps?r:ps(e.components[o].defaultProps,r)}function un({props:t,name:e,defaultTheme:o,themeId:r}){let n=dn(o);return r&&(n=n[r]||n),fs({theme:n,name:e,props:t})}function Gl(t,e,o,r,n){const[s,a]=d.useState(()=>n&&o?o(t).matches:r?r(t).matches:e);return ve(()=>{if(!o)return;const i=o(t),l=()=>{a(i.matches)};return l(),i.addEventListener("change",l),()=>{i.removeEventListener("change",l)}},[t,o]),s}const Kl={...pi},di=Kl.useSyncExternalStore;function ql(t,e,o,r,n){const s=d.useCallback(()=>e,[e]),a=d.useMemo(()=>{if(n&&o)return()=>o(t).matches;if(r!==null){const{matches:p}=r(t);return()=>p}return s},[s,t,r,n,o]),[i,l]=d.useMemo(()=>{if(o===null)return[s,()=>()=>{}];const p=o(t);return[()=>p.matches,u=>(p.addEventListener("change",u),()=>{p.removeEventListener("change",u)})]},[s,o,t]);return di(l,i,a)}function ui(t={}){const{themeId:e}=t;return function(r,n={}){let s=wl();s&&e&&(s=s[e]||s);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:p=!1}=fs({name:"MuiUseMediaQuery",props:n,theme:s});let u=typeof r=="function"?r(s):r;return u=u.replace(/^@media( ?)/m,""),(di!==void 0?ql:Gl)(u,i,l,c,p)}}ui();function Vn(...t){return t.reduce((e,o)=>o==null?e:function(...n){e.apply(this,n),o.apply(this,n)},()=>{})}function $r(t,e=166){let o;function r(...n){const s=()=>{t.apply(this,n)};clearTimeout(o),o=setTimeout(s,e)}return r.clear=()=>{clearTimeout(o)},r}function mS(t,e){return()=>null}function ho(t,e){var o,r,n;return d.isValidElement(t)&&e.indexOf(t.type.muiName??((n=(r=(o=t.type)==null?void 0:o._payload)==null?void 0:r.value)==null?void 0:n.muiName))!==-1}function te(t){return t&&t.ownerDocument||document}function be(t){return te(t).defaultView||window}function bS(t,e){return()=>null}function Gn(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let zs=0;function Xl(t){const[e,o]=d.useState(t),r=t||e;return d.useEffect(()=>{e==null&&(zs+=1,o(`mui-${zs}`))},[e]),r}const _l={...pi},js=_l.useId;function De(t){if(js!==void 0){const e=js();return t??e}return Xl(t)}function vS(t,e,o,r,n){return null}function Te({controlled:t,default:e,name:o,state:r="value"}){const{current:n}=d.useRef(t!==void 0),[s,a]=d.useState(e),i=n?t:s,l=d.useCallback(c=>{n||a(c)},[]);return[i,l]}function ee(t){const e=d.useRef(t);return ve(()=>{e.current=t}),d.useRef((...o)=>(0,e.current)(...o)).current}function qt(...t){const e=d.useRef(void 0),o=d.useCallback(r=>{const n=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(r);return typeof i=="function"?i:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{n.forEach(s=>s==null?void 0:s())}},t);return d.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=o(r))},t)}const Ds={};function fi(t,e){const o=d.useRef(Ds);return o.current===Ds&&(o.current=t(e)),o}const Yl=[];function Zl(t){d.useEffect(t,Yl)}class fn{static create(){return new fn}currentId=null;start(e,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,o()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function no(){const t=fi(fn.create).current;return Zl(t.disposeEffect),t}function Ze(t){try{return t.matches(":focus-visible")}catch{}return!1}function gi(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const gs=t=>{const e=d.useRef({});return d.useEffect(()=>{e.current=t}),e.current};function mi(t){return d.Children.toArray(t).filter(e=>d.isValidElement(e))}const bi={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Ql(t){return typeof t=="string"}function vi(t,e,o){return t===void 0||Ql(t)?e:{...e,ownerState:{...e.ownerState,...o}}}function To(t,e=[]){if(t===void 0)return{};const o={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{o[r]=t[r]}),o}function Fs(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(o=>!(o.match(/^on[A-Z]/)&&typeof t[o]=="function")).forEach(o=>{e[o]=t[o]}),e}function hi(t){const{getSlotProps:e,additionalProps:o,externalSlotProps:r,externalForwardedProps:n,className:s}=t;if(!e){const g=j(o==null?void 0:o.className,s,n==null?void 0:n.className,r==null?void 0:r.className),b={...o==null?void 0:o.style,...n==null?void 0:n.style,...r==null?void 0:r.style},v={...o,...n,...r};return g.length>0&&(v.className=g),Object.keys(b).length>0&&(v.style=b),{props:v,internalRef:void 0}}const a=To({...n,...r}),i=Fs(r),l=Fs(n),c=e(a),p=j(c==null?void 0:c.className,o==null?void 0:o.className,s,n==null?void 0:n.className,r==null?void 0:r.className),u={...c==null?void 0:c.style,...o==null?void 0:o.style,...n==null?void 0:n.style,...r==null?void 0:r.style},m={...c,...o,...l,...i};return p.length>0&&(m.className=p),Object.keys(u).length>0&&(m.style=u),{props:m,internalRef:c.ref}}function yi(t,e,o){return typeof t=="function"?t(e,o):t}function me(t){var u;const{elementType:e,externalSlotProps:o,ownerState:r,skipResolvingSlotProps:n=!1,...s}=t,a=n?{}:yi(o,r),{props:i,internalRef:l}=hi({...s,externalSlotProps:a}),c=qt(l,a==null?void 0:a.ref,(u=t.additionalProps)==null?void 0:u.ref);return vi(e,{...i,ref:c},r)}function io(t){var e;return parseInt(d.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}const Jl=ds(),tc=us("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[`maxWidth${B(String(o.maxWidth))}`],o.fixed&&e.fixed,o.disableGutters&&e.disableGutters]}}),ec=t=>un({props:t,name:"MuiContainer",defaultTheme:Jl}),oc=(t,e)=>{const o=l=>V(e,l),{classes:r,fixed:n,disableGutters:s,maxWidth:a}=t,i={root:["root",a&&`maxWidth${B(String(a))}`,n&&"fixed",s&&"disableGutters"]};return G(i,o,r)};function rc(t={}){const{createStyledComponent:e=tc,useThemeProps:o=ec,componentName:r="MuiContainer"}=t,n=e(({theme:a,ownerState:i})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!i.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:i})=>i.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const p=c,u=a.breakpoints.values[p];return u!==0&&(l[a.breakpoints.up(p)]={maxWidth:`${u}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:i})=>({...i.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...i.maxWidth&&i.maxWidth!=="xs"&&{[a.breakpoints.up(i.maxWidth)]:{maxWidth:`${a.breakpoints.values[i.maxWidth]}${a.breakpoints.unit}`}}}));return d.forwardRef(function(i,l){const c=o(i),{className:p,component:u="div",disableGutters:m=!1,fixed:g=!1,maxWidth:b="lg",classes:v,...h}=c,y={...c,component:u,disableGutters:m,fixed:g,maxWidth:b},S=oc(y,r);return f.jsx(n,{as:u,ownerState:y,className:j(S.root,p),ref:l,...h})})}const nc=(t,e)=>t.filter(o=>e.includes(o)),_o=(t,e,o)=>{const r=t.keys[0];Array.isArray(e)?e.forEach((n,s)=>{o((a,i)=>{s<=t.keys.length-1&&(s===0?Object.assign(a,i):a[t.up(t.keys[s])]=i)},n)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:nc(t.keys,Object.keys(e))).forEach(s=>{if(t.keys.includes(s)){const a=e[s];a!==void 0&&o((i,l)=>{r===s?Object.assign(i,l):i[t.up(s)]=l},a)}}):(typeof e=="number"||typeof e=="string")&&o((n,s)=>{Object.assign(n,s)},e)};function en(t){return`--Grid-${t}Spacing`}function gn(t){return`--Grid-parent-${t}Spacing`}const Ws="--Grid-columns",Ho="--Grid-parent-columns",sc=({theme:t,ownerState:e})=>{const o={};return _o(t.breakpoints,e.size,(r,n)=>{let s={};n==="grow"&&(s={flexBasis:0,flexGrow:1,maxWidth:"100%"}),n==="auto"&&(s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof n=="number"&&(s={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${n} / var(${Ho}) - (var(${Ho}) - ${n}) * (var(${gn("column")}) / var(${Ho})))`}),r(o,s)}),o},ac=({theme:t,ownerState:e})=>{const o={};return _o(t.breakpoints,e.offset,(r,n)=>{let s={};n==="auto"&&(s={marginLeft:"auto"}),typeof n=="number"&&(s={marginLeft:n===0?"0px":`calc(100% * ${n} / var(${Ho}) + var(${gn("column")}) * ${n} / var(${Ho}))`}),r(o,s)}),o},ic=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={[Ws]:12};return _o(t.breakpoints,e.columns,(r,n)=>{const s=n??12;r(o,{[Ws]:s,"> *":{[Ho]:s}})}),o},lc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.rowSpacing,(r,n)=>{var a;const s=typeof n=="string"?n:(a=t.spacing)==null?void 0:a.call(t,n);r(o,{[en("row")]:s,"> *":{[gn("row")]:s}})}),o},cc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.columnSpacing,(r,n)=>{var a;const s=typeof n=="string"?n:(a=t.spacing)==null?void 0:a.call(t,n);r(o,{[en("column")]:s,"> *":{[gn("column")]:s}})}),o},pc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.direction,(r,n)=>{r(o,{flexDirection:n})}),o},dc=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${en("row")}) var(${en("column")})`}}),uc=t=>{const e=[];return Object.entries(t).forEach(([o,r])=>{r!==!1&&r!==void 0&&e.push(`grid-${o}-${String(r)}`)}),e},fc=(t,e="xs")=>{function o(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(o(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const r=[];return Object.entries(t).forEach(([n,s])=>{o(s)&&r.push(`spacing-${n}-${String(s)}`)}),r}return[]},gc=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,o])=>`direction-${e}-${o}`):[`direction-xs-${String(t)}`];function mc(t,e){t.item!==void 0&&delete t.item,t.zeroMinWidth!==void 0&&delete t.zeroMinWidth,e.keys.forEach(o=>{t[o]!==void 0&&delete t[o]})}const bc=ds(),vc=us("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function hc(t){return un({props:t,name:"MuiGrid",defaultTheme:bc})}function yc(t={}){const{createStyledComponent:e=vc,useThemeProps:o=hc,useTheme:r=dn,componentName:n="MuiGrid"}=t,s=(c,p)=>{const{container:u,direction:m,spacing:g,wrap:b,size:v}=c,h={root:["root",u&&"container",b!=="wrap"&&`wrap-xs-${String(b)}`,...gc(m),...uc(v),...u?fc(g,p.breakpoints.keys[0]):[]]};return G(h,y=>V(n,y),{})};function a(c,p,u=()=>!0){const m={};return c===null||(Array.isArray(c)?c.forEach((g,b)=>{g!==null&&u(g)&&p.keys[b]&&(m[p.keys[b]]=g)}):typeof c=="object"?Object.keys(c).forEach(g=>{const b=c[g];b!=null&&u(b)&&(m[g]=b)}):m[p.keys[0]]=c),m}const i=e(ic,cc,lc,sc,pc,dc,ac),l=d.forwardRef(function(p,u){const m=r(),g=o(p),b=Rr(g);mc(b,m.breakpoints);const{className:v,children:h,columns:y=12,container:S=!1,component:C="div",direction:x="row",wrap:w="wrap",size:$={},offset:k={},spacing:T=0,rowSpacing:A=T,columnSpacing:I=T,unstable_level:z=0,...E}=b,R=a($,m.breakpoints,U=>U!==!1),M=a(k,m.breakpoints),O=p.columns??(z?void 0:y),L=p.spacing??(z?void 0:T),F=p.rowSpacing??p.spacing??(z?void 0:A),D=p.columnSpacing??p.spacing??(z?void 0:I),N={...b,level:z,columns:O,container:S,direction:x,wrap:w,spacing:L,rowSpacing:F,columnSpacing:D,size:R,offset:M},Q=s(N,m);return f.jsx(i,{ref:u,as:C,ownerState:N,className:j(Q.root,v),...E,children:d.Children.map(h,U=>{var Ct;return d.isValidElement(U)&&ho(U,["Grid"])&&S&&U.props.container?d.cloneElement(U,{unstable_level:((Ct=U.props)==null?void 0:Ct.unstable_level)??z+1}):U})})});return l.muiName="Grid",l}const xc=ds(),Cc=us("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Sc(t){return un({props:t,name:"MuiStack",defaultTheme:xc})}function wc(t,e){const o=d.Children.toArray(t).filter(Boolean);return o.reduce((r,n,s)=>(r.push(n),s({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],$c=({ownerState:t,theme:e})=>{let o={display:"flex",flexDirection:"column",...br({theme:e},Io({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r}))};if(t.spacing){const r=Rl(e),n=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),s=Io({values:t.direction,base:n}),a=Io({values:t.spacing,base:n});typeof s=="object"&&Object.keys(s).forEach((l,c,p)=>{if(!s[l]){const m=c>0?s[p[c-1]]:"column";s[l]=m}}),o=Sr(o,br({theme:e},a,(l,c)=>t.useFlexGap?{gap:Os(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Rc(c?s[c]:t.direction)}`]:Os(r,l)}}))}return o=$l(e.breakpoints,o),o};function Pc(t={}){const{createStyledComponent:e=Cc,useThemeProps:o=Sc,componentName:r="MuiStack"}=t,n=()=>G({root:["root"]},l=>V(r,l),{}),s=e($c);return d.forwardRef(function(l,c){const p=o(l),u=Rr(p),{component:m="div",direction:g="column",spacing:b=0,divider:v,children:h,className:y,useFlexGap:S=!1,...C}=u,x={direction:g,spacing:b,useFlexGap:S},w=n();return f.jsx(s,{as:m,ownerState:x,ref:c,className:j(w.root,y),...C,children:v?wc(h,v):h})})}function hS(t){const{defaultProps:e={},mixins:o={},overrides:r={},palette:n={},props:s={},styleOverrides:a={},...i}=t,l={...i,components:{}};Object.keys(e).forEach(v=>{const h=l.components[v]||{};h.defaultProps=e[v],l.components[v]=h}),Object.keys(s).forEach(v=>{const h=l.components[v]||{};h.defaultProps=s[v],l.components[v]=h}),Object.keys(a).forEach(v=>{const h=l.components[v]||{};h.styleOverrides=a[v],l.components[v]=h}),Object.keys(r).forEach(v=>{const h=l.components[v]||{};h.styleOverrides=r[v],l.components[v]=h}),l.spacing=Pl(t.spacing);const c=kl(t.breakpoints||{}),p=l.spacing;l.mixins={gutters:(v={})=>({paddingLeft:p(2),paddingRight:p(2),...v,[c.up("sm")]:{paddingLeft:p(3),paddingRight:p(3),...v[c.up("sm")]}}),...o};const{type:u,mode:m,...g}=n,b=m||u||"light";return l.palette={text:{hint:b==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:b,type:b,...g},l}function yS(t,...e){return si(Sr({unstable_strictMode:!0},t),...e)}let Us=!1;function xS(t){return Us||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join(` +import{j as f,e as hl,f as yl,s as xl,h as Cl,k as j,l as Sl,m as ps,u as wl,n as B,p as G,q as ds,t as V,v as br,w as Io,x as Rl,y as Sr,z as $l,A as Os,B as Pl,C as kl,b as si,D as Eo,E as ai,T as pn,F as Il,G as Tl,H as Ml,g as Ll,a as Al,I as Bl,o as El,J as Ol,r as Nl,K as ii,_ as zl,L as K,M as _,N as jl,O as P,Q as W,d as kt,R as Ns,c as Qt,S as Lo,U as Ao,V as tn,W as ae,P as he,X as Ar,Y as wr,Z as wo,$ as Dl}from"./createSvgIcon-BdRvDw53.js";import{aa as pR,a7 as dR,a8 as uR,a3 as fR,a9 as gR,a5 as mR,a6 as bR,ag as vR,a0 as hR,a2 as yR,ad as xR,ac as CR,ae as SR,a4 as wR,a1 as RR,ab as $R,af as PR}from"./createSvgIcon-BdRvDw53.js";import{G as Fl,u as ve,y as Wl,_ as li,R as Br,a as ci,k as Je,c as Oo,i as Hn,b as Ke}from"./inheritsLoose-BW-3V39H.js";import{C as IR,E as TR,S as MR,T as LR,g as AR,d as BR}from"./inheritsLoose-BW-3V39H.js";import{i as d,a as pi,R as ro}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{a as dn,u as le}from"./useTheme-Cl1QmYFL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";function Ul({styles:t,themeId:e,defaultTheme:o={}}){const r=dn(o),n=typeof t=="function"?t(e&&r[e]||r):t;return f.jsx(Fl,{styles:n})}const Hl=t=>{var r;const e={systemProps:{},otherProps:{}},o=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??yl;return Object.keys(t).forEach(n=>{o[n]?e.systemProps[n]=t[n]:e.otherProps[n]=t[n]}),e};function Rr(t){const{sx:e,...o}=t,{systemProps:r,otherProps:n}=Hl(o);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...a)=>{const i=e(...a);return hl(i)?{...r,...i}:r}:s={...r,...e},{...n,sx:s}}function Vl(t={}){const{themeId:e,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:n}=t,s=xl("div",{shouldForwardProp:i=>i!=="theme"&&i!=="sx"&&i!=="as"})(Cl);return d.forwardRef(function(l,c){const p=dn(o),{className:u,component:m="div",...g}=Rr(l);return f.jsx(s,{as:m,ref:c,className:j(u,n?n(r):r),theme:e&&p[e]||p,...g})})}const us=Sl();function fs(t){const{theme:e,name:o,props:r}=t;return!e||!e.components||!e.components[o]||!e.components[o].defaultProps?r:ps(e.components[o].defaultProps,r)}function un({props:t,name:e,defaultTheme:o,themeId:r}){let n=dn(o);return r&&(n=n[r]||n),fs({theme:n,name:e,props:t})}function Gl(t,e,o,r,n){const[s,a]=d.useState(()=>n&&o?o(t).matches:r?r(t).matches:e);return ve(()=>{if(!o)return;const i=o(t),l=()=>{a(i.matches)};return l(),i.addEventListener("change",l),()=>{i.removeEventListener("change",l)}},[t,o]),s}const Kl={...pi},di=Kl.useSyncExternalStore;function ql(t,e,o,r,n){const s=d.useCallback(()=>e,[e]),a=d.useMemo(()=>{if(n&&o)return()=>o(t).matches;if(r!==null){const{matches:p}=r(t);return()=>p}return s},[s,t,r,n,o]),[i,l]=d.useMemo(()=>{if(o===null)return[s,()=>()=>{}];const p=o(t);return[()=>p.matches,u=>(p.addEventListener("change",u),()=>{p.removeEventListener("change",u)})]},[s,o,t]);return di(l,i,a)}function ui(t={}){const{themeId:e}=t;return function(r,n={}){let s=wl();s&&e&&(s=s[e]||s);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:p=!1}=fs({name:"MuiUseMediaQuery",props:n,theme:s});let u=typeof r=="function"?r(s):r;return u=u.replace(/^@media( ?)/m,""),(di!==void 0?ql:Gl)(u,i,l,c,p)}}ui();function Vn(...t){return t.reduce((e,o)=>o==null?e:function(...n){e.apply(this,n),o.apply(this,n)},()=>{})}function $r(t,e=166){let o;function r(...n){const s=()=>{t.apply(this,n)};clearTimeout(o),o=setTimeout(s,e)}return r.clear=()=>{clearTimeout(o)},r}function mS(t,e){return()=>null}function ho(t,e){var o,r,n;return d.isValidElement(t)&&e.indexOf(t.type.muiName??((n=(r=(o=t.type)==null?void 0:o._payload)==null?void 0:r.value)==null?void 0:n.muiName))!==-1}function te(t){return t&&t.ownerDocument||document}function be(t){return te(t).defaultView||window}function bS(t,e){return()=>null}function Gn(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let zs=0;function Xl(t){const[e,o]=d.useState(t),r=t||e;return d.useEffect(()=>{e==null&&(zs+=1,o(`mui-${zs}`))},[e]),r}const _l={...pi},js=_l.useId;function De(t){if(js!==void 0){const e=js();return t??e}return Xl(t)}function vS(t,e,o,r,n){return null}function Te({controlled:t,default:e,name:o,state:r="value"}){const{current:n}=d.useRef(t!==void 0),[s,a]=d.useState(e),i=n?t:s,l=d.useCallback(c=>{n||a(c)},[]);return[i,l]}function ee(t){const e=d.useRef(t);return ve(()=>{e.current=t}),d.useRef((...o)=>(0,e.current)(...o)).current}function qt(...t){const e=d.useRef(void 0),o=d.useCallback(r=>{const n=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(r);return typeof i=="function"?i:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{n.forEach(s=>s==null?void 0:s())}},t);return d.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=o(r))},t)}const Ds={};function fi(t,e){const o=d.useRef(Ds);return o.current===Ds&&(o.current=t(e)),o}const Yl=[];function Zl(t){d.useEffect(t,Yl)}class fn{static create(){return new fn}currentId=null;start(e,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,o()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function no(){const t=fi(fn.create).current;return Zl(t.disposeEffect),t}function Ze(t){try{return t.matches(":focus-visible")}catch{}return!1}function gi(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const gs=t=>{const e=d.useRef({});return d.useEffect(()=>{e.current=t}),e.current};function mi(t){return d.Children.toArray(t).filter(e=>d.isValidElement(e))}const bi={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Ql(t){return typeof t=="string"}function vi(t,e,o){return t===void 0||Ql(t)?e:{...e,ownerState:{...e.ownerState,...o}}}function To(t,e=[]){if(t===void 0)return{};const o={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{o[r]=t[r]}),o}function Fs(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(o=>!(o.match(/^on[A-Z]/)&&typeof t[o]=="function")).forEach(o=>{e[o]=t[o]}),e}function hi(t){const{getSlotProps:e,additionalProps:o,externalSlotProps:r,externalForwardedProps:n,className:s}=t;if(!e){const g=j(o==null?void 0:o.className,s,n==null?void 0:n.className,r==null?void 0:r.className),b={...o==null?void 0:o.style,...n==null?void 0:n.style,...r==null?void 0:r.style},v={...o,...n,...r};return g.length>0&&(v.className=g),Object.keys(b).length>0&&(v.style=b),{props:v,internalRef:void 0}}const a=To({...n,...r}),i=Fs(r),l=Fs(n),c=e(a),p=j(c==null?void 0:c.className,o==null?void 0:o.className,s,n==null?void 0:n.className,r==null?void 0:r.className),u={...c==null?void 0:c.style,...o==null?void 0:o.style,...n==null?void 0:n.style,...r==null?void 0:r.style},m={...c,...o,...l,...i};return p.length>0&&(m.className=p),Object.keys(u).length>0&&(m.style=u),{props:m,internalRef:c.ref}}function yi(t,e,o){return typeof t=="function"?t(e,o):t}function me(t){var u;const{elementType:e,externalSlotProps:o,ownerState:r,skipResolvingSlotProps:n=!1,...s}=t,a=n?{}:yi(o,r),{props:i,internalRef:l}=hi({...s,externalSlotProps:a}),c=qt(l,a==null?void 0:a.ref,(u=t.additionalProps)==null?void 0:u.ref);return vi(e,{...i,ref:c},r)}function io(t){var e;return parseInt(d.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}const Jl=ds(),tc=us("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[`maxWidth${B(String(o.maxWidth))}`],o.fixed&&e.fixed,o.disableGutters&&e.disableGutters]}}),ec=t=>un({props:t,name:"MuiContainer",defaultTheme:Jl}),oc=(t,e)=>{const o=l=>V(e,l),{classes:r,fixed:n,disableGutters:s,maxWidth:a}=t,i={root:["root",a&&`maxWidth${B(String(a))}`,n&&"fixed",s&&"disableGutters"]};return G(i,o,r)};function rc(t={}){const{createStyledComponent:e=tc,useThemeProps:o=ec,componentName:r="MuiContainer"}=t,n=e(({theme:a,ownerState:i})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!i.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:i})=>i.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const p=c,u=a.breakpoints.values[p];return u!==0&&(l[a.breakpoints.up(p)]={maxWidth:`${u}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:i})=>({...i.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...i.maxWidth&&i.maxWidth!=="xs"&&{[a.breakpoints.up(i.maxWidth)]:{maxWidth:`${a.breakpoints.values[i.maxWidth]}${a.breakpoints.unit}`}}}));return d.forwardRef(function(i,l){const c=o(i),{className:p,component:u="div",disableGutters:m=!1,fixed:g=!1,maxWidth:b="lg",classes:v,...h}=c,y={...c,component:u,disableGutters:m,fixed:g,maxWidth:b},S=oc(y,r);return f.jsx(n,{as:u,ownerState:y,className:j(S.root,p),ref:l,...h})})}const nc=(t,e)=>t.filter(o=>e.includes(o)),_o=(t,e,o)=>{const r=t.keys[0];Array.isArray(e)?e.forEach((n,s)=>{o((a,i)=>{s<=t.keys.length-1&&(s===0?Object.assign(a,i):a[t.up(t.keys[s])]=i)},n)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:nc(t.keys,Object.keys(e))).forEach(s=>{if(t.keys.includes(s)){const a=e[s];a!==void 0&&o((i,l)=>{r===s?Object.assign(i,l):i[t.up(s)]=l},a)}}):(typeof e=="number"||typeof e=="string")&&o((n,s)=>{Object.assign(n,s)},e)};function en(t){return`--Grid-${t}Spacing`}function gn(t){return`--Grid-parent-${t}Spacing`}const Ws="--Grid-columns",Ho="--Grid-parent-columns",sc=({theme:t,ownerState:e})=>{const o={};return _o(t.breakpoints,e.size,(r,n)=>{let s={};n==="grow"&&(s={flexBasis:0,flexGrow:1,maxWidth:"100%"}),n==="auto"&&(s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof n=="number"&&(s={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${n} / var(${Ho}) - (var(${Ho}) - ${n}) * (var(${gn("column")}) / var(${Ho})))`}),r(o,s)}),o},ac=({theme:t,ownerState:e})=>{const o={};return _o(t.breakpoints,e.offset,(r,n)=>{let s={};n==="auto"&&(s={marginLeft:"auto"}),typeof n=="number"&&(s={marginLeft:n===0?"0px":`calc(100% * ${n} / var(${Ho}) + var(${gn("column")}) * ${n} / var(${Ho}))`}),r(o,s)}),o},ic=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={[Ws]:12};return _o(t.breakpoints,e.columns,(r,n)=>{const s=n??12;r(o,{[Ws]:s,"> *":{[Ho]:s}})}),o},lc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.rowSpacing,(r,n)=>{var a;const s=typeof n=="string"?n:(a=t.spacing)==null?void 0:a.call(t,n);r(o,{[en("row")]:s,"> *":{[gn("row")]:s}})}),o},cc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.columnSpacing,(r,n)=>{var a;const s=typeof n=="string"?n:(a=t.spacing)==null?void 0:a.call(t,n);r(o,{[en("column")]:s,"> *":{[gn("column")]:s}})}),o},pc=({theme:t,ownerState:e})=>{if(!e.container)return{};const o={};return _o(t.breakpoints,e.direction,(r,n)=>{r(o,{flexDirection:n})}),o},dc=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${en("row")}) var(${en("column")})`}}),uc=t=>{const e=[];return Object.entries(t).forEach(([o,r])=>{r!==!1&&r!==void 0&&e.push(`grid-${o}-${String(r)}`)}),e},fc=(t,e="xs")=>{function o(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(o(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const r=[];return Object.entries(t).forEach(([n,s])=>{o(s)&&r.push(`spacing-${n}-${String(s)}`)}),r}return[]},gc=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,o])=>`direction-${e}-${o}`):[`direction-xs-${String(t)}`];function mc(t,e){t.item!==void 0&&delete t.item,t.zeroMinWidth!==void 0&&delete t.zeroMinWidth,e.keys.forEach(o=>{t[o]!==void 0&&delete t[o]})}const bc=ds(),vc=us("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function hc(t){return un({props:t,name:"MuiGrid",defaultTheme:bc})}function yc(t={}){const{createStyledComponent:e=vc,useThemeProps:o=hc,useTheme:r=dn,componentName:n="MuiGrid"}=t,s=(c,p)=>{const{container:u,direction:m,spacing:g,wrap:b,size:v}=c,h={root:["root",u&&"container",b!=="wrap"&&`wrap-xs-${String(b)}`,...gc(m),...uc(v),...u?fc(g,p.breakpoints.keys[0]):[]]};return G(h,y=>V(n,y),{})};function a(c,p,u=()=>!0){const m={};return c===null||(Array.isArray(c)?c.forEach((g,b)=>{g!==null&&u(g)&&p.keys[b]&&(m[p.keys[b]]=g)}):typeof c=="object"?Object.keys(c).forEach(g=>{const b=c[g];b!=null&&u(b)&&(m[g]=b)}):m[p.keys[0]]=c),m}const i=e(ic,cc,lc,sc,pc,dc,ac),l=d.forwardRef(function(p,u){const m=r(),g=o(p),b=Rr(g);mc(b,m.breakpoints);const{className:v,children:h,columns:y=12,container:S=!1,component:C="div",direction:x="row",wrap:w="wrap",size:$={},offset:k={},spacing:T=0,rowSpacing:A=T,columnSpacing:I=T,unstable_level:z=0,...E}=b,R=a($,m.breakpoints,U=>U!==!1),M=a(k,m.breakpoints),O=p.columns??(z?void 0:y),L=p.spacing??(z?void 0:T),F=p.rowSpacing??p.spacing??(z?void 0:A),D=p.columnSpacing??p.spacing??(z?void 0:I),N={...b,level:z,columns:O,container:S,direction:x,wrap:w,spacing:L,rowSpacing:F,columnSpacing:D,size:R,offset:M},Q=s(N,m);return f.jsx(i,{ref:u,as:C,ownerState:N,className:j(Q.root,v),...E,children:d.Children.map(h,U=>{var Ct;return d.isValidElement(U)&&ho(U,["Grid"])&&S&&U.props.container?d.cloneElement(U,{unstable_level:((Ct=U.props)==null?void 0:Ct.unstable_level)??z+1}):U})})});return l.muiName="Grid",l}const xc=ds(),Cc=us("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Sc(t){return un({props:t,name:"MuiStack",defaultTheme:xc})}function wc(t,e){const o=d.Children.toArray(t).filter(Boolean);return o.reduce((r,n,s)=>(r.push(n),s({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],$c=({ownerState:t,theme:e})=>{let o={display:"flex",flexDirection:"column",...br({theme:e},Io({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r}))};if(t.spacing){const r=Rl(e),n=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),s=Io({values:t.direction,base:n}),a=Io({values:t.spacing,base:n});typeof s=="object"&&Object.keys(s).forEach((l,c,p)=>{if(!s[l]){const m=c>0?s[p[c-1]]:"column";s[l]=m}}),o=Sr(o,br({theme:e},a,(l,c)=>t.useFlexGap?{gap:Os(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Rc(c?s[c]:t.direction)}`]:Os(r,l)}}))}return o=$l(e.breakpoints,o),o};function Pc(t={}){const{createStyledComponent:e=Cc,useThemeProps:o=Sc,componentName:r="MuiStack"}=t,n=()=>G({root:["root"]},l=>V(r,l),{}),s=e($c);return d.forwardRef(function(l,c){const p=o(l),u=Rr(p),{component:m="div",direction:g="column",spacing:b=0,divider:v,children:h,className:y,useFlexGap:S=!1,...C}=u,x={direction:g,spacing:b,useFlexGap:S},w=n();return f.jsx(s,{as:m,ownerState:x,ref:c,className:j(w.root,y),...C,children:v?wc(h,v):h})})}function hS(t){const{defaultProps:e={},mixins:o={},overrides:r={},palette:n={},props:s={},styleOverrides:a={},...i}=t,l={...i,components:{}};Object.keys(e).forEach(v=>{const h=l.components[v]||{};h.defaultProps=e[v],l.components[v]=h}),Object.keys(s).forEach(v=>{const h=l.components[v]||{};h.defaultProps=s[v],l.components[v]=h}),Object.keys(a).forEach(v=>{const h=l.components[v]||{};h.styleOverrides=a[v],l.components[v]=h}),Object.keys(r).forEach(v=>{const h=l.components[v]||{};h.styleOverrides=r[v],l.components[v]=h}),l.spacing=Pl(t.spacing);const c=kl(t.breakpoints||{}),p=l.spacing;l.mixins={gutters:(v={})=>({paddingLeft:p(2),paddingRight:p(2),...v,[c.up("sm")]:{paddingLeft:p(3),paddingRight:p(3),...v[c.up("sm")]}}),...o};const{type:u,mode:m,...g}=n,b=m||u||"light";return l.palette={text:{hint:b==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:b,type:b,...g},l}function yS(t,...e){return si(Sr({unstable_strictMode:!0},t),...e)}let Us=!1;function xS(t){return Us||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join(` `)),Us=!0),t}function Hs(t){return String(parseFloat(t)).length===String(t).length}function xi(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function go(t){return parseFloat(t)}function kc(t){return(e,o)=>{const r=xi(e);if(r===o)return e;let n=go(e);r!=="px"&&(r==="em"||r==="rem")&&(n=go(e)*go(t));let s=n;if(o!=="px")if(o==="em")s=n/go(t);else if(o==="rem")s=n/go(t);else return e;return parseFloat(s.toFixed(5))+o}}function Ic({size:t,grid:e}){const o=t-t%e,r=o+e;return t-o{let c=e+i*l;s!==null&&(c=s(c)),a[`@media (min-width:${l}px)`]={[t]:`${Math.round(c*1e4)/1e4}${r}`}}),a}function CS(t,e={}){const{breakpoints:o=["sm","md","lg"],disableAlign:r=!1,factor:n=2,variants:s=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=e,a={...t};a.typography={...a.typography};const i=a.typography,l=kc(i.htmlFontSize),c=o.map(p=>a.breakpoints.values[p]);return s.forEach(p=>{const u=i[p];if(!u)return;const m=parseFloat(l(u.fontSize,"rem"));if(m<=1)return;const g=m,b=1+(g-1)/n;let{lineHeight:v}=u;if(!Hs(v)&&!r)throw new Error(Eo(6));Hs(v)||(v=parseFloat(l(v,"rem"))/parseFloat(m));let h=null;r||(h=y=>Ic({size:y,grid:Tc({pixels:4,lineHeight:v,htmlFontSize:i.htmlFontSize})})),i[p]={...u,...Mc({cssProperty:"fontSize",min:b,max:g,unit:"rem",breakpoints:c,transform:h})}}),a}function SS({props:t,name:e}){return un({props:t,name:e,defaultTheme:ai,themeId:pn})}function wS(){throw new Error(Eo(14))}function RS(){throw new Error(Eo(15))}function $S(){throw new Error(Eo(16))}let Vs=!1;function PS(...t){return Vs||(console.warn(["MUI: The `experimental_extendTheme` has been stabilized.","","You should use `import { extendTheme } from '@mui/material/styles'`"].join(` `)),Vs=!0),Il(...t)}function kS(){throw new Error(Eo(19))}const Lc={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ac={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},Bc={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Ec={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},Oc={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},Nc={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},zc={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},jc={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},Dc={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},Fc={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},Wc={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},IS=Object.freeze(Object.defineProperty({__proto__:null,amber:jc,blue:Tl,blueGrey:Wc,brown:Fc,common:Ml,cyan:Ec,deepOrange:Dc,deepPurple:Ac,green:Ll,grey:Al,indigo:Bc,lightBlue:Bl,lightGreen:Nc,lime:zc,orange:El,pink:Lc,purple:Ol,red:Nl,teal:Oc,yellow:Wl},Symbol.toStringTag,{value:"Module"}));function Uc(t){return f.jsx(Ul,{...t,defaultTheme:ai,themeId:pn})}function ms(t){return function(o){return f.jsx(Uc,{styles:typeof t=="function"?r=>t({theme:r,...o}):t})}}function Hc(){return Rr}function Vo(t,e){if(!t)return e;if(typeof t=="function"||typeof e=="function")return n=>{const s=typeof e=="function"?e(n):e,a=typeof t=="function"?t({...n,...s}):t,i=j(n==null?void 0:n.className,s==null?void 0:s.className,a==null?void 0:a.className);return{...s,...a,...!!i&&{className:i},...(s==null?void 0:s.style)&&(a==null?void 0:a.style)&&{style:{...s.style,...a.style}},...(s==null?void 0:s.sx)&&(a==null?void 0:a.sx)&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};const o=e,r=j(o==null?void 0:o.className,t==null?void 0:t.className);return{...e,...t,...!!r&&{className:r},...(o==null?void 0:o.style)&&(t==null?void 0:t.style)&&{style:{...o.style,...t.style}},...(o==null?void 0:o.sx)&&(t==null?void 0:t.sx)&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const TS={configure:t=>{ii.configure(t)}},Gs={disabled:!1},on=ro.createContext(null);var Vc=function(e){return e.scrollTop},lr="unmounted",Co="exited",So="entering",Do="entered",Kn="exiting",Le=function(t){li(e,t);function e(r,n){var s;s=t.call(this,r,n)||this;var a=n,i=a&&!a.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?i?(l=Co,s.appearStatus=So):l=Do:r.unmountOnExit||r.mountOnEnter?l=lr:l=Co,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(n,s){var a=n.in;return a&&s.status===lr?{status:Co}:null};var o=e.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(n){var s=null;if(n!==this.props){var a=this.state.status;this.props.in?a!==So&&a!==Do&&(s=So):(a===So||a===Do)&&(s=Kn)}this.updateStatus(!1,s)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var n=this.props.timeout,s,a,i;return s=a=i=n,n!=null&&typeof n!="number"&&(s=n.exit,a=n.enter,i=n.appear!==void 0?n.appear:a),{exit:s,enter:a,appear:i}},o.updateStatus=function(n,s){if(n===void 0&&(n=!1),s!==null)if(this.cancelNextCallback(),s===So){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Br.findDOMNode(this);a&&Vc(a)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Co&&this.setState({status:lr})},o.performEnter=function(n){var s=this,a=this.props.enter,i=this.context?this.context.isMounting:n,l=this.props.nodeRef?[i]:[Br.findDOMNode(this),i],c=l[0],p=l[1],u=this.getTimeouts(),m=i?u.appear:u.enter;if(!n&&!a||Gs.disabled){this.safeSetState({status:Do},function(){s.props.onEntered(c)});return}this.props.onEnter(c,p),this.safeSetState({status:So},function(){s.props.onEntering(c,p),s.onTransitionEnd(m,function(){s.safeSetState({status:Do},function(){s.props.onEntered(c,p)})})})},o.performExit=function(){var n=this,s=this.props.exit,a=this.getTimeouts(),i=this.props.nodeRef?void 0:Br.findDOMNode(this);if(!s||Gs.disabled){this.safeSetState({status:Co},function(){n.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:Kn},function(){n.props.onExiting(i),n.onTransitionEnd(a.exit,function(){n.safeSetState({status:Co},function(){n.props.onExited(i)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(n,s){s=this.setNextCallback(s),this.setState(n,s)},o.setNextCallback=function(n){var s=this,a=!0;return this.nextCallback=function(i){a&&(a=!1,s.nextCallback=null,n(i))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},o.onTransitionEnd=function(n,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:Br.findDOMNode(this),i=n==null&&!this.props.addEndListener;if(!a||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],p=l[1];this.props.addEndListener(c,p)}n!=null&&setTimeout(this.nextCallback,n)},o.render=function(){var n=this.state.status;if(n===lr)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var i=ci(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ro.createElement(on.Provider,{value:null},typeof a=="function"?a(n,i):ro.cloneElement(ro.Children.only(a),i))},e}(ro.Component);Le.contextType=on;Le.propTypes={};function zo(){}Le.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zo,onEntering:zo,onEntered:zo,onExit:zo,onExiting:zo,onExited:zo};Le.UNMOUNTED=lr;Le.EXITED=Co;Le.ENTERING=So;Le.ENTERED=Do;Le.EXITING=Kn;function Gc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bs(t,e){var o=function(s){return e&&d.isValidElement(s)?e(s):s},r=Object.create(null);return t&&d.Children.map(t,function(n){return n}).forEach(function(n){r[n.key]=o(n)}),r}function Kc(t,e){t=t||{},e=e||{};function o(p){return p in e?e[p]:t[p]}var r=Object.create(null),n=[];for(var s in t)s in e?n.length&&(r[s]=n,n=[]):n.push(s);var a,i={};for(var l in e){if(r[l])for(a=0;at.scrollTop;function Ge(t,e){const{timeout:o,easing:r,style:n={}}=t;return{duration:n.transitionDuration??(typeof o=="number"?o:o[e.mode]||0),easing:n.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:n.transitionDelay}}function Zc(t){return V("MuiCollapse",t)}const MS=K("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]),Qc=t=>{const{orientation:e,classes:o}=t,r={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return G(r,Zc,o)},Jc=P("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.orientation],o.state==="entered"&&e.entered,o.state==="exited"&&!o.in&&o.collapsedSize==="0px"&&e.hidden]}})(W(({theme:t})=>({height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>e.state==="exited"&&!e.in&&e.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),tp=P("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ep=P("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),vr=d.forwardRef(function(e,o){const r=_({props:e,name:"MuiCollapse"}),{addEndListener:n,children:s,className:a,collapsedSize:i="0px",component:l,easing:c,in:p,onEnter:u,onEntered:m,onEntering:g,onExit:b,onExited:v,onExiting:h,orientation:y="vertical",style:S,timeout:C=jl.standard,TransitionComponent:x=Le,...w}=r,$={...r,orientation:y,collapsedSize:i},k=Qc($),T=le(),A=no(),I=d.useRef(null),z=d.useRef(),E=typeof i=="number"?`${i}px`:i,R=y==="horizontal",M=R?"width":"height",O=d.useRef(null),L=qt(o,O),F=rt=>Y=>{if(rt){const at=O.current;Y===void 0?rt(at):rt(at,Y)}},D=()=>I.current?I.current[R?"clientWidth":"clientHeight"]:0,N=F((rt,Y)=>{I.current&&R&&(I.current.style.position="absolute"),rt.style[M]=E,u&&u(rt,Y)}),Q=F((rt,Y)=>{const at=D();I.current&&R&&(I.current.style.position="");const{duration:ct,easing:st}=Ge({style:S,timeout:C,easing:c},{mode:"enter"});if(C==="auto"){const ft=T.transitions.getAutoHeightDuration(at);rt.style.transitionDuration=`${ft}ms`,z.current=ft}else rt.style.transitionDuration=typeof ct=="string"?ct:`${ct}ms`;rt.style[M]=`${at}px`,rt.style.transitionTimingFunction=st,g&&g(rt,Y)}),U=F((rt,Y)=>{rt.style[M]="auto",m&&m(rt,Y)}),Ct=F(rt=>{rt.style[M]=`${D()}px`,b&&b(rt)}),vt=F(v),gt=F(rt=>{const Y=D(),{duration:at,easing:ct}=Ge({style:S,timeout:C,easing:c},{mode:"exit"});if(C==="auto"){const st=T.transitions.getAutoHeightDuration(Y);rt.style.transitionDuration=`${st}ms`,z.current=st}else rt.style.transitionDuration=typeof at=="string"?at:`${at}ms`;rt.style[M]=E,rt.style.transitionTimingFunction=ct,h&&h(rt)}),et=rt=>{C==="auto"&&A.start(z.current||0,rt),n&&n(O.current,rt)};return f.jsx(x,{in:p,onEnter:N,onEntered:U,onEntering:Q,onExit:Ct,onExited:vt,onExiting:gt,addEndListener:et,nodeRef:O,timeout:C==="auto"?null:C,...w,children:(rt,{ownerState:Y,...at})=>f.jsx(Jc,{as:l,className:j(k.root,a,{entered:k.entered,exited:!p&&E==="0px"&&k.hidden}[rt]),style:{[R?"minWidth":"minHeight"]:E,...S},ref:L,ownerState:{...$,state:rt},...at,children:f.jsx(tp,{ownerState:{...$,state:rt},className:k.wrapper,ref:I,children:f.jsx(ep,{ownerState:{...$,state:rt},className:k.wrapperInner,children:s})})})})});vr&&(vr.muiSupportAuto=!0);function op(t){return V("MuiPaper",t)}const LS=K("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]),rp=t=>{const{square:e,elevation:o,variant:r,classes:n}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${o}`]};return G(s,op,n)},np=P("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.variant],!o.square&&e.rounded,o.variant==="elevation"&&e[`elevation${o.elevation}`]]}})(W(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Ue=d.forwardRef(function(e,o){var g;const r=_({props:e,name:"MuiPaper"}),n=le(),{className:s,component:a="div",elevation:i=1,square:l=!1,variant:c="elevation",...p}=r,u={...r,component:a,elevation:i,square:l,variant:c},m=rp(u);return f.jsx(np,{as:a,ownerState:u,className:j(m.root,s),ref:o,...p,style:{...c==="elevation"&&{"--Paper-shadow":(n.vars||n).shadows[i],...n.vars&&{"--Paper-overlay":(g=n.vars.overlays)==null?void 0:g[i]},...!n.vars&&n.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${kt("#fff",Ns(i))}, ${kt("#fff",Ns(i))})`}},...p.style}})}),Ci=d.createContext({});function tt(t,e){const{className:o,elementType:r,ownerState:n,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:i=!1,...l}=e,{component:c,slots:p={[t]:void 0},slotProps:u={[t]:void 0},...m}=s,g=p[t]||r,b=yi(u[t],n),{props:{component:v,...h},internalRef:y}=hi({className:o,...l,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),S=qt(y,b==null?void 0:b.ref,e.ref),C=t==="root"?v||c:v,x=vi(g,{...t==="root"&&!c&&!p[t]&&a,...t!=="root"&&!p[t]&&a,...h,...C&&!i&&{as:C},...C&&i&&{component:C},ref:S},n);return[g,x]}function sp(t){return V("MuiAccordion",t)}const Er=K("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),ap=t=>{const{classes:e,square:o,expanded:r,disabled:n,disableGutters:s}=t;return G({root:["root",!o&&"rounded",r&&"expanded",n&&"disabled",!s&&"gutters"],heading:["heading"],region:["region"]},sp,e)},ip=P(Ue,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${Er.region}`]:e.region},e.root,!o.square&&e.rounded,!o.disableGutters&&e.gutters]}})(W(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${Er.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${Er.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),W(({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${Er.expanded}`]:{margin:"16px 0"}}}]}))),lp=P("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(t,e)=>e.heading})({all:"unset"}),AS=d.forwardRef(function(e,o){const r=_({props:e,name:"MuiAccordion"}),{children:n,className:s,defaultExpanded:a=!1,disabled:i=!1,disableGutters:l=!1,expanded:c,onChange:p,square:u=!1,slots:m={},slotProps:g={},TransitionComponent:b,TransitionProps:v,...h}=r,[y,S]=Te({controlled:c,default:a,name:"Accordion",state:"expanded"}),C=d.useCallback(D=>{S(!y),p&&p(D,!y)},[y,p,S]),[x,...w]=d.Children.toArray(n),$=d.useMemo(()=>({expanded:y,disabled:i,disableGutters:l,toggle:C}),[y,i,l,C]),k={...r,square:u,disabled:i,disableGutters:l,expanded:y},T=ap(k),A={transition:b,...m},I={transition:v,...g},z={slots:A,slotProps:I},[E,R]=tt("root",{elementType:ip,externalForwardedProps:{...z,...h},className:j(T.root,s),shouldForwardComponentProp:!0,ownerState:k,ref:o,additionalProps:{square:u}}),[M,O]=tt("heading",{elementType:lp,externalForwardedProps:z,className:T.heading,ownerState:k}),[L,F]=tt("transition",{elementType:vr,externalForwardedProps:z,ownerState:k});return f.jsxs(E,{...R,children:[f.jsx(M,{...O,children:f.jsx(Ci.Provider,{value:$,children:x})}),f.jsx(L,{in:y,timeout:"auto",...F,children:f.jsx("div",{"aria-labelledby":x.props.id,id:x.props["aria-controls"],role:"region",className:T.region,children:w})})]})});function cp(t){return V("MuiAccordionActions",t)}const BS=K("MuiAccordionActions",["root","spacing"]),pp=t=>{const{classes:e,disableSpacing:o}=t;return G({root:["root",!o&&"spacing"]},cp,e)},dp=P("div",{name:"MuiAccordionActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,!o.disableSpacing&&e.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",variants:[{props:t=>!t.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ES=d.forwardRef(function(e,o){const r=_({props:e,name:"MuiAccordionActions"}),{className:n,disableSpacing:s=!1,...a}=r,i={...r,disableSpacing:s},l=pp(i);return f.jsx(dp,{className:j(l.root,n),ref:o,ownerState:i,...a})});function up(t){return V("MuiAccordionDetails",t)}const OS=K("MuiAccordionDetails",["root"]),fp=t=>{const{classes:e}=t;return G({root:["root"]},up,e)},gp=P("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(t,e)=>e.root})(W(({theme:t})=>({padding:t.spacing(1,2,2)}))),NS=d.forwardRef(function(e,o){const r=_({props:e,name:"MuiAccordionDetails"}),{className:n,...s}=r,a=r,i=fp(a);return f.jsx(gp,{className:j(i.root,n),ref:o,ownerState:a,...s})});class rn{static create(){return new rn}static use(){const e=fi(rn.create).current,[o,r]=d.useState(!1);return e.shouldMount=o,e.setShouldMount=r,d.useEffect(e.mountEffect,[o]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=bp(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>{var o;return(o=this.ref.current)==null?void 0:o.start(...e)})}stop(...e){this.mount().then(()=>{var o;return(o=this.ref.current)==null?void 0:o.stop(...e)})}pulsate(...e){this.mount().then(()=>{var o;return(o=this.ref.current)==null?void 0:o.pulsate(...e)})}}function mp(){return rn.use()}function bp(){let t,e;const o=new Promise((r,n)=>{t=r,e=n});return o.resolve=t,o.reject=e,o}function vp(t){const{className:e,classes:o,pulsate:r=!1,rippleX:n,rippleY:s,rippleSize:a,in:i,onExited:l,timeout:c}=t,[p,u]=d.useState(!1),m=j(e,o.ripple,o.rippleVisible,r&&o.ripplePulsate),g={width:a,height:a,top:-(a/2)+s,left:-(a/2)+n},b=j(o.child,p&&o.childLeaving,r&&o.childPulsate);return!i&&!p&&u(!0),d.useEffect(()=>{if(!i&&l!=null){const v=setTimeout(l,c);return()=>{clearTimeout(v)}}},[l,i,c]),f.jsx("span",{className:m,style:g,children:f.jsx("span",{className:b})})}function zS(t){return V("MuiTouchRipple",t)}const Oe=K("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qn=550,hp=80,yp=Je` 0% { diff --git a/admin/assets/index-BLPltTwe.js b/admin/assets/index-DTiA4WdK.js similarity index 99% rename from admin/assets/index-BLPltTwe.js rename to admin/assets/index-DTiA4WdK.js index 857174d22..d909ee63d 100644 --- a/admin/assets/index-BLPltTwe.js +++ b/admin/assets/index-DTiA4WdK.js @@ -1,4 +1,4 @@ -import{c as U,j as Q,o as Pe,a as va,b as ba,d as Qa,P as _}from"./createSvgIcon-ChB2N0i2.js";import{i as x,R as a}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as g,S as un,c as Ne,I as me,b as nt,L as uL,D as lN,C as NN,a4 as lL,a5 as Z,a6 as NL,a7 as LL,a8 as jL,a9 as gL,P as Ua,aa as yL,ab as TL,ac as DL,ad as dL,ae as hL,af as $a,ag as zL,ah as CL,ai as IL,aj as wL,ak as pL,al as AL,am as mL,an as OL,ao as EL,R as B,ap as fL,aq as xL,ar as _L,as as Pa,at as Wa,au as SL,av as Ba,V as kL,aw as YL,ax as vL,ay as bL,az as Ja,aA as QL,aB as UL,aC as $L,G as PL,a as Bi}from"./index-B0CiKPEe.js";import{c as or,g as WL}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as BL}from"./useTheme-Do7i4pX2.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";const ln=U(Q.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),JL=U(Q.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),RL=U(Q.jsx("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),FL=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 11h-3v3.75c0 1.24-1.01 2.25-2.25 2.25S8.5 17.99 8.5 16.75s1.01-2.25 2.25-2.25c.46 0 .89.14 1.25.38V11h4zm-3-4V3.5L18.5 9z"}),"AudioFile"),GL=U([Q.jsx("path",{d:"M16.5 12h-9c-.55 0-1 .45-1 1v1h11v-1c0-.55-.45-1-1-1M7.25 8.5h4v2h-4zm5.5 0h4v2h-4z"},"0"),Q.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 15h-1.5v-1.5h-11V17H5v-3.83c0-.66.25-1.26.65-1.72V9c0-1.1.9-2 2-2H11c.37 0 .72.12 1 .32.28-.2.63-.32 1-.32h3.35c1.1 0 2 .9 2 2v2.45c.4.46.65 1.06.65 1.72z"},"1")],"BedroomParent"),HL=U(Q.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"}),"Bookmark"),VL=U(Q.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2m0 15-5-2.18L7 18V5h10z"}),"BookmarkBorder"),ZL=U(Q.jsx("path",{d:"M22 24H2v-4h20zM13.06 5.19l3.75 3.75L7.75 18H4v-3.75zm4.82 2.68-3.75-3.75 1.83-1.83c.39-.39 1.02-.39 1.41 0l2.34 2.34c.39.39.39 1.02 0 1.41z"}),"BorderColor"),XL=U(Q.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4"),KL=U(Q.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6"}),"Brightness5"),uM=U(Q.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness6"),qL=U(Q.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7"),ej=U(Q.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"}),"Build"),tj=U(Q.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),lM=U(Q.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),sj=U(Q.jsx("path",{d:"m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"Colorize"),ij=U(Q.jsx("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),rj=U(Q.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),LN=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"}),"CreateNewFolder"),oj=U(Q.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),nj=U(Q.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),eo=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Mj=U(Q.jsx("path",{d:"M18.41 5.8 17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83M6.21 18H5v-1.21l8.66-8.66 1.21 1.21zM11 20l4-4h6v4z"}),"DriveFileRenameOutline"),Oi=U(Q.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),aj=U(Q.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),cj=U(Q.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),uj=U(Q.jsx("path",{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"FindInPage"),lj=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),Nj=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z"}),"FolderSpecial"),Lj=U(Q.jsx("path",{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-4.05 16.5-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13z"}),"FontDownload"),jj=U(Q.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),gj=U(Q.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),NM=U(Q.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),jN=U(Q.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),yj=U(Q.jsx("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn"),gN=U(Q.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Tj=U(Q.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"List"),Dj=U(Q.jsx("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt"),dj=U(Q.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14h-2V9h-2V7h4z"}),"LooksOne"),hj=U(Q.jsx("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3z"}),"MusicNote"),zj=U(Q.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),LM=U(Q.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonOutlined"),Cj=U(Q.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),Yr=U(Q.jsx("path",{d:"M5 4v2h14V4zm0 10h4v6h6v-6h4l-7-7z"}),"Publish"),yN=U(Q.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),jM=U(Q.jsx("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1s1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router"),Ij=U(Q.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),Nn=U(Q.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),vr=U(Q.jsx("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69s.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69"}),"SettingsApplications"),wj=U(Q.jsx("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),gM=U(Q.jsx("path",{d:"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10m3.61 6.34c1.07 0 1.93.86 1.93 1.93s-.86 1.93-1.93 1.93-1.93-.86-1.93-1.93c-.01-1.07.86-1.93 1.93-1.93m-6-1.58c1.3 0 2.36 1.06 2.36 2.36s-1.06 2.36-2.36 2.36-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36m0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68M11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09"}),"SupervisedUserCircle"),pj=U(Q.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFields"),Aj=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFileOutlined"),mj=U(Q.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottom"),Oj=U(Q.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTop"),Ej=U(Q.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),fj=U(Q.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ViewColumn"),xj=U(Q.jsx("path",{d:"M4 15h16v-2H4zm0 4h16v-2H4zm0-8h16V9H4zm0-6v2h16V5z"}),"ViewHeadline"),_j=U(Q.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),Sj=U(Q.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),kj=U(Q.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Us=U(Q.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"Wifi"),nr=U(Q.jsx("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff"),Eo=11/23/100;function Ra(s){const e={r:0,g:0,b:0};if(s.length===7)e.r=parseInt(s.substring(1,3),16),e.g=parseInt(s.substring(3,5),16),e.b=parseInt(s.substring(5,7),16);else if(s.length===4){const t=s[1],i=s[2],r=s[3];e.r=parseInt(t+t,16),e.g=parseInt(i+i,16),e.b=parseInt(r+r,16)}return e}function Yj(s){return`#${Math.round(s.r).toString(16)}${Math.round(s.g).toString(16)}${Math.round(s.b).toString(16)}`}function vj(s,e,t){const i=Ra(s),r=Ra(e);return i.r+=r.r*(.05+Eo*(t-1)),i.g+=r.g*(.05+Eo*(t-1)),i.b+=r.b*(.05+Eo*(t-1)),Yj(i)}function Fa(s,e){const t={};for(let i=1;i<=24;i++)t[`elevation${i}`]={backgroundColor:vj(s,e,i)};return t}function bj(s,e){var n,M,c,l,N,u,L,j,y,T,D;let t,i;s==="dark"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:Fa("#121212","#fff")},t={name:s,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="blue"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="colored"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:Fa("#151d21","#fff")},t={name:s,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):s==="PT"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):s==="DX"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(i={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(M=(n=t.palette)==null?void 0:n.primary)==null?void 0:M.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:va[300],dark:va[400]});const r=ba(t),o=r.palette;return ba(r,{...e||void 0,components:{...i,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:Qa(((L=o.text)==null?void 0:L.primary)||"",((j=o.action)==null?void 0:j.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(y=o.text)==null?void 0:y.primary,"&:hover":{backgroundColor:Qa(((T=o.text)==null?void 0:T.primary)||"",((D=o.action)==null?void 0:D.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function Qj(){let s,e;const t=new Promise((i,r)=>{s=i,e=r});return t.resolve=s,t.reject=e,t}function Ln(s){return(s==null?void 0:s.rows.map(e=>e.value).filter(e=>!!e))??[]}function Tt(s){return s!=null&&s.startsWith("system.host.")||(s=`system.host.${s}`),s}function li(s){return s!=null&&s.startsWith("system.host.")&&(s=s.substring(12)),s}function Ga(s){return new Promise(e=>{setTimeout(e,s)})}function Mr(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}var rt;(function(s){s[s.CONNECTING=0]="CONNECTING",s[s.CONNECTED=1]="CONNECTED",s[s.OBJECTS_LOADED=2]="OBJECTS_LOADED",s[s.READY=3]="READY"})(rt||(rt={}));var we;(function(s){s.PERMISSION_ERROR="permissionError",s.NOT_CONNECTED="notConnectedError",s.TIMEOUT="timeout",s.NOT_ADMIN="Allowed only in admin",s.NOT_SUPPORTED="Not supported"})(we||(we={}));const Y3e=we.PERMISSION_ERROR;we.NOT_CONNECTED;const Uj=["material","echarts","vis"];class ze{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=Qj();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let i=1;i<=30;i++){if(window.io||window.iob)return e();await Ga(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,i=(this.props.protocol||window.location.protocol).replace(":",""),r=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")r="";else{if(window.socketUrl){const M=new URL(window.socketUrl);e=M.hostname,t=M.port,i=M.protocol.replace(":","")}const n=r.lastIndexOf("/");if(n!==-1&&(r=r.substring(0,n+1)),ze.isWeb()){const M=r.split("/");M.length>2&&(M.pop(),M.pop(),Uj.includes(M[M.length-1])&&M.pop(),r=M.join("/"),r.endsWith("/")||(r+="/"))}}const o=t?`${i}://${e}:${t}`:`${i}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:r.endsWith("/")?`${r}socket.io`:`${r}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const M=ze.readTokens();if(M&&!M.owner){const c=Date.now();this.saveTokens({access_token:M.access_token,refresh_token:M.refresh_token,expires_in:Math.round((M.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((M.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},M.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(j,y)=>this.onPreConnect(j,y))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,M;this.onReadyDone=!1,(M=(n=this.props).onProgress)==null||M.call(n,rt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,M;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(M=(n=this.props).onProgress)==null||M.call(n,rt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var M,c;(c=(M=this.props).onLog)==null||c.call(M,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let M;n==null?M="":typeof n.toString=="function"?M=n.toString():(M=JSON.stringify(n),console.error(`Received strange error: ${M}`)),M.includes("User not authorized")?this.authenticate():M.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,M)=>{setTimeout(()=>this.objectChange(n,M),0)}),this._socket.on("stateChange",(n,M)=>{setTimeout(()=>this.stateChange(n,M),0)}),this._socket.on("im",(n,M,c)=>{setTimeout(()=>this.instanceMessage(n,M,c),0)}),this._socket.on("fileChange",(n,M,c)=>{setTimeout(()=>this.fileChange(n,M,c),0)}),this._socket.on("cmdStdout",(n,M)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,M)}),this._socket.on("cmdStderr",(n,M)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,M)}),this._socket.on("cmdExit",(n,M)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,M)}),Promise.resolve()}onPreConnect(e,t){var i,r;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(r=(i=this.props).onProgress)==null||r.call(i,rt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[i,r,o,n,M]=e.split(";"),c=new Date(r);return c.getTime(){if(e.key==="iob_tokens"){const t=ze.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,i)=>{t?(console.error(`Cannot update expiration time: ${t}`),window.location.reload()):i||(console.error("Cannot update expiration time"),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?this.acquireTokenLock()?fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(i=>{if(i.ok)return i.json();throw new Error("Cannot refresh access token")}).then(i=>{if(i.access_token)this.saveTokens(i,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(i.access_token);else throw new Error("Cannot get access token")}).catch(i=>{this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(i),window.location.reload()}):this.checkAccessTokenExpire():this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const r=JSON.parse(t);if(e{r?this.refreshTokens(e,i):setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now())}):this.refreshTokens(e,i):this.lastAccessToken!==e.access_token?this.refreshTokens(e):this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3):setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now())}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(i,r)=>{i?t(i):e(r||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(i=>console.error(`Cannot load data: ${i}`)),this.loaded)return;await Ga(ze.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,i,r,o,n,M,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!ze.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(i=(t=this.props).onLanguage)==null||i.call(t,this.systemLang),this.loaded=!0,(o=(r=this.props).onProgress)==null||o.call(r,rt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(M=(n=this.props).onProgress)==null||M.call(n,rt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,i,r;e.length===3?[t,i,r]=e:([t,r]=e,i=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof r!="function")throw new Error("The state change handler must be a function!");const n=[];for(let M=0;MM.includes("*"))){let M;for(let c=0;cconsole.error(`Cannot call state change handler: ${L}`))}}}else try{const M=await(ze.isWeb()?this.getStates(o):this.getForeignStates(o));if(M)for(const[c,l]of Object.entries(M)){const N=r(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(M){console.error(`Cannot getState "${o.join(", ")}": ${M.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n{try{const N=l(e,t,i);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(r){const M=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);M instanceof Promise&&M.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const i of Object.values(this.statesSubscribes))if(i.reg.test(e))for(const r of i.cbs)try{const o=r(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,i){var r;(r=this._instanceSubscriptions[t])==null||r.forEach(o=>{if(o.messageType===e){const n=o.callback(i,t,e);n instanceof Promise&&n.catch(M=>console.error(`Cannot call instance message handler: ${M}`))}})}fileChange(e,t,i){for(const r of Object.values(this.filesSubscribes))if(r.regId.test(e)&&r.regFilePattern.test(t))for(const o of r.cbs)try{o(e,t,i)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,i){if(typeof i!="function")throw new Error("The state change handler must be a function!");let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let n=0;n{const u={elapsed:!1,clearTimeout:()=>{}};let L;i!==!1&&(L=setTimeout(()=>{u.elapsed=!0,r==null||r(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(we.TIMEOUT))},i??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(L)});try{await M(l,N,u)}catch(j){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(j.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(i=>i.startsWith(e)).forEach(i=>{delete this._promises[i]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getStates",e,(r,o)=>{this.states=o??{},r?i(r):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(r,o)=>{r?i(r):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getBinaryState",e,(r,o)=>{r?i(r):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setBinaryState",e,t,o=>{o?r(o):i()})}})}setState(e,t,i){return typeof i=="boolean"&&(t={val:t,ack:i}),this.request({commandTimeout:!1,executor:(r,o)=>{if(e&&e===this.ignoreState){let n;if(typeof i=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const M of this.statesSubscribes[e].cbs)try{const c=M(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}r();return}this._socket.emit("setState",e,t,n=>{n?o(n):r()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{if(!e&&this.objects){i(this.objects);return}this._socket.emit(ze.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var M,c;t||(c=(M=this.props).onProgress)==null||c.call(M,rt.OBJECTS_LOADED),o?r(o):(this.objects=n??{},i(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjects",e,(r,o)=>{r?i(r):t(o)})}})}_subscribe(e){var t,i;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("subscribeObjects",r),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,M]=o.split("$%$");this._socket.emit("subscribeFiles",n,M)})}else if(!e&&this.subscribed){this.subscribed=!1,(i=this.props.autoSubscribes)!=null&&i.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("unsubscribeObjects",r),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,M]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,M)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("requireLog",e,r=>{r?i(r):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?r(o):i()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?r(o):i()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(r,o)=>{r?i(r):t(o)})}})}sendTo(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendTo",e,t,i,o=>{r(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("extendObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)r(o);else{const M={};if(n)for(let c=0;c{i=i||"",r=r||"香",this._socket.emit("getObjectView",e,t,{startkey:i,endkey:r},(M,c)=>{if(M)n(M);else{const l={};if(c&&c.rows)for(let N=0;N{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(i,r)=>{var o;i?t(i):e((o=r.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?r(o):i(n)})}})}readFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit(i?"readFile64":"readFile",e,t,(n,M,c)=>{n?o(n):r({file:M,mimeType:c})})}})}writeFile64(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{if(typeof i=="string")this._socket.emit("writeFile",e,t,i,n=>{n?o(n):r()});else{const n=btoa(new Uint8Array(i).reduce((M,c)=>M+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,M=>{M?o(M):r()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o?r(o):i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o?r(o):i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n?o(n):r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n?o(n):r()})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,M)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{M.elapsed||(M.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let i=await this.getObject("system.config");i??={},i.common??={},i.native??={},t(i)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,i)=>{this._socket.emit("getCompactSystemConfig",(r,o)=>{r?i(r):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getForeignStates",e||"*",(r,o)=>{r?i(r):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?r(o):i(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?r(o):i(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n,M,c)=>{o?r(o):i({values:n,sessionId:c,step:M})})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getVersion",(r,o,n)=>{r&&!o&&typeof r=="string"&&r.match(/\d+\.\d+\.\d+/)?t({version:r,serverName:"socketio"}):r?i(r):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(i,r)=>{i?t(i):e(r)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?r(o):i(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,i)=>{e(i)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var i;const t=await this.getObject("system.meta.uuid");e((i=t==null?void 0:t.native)==null?void 0:i.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?r(o):i(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=e?`system.adapter.${e}.`:"system.adapter.",o=`${r}香`,n=await this.getObjectViewSystem("instance",r,o),M=Object.values(n);i(e?M.filter(c=>c.common.name===e):M)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(r);i(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",i=>{i?t(i):e(null)})}})}subscribeOnInstance(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,i,(M,c)=>{M?n(M):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===r)||this._instanceSubscriptions[e].push({messageType:t,callback:r}),o(c)))})}})}unsubscribeFromInstance(e,t,i){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let r;const o=[];do{r=!1;const M=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!i||c.callback===i));if(M!=null&&M!==-1){r=!0;const c=this._instanceSubscriptions[e][M].messageType;this._instanceSubscriptions[e].splice(M,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(L,j)=>L?u(L):N(j))}}))}}while(r&&(!i||!t));return o.length?Promise.all(o).then(M=>!!M.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:i=>(this._socket.emit("log",e,t),i(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function $j(s,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(s.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(s.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(s.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(r=>r.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:s,type:t}}function Pj(s){var i,r,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((r=(i=s.native)==null?void 0:i.hardware)!=null&&r.networkInterfaces){const M=(n=(o=s.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(M).forEach(c=>{M[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class v3e extends ze{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var r;const i=await this.getObject("system.certificates");(r=i==null?void 0:i.native)!=null&&r.certificates?t(Object.entries(i.native.certificates).map(([o,n])=>$j(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"getLogs",t||200,r=>{i(r)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,r=>{i(r)})}})}upgradeController(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:i},n=>{const M=n;M.error?o(M.error):r(M.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?r(o):i(n)})}})}upgradeOsPackages(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!i},o=>{r(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("readLogs",e,(r,o)=>{r&&i(r),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("sendToHost",e,"delLogs",null,r=>{r&&i(r),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o&&r(o),i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&r(o),i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n&&o(n),r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n&&o(n),r()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}renameGroup(e,t,i){return this.request({commandTimeout:!1,executor:async r=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const M=o.find(c=>c._id===e);if(M){const c=M._id;M._id=t,i!==void 0&&(M.common??={},M.common.name=i),await this.setObject(t,M),await this.delObject(c)}r()}})}getHostInfo(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getHostInfo"'):M?r(M):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):M?r(M):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,i,r){return this.request({cacheKey:`repository_${e}`,forceUpdate:i,commandTimeout:r,executor:(o,n,M)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{M.elapsed||(M.clearTimeout(),c===we.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getInstalled"'):M?r(M):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,M)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{M.elapsed||(M.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=li(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{r.elapsed||(r.clearTimeout(),o===we.PERMISSION_ERROR?i('May not read "BaseSettings"'):o?o.error?i(new Error(o.error)):t(o):i('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=li(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===we.PERMISSION_ERROR?r('May not write "BaseSettings"'):n?i(n):r('Cannot write "BaseSettings"'))})}})}restartController(e){return e=li(e),this.request({executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{r.elapsed||(r.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=li(e),this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),i(n||null))})}})}changePassword(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&r(n),i())})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getHostByIp(e,t){return e=li(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(i,r,o)=>{this._socket.emit("getHostByIp",e,(n,M)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=Pj(M);i([...c,...l])})}})}encrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("encrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}decrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("decrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}chmodFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chmodFile",e,t,i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}chownFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chownFile",e,t,i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}clearNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,i)=>{this._socket.emit("getIsEasyModeStrict",(r,o)=>{i.elapsed||(i.clearTimeout(),r&&t(r),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,i)=>{this._socket.emit("getEasyMode",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(new Error(r)):e(o))})}})}getRatings(e){return this.request({executor:(t,i,r)=>{this._socket.emit("getRatings",!!e,(o,n)=>{r.elapsed||(r.clearTimeout(),o?i(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(i,r,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const M=await n.json();i(M)}catch(n){r(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,i)=>{this._socket.emit("getCurrentInstance",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(r):e(o))})}})}getAdapterInstances(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`instances_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapterInstances",i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getAdapters(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`adapter_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapters",i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactAdapters",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactInstances",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactInstalled",e,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):M?r(M):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,i){return e=Tt(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactRepository",e,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getCompactRepository"'):M?r(M):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactHosts",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}}const se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ie=globalThis,rs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xt="9.14.0";function to(){return so(ie),ie}function so(s){const e=s.__SENTRY__=s.__SENTRY__||{};return e.version=e.version||Xt,e[Xt]=e[Xt]||{}}function io(s,e,t=ie){const i=t.__SENTRY__=t.__SENTRY__||{},r=i[Xt]=i[Xt]||{};return r[s]||(r[s]=e())}const Wj="Sentry Logger ",jn=["debug","info","warn","error","log","assert","trace"],br={};function Zs(s){if(!("console"in ie))return s();const e=ie.console,t={},i=Object.keys(br);i.forEach(r=>{const o=br[r];t[r]=e[r],e[r]=o});try{return s()}finally{i.forEach(r=>{e[r]=t[r]})}}function Bj(){let s=!1;const e={enable:()=>{s=!0},disable:()=>{s=!1},isEnabled:()=>s};return rs?jn.forEach(t=>{e[t]=(...i)=>{s&&Zs(()=>{ie.console[t](`${Wj}[${t}]:`,...i)})}}):jn.forEach(t=>{e[t]=()=>{}}),e}const J=io("logger",Bj),TN=50,Kt="?",Ha=/\(error: (.*)\)/,Va=/captureMessage|captureException/;function DN(...s){const e=s.sort((t,i)=>t[0]-i[0]).map(t=>t[1]);return(t,i=0,r=0)=>{const o=[],n=t.split(` +import{c as U,j as Q,o as Pe,a as va,b as ba,d as Qa,P as _}from"./createSvgIcon-BdRvDw53.js";import{i as x,R as a}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{i as g,S as un,c as Ne,I as me,b as nt,L as uL,D as lN,C as NN,a4 as lL,a5 as Z,a6 as NL,a7 as LL,a8 as jL,a9 as gL,P as Ua,aa as yL,ab as TL,ac as DL,ad as dL,ae as hL,af as $a,ag as zL,ah as CL,ai as IL,aj as wL,ak as pL,al as AL,am as mL,an as OL,ao as EL,R as B,ap as fL,aq as xL,ar as _L,as as Pa,at as Wa,au as SL,av as Ba,V as kL,aw as YL,ax as vL,ay as bL,az as Ja,aA as QL,aB as UL,aC as $L,G as PL,a as Bi}from"./index-qABB1JVe.js";import{c as or,g as WL}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as BL}from"./useTheme-Cl1QmYFL.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";const ln=U(Q.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),JL=U(Q.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),RL=U(Q.jsx("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),FL=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 11h-3v3.75c0 1.24-1.01 2.25-2.25 2.25S8.5 17.99 8.5 16.75s1.01-2.25 2.25-2.25c.46 0 .89.14 1.25.38V11h4zm-3-4V3.5L18.5 9z"}),"AudioFile"),GL=U([Q.jsx("path",{d:"M16.5 12h-9c-.55 0-1 .45-1 1v1h11v-1c0-.55-.45-1-1-1M7.25 8.5h4v2h-4zm5.5 0h4v2h-4z"},"0"),Q.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 15h-1.5v-1.5h-11V17H5v-3.83c0-.66.25-1.26.65-1.72V9c0-1.1.9-2 2-2H11c.37 0 .72.12 1 .32.28-.2.63-.32 1-.32h3.35c1.1 0 2 .9 2 2v2.45c.4.46.65 1.06.65 1.72z"},"1")],"BedroomParent"),HL=U(Q.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"}),"Bookmark"),VL=U(Q.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2m0 15-5-2.18L7 18V5h10z"}),"BookmarkBorder"),ZL=U(Q.jsx("path",{d:"M22 24H2v-4h20zM13.06 5.19l3.75 3.75L7.75 18H4v-3.75zm4.82 2.68-3.75-3.75 1.83-1.83c.39-.39 1.02-.39 1.41 0l2.34 2.34c.39.39.39 1.02 0 1.41z"}),"BorderColor"),XL=U(Q.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4"),KL=U(Q.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6"}),"Brightness5"),uM=U(Q.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness6"),qL=U(Q.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7"),ej=U(Q.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"}),"Build"),tj=U(Q.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),lM=U(Q.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),sj=U(Q.jsx("path",{d:"m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"Colorize"),ij=U(Q.jsx("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),rj=U(Q.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),LN=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"}),"CreateNewFolder"),oj=U(Q.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),nj=U(Q.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),eo=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Mj=U(Q.jsx("path",{d:"M18.41 5.8 17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83M6.21 18H5v-1.21l8.66-8.66 1.21 1.21zM11 20l4-4h6v4z"}),"DriveFileRenameOutline"),Oi=U(Q.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),aj=U(Q.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),cj=U(Q.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),uj=U(Q.jsx("path",{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"FindInPage"),lj=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),Nj=U(Q.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z"}),"FolderSpecial"),Lj=U(Q.jsx("path",{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-4.05 16.5-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13z"}),"FontDownload"),jj=U(Q.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),gj=U(Q.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),NM=U(Q.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),jN=U(Q.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),yj=U(Q.jsx("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn"),gN=U(Q.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Tj=U(Q.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"List"),Dj=U(Q.jsx("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt"),dj=U(Q.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14h-2V9h-2V7h4z"}),"LooksOne"),hj=U(Q.jsx("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3z"}),"MusicNote"),zj=U(Q.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),LM=U(Q.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonOutlined"),Cj=U(Q.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),Yr=U(Q.jsx("path",{d:"M5 4v2h14V4zm0 10h4v6h6v-6h4l-7-7z"}),"Publish"),yN=U(Q.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),jM=U(Q.jsx("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1s1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router"),Ij=U(Q.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),Nn=U(Q.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),vr=U(Q.jsx("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69s.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69"}),"SettingsApplications"),wj=U(Q.jsx("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),gM=U(Q.jsx("path",{d:"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10m3.61 6.34c1.07 0 1.93.86 1.93 1.93s-.86 1.93-1.93 1.93-1.93-.86-1.93-1.93c-.01-1.07.86-1.93 1.93-1.93m-6-1.58c1.3 0 2.36 1.06 2.36 2.36s-1.06 2.36-2.36 2.36-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36m0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68M11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09"}),"SupervisedUserCircle"),pj=U(Q.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFields"),Aj=U(Q.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFileOutlined"),mj=U(Q.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottom"),Oj=U(Q.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTop"),Ej=U(Q.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),fj=U(Q.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ViewColumn"),xj=U(Q.jsx("path",{d:"M4 15h16v-2H4zm0 4h16v-2H4zm0-8h16V9H4zm0-6v2h16V5z"}),"ViewHeadline"),_j=U(Q.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),Sj=U(Q.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),kj=U(Q.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Us=U(Q.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"Wifi"),nr=U(Q.jsx("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff"),Eo=11/23/100;function Ra(s){const e={r:0,g:0,b:0};if(s.length===7)e.r=parseInt(s.substring(1,3),16),e.g=parseInt(s.substring(3,5),16),e.b=parseInt(s.substring(5,7),16);else if(s.length===4){const t=s[1],i=s[2],r=s[3];e.r=parseInt(t+t,16),e.g=parseInt(i+i,16),e.b=parseInt(r+r,16)}return e}function Yj(s){return`#${Math.round(s.r).toString(16)}${Math.round(s.g).toString(16)}${Math.round(s.b).toString(16)}`}function vj(s,e,t){const i=Ra(s),r=Ra(e);return i.r+=r.r*(.05+Eo*(t-1)),i.g+=r.g*(.05+Eo*(t-1)),i.b+=r.b*(.05+Eo*(t-1)),Yj(i)}function Fa(s,e){const t={};for(let i=1;i<=24;i++)t[`elevation${i}`]={backgroundColor:vj(s,e,i)};return t}function bj(s,e){var n,M,c,l,N,u,L,j,y,T,D;let t,i;s==="dark"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:Fa("#121212","#fff")},t={name:s,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="blue"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="colored"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:Fa("#151d21","#fff")},t={name:s,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):s==="PT"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):s==="DX"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(i={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(M=(n=t.palette)==null?void 0:n.primary)==null?void 0:M.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:va[300],dark:va[400]});const r=ba(t),o=r.palette;return ba(r,{...e||void 0,components:{...i,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:Qa(((L=o.text)==null?void 0:L.primary)||"",((j=o.action)==null?void 0:j.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(y=o.text)==null?void 0:y.primary,"&:hover":{backgroundColor:Qa(((T=o.text)==null?void 0:T.primary)||"",((D=o.action)==null?void 0:D.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function Qj(){let s,e;const t=new Promise((i,r)=>{s=i,e=r});return t.resolve=s,t.reject=e,t}function Ln(s){return(s==null?void 0:s.rows.map(e=>e.value).filter(e=>!!e))??[]}function Tt(s){return s!=null&&s.startsWith("system.host.")||(s=`system.host.${s}`),s}function li(s){return s!=null&&s.startsWith("system.host.")&&(s=s.substring(12)),s}function Ga(s){return new Promise(e=>{setTimeout(e,s)})}function Mr(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}var rt;(function(s){s[s.CONNECTING=0]="CONNECTING",s[s.CONNECTED=1]="CONNECTED",s[s.OBJECTS_LOADED=2]="OBJECTS_LOADED",s[s.READY=3]="READY"})(rt||(rt={}));var we;(function(s){s.PERMISSION_ERROR="permissionError",s.NOT_CONNECTED="notConnectedError",s.TIMEOUT="timeout",s.NOT_ADMIN="Allowed only in admin",s.NOT_SUPPORTED="Not supported"})(we||(we={}));const Y3e=we.PERMISSION_ERROR;we.NOT_CONNECTED;const Uj=["material","echarts","vis"];class ze{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=Qj();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let i=1;i<=30;i++){if(window.io||window.iob)return e();await Ga(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,i=(this.props.protocol||window.location.protocol).replace(":",""),r=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")r="";else{if(window.socketUrl){const M=new URL(window.socketUrl);e=M.hostname,t=M.port,i=M.protocol.replace(":","")}const n=r.lastIndexOf("/");if(n!==-1&&(r=r.substring(0,n+1)),ze.isWeb()){const M=r.split("/");M.length>2&&(M.pop(),M.pop(),Uj.includes(M[M.length-1])&&M.pop(),r=M.join("/"),r.endsWith("/")||(r+="/"))}}const o=t?`${i}://${e}:${t}`:`${i}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:r.endsWith("/")?`${r}socket.io`:`${r}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const M=ze.readTokens();if(M&&!M.owner){const c=Date.now();this.saveTokens({access_token:M.access_token,refresh_token:M.refresh_token,expires_in:Math.round((M.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((M.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},M.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(j,y)=>this.onPreConnect(j,y))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,M;this.onReadyDone=!1,(M=(n=this.props).onProgress)==null||M.call(n,rt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,M;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(M=(n=this.props).onProgress)==null||M.call(n,rt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var M,c;(c=(M=this.props).onLog)==null||c.call(M,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let M;n==null?M="":typeof n.toString=="function"?M=n.toString():(M=JSON.stringify(n),console.error(`Received strange error: ${M}`)),M.includes("User not authorized")?this.authenticate():M.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,M)=>{setTimeout(()=>this.objectChange(n,M),0)}),this._socket.on("stateChange",(n,M)=>{setTimeout(()=>this.stateChange(n,M),0)}),this._socket.on("im",(n,M,c)=>{setTimeout(()=>this.instanceMessage(n,M,c),0)}),this._socket.on("fileChange",(n,M,c)=>{setTimeout(()=>this.fileChange(n,M,c),0)}),this._socket.on("cmdStdout",(n,M)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,M)}),this._socket.on("cmdStderr",(n,M)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,M)}),this._socket.on("cmdExit",(n,M)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,M)}),Promise.resolve()}onPreConnect(e,t){var i,r;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(r=(i=this.props).onProgress)==null||r.call(i,rt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[i,r,o,n,M]=e.split(";"),c=new Date(r);return c.getTime(){if(e.key==="iob_tokens"){const t=ze.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,i)=>{t?(console.error(`Cannot update expiration time: ${t}`),window.location.reload()):i||(console.error("Cannot update expiration time"),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?this.acquireTokenLock()?fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(i=>{if(i.ok)return i.json();throw new Error("Cannot refresh access token")}).then(i=>{if(i.access_token)this.saveTokens(i,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(i.access_token);else throw new Error("Cannot get access token")}).catch(i=>{this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(i),window.location.reload()}):this.checkAccessTokenExpire():this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const r=JSON.parse(t);if(e{r?this.refreshTokens(e,i):setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now())}):this.refreshTokens(e,i):this.lastAccessToken!==e.access_token?this.refreshTokens(e):this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3):setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now())}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(i,r)=>{i?t(i):e(r||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(i=>console.error(`Cannot load data: ${i}`)),this.loaded)return;await Ga(ze.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,i,r,o,n,M,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!ze.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(i=(t=this.props).onLanguage)==null||i.call(t,this.systemLang),this.loaded=!0,(o=(r=this.props).onProgress)==null||o.call(r,rt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(M=(n=this.props).onProgress)==null||M.call(n,rt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,i,r;e.length===3?[t,i,r]=e:([t,r]=e,i=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof r!="function")throw new Error("The state change handler must be a function!");const n=[];for(let M=0;MM.includes("*"))){let M;for(let c=0;cconsole.error(`Cannot call state change handler: ${L}`))}}}else try{const M=await(ze.isWeb()?this.getStates(o):this.getForeignStates(o));if(M)for(const[c,l]of Object.entries(M)){const N=r(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(M){console.error(`Cannot getState "${o.join(", ")}": ${M.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n{try{const N=l(e,t,i);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(r){const M=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);M instanceof Promise&&M.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const i of Object.values(this.statesSubscribes))if(i.reg.test(e))for(const r of i.cbs)try{const o=r(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,i){var r;(r=this._instanceSubscriptions[t])==null||r.forEach(o=>{if(o.messageType===e){const n=o.callback(i,t,e);n instanceof Promise&&n.catch(M=>console.error(`Cannot call instance message handler: ${M}`))}})}fileChange(e,t,i){for(const r of Object.values(this.filesSubscribes))if(r.regId.test(e)&&r.regFilePattern.test(t))for(const o of r.cbs)try{o(e,t,i)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,i){if(typeof i!="function")throw new Error("The state change handler must be a function!");let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let n=0;n{const u={elapsed:!1,clearTimeout:()=>{}};let L;i!==!1&&(L=setTimeout(()=>{u.elapsed=!0,r==null||r(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(we.TIMEOUT))},i??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(L)});try{await M(l,N,u)}catch(j){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(j.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(i=>i.startsWith(e)).forEach(i=>{delete this._promises[i]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getStates",e,(r,o)=>{this.states=o??{},r?i(r):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(r,o)=>{r?i(r):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getBinaryState",e,(r,o)=>{r?i(r):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setBinaryState",e,t,o=>{o?r(o):i()})}})}setState(e,t,i){return typeof i=="boolean"&&(t={val:t,ack:i}),this.request({commandTimeout:!1,executor:(r,o)=>{if(e&&e===this.ignoreState){let n;if(typeof i=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const M of this.statesSubscribes[e].cbs)try{const c=M(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}r();return}this._socket.emit("setState",e,t,n=>{n?o(n):r()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{if(!e&&this.objects){i(this.objects);return}this._socket.emit(ze.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var M,c;t||(c=(M=this.props).onProgress)==null||c.call(M,rt.OBJECTS_LOADED),o?r(o):(this.objects=n??{},i(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjects",e,(r,o)=>{r?i(r):t(o)})}})}_subscribe(e){var t,i;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("subscribeObjects",r),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,M]=o.split("$%$");this._socket.emit("subscribeFiles",n,M)})}else if(!e&&this.subscribed){this.subscribed=!1,(i=this.props.autoSubscribes)!=null&&i.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("unsubscribeObjects",r),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,M]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,M)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("requireLog",e,r=>{r?i(r):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?r(o):i()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?r(o):i()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(r,o)=>{r?i(r):t(o)})}})}sendTo(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendTo",e,t,i,o=>{r(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("extendObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)r(o);else{const M={};if(n)for(let c=0;c{i=i||"",r=r||"香",this._socket.emit("getObjectView",e,t,{startkey:i,endkey:r},(M,c)=>{if(M)n(M);else{const l={};if(c&&c.rows)for(let N=0;N{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(i,r)=>{var o;i?t(i):e((o=r.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?r(o):i(n)})}})}readFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit(i?"readFile64":"readFile",e,t,(n,M,c)=>{n?o(n):r({file:M,mimeType:c})})}})}writeFile64(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{if(typeof i=="string")this._socket.emit("writeFile",e,t,i,n=>{n?o(n):r()});else{const n=btoa(new Uint8Array(i).reduce((M,c)=>M+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,M=>{M?o(M):r()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o?r(o):i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o?r(o):i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n?o(n):r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n?o(n):r()})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,M)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{M.elapsed||(M.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let i=await this.getObject("system.config");i??={},i.common??={},i.native??={},t(i)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,i)=>{this._socket.emit("getCompactSystemConfig",(r,o)=>{r?i(r):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getForeignStates",e||"*",(r,o)=>{r?i(r):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?r(o):i(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?r(o):i(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n,M,c)=>{o?r(o):i({values:n,sessionId:c,step:M})})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getVersion",(r,o,n)=>{r&&!o&&typeof r=="string"&&r.match(/\d+\.\d+\.\d+/)?t({version:r,serverName:"socketio"}):r?i(r):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(i,r)=>{i?t(i):e(r)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?r(o):i(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,i)=>{e(i)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var i;const t=await this.getObject("system.meta.uuid");e((i=t==null?void 0:t.native)==null?void 0:i.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?r(o):i(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=e?`system.adapter.${e}.`:"system.adapter.",o=`${r}香`,n=await this.getObjectViewSystem("instance",r,o),M=Object.values(n);i(e?M.filter(c=>c.common.name===e):M)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(r);i(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",i=>{i?t(i):e(null)})}})}subscribeOnInstance(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,i,(M,c)=>{M?n(M):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===r)||this._instanceSubscriptions[e].push({messageType:t,callback:r}),o(c)))})}})}unsubscribeFromInstance(e,t,i){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let r;const o=[];do{r=!1;const M=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!i||c.callback===i));if(M!=null&&M!==-1){r=!0;const c=this._instanceSubscriptions[e][M].messageType;this._instanceSubscriptions[e].splice(M,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(L,j)=>L?u(L):N(j))}}))}}while(r&&(!i||!t));return o.length?Promise.all(o).then(M=>!!M.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:i=>(this._socket.emit("log",e,t),i(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function $j(s,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(s.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(s.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(s.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(r=>r.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:s,type:t}}function Pj(s){var i,r,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((r=(i=s.native)==null?void 0:i.hardware)!=null&&r.networkInterfaces){const M=(n=(o=s.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(M).forEach(c=>{M[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class v3e extends ze{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var r;const i=await this.getObject("system.certificates");(r=i==null?void 0:i.native)!=null&&r.certificates?t(Object.entries(i.native.certificates).map(([o,n])=>$j(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"getLogs",t||200,r=>{i(r)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,r=>{i(r)})}})}upgradeController(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:i},n=>{const M=n;M.error?o(M.error):r(M.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?r(o):i(n)})}})}upgradeOsPackages(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!i},o=>{r(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("readLogs",e,(r,o)=>{r&&i(r),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("sendToHost",e,"delLogs",null,r=>{r&&i(r),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o&&r(o),i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&r(o),i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n&&o(n),r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n&&o(n),r()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(r,o)=>{r?i(r):t(Ln(o))})}})}renameGroup(e,t,i){return this.request({commandTimeout:!1,executor:async r=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const M=o.find(c=>c._id===e);if(M){const c=M._id;M._id=t,i!==void 0&&(M.common??={},M.common.name=i),await this.setObject(t,M),await this.delObject(c)}r()}})}getHostInfo(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getHostInfo"'):M?r(M):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):M?r(M):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,i,r){return this.request({cacheKey:`repository_${e}`,forceUpdate:i,commandTimeout:r,executor:(o,n,M)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{M.elapsed||(M.clearTimeout(),c===we.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getInstalled"'):M?r(M):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,M)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{M.elapsed||(M.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=li(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{r.elapsed||(r.clearTimeout(),o===we.PERMISSION_ERROR?i('May not read "BaseSettings"'):o?o.error?i(new Error(o.error)):t(o):i('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=li(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===we.PERMISSION_ERROR?r('May not write "BaseSettings"'):n?i(n):r('Cannot write "BaseSettings"'))})}})}restartController(e){return e=li(e),this.request({executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{r.elapsed||(r.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=li(e),this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),i(n||null))})}})}changePassword(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&r(n),i())})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getHostByIp(e,t){return e=li(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(i,r,o)=>{this._socket.emit("getHostByIp",e,(n,M)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=Pj(M);i([...c,...l])})}})}encrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("encrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}decrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("decrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}chmodFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chmodFile",e,t,i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}chownFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chownFile",e,t,i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}clearNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,i)=>{this._socket.emit("getIsEasyModeStrict",(r,o)=>{i.elapsed||(i.clearTimeout(),r&&t(r),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,i)=>{this._socket.emit("getEasyMode",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(new Error(r)):e(o))})}})}getRatings(e){return this.request({executor:(t,i,r)=>{this._socket.emit("getRatings",!!e,(o,n)=>{r.elapsed||(r.clearTimeout(),o?i(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(i,r,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const M=await n.json();i(M)}catch(n){r(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,i)=>{this._socket.emit("getCurrentInstance",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(r):e(o))})}})}getAdapterInstances(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`instances_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapterInstances",i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getAdapters(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`adapter_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapters",i,(M,c)=>{n.elapsed||(n.clearTimeout(),M&&o(M),r(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactAdapters",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactInstances",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactInstalled",e,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):M?r(M):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,i){return e=Tt(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactRepository",e,M=>{n.elapsed||(n.clearTimeout(),M===we.PERMISSION_ERROR?o('May not read "getCompactRepository"'):M?r(M):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactHosts",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}}const se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ie=globalThis,rs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xt="9.14.0";function to(){return so(ie),ie}function so(s){const e=s.__SENTRY__=s.__SENTRY__||{};return e.version=e.version||Xt,e[Xt]=e[Xt]||{}}function io(s,e,t=ie){const i=t.__SENTRY__=t.__SENTRY__||{},r=i[Xt]=i[Xt]||{};return r[s]||(r[s]=e())}const Wj="Sentry Logger ",jn=["debug","info","warn","error","log","assert","trace"],br={};function Zs(s){if(!("console"in ie))return s();const e=ie.console,t={},i=Object.keys(br);i.forEach(r=>{const o=br[r];t[r]=e[r],e[r]=o});try{return s()}finally{i.forEach(r=>{e[r]=t[r]})}}function Bj(){let s=!1;const e={enable:()=>{s=!0},disable:()=>{s=!1},isEnabled:()=>s};return rs?jn.forEach(t=>{e[t]=(...i)=>{s&&Zs(()=>{ie.console[t](`${Wj}[${t}]:`,...i)})}}):jn.forEach(t=>{e[t]=()=>{}}),e}const J=io("logger",Bj),TN=50,Kt="?",Ha=/\(error: (.*)\)/,Va=/captureMessage|captureException/;function DN(...s){const e=s.sort((t,i)=>t[0]-i[0]).map(t=>t[1]);return(t,i=0,r=0)=>{const o=[],n=t.split(` `);for(let M=i;M1024)continue;const l=Ha.test(c)?c.replace(Ha,"$1"):c;if(!l.match(/\S*Error: /)){for(const N of e){const u=N(l);if(u){o.push(u);break}}if(o.length>=TN+r)break}}return Rj(o.slice(r))}}function Jj(s){return Array.isArray(s)?DN(...s):s}function Rj(s){if(!s.length)return[];const e=Array.from(s);return/sentryWrapped/.test(ar(e).function||"")&&e.pop(),e.reverse(),Va.test(ar(e).function||"")&&(e.pop(),Va.test(ar(e).function||"")&&e.pop()),e.slice(0,TN).map(t=>({...t,filename:t.filename||ar(e).filename,function:t.function||Kt}))}function ar(s){return s[s.length-1]||{}}const fo="";function bt(s){try{return!s||typeof s!="function"?fo:s.name||fo}catch{return fo}}function Za(s){const e=s.exception;if(e){const t=[];try{return e.values.forEach(i=>{i.stacktrace.frames&&t.push(...i.stacktrace.frames)}),t}catch{return}}}const Or={},Xa={};function os(s,e){Or[s]=Or[s]||[],Or[s].push(e)}function ns(s,e){if(!Xa[s]){Xa[s]=!0;try{e()}catch(t){rs&&J.error(`Error while instrumenting ${s}`,t)}}}function Ke(s,e){const t=s&&Or[s];if(t)for(const i of t)try{i(e)}catch(r){rs&&J.error(`Error while triggering instrumentation handler. Type: ${s} Name: ${bt(i)} diff --git a/admin/assets/index-B0CiKPEe.js b/admin/assets/index-qABB1JVe.js similarity index 99% rename from admin/assets/index-B0CiKPEe.js rename to admin/assets/index-qABB1JVe.js index 45fcd748e..d51f968c7 100644 --- a/admin/assets/index-B0CiKPEe.js +++ b/admin/assets/index-qABB1JVe.js @@ -1,4 +1,4 @@ -import{a as Kt,i as Yt}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{R as P,i as g}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{c as F,j as V,P as y}from"./createSvgIcon-ChB2N0i2.js";import{g as Jt}from"./_commonjsHelpers-Cpj98o6Y.js";var yt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},at=P.createContext&&P.createContext(yt),Xt=["attr","size","title"];function Qt(e,t){if(e==null)return{};var i=Zt(e,t),n,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zt(e,t){if(e==null)return{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;i[n]=e[n]}return i}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;tP.createElement(t.tag,xe({key:i},t.attr),xt(t.child)))}function p(e){return t=>P.createElement(ia,ye({attr:xe({},e.attr)},t),xt(e.child))}function ia(e){var t=i=>{var{attr:n,size:l,title:o}=e,c=Qt(e,Xt),s=l||i.size||"1em",m;return i.className&&(m=i.className),e.className&&(m=(m?m+" ":"")+e.className),P.createElement("svg",ye({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,c,{className:m,style:xe(xe({color:e.color||i.color},i.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&P.createElement("title",null,o),e.children)};return at!==void 0?P.createElement(at.Consumer,null,i=>t(i)):t(yt)}function hi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"},child:[]}]})(e)}function gi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z",clipRule:"evenodd"},child:[]},{tag:"path",attr:{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"},child:[]}]})(e)}function yi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)}function xi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)}function bi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 4H11l-1-3H3c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8l1 3h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 16c-2.76 0-5-2.24-5-5s2.24-5 5-5c1.35 0 2.48.5 3.35 1.3L9.03 8.57c-.38-.36-1.04-.78-2.03-.78-1.74 0-3.15 1.44-3.15 3.21S5.26 14.21 7 14.21c2.01 0 2.84-1.44 2.92-2.41H7v-1.71h4.68c.07.31.12.61.12 1.02C11.8 13.97 9.89 16 7 16zm6.17-5.42h3.7c-.43 1.25-1.11 2.43-2.05 3.47-.31-.35-.6-.72-.86-1.1l-.79-2.37zm8.33 9.92c0 .55-.45 1-1 1H14l2-2.5-1.04-3.1 3.1 3.1.92-.92-3.3-3.25.02-.02c1.13-1.25 1.93-2.69 2.4-4.22H20v-1.3h-4.53V8h-1.29v1.29h-1.44L11.46 5.5h9.04c.55 0 1 .45 1 1v14z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0z"},child:[]}]})(e)}function wi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14a2 2 0 0 0-2-2zM11 16l4-4-4-4v3H1v2h10v3z"},child:[]}]})(e)}function Si(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"},child:[]}]})(e)}function Ti(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function Ri(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Ei(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}function zi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},child:[]}]})(e)}function Oi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},child:[]}]})(e)}function ki(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"},child:[]}]})(e)}function Mi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function $i(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"},child:[]}]})(e)}function Ai(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.54 5.54 13.77 7.3 12 5.54 10.23 7.3 8.46 5.54 12 2zm2.92 10-1.76-1.77L18.46 12l-1.76-1.77 1.76-1.77L22 12zm-10 2.92 1.77-1.76L12 18.46l1.77-1.76 1.77 1.76L12 22zm-2.92-10 1.76 1.77L5.54 12l1.76 1.77-1.76 1.77L2 12z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(e)}function Ii(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(e)}function qi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8 5v14l11-7z"},child:[]}]})(e)}function Ni(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 10h11v2H3zM3 6h11v2H3zM3 14h7v2H3zM20.59 11.93l-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"},child:[]}]})(e)}function Ci(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"},child:[]}]})(e)}function _i(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8.4 18.2c.38.5.6 1.12.6 1.8 0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3c.44 0 .85.09 1.23.26l1.41-1.77a4.504 4.504 0 0 1-1.09-3.69l-2.03-.68A2.997 2.997 0 0 1 0 9.5c0-1.66 1.34-3 3-3s3 1.34 3 3c0 .07 0 .14-.01.21l2.03.68a4.468 4.468 0 0 1 3.22-2.32V5.91A3.018 3.018 0 0 1 9 3c0-1.66 1.34-3 3-3s3 1.34 3 3c0 1.4-.96 2.57-2.25 2.91v2.16c1.4.23 2.58 1.11 3.22 2.32L18 9.71V9.5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-1.06 0-1.98-.55-2.52-1.37l-2.03.68a4.49 4.49 0 0 1-1.09 3.69l1.41 1.77c.38-.18.79-.27 1.23-.27 1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.68.22-1.3.6-1.8l-1.41-1.77c-1.35.75-3.01.76-4.37 0L8.4 18.2z"},child:[]}]})(e)}function Di(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)}function ji(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)}function Bi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)}function Hi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0-4h-2V9h2v5z"},child:[]}]})(e)}function Li(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17 6.83 12 10 8.83 8.59 7.41 4 12l4.59 4.59L10 15.17zM17 19H7v-2H5v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2v2z"},child:[]}]})(e)}function Pi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(e)}function Ui(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"},child:[]}]})(e)}function Fi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15a1.49 1.49 0 0 0 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10 10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5zM2 20h20v4H2v-4z"},child:[]}]})(e)}function Vi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15 16v1.26l-6-3v-3.17L11.7 8H16V2h-6v4.9L7.3 10H3v6h5l7 3.5V22h6v-6z"},child:[]}]})(e)}function Wi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"},child:[]}]})(e)}function Gi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"},child:[]}]})(e)}function Ki(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"},child:[]}]})(e)}function Yi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"},child:[]}]})(e)}function Ji(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"},child:[]}]})(e)}function Xi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},child:[]}]})(e)}function Qi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10a2.5 2.5 0 0 0 2.5-2.5c0-.61-.23-1.2-.64-1.67a.528.528 0 0 1-.13-.33c0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9zm5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9zM5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5zm6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5z"},child:[]}]})(e)}function Zi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83zM13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11l-3.5 3.5z"},child:[]}]})(e)}function en(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(e)}function tn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(e)}function an(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function nn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(e)}function rn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"},child:[]}]})(e)}function ln(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function on(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{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"},child:[]}]})(e)}function cn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(e)}function pn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function sn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function dn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"},child:[]}]})(e)}function un(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"},child:[]}]})(e)}function mn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(e)}function fn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(e)}const{loadShare:na}=Yt,{initPromise:ra}=Kt,la=ra.then(e=>na("@mui/material",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),oa=await la.then(e=>e());var vn=oa;function hn(e){return p({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(e)}function gn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function yn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M200 288H88c-21.4 0-32.1 25.8-17 41l32.9 31-99.2 99.3c-6.2 6.2-6.2 16.4 0 22.6l25.4 25.4c6.2 6.2 16.4 6.2 22.6 0L152 408l31.1 33c15.1 15.1 40.9 4.4 40.9-17V312c0-13.3-10.7-24-24-24zm112-64h112c21.4 0 32.1-25.9 17-41l-33-31 99.3-99.3c6.2-6.2 6.2-16.4 0-22.6L481.9 4.7c-6.2-6.2-16.4-6.2-22.6 0L360 104l-31.1-33C313.8 55.9 288 66.6 288 88v112c0 13.3 10.7 24 24 24zm96 136l33-31.1c15.1-15.1 4.4-40.9-17-40.9H312c-13.3 0-24 10.7-24 24v112c0 21.4 25.9 32.1 41 17l31-32.9 99.3 99.3c6.2 6.2 16.4 6.2 22.6 0l25.4-25.4c6.2-6.2 6.2-16.4 0-22.6L408 360zM183 71.1L152 104 52.7 4.7c-6.2-6.2-16.4-6.2-22.6 0L4.7 30.1c-6.2 6.2-6.2 16.4 0 22.6L104 152l-33 31.1C55.9 198.2 66.6 224 88 224h112c13.3 0 24-10.7 24-24V88c0-21.3-25.9-32-41-16.9z"},child:[]}]})(e)}function xn(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function bn(e){return p({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 448h-80V113.45C544 86.19 522.47 64 496 64H384v64h96v384h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM312.24 1.01l-192 49.74C105.99 54.44 96 67.7 96 82.92V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h336V33.18c0-21.58-19.56-37.41-39.76-32.17zM264 288c-13.25 0-24-14.33-24-32s10.75-32 24-32 24 14.33 24 32-10.75 32-24 32z"},child:[]}]})(e)}function wn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.57 128c-28.09 0-54.09 4.52-77.06 12.86l12.41-123.11C289 7.31 279.81-1.18 269.33.13 189.63 10.13 128 77.64 128 159.43c0 28.09 4.52 54.09 12.86 77.06L17.75 224.08C7.31 223-1.18 232.19.13 242.67c10 79.7 77.51 141.33 159.3 141.33 28.09 0 54.09-4.52 77.06-12.86l-12.41 123.11c-1.05 10.43 8.11 18.93 18.59 17.62 79.7-10 141.33-77.51 141.33-159.3 0-28.09-4.52-54.09-12.86-77.06l123.11 12.41c10.44 1.05 18.93-8.11 17.62-18.59-10-79.7-77.51-141.33-159.3-141.33zM256 288a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]}]})(e)}function Sn(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z"},child:[]}]})(e)}function Tn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z"},child:[]}]})(e)}function Rn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M243.2 189.9V258c26.1 5.9 49.3 15.6 73.6 22.3v-68.2c-26-5.8-49.4-15.5-73.6-22.2zm223.3-123c-34.3 15.9-76.5 31.9-117 31.9C296 98.8 251.7 64 184.3 64c-25 0-47.3 4.4-68 12 2.8-7.3 4.1-15.2 3.6-23.6C118.1 24 94.8 1.2 66.3 0 34.3-1.3 8 24.3 8 56c0 19 9.5 35.8 24 45.9V488c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24v-94.4c28.3-12.1 63.6-22.1 114.4-22.1 53.6 0 97.8 34.8 165.2 34.8 48.2 0 86.7-16.3 122.5-40.9 8.7-6 13.8-15.8 13.8-26.4V95.9c.1-23.3-24.2-38.8-45.4-29zM169.6 325.5c-25.8 2.7-50 8.2-73.6 16.6v-70.5c26.2-9.3 47.5-15 73.6-17.4zM464 191c-23.6 9.8-46.3 19.5-73.6 23.9V286c24.8-3.4 51.4-11.8 73.6-26v70.5c-25.1 16.1-48.5 24.7-73.6 27.1V286c-27 3.7-47.9 1.5-73.6-5.6v67.4c-23.9-7.4-47.3-16.7-73.6-21.3V258c-19.7-4.4-40.8-6.8-73.6-3.8v-70c-22.4 3.1-44.6 10.2-73.6 20.9v-70.5c33.2-12.2 50.1-19.8 73.6-22v71.6c27-3.7 48.4-1.3 73.6 5.7v-67.4c23.7 7.4 47.2 16.7 73.6 21.3v68.4c23.7 5.3 47.6 6.9 73.6 2.7V143c27-4.8 52.3-13.6 73.6-22.5z"},child:[]}]})(e)}function En(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"},child:[]}]})(e)}function zn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"},child:[]}]})(e)}function On(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"},child:[]}]})(e)}function kn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(e)}function Mn(e){return p({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"},child:[]}]})(e)}function $n(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(e)}function An(e){return p({attr:{viewBox:"0 0 416 512"},child:[{tag:"path",attr:{d:"M272 96c26.51 0 48-21.49 48-48S298.51 0 272 0s-48 21.49-48 48 21.49 48 48 48zM113.69 317.47l-14.8 34.52H32c-17.67 0-32 14.33-32 32s14.33 32 32 32h77.45c19.25 0 36.58-11.44 44.11-29.09l8.79-20.52-10.67-6.3c-17.32-10.23-30.06-25.37-37.99-42.61zM384 223.99h-44.03l-26.06-53.25c-12.5-25.55-35.45-44.23-61.78-50.94l-71.08-21.14c-28.3-6.8-57.77-.55-80.84 17.14l-39.67 30.41c-14.03 10.75-16.69 30.83-5.92 44.86s30.84 16.66 44.86 5.92l39.69-30.41c7.67-5.89 17.44-8 25.27-6.14l14.7 4.37-37.46 87.39c-12.62 29.48-1.31 64.01 26.3 80.31l84.98 50.17-27.47 87.73c-5.28 16.86 4.11 34.81 20.97 40.09 3.19 1 6.41 1.48 9.58 1.48 13.61 0 26.23-8.77 30.52-22.45l31.64-101.06c5.91-20.77-2.89-43.08-21.64-54.39l-61.24-36.14 31.31-78.28 20.27 41.43c8 16.34 24.92 26.89 43.11 26.89H384c17.67 0 32-14.33 32-32s-14.33-31.99-32-31.99z"},child:[]}]})(e)}function In(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"},child:[]}]})(e)}function qn(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"},child:[]}]})(e)}function Nn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M367.9 329.76c-4.62 5.3-9.78 10.1-15.9 13.65v22.94c66.52 9.34 112 28.05 112 49.65 0 30.93-93.12 56-208 56S48 446.93 48 416c0-21.6 45.48-40.3 112-49.65v-22.94c-6.12-3.55-11.28-8.35-15.9-13.65C58.87 345.34 0 378.05 0 416c0 53.02 114.62 96 256 96s256-42.98 256-96c0-37.95-58.87-70.66-144.1-86.24zM256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-64 192v96c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-96c17.67 0 32-14.33 32-32v-96c0-26.51-21.49-48-48-48h-11.8c-11.07 5.03-23.26 8-36.2 8s-25.13-2.97-36.2-8H208c-26.51 0-48 21.49-48 48v96c0 17.67 14.33 32 32 32z"},child:[]}]})(e)}function Cn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"},child:[]}]})(e)}function _n(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C86 64 0 150 0 256s86 192 192 192h192c106 0 192-86 192-192S490 64 384 64zm0 320c-70.8 0-128-57.3-128-128 0-70.8 57.3-128 128-128 70.8 0 128 57.3 128 128 0 70.8-57.3 128-128 128z"},child:[]}]})(e)}function Dn(e){return p({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"},child:[]}]})(e)}function jn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"},child:[]}]})(e)}function Bn(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"},child:[]}]})(e)}function Hn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function Ln(e){return p({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z"},child:[]}]})(e)}const Pn=F(V.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),Un=F(V.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Fn=F(V.jsx("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"),Vn=F(V.jsx("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"}),"Close"),Wn=F(V.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Gn=F(V.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"Help"),Kn=F(V.jsx("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 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language"),Yn=F(V.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save");var nt=function(){return nt=Object.assign||function(t){for(var i,n=1,l=arguments.length;n0?l:`./${e.name}`;return typeof n.path!="string"&&rt(n,"path",o),rt(n,"relativePath",o),n}function pa(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),l=ca.get(n);l&&Object.defineProperty(e,"type",{value:l,writable:!1,configurable:!1,enumerable:!0})}return e}function rt(e,t,i){Object.defineProperty(e,t,{value:i,writable:!1,configurable:!1,enumerable:!0})}const sa=[".DS_Store","Thumbs.db"];function da(e){return J(this,void 0,void 0,function*(){return be(e)&&ua(e.dataTransfer)?ha(e.dataTransfer,e.type):ma(e)?fa(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?va(e):[]})}function ua(e){return be(e)}function ma(e){return be(e)&&be(e.target)}function be(e){return typeof e=="object"&&e!==null}function fa(e){return je(e.target.files).map(t=>ae(t))}function va(e){return J(this,void 0,void 0,function*(){return(yield Promise.all(e.map(i=>i.getFile()))).map(i=>ae(i))})}function ha(e,t){return J(this,void 0,void 0,function*(){if(e.items){const i=je(e.items).filter(l=>l.kind==="file");if(t!=="drop")return i;const n=yield Promise.all(i.map(ga));return lt(bt(n))}return lt(je(e.files).map(i=>ae(i)))})}function lt(e){return e.filter(t=>sa.indexOf(t.name)===-1)}function je(e){if(e===null)return[];const t=[];for(let i=0;i[...t,...Array.isArray(i)?bt(i):[i]],[])}function ot(e,t){return J(this,void 0,void 0,function*(){var i;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const c=yield o.getFile();return c.handle=o,ae(c)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return ae(n,(i=t==null?void 0:t.fullPath)!==null&&i!==void 0?i:void 0)})}function ya(e){return J(this,void 0,void 0,function*(){return e.isDirectory?wt(e):xa(e)})}function wt(e){const t=e.createReader();return new Promise((i,n)=>{const l=[];function o(){t.readEntries(c=>J(this,void 0,void 0,function*(){if(c.length){const s=Promise.all(c.map(ya));l.push(s),o()}else try{const s=yield Promise.all(l);i(s)}catch(s){n(s)}}),c=>{n(c)})}o()})}function xa(e){return J(this,void 0,void 0,function*(){return new Promise((t,i)=>{e.file(n=>{const l=ae(n,e.fullPath);t(l)},n=>{i(n)})})})}var _e=function(e,t){if(e&&t){var i=Array.isArray(t)?t:t.split(",");if(i.length===0)return!0;var n=e.name||"",l=(e.type||"").toLowerCase(),o=l.replace(/\/.*$/,"");return i.some(function(c){var s=c.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):l===s})}return!0};function ct(e){return Sa(e)||wa(e)||Tt(e)||ba()}function ba(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +import{a as Kt,i as Yt}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{R as P,i as g}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{c as F,j as V,P as y}from"./createSvgIcon-BdRvDw53.js";import{g as Jt}from"./_commonjsHelpers-Cpj98o6Y.js";var yt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},at=P.createContext&&P.createContext(yt),Xt=["attr","size","title"];function Qt(e,t){if(e==null)return{};var i=Zt(e,t),n,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zt(e,t){if(e==null)return{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;i[n]=e[n]}return i}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;tP.createElement(t.tag,xe({key:i},t.attr),xt(t.child)))}function p(e){return t=>P.createElement(ia,ye({attr:xe({},e.attr)},t),xt(e.child))}function ia(e){var t=i=>{var{attr:n,size:l,title:o}=e,c=Qt(e,Xt),s=l||i.size||"1em",m;return i.className&&(m=i.className),e.className&&(m=(m?m+" ":"")+e.className),P.createElement("svg",ye({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,c,{className:m,style:xe(xe({color:e.color||i.color},i.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&P.createElement("title",null,o),e.children)};return at!==void 0?P.createElement(at.Consumer,null,i=>t(i)):t(yt)}function hi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"},child:[]}]})(e)}function gi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z",clipRule:"evenodd"},child:[]},{tag:"path",attr:{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"},child:[]}]})(e)}function yi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)}function xi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)}function bi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 4H11l-1-3H3c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8l1 3h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 16c-2.76 0-5-2.24-5-5s2.24-5 5-5c1.35 0 2.48.5 3.35 1.3L9.03 8.57c-.38-.36-1.04-.78-2.03-.78-1.74 0-3.15 1.44-3.15 3.21S5.26 14.21 7 14.21c2.01 0 2.84-1.44 2.92-2.41H7v-1.71h4.68c.07.31.12.61.12 1.02C11.8 13.97 9.89 16 7 16zm6.17-5.42h3.7c-.43 1.25-1.11 2.43-2.05 3.47-.31-.35-.6-.72-.86-1.1l-.79-2.37zm8.33 9.92c0 .55-.45 1-1 1H14l2-2.5-1.04-3.1 3.1 3.1.92-.92-3.3-3.25.02-.02c1.13-1.25 1.93-2.69 2.4-4.22H20v-1.3h-4.53V8h-1.29v1.29h-1.44L11.46 5.5h9.04c.55 0 1 .45 1 1v14z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0z"},child:[]}]})(e)}function wi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14a2 2 0 0 0-2-2zM11 16l4-4-4-4v3H1v2h10v3z"},child:[]}]})(e)}function Si(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"},child:[]}]})(e)}function Ti(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function Ri(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Ei(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}function zi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},child:[]}]})(e)}function Oi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},child:[]}]})(e)}function ki(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"},child:[]}]})(e)}function Mi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function $i(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"},child:[]}]})(e)}function Ai(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.54 5.54 13.77 7.3 12 5.54 10.23 7.3 8.46 5.54 12 2zm2.92 10-1.76-1.77L18.46 12l-1.76-1.77 1.76-1.77L22 12zm-10 2.92 1.77-1.76L12 18.46l1.77-1.76 1.77 1.76L12 22zm-2.92-10 1.76 1.77L5.54 12l1.76 1.77-1.76 1.77L2 12z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(e)}function Ii(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(e)}function qi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8 5v14l11-7z"},child:[]}]})(e)}function Ni(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 10h11v2H3zM3 6h11v2H3zM3 14h7v2H3zM20.59 11.93l-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"},child:[]}]})(e)}function Ci(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"},child:[]}]})(e)}function _i(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8.4 18.2c.38.5.6 1.12.6 1.8 0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3c.44 0 .85.09 1.23.26l1.41-1.77a4.504 4.504 0 0 1-1.09-3.69l-2.03-.68A2.997 2.997 0 0 1 0 9.5c0-1.66 1.34-3 3-3s3 1.34 3 3c0 .07 0 .14-.01.21l2.03.68a4.468 4.468 0 0 1 3.22-2.32V5.91A3.018 3.018 0 0 1 9 3c0-1.66 1.34-3 3-3s3 1.34 3 3c0 1.4-.96 2.57-2.25 2.91v2.16c1.4.23 2.58 1.11 3.22 2.32L18 9.71V9.5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-1.06 0-1.98-.55-2.52-1.37l-2.03.68a4.49 4.49 0 0 1-1.09 3.69l1.41 1.77c.38-.18.79-.27 1.23-.27 1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.68.22-1.3.6-1.8l-1.41-1.77c-1.35.75-3.01.76-4.37 0L8.4 18.2z"},child:[]}]})(e)}function Di(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)}function ji(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)}function Bi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)}function Hi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0-4h-2V9h2v5z"},child:[]}]})(e)}function Li(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17 6.83 12 10 8.83 8.59 7.41 4 12l4.59 4.59L10 15.17zM17 19H7v-2H5v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2v2z"},child:[]}]})(e)}function Pi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(e)}function Ui(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"},child:[]}]})(e)}function Fi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15a1.49 1.49 0 0 0 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10 10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5zM2 20h20v4H2v-4z"},child:[]}]})(e)}function Vi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15 16v1.26l-6-3v-3.17L11.7 8H16V2h-6v4.9L7.3 10H3v6h5l7 3.5V22h6v-6z"},child:[]}]})(e)}function Wi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"},child:[]}]})(e)}function Gi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"},child:[]}]})(e)}function Ki(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"},child:[]}]})(e)}function Yi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"},child:[]}]})(e)}function Ji(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"},child:[]}]})(e)}function Xi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},child:[]}]})(e)}function Qi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10a2.5 2.5 0 0 0 2.5-2.5c0-.61-.23-1.2-.64-1.67a.528.528 0 0 1-.13-.33c0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9zm5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9zM5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5zm6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5z"},child:[]}]})(e)}function Zi(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83zM13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11l-3.5 3.5z"},child:[]}]})(e)}function en(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(e)}function tn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(e)}function an(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function nn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(e)}function rn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"},child:[]}]})(e)}function ln(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function on(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{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"},child:[]}]})(e)}function cn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(e)}function pn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function sn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function dn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"},child:[]}]})(e)}function un(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"},child:[]}]})(e)}function mn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(e)}function fn(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(e)}const{loadShare:na}=Yt,{initPromise:ra}=Kt,la=ra.then(e=>na("@mui/material",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),oa=await la.then(e=>e());var vn=oa;function hn(e){return p({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(e)}function gn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function yn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M200 288H88c-21.4 0-32.1 25.8-17 41l32.9 31-99.2 99.3c-6.2 6.2-6.2 16.4 0 22.6l25.4 25.4c6.2 6.2 16.4 6.2 22.6 0L152 408l31.1 33c15.1 15.1 40.9 4.4 40.9-17V312c0-13.3-10.7-24-24-24zm112-64h112c21.4 0 32.1-25.9 17-41l-33-31 99.3-99.3c6.2-6.2 6.2-16.4 0-22.6L481.9 4.7c-6.2-6.2-16.4-6.2-22.6 0L360 104l-31.1-33C313.8 55.9 288 66.6 288 88v112c0 13.3 10.7 24 24 24zm96 136l33-31.1c15.1-15.1 4.4-40.9-17-40.9H312c-13.3 0-24 10.7-24 24v112c0 21.4 25.9 32.1 41 17l31-32.9 99.3 99.3c6.2 6.2 16.4 6.2 22.6 0l25.4-25.4c6.2-6.2 6.2-16.4 0-22.6L408 360zM183 71.1L152 104 52.7 4.7c-6.2-6.2-16.4-6.2-22.6 0L4.7 30.1c-6.2 6.2-6.2 16.4 0 22.6L104 152l-33 31.1C55.9 198.2 66.6 224 88 224h112c13.3 0 24-10.7 24-24V88c0-21.3-25.9-32-41-16.9z"},child:[]}]})(e)}function xn(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function bn(e){return p({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 448h-80V113.45C544 86.19 522.47 64 496 64H384v64h96v384h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM312.24 1.01l-192 49.74C105.99 54.44 96 67.7 96 82.92V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h336V33.18c0-21.58-19.56-37.41-39.76-32.17zM264 288c-13.25 0-24-14.33-24-32s10.75-32 24-32 24 14.33 24 32-10.75 32-24 32z"},child:[]}]})(e)}function wn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.57 128c-28.09 0-54.09 4.52-77.06 12.86l12.41-123.11C289 7.31 279.81-1.18 269.33.13 189.63 10.13 128 77.64 128 159.43c0 28.09 4.52 54.09 12.86 77.06L17.75 224.08C7.31 223-1.18 232.19.13 242.67c10 79.7 77.51 141.33 159.3 141.33 28.09 0 54.09-4.52 77.06-12.86l-12.41 123.11c-1.05 10.43 8.11 18.93 18.59 17.62 79.7-10 141.33-77.51 141.33-159.3 0-28.09-4.52-54.09-12.86-77.06l123.11 12.41c10.44 1.05 18.93-8.11 17.62-18.59-10-79.7-77.51-141.33-159.3-141.33zM256 288a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]}]})(e)}function Sn(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z"},child:[]}]})(e)}function Tn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z"},child:[]}]})(e)}function Rn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M243.2 189.9V258c26.1 5.9 49.3 15.6 73.6 22.3v-68.2c-26-5.8-49.4-15.5-73.6-22.2zm223.3-123c-34.3 15.9-76.5 31.9-117 31.9C296 98.8 251.7 64 184.3 64c-25 0-47.3 4.4-68 12 2.8-7.3 4.1-15.2 3.6-23.6C118.1 24 94.8 1.2 66.3 0 34.3-1.3 8 24.3 8 56c0 19 9.5 35.8 24 45.9V488c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24v-94.4c28.3-12.1 63.6-22.1 114.4-22.1 53.6 0 97.8 34.8 165.2 34.8 48.2 0 86.7-16.3 122.5-40.9 8.7-6 13.8-15.8 13.8-26.4V95.9c.1-23.3-24.2-38.8-45.4-29zM169.6 325.5c-25.8 2.7-50 8.2-73.6 16.6v-70.5c26.2-9.3 47.5-15 73.6-17.4zM464 191c-23.6 9.8-46.3 19.5-73.6 23.9V286c24.8-3.4 51.4-11.8 73.6-26v70.5c-25.1 16.1-48.5 24.7-73.6 27.1V286c-27 3.7-47.9 1.5-73.6-5.6v67.4c-23.9-7.4-47.3-16.7-73.6-21.3V258c-19.7-4.4-40.8-6.8-73.6-3.8v-70c-22.4 3.1-44.6 10.2-73.6 20.9v-70.5c33.2-12.2 50.1-19.8 73.6-22v71.6c27-3.7 48.4-1.3 73.6 5.7v-67.4c23.7 7.4 47.2 16.7 73.6 21.3v68.4c23.7 5.3 47.6 6.9 73.6 2.7V143c27-4.8 52.3-13.6 73.6-22.5z"},child:[]}]})(e)}function En(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"},child:[]}]})(e)}function zn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"},child:[]}]})(e)}function On(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"},child:[]}]})(e)}function kn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(e)}function Mn(e){return p({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"},child:[]}]})(e)}function $n(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(e)}function An(e){return p({attr:{viewBox:"0 0 416 512"},child:[{tag:"path",attr:{d:"M272 96c26.51 0 48-21.49 48-48S298.51 0 272 0s-48 21.49-48 48 21.49 48 48 48zM113.69 317.47l-14.8 34.52H32c-17.67 0-32 14.33-32 32s14.33 32 32 32h77.45c19.25 0 36.58-11.44 44.11-29.09l8.79-20.52-10.67-6.3c-17.32-10.23-30.06-25.37-37.99-42.61zM384 223.99h-44.03l-26.06-53.25c-12.5-25.55-35.45-44.23-61.78-50.94l-71.08-21.14c-28.3-6.8-57.77-.55-80.84 17.14l-39.67 30.41c-14.03 10.75-16.69 30.83-5.92 44.86s30.84 16.66 44.86 5.92l39.69-30.41c7.67-5.89 17.44-8 25.27-6.14l14.7 4.37-37.46 87.39c-12.62 29.48-1.31 64.01 26.3 80.31l84.98 50.17-27.47 87.73c-5.28 16.86 4.11 34.81 20.97 40.09 3.19 1 6.41 1.48 9.58 1.48 13.61 0 26.23-8.77 30.52-22.45l31.64-101.06c5.91-20.77-2.89-43.08-21.64-54.39l-61.24-36.14 31.31-78.28 20.27 41.43c8 16.34 24.92 26.89 43.11 26.89H384c17.67 0 32-14.33 32-32s-14.33-31.99-32-31.99z"},child:[]}]})(e)}function In(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"},child:[]}]})(e)}function qn(e){return p({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"},child:[]}]})(e)}function Nn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M367.9 329.76c-4.62 5.3-9.78 10.1-15.9 13.65v22.94c66.52 9.34 112 28.05 112 49.65 0 30.93-93.12 56-208 56S48 446.93 48 416c0-21.6 45.48-40.3 112-49.65v-22.94c-6.12-3.55-11.28-8.35-15.9-13.65C58.87 345.34 0 378.05 0 416c0 53.02 114.62 96 256 96s256-42.98 256-96c0-37.95-58.87-70.66-144.1-86.24zM256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-64 192v96c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-96c17.67 0 32-14.33 32-32v-96c0-26.51-21.49-48-48-48h-11.8c-11.07 5.03-23.26 8-36.2 8s-25.13-2.97-36.2-8H208c-26.51 0-48 21.49-48 48v96c0 17.67 14.33 32 32 32z"},child:[]}]})(e)}function Cn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"},child:[]}]})(e)}function _n(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C86 64 0 150 0 256s86 192 192 192h192c106 0 192-86 192-192S490 64 384 64zm0 320c-70.8 0-128-57.3-128-128 0-70.8 57.3-128 128-128 70.8 0 128 57.3 128 128 0 70.8-57.3 128-128 128z"},child:[]}]})(e)}function Dn(e){return p({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"},child:[]}]})(e)}function jn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"},child:[]}]})(e)}function Bn(e){return p({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"},child:[]}]})(e)}function Hn(e){return p({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function Ln(e){return p({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z"},child:[]}]})(e)}const Pn=F(V.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),Un=F(V.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Fn=F(V.jsx("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"),Vn=F(V.jsx("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"}),"Close"),Wn=F(V.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Gn=F(V.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"Help"),Kn=F(V.jsx("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 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"}),"Language"),Yn=F(V.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save");var nt=function(){return nt=Object.assign||function(t){for(var i,n=1,l=arguments.length;n0?l:`./${e.name}`;return typeof n.path!="string"&&rt(n,"path",o),rt(n,"relativePath",o),n}function pa(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),l=ca.get(n);l&&Object.defineProperty(e,"type",{value:l,writable:!1,configurable:!1,enumerable:!0})}return e}function rt(e,t,i){Object.defineProperty(e,t,{value:i,writable:!1,configurable:!1,enumerable:!0})}const sa=[".DS_Store","Thumbs.db"];function da(e){return J(this,void 0,void 0,function*(){return be(e)&&ua(e.dataTransfer)?ha(e.dataTransfer,e.type):ma(e)?fa(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?va(e):[]})}function ua(e){return be(e)}function ma(e){return be(e)&&be(e.target)}function be(e){return typeof e=="object"&&e!==null}function fa(e){return je(e.target.files).map(t=>ae(t))}function va(e){return J(this,void 0,void 0,function*(){return(yield Promise.all(e.map(i=>i.getFile()))).map(i=>ae(i))})}function ha(e,t){return J(this,void 0,void 0,function*(){if(e.items){const i=je(e.items).filter(l=>l.kind==="file");if(t!=="drop")return i;const n=yield Promise.all(i.map(ga));return lt(bt(n))}return lt(je(e.files).map(i=>ae(i)))})}function lt(e){return e.filter(t=>sa.indexOf(t.name)===-1)}function je(e){if(e===null)return[];const t=[];for(let i=0;i[...t,...Array.isArray(i)?bt(i):[i]],[])}function ot(e,t){return J(this,void 0,void 0,function*(){var i;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const c=yield o.getFile();return c.handle=o,ae(c)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return ae(n,(i=t==null?void 0:t.fullPath)!==null&&i!==void 0?i:void 0)})}function ya(e){return J(this,void 0,void 0,function*(){return e.isDirectory?wt(e):xa(e)})}function wt(e){const t=e.createReader();return new Promise((i,n)=>{const l=[];function o(){t.readEntries(c=>J(this,void 0,void 0,function*(){if(c.length){const s=Promise.all(c.map(ya));l.push(s),o()}else try{const s=yield Promise.all(l);i(s)}catch(s){n(s)}}),c=>{n(c)})}o()})}function xa(e){return J(this,void 0,void 0,function*(){return new Promise((t,i)=>{e.file(n=>{const l=ae(n,e.fullPath);t(l)},n=>{i(n)})})})}var _e=function(e,t){if(e&&t){var i=Array.isArray(t)?t:t.split(",");if(i.length===0)return!0;var n=e.name||"",l=(e.type||"").toLowerCase(),o=l.replace(/\/.*$/,"");return i.some(function(c){var s=c.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):l===s})}return!0};function ct(e){return Sa(e)||wa(e)||Tt(e)||ba()}function ba(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wa(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sa(e){if(Array.isArray(e))return Be(e)}function pt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),i.push.apply(i,n)}return i}function st(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&arguments[0]!==void 0?arguments[0]:"",i=t.split(","),n=i.length>1?"one of ".concat(i.join(", ")):i[0];return{code:Oa,message:"File type must be ".concat(n)}},dt=function(t){return{code:ka,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ut=function(t){return{code:Ma,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ia={code:$a,message:"Too many files"};function Rt(e,t){var i=e.type==="application/x-moz-file"||za(e,t);return[i,i?null:Aa(t)]}function Et(e,t,i){if(Y(e.size))if(Y(t)&&Y(i)){if(e.size>i)return[!1,dt(i)];if(e.sizei)return[!1,dt(i)]}return[!0,null]}function Y(e){return e!=null}function qa(e){var t=e.files,i=e.accept,n=e.minSize,l=e.maxSize,o=e.multiple,c=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&c>=1&&t.length>c?!1:t.every(function(m){var w=Rt(m,i),b=ce(w,1),f=b[0],T=Et(m,n,l),R=ce(T,1),v=R[0],x=s?s(m):null;return f&&v&&!x})}function we(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ge(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function mt(e){e.preventDefault()}function Na(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Ca(e){return e.indexOf("Edge/")!==-1}function _a(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Na(e)||Ca(e)}function D(){for(var e=arguments.length,t=new Array(e),i=0;i1?l-1:0),c=1;cTt("react-dom",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),kt=await jt.then(e=>e());var Ot=kt;const bo=We(Ot);var Qe={exports:{}},f={};/** @license React v16.13.1 +import{g as We}from"./_commonjsHelpers-Cpj98o6Y.js";import{a as mt,i as ht}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{i}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{ah as Xe,ai as yt,aj as Be,ak as Fe,al as St,am as pt,an as gt,ao as Ct,j as g,ap as bt,aq as vt,ar as _t,u as xt,as as $t,T as V,b as Mt,ac as Et,h as wt}from"./createSvgIcon-BdRvDw53.js";const{loadShare:Tt}=ht,{initPromise:Pt}=mt,jt=Pt.then(e=>Tt("react-dom",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),kt=await jt.then(e=>e());var Ot=kt;const bo=We(Ot);var Qe={exports:{}},f={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. diff --git a/admin/assets/useTheme-Do7i4pX2.js b/admin/assets/useTheme-Cl1QmYFL.js similarity index 73% rename from admin/assets/useTheme-Do7i4pX2.js rename to admin/assets/useTheme-Cl1QmYFL.js index aaf382318..81e1acfec 100644 --- a/admin/assets/useTheme-Do7i4pX2.js +++ b/admin/assets/useTheme-Cl1QmYFL.js @@ -1 +1 @@ -import"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{q as t,u as s,T as m,E as u}from"./createSvgIcon-ChB2N0i2.js";const a=t();function r(e=a){return s(e)}function T(){const e=r(u);return e[m]||e}export{r as a,T as u}; +import"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{q as t,u as s,T as m,E as u}from"./createSvgIcon-BdRvDw53.js";const a=t();function r(e=a){return s(e)}function T(){const e=r(u);return e[m]||e}export{r as a,T as u}; diff --git a/admin/custom/assets/index-C0zIf7zh.js b/admin/custom/assets/index-C0zIf7zh.js deleted file mode 100644 index 15dea6336..000000000 --- a/admin/custom/assets/index-C0zIf7zh.js +++ /dev/null @@ -1,1392 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CttBOMyq.js","./useTheme-MELayQMj.js","./_commonjsHelpers-D6-XlEtG.js","./createTheme-BwMO3rTt.js","./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js","./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js","./useThemeWithoutDefault-C-hl_s0Z.js"])))=>i.map(i=>d[i]); -import{C as pt,R as k}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js";import{a as Zr,c as He,g as qr}from"./_commonjsHelpers-D6-XlEtG.js";import{C as O}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js";import{C as X,a as es,I as ts,D as Wi}from"./index-B8sZ2j0S.js";import{C as j,A as ns,a as Hi}from"./ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js";import{R as is}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js";import{F as rs}from"./FilledInput-CtcQVKyj.js";import{p as ss}from"./createTheme-BwMO3rTt.js";import{i as Pn}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import{p as Un}from"./useTheme-MELayQMj.js";import{_ as os}from"./preload-helper-Dp1pzeXC.js";import"./DefaultPropsProvider-CHpMCMgA.js";import"./defaultTheme-avbtL0lf.js";import"./DefaultPropsProvider-DbEA5uR6.js";import"./jsx-runtime-o-xyxrOj.js";import"./useEnhancedEffect-CdLBzwyA.js";import"./useThemeWithoutDefault-C-hl_s0Z.js";const as=Object.freeze(Object.defineProperty({__proto__:null,get ConfigGeneric(){return G},get ConfigPanel(){return $t},get JsonConfig(){return Al},get JsonConfigComponent(){return cn}},Symbol.toStringTag,{value:"Module"}));var ls=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,us=/[\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]/,hs=/[\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]/,$n={Space_Separator:ls,ID_Start:us,ID_Continue:hs},ke={isSpaceSeparator(L){return typeof L=="string"&&$n.Space_Separator.test(L)},isIdStartChar(L){return typeof L=="string"&&(L>="a"&&L<="z"||L>="A"&&L<="Z"||L==="$"||L==="_"||$n.ID_Start.test(L))},isIdContinueChar(L){return typeof L=="string"&&(L>="a"&&L<="z"||L>="A"&&L<="Z"||L>="0"&&L<="9"||L==="$"||L==="_"||L==="‌"||L==="‍"||$n.ID_Continue.test(L))},isDigit(L){return typeof L=="string"&&/[0-9]/.test(L)},isHexDigit(L){return typeof L=="string"&&/[0-9A-Fa-f]/.test(L)}};let Wn,Be,it,pn,dt,Ye,Ie,Gn,Vt;var cs=function(i,n){Wn=String(i),Be="start",it=[],pn=0,dt=1,Ye=0,Ie=void 0,Gn=void 0,Vt=void 0;do Ie=ps(),gs[Be]();while(Ie.type!=="eof");return typeof n=="function"?Hn({"":Vt},"",n):Vt};function Hn(L,i,n){const u=L[i];if(u!=null&&typeof u=="object")if(Array.isArray(u))for(let y=0;y0;){const n=rt();if(!ke.isHexDigit(n))throw Se(Z());L+=Z()}return String.fromCodePoint(parseInt(L,16))}const gs={start(){if(Ie.type==="eof")throw Ct();Tn()},beforePropertyName(){switch(Ie.type){case"identifier":case"string":Gn=Ie.value,Be="afterPropertyName";return;case"punctuator":nn();return;case"eof":throw Ct()}},afterPropertyName(){if(Ie.type==="eof")throw Ct();Be="beforePropertyValue"},beforePropertyValue(){if(Ie.type==="eof")throw Ct();Tn()},beforeArrayValue(){if(Ie.type==="eof")throw Ct();if(Ie.type==="punctuator"&&Ie.value==="]"){nn();return}Tn()},afterPropertyValue(){if(Ie.type==="eof")throw Ct();switch(Ie.value){case",":Be="beforePropertyName";return;case"}":nn()}},afterArrayValue(){if(Ie.type==="eof")throw Ct();switch(Ie.value){case",":Be="beforeArrayValue";return;case"]":nn()}},end(){}};function Tn(){let L;switch(Ie.type){case"punctuator":switch(Ie.value){case"{":L={};break;case"[":L=[];break}break;case"null":case"boolean":case"numeric":case"string":L=Ie.value;break}if(Vt===void 0)Vt=L;else{const i=it[it.length-1];Array.isArray(i)?i.push(L):Object.defineProperty(i,Gn,{value:L,writable:!0,enumerable:!0,configurable:!0})}if(L!==null&&typeof L=="object")it.push(L),Array.isArray(L)?Be="beforeArrayValue":Be="beforePropertyName";else{const i=it[it.length-1];i==null?Be="end":Array.isArray(i)?Be="afterArrayValue":Be="afterPropertyValue"}}function nn(){it.pop();const L=it[it.length-1];L==null?Be="end":Array.isArray(L)?Be="afterArrayValue":Be="afterPropertyValue"}function Se(L){return dn(L===void 0?`JSON5: invalid end of input at ${dt}:${Ye}`:`JSON5: invalid character '${ji(L)}' at ${dt}:${Ye}`)}function Ct(){return dn(`JSON5: invalid end of input at ${dt}:${Ye}`)}function hi(){return Ye-=5,dn(`JSON5: invalid identifier character at ${dt}:${Ye}`)}function ms(L){console.warn(`JSON5: '${ji(L)}' in strings is not valid ECMAScript; consider escaping`)}function ji(L){const i={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(i[L])return i[L];if(L<" "){const n=L.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return L}function dn(L){const i=new SyntaxError(L);return i.lineNumber=dt,i.columnNumber=Ye,i}var vs=function(i,n,u){const y=[];let o="",h,d,s="",p;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(u=n.space,p=n.quote,n=n.replacer),typeof n=="function")d=n;else if(Array.isArray(n)){h=[];for(const c of n){let f;typeof c=="string"?f=c:(typeof c=="number"||c instanceof String||c instanceof Number)&&(f=String(c)),f!==void 0&&h.indexOf(f)<0&&h.push(f)}}return u instanceof Number?u=Number(u):u instanceof String&&(u=String(u)),typeof u=="number"?u>0&&(u=Math.min(10,Math.floor(u)),s=" ".substr(0,u)):typeof u=="string"&&(s=u.substr(0,10)),e("",{"":i});function e(c,f){let v=f[c];switch(v!=null&&(typeof v.toJSON5=="function"?v=v.toJSON5(c):typeof v.toJSON=="function"&&(v=v.toJSON(c))),d&&(v=d.call(f,c,v)),v instanceof Number?v=Number(v):v instanceof String?v=String(v):v instanceof Boolean&&(v=v.valueOf()),v){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof v=="string")return t(v);if(typeof v=="number")return String(v);if(typeof v=="object")return Array.isArray(v)?a(v):r(v)}function t(c){const f={"'":.1,'"':.2},v={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let b="";for(let D=0;Df[D]=0)throw TypeError("Converting circular structure to JSON5");y.push(c);let f=o;o=o+s;let v=h||Object.keys(c),b=[];for(const D of v){const E=e(D,c);if(E!==void 0){let g=l(D)+":";s!==""&&(g+=" "),g+=E,b.push(g)}}let A;if(b.length===0)A="{}";else{let D;if(s==="")D=b.join(","),A="{"+D+"}";else{let E=`, -`+o;D=b.join(E),A=`{ -`+o+D+`, -`+f+"}"}}return y.pop(),o=f,A}function l(c){if(c.length===0)return t(c);const f=String.fromCodePoint(c.codePointAt(0));if(!ke.isIdStartChar(f))return t(c);for(let v=f.length;v=0)throw TypeError("Converting circular structure to JSON5");y.push(c);let f=o;o=o+s;let v=[];for(let A=0;A>>2]>>>24-S%4*8&255;A[E+S>>>2]|=$<<24-(E+S)%4*8}else for(var _=0;_>>2]=D[_>>>2];return this.sigBytes+=g,this},clamp:function(){var b=this.words,A=this.sigBytes;b[A>>>2]&=4294967295<<32-A%4*8,b.length=u.ceil(A/4)},clone:function(){var b=e.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var A=[],D=0;D>>2]>>>24-g%4*8&255;E.push((S>>>4).toString(16)),E.push((S&15).toString(16))}return E.join("")},parse:function(b){for(var A=b.length,D=[],E=0;E>>3]|=parseInt(b.substr(E,2),16)<<24-E%8*4;return new t.init(D,A/2)}},a=r.Latin1={stringify:function(b){for(var A=b.words,D=b.sigBytes,E=[],g=0;g>>2]>>>24-g%4*8&255;E.push(String.fromCharCode(S))}return E.join("")},parse:function(b){for(var A=b.length,D=[],E=0;E>>2]|=(b.charCodeAt(E)&255)<<24-E%4*8;return new t.init(D,A)}},c=r.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}},f=p.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=c.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var A,D=this._data,E=D.words,g=D.sigBytes,S=this.blockSize,$=S*4,_=g/$;b?_=u.ceil(_):_=u.max((_|0)-this._minBufferSize,0);var T=_*S,I=u.min(T*4,g);if(T){for(var w=0;w>>24)&16711935|(A<<24|A>>>8)&4278255360}var D=this._hash.words,E=c[f+0],g=c[f+1],S=c[f+2],$=c[f+3],_=c[f+4],T=c[f+5],I=c[f+6],w=c[f+7],m=c[f+8],C=c[f+9],x=c[f+10],M=c[f+11],F=c[f+12],R=c[f+13],N=c[f+14],W=c[f+15],B=D[0],V=D[1],P=D[2],z=D[3];B=t(B,V,P,z,E,7,p[0]),z=t(z,B,V,P,g,12,p[1]),P=t(P,z,B,V,S,17,p[2]),V=t(V,P,z,B,$,22,p[3]),B=t(B,V,P,z,_,7,p[4]),z=t(z,B,V,P,T,12,p[5]),P=t(P,z,B,V,I,17,p[6]),V=t(V,P,z,B,w,22,p[7]),B=t(B,V,P,z,m,7,p[8]),z=t(z,B,V,P,C,12,p[9]),P=t(P,z,B,V,x,17,p[10]),V=t(V,P,z,B,M,22,p[11]),B=t(B,V,P,z,F,7,p[12]),z=t(z,B,V,P,R,12,p[13]),P=t(P,z,B,V,N,17,p[14]),V=t(V,P,z,B,W,22,p[15]),B=r(B,V,P,z,g,5,p[16]),z=r(z,B,V,P,I,9,p[17]),P=r(P,z,B,V,M,14,p[18]),V=r(V,P,z,B,E,20,p[19]),B=r(B,V,P,z,T,5,p[20]),z=r(z,B,V,P,x,9,p[21]),P=r(P,z,B,V,W,14,p[22]),V=r(V,P,z,B,_,20,p[23]),B=r(B,V,P,z,C,5,p[24]),z=r(z,B,V,P,N,9,p[25]),P=r(P,z,B,V,$,14,p[26]),V=r(V,P,z,B,m,20,p[27]),B=r(B,V,P,z,R,5,p[28]),z=r(z,B,V,P,S,9,p[29]),P=r(P,z,B,V,w,14,p[30]),V=r(V,P,z,B,F,20,p[31]),B=l(B,V,P,z,T,4,p[32]),z=l(z,B,V,P,m,11,p[33]),P=l(P,z,B,V,M,16,p[34]),V=l(V,P,z,B,N,23,p[35]),B=l(B,V,P,z,g,4,p[36]),z=l(z,B,V,P,_,11,p[37]),P=l(P,z,B,V,w,16,p[38]),V=l(V,P,z,B,x,23,p[39]),B=l(B,V,P,z,R,4,p[40]),z=l(z,B,V,P,E,11,p[41]),P=l(P,z,B,V,$,16,p[42]),V=l(V,P,z,B,I,23,p[43]),B=l(B,V,P,z,C,4,p[44]),z=l(z,B,V,P,F,11,p[45]),P=l(P,z,B,V,W,16,p[46]),V=l(V,P,z,B,S,23,p[47]),B=a(B,V,P,z,E,6,p[48]),z=a(z,B,V,P,w,10,p[49]),P=a(P,z,B,V,N,15,p[50]),V=a(V,P,z,B,T,21,p[51]),B=a(B,V,P,z,F,6,p[52]),z=a(z,B,V,P,$,10,p[53]),P=a(P,z,B,V,x,15,p[54]),V=a(V,P,z,B,g,21,p[55]),B=a(B,V,P,z,m,6,p[56]),z=a(z,B,V,P,W,10,p[57]),P=a(P,z,B,V,I,15,p[58]),V=a(V,P,z,B,R,21,p[59]),B=a(B,V,P,z,_,6,p[60]),z=a(z,B,V,P,M,10,p[61]),P=a(P,z,B,V,S,15,p[62]),V=a(V,P,z,B,C,21,p[63]),D[0]=D[0]+B|0,D[1]=D[1]+V|0,D[2]=D[2]+P|0,D[3]=D[3]+z|0},_doFinalize:function(){var c=this._data,f=c.words,v=this._nDataBytes*8,b=c.sigBytes*8;f[b>>>5]|=128<<24-b%32;var A=u.floor(v/4294967296),D=v;f[(b+64>>>9<<4)+15]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,f[(b+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,c.sigBytes=(f.length+1)*4,this._process();for(var E=this._hash,g=E.words,S=0;S<4;S++){var $=g[S];g[S]=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360}return E},clone:function(){var c=d.clone.call(this);return c._hash=this._hash.clone(),c}});function t(c,f,v,b,A,D,E){var g=c+(f&v|~f&b)+A+E;return(g<>>32-D)+f}function r(c,f,v,b,A,D,E){var g=c+(f&b|v&~b)+A+E;return(g<>>32-D)+f}function l(c,f,v,b,A,D,E){var g=c+(f^v^b)+A+E;return(g<>>32-D)+f}function a(c,f,v,b,A,D,E){var g=c+(v^(f|~b))+A+E;return(g<>>32-D)+f}y.MD5=d._createHelper(e),y.HmacMD5=d._createHmacHelper(e)}(Math),n.MD5})})(Kn);var xs=Kn.exports;const pi=qr(xs),$s=window.innerWidth<=600?12:void 0;function _n(L){return Object.prototype.toString.call(L)==="[object Object]"}class G extends pt.Component{static DIFFERENT_VALUE="__different__";static DIFFERENT_LABEL="ra___different__";static NONE_VALUE="";static NONE_LABEL="ra_none";defaultValue;isError;lang;defaultSendToDone;sendToTimeout;noPlaceRequired;constructor(i){super(i),this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},i.schema&&(i.custom?this.defaultValue=i.schema.defaultFunc?this.executeCustom(i.schema.defaultFunc,i.data,i.customObj,i.oContext.instanceObj,i.arrayIndex,i.globalData):i.schema.default:i.schema.type!=="state"&&(this.defaultValue=i.schema.defaultFunc?this.execute(i.schema.defaultFunc,i.schema.default,i.data,i.arrayIndex,i.globalData):i.schema.default)),this.lang=j.I18n.getLanguage()}componentDidMount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr,this.onUpdate);const i=["select","autocomplete","autocompleteSendTo"];if(this.defaultValue!==void 0){const n=G.getValue(this.props.data,this.props.attr);(n===void 0||i.includes(this.props.schema.type)&&(n===""||n===null))&&setTimeout(()=>{this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(G.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)))},100)}else this.props.schema.defaultSendTo&&this.sendTo()}sendTo(){if(this.props.alive){this.defaultSendToDone=!0;let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}else i={attr:this.props.attr,value:G.getValue(this.props.data,this.props.attr)};i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.defaultSendTo,i).then(n=>{n!=null&&(this.props.custom?this.props.onChange(this.props.attr,n,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(G.setValue(this.props.data,this.props.attr,n),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data))))})}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,j.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()))}componentWillUnmount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr),this.sendToTimeout&&(clearTimeout(this.sendToTimeout),this.sendToTimeout=null)}onUpdate=i=>{const n=G.getValue(i||this.props.data,this.props.attr)||"";this.state.value!==n?this.setState({value:n}):this.forceUpdate()};static getValue(i,n){if(typeof n=="string")return G.getValue(i,n.split("."));if(n.length===1)return i[n[0]];const u=n.shift();if(typeof u=="string"&&typeof i[u]=="object")return G.getValue(i[u],n)}static setValue(i,n,u){if(typeof n=="string"){G.setValue(i,n.split("."),u);return}if(n.length===1)u===null?delete i[n[0]]:i[n[0]]=u;else{const y=n.shift();if(typeof y!="string")return;(!i[y]||typeof i[y]=="object")&&(i[y]=i[y]||{}),G.setValue(i[y],n,u)}}getText(i,n){if(!i)return"";if(typeof i=="string"){const u=n?i:j.I18n.t(i);return u.includes("${")?this.getPattern(u,null,n):u}return _n(i)?i.func?typeof i.func=="object"?this.getPattern(i.func[this.lang]||i.func.en||"",null,!0):this.getPattern(i.func,null,n):i[this.lang]||i.en||"":i.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=k.createElement(X.Warning,null):i.type==="error"?n=k.createElement(X.Error,null):i.type==="info"&&(n=k.createElement(X.Info,null)),k.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n||void 0,onClose:u=>this.setState({confirmDialog:!1},()=>{if(u){if(this.state.confirmCallback){const o=this.state.confirmCallback;this.setState({confirmCallback:null},()=>o(!0));return}const y=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&G.setValue(y,this.state.confirmDepAttr,this.state.confirmDepNewValue),G.setValue(y,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(y))}else{const y=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{y&&y(!1)})}})})}getIcon(i){i=i||this.props.schema.icon;let n=null;return i==="auth"?n=k.createElement(X.Key,null):i==="send"?n=k.createElement(X.Send,null):i==="web"?n=k.createElement(X.Public,null):i==="warning"?n=k.createElement(X.Warning,null):i==="error"?n=k.createElement(X.Error,null):i==="info"?n=k.createElement(X.Info,null):i==="search"?n=k.createElement(X.Search,null):i==="book"?n=k.createElement(X.MenuBook,null):i==="help"?n=k.createElement(X.Help,null):i==="upload"?n=k.createElement(X.UploadFile,null):i==="edit"?n=k.createElement(X.Edit,null):i==="user"?n=k.createElement(X.Person,null):i==="group"?n=k.createElement(X.Group,null):i==="delete"?n=k.createElement(X.Delete,null):i==="refresh"?n=k.createElement(X.Refresh,null):i==="add"?n=k.createElement(X.Add,null):i==="unpair"?n=k.createElement(X.LinkOff,null):i==="pair"?n=k.createElement(X.Link,null):i==="save"?n=k.createElement(X.Save,null):i==="open"?n=k.createElement(X.OpenInNew,null):i&&((i.endsWith(".png")||i.endsWith(".svg")||i.endsWith(".jpg"))&&!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`./adapter/${this.props.oContext.adapterName}/${i}`),n=k.createElement(j.Icon,{src:i,style:{width:22,height:22}})),n}onChangeAsync(i,n){return new Promise(u=>{const y=this.onChange(i,n,u);y instanceof Promise&&y.catch(o=>console.error(`Cannot set value: ${o}`))})}onChange(i,n,u){const y=JSON.parse(JSON.stringify(this.props.data));if(G.setValue(y,i,n),this.props.schema.confirm&&this.execute(this.props.schema.confirm.condition,!1,y,this.props.arrayIndex,this.props.globalData))return new Promise(h=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:i,confirmData:null},()=>{typeof u=="function"?u():h()})});if(this.props.schema.confirmDependsOn)for(let h=0;h{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:i,confirmDepNewValue:s,confirmDepAttr:d.attr,confirmData:d.confirm},()=>{typeof u=="function"?u():p()})})}}const o=[];if(this.props.schema.onChangeDependsOn)for(let h=0;hu&&u()),o!=null&&o.length&&o.forEach((h,d)=>setTimeout(()=>this.props.onChange(h,G.getValue(y,h)),d*50))):this.props.onChange(y,void 0,()=>{o.length&&this.props.oContext.forceUpdate(o,y),u&&u()}),Promise.resolve()}execute(i,n,u,y,o){let h;if(_n(i))h=i.func;else if(typeof i=="string")h=i;else return i;if(!h)return n;try{return new Function("data","originalData","_system","_alive","_common","_socket","_instance","arrayIndex","globalData","_changed",h.includes("return")?h:`return ${h}`)(u||this.props.data,this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,y,o,this.props.changed)}catch(d){return console.error(`Cannot execute ${JSON.stringify(i)}: ${d}`),n}}executeCustom(i,n,u,y,o,h){let d;if(_n(i))d=i.func;else if(typeof i=="string")d=i;else return i;if(!d)return null;try{return new Function("data","originalData","_system","instanceObj","customObj","_socket","arrayIndex","globalData","_changed",d.includes("return")?d:`return ${d}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,y,u,this.props.oContext.socket,o,h,this.props.changed)}catch(s){return console.error(`Cannot execute ${d}: ${s}`),null}}calculate(i){let n,u,y,o;return this.props.custom?(n=i.validator?!this.executeCustom(i.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i.disabled===!0?u=!0:u=i.disabled?this.executeCustom(i.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i.hidden===!0?y=!0:y=i.hidden?this.executeCustom(i.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,o=i.defaultFunc?this.executeCustom(i.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):i.default):(n=i.validator?!this.execute(i.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i.disabled===!0?u=!0:u=i.disabled?this.execute(i.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i.hidden===!0?y=!0:y=i.hidden?this.execute(i.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,o=i.defaultFunc?this.execute(i.defaultFunc,i.default,this.props.data,this.props.arrayIndex,this.props.globalData):i.default),{error:n,disabled:u,hidden:y,defaultValue:o}}onError(i,n){n?this.isError[i]=n:delete this.isError[i],this.props.onError&&this.props.onError(i,n)}renderItem(i,n,u){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(i,n,u){return n?k.createElement("a",{href:n,target:"_blank",rel:"noreferrer",style:{color:this.props.oContext.themeType==="dark"?"#a147ff":"#5b238f",textDecoration:"underline"}},this.getText(i,u)):(i=this.getText(i,u)||"",i&&(i.includes("")||i.includes(""))?j.Utils.renderTextWithA(i):i)}static escapeString(i,n){return typeof i!="string"?"":(i=i.replace(/`/g,"\\`"),i=i.replace(/\${([^}]+)}/g,(u,y)=>{if(y&&typeof y=="string"&&y.startsWith("data.")){const o=G.getValue(n,y.replace(/^data\./,""));if(typeof o=="string"&&o.includes('"'))return`\${${y}.replace(/"/g, '\\\\"')}`}return u}),i)}getPattern(i,n,u){if(n=n||this.props.data,!i)return"";let y;typeof i=="object"?i.func?y=i.func:(console.log(`Object must be stringified: ${JSON.stringify(i)}`),y=JSON.stringify(i)):y=i;try{if(this.props.custom)return new Function("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed",`return \`${G.escapeString(y,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);const h=new Function("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed",`return \`${G.escapeString(y,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);return u?h:j.I18n.t(h)}catch(o){return console.error(`Cannot execute ${y}: ${o}`),y}}render(){const i=this.props.schema;if(!i||this.props.expertMode===!1&&i.expertMode)return null;this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(()=>{this.sendToTimeout=null,this.sendTo()},200));const{error:n,disabled:u,hidden:y,defaultValue:o}=this.calculate(i);if(y){if(Object.keys(this.isError).length&&(setTimeout(s=>Object.keys(s).forEach(p=>this.props.onError(p)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),i.hideOnlyControl){const s=k.createElement(O.Grid2,{size:{xs:i.xs||$s,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},style:{marginBottom:0,textAlign:"left",...i.style,...this.props.oContext.themeType==="dark"?i.darkStyle:{}}});return i.newLine?k.createElement(k.Fragment,null,k.createElement("div",{style:{flexBasis:"100%",height:0}}),s):s}return null}i.validatorNoSaveOnError&&(n&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:i.validatorErrorText?j.I18n.t(i.validatorErrorText):!0},setTimeout(s=>Object.keys(s).forEach(p=>this.props.onError(p,s[p])),100,JSON.parse(JSON.stringify(this.isError)))):!n&&Object.keys(this.isError).length&&(setTimeout(s=>Object.keys(s).forEach(p=>this.props.onError(p)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));const h=this.renderItem(n,u||this.props.commandRunning||this.props.disabled,o);if(this.noPlaceRequired)return h;const d=k.createElement(O.Grid2,{title:this.getText(i.tooltip),size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},style:{marginBottom:0,textAlign:"left",width:i.type==="divider"||i.type==="header"?i.width||"100%":void 0,...i.style,...this.props.oContext.themeType==="dark"?i.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?k.createElement(O.Grid2,{container:!0,style:{width:"100%"}},k.createElement(O.Grid2,{flex:1},h),k.createElement(O.Grid2,null,k.createElement(O.Button,{disabled:u,variant:"outlined",onClick:()=>this.sendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):j.I18n.t("ra_Request data by instance")},this.getText(this.props.schema.button)))):h);return i.newLine?k.createElement(k.Fragment,null,k.createElement("div",{style:{flexBasis:"100%",height:0}}),this.renderDialogConfirm(),d):this.state.confirmDialog?k.createElement(k.Fragment,null,this.renderDialogConfirm(),d):d}}const Ge={fullWidth:{width:"100%"},accordionSummary:L=>({backgroundColor:L.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)"}),accordionTitle:{},toolbar:L=>({backgroundColor:L.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)",borderRadius:"3px"}),tooltip:{pointerEvents:"none"}};class Ts extends G{typingTimer=null;constructor(i){super(i),this.props.schema.items=this.props.schema.items||[]}componentDidMount(){super.componentDidMount();let i=G.getValue(this.props.data,this.props.attr)||[];Array.isArray(i)||(i=[]),this.setState({value:i,activeIndex:-1,iteration:0})}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),super.componentWillUnmount()}itemAccordion(i,n){const{value:u}=this.state,{schema:y}=this.props,o={type:"panel",items:y.items.reduce((h,d)=>(h[d.attr]=d,h),{}),style:{marginLeft:"-8px",marginTop:"10px",marginBottom:"10px"}};return k.createElement($t,{oContext:this.props.oContext,index:n+this.state.iteration,arrayIndex:n,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:i,custom:!0,schema:o,originalData:this.props.originalData,onChange:(h,d)=>{const s=JSON.parse(JSON.stringify(u));s[n][h]=d,this.setState({value:s},()=>this.onChangeWrapper(s))},onError:(h,d)=>this.onError(h,d),table:this.props.table})}onDelete=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value));n.splice(i,1),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))};onClone=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value)),u=JSON.parse(JSON.stringify(n[i]));if(typeof this.props.schema.clone=="string"&&typeof u[this.props.schema.clone]=="string"){let y=1,o=u[this.props.schema.clone];const h=o.match(/(\d+)$/);for(h?(o=o.replace(h[0],""),y=parseInt(h[0],10)+1):o+="_";n.find(d=>d[this.props.schema.clone]===o+y.toString());)y++;u[this.props.schema.clone]=`${u[this.props.schema.clone]}_${y}`}n.splice(i,0,u),this.setState({value:n,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))};onChangeWrapper=i=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(n=>{this.typingTimer=null;const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(y=>this.onError(y))},300,i)};onAdd=()=>{const{schema:i}=this.props,n=JSON.parse(JSON.stringify(this.state.value)),u=i.items&&i.items.reduce((y,o)=>{let h;return o.defaultFunc?this.props.custom?h=o.defaultFunc?this.executeCustom(o.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,n.length,this.props.data):this.props.schema.default:h=o.defaultFunc?this.execute(o.defaultFunc,this.props.schema.default,this.props.data,n.length,this.props.data):this.props.schema.default:h=o.default===void 0?null:o.default,y[o.attr]=h,y},{});n.push(u),this.setState({value:n,activeIndex:n.length-1},()=>this.onChangeWrapper(n))};onMoveUp(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i-1,0,u);const y=this.state.activeIndex-1;this.setState({value:n,activeIndex:y,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))}onMoveDown(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i+1,0,u);const y=this.state.activeIndex+1;this.setState({value:n,activeIndex:y,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))}renderItem(){const{schema:i}=this.props,{value:n}=this.state;return n?k.createElement(O.Paper,null,i.label||!i.noDelete?k.createElement(O.Toolbar,{variant:"dense"},i.label?k.createElement(O.Typography,{variant:"h6",id:"tableTitle",component:"div"},this.getText(i.label)):null,i.noDelete?null:k.createElement(O.IconButton,{size:"small",color:"primary",onClick:this.onAdd},k.createElement(X.Add,null))):null,n.map((u,y)=>k.createElement(O.Accordion,{key:`${u}_${y}`,expanded:this.state.activeIndex===y,onChange:(o,h)=>this.setState({activeIndex:h?y:-1})},k.createElement(O.AccordionSummary,{expandIcon:k.createElement(X.ExpandMore,null),sx:j.Utils.getStyle(this.props.oContext.theme,Ge.fullWidth,Ge.accordionSummary)},k.createElement(O.Typography,{style:Ge.accordionTitle},u[i.titleAttr])),k.createElement(O.AccordionDetails,{style:{...i.style,...this.props.oContext.themeType?i.darkStyle:void 0}},this.itemAccordion(n[y],y),k.createElement(O.Toolbar,{sx:Ge.toolbar},y?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:Ge.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:()=>this.onMoveUp(y)},k.createElement(X.ArrowUpward,null))):k.createElement("div",{style:Ge.buttonEmpty}),ythis.onMoveDown(y)},k.createElement(X.ArrowDownward,null))):k.createElement("div",{style:Ge.buttonEmpty}),i.noDelete?null:k.createElement(O.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:Ge.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onDelete(y)},k.createElement(X.Delete,null))),i.clone?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:Ge.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onClone(y)},k.createElement(X.ContentCopy,null))):null)))),!i.noDelete&&n.length>0?k.createElement(O.Toolbar,{variant:"dense",sx:Ge.rootTool},k.createElement(O.IconButton,{size:"small",color:"primary",onClick:this.onAdd},k.createElement(X.Add,null))):null,i.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}}const di={root:{width:"100%"},notAlive:{color:"#a30000"}};class _s extends G{componentDidMount(){super.componentDidMount();const i=this.getInstance();this.props.oContext.socket.getState(`${i}.alive`).then(n=>this.setState({alive:!!(n&&n.val),instance:i}))}getInstance(){let i=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return i.includes("${")&&(i=this.getPattern(i,null,!0)),i&&!i.startsWith("system.adapter.")&&(i=`system.adapter.${i}`),i}renderItem(){if(this.getInstance()!==this.state.instance&&setTimeout(()=>{const n=this.getInstance();n?this.props.oContext.socket.getState(`${n}.alive`).then(u=>this.setState({alive:!!(u&&u.val),instance:n})):this.setState({alive:null,instance:n})},200),this.state.alive!==!1&&this.state.alive!==!0)return null;const i=this.state.instance.replace(/^system.adapter./,"");return k.createElement("div",{style:{...di.root,...this.state.alive?void 0:di.notAlive}},this.state.alive?this.props.schema.textAlive!==void 0?this.props.schema.textAlive?j.I18n.t(this.props.schema.textAlive,i):"":j.I18n.t("ra_Instance %s is alive",i):this.props.schema.textNotAlive!==void 0?this.props.schema.textNotAlive?j.I18n.t(this.props.schema.textNotAlive,i):"":j.I18n.t("ra_Instance %s is not alive",i))}}class ks extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr),n=this.props.schema.options.map(u=>typeof u=="string"?{label:u,value:u}:JSON.parse(JSON.stringify(u)));Array.isArray(i)?(n.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),this.setState({value:G.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}renderItem(i,n){if(!this.state.selectOptions)return null;let u;const y=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===G.DIFFERENT_VALUE?([...this.state.value].filter(h=>!y.find(d=>typeof d=="object"?d.value===h:d===h)).forEach(h=>y.push({label:h.toString(),value:h})),u={label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE},y.unshift(u)):(u=this.state.value!==null&&this.state.value!==void 0&&y.find(h=>typeof h=="object"?h.value==this.state.value:h==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!u&&this.props.schema.freeSolo&&(u={value:this.state.value,label:this.state.value},y.push(u))),k.createElement(O.Autocomplete,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:u,options:y,isOptionEqualToValue:(h,d)=>h.value===d.value,filterOptions:(h,d)=>{const s=h.filter(p=>d.inputValue===""?!0:p.label.toLowerCase().includes(d.inputValue.toLowerCase())||p.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&s.push({label:d.inputValue,value:d.inputValue}),s},onInputChange:h=>{if(!h||!this.props.schema.freeSolo)return;const d=h.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(h,d)=>{const s=typeof d=="object"?d?d.value:"":d;s!==this.state.value&&this.setState({value:s},()=>this.onChange(this.props.attr,s))},getOptionLabel:h=>typeof h=="object"?(h==null?void 0:h.label)??"":"",renderInput:h=>k.createElement(O.TextField,{variant:"standard",...h,error:!!i,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:n})})}}class Ms extends G{initialized=!1;localContext;askInstance(){const i=G.getValue(this.props.data,this.props.attr),n=this.props.schema.options?this.props.schema.options.map(u=>typeof u=="string"?{label:u,value:u}:JSON.parse(JSON.stringify(u))):[];if(this.props.alive){let u=this.props.schema.data;if(u===void 0&&this.props.schema.jsonData){const y=this.getPattern(this.props.schema.jsonData,null,!0);try{typeof y=="string"&&(u=JSON.parse(y))}catch{console.error(`Cannot parse json data: ${JSON.stringify(u)}`)}}u===void 0&&(u=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",u).then(y=>{y&&Array.isArray(y)&&y.forEach(o=>n.push(typeof o=="string"?{label:o,value:o}:JSON.parse(JSON.stringify(o)))),Array.isArray(i)?(n.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),this.setState({value:G.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})})}else Array.isArray(i)?(n.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),this.setState({value:G.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=G.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(i,n){if(this.props.alive){const h=this.getContext();(h!==this.localContext||!this.initialized)&&(this.localContext=h,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let u;const y=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===G.DIFFERENT_LABEL?([...this.state.value].filter(h=>!y.find(d=>d.value===h)).forEach(h=>y.push({label:h.toString(),value:h})),u={label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE},y.unshift(u)):(u=this.state.value!==null&&this.state.value!==void 0&&y.find(h=>h.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!u&&this.props.schema.freeSolo&&(u={value:this.state.value,label:this.state.value},y.push(u)),u=u||null),y.length?k.createElement(O.Autocomplete,{value:u,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:y,isOptionEqualToValue:(h,d)=>h.value===d.value,filterOptions:(h,d)=>{const s=h.filter(p=>d.inputValue===""?!0:p.label.toLowerCase().includes(d.inputValue.toLowerCase())||p.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&s.push({label:d.inputValue,value:d.inputValue}),s},getOptionLabel:h=>(h==null?void 0:h.label)??"",onInputChange:h=>{if(!h||!this.props.schema.freeSolo)return;const d=h.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(h,d)=>{const s=typeof d=="object"?d?d.value:"":d;s!==this.state.value&&this.setState({value:s},()=>this.onChange(this.props.attr,s))},renderInput:h=>k.createElement(O.TextField,{variant:"standard",...h,error:!!i,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:n})}):k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},onChange:h=>{const d=h.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").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)})}}const kn={fullWidth:{width:"100%"},flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class Ls extends G{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=G.getValue(i,n)||"";this.setState({value:u,showDialog:!1})}renderItem(i,n){const{schema:u,attr:y}=this.props,{value:o,showDialog:h}=this.state;return k.createElement(O.FormControl,{style:kn.fullWidth,variant:"standard"},u.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(u.label)):null,k.createElement("div",{style:kn.flex},k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:o??"",error:!!i,disabled:n,placeholder:this.getText(u.placeholder),label:this.getText(u.label),helperText:this.renderHelp(u.help,u.helpLink,u.noTranslation),onChange:d=>{const s=d.target.value;this.setState({value:s},()=>this.onChange(y,s))}}),k.createElement(O.Button,{color:"grey",disabled:n,style:kn.button,size:"small",variant:"outlined",onClick:()=>this.setState({showDialog:!0})},"...")),h?k.createElement(j.DialogCron,{title:j.I18n.t("ra_Define schedule"),simple:u.simple,complex:u.complex,cron:o,onClose:()=>this.setState({showDialog:!1}),cancel:j.I18n.t("ra_Cancel"),ok:j.I18n.t("ra_Ok"),theme:this.props.oContext.theme,onOk:d=>this.setState({showDialog:!1,value:d},()=>this.onChange(y,d))}):null)}}class Is extends G{async componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr),u=(await this.props.oContext.socket.getCertificates()).filter(y=>{const o=this.props.attr.toLowerCase();return o.includes(y.type)||y.type==="public"&&o.includes("cert")||y.type==="private"&&(o.includes("priv")||o.includes("key"))?!0:!!(y.type==="chained"&&(o.includes("chain")||o.includes("ca")))}).map(y=>({label:y.name,value:y.name}));u.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),this.setState({value:i,selectOptions:u})}renderItem(i,n){var y,o;if(!this.state.selectOptions)return null;const u=(y=this.state.selectOptions)==null?void 0:y.find(h=>h.value===this.state.value);return k.createElement(O.FormControl,{style:{width:"100%"},variant:"standard"},this.props.schema.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:this.state.value,renderValue:()=>this.getText(u==null?void 0:u.label,this.props.schema.noTranslation!==!1),onChange:h=>this.setState({value:h.target.value},()=>this.onChange(this.props.attr,this.state.value))},(o=this.state.selectOptions)==null?void 0:o.map(h=>k.createElement(O.MenuItem,{key:h.value,value:h.value,style:h.value===G.NONE_VALUE?{opacity:.5}:{}},this.getText(h.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const zt={fullWidth:{width:"100%"},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}};class Fs extends G{async componentDidMount(){var d;super.componentDidMount();const i=await this.props.oContext.socket.getCertificates(),n=[],u=[],y=[];let o=[];const h=await this.props.oContext.socket.getObject("system.certificates");(d=h==null?void 0:h.native)!=null&&d.collections?o=Object.keys(h.native.collections):o=null,i.forEach(s=>{s.type==="public"?n.push({label:s.name,value:s.name}):s.type==="private"?u.push({label:s.name,value:s.name}):s.type==="chained"?y.push({label:s.name,value:s.name}):(n.push({label:s.name,value:s.name}),u.push({label:s.name,value:s.name}),y.push({label:s.name,value:s.name}))}),n.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),u.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),y.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:y,certsPrivateOptions:u,collectionsOptions:o})}renderItem(i,n){var e,t,r,l,a,c,f;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;const u=(G.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString(),y=G.getValue(this.props.data,this.props.schema.certPublicName||"certPublic"),o=G.getValue(this.props.data,this.props.schema.certPrivateName||"certPrivate"),h=G.getValue(this.props.data,this.props.schema.certChainedName||"certChained"),d=(e=this.state.certsPublicOptions)==null?void 0:e.find(v=>v.value===y),s=(t=this.state.certsPrivateOptions)==null?void 0:t.find(v=>v.value===o),p=(r=this.state.certsChainOptions)==null?void 0:r.find(v=>v.value===h);return k.createElement("div",{style:zt.fullWidth},this.state.collectionsOptions?k.createElement(O.FormControl,{style:zt.leWidth,variant:"standard"},k.createElement(O.InputLabel,{shrink:!0},"Let's encrypt"),k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:u,onChange:v=>this.onChange(this.props.schema.leCollectionName||"leCollection",v.target.value==="false"?!1:v.target.value==="true"?!0:v.target.value)},k.createElement(O.MenuItem,{key:"_false",value:"false",style:{fontWeight:"bold"}},j.I18n.t("ra_Do not use let's encrypt")),k.createElement(O.MenuItem,{key:"_true",value:"true",style:{fontWeight:"bold"}},j.I18n.t("ra_Use all available let's encrypt certificates")),(l=this.state.collectionsOptions)==null?void 0:l.map(v=>k.createElement(O.MenuItem,{key:v,value:v},v)))):null,this.state.collectionsOptions?k.createElement("br",null):null,this.state.collectionsOptions&&u!=="false"?k.createElement("div",null,j.I18n.t("ra_Fallback custom certificates")):null,k.createElement(O.FormControl,{style:zt.certWidth,variant:"standard"},k.createElement(O.InputLabel,{shrink:!0},j.I18n.t("ra_Public certificate")),k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:y||"",renderValue:()=>this.getText(d==null?void 0:d.label),onChange:v=>this.onChange(this.props.schema.certPublicName||"certPublic",v.target.value)},(a=this.state.certsPublicOptions)==null?void 0:a.map((v,b)=>k.createElement(O.MenuItem,{key:`${v.value}_${b}`,value:v.value,style:v.value===G.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label))))),k.createElement(O.FormControl,{style:zt.certWidth,variant:"standard"},k.createElement(O.InputLabel,{shrink:!0},j.I18n.t("ra_Private certificate")),k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:o||"",renderValue:()=>this.getText(s==null?void 0:s.label),onChange:v=>this.onChange(this.props.schema.certPrivateName||"certPrivate",v.target.value)},(c=this.state.certsPrivateOptions)==null?void 0:c.map((v,b)=>k.createElement(O.MenuItem,{key:`${v.value}_${b}`,value:v.value,style:v.value===G.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label))))),k.createElement(O.FormControl,{style:zt.certWidth,variant:"standard"},k.createElement(O.InputLabel,{shrink:!0},j.I18n.t("ra_Chained certificate")),k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:h||"",renderValue:()=>this.getText(p==null?void 0:p.label),onChange:v=>this.onChange(this.props.schema.certChainedName||"certChained",v.target.value)},(f=this.state.certsChainOptions)==null?void 0:f.map((v,b)=>k.createElement(O.MenuItem,{key:`${v.value}_${b}`,value:v.value,style:v.value===G.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label))))))}}class Rs extends G{async componentDidMount(){var u;super.componentDidMount();let i;const n=await this.props.oContext.socket.getObject("system.certificates");(u=n==null?void 0:n.native)!=null&&u.collections?i=Object.keys(n.native.collections):i=[],this.setState({collectionsOptions:i})}renderItem(i,n){var y;if(!this.state.collectionsOptions)return null;const u=(G.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString();return k.createElement(O.FormControl,{style:{width:"100%"},variant:"standard"},this.props.schema.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:u,onChange:o=>this.onChange(this.props.schema.leCollectionName||"leCollection",o.target.value==="false"?!1:o.target.value==="true"?!0:o.target.value)},k.createElement(O.MenuItem,{key:"_false",value:"false",style:{fontWeight:"bold"}},j.I18n.t("ra_Do not use let's encrypt")),k.createElement(O.MenuItem,{key:"_true",value:"true",style:{fontWeight:"bold"}},j.I18n.t("ra_Use all available let's encrypt certificates")),(y=this.state.collectionsOptions)==null?void 0:y.map(o=>k.createElement(O.MenuItem,{key:o,value:o},o))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const We={fullWidth:{width:"100%"},licLabel:{fontWeight:"bold",minWidth:100,marginRight:10,textTransform:"capitalize",display:"inline-block"},errorTitle:L=>({color:L.palette.mode==="dark"?"#e39191":"#b62020"}),okTitle:L=>({color:L.palette.mode==="dark"?"#6fd56f":"#007c00"}),errorText:L=>({color:L.palette.mode==="dark"?"#e39191":"#b62020",mb:"30px"})};class ct extends G{componentDidMount(){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 i=this.state._error;return this.state.allLicenses&&(i=[k.createElement("div",{key:"error"},i)],i.push(k.createElement(O.Button,{key:"button",variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},j.I18n.t("iobroker.net"))),this.state.allLicenses.length?i.push(k.createElement(O.TableContainer,{key:"table"},k.createElement(O.Table,{size:"small"},k.createElement(O.TableHead,null,k.createElement(O.TableRow,null,k.createElement(O.TableCell,null,j.I18n.t("ra_Product")),k.createElement(O.TableCell,null,j.I18n.t("ra_Version")),k.createElement(O.TableCell,null,"UUID"),k.createElement(O.TableCell,null,j.I18n.t("ra_ValidTill")),k.createElement(O.TableCell,null,j.I18n.t("ra_Commercial")),k.createElement(O.TableCell,null,"ID"))),k.createElement(O.TableBody,null,this.state.allLicenses.map(n=>k.createElement(O.TableRow,{key:n.id},k.createElement(O.TableCell,{sx:n.validName?null:We.errorText},n.license.product),k.createElement(O.TableCell,{sx:n.validVersion?null:We.errorText},n.license.version),k.createElement(O.TableCell,{sx:n.validUuid?null:We.errorText},n.license.uuid||"--"),k.createElement(O.TableCell,{sx:n.validTill?null:We.errorText},n.license.validTill&&n.license.validTill!=="0000-00-00 00:00:00"?new Date(n.license.validTill).toLocaleDateString():"--"),k.createElement(O.TableCell,null,n.license.invoice!=="free"?n.license.invoice==="MANUALLY_CREATED"?"✓":n.license.invoice:"-"),k.createElement(O.TableCell,null,n.id))))))):(i.push(k.createElement("div",{key:"text1"},j.I18n.t("ra_No one license found in license manager"))),i.push(k.createElement("div",{key:"text2"},j.I18n.t("ra_Please create license"))))),k.createElement(O.Dialog,{open:!0,maxWidth:"xl",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClick:()=>this.setState({_error:"",allLicenses:null})},k.createElement(O.DialogTitle,null,j.I18n.t("ra_Error")),k.createElement(O.DialogContent,null,k.createElement(O.DialogContentText,null,i)),k.createElement(O.DialogActions,null,k.createElement(O.Button,{variant:"contained",onClick:()=>this.setState({_error:"",allLicenses:null}),color:"primary",autoFocus:!0,startIcon:k.createElement(X.Check,null)},j.I18n.t("ra_Ok"))))}return null}renderMessageDialog(){if(this.state.showLicenseData){const i=[],n=this.state.showLicenseData;return Object.keys(n).forEach(u=>{if(!(n[u]===null||n[u]===void 0))if(typeof n[u]=="object"){const y=n[u];Object.keys(y).forEach(o=>{y[o]!==null&&y[o]!==void 0&&(typeof y[o]=="object"?i.push(k.createElement("div",{key:o},k.createElement("div",{style:We.licLabel},o,":"),JSON.stringify(y[o],null,2))):i.push(k.createElement("div",{key:o},k.createElement("div",{style:We.licLabel},u," -",o,":"),y[o].toString())))})}else i.push(k.createElement("div",{key:u},k.createElement("div",{style:We.licLabel},u.replace(/_/g," "),":"),n[u].toString()))}),i.push(k.createElement("div",{key:"checked"},k.createElement("div",{style:We.licLabel},j.I18n.t("ra_Checked"),":"),this.state.licenseOfflineCheck?j.I18n.t("ra_locally"):j.I18n.t("ra_via internet"))),k.createElement(O.Dialog,{open:!0,onClose:()=>this.setState({showLicenseData:null})},k.createElement(O.DialogTitle,null,k.createElement(O.Box,{component:"span",sx:this.state.result?We.okTitle:We.errorTitle},j.I18n.t("ra_License %s",this.state.result?"OK":"INVALID"))),k.createElement(O.DialogContent,null,this.state.showLinkToProfile?k.createElement(O.Button,{variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},"https://iobroker.net"):null,this.state._error?k.createElement(O.Box,{component:"div",sx:We.errorText},this.state._error):null,i),k.createElement(O.DialogActions,null,k.createElement(O.Button,{onClick:()=>this.setState({showLicenseData:null,_error:""}),color:"primary",variant:"contained"},j.I18n.t("ra_Close"))))}return null}static parseJwt(i){const u=i.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),y=decodeURIComponent(atob(u).split("").map(o=>`%${`00${o.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));try{return JSON.parse(y)}catch{return null}}static isVersionValid(i,n,u,y){if(!n||!i)return!0;let o=!0;const[h]=i.split(".");return n.startsWith(">=")?o=parseInt(h,10)>=parseInt(n.substring(2,10)):n.startsWith("<=")?o=parseInt(h,10)<=parseInt(n.substring(2,10)):n.startsWith(">")?o=parseInt(h,10)>parseInt(n.substring(1,10)):n.startsWith("<")?o=parseInt(h,10){const l=!r.validTill||r.validTill==="0000-00-00 00:00:00"||new Date(r.validTill).getTime()>p,a=(r.product||"").split("."),c=a[1]===i||i==="vis-2"&&a[1]==="vis",f=!e||!r.uuid||r.uuid===e,v=ct.isVersionValid(t,r.version,r.invoice,i);(!s||r.invoice!=="free")&&l&&c&&f&&v&&(s=r),u.push({id:r.id,validName:c,validUuid:f,validVersion:v,validTill:l,license:r})}),s&&(u.find(r=>r.id===s.id).used=!0)}return u}async checkLicense(i,n){var d,s,p;let u;if(this.props.schema.uuid){const e=await this.props.oContext.socket.getObject("system.meta.uuid");u=(d=e==null?void 0:e.native)==null?void 0:d.uuid}let y;if(this.props.schema.version){const e=await this.props.oContext.socket.getObject(`system.adapter.${n}`);y=(s=e==null?void 0:e.common)==null?void 0:s.version}const o=new AbortController;let h=setTimeout(()=>{h=null,o.abort()},5e3);try{const e=await window.fetch("https://iobroker.net/api/v1/public/cert/",{method:"POST",body:JSON.stringify({json:i,uuid:u}),headers:{"Content-Type":"text/plain"},signal:o.signal});h&&clearTimeout(h);const t=await e.text();let r;try{r=JSON.parse(t)}catch{}if(r!=null&&r.error)try{const l=ct.parseJwt(i),a=j.I18n.t(`ra_${l.error||r.error||"Unknown error"}`).replace(/^ra_/,"");return this.setState({_error:a,licenseOfflineCheck:!1,showLicenseData:l,result:!1,running:!1})}catch{return console.log("Cannot parse license"),this.setState({_error:r.error,result:!1,running:!1})}else{let l=null;try{l=ct.parseJwt(i)}catch{}if(r){const a=r.validTill||r.valid_till;if(a&&a!=="0000-00-00 00:00:00"&&new Date(a).getTime(){if(i){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(null,null)}catch(n){window.alert(j.I18n.t("ra_Cannot read licenses: %s",n));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(i){const n=this.props.oContext.adapterName==="vis-2"?"vis":this.props.oContext.adapterName;this.setState({running:!0});let u,y;if(this.props.data.useLicenseManager){if(y=await this.findInLicenseManager(n),u=y.find(o=>o.used),u&&(u=u.license.json),!u&&!i){this.setState({askForUpdate:!0});return}}else u=this.props.data.license;u?await this.checkLicense(u,n):this.props.data.useLicenseManager?this.setState({_error:j.I18n.t("ra_Suitable license not found in license manager"),result:!1,running:!1,allLicenses:y}):this.setState({_error:j.I18n.t("ra_Please enter the license"),result:!1,running:!1})}renderItem(){return k.createElement("div",{style:We.fullWidth},k.createElement(O.Button,{variant:this.props.schema.variant||"outlined",color:this.props.schema.color||"primary",style:We.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:k.createElement(X.Send,null),onClick:()=>this._onClick()},this.state.running?k.createElement(O.CircularProgress,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||"ra_Check license",this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}}class Os extends G{renderItem(i,n){const u=G.getValue(this.props.data,this.props.attr),y=Array.isArray(u);return k.createElement(O.FormControl,{style:{width:"100%"},variant:"standard"},k.createElement(O.FormControlLabel,{onClick:o=>{if(o.preventDefault(),o.stopPropagation(),!n){const h=this.onChange(this.props.attr,!u);h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))}},control:k.createElement(O.Checkbox,{indeterminate:y,checked:!!u,onChange:o=>{let h;y?h=this.onChange(this.props.attr,!0):h=this.onChange(this.props.attr,o.target.checked),h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))},disabled:n||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),k.createElement(O.FormHelperText,{style:{color:"red"}},i?this.props.schema.validatorErrorText?j.I18n.t(this.props.schema.validatorErrorText):j.I18n.t("ra_Error"):null),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ns={standard:O.Input,filled:rs,outlined:O.OutlinedInput},Bs=L=>{const i=L.palette.mode==="light",n=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{},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 ${L.palette.primary[i?"dark":"light"]}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:L.transitions.create("transform",{duration:L.transitions.duration.shorter,easing:L.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:L.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:L.transitions.create("border-bottom-color",{duration:L.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${L.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{"&:after":{backgroundColor:L.palette.error.main,transform:"scaleX(1)"}},chip:{margin:"0 8px 8px 0",float:"left"},marginDense:{}}},rn={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},Ps=({value:L,isFocused:i,isDisabled:n,isReadOnly:u,handleClick:y,handleDelete:o,style:h},d)=>k.createElement(O.Chip,{key:d,style:{...h,pointerEvents:n||u?"none":void 0,backgroundColor:i?ss[300]:void 0},onClick:y,onDelete:o,label:L});class Ws extends k.Component{labelRef;labelNode=null;input;newChipKeyCodes;newChipKeys;actualInput=null;inputBlurTimeout=null;_keyPressed;_preventChipCreation;styles={};styleTheme=null;constructor(i){super(i),this.state={chips:i.defaultValue||[],focusedChip:null,inputValue:"",isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||"standard"},this.newChipKeyCodes=i.newChipKeyCodes||[13],this.newChipKeys=i.newChipKeys||["Enter"],this.labelRef=k.createRef(),this.input=k.createRef()}componentDidMount(){this.state.variant==="outlined"&&(this.labelNode=is.findDOMNode(this.labelRef.current),this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(i,n){let u=null;return i.value&&i.value.length!==n.prevPropsValue.length&&(u={prevPropsValue:i.value},i.clearInputValueOnChange&&(u.inputValue="")),i.clearInputValueOnChange&&i.value&&i.value.length!==n.prevPropsValue.length&&(u={prevPropsValue:i.value,inputValue:""}),i.disabled&&(u={...u,focusedChip:null}),!n.chipsUpdated&&i.defaultValue&&(u={...u,chips:i.defaultValue}),u}focus=()=>{var i;(i=this.actualInput)==null||i.focus(),this.state.focusedChip&&this.setState({focusedChip:null})};handleInputBlur=i=>{this.props.onBlur&&this.props.onBlur(i),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});const n=i.target.value;let u;switch(this.props.blurBehavior||"clear"){case"add-or-clear":u={clearInputOnFail:!0};case"add":if(this.props.delayBeforeAdd){const y=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{const o=(this.props.value||this.state.chips).length;y===o?this.handleAddChip(n,u):this.clearInput()},150)}else this.handleAddChip(n,u);break;case"clear":this.clearInput();break}};handleInputFocus=i=>{this.setState({isFocused:!0}),this.props.onFocus&&this.props.onFocus(i)};handleKeyDown=i=>{const{focusedChip:n}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(i),i.isDefaultPrevented()))return;const u=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(i.keyCode)||this.newChipKeys.includes(i.key)){this.handleAddChip(i.target.value)!==!1&&i.preventDefault();return}switch(i.keyCode){case rn.BACKSPACE:i.target.value===""&&(n?(this.handleDeleteChip(u[n],n),n&&this.setState({focusedChip:n-1})):this.setState({focusedChip:u.length-1}));break;case rn.DELETE:i.target.value===""&&n&&(this.handleDeleteChip(u[n],n),n<=u.length-1&&this.setState({focusedChip:n}));break;case rn.LEFT_ARROW:n===null&&i.target.value===""&&u.length?this.setState({focusedChip:u.length-1}):n!==null&&n>0&&this.setState({focusedChip:n-1});break;case rn.RIGHT_ARROW:n!==null&&n{!this._preventChipCreation&&(this.newChipKeyCodes.includes(i.keyCode)||this.newChipKeys.includes(i.key))&&this._keyPressed?this.clearInput():this.updateInput(i.target.value),this.props.onKeyUp&&this.props.onKeyUp(i)};handleUpdateInput=i=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(i.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(i)};handleAddChip(i,n){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(i))return this._preventChipCreation=!0,n&&n.clearInputOnFail&&this.clearInput(),!1;this.clearInput();const u=this.props.value||this.state.chips;return i.trim().length?((this.props.allowDuplicates||!u.includes(i))&&(this.props.value&&this.props.onAdd?this.props.onAdd(i):this.updateChips([...this.state.chips,i])),!0):!1}handleDeleteChip(i,n){if(this.props.value)this.props.onDelete&&this.props.onDelete(i,n);else{const u=this.state.chips.slice();if(u.splice(n,1)){let o=this.state.focusedChip;this.state.focusedChip===n?o=null:this.state.focusedChip>n&&(o=this.state.focusedChip-1),this.updateChips(u,{focusedChip:o})}}}updateChips(i,n={}){this.setState({chips:i,chipsUpdated:!0,...n}),this.props.onChange&&this.props.onChange(i)}clearInput(){this.updateInput("")}updateInput(i){this.setState({inputValue:i})}setActualInputRef=i=>{this.actualInput=i,this.props.inputRef&&this.props.inputRef(i)};render(){const{alwaysShowPlaceholder:i,chipRenderer:n=Ps,className:u,disabled:y,disableUnderline:o,error:h,FormHelperTextProps:d,fullWidth:s,fullWidthInput:p,helperText:e,id:t,InputProps:r={},InputLabelProps:l={},inputValue:a,label:c,placeholder:f,readOnly:v,required:b,rootRef:A,value:D,margin:E}=this.props,g=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=j.Utils.getStyle(this.props.theme,Bs));let S=D||this.state.chips||[];Array.isArray(S)||(S=(S||"").toString().split(/[,\s]+/).map(C=>C.trim()));const $=a??this.state.inputValue,_=(this.props.value||$).length||$.length,T=typeof l.shrink=="boolean"?l.shrink:c!==null&&(_||this.state.isFocused||S.length),I=S.map((C,x)=>n({value:C,isDisabled:!!y,isReadOnly:v,isFocused:this.state.focusedChip===x,handleClick:()=>this.setState({focusedChip:x}),handleDelete:()=>this.handleDeleteChip(C,x),style:this.styles.chip},x.toString())),w={};g==="outlined"&&(w.notched=!!T,w.labelWidth=T&&this.labelNode&&this.labelNode.offsetWidth||0),g!=="standard"?w.startAdornment=I:r.disableUnderline=!0;const m=Ns[g];return k.createElement(O.FormControl,{ref:A,fullWidth:s,className:u,sx:{...this.styles.root,...E==="dense"?this.styles.marginDense:{}},error:h,required:S.length>0?void 0:b,onClick:this.focus,disabled:y,variant:g,component:"div",margin:E},c&&k.createElement(O.InputLabel,{htmlFor:t,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!T,focused:this.state.isFocused,variant:g,ref:this.labelRef,required:b,component:"label",...l},c),k.createElement(O.Box,{component:"div",id:"input-chip-container",sx:{...this.styles[g],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!o&&g==="standard"?this.styles.underline:void 0,...y?this.styles.disabled:void 0,...c?this.styles.labeled:void 0,...h?this.styles.error:void 0}},g==="standard"&&I,k.createElement(m,{ref:this.input,className:`mui-variant-${this.styles[g]} ${c?"mui-chip-with-label":"mui-chip-no-label"}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[g]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:t,value:$,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:y,fullWidth:p,placeholder:!_&&(T||c===null||c===void 0)||i?f:null,readOnly:v,...r,...w})),e&&k.createElement(O.FormHelperText,{...d,className:d==null?void 0:d.className,style:this.styles.helperText},e))}}class fi extends G{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=G.getValue(i,n);if(this.props.schema.delimiter&&typeof u=="string"){const y=u.split(this.props.schema.delimiter).map(o=>o.trim()).filter(o=>o);this.setState({value:y})}else this.setState({value:u||[]})}renderItem(i,n){const{attr:u,schema:y}=this.props,{value:o}=this.state;return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},k.createElement(Ws,{value:o,disabled:!!n,label:this.getText(y.label),error:!!i,onAdd:h=>{const d=JSON.parse(JSON.stringify(o));d.push(h),this.setState({value:d},()=>{let s;this.props.schema.delimiter?s=this.onChange(u,d.join(`${this.props.schema.delimiter} `)):s=this.onChange(u,d),s instanceof Promise&&s.catch(p=>console.error(p))})},theme:this.props.oContext.theme,onDelete:(h,d)=>{const s=JSON.parse(JSON.stringify(o));s.splice(d,1),this.setState({value:s},()=>{let p;this.props.schema.delimiter?p=this.onChange(u,s.join(`${this.props.schema.delimiter} `)):p=this.onChange(u,s),p instanceof Promise&&p.catch(e=>console.error(e))})}}),k.createElement(O.FormHelperText,null,j.I18n.t("ra_Press ENTER Key to add new item")),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Hs extends G{renderColorDialog(){return!!this.state.showColorDialog&&k.createElement(O.Dialog,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},k.createElement(es,{color:this.state.colorDialogValue,onChange:i=>this.setState({colorDialogValue:i.hex},()=>this.onChange(this.props.attr,this.state.colorDialogValue))}))}renderItem(i,n){const u=G.getValue(this.props.data,this.props.attr);let y=j.Utils.isUseBright(u,null);return y===null&&(y=void 0),k.createElement(k.Fragment,null,this.renderColorDialog(),k.createElement(O.TextField,{variant:"standard",disabled:!!n,style:{minWidth:100,width:"calc(100% - 8px)"},label:this.getText(this.props.schema.label),value:u||"",onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:u||""}),onChange:o=>{const h=o.target.value,d=this.onChange(this.props.attr,h);d instanceof Promise&&d.catch(s=>console.error(`Cannot set value: ${s}`))},slotProps:{htmlInput:{style:{backgroundColor:u,color:y?"#FFF":"#000"},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&u&&!this.props.schema.noClearButton?k.createElement(O.IconButton,{tabIndex:-1,size:"small",onClick:o=>{o.stopPropagation();const h=this.onChange(this.props.attr,"");h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))}},k.createElement(X.Close,null)):void 0},inputLabel:{shrink:!0}}}))}}const Mn={width:{width:"calc(100% - 85px)"},width50:{width:120,marginRight:5}};class zs extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i});const n={};this.props.schema.useSystemName&&(n.useSystem=!!G.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(n.longitude=G.getValue(this.props.data,this.props.schema.longitudeName),n.latitude=G.getValue(this.props.data,this.props.schema.latitudeName),!n.longitude&&!n.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!G.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(n).length&&setTimeout(()=>this.setState(n),50)}async getSystemCoordinates(){const i=await this.props.oContext.socket.getCompactSystemConfig();if(i!=null&&i.common&&(i.common.longitude||i.common.latitude))if(window.alert(j.I18n.t("ra_Used system settings")),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:i.common.longitude,latitude:i.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,i.common.longitude),await this.onChange(this.props.schema.latitudeName,i.common.latitude)});else{const n=i.common.latitude+(this.props.schema.divider||",")+i.common.longitude;this.setState({value:n},()=>{const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(y=>console.error(`Cannot set value: ${y}`))})}else window.alert(j.I18n.t("ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser"))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async i=>{if(i!=null&&i.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:i.coords.longitude,latitude:i.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,i.coords.longitude||""),await this.onChange(this.props.schema.latitudeName,i.coords.latitude||"")});else{const n=i.coords.latitude+(this.props.schema.divider||",")+i.coords.longitude;this.setState({value:n},()=>{const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(y=>console.error(`Cannot set value: ${y}`))})}else await this.getSystemCoordinates()},async i=>{console.error(`Cannot determine coordinates from browser: ${i.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(i=>{console.error(`Cannot determine coordinates: ${i}`)})}renderItem(i,n){return k.createElement(k.Fragment,null,this.props.schema.useSystemName?k.createElement(O.FormControlLabel,{control:k.createElement(O.Checkbox,{checked:!!this.state.useSystem,onChange:u=>{const y=u.target.checked;y&&this.getSystemCoordinates().catch(o=>console.error(`Cannot determine coordinates: ${o}`)),this.setState({useSystem:y},()=>this.onChange(this.props.schema.useSystemName,y))}}),label:j.I18n.t("ra_Use system settings for position")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?k.createElement(O.TextField,{variant:"standard",style:Mn.width50,value:this.state.longitude??"",error:!!i,disabled:this.state.useSystem||!!n,onChange:u=>{const y=u.target.value;this.setState({longitude:y},()=>{const o=this.onChange(this.props.schema.longitudeName,(y||"").trim());o instanceof Promise&&o.catch(h=>console.error(`Cannot set value: ${h}`))})},label:j.I18n.t("ra_Longitude")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?k.createElement(O.TextField,{variant:"standard",style:Mn.width50,value:this.state.latitude??"",error:!!i,disabled:this.state.useSystem||!!n,onChange:u=>{const y=u.target.value;this.setState({latitude:y},()=>this.onChange(this.props.schema.latitudeName,(y||"").trim()))},label:j.I18n.t("ra_Latitude")}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?k.createElement(O.TextField,{variant:"standard",style:Mn.width,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:u=>{const y=u.target.value;this.setState({value:y},()=>this.onChange(this.props.attr,(y||"").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:k.createElement(O.Fab,{size:"small",onClick:()=>this.getCoordinates(),title:j.I18n.t("ra_Take browser position"),style:{marginRight:4}},k.createElement(X.LocationOn,null)),this.state.useSystem?null:k.createElement(O.Fab,{size:"small",onClick:()=>this.getSystemCoordinates(),title:j.I18n.t("ra_Take position from system settings")},k.createElement(X.GpsFixed,null)))}}Pn.init({name:"iobroker_admin",shared:{"@iobroker/adapter-react-v5":{lib:()=>ns,version:"*"},"@mui/icons-material":{lib:()=>ts,version:"*"},"@iobroker/json-config":{lib:()=>as,version:"*"}},remotes:[]});class Ut extends G{static runningLoads={};constructor(i){super(i),Object.assign(this.state,{Component:null,error:""})}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 i;this.props.schema.url.startsWith("http:")||this.props.schema.url.startsWith("https:")?i=this.props.schema.url:this.props.schema.url.startsWith("./")?i=`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,"")}`:i=`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;const[n,u,...y]=this.props.schema.name.split("/"),o=y.join("/");if(!i){console.error('Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema');return}if(!n||!u||!o){console.error('Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema');return}let h=Ut.runningLoads[`${i}!${u}`];if(!(h instanceof Promise)){let d;if(this.props.schema.i18n===!0){const s=i.lastIndexOf("/");let p;s!==-1?p=i.substring(0,s):p=i;const e=j.I18n.getLanguage(),t=`${p}/i18n/${e}.json`;d=fetch(t).then(r=>r.json()).then(r=>j.I18n.extendTranslations(r,e)).catch(r=>{if(e!=="en"){fetch(`${p}/i18n/en.json`).then(l=>l.json()).then(l=>j.I18n.extendTranslations(l,e)).catch(l=>console.log(`Cannot load i18n "${t}": ${l}`));return}console.log(`Cannot load i18n "${t}": ${r}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n=="object")try{j.I18n.extendTranslations(this.props.schema.i18n)}catch(s){console.error(`Cannot import i18n: ${s}`)}try{console.log(i,n,u,o),Pn.registerRemotes([{name:n,entry:i,type:this.props.schema.bundlerType||void 0}]),h=Pn.loadRemote(`${n}/${u}`),d instanceof Promise&&(h=Promise.all([h,d]).then(s=>s[0])),Ut.runningLoads[`${i}!${u}`]=h}catch(s){console.error(s),this.setState({error:`Cannot import from ${this.props.schema.url}: ${s}`})}}try{const d=(await h).default;if(d!=null&&d[o])this.setState({Component:d[o]});else{const s=Object.keys(d||{});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: ${s.join(", ")}`})}}catch(d){console.error(d),this.setState({error:`Cannot import from ${this.props.schema.url}: ${d}`})}}render(){const i=this.state.Component,n=this.props.schema||{};let u=i?k.createElement(i,{...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.error?k.createElement("div",null,this.state.error):k.createElement(O.LinearProgress,null);return n.newLine?k.createElement(k.Fragment,null,k.createElement("div",{style:{flexBasis:"100%",height:0}}),u):u}}class js extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i})}renderItem(i,n){return k.createElement(Hi.DatePicker,{sx:u=>({width:"100%",borderBottom:`1px solid ${u.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${u.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:!!n,value:this.state.value,onChange:u=>{this.setState({value:u},()=>this.onChange(this.props.attr,this.state.value))},label:this.getText(this.props.schema.label)})}}class Vs extends G{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){const n=this.props.oContext.DeviceManager;return k.createElement(n,{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})}return k.createElement("div",null,"DeviceManager not found")}}const Ke={fullWidth:{width:"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}},Us=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Gs=["mp3","ogg","wav","aac"],Ks=["avi","mp4","mov"],Js=["txt","log","html","htm"],Ys=["json","js","ts"];class mn extends G{dropzoneRef;imagePrefix;objectID;path;constructor(i){super(i),this.dropzoneRef=k.createRef(),this.imagePrefix=this.props.oContext.imagePrefix===void 0?"./files":this.props.oContext.imagePrefix}componentDidMount(){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(()=>{const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(n=>console.error(`Cannot subscribe: ${n}`))})}onFolderChanged=(i,n)=>{this.path&&n.startsWith(this.path)&&this.updateFiles().catch(u=>console.error(`Cannot update files: ${u}`))};componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(i=>console.error(`Cannot subscribe: ${i}`)),super.componentWillUnmount()}async updateFiles(){const i=await this.readFiles(this.props.schema.pattern);await new Promise(n=>this.setState({files:i},n))}async readFolder(i,n,u){try{const y=await this.props.oContext.socket.readDir(this.objectID,i.replace(/^\//,"")||null);for(let o=0;oconsole.log("file reading was aborted"),u.onerror=()=>console.log("file reading has failed"),u.onload=()=>{if(n.size>y){window.alert(j.I18n.t("File is too big. Max %sk allowed. Try use SVG.",Math.round(y/1024)));return}this.props.oContext.socket.writeFile64(this.objectID,this.path+n.name,u.result).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+n.name},()=>this.onChange(this.props.attr,this.path+n.name))).catch(o=>window.alert(`Cannot upload file: ${o}`))},u.readAsArrayBuffer(n)}renderDeleteDialog(){return this.state.deleteFile?k.createElement(j.DialogConfirm,{title:j.I18n.t("ra_Are you sure?"),text:j.I18n.t("ra_File will be deleted"),ok:j.I18n.t("ra_Delete"),cancel:j.I18n.t("ra_Cancel"),onClose:i=>{const n=this.state.deleteFile;this.setState({deleteFile:""},()=>{i&&this.props.oContext.socket.deleteFile(this.objectID,n).then(()=>this.updateFiles()).catch(u=>window.alert(`Cannot delete file: ${u}`))})}}):null}static base64ToArrayBuffer(i){const n=window.atob(i),u=n.length,y=new Uint8Array(u);for(let o=0;o{if(typeof AudioContext<"u"){const n=new AudioContext,u=mn.base64ToArrayBuffer(i.file);n.decodeAudioData(u,y=>{const o=n.createBufferSource();o.buffer=y,o.connect(n.destination),o.start(0)},y=>window.alert(`Cannot play: ${y.message}`))}})}getFileIcon(i){return i!=null&&i.extension?Us.includes(i.extension)?k.createElement("div",{style:{...Ke.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${i.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Gs.includes(i.extension)?k.createElement(X.MusicNote,null):Js.includes(i.extension)?k.createElement(X.Article,null):Ks.includes(i.extension)?k.createElement(X.Videocam,null):Ys.includes(i.extension)?k.createElement(X.Code,null):null:null}renderItem(i,n){if(!this.state.files)return null;const u=[];this.props.schema.withFolder||this.state.files.forEach(e=>{const t=e.name.lastIndexOf("/");if(t===-1)u.includes("/")||u.push("/");else{const r=e.name.substring(0,t+1);u.includes(r)||u.push(r)}});const y=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&u.length===1?`${e.name.substring(u[0].length)}`:`${e.name}${this.props.schema.noSize?"":`(${e.size})`}`,extension:e.name.toLowerCase().split(".").pop()}));this.props.schema.noNone||y.unshift({label:j.I18n.t("ra_none"),value:""});const o=y.find(e=>e.value===this.state.value);let h=0;this.props.schema.upload&&h++,this.props.schema.refresh&&h++;const d=this.state.value&&(this.state.value.endsWith(".mp3")||this.state.value.endsWith(".ogg")||this.state.value.endsWith(".wav"));d&&h++;const s=k.createElement("div",{style:Ke.fullWidth},k.createElement(O.FormControl,{variant:"standard",style:{width:`calc(100% - ${h*42}px)`}},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>k.createElement(k.Fragment,null,this.getFileIcon(o),k.createElement("span",null,(o==null?void 0:o.label)||"")),onChange:e=>{this.setState({value:e.target.value==="_"?"":e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},y.map(e=>k.createElement(O.MenuItem,{key:e.value,value:e.value},k.createElement(O.ListItemIcon,null,this.getFileIcon(e)),k.createElement(O.ListItemText,null,e.label),this.props.schema.delete&&o.value?k.createElement(O.IconButton,{style:Ke.deleteButton,size:"small",onClick:()=>this.setState({deleteFile:o.value})},k.createElement(X.Delete,null)):null))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&k.createElement(O.IconButton,{onClick:()=>this.updateFiles()},k.createElement(X.Refresh,null)),this.props.schema.upload&&k.createElement(O.IconButton,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},k.createElement(X.UploadFile,null)),d&&k.createElement(O.IconButton,{style:{color:"#00FF00"},onClick:()=>this.play()},k.createElement(X.PlayArrow,null)));if(!this.props.schema.upload)return k.createElement(k.Fragment,null,s,this.renderDeleteDialog());let p={"*/*":[]};if(this.props.schema.fileTypes==="image"?p={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:this.props.schema.fileTypes==="audio"?p={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:this.props.schema.fileTypes==="text"&&(p={"text/plain":[".txt"]}),this.props.schema.pattern){const e=this.props.schema.pattern.split("/").pop().toLowerCase().replace(/.*\./,"");e==="png"||e==="jpg"||e==="svg"||e==="gif"||e==="apng"||e==="avif"||e==="webp"?p={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:e==="mp3"||e==="ogg"||e==="wav"?p={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:e==="ics"?p={"text/calendar":[".ics"]}:e==="txt"?p={"text/plain":[".txt"]}:e==="pem"?p={"text/plain":[".pem"]}:p={"*/*":[`.${e}`]}}return k.createElement(Wi,{ref:this.dropzoneRef,multiple:!1,accept:p,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2*1024*1024,onDragEnter:()=>{this.setState({uploadFile:"dragging"})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{var r,l,a;this.setState({uploadFile:!1}),e.length?this.onDrop(e):window.alert(((a=(l=(r=t==null?void 0:t[0])==null?void 0:r.errors)==null?void 0:l[0])==null?void 0:a.message)||j.I18n.t("Cannot upload"))}},({getRootProps:e,getInputProps:t})=>k.createElement("div",{style:{...Ke.uploadDiv,...this.state.uploadFile==="dragging"?Ke.uploadDivDragging:void 0,...n?Ke.disabledOpacity:void 0},...e()},k.createElement("input",{...t()}),this.state.uploadFile==="dragging"?k.createElement("div",{style:{...Ke.uploadCenterDiv,...this.state.uploadError?Ke.error:void 0}},k.createElement("div",{style:Ke.uploadCenterTextAndIcon},k.createElement(X.UploadFile,{style:Ke.uploadCenterIcon}),k.createElement("div",{style:Ke.uploadCenterText},this.state.uploadFile==="dragging"?j.I18n.t("ra_Drop file here"):j.I18n.t("ra_Place your files here or click here to open the browse dialog")))):null,s,this.renderDeleteDialog()))}}const sn={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}},Qs=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Xs=["mp3","ogg","wav","aac"],Zs=["avi","mp4","mov"],qs=["txt","log","html","htm"],eo=["json","js","ts"];class to extends G{imagePrefix="../..";componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix===void 0?"./files":this.props.oContext.imagePrefix,this.setState({value:i??""})}static getDerivedStateFromProps(i,n){const u=G.getValue(i.data,i.attr);return u==null||u.toString().trim()!==(n.value||"").toString().trim()?{value:u??""}:null}loadFile(){const i=this.state.value.indexOf("/");if(i!==-1){const n=this.state.value.substring(0,i),u=this.state.value.substring(i+1);return this.props.oContext.socket.readFile(n,u,!0)}return Promise.resolve(null)}play(){this.loadFile().then(i=>{if(typeof AudioContext<"u"&&(i!=null&&i.file)){const n=new AudioContext,u=mn.base64ToArrayBuffer(i.file);n.decodeAudioData(u,y=>{const o=n.createBufferSource();o.buffer=y,o.connect(n.destination),o.start(0)},y=>window.alert(`Cannot play: ${y.message}`))}})}getIcon(){const i=this.state.value.split(".").pop().toLowerCase();return Qs.includes(i)?k.createElement("div",{style:{...sn.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Xs.includes(i)?k.createElement(O.IconButton,{style:{color:"#00FF00"},onClick:()=>this.play()},k.createElement(X.PlayArrow,null)):qs.includes(i)?k.createElement(X.Article,null):Zs.includes(i)?k.createElement(X.Videocam,null):eo.includes(i)?k.createElement(X.Code,null):null}renderFileBrowser(){return this.state.showFileBrowser?k.createElement(j.DialogSelectFile,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:i=>{const n=Array.isArray(i)?i[0]:i;this.setState({value:n},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?n:(n||"").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(i,n){const u=this.getIcon();return k.createElement("div",{style:sn.fullWidth},u,k.createElement(O.TextField,{variant:"standard",style:u?sn.fullWidthIcon:sn.fullWidthOneButton,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:y=>{const o=y.target.value;this.setState({value:o},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?o:(o||"").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)}),k.createElement(O.Button,{disabled:n,variant:"outlined",onClick:()=>this.setState({showFileBrowser:!0})},"..."),this.renderFileBrowser())}}class no extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("functions").then(n=>{const u=Object.keys(n).map(y=>({value:this.props.schema.short?y.replace("enum.functions.",""):y,label:this.getText(n[y].common.name),obj:n[y]}));this.props.schema.allowDeactivate!==!1&&u.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),this.setState({value:i,selectOptions:u})})}renderItem(i,n){if(!this.state.selectOptions)return null;const u=this.state.selectOptions.find(y=>y.value===this.state.value);return k.createElement(O.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>u?u.obj?k.createElement(j.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):u.label:"",onChange:y=>{this.setState({value:y.target.value==="_"?"":y.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(y=>k.createElement(O.MenuItem,{key:y.value,value:y.value,style:y.value===G.DIFFERENT_VALUE?{opacity:.5}:{}},y.obj?k.createElement(j.TextWithIcon,{value:y.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):y.label))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class io extends G{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getHostByIp(this.props.common.host).then(i=>{this.props.schema.listenOnAllPorts||(i=i.filter(n=>n.address!=="0.0.0.0"&&n.address!=="::")),this.props.schema.onlyIp4?i=i.filter(n=>n.family==="ipv4"):this.props.schema.onlyIp6&&(i=i.filter(n=>n.family==="ipv6")),this.props.schema.noInternal&&(i=i.filter(n=>!n.internal)),i.forEach(n=>{n.address==="0.0.0.0"?n.name=`[IPv4] 0.0.0.0 - ${j.I18n.t("ra_Listen on all IPs")}`:n.address==="::"&&(n.name=`[IPv6] :: - ${j.I18n.t("ra_Listen on all IPs")}`)}),this.setState({ips:i})}).catch(i=>console.error(i))}renderItem(i,n){var o,h;const u=G.getValue(this.props.data,this.props.attr),y=(o=this.state.ips)==null?void 0:o.find(d=>d.address===u);return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},this.state.ips&&this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,this.state.ips?k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:d=>(y==null?void 0:y.name)||d,onChange:d=>this.onChange(this.props.attr,d.target.value)},(h=this.state.ips)==null?void 0:h.map((d,s)=>k.createElement(O.MenuItem,{key:s,value:d.address},d.name))):k.createElement(O.TextField,{fullWidth:!0,variant:"standard",error:!!i,disabled:!!n,value:u,onChange:d=>this.onChange(this.props.attr,d.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class ro extends G{initialized=!1;localContext;componentDidMount(){super.componentDidMount(),this.askInstance()}askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);if(n)try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(i)}`)}}i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>this.setState({image:n||""}))}}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=G.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(){if(this.props.alive){const i=this.getContext();(i!==this.localContext||!this.initialized)&&(this.localContext=i,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.image===void 0?null:k.createElement("img",{alt:"dynamic content",src:this.state.image,style:{width:this.props.schema.width||"100%",height:this.props.schema.height}})}}class so extends G{index;constructor(i){super(i),this.index=Date.now()}componentDidMount(){if(super.componentDidMount(),this.props.schema.base64){const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i})}else this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(i=>i&&this.loadImage())}_getUrl(i){i&&(this.index=Date.now());let n=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port==="3000"&&(n=`${window.location.protocol}//${window.location.hostname}:8081/${n}`),n}loadImage(){fetch(this._getUrl()).then(i=>i.blob()).then(i=>{const n=new FileReader;n.onload=()=>{this.setState({value:n.result})},n.readAsDataURL(i)}).catch(i=>console.error(i))}renderItem(i,n){return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},this.props.schema.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,k.createElement(j.UploadImage,{error:!!i,disabled:n,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||256*1024,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.schema.base64){const u=this.onChange(this.props.attr,this.state.value);u instanceof Promise&&u.catch(y=>console.error(`Cannot set value: ${y}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(u=>console.error(u))}),onChange:u=>this.setState({value:u},()=>{if(this.props.schema.base64){const y=this.onChange(this.props.attr,this.state.value);y instanceof Promise&&y.catch(o=>console.error(`Cannot set value: ${o}`))}else u.startsWith("data")&&(u=u.split(",")[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,u).catch(y=>console.error(y))})}),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const gi={icon:{width:20,height:20,marginRight:4}};class oo extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);let n=this.props.schema.adapter;n==="_dataSources"&&(n=void 0),this.props.oContext.socket.getAdapterInstances(n,!0).then(async u=>{this.props.schema.adapter==="_dataSources"?u=u.filter(o=>{var h;return(h=o==null?void 0:o.common)==null?void 0:h.getHistory}):this.props.schema.adapter?u=u.filter(o=>o==null?void 0:o._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(u=u.filter(o=>{var h;return this.props.schema.adapters.includes((h=o==null?void 0:o.common)==null?void 0:h.name)})),this.props.schema.onlyEnabled&&(u=u.filter(o=>{var h;return(h=o==null?void 0:o.common)==null?void 0:h.enabled}));const y=u.map(o=>({value:this.props.schema.long?o._id:this.props.schema.short?o._id.split(".").pop():o._id.replace(/^system\.adapter\./,""),label:`${o.common.name} [${o._id.replace(/^system\.adapter\./,"")}]`,icon:`adapter/${o.common.name}/${o.common.icon}`}));y.sort((o,h)=>o.value>h.value?1:o.valueconsole.error(`Cannot get instances: ${u}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject("system.adapter.*",this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}onInstancesUpdate=(i,n)=>{if(!i.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;const u=this.props.schema.long?i:this.props.schema.short?i.split(".").pop():i.replace(/^system\.adapter\./,""),y=this.state.selectOptions.findIndex(o=>o.value===u);if(n){if(this.props.schema.adapter==="_dataSources"&&(!n.common||!n.common.getHistory))return;if(y===-1){const o=JSON.parse(JSON.stringify(this.state.selectOptions)),h=typeof n.common.name=="object"?n.common.name[j.I18n.getLanguage()]||n.common.name.en:n.common.name;o.push({value:this.props.schema.long?n._id:this.props.schema.short?n._id.split(".").pop():n._id.replace(/^system\.adapter\./,""),label:`${h} [${n._id.replace(/^system\.adapter\./,"")}]`,icon:`adapter/${h}/${n.common.icon}`}),o.sort((d,s)=>d.label>s.label?1:d.labelo.value===this.state.value);return k.createElement(O.FormControl,{fullWidth:!0,key:this.props.attr,variant:"standard"},this.props.schema.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:this.state.value,renderValue:()=>k.createElement("span",{style:{display:"flex"}},u!=null&&u.icon?k.createElement("img",{src:`./${u.icon}`,alt:u.value,style:gi.icon}):null,this.getText(u==null?void 0:u.label,!0)),onChange:o=>this.setState({value:o.target.value},()=>this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(o=>k.createElement(O.MenuItem,{key:o.value,value:o.value,style:o.value===G.NONE_VALUE?{opacity:.5}:{}},o.icon?k.createElement("img",{src:`./${o.icon}`,alt:o.value,style:gi.icon}):null,this.getText(o.label,!0)))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const mi={address:{fontSize:"smaller",opacity:.5,marginLeft:8}};class ao extends G{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getObject(`system.host.${this.props.common.host}`).then(i=>{var u,y;const n=[];if((y=(u=i==null?void 0:i.native)==null?void 0:u.hardware)!=null&&y.networkInterfaces){const o=i.native.hardware.networkInterfaces;Object.keys(o).forEach(h=>{if(this.props.schema.ignoreInternal&&!o[h].find(s=>!s.internal)||this.props.schema.ignoreLoopback&&o[h].find(s=>s.address==="127.0.0.1"||s.address==="::1"))return;let d=o[h].find(s=>s.family==="IPv4");d=d||o[h].find(s=>s.family==="IPv6"),n.push({value:h,address:d.address})})}this.setState({interfaces:n})}).catch(i=>window.alert(`Cannot read interfaces: ${i}`))}renderItem(i,n){var o,h,d;const u=G.getValue(this.props.data,this.props.attr),y=(o=this.state.interfaces)==null?void 0:o.find(s=>s.value===u);return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},(h=this.state.interfaces)!=null&&h.length&&this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,(d=this.state.interfaces)!=null&&d.length?k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:s=>y?k.createElement("span",null,y.value,k.createElement("span",{style:mi.address},y.address)):s,onChange:s=>this.onChange(this.props.attr,s.target.value)},this.state.interfaces.map((s,p)=>k.createElement(O.MenuItem,{key:p,value:s.value},k.createElement("span",null,s.value,k.createElement("span",{style:mi.address},s.address))))):k.createElement(O.TextField,{fullWidth:!0,variant:"standard",error:!!i,disabled:!!n,value:u,onChange:s=>this.onChange(this.props.attr,s.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const kt={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"}},lo=({toggleTranslation:L,noTranslation:i,title:n,fullWidth:u,help:y,maxWidth:o,progress:h,icon:d,applyDisabled:s,applyButton:p,onClose:e,children:t,titleButtonApply:r,titleButtonClose:l,onApply:a,textInput:c,defaultValue:f,overflowHidden:v})=>{const[b,A]=pt.useState(f);pt.useEffect(()=>{A(f)},[f]);let D=null;return d&&(D=d),k.createElement(O.Dialog,{open:!0,maxWidth:o||"md",fullWidth:!!u,disableEscapeKeyDown:!1,onClose:e,sx:{"& .MuiPaper-root":kt.modalDialog}},n&&k.createElement(O.DialogTitle,null,d?k.createElement(D,{style:kt.titleIcon}):null,n,j.I18n.getLanguage()!=="en"&&L?k.createElement(O.IconButton,{size:"large",style:{...kt.languageButton,...i?kt.languageButtonActive:{}},onClick:()=>L(),title:j.I18n.t("Disable/Enable translation")},k.createElement(X.Language,null)):null),k.createElement(O.DialogContent,{sx:{...v?kt.overflowHidden:{},...kt.content},style:{paddingTop:8}},c&&k.createElement(O.TextField,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:b,onChange:E=>A(E.target.value)}),t,y?k.createElement("div",null,y):null),k.createElement(O.DialogActions,null,p!==!1&&k.createElement(O.Button,{startIcon:k.createElement(X.Check,null),disabled:h||s&&f===b,onClick:()=>a&&a(c?b:""),variant:"contained",color:"primary"},j.I18n.t(r||"Ok")),k.createElement(O.Button,{color:"grey",onClick:()=>e&&e(),disabled:h,variant:"contained",startIcon:k.createElement(X.Close,null)},j.I18n.t(l||"Cancel"))))};var It={},St={},Ui={exports:{}};(function(L,i){(function(){var n="ace",u=function(){return this}();!u&&typeof window<"u"&&(u=window);var y=function(e,t,r){if(typeof e!="string"){y.original?y.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=t),y.modules[e]||(y.payloads[e]=r,y.modules[e]=null)};y.modules={},y.payloads={};var o=function(e,t,r){if(typeof t=="string"){var l=s(e,t);if(l!=null)return r&&r(),l}else if(Object.prototype.toString.call(t)==="[object Array]"){for(var a=[],c=0,f=t.length;cs.length)&&(d=s.length),d-=h.length;var p=s.indexOf(h,d);return p!==-1&&p===d}),String.prototype.repeat||o(String.prototype,"repeat",function(h){for(var d="",s=this;h>0;)h&1&&(d+=s),(h>>=1)&&(s+=s);return d}),String.prototype.includes||o(String.prototype,"includes",function(h,d){return this.indexOf(h,d)!=-1}),Object.assign||(Object.assign=function(h){if(h==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(h),s=1;s>>0,p=arguments[1],e=p>>0,t=e<0?Math.max(s+e,0):Math.min(e,s),r=arguments[2],l=r===void 0?s:r>>0,a=l<0?Math.max(s+l,0):Math.min(l,s);t0;)s&1&&(p+=d),(s>>=1)&&(d+=d);return p};var o=/^\s\s*/,h=/\s\s*$/;u.stringTrimLeft=function(d){return d.replace(o,"")},u.stringTrimRight=function(d){return d.replace(h,"")},u.copyObject=function(d){var s={};for(var p in d)s[p]=d[p];return s},u.copyArray=function(d){for(var s=[],p=0,e=d.length;p65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,u,y){u.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},u.getOS=function(){return u.isMac?u.OS.MAC:u.isLinux?u.OS.LINUX:u.OS.WINDOWS};var o=typeof navigator=="object"?navigator:{},h=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),d=o.userAgent||"",s=o.appName||"";u.isWin=h=="win",u.isMac=h=="mac",u.isLinux=h=="linux",u.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),u.isOldIE=u.isIE&&u.isIE<9,u.isGecko=u.isMozilla=d.match(/ Gecko\/\d+/),u.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",u.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,u.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,u.isSafari=parseFloat(d.split(" Safari/")[1])&&!u.isChrome||void 0,u.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,u.isAIR=d.indexOf("AdobeAIR")>=0,u.isAndroid=d.indexOf("Android")>=0,u.isChromeOS=d.indexOf(" CrOS ")>=0,u.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,u.isIOS&&(u.isMac=!0),u.isMobile=u.isIOS||u.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,u,y){var o=n("./useragent"),h="http://www.w3.org/1999/xhtml";u.buildDom=function r(l,a,c){if(typeof l=="string"&&l){var f=document.createTextNode(l);return a&&a.appendChild(f),f}if(!Array.isArray(l))return l&&l.appendChild&&a&&a.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var v=[],b=0;b"u")){if(s){if(a)p();else if(a===!1)return s.push([r,l])}if(!d){var c=a;!a||!a.getRootNode?c=document:(c=a.getRootNode(),(!c||c==a)&&(c=document));var f=c.ownerDocument||c;if(l&&u.hasCssString(l,c))return null;l&&(r+=` -/*# sourceURL=ace/css/`+l+" */");var v=u.createElement("style");v.appendChild(f.createTextNode(r)),l&&(v.id=l),c==f&&(c=u.getDocumentHead(f)),c.insertBefore(v,c.firstChild)}}}if(u.importCssString=e,u.importCssStylsheet=function(r,l){u.buildDom(["link",{rel:"stylesheet",href:r}],u.getDocumentHead(l))},u.scrollbarWidth=function(r){var l=u.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var a=u.createElement("ace_outer"),c=a.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",a.appendChild(l);var f=r&&r.documentElement||document&&document.documentElement;if(!f)return 0;f.appendChild(a);var v=l.offsetWidth;c.overflow="scroll";var b=l.offsetWidth;return v===b&&(b=a.clientWidth),f.removeChild(a),v-b},u.computedStyle=function(r,l){return window.getComputedStyle(r,"")||{}},u.setStyle=function(r,l,a){r[l]!==a&&(r[l]=a)},u.HAS_CSS_ANIMATION=!1,u.HAS_CSS_TRANSFORMS=!1,u.HI_DPI=o.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,o.isChromeOS&&(u.HI_DPI=!1),typeof document<"u"){var t=document.createElement("div");u.HI_DPI&&t.style.transform!==void 0&&(u.HAS_CSS_TRANSFORMS=!0),!o.isEdge&&typeof t.style.animationName<"u"&&(u.HAS_CSS_ANIMATION=!0),t=null}u.HAS_CSS_TRANSFORMS?u.translate=function(r,l,a){r.style.transform="translate("+Math.round(l)+"px, "+Math.round(a)+"px)"}:u.translate=function(r,l,a){r.style.top=Math.round(a)+"px",r.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,u,y){/* -* based on code from: -* -* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. -* Available via the MIT or new BSD license. -* see: http://github.com/jrburke/requirejs for details -*/var o=n("./dom");u.get=function(h,d){var s=new XMLHttpRequest;s.open("GET",h,!0),s.onreadystatechange=function(){s.readyState===4&&d(s.responseText)},s.send(null)},u.loadScript=function(h,d){var s=o.getDocumentHead(),p=document.createElement("script");p.src=h,s.appendChild(p),p.onload=p.onreadystatechange=function(e,t){(t||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,t||d())}},u.qualifyURL=function(h){var d=document.createElement("a");return d.href=h,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,u,y){u.inherits=function(o,h){o.super_=h,o.prototype=Object.create(h.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},u.mixin=function(o,h){for(var d in h)o[d]=h[d];return o},u.implement=function(o,h){u.mixin(o,h)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,u,y){var o={},h=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(s,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var e=this._eventRegistry[s]||[],t=this._defaultHandlers[s];if(!(!e.length&&!t)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=s),p.stopPropagation||(p.stopPropagation=h),p.preventDefault||(p.preventDefault=d),e=e.slice();for(var r=0;r1&&(v=c[c.length-2]);var A=p[a+"Path"];return A==null?A=p.basePath:f=="/"&&(a=f=""),A&&A.slice(-1)!="/"&&(A+="/"),A+a+f+v+this.get("suffix")},u.setModuleUrl=function(l,a){return p.$moduleUrls[l]=a};var e=function(l,a){if(l==="ace/theme/textmate"||l==="./theme/textmate")return a(null,n("./theme/textmate"));if(t)return t(l,a);console.error("loader is not configured")},t;u.setLoader=function(l){t=l},u.dynamicModules=Object.create(null),u.$loading={},u.$loaded={},u.loadModule=function(l,a){var c;if(Array.isArray(l))var f=l[0],v=l[1];else if(typeof l=="string")var v=l;var b=function(A){if(A&&!u.$loading[v])return a&&a(A);if(u.$loading[v]||(u.$loading[v]=[]),u.$loading[v].push(a),!(u.$loading[v].length>1)){var D=function(){e(v,function(E,g){g&&(u.$loaded[v]=g),u._emit("load.module",{name:v,module:g});var S=u.$loading[v];u.$loading[v]=null,S.forEach(function($){$&&$(g)})})};if(!u.get("packaged"))return D();h.loadScript(u.moduleUrl(v,f),D),r()}};if(u.dynamicModules[v])u.dynamicModules[v]().then(function(A){A.default?b(A.default):b(A)});else{try{c=this.$require(v)}catch{}b(c||u.$loaded[v])}},u.$require=function(l){if(typeof y.require=="function"){var a="require";return y[a](l)}},u.setModuleLoader=function(l,a){u.dynamicModules[l]=a};var r=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};u.version="1.39.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,u,y){n("./lib/fixoldbrowsers");var o=n("./config");o.setLoader(function(p,e){n([p],function(t){e(null,t)})});var h=function(){return this||typeof window<"u"&&window}();y.exports=function(p){o.init=d,o.$require=n,p.require=n},d(!0);function d(p){if(!(!h||!h.document)){o.set("packaged",p||n.packaged||y.packaged||h.define&&(void 0).packaged);var e={},t="",r=document.currentScript||document._currentScript,l=r&&r.ownerDocument||document;r&&r.src&&(t=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var a=l.getElementsByTagName("script"),c=0;c ["+this.end.row+"/"+this.end.column+"]"},h.prototype.contains=function(d,s){return this.compare(d,s)==0},h.prototype.compareRange=function(d){var s,p=d.end,e=d.start;return s=this.compare(p.row,p.column),s==1?(s=this.compare(e.row,e.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(e.row,e.column),s==-1?-1:s==1?42:0)},h.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},h.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},h.prototype.intersects=function(d){var s=this.compareRange(d);return s==-1||s==0||s==1},h.prototype.isEnd=function(d,s){return this.end.row==d&&this.end.column==s},h.prototype.isStart=function(d,s){return this.start.row==d&&this.start.column==s},h.prototype.setStart=function(d,s){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=s)},h.prototype.setEnd=function(d,s){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=s)},h.prototype.inside=function(d,s){return this.compare(d,s)==0?!(this.isEnd(d,s)||this.isStart(d,s)):!1},h.prototype.insideStart=function(d,s){return this.compare(d,s)==0?!this.isEnd(d,s):!1},h.prototype.insideEnd=function(d,s){return this.compare(d,s)==0?!this.isStart(d,s):!1},h.prototype.compare=function(d,s){return!this.isMultiLine()&&d===this.start.row?sthis.end.column?1:0:dthis.end.row?1:this.start.row===d?s>=this.start.column?0:-1:this.end.row===d?s<=this.end.column?0:1:0},h.prototype.compareStart=function(d,s){return this.start.row==d&&this.start.column==s?-1:this.compare(d,s)},h.prototype.compareEnd=function(d,s){return this.end.row==d&&this.end.column==s?1:this.compare(d,s)},h.prototype.compareInside=function(d,s){return this.end.row==d&&this.end.column==s?1:this.start.row==d&&this.start.column==s?-1:this.compare(d,s)},h.prototype.clipRows=function(d,s){if(this.end.row>s)var p={row:s+1,column:0};else if(this.end.rows)var e={row:s+1,column:0};else if(this.start.row1?($++,$>4&&($=1)):$=1,h.isIE){var x=Math.abs(C.clientX-_)>5||Math.abs(C.clientY-T)>5;(!I||x)&&($=1),I&&clearTimeout(I),I=setTimeout(function(){I=null},D[$-1]||600),$==1&&(_=C.clientX,T=C.clientY)}if(C._clicks=$,E[g]("mousedown",C),$>4)$=0;else if($>1)return E[g](w[$],C)}Array.isArray(A)||(A=[A]),A.forEach(function(C){l(C,"mousedown",m,S)})};function c(A){return 0|(A.ctrlKey?1:0)|(A.altKey?2:0)|(A.shiftKey?4:0)|(A.metaKey?8:0)}u.getModifierString=function(A){return o.KEY_MODS[c(A)]};function f(A,D,E){var g=c(D);if(!E&&D.code&&(E=o.$codeToKeyCode[D.code]||E),!h.isMac&&d){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(g|=8),d.altGr)if((3&g)!=3)d.altGr=0;else return;if(E===18||E===17){var S=D.location;if(E===17&&S===1)d[E]==1&&(s=D.timeStamp);else if(E===18&&g===3&&S===2){var $=D.timeStamp-s;$<50&&(d.altGr=!0)}}}if(E in o.MODIFIER_KEYS&&(E=-1),!(!g&&E===13&&D.location===3&&(A(D,g,-E),D.defaultPrevented))){if(h.isChromeOS&&g&8){if(A(D,g,E),D.defaultPrevented)return;g&=-9}return!g&&!(E in o.FUNCTION_KEYS)&&!(E in o.PRINTABLE_KEYS)?!1:A(D,g,E)}}u.addCommandKeyListener=function(A,D,E){var g=null;l(A,"keydown",function(S){d[S.keyCode]=(d[S.keyCode]||0)+1;var $=f(D,S,S.keyCode);return g=S.defaultPrevented,$},E),l(A,"keypress",function(S){g&&(S.ctrlKey||S.altKey||S.shiftKey||S.metaKey)&&(u.stopEvent(S),g=null)},E),l(A,"keyup",function(S){d[S.keyCode]=null},E),d||(v(),l(window,"focus",v))};function v(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!h.isOldIE){var b=1;u.nextTick=function(A,D){D=D||window;var E="zero-timeout-message-"+b++,g=function(S){S.data==E&&(u.stopPropagation(S),a(D,"message",g),A())};l(D,"message",g),D.postMessage(E,"*")}}u.$idleBlocked=!1,u.onIdle=function(A,D){return setTimeout(function E(){u.$idleBlocked?setTimeout(E,100):A()},D)},u.$idleBlockId=null,u.blockIdle=function(A){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},A||100)},u.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(A){setTimeout(A,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,u,y){var o;y.exports={lineMode:!1,pasteCancelled:function(){return o&&o>Date.now()-50?!0:o=!1},cancel:function(){o=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,u,y){var o=n("../lib/event"),h=n("../config").nls,d=n("../lib/useragent"),s=n("../lib/dom"),p=n("../lib/lang"),e=n("../clipboard"),t=d.isChrome<18,r=d.isIE,l=d.isChrome>63,a=400,c=n("../lib/keys"),f=c.KEY_MODS,v=d.isIOS,b=v?/\s/:/\n/,A=d.isMobile,D;D=function(E,g){var S=s.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck","false"),S.style.opacity="0",E.insertBefore(S,E.firstChild);var $=!1,_=!1,T=!1,I=!1,w="";A||(S.style.fontSize="1px");var m=!1,C=!1,x="",M=0,F=0,R=0,N=Number.MAX_SAFE_INTEGER,W=Number.MIN_SAFE_INTEGER,B=0;try{var V=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(Q){if(N=Number.MAX_SAFE_INTEGER,W=Number.MIN_SAFE_INTEGER,Q<0){B=0;return}B=Q},this.setAriaLabel=function(){var Q="";if(g.$textInputAriaLabel&&(Q+="".concat(g.$textInputAriaLabel,", ")),g.session){var re=g.session.selection.cursor.row;Q+=h("text-input.aria-label","Cursor at row $0",[re+1])}S.setAttribute("aria-label",Q)},this.setAriaOptions=function(Q){Q.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",Q.inline?"both":"list"),S.setAttribute("aria-activedescendant",Q.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),Q.role&&S.setAttribute("role",Q.role),Q.setLabel&&(S.setAttribute("aria-roledescription",h("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),o.addListener(S,"blur",function(Q){C||(g.onBlur(Q),V=!1)},g),o.addListener(S,"focus",function(Q){if(!C){if(V=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(Q),d.isEdge?setTimeout(z):z()}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),w||l||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var Q=S.style.top;S.style.position="fixed",S.style.top="0px";try{var re=S.getBoundingClientRect().top!=0}catch{return}var ae=[];if(re)for(var de=S.parentElement;de&&de.nodeType==1;)ae.push(de),de.setAttribute("ace_nocontext","true"),!de.parentElement&&de.getRootNode?de=de.getRootNode().host:de=de.parentElement;S.focus({preventScroll:!0}),re&&ae.forEach(function(ce){ce.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=Q)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return V},g.on("beforeEndOperation",function(){var Q=g.curOp,re=Q&&Q.command&&Q.command.name;if(re!="insertstring"){var ae=re&&(Q.docChanged||Q.selectionChanged);T&&ae&&(x=S.value="",Ze()),z()}}),g.on("changeSelection",this.setAriaLabel);var P=function(Q,re){for(var ae=re,de=1;de<=Q-N&&de<2*B+1;de++)ae+=g.session.getLine(Q-de).length+1;return ae},z=v?function(Q){if(!(!V||$&&!Q||I)){Q||(Q="");var re=` - ab`+Q+`cde fg -`;re!=S.value&&(S.value=x=re);var ae=4,de=4+(Q.length||(g.selection.isEmpty()?0:1));(M!=ae||F!=de)&&S.setSelectionRange(ae,de),M=ae,F=de}}:function(){if(!(T||I)&&!(!V&&!ee)){T=!0;var Q=0,re=0,ae="";if(g.session){var de=g.selection,ce=de.getRange(),Ce=de.cursor.row;Ce===W+1?(N=W+1,W=N+2*B):Ce===N-1?(W=N-1,N=W-2*B):(CeW+1)&&(N=Ce>B?Ce-B:0,W=Ce>B?Ce+B:2*B);for(var xe=[],Ae=N;Ae<=W;Ae++)xe.push(g.session.getLine(Ae));if(ae=xe.join(` -`),Q=P(ce.start.row,ce.start.column),re=P(ce.end.row,ce.end.column),ce.start.rowW){var me=g.session.getLine(W+1);re=ce.end.row>W+1?me.length:ce.end.column,re+=ae.length+1,ae=ae+` -`+me}else A&&Ce>0&&(ae=` -`+ae,re+=1,Q+=1);ae.length>a&&(Q=x.length&&Q.value===x&&x&&Q.selectionEnd!==F},U=function(Q){T||($?$=!1:K(S)?(g.selectAll(),z()):A&&S.selectionStart!=M&&z())},Y=null;this.setInputHandler=function(Q){Y=Q},this.getInputHandler=function(){return Y};var ee=!1,ne=function(Q,re){if(ee&&(ee=!1),_)return z(),Q&&g.onPaste(Q),_=!1,"";for(var ae=S.selectionStart,de=S.selectionEnd,ce=M,Ce=x.length-F,xe=Q,Ae=Q.length-ae,be=Q.length-de,me=0;ce>0&&x[me]==Q[me];)me++,ce--;for(xe=xe.slice(me),me=1;Ce>0&&x.length-me>M-1&&x[x.length-me]==Q[Q.length-me];)me++,Ce--;Ae-=me-1,be-=me-1;var Fe=xe.length-me+1;if(Fe<0&&(ce=-Fe,Fe=0),xe=xe.slice(0,Fe),!re&&!xe&&!Ae&&!ce&&!Ce&&!be)return"";I=!0;var st=!1;return d.isAndroid&&xe==". "&&(xe=" ",st=!0),xe&&!ce&&!Ce&&!Ae&&!be||m?g.onTextInput(xe):g.onTextInput(xe,{extendLeft:ce,extendRight:Ce,restoreStart:Ae,restoreEnd:be}),I=!1,x=Q,M=ae,F=de,R=be,st?` -`:xe},te=function(Q){if(T)return Xe();if(Q&&Q.inputType){if(Q.inputType=="historyUndo")return g.execCommand("undo");if(Q.inputType=="historyRedo")return g.execCommand("redo")}var re=S.value,ae=ne(re,!0);(re.length>a+100||b.test(ae)||A&&M<1&&M==F)&&z()},se=function(Q,re,ae){var de=Q.clipboardData||window.clipboardData;if(!(!de||t)){var ce=r||ae?"Text":"text/plain";try{return re?de.setData(ce,re)!==!1:de.getData(ce)}catch(Ce){if(!ae)return se(Ce,re,!0)}}},ve=function(Q,re){var ae=g.getCopyText();if(!ae)return o.preventDefault(Q);se(Q,ae)?(v&&(z(ae),$=ae,setTimeout(function(){$=!1},10)),re?g.onCut():g.onCopy(),o.preventDefault(Q)):($=!0,S.value=ae,S.select(),setTimeout(function(){$=!1,z(),re?g.onCut():g.onCopy()}))},Me=function(Q){ve(Q,!0)},_e=function(Q){ve(Q,!1)},we=function(Q){var re=se(Q);e.pasteCancelled()||(typeof re=="string"?(re&&g.onPaste(re,Q),d.isIE&&setTimeout(z),o.preventDefault(Q)):(S.value="",_=!0))};o.addCommandKeyListener(S,function(Q,re,ae){if(!T)return g.onCommandKey(Q,re,ae)},g),o.addListener(S,"select",U,g),o.addListener(S,"input",te,g),o.addListener(S,"cut",Me,g),o.addListener(S,"copy",_e,g),o.addListener(S,"paste",we,g),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&o.addListener(E,"keydown",function(Q){if(!(d.isMac&&!Q.metaKey||!Q.ctrlKey))switch(Q.keyCode){case 67:_e(Q);break;case 86:we(Q);break;case 88:Me(Q);break}},g);var Ne=function(Q){if(!(T||!g.onCompositionStart||g.$readOnly)&&(T={},!m)){Q.data&&(T.useTextareaForIME=!1),setTimeout(Xe,0),g._signal("compositionStart"),g.on("mousedown",Rt);var re=g.getSelectionRange();re.end.row=re.start.row,re.end.column=re.start.column,T.markerRange=re,T.selectionStart=M,g.onCompositionStart(T),T.useTextareaForIME?(x=S.value="",M=0,F=0):(S.msGetInputContext&&(T.context=S.msGetInputContext()),S.getInputContext&&(T.context=S.getInputContext()))}},Xe=function(){if(!(!T||!g.onCompositionUpdate||g.$readOnly)){if(m)return Rt();if(T.useTextareaForIME)g.onCompositionUpdate(S.value);else{var Q=S.value;ne(Q),T.markerRange&&(T.context&&(T.markerRange.start.column=T.selectionStart=T.context.compositionStartOffset),T.markerRange.end.column=T.markerRange.start.column+F-T.selectionStart+R)}}},Ze=function(Q){!g.onCompositionEnd||g.$readOnly||(T=!1,g.onCompositionEnd(),g.off("mousedown",Rt),Q&&te())};function Rt(){C=!0,S.blur(),S.focus(),C=!1}var Jt=p.delayedCall(Xe,50).schedule.bind(null,null);function bn(Q){Q.keyCode==27&&S.value.lengthF&&x[be]==` -`?me=c.end:AeF&&x.slice(0,be).split(` -`).length>2?me=c.down:be>F&&x[be-1]==" "?(me=c.right,Fe=f.option):(be>F||be==F&&F!=M&&Ae==be)&&(me=c.right),Ae!==be&&(Fe|=f.shift),me){var st=re.onCommandKey({},Fe,me);if(!st&&re.commands){me=c.keyCodeToString(me);var Yt=re.commands.findKeyCommand(Fe,me);Yt&&re.execCommand(Yt)}M=Ae,F=be,z("")}}};document.addEventListener("selectionchange",Ce),re.on("destroy",function(){document.removeEventListener("selectionchange",Ce)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}},u.TextInput=D,u.$setUserAgentForTests=function(E,g){A=E,v=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,u,y){var o=n("../lib/useragent"),h=0,d=550,s=function(){function t(r){r.$clickSelection=null;var l=r.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var a=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];a.forEach(function(c){r[c]=this[c]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return t.prototype.onMouseDown=function(r){var l=r.inSelection(),a=r.getDocumentPosition();this.mousedownEvent=r;var c=this.editor,f=r.getButton();if(f!==0){var v=c.getSelectionRange(),b=v.isEmpty();(b||f==1)&&c.selection.moveToPosition(a),f==2&&(c.textInput.onContextMenu(r.domEvent),o.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(a,r.domEvent._clicks>1),r.preventDefault()},t.prototype.startSelect=function(r,l){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var a=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?a.selection.selectToPosition(r):l||a.selection.moveToPosition(r),l||this.select(),a.setStyle("ace_selecting"),this.setState("select"))},t.prototype.select=function(){var r,l=this.editor,a=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(a);if(c==-1)r=this.$clickSelection.end;else if(c==1)r=this.$clickSelection.start;else{var f=e(this.$clickSelection,a);a=f.cursor,r=f.anchor}l.selection.setSelectionAnchor(r.row,r.column)}l.selection.selectToPosition(a),l.renderer.scrollCursorIntoView()},t.prototype.extendSelectionBy=function(r){var l,a=this.editor,c=a.renderer.screenToTextCoordinates(this.x,this.y),f=a.selection[r](c.row,c.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(f.start),b=this.$clickSelection.comparePoint(f.end);if(v==-1&&b<=0)l=this.$clickSelection.end,(f.end.row!=c.row||f.end.column!=c.column)&&(c=f.start);else if(b==1&&v>=0)l=this.$clickSelection.start,(f.start.row!=c.row||f.start.column!=c.column)&&(c=f.end);else if(v==-1&&b==1)c=f.end,l=f.start;else{var A=e(this.$clickSelection,c);c=A.cursor,l=A.anchor}a.selection.setSelectionAnchor(l.row,l.column)}a.selection.selectToPosition(c),a.renderer.scrollCursorIntoView()},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},t.prototype.focusWait=function(){var r=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(r>h||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},t.prototype.onDoubleClick=function(r){var l=r.getDocumentPosition(),a=this.editor,c=a.session,f=c.getBracketRange(l);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=a.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},t.prototype.onTripleClick=function(r){var l=r.getDocumentPosition(),a=this.editor;this.setState("selectByLines");var c=a.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=a.selection.getLineRange(c.start.row),this.$clickSelection.end=a.selection.getLineRange(c.end.row).end):this.$clickSelection=a.selection.getLineRange(l.row),this.select()},t.prototype.onQuadClick=function(r){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},t.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var a=this.$lastScroll,c=r.domEvent.timeStamp,f=c-a.t,v=f?r.wheelX/f:a.vx,b=f?r.wheelY/f:a.vy;f=1&&l.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(D=!0),A<=1&&l.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(D=!0),D)a.allowed=c;else if(c-a.allowedd.clientHeight;s||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,u,y){var o=this&&this.__extends||function(){var c=function(f,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,A){b.__proto__=A}||function(b,A){for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(b[D]=A[D])},c(f,v)};return function(f,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");c(f,v);function b(){this.constructor=f}f.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}}(),h=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,v=f&&c[f],b=0;if(v)return v.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("./lib/dom");n("./lib/event");var s=n("./range").Range,p=n("./lib/scroll").preventParentScroll,e="ace_tooltip",t=function(){function c(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return c.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=e,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(f){this.getElement().textContent=f},c.prototype.setHtml=function(f){this.getElement().innerHTML=f},c.prototype.setPosition=function(f,v){this.getElement().style.left=f+"px",this.getElement().style.top=v+"px"},c.prototype.setClassName=function(f){d.addCssClass(this.getElement(),f)},c.prototype.setTheme=function(f){this.$element.className=e+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},c.prototype.show=function(f,v,b){f!=null&&this.setText(f),v!=null&&b!=null&&this.setPosition(v,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=e,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),r=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},c.prototype.removePopup=function(f){var v=this.popups.indexOf(f);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},c.prototype.updatePopups=function(){var f,v,b,A;this.popups.sort(function(w,m){return m.priority-w.priority});var D=[];try{for(var E=h(this.popups),g=E.next();!g.done;g=E.next()){var S=g.value,$=!0;try{for(var _=(b=void 0,h(D)),T=_.next();!T.done;T=_.next()){var I=T.value;if(this.doPopupsOverlap(I,S)){$=!1;break}}}catch(w){b={error:w}}finally{try{T&&!T.done&&(A=_.return)&&A.call(_)}finally{if(b)throw b.error}}$?D.push(S):S.hide()}}catch(w){f={error:w}}finally{try{g&&!g.done&&(v=E.return)&&v.call(E)}finally{if(f)throw f.error}}},c.prototype.doPopupsOverlap=function(f,v){var b=f.getElement().getBoundingClientRect(),A=v.getElement().getBoundingClientRect();return b.leftA.left&&b.topA.top},c}(),l=new r;u.popupManager=l,u.Tooltip=t;var a=function(c){o(f,c);function f(v){v===void 0&&(v=document.body);var b=c.call(this,v)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var A=b.getElement();return A.style.whiteSpace="pre-wrap",A.style.pointerEvents="auto",A.addEventListener("mouseout",b.onMouseOut),A.tabIndex=-1,A.addEventListener("blur",function(){A.contains(document.activeElement)||this.hide()}.bind(b)),A.addEventListener("wheel",p),b}return f.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(v,b){this.lastEvent=v,this.lastT=Date.now();var A=b.$mouseHandler.isMousePressed;if(this.isOpen){var D=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(D.row,D.column)||A||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||A||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(v){var b=v.editor,A=v.getDocumentPosition(),D=b.session.getLine(A.row);if(A.column==D.length){var E=b.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),g=b.session.documentToScreenPosition(A.row,A.column);if(g.column!=E.column||g.row!=E.row)return!0}return!1},f.prototype.setDataProvider=function(v){this.$gatherData=v},f.prototype.showForRange=function(v,b,A,D){var E=10;if(!(D&&D!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var g=v.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.addMarker(b,v.session),this.range=s.fromPoints(b.start,b.end);var S=g.textToScreenCoordinates(b.start.row,b.start.column),$=g.scroller.getBoundingClientRect();S.pageX<$.left&&(S.pageX=$.left);var _=this.getElement();_.innerHTML="",_.appendChild(A),_.style.maxHeight="",_.style.display="block";var T=_.clientHeight,I=_.clientWidth,w=window.innerHeight-S.pageY-g.lineHeight,m=!0;S.pageY-T<0&&S.pageY=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("../lib/dom"),s=n("../lib/event"),p=n("../tooltip").Tooltip,e=n("../config").nls,t=5,r=3;u.GUTTER_TOOLTIP_LEFT_OFFSET=t,u.GUTTER_TOOLTIP_TOP_OFFSET=r;function l(c){var f=c.editor,v=f.renderer.$gutterLayer,b=new a(f,!0);c.editor.setDefaultHandler("guttermousedown",function($){if(!(!f.isFocused()||$.getButton()!=0)){var _=v.getRegion($);if(_!="foldWidgets"){var T=$.getDocumentPosition().row,I=f.session.selection;if($.getShiftKey())I.selectTo(T,0);else{if($.domEvent.detail==2)return f.selectAll(),$.preventDefault();c.$clickSelection=f.selection.getLineRange(T)}return c.setState("selectByLines"),c.captureMouse($),$.preventDefault()}}});var A,D;function E(){var $=D.getDocumentPosition().row,_=f.session.getLength();if($==_){var T=f.renderer.pixelToScreenCoordinates(0,D.y).row,I=D.$pos;if(T>f.session.documentToScreenRow(I.row,I.column))return g()}if(b.showTooltip($),!!b.isOpen)if(f.on("mousewheel",g),f.on("changeSession",g),window.addEventListener("keydown",g,!0),c.$tooltipFollowsMouse)S(D);else{var w=D.getGutterRow(),m=v.$lines.get(w);if(m){var C=m.element.querySelector(".ace_gutter_annotation"),x=C.getBoundingClientRect(),M=b.getElement().style;M.left=x.right-t+"px",M.top=x.bottom-r+"px"}else S(D)}}function g($){$&&$.type==="keydown"&&($.ctrlKey||$.metaKey)||$&&$.type==="mouseout"&&(!$.relatedTarget||b.getElement().contains($.relatedTarget))||(A&&(A=clearTimeout(A)),b.isOpen&&(b.hideTooltip(),f.off("mousewheel",g),f.off("changeSession",g),window.removeEventListener("keydown",g,!0)))}function S($){b.setPosition($.x,$.y)}c.editor.setDefaultHandler("guttermousemove",function($){var _=$.domEvent.target||$.domEvent.srcElement;if(d.hasCssClass(_,"ace_fold-widget"))return g();b.isOpen&&c.$tooltipFollowsMouse&&S($),D=$,!A&&(A=setTimeout(function(){A=null,D&&!c.isMousePressed&&E()},50))}),s.addListener(f.renderer.$gutter,"mouseout",function($){D=null,b.isOpen&&(A=setTimeout(function(){A=null,g($)},50))},f)}u.GutterHandler=l;var a=function(c){o(f,c);function f(v,b){b===void 0&&(b=!1);var A=c.call(this,v.container)||this;A.editor=v,A.visibleTooltipRow;var D=A.getElement();return D.setAttribute("role","tooltip"),D.style.pointerEvents="auto",b&&(A.onMouseOut=A.onMouseOut.bind(A),D.addEventListener("mouseout",A.onMouseOut)),A}return f.prototype.onMouseOut=function(v){this.isOpen&&(!v.relatedTarget||this.getElement().contains(v.relatedTarget)||v&&v.currentTarget.contains(v.relatedTarget)||this.hideTooltip())},f.prototype.setPosition=function(v,b){var A=window.innerWidth||document.documentElement.clientWidth,D=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),g=this.getHeight();v+=15,b+=15,v+E>A&&(v-=v+E-A),b+g>D&&(b-=20+g),p.prototype.setPosition.call(this,v,b)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:e("gutter-tooltip.aria-label.error.singular","error"),plural:e("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:e("gutter-tooltip.aria-label.security.singular","security finding"),plural:e("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:e("gutter-tooltip.aria-label.warning.singular","warning"),plural:e("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:e("gutter-tooltip.aria-label.info.singular","information message"),plural:e("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:e("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:e("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(v){var b,A=this.editor.renderer.$gutterLayer,D=A.$annotations[v],E;D?E={displayText:Array.from(D.displayText),type:Array.from(D.type)}:E={displayText:[],type:[]};var g=A.session.getFoldLine(v);if(g&&A.$showFoldedAnnotations){for(var S={error:[],security:[],warning:[],info:[],hint:[]},$={error:1,security:2,warning:3,info:4,hint:5},_,T=v+1;T<=g.end.row;T++)if(A.$annotations[T])for(var I=0;Ie?w=null:K-w>=p&&(a.renderer.scrollCursorIntoView(),w=null)}}function x(P,z){var K=Date.now(),U=a.renderer.layerConfig.lineHeight,Y=a.renderer.layerConfig.characterWidth,ee=a.renderer.scroller.getBoundingClientRect(),ne={x:{left:A-ee.left,right:ee.right-A},y:{top:D-ee.top,bottom:ee.bottom-D}},te=Math.min(ne.x.left,ne.x.right),se=Math.min(ne.y.top,ne.y.bottom),ve={row:P.row,column:P.column};te/Y<=2&&(ve.column+=ne.x.left=s&&a.renderer.scrollCursorIntoView(ve):I=K:I=null}function M(){var P=S;S=a.renderer.screenToTextCoordinates(A,D),C(S,P),x(S,P)}function F(){g=a.selection.toOrientedRange(),b=a.session.addMarker(g,"ace_selection",a.getSelectionStyle()),a.clearSelection(),a.isFocused()&&a.renderer.$cursorLayer.setBlinking(!1),clearInterval(E),M(),E=setInterval(M,20),$=0,h.addListener(document,"mousemove",W)}function R(){clearInterval(E),a.session.removeMarker(b),b=null,a.selection.fromOrientedRange(g),a.isFocused()&&!T&&a.$resetCursorStyle(),g=null,S=null,$=0,I=null,w=null,h.removeListener(document,"mousemove",W)}var N=null;function W(){N==null&&(N=setTimeout(function(){N!=null&&b&&R()},20))}function B(P){var z=P.types;return!z||Array.prototype.some.call(z,function(K){return K=="text/plain"||K=="Text"})}function V(P){var z=["copy","copymove","all","uninitialized"],K=["move","copymove","linkmove","all","uninitialized"],U=d.isMac?P.altKey:P.ctrlKey,Y="uninitialized";try{Y=P.dataTransfer.effectAllowed.toLowerCase()}catch{}var ee="none";return U&&z.indexOf(Y)>=0?ee="copy":K.indexOf(Y)>=0?ee="move":z.indexOf(Y)>=0&&(ee="copy"),ee}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,a=l.container;a.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=d.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var a=this.editor.container;if(d.isIE&&this.state=="dragReady"){var c=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&a.dragDrop()}if(this.state==="dragWait"){var c=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var a=this.editor,c=l.inSelection(),f=l.getButton(),v=l.domEvent.detail||1;if(v===1&&f===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),a.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var A=a.container;A.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(t.prototype);function r(l,a,c,f){return Math.sqrt(Math.pow(c-l,2)+Math.pow(f-a,2))}u.DragdropHandler=t}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,u,y){var o=n("./mouse_event").MouseEvent,h=n("../lib/event"),d=n("../lib/dom");u.addTouchListeners=function(s,p){var e="scroll",t,r,l,a,c,f,v=0,b,A=0,D=0,E=0,g,S;function $(){var C=window.navigator&&window.navigator.clipboard,x=!1,M=function(){var N=p.getCopyText(),W=p.session.getUndoManager().hasUndo();S.replaceChild(d.buildDom(x?["span",!N&&F("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],N&&F("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],N&&F("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&F("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],W&&F("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],F("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],F("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},F=function(N){return p.commands.canExecute(N,p)},R=function(N){var W=N.target.getAttribute("action");if(W=="more"||!x)return x=!x,M();W=="paste"?C.readText().then(function(B){p.execCommand(W,B)}):W&&((W=="cut"||W=="copy")&&(C?C.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(W)),S.firstChild.style.display="none",x=!1,W!="openCommandPalette"&&p.focus()};S=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(N){e="menu",N.stopPropagation(),N.preventDefault(),p.textInput.focus()},ontouchend:function(N){N.stopPropagation(),N.preventDefault(),R(N)},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function _(){if(!p.getOption("enableMobileMenu")){S&&T();return}S||$();var C=p.selection.cursor,x=p.renderer.textToScreenCoordinates(C.row,C.column),M=p.renderer.textToScreenCoordinates(0,0).pageX,F=p.renderer.scrollLeft,R=p.container.getBoundingClientRect();S.style.top=x.pageY-R.top-3+"px",x.pageX-R.left=2?p.selection.getLineRange(b.row):p.session.getBracketRange(b);C&&!C.isEmpty()?p.selection.setRange(C):p.selection.selectWord(),e="wait"}h.addListener(s,"contextmenu",function(C){if(g){var x=p.textInput.getElement();x.focus()}},p),h.addListener(s,"touchstart",function(C){var x=C.touches;if(c||x.length>1){clearTimeout(c),c=null,l=-1,e="zoom";return}g=p.$mouseHandler.isMousePressed=!0;var M=p.renderer.layerConfig.lineHeight,F=p.renderer.layerConfig.lineHeight,R=C.timeStamp;a=R;var N=x[0],W=N.clientX,B=N.clientY;Math.abs(t-W)+Math.abs(r-B)>M&&(l=-1),t=C.clientX=W,r=C.clientY=B,D=E=0;var V=new o(C,p);if(b=V.getDocumentPosition(),R-l<500&&x.length==1&&!v)A++,C.preventDefault(),C.button=0,w();else{A=0;var P=p.selection.cursor,z=p.selection.isEmpty()?P:p.selection.anchor,K=p.renderer.$cursorLayer.getPixelPosition(P,!0),U=p.renderer.$cursorLayer.getPixelPosition(z,!0),Y=p.renderer.scroller.getBoundingClientRect(),ee=p.renderer.layerConfig.offset,ne=p.renderer.scrollLeft,te=function(Me,_e){return Me=Me/F,_e=_e/M-.75,Me*Me+_e*_e};if(C.clientXve?"cursor":"anchor"),ve<3.5?e="anchor":se<3.5?e="cursor":e="scroll",c=setTimeout(I,450)}l=R},p),h.addListener(s,"touchend",function(C){g=p.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),e=="zoom"?(e="",v=0):c?(p.selection.moveToPosition(b),v=0,_()):e=="scroll"?(m(),T()):_(),clearTimeout(c),c=null},p),h.addListener(s,"touchmove",function(C){c&&(clearTimeout(c),c=null);var x=C.touches;if(!(x.length>1||e=="zoom")){var M=x[0],F=t-M.clientX,R=r-M.clientY;if(e=="wait")if(F*F+R*R>4)e="cursor";else return C.preventDefault();t=M.clientX,r=M.clientY,C.clientX=M.clientX,C.clientY=M.clientY;var N=C.timeStamp,W=N-a;if(a=N,e=="scroll"){var B=new o(C,p);B.speed=1,B.wheelX=F,B.wheelY=R,10*Math.abs(F)0)if(ve==16){for(we=_e;we-1){for(we=_e;we=0&&U[Ze]==g;Ze--)z[Ze]=o}}}function W(P,z,K){if(!(h=P){for(ee=Y+1;ee=P;)ee++;for(ne=Y,te=ee-1;ne=z.length||(ee=K[U-1])!=f&&ee!=v||(ne=z[U+1])!=f&&ne!=v?b:(d&&(ne=v),ne==ee?ne:b);case $:return ee=U>0?K[U-1]:A,ee==f&&U+10&&K[U-1]==f)return f;if(d)return b;for(se=U+1,te=z.length;se=1425&&ve<=2303||ve==64286;if(ee=z[se],Me&&(ee==c||ee==E))return c}return U<1||(ee=z[U-1])==A?b:K[U-1];case A:return d=!1,s=!0,o;case D:return p=!0,b;case I:case w:case C:case x:case m:d=!1;case M:return b}}function V(P){var z=P.charCodeAt(0),K=z>>8;return K==0?z>191?a:F[z]:K==5?/[\u0591-\u05f4]/.test(P)?c:a:K==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(P)?T:/[\u0660-\u0669\u066b-\u066c]/.test(P)?v:z==1642?_:/[\u06f0-\u06f9]/.test(P)?f:E:K==32&&z<=8287?R[z&255]:K==254&&z>=65136?E:b}u.L=a,u.R=c,u.EN=f,u.ON_R=3,u.AN=4,u.R_H=5,u.B=6,u.RLE=7,u.DOT="·",u.doBidiReorder=function(P,z,K){if(P.length<2)return{};var U=P.split(""),Y=new Array(U.length),ee=new Array(U.length),ne=[];o=K?l:r,N(U,ne,U.length,z);for(var te=0;teE&&z[te]0&&U[te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(U[te])&&(ne[te-1]=ne[te]=u.R_H,te++);U[U.length-1]===u.DOT&&(ne[U.length-1]=u.B),U[0]==="‫"&&(ne[0]=u.RLE);for(var te=0;te=0&&(e=this.session.$docRowCache[r])}return e},p.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var r,l=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(r=this.session.$getRowCacheIndex(t,this.currentRow-e-1),r===l);)l=r,e++;else e=this.currentRow;return e},p.prototype.updateRowLine=function(e,t){e===void 0&&(e=this.getDocumentRow());var r=e===this.session.getLength()-1,l=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var a=this.session.$wrapData[e];a&&(t===void 0&&(t=this.getSplitIndex()),t>0&&a.length?(this.wrapIndent=a.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,l=o.getVisualFromLogicalIdx(r,this.bidiMap),a=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&e<=t&&a[l]%2!==0&&l++;for(var f=0;ft&&a[l]%2===0&&(c+=this.charWidths[a[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},p.prototype.getSelections=function(e,t){var r=this.bidiMap,l=r.bidiLevels,a,c=[],f=0,v=Math.min(e,t)-this.wrapIndent,b=Math.max(e,t)-this.wrapIndent,A=!1,D=!1,E=0;this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,S=0;S=v&&gl+f/2;){if(l+=f,a===c.length-1){f=0;break}f=this.charWidths[c[++a]]}return a>0&&c[a-1]%2!==0&&c[a]%2===0?(r0&&c[a-1]%2===0&&c[a]%2!==0?t=1+(r>l?this.bidiMap.logicalFromVisual[a]:this.bidiMap.logicalFromVisual[a-1]):this.isRtlDir&&a===c.length-1&&f===0&&c[a-1]%2===0||!this.isRtlDir&&a===0&&c[a]%2!==0?t=1+this.bidiMap.logicalFromVisual[a]:(a>0&&c[a-1]%2!==0&&f!==0&&a--,t=this.bidiMap.logicalFromVisual[a]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},p}();u.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,u,y){var o=n("./lib/oop"),h=n("./lib/lang"),d=n("./lib/event_emitter").EventEmitter,s=n("./range").Range,p=function(){function e(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(l){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(t,r){this.$isEmpty=!1,this.anchor.setPosition(t,r)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var t=this.anchor,r=this.lead;return t.row>r.row||t.row==r.row&&t.column>r.column},e.prototype.getRange=function(){var t=this.anchor,r=this.lead;return this.$isEmpty?s.fromPoints(r,r):this.isBackwards()?s.fromPoints(r,t):s.fromPoints(t,r)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(t,r){var l=r?t.end:t.start,a=r?t.start:t.end;this.$setSelection(l.row,l.column,a.row,a.column)},e.prototype.$setSelection=function(t,r,l,a){if(!this.$silent){var c=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,r),this.cursor.setPosition(l,a),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||f)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(t){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),t.call(this)},e.prototype.selectTo=function(t,r){this.$moveSelection(function(){this.moveCursorTo(t,r)})},e.prototype.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},e.prototype.moveTo=function(t,r){this.clearSelection(),this.moveCursorTo(t,r)},e.prototype.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(t,r){if(typeof r>"u"){var l=t||this.lead;t=l.row,r=l.column}return this.session.getWordRange(t,r)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var t=this.getCursor(),r=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(r)},e.prototype.getLineRange=function(t,r){var l=typeof t=="number"?t:this.lead.row,a,c=this.session.getFoldLine(l);return c?(l=c.start.row,a=c.end.row):a=l,r===!0?new s(l,0,a,this.session.getLine(a).length):new s(l,0,a+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(t,r,l){var a=t.column,c=t.column+r;return l<0&&(a=t.column-r,c=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(a,c).split(" ").length-1==r},e.prototype.moveCursorLeft=function(){var t=this.lead.getPosition(),r;if(r=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var t=this.lead.getPosition(),r;if(r=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(r.column=a)}}this.moveCursorTo(r.row,r.column)},e.prototype.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,r=this.doc.getLine(t).length;this.moveCursorTo(t,r)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var t=this.lead.row,r=this.lead.column,l=this.doc.getLine(t),a=l.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(t,r,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(a)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,a=l.substring(r)),r>=l.length){this.moveCursorTo(t,l.length),this.moveCursorRight(),t0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,r)},e.prototype.$shortWordEndIndex=function(t){var r=0,l,a=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(t))r=this.session.tokenRe.lastIndex;else{for(;(l=t[r])&&a.test(l);)r++;if(r<1){for(c.lastIndex=0;(l=t[r])&&!c.test(l);)if(c.lastIndex=0,r++,a.test(l))if(r>2){r--;break}else{for(;(l=t[r])&&a.test(l);)r++;if(r>2)break}}}return c.lastIndex=0,r},e.prototype.moveCursorShortWordRight=function(){var t=this.lead.row,r=this.lead.column,l=this.doc.getLine(t),a=l.substring(r),c=this.session.getFoldAt(t,r,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(r==l.length){var f=this.doc.getLength();do t++,a=this.doc.getLine(t);while(t0&&/^\s*$/.test(a));r=a.length,/\s+$/.test(a)||(a="")}var c=h.stringReverse(a),f=this.$shortWordEndIndex(c);return this.moveCursorTo(t,r-f)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(t,r){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),a;if(r===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(a=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(a/this.session.$bidiHandler.charWidths[0])):a=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];t<0?t-=c.rowsAbove||0:t>0&&(t+=c.rowCount-(c.rowsAbove||0))}var f=this.session.screenToDocumentPosition(l.row+t,l.column,a);t!==0&&r===0&&f.row===this.lead.row&&(f.column,this.lead.column),this.moveCursorTo(f.row,f.column+r,r===0)},e.prototype.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorTo=function(t,r,l){var a=this.session.getFoldAt(t,r,1);a&&(t=a.start.row,r=a.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(c.charAt(r))&&c.charAt(r-1)&&(this.lead.row==t&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(t,r),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(t,r,l){var a=this.session.screenToDocumentPosition(t,r);this.moveCursorTo(a.row,a.column,l)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(t){var r=this.getRange();return t?(t.start.column=r.start.column,t.start.row=r.start.row,t.end.column=r.end.column,t.end.row=r.end.row):t=r,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},e.prototype.getRangeOfMovements=function(t){var r=this.getCursor();try{t(this);var l=this.getCursor();return s.fromPoints(r,l)}catch{return s.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},e.prototype.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(r){var l=r.clone();return l.isBackwards=r.cursor==r.start,l});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},e.prototype.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var r=t.length;r--;){var l=s.fromPoints(t[r].start,t[r].end);t[r].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},e.prototype.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(t[r]))return!1;return!0},e}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,o.implement(p.prototype,d),u.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,u,y){var o=n("./lib/report_error").reportError,h=2e3,d=function(){function s(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var e in this.states){for(var t=this.states[e],r=[],l=0,a=this.matchMappings[e]={defaultToken:"text"},c="g",f=[],v=0;v1?b.onMatch=this.$applyToken:b.onMatch=b.token),D>1&&(/\\\d/.test(b.regex)?A=b.regex.replace(/\\([0-9]+)/g,function(E,g){return"\\"+(parseInt(g,10)+l+1)}):(D=1,A=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&f.push(b)),a[l]=v,l+=D,r.push(A),b.onMatch||(b.onMatch=null)}}r.length||(a[0]=0,r.push("$")),f.forEach(function(E){E.splitRegex=this.createSplitterRegexp(E.regex,c)},this),this.regExps[e]=new RegExp("("+r.join(")|(")+")|($)",c)}}return s.prototype.$setMaxTokenCount=function(p){h=p|0},s.prototype.$applyToken=function(p){var e=this.splitRegex.exec(p).slice(1),t=this.token.apply(this,e);if(typeof t=="string")return[{type:t,value:p}];for(var r=[],l=0,a=t.length;lb){var _=p.substring(b,$-S.length);D.type==E?D.value+=_:(D.type&&v.push(D),D={type:E,value:_})}for(var T=0;Th){for(A>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:p});b1&&t[0]!==r&&t.unshift("#tmp",r),{tokens:v,state:t.length?t:r}},s}();d.prototype.reportError=o,u.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,u,y){var o=n("../lib/deep_copy").deepCopy,h;h=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(p,e){if(!e){for(var t in p)this.$rules[t]=p[t];return}for(var t in p){for(var r=p[t],l=0;l=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,p=this.$tokenIndex,e=s[p].start;if(e!==void 0)return e;for(e=0;p>0;)p-=1,e+=s[p].value.length;return e},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new o(this.$row,p,this.$row,p+s.value.length)},d}();u.TokenIterator=h}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,u,y){var o=n("../../lib/oop"),h=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,s=n("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],e=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],t,r={},l={'"':'"',"'":"'"},a=function(v){var b=-1;if(v.multiSelect&&(b=v.selection.index,r.rangeCount!=v.multiSelect.rangeCount&&(r={rangeCount:v.multiSelect.rangeCount})),r[b])return t=r[b];t=r[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(v,b,A,D){var E=v.end.row-v.start.row;return{text:A+b+D,selection:[0,v.start.column+1,E,v.end.column+(E?0:1)]}},f;f=function(v){v=v||{},this.add("braces","insertion",function(b,A,D,E,g){var S=D.getCursorPosition(),$=E.doc.getLine(S.row);if(g=="{"){a(D);var _=D.getSelectionRange(),T=E.doc.getTextRange(_),I=E.getTokenAt(S.row,S.column);if(T!==""&&T!=="{"&&D.getWrapBehavioursEnabled())return c(_,T,"{","}");if(I&&/(?:string)\.quasi|\.xml/.test(I.type)){var w=[/tag\-(?:open|name)/,/attribute\-name/];return w.some(function(N){return N.test(I.type)})||/(string)\.quasi/.test(I.type)&&I.value[S.column-I.start-1]!=="$"?void 0:(f.recordAutoInsert(D,E,"}"),{text:"{}",selection:[1,1]})}else if(f.isSaneInsertion(D,E))return/[\]\}\)]/.test($[S.column])||D.inMultiSelectMode||v.braces?(f.recordAutoInsert(D,E,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(D,E,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){a(D);var m=$.substring(S.column,S.column+1);if(m=="}"){var C=E.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(C!==null&&f.isAutoInsertedClosing(S,$,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==` -`||g==`\r -`){a(D);var x="";f.isMaybeInsertedClosing(S,$)&&(x=s.stringRepeat("}",t.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var m=$.substring(S.column,S.column+1);if(m==="}"){var M=E.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!M)return null;var F=this.$getIndent(E.getLine(M.row))}else if(x)var F=this.$getIndent($);else{f.clearMaybeInsertedClosing();return}var R=F+E.getTabString();return{text:` -`+R+` -`+F+x,selection:[1,R.length,1,R.length]}}else f.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,A,D,E,g){var S=E.doc.getTextRange(g);if(!g.isMultiLine()&&S=="{"){a(D);var $=E.doc.getLine(g.start.row),_=$.substring(g.end.column,g.end.column+1);if(_=="}")return g.end.column++,g;t.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,A,D,E,g){if(g=="("){a(D);var S=D.getSelectionRange(),$=E.doc.getTextRange(S);if($!==""&&D.getWrapBehavioursEnabled())return c(S,$,"(",")");if(f.isSaneInsertion(D,E))return f.recordAutoInsert(D,E,")"),{text:"()",selection:[1,1]}}else if(g==")"){a(D);var _=D.getCursorPosition(),T=E.doc.getLine(_.row),I=T.substring(_.column,_.column+1);if(I==")"){var w=E.$findOpeningBracket(")",{column:_.column+1,row:_.row});if(w!==null&&f.isAutoInsertedClosing(_,T,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,A,D,E,g){var S=E.doc.getTextRange(g);if(!g.isMultiLine()&&S=="("){a(D);var $=E.doc.getLine(g.start.row),_=$.substring(g.start.column+1,g.start.column+2);if(_==")")return g.end.column++,g}}),this.add("brackets","insertion",function(b,A,D,E,g){if(g=="["){a(D);var S=D.getSelectionRange(),$=E.doc.getTextRange(S);if($!==""&&D.getWrapBehavioursEnabled())return c(S,$,"[","]");if(f.isSaneInsertion(D,E))return f.recordAutoInsert(D,E,"]"),{text:"[]",selection:[1,1]}}else if(g=="]"){a(D);var _=D.getCursorPosition(),T=E.doc.getLine(_.row),I=T.substring(_.column,_.column+1);if(I=="]"){var w=E.$findOpeningBracket("]",{column:_.column+1,row:_.row});if(w!==null&&f.isAutoInsertedClosing(_,T,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,A,D,E,g){var S=E.doc.getTextRange(g);if(!g.isMultiLine()&&S=="["){a(D);var $=E.doc.getLine(g.start.row),_=$.substring(g.start.column+1,g.start.column+2);if(_=="]")return g.end.column++,g}}),this.add("string_dquotes","insertion",function(b,A,D,E,g){var S=E.$mode.$quotes||l;if(g.length==1&&S[g]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(g)!=-1)return;a(D);var $=g,_=D.getSelectionRange(),T=E.doc.getTextRange(_);if(T!==""&&(T.length!=1||!S[T])&&D.getWrapBehavioursEnabled())return c(_,T,$,$);if(!T){var I=D.getCursorPosition(),w=E.doc.getLine(I.row),m=w.substring(I.column-1,I.column),C=w.substring(I.column,I.column+1),x=E.getTokenAt(I.row,I.column),M=E.getTokenAt(I.row,I.column+1);if(m=="\\"&&x&&/escape/.test(x.type))return null;var F=x&&/string|escape/.test(x.type),R=!M||/string|escape/.test(M.type),N;if(C==$)N=F!==R,N&&/string\.end/.test(M.type)&&(N=!1);else{if(F&&!R||F&&R)return null;var W=E.$mode.tokenRe;W.lastIndex=0;var B=W.test(m);W.lastIndex=0;var V=W.test(C),P=E.$mode.$pairQuotesAfter,z=P&&P[$]&&P[$].test(m);if(!z&&B||V||C&&!/[\s;,.})\]\\]/.test(C))return null;var K=w[I.column-2];if(m==$&&(K==$||W.test(K)))return null;N=!0}return{text:N?$+$:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,A,D,E,g){var S=E.$mode.$quotes||l,$=E.doc.getTextRange(g);if(!g.isMultiLine()&&S.hasOwnProperty($)){a(D);var _=E.doc.getLine(g.start.row),T=_.substring(g.start.column+1,g.start.column+2);if(T==$)return g.end.column++,g}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,A,D,E,g){if(b==="doc-start"&&(g===` -`||g===`\r -`)&&D.selection.isEmpty()){var S=D.getCursorPosition();if(S.column===0)return;for(var $=E.doc.getLine(S.row),_=E.doc.getLine(S.row+1),T=E.getTokens(S.row),I=0,w=0;w=S.column){if(I===S.column){if(!/\.doc/.test(m.type))return;if(/\*\//.test(m.value)){var C=T[w+1];if(!C||!/\.doc/.test(C.type))return}}var x=S.column-(I-m.value.length),M=m.value.indexOf("*/"),F=m.value.indexOf("/**",M>-1?M+2:0);if(F!==-1&&x>F&&x=M&&x<=F||!/\.doc/.test(m.type))return;break}}var R=this.$getIndent($);if(/\s*\*/.test(_))return/^\s*\*/.test($)?{text:g+R+"* ",selection:[1,2+R.length,1,2+R.length]}:{text:g+R+" * ",selection:[1,3+R.length,1,3+R.length]};if(/\/\*\*/.test($.substring(0,S.column)))return{text:g+R+" * "+g+" "+R+"*/",selection:[1,4+R.length,1,4+R.length]}}})},f.isSaneInsertion=function(v,b){var A=v.getCursorPosition(),D=new d(b,A.row,A.column);if(!this.$matchTokenType(D.getCurrentToken()||"text",p)){if(/[)}\]]/.test(v.session.getLine(A.row)[A.column]))return!0;var E=new d(b,A.row,A.column+1);if(!this.$matchTokenType(E.getCurrentToken()||"text",p))return!1}return D.stepForward(),D.getCurrentTokenRow()!==A.row||this.$matchTokenType(D.getCurrentToken()||"text",e)},f.$matchTokenType=function(v,b){return b.indexOf(v.type||v)>-1},f.recordAutoInsert=function(v,b,A){var D=v.getCursorPosition(),E=b.doc.getLine(D.row);this.isAutoInsertedClosing(D,E,t.autoInsertedLineEnd[0])||(t.autoInsertedBrackets=0),t.autoInsertedRow=D.row,t.autoInsertedLineEnd=A+E.substr(D.column),t.autoInsertedBrackets++},f.recordMaybeInsert=function(v,b,A){var D=v.getCursorPosition(),E=b.doc.getLine(D.row);this.isMaybeInsertedClosing(D,E)||(t.maybeInsertedBrackets=0),t.maybeInsertedRow=D.row,t.maybeInsertedLineStart=E.substr(0,D.column)+A,t.maybeInsertedLineEnd=E.substr(D.column),t.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(v,b,A){return t.autoInsertedBrackets>0&&v.row===t.autoInsertedRow&&A===t.autoInsertedLineEnd[0]&&b.substr(v.column)===t.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(v,b){return t.maybeInsertedBrackets>0&&v.row===t.maybeInsertedRow&&b.substr(v.column)===t.maybeInsertedLineEnd&&b.substr(0,v.column)==t.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){t.autoInsertedLineEnd=t.autoInsertedLineEnd.substr(1),t.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){t&&(t.maybeInsertedBrackets=0,t.maybeInsertedRow=-1)},o.inherits(f,h),u.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(n,u,y){for(var o=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],h=0,d=[],s=0;s2?K%g!=g-1:K%g==0}}else{if(!this.blockComment)return!1;var $=this.blockComment.start,_=this.blockComment.end,T=new RegExp("^(\\s*)(?:"+e.escapeRegExp($)+")"),I=new RegExp("(?:"+e.escapeRegExp(_)+")\\s*$"),w=function(N,W){C(N,W)||(!A||/\S/.test(N))&&(b.insertInLine({row:W,column:N.length},_),b.insertInLine({row:W,column:E},$))},m=function(N,W){var B;(B=N.match(I))&&b.removeInLine(W,N.length-B[0].length,N.length),(B=N.match(T))&&b.removeInLine(W,B[1].length,B[0].length)},C=function(N,W){if(T.test(N))return!0;for(var B=c.getTokens(W),V=0;VN.length&&(R=N.length)}),E==1/0&&(E=R,A=!1,D=!1),S&&E%g!=0&&(E=Math.floor(E/g)*g),F(D?m:w)},this.toggleBlockComment=function(a,c,f,v){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var A=new t(c,v.row,v.column),D=A.getCurrentToken();c.selection;var E=c.selection.toOrientedRange(),g,S;if(D&&/comment/.test(D.type)){for(var $,_;D&&/comment/.test(D.type);){var T=D.value.indexOf(b.start);if(T!=-1){var I=A.getCurrentTokenRow(),w=A.getCurrentTokenColumn()+T;$=new r(I,w,I,w+b.start.length);break}D=A.stepBackward()}for(var A=new t(c,v.row,v.column),D=A.getCurrentToken();D&&/comment/.test(D.type);){var T=D.value.indexOf(b.end);if(T!=-1){var I=A.getCurrentTokenRow(),w=A.getCurrentTokenColumn()+T;_=new r(I,w,I,w+b.end.length);break}D=A.stepForward()}_&&c.remove(_),$&&(c.remove($),g=$.start.row,S=-b.start.length)}else S=b.start.length,g=f.start.row,c.insert(f.end,b.end),c.insert(f.start,b.start);E.start.row==g&&(E.start.column+=S),E.end.row==g&&(E.end.column+=S),c.selection.fromOrientedRange(E)}},this.getNextLineIndent=function(a,c,f){return this.$getIndent(c)},this.checkOutdent=function(a,c,f){return!1},this.autoOutdent=function(a,c,f){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var c in a)if(a[c]){var f=a[c],v=f.prototype.$id,b=o.$modes[v];b||(o.$modes[v]=b=new f),o.$modes[c]||(o.$modes[c]=b),this.$embeds.push(c),this.$modes[c]=b}for(var A=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],D=function(g){(function(S){var $=A[g],_=S[$];S[A[g]]=function(){return this.$delegator($,arguments,_)}})(E)},E=this,c=0;cp[e].column&&e++,l.unshift(e,0),p.splice.apply(p,l),this.$updateRows()}}},d.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var p=!0;s.forEach(function(e,t){if(e)for(p=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),p&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[s.row];return p&&(s.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},d.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var p=this.editor.renderer;s.html&&!s.el&&(s.el=o.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=o.createElement("div"),s.el.textContent=s.text),s.el&&(o.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&o.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",p.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/p.layerConfig.lineHeight);var e=this.session.getFoldAt(s.row,0);if(s.$fold=e,e){var t=this.session.lineWidgets;s.row==e.end.row&&!t[e.start.row]?t[e.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(s),s},d.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[s.row];if(p==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;p;){if(p.$oldWidget==s){p.$oldWidget=s.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(s){for(var p=this.session.lineWidgets,e=p&&p[s],t=[];e;)t.push(e),e=e.$oldWidget;return t},d.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(s,p){var e=this.session._changedWidgets,t=p.layerConfig;if(!(!e||!e.length)){for(var r=1/0,l=0;l0&&!t[r];)r--;this.firstRow=e.firstRow,this.lastRow=e.lastRow,p.$cursorLayer.config=e;for(var a=r;a<=l;a++){var c=t[a];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,p.container.appendChild(c.el));var f=p.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;c.coverLine||(f+=e.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=f-e.offset+"px";var v=c.coverGutter?0:p.gutterWidth;c.fixedWidth||(v-=p.scrollLeft),c.el.style.left=v+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=e.width+2*e.padding+"px"),c.fixedWidth?c.el.style.right=p.scrollBar.getWidth()+"px":c.el.style.right=""}}}},d}();u.LineWidgets=h}),ace.define("ace/apply_delta",["require","exports","module"],function(n,u,y){u.applyDelta=function(o,h,d){var s=h.start.row,p=h.start.column,e=o[s]||"";switch(h.action){case"insert":var t=h.lines;if(t.length===1)o[s]=e.substring(0,p)+h.lines[0]+e.substring(p);else{var r=[s,1].concat(h.lines);o.splice.apply(o,r),o[s]=e.substring(0,p)+o[s],o[s+h.lines.length-1]+=e.substring(p)}break;case"remove":var l=h.end.column,a=h.end.row;s===a?o[s]=e.substring(0,p)+e.substring(l):o.splice(s,a-s+1,e.substring(0,p)+o[a].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,u,y){var o=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,d=function(){function e(t,r,l){this.$onChange=this.onChange.bind(this),this.attach(t),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,l)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row)&&!(t.start.row>this.row)){var r=p(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},e.prototype.setPosition=function(t,r,l){var a;if(l?a={row:t,column:r}:a=this.$clipPositionToDocument(t,r),!(this.row==a.row&&this.column==a.column)){var c={row:this.row,column:this.column};this.row=a.row,this.column=a.column,this._signal("change",{old:c,value:a})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(t,r){var l={};return t>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):t<0?(l.row=0,l.column=0):(l.row=t,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,r))),r<0&&(l.column=0),l},e}();d.prototype.$insertRight=!1,o.implement(d.prototype,h);function s(e,t,r){var l=r?e.column<=t.column:e.column=a&&(r=a-1,l=void 0);var c=this.getLine(r);return l==null&&(l=c.length),l=Math.min(Math.max(l,0),c.length),{row:r,column:l}},t.prototype.clonePos=function(r){return{row:r.row,column:r.column}},t.prototype.pos=function(r,l){return{row:r,column:l}},t.prototype.$clipPosition=function(r){var l=this.getLength();return r.row>=l?(r.row=Math.max(0,l-1),r.column=this.getLine(l-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},t.prototype.insertFullLines=function(r,l){r=Math.min(Math.max(r,0),this.getLength());var a=0;r0,c=l=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},t.prototype.replace=function(r,l){if(r instanceof s||(r=s.fromPoints(r.start,r.end)),l.length===0&&r.isEmpty())return r.start;if(l==this.getTextRange(r))return r.end;this.remove(r);var a;return l?a=this.insert(r.start,l):a=r.start,a},t.prototype.applyDeltas=function(r){for(var l=0;l=0;l--)this.revertDelta(r[l])},t.prototype.applyDelta=function(r,l){var a=r.action=="insert";(a?r.lines.length<=1&&!r.lines[0]:!s.comparePoints(r.start,r.end))||(a&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(h(this.$lines,r,l),this._signal("change",r)))},t.prototype.$safeApplyDelta=function(r){var l=this.$lines.length;(r.action=="remove"&&r.start.row20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=l,a==-1&&(a=l),f<=a&&t.fireUpdateEvent(f,a)}}}return s.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(p,e){var t={first:p,last:e};this._signal("update",{data:t})},s.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(p){var e=p.start.row,t=p.end.row-e;if(t===0)this.lines[e]=null;else if(p.action=="remove")this.lines.splice(e,t+1,null),this.states.splice(e,t+1,null);else{var r=Array(t+1);r.unshift(e,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},s.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},s.prototype.$tokenizeRow=function(p){var e=this.doc.getLine(p),t=this.states[p-1],r=this.tokenizer.getLineTokens(e,t,p);return this.states[p]+""!=r.state+""?(this.states[p]=r.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=r.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s}();o.implement(d.prototype,h),u.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,u,y){var o=n("./lib/lang"),h=n("./range").Range,d=function(){function s(p,e,t){t===void 0&&(t="text"),this.setRegexp(p),this.clazz=e,this.type=t,this.docLen=0}return s.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},s.prototype.update=function(p,e,t,r){if(this.regExp){for(var l=r.firstRow,a=r.lastRow,c={},f=t.$editor.$search,v=f.$isMultilineSearch(t.$editor.getLastSearchOptions()),b=l;b<=a;b++){var A=this.cache[b];if(A==null||t.getValue().length!=this.docLen){if(v){A=[];var D=f.$multiLineForward(t,this.regExp,b,a);if(D){var E=D.endRow<=a?D.endRow-1:a;E>b&&(b=E),A.push(new h(D.startRow,D.startCol,D.endRow,D.endCol))}A.length>this.MAX_RANGES&&(A=A.slice(0,this.MAX_RANGES))}else A=o.getMatchOffsets(t.getLine(b),this.regExp),A.length>this.MAX_RANGES&&(A=A.slice(0,this.MAX_RANGES)),A=A.map(function(_){return new h(b,_.offset,b,_.offset+_.length)});this.cache[b]=A.length?A:""}if(A.length!==0)for(var g=A.length;g--;){var S=A[g].toScreenRange(t),$=S.toString();c[$]||(c[$]=!0,e.drawSingleLineMarker(p,S,this.clazz,r))}}this.docLen=t.getValue().length}},s}();d.prototype.MAX_RANGES=500,u.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,u,y){var o=function(){function E(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return E.prototype.addSession=function(g){this.$session=g},E.prototype.add=function(g,S,$){if(!this.$fromUndo&&g!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var _=this.$undoStack.length;_>this.$undoDepth-1&&this.$undoStack.splice(0,_-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),g.id=this.$rev=++this.$maxRev}(g.action=="remove"||g.action=="insert")&&(this.$lastDelta=g),this.lastDeltas.push(g)}},E.prototype.addSelection=function(g,S){this.selections.push({value:g,rev:S||this.$rev})},E.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},E.prototype.markIgnored=function(g,S){S==null&&(S=this.$rev+1);for(var $=this.$undoStack,_=$.length;_--;){var T=$[_][0];if(T.id<=g)break;T.id0},E.prototype.canRedo=function(){return this.$redoStack.length>0},E.prototype.bookmark=function(g){g==null&&(g=this.$rev),this.mark=g},E.prototype.isAtBookmark=function(){return this.$rev===this.mark},E.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},E.prototype.fromJSON=function(g){this.reset(),this.$undoStack=g.$undoStack,this.$redoStack=g.$redoStack},E.prototype.$prettyPrint=function(g){return g?t(g):t(this.$undoStack)+` ---- -`+t(this.$redoStack)},E}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;function h(E,g){for(var S=g;S--;){var $=E[S];if($&&!$[0].ignore){for(;S"+E.end.row+":"+E.end.column}function l(E,g){var S=E.action=="insert",$=g.action=="insert";if(S&&$)if(s(g.start,E.end)>=0)f(g,E,-1);else if(s(g.start,E.start)<=0)f(E,g,1);else return null;else if(S&&!$)if(s(g.start,E.end)>=0)f(g,E,-1);else if(s(g.end,E.start)<=0)f(E,g,-1);else return null;else if(!S&&$)if(s(g.start,E.start)>=0)f(g,E,1);else if(s(g.start,E.start)<=0)f(E,g,1);else return null;else if(!S&&!$)if(s(g.start,E.start)>=0)f(g,E,1);else if(s(g.end,E.start)<=0)f(E,g,-1);else return null;return[g,E]}function a(E,g){for(var S=E.length;S--;)for(var $=0;$=0?f(E,g,-1):(s(E.start,g.start)<=0||f(E,d.fromPoints(g.start,E.start),-1),f(g,E,1));else if(!S&&$)s(g.start,E.end)>=0?f(g,E,-1):(s(g.start,E.start)<=0||f(g,d.fromPoints(E.start,g.start),-1),f(E,g,1));else if(!S&&!$)if(s(g.start,E.end)>=0)f(g,E,-1);else if(s(g.end,E.start)<=0)f(E,g,-1);else{var _,T;return s(E.start,g.start)<0&&(_=E,E=b(E,g.start)),s(E.end,g.end)>0&&(T=b(E,g.end)),v(g.end,E.start,E.end,-1),T&&!_&&(E.lines=T.lines,E.start=T.start,E.end=T.end,T=E),[g,_,T].filter(Boolean)}return[g,E]}function f(E,g,S){v(E.start,g.start,g.end,S),v(E.end,g.start,g.end,S)}function v(E,g,S,$){E.row==($==1?g:S).row&&(E.column+=$*(S.column-g.column)),E.row+=$*(S.row-g.row)}function b(E,g){var S=E.lines,$=E.end;E.end=p(g);var _=E.end.row-E.start.row,T=S.splice(_,S.length),I=_?g.column:g.column-E.start.column;S.push(T[0].substring(0,I)),T[0]=T[0].substr(I);var w={start:p(g),end:$,lines:T,action:E.action};return w}function A(E,g){g=e(g);for(var S=E.length;S--;){for(var $=E[S],_=0;_<$.length;_++){var T=$[_],I=c(T,g);g=I[0],I.length!=2&&(I[2]?($.splice(_+1,1,I[1],I[2]),_++):I[1]||($.splice(_,1),_--))}$.length||E.splice(S,1)}return E}function D(E,g){for(var S=0;Sthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(p,e){return-p.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},d.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},d.prototype.walk=function(s,p,e){var t=0,r=this.folds,l,a,c,f=!0;p==null&&(p=this.end.row,e=this.end.column);for(var v=0;v0)){var f=h(p,a.start);return c===0?e&&f!==0?-l-2:l:f>0||f===0&&!e?l:-l-1}}return-l-1},s.prototype.add=function(p){var e=!p.isEmpty(),t=this.pointIndex(p.start,e);t<0&&(t=-t-1);var r=this.pointIndex(p.end,e,t);return r<0?r=-r-1:r++,this.ranges.splice(t,r-t,p)},s.prototype.addList=function(p){for(var e=[],t=p.length;t--;)e.push.apply(e,this.add(p[t]));return e},s.prototype.substractPoint=function(p){var e=this.pointIndex(p);if(e>=0)return this.ranges.splice(e,1)},s.prototype.merge=function(){var p=[],e=this.ranges;e=e.sort(function(c,f){return h(c.start,f.start)});for(var t=e[0],r,l=1;l=0},s.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},s.prototype.rangeAtPoint=function(p){var e=this.pointIndex(p);if(e>=0)return this.ranges[e]},s.prototype.clipRows=function(p,e){var t=this.ranges;if(t[0].start.row>e||t[t.length-1].start.row=r)break}if(p.action=="insert")for(var b=l-r,A=-e.column+t.column;cr)break;if(v.start.row==r&&v.start.column>=e.column&&(v.start.column==e.column&&this.$bias<=0||(v.start.column+=A,v.start.row+=b)),v.end.row==r&&v.end.column>=e.column){if(v.end.column==e.column&&this.$bias<0)continue;v.end.column==e.column&&A>0&&cv.start.column&&v.end.column==a[c+1].start.column&&(v.end.column-=A),v.end.column+=A,v.end.row+=b}}else for(var b=r-l,A=e.column-t.column;cl)break;v.end.rowe.column)&&(v.end.column=e.column,v.end.row=e.row):(v.end.column+=A,v.end.row+=b):v.end.row>l&&(v.end.row+=b),v.start.rowe.column)&&(v.start.column=e.column,v.start.row=e.row):(v.start.column+=A,v.start.row+=b):v.start.row>l&&(v.start.row+=b)}if(b!=0&&c=t)return c;if(c.end.row>t)return null}return null},this.getNextFoldLine=function(t,r){var l=this.$foldData,a=0;for(r&&(a=l.indexOf(r)),a==-1&&(a=0),a;a=t)return c}return null},this.getFoldedRowCount=function(t,r){for(var l=this.$foldData,a=r-t+1,c=0;c=r){b=t?a-=r-b:a=0);break}else v>=t&&(b>=t?a-=v-b:a-=v-t+1)}return a},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(r,l){return r.start.row-l.start.row}),t},this.addFold=function(t,r){var l=this.$foldData,a=!1,c;t instanceof d?c=t:(c=new d(r,t),c.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(c.range);var f=c.start.row,v=c.start.column,b=c.end.row,A=c.end.column,D=this.getFoldAt(f,v,1),E=this.getFoldAt(b,A,-1);if(D&&E==D)return D.addSubFold(c);D&&!D.range.isStart(f,v)&&this.removeFold(D),E&&!E.range.isEnd(b,A)&&this.removeFold(E);var g=this.getFoldsInRange(c.range);g.length>0&&(this.removeFolds(g),c.collapseChildren||g.forEach(function(T){c.addSubFold(T)}));for(var S=0;S0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(t,r){var l,a;if(t==null)l=new o(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof t=="number")l=new o(t,0,t,this.getLine(t).length);else if("row"in t)l=o.fromPoints(t,t);else{if(Array.isArray(t))return a=[],t.forEach(function(f){a=a.concat(this.unfold(f))},this),a;l=t}a=this.getFoldsInRangeList(l);for(var c=a;a.length==1&&o.comparePoints(a[0].start,l.start)<0&&o.comparePoints(a[0].end,l.end)>0;)this.expandFolds(a),a=this.getFoldsInRangeList(l);if(r!=!1?this.removeFolds(a):this.expandFolds(a),c.length)return c},this.isRowFolded=function(t,r){return!!this.getFoldLine(t,r)},this.getRowFoldEnd=function(t,r){var l=this.getFoldLine(t,r);return l?l.end.row:t},this.getRowFoldStart=function(t,r){var l=this.getFoldLine(t,r);return l?l.start.row:t},this.getFoldDisplayLine=function(t,r,l,a,c){a==null&&(a=t.start.row),c==null&&(c=0),r==null&&(r=t.end.row),l==null&&(l=this.getLine(r).length);var f=this.doc,v="";return t.walk(function(b,A,D,E){if(!(AD)break;while(c&&v.test(c.type));c=a.stepBackward()}else c=a.getCurrentToken();return b.end.row=a.getCurrentTokenRow(),b.end.column=a.getCurrentTokenColumn(),b}},this.foldAll=function(t,r,l,a){l==null&&(l=1e5);var c=this.foldWidgets;if(c){r=r||this.getLength(),t=t||0;for(var f=t;f=t&&(f=v.end.row,v.collapseChildren=l,this.addFold("...",v))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(r){for(var l=t.getTokens(r),a=0;a=0;){var f=l[a];if(f==null&&(f=l[a]=this.getFoldWidget(a)),f=="start"){var v=this.getFoldWidgetRange(a);if(c||(c=v),v&&v.end.row>=t)break}a--}return{range:a!==-1&&v,firstRange:c}},this.onFoldWidgetClick=function(t,r){r instanceof p&&(r=r.domEvent);var l={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},a=this.$toggleFoldWidget(t,l);if(!a){var c=r.target||r.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,r){if(this.getFoldWidget){var l=this.getFoldWidget(t),a=this.getLine(t),c=l==="end"?-1:1,f=this.getFoldAt(t,c===-1?0:a.length,c);if(f)return r.children||r.all?this.removeFold(f):this.expandFold(f),f;var v=this.getFoldWidgetRange(t,!0);if(v&&!v.isMultiLine()&&(f=this.getFoldAt(v.start.row,v.start.column,1),f&&v.isEqual(f.range)))return this.removeFold(f),f;if(r.siblings){var b=this.getParentFoldRangeData(t);if(b.range)var A=b.range.start.row+1,D=b.range.end.row;this.foldAll(A,D,r.all?1e4:0)}else r.children?(D=v?v.end.row:this.getLength(),this.foldAll(t+1,D,r.all?1e4:0)):v&&(r.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(t){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var l=this.$toggleFoldWidget(r,{});if(!l){var a=this.getParentFoldRangeData(r,!0);if(l=a.range||a.firstRange,l){r=l.start.row;var c=this.getFoldAt(r,this.getLine(r).length,1);c?this.removeFold(c):this.addFold("...",l)}}},this.updateFoldWidgets=function(t){var r=t.start.row,l=t.end.row-r;if(l===0)this.foldWidgets[r]=null;else if(t.action=="remove")this.foldWidgets.splice(r,l+1,null);else{var a=Array(l+1);a.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,a)}},this.tokenizerUpdateFoldWidgets=function(t){var r=t.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}u.Folding=e}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,u,y){var o=n("../token_iterator").TokenIterator,h=n("../range").Range;function d(){this.findMatchingBracket=function(s,p){if(s.column==0)return null;var e=p||this.getLine(s.row).charAt(s.column-1);if(e=="")return null;var t=e.match(/([\(\[\{])|([\)\]\}])/);return t?t[1]?this.$findClosingBracket(t[1],s):this.$findOpeningBracket(t[2],s):null},this.getBracketRange=function(s){var p=this.getLine(s.row),e=!0,t,r=p.charAt(s.column-1),l=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(l||(r=p.charAt(s.column),s={row:s.row,column:s.column+1},l=r&&r.match(/([\(\[\{])|([\)\]\}])/),e=!1),!l)return null;if(l[1]){var a=this.$findClosingBracket(l[1],s);if(!a)return null;t=h.fromPoints(s,a),e||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a=this.$findOpeningBracket(l[2],s);if(!a)return null;t=h.fromPoints(a,s),e||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(s,p){var e=this.getLine(s.row),t=/([\(\[\{])|([\)\]\}])/,r=!p&&e.charAt(s.column-1),l=r&&r.match(t);if(l||(r=(p===void 0||p)&&e.charAt(s.column),s={row:s.row,column:s.column+1},l=r&&r.match(t)),!l)return null;var a=new h(s.row,s.column-1,s.row,s.column),c=l[1]?this.$findClosingBracket(l[1],s):this.$findOpeningBracket(l[2],s);if(!c)return[a];var f=new h(c.row,c.column,c.row,c.column+1);return[a,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,p,e){var t=this.$brackets[s],r=1,l=new o(this,p.row,p.column),a=l.getCurrentToken();if(a||(a=l.stepForward()),!!a){e||(e=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=p.column-l.getCurrentTokenColumn()-2,f=a.value;;){for(;c>=0;){var v=f.charAt(c);if(v==t){if(r-=1,r==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else v==s&&(r+=1);c-=1}do a=l.stepBackward();while(a&&!e.test(a.type));if(a==null)break;f=a.value,c=f.length-1}return null}},this.$findClosingBracket=function(s,p,e){var t=this.$brackets[s],r=1,l=new o(this,p.row,p.column),a=l.getCurrentToken();if(a||(a=l.stepForward()),!!a){e||(e=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=p.column-l.getCurrentTokenColumn();;){for(var f=a.value,v=f.length;c"?t=!0:p.type.indexOf("tag-name")!==-1&&(e=!0));while(p&&!e);return p},this.$findClosingTag=function(s,p){var e,t=p.value,r=p.value,l=0,a=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);p=s.stepForward();var c=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length),f=!1;do{if(e=p,e.type.indexOf("tag-close")!==-1&&!f){var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);f=!0}if(p=s.stepForward(),p){if(p.value===">"&&!f){var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);f=!0}if(p.type.indexOf("tag-name")!==-1){if(t=p.value,r===t){if(e.value==="<")l++;else if(e.value==="")var D=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(r===t&&p.value==="/>"&&(l--,l<0))var b=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),A=b,D=A,v=new h(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(p&&l>=0);if(a&&v&&b&&D&&c&&A)return{openTag:new h(a.start.row,a.start.column,v.end.row,v.end.column),closeTag:new h(b.start.row,b.start.column,D.end.row,D.end.column),openTagName:c,closeTagName:A}},this.$findOpeningTag=function(s,p){var e=s.getCurrentToken(),t=p.value,r=0,l=s.getCurrentTokenRow(),a=s.getCurrentTokenColumn(),c=a+2,f=new h(l,a,l,c);s.stepForward();var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=s.stepForward()),!(!p||p.value!==">")){var b=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(p=e,l=s.getCurrentTokenRow(),a=s.getCurrentTokenColumn(),c=a+p.value.length,e=s.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(t===p.value)if(e.value==="<"){if(r++,r>0){var A=new h(l,a,l,c),D=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do p=s.stepForward();while(p&&p.value!==">");var E=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else e.value===""){for(var g=0,S=e;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===t){r--;break}else if(S.value==="<")break;S=s.stepBackward(),g++}for(var $=0;$x&&(this.$docRowCache.splice(x,C),this.$screenRowCache.splice(x,C))},w.prototype.$getRowCacheIndex=function(m,C){for(var x=0,M=m.length-1;x<=M;){var F=x+M>>1,R=m[F];if(C>R)x=F+1;else if(C=C));R++);return M=x[R],M?(M.index=R,M.start=F-M.value.length,M):null},w.prototype.setUndoManager=function(m){if(this.$undoManager=m,this.$informUndoManager&&this.$informUndoManager.cancel(),m){var C=this;m.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=h.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},w.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},w.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},w.prototype.getTabString=function(){return this.getUseSoftTabs()?h.stringRepeat(" ",this.getTabSize()):" "},w.prototype.setUseSoftTabs=function(m){this.setOption("useSoftTabs",m)},w.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},w.prototype.setTabSize=function(m){this.setOption("tabSize",m)},w.prototype.getTabSize=function(){return this.$tabSize},w.prototype.isTabStop=function(m){return this.$useSoftTabs&&m.column%this.$tabSize===0},w.prototype.setNavigateWithinSoftTabs=function(m){this.setOption("navigateWithinSoftTabs",m)},w.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},w.prototype.setOverwrite=function(m){this.setOption("overwrite",m)},w.prototype.getOverwrite=function(){return this.$overwrite},w.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},w.prototype.addGutterDecoration=function(m,C){this.$decorations[m]||(this.$decorations[m]=""),this.$decorations[m]+=" "+C,this._signal("changeBreakpoint",{})},w.prototype.removeGutterDecoration=function(m,C){this.$decorations[m]=(this.$decorations[m]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},w.prototype.getBreakpoints=function(){return this.$breakpoints},w.prototype.setBreakpoints=function(m){this.$breakpoints=[];for(var C=0;C0&&(M=!!x.charAt(C-1).match(this.tokenRe)),M||(M=!!x.charAt(C).match(this.tokenRe)),M)var F=this.tokenRe;else if(/^\s+$/.test(x.slice(C-1,C+1)))var F=/\s/;else var F=this.nonTokenRe;var R=C;if(R>0){do R--;while(R>=0&&x.charAt(R).match(F));R++}for(var N=C;Nm&&(m=C.screenWidth)}),this.lineWidgetWidth=m},w.prototype.$computeWidth=function(m){if(this.$modified||m){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),x=this.$rowLengthCache,M=0,F=0,R=this.$foldData[F],N=R?R.start.row:1/0,W=C.length,B=0;BN){if(B=R.end.row+1,B>=W)break;R=this.$foldData[F++],N=R?R.start.row:1/0}x[B]==null&&(x[B]=this.$getStringScreenWidth(C[B])[0]),x[B]>M&&(M=x[B])}this.screenWidth=M}},w.prototype.getLine=function(m){return this.doc.getLine(m)},w.prototype.getLines=function(m,C){return this.doc.getLines(m,C)},w.prototype.getLength=function(){return this.doc.getLength()},w.prototype.getTextRange=function(m){return this.doc.getTextRange(m||this.selection.getRange())},w.prototype.insert=function(m,C){return this.doc.insert(m,C)},w.prototype.remove=function(m){return this.doc.remove(m)},w.prototype.removeFullLines=function(m,C){return this.doc.removeFullLines(m,C)},w.prototype.undoChanges=function(m,C){if(m.length){this.$fromUndo=!0;for(var x=m.length-1;x!=-1;x--){var M=m[x];M.action=="insert"||M.action=="remove"?this.doc.revertDelta(M):M.folds&&this.addFolds(M.folds)}!C&&this.$undoSelect&&(m.selectionBefore?this.selection.fromJSON(m.selectionBefore):this.selection.setRange(this.$getUndoSelection(m,!0))),this.$fromUndo=!1}},w.prototype.redoChanges=function(m,C){if(m.length){this.$fromUndo=!0;for(var x=0;xm.end.column&&(R.start.column+=W),R.end.row==m.end.row&&R.end.column>m.end.column&&(R.end.column+=W)),N&&R.start.row>=m.end.row&&(R.start.row+=N,R.end.row+=N)}if(R.end=this.insert(R.start,M),F.length){var B=m.start,V=R.start,N=V.row-B.row,W=V.column-B.column;this.addFolds(F.map(function(K){return K=K.clone(),K.start.row==B.row&&(K.start.column+=W),K.end.row==B.row&&(K.end.column+=W),K.start.row+=N,K.end.row+=N,K}))}return R},w.prototype.indentRows=function(m,C,x){x=x.replace(/\t/g,this.getTabString());for(var M=m;M<=C;M++)this.doc.insertInLine({row:M,column:0},x)},w.prototype.outdentRows=function(m){for(var C=m.collapseRows(),x=new r(0,0,0,0),M=this.getTabSize(),F=C.start.row;F<=C.end.row;++F){var R=this.getLine(F);x.start.row=F,x.end.row=F;for(var N=0;N0){var M=this.getRowFoldEnd(C+x);if(M>this.doc.getLength()-1)return 0;var F=M-C}else{m=this.$clipRowToDocument(m),C=this.$clipRowToDocument(C);var F=C-m+1}var R=new r(m,0,C,Number.MAX_VALUE),N=this.getFoldsInRange(R).map(function(B){return B=B.clone(),B.start.row+=F,B.end.row+=F,B}),W=x==0?this.doc.getLines(m,C):this.doc.removeFullLines(m,C);return this.doc.insertFullLines(m+F,W),N.length&&this.addFolds(N),F},w.prototype.moveLinesUp=function(m,C){return this.$moveLines(m,C,-1)},w.prototype.moveLinesDown=function(m,C){return this.$moveLines(m,C,1)},w.prototype.duplicateLines=function(m,C){return this.$moveLines(m,C,0)},w.prototype.$clipRowToDocument=function(m){return Math.max(0,Math.min(m,this.doc.getLength()-1))},w.prototype.$clipColumnToRow=function(m,C){return C<0?0:Math.min(this.doc.getLine(m).length,C)},w.prototype.$clipPositionToDocument=function(m,C){if(C=Math.max(0,C),m<0)m=0,C=0;else{var x=this.doc.getLength();m>=x?(m=x-1,C=this.doc.getLine(x-1).length):C=Math.min(this.doc.getLine(m).length,C)}return{row:m,column:C}},w.prototype.$clipRangeToDocument=function(m){m.start.row<0?(m.start.row=0,m.start.column=0):m.start.column=this.$clipColumnToRow(m.start.row,m.start.column);var C=this.doc.getLength()-1;return m.end.row>C?(m.end.row=C,m.end.column=this.doc.getLine(C).length):m.end.column=this.$clipColumnToRow(m.end.row,m.end.column),m},w.prototype.setUseWrapMode=function(m){if(m!=this.$useWrapMode){if(this.$useWrapMode=m,this.$modified=!0,this.$resetRowCache(0),m){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},w.prototype.getUseWrapMode=function(){return this.$useWrapMode},w.prototype.setWrapLimitRange=function(m,C){(this.$wrapLimitRange.min!==m||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:m,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},w.prototype.adjustWrapLimit=function(m,C){var x=this.$wrapLimitRange;x.max<0&&(x={min:C,max:C});var M=this.$constrainWrapLimit(m,x.min,x.max);return M!=this.$wrapLimit&&M>1?(this.$wrapLimit=M,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},w.prototype.$constrainWrapLimit=function(m,C,x){return C&&(m=Math.max(C,m)),x&&(m=Math.min(x,m)),m},w.prototype.getWrapLimit=function(){return this.$wrapLimit},w.prototype.setWrapLimit=function(m){this.setWrapLimitRange(m,m)},w.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},w.prototype.$updateInternalDataOnChange=function(m){var C=this.$useWrapMode,x=m.action,M=m.start,F=m.end,R=M.row,N=F.row,W=N-R,B=null;if(this.$updating=!0,W!=0)if(x==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(R,W);var V=this.$foldData;B=this.getFoldsInRange(m),this.removeFolds(B);var P=this.getFoldLine(F.row),z=0;if(P){P.addRemoveChars(F.row,F.column,M.column-F.column),P.shiftRow(-W);var K=this.getFoldLine(R);K&&K!==P&&(K.merge(P),P=K),z=V.indexOf(P)+1}for(z;z=F.row&&P.shiftRow(-W)}N=R}else{var U=Array(W);U.unshift(R,0);var Y=C?this.$wrapData:this.$rowLengthCache;Y.splice.apply(Y,U);var V=this.$foldData,P=this.getFoldLine(R),z=0;if(P){var ee=P.range.compareInside(M.row,M.column);ee==0?(P=P.split(M.row,M.column),P&&(P.shiftRow(W),P.addRemoveChars(N,0,F.column-M.column))):ee==-1&&(P.addRemoveChars(R,0,F.column-M.column),P.shiftRow(W)),z=V.indexOf(P)+1}for(z;z=R&&P.shiftRow(W)}}else{W=Math.abs(m.start.column-m.end.column),x==="remove"&&(B=this.getFoldsInRange(m),this.removeFolds(B),W=-W);var P=this.getFoldLine(R);P&&P.addRemoveChars(R,M.column,W)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(R,N):this.$updateRowLengthCache(R,N),B},w.prototype.$updateRowLengthCache=function(m,C){this.$rowLengthCache[m]=null,this.$rowLengthCache[C]=null},w.prototype.$updateWrapData=function(m,C){var x=this.doc.getAllLines(),M=this.getTabSize(),F=this.$wrapData,R=this.$wrapLimit,N,W,B=m;for(C=Math.min(C,x.length-1);B<=C;)W=this.getFoldLine(B,W),W?(N=[],W.walk(function(V,P,z,K){var U;if(V!=null){U=this.$getDisplayTokens(V,N.length),U[0]=E;for(var Y=1;YC-K;){var U=R+C-K;if(m[U-1]>=$&&m[U]>=$){z(U);continue}if(m[U]==E||m[U]==g){for(U;U!=R-1&&m[U]!=E;U--);if(U>R){z(U);continue}for(U=R+C,U;U>2)),R-1);U>Y&&m[U]Y&&m[U]Y&&m[U]==S;)U--}else for(;U>Y&&m[U]<$;)U--;if(U>Y){z(++U);continue}U=R+C,m[U]==D&&U--,z(U-K)}return M},w.prototype.$getDisplayTokens=function(m,C){var x=[],M;C=C||0;for(var F=0;F39&&R<48||R>57&&R<64?x.push(S):R>=4352&&I(R)?x.push(A,D):x.push(A)}return x},w.prototype.$getStringScreenWidth=function(m,C,x){if(C==0)return[0,0];C==null&&(C=1/0),x=x||0;var M,F;for(F=0;F=4352&&I(M)?x+=2:x+=1,!(x>C));F++);return[x,F]},w.prototype.getRowLength=function(m){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[m]&&this.lineWidgets[m].rowCount||0),!this.$useWrapMode||!this.$wrapData[m]?C:this.$wrapData[m].length+C},w.prototype.getRowLineCount=function(m){return!this.$useWrapMode||!this.$wrapData[m]?1:this.$wrapData[m].length+1},w.prototype.getRowWrapIndent=function(m){if(this.$useWrapMode){var C=this.screenToDocumentPosition(m,Number.MAX_VALUE),x=this.$wrapData[C.row];return x.length&&x[0]=0)var W=V[P],F=this.$docRowCache[P],K=m>V[z-1];else var K=!z;for(var U=this.getLength()-1,Y=this.getNextFoldLine(F),ee=Y?Y.start.row:1/0;W<=m&&(B=this.getRowLength(F),!(W+B>m||F>=U));)W+=B,F++,F>ee&&(F=Y.end.row+1,Y=this.getNextFoldLine(F,Y),ee=Y?Y.start.row:1/0),K&&(this.$docRowCache.push(F),this.$screenRowCache.push(W));if(Y&&Y.start.row<=F)M=this.getFoldDisplayLine(Y),F=Y.start.row;else{if(W+B<=m||F>U)return{row:U,column:this.getLine(U).length};M=this.getLine(F),Y=null}var ne=0,te=Math.floor(m-W);if(this.$useWrapMode){var se=this.$wrapData[F];se&&(N=se[te],te>0&&se.length&&(ne=se.indent,R=se[te-1]||se[se.length-1],M=M.substring(R)))}return x!==void 0&&this.$bidiHandler.isBidiRow(W+te,F,te)&&(C=this.$bidiHandler.offsetToCol(x)),R+=this.$getStringScreenWidth(M,C-ne)[1],this.$useWrapMode&&R>=N&&(R=N-1),Y?Y.idxToPosition(R):{row:F,column:R}},w.prototype.documentToScreenPosition=function(m,C){if(typeof C>"u")var x=this.$clipPositionToDocument(m.row,m.column);else x=this.$clipPositionToDocument(m,C);m=x.row,C=x.column;var M=0,F=null,R=null;R=this.getFoldAt(m,C,1),R&&(m=R.start.row,C=R.start.column);var N,W=0,B=this.$docRowCache,V=this.$getRowCacheIndex(B,m),P=B.length;if(P&&V>=0)var W=B[V],M=this.$screenRowCache[V],z=m>B[P-1];else var z=!P;for(var K=this.getNextFoldLine(W),U=K?K.start.row:1/0;W=U){if(N=K.end.row+1,N>m)break;K=this.getNextFoldLine(N,K),U=K?K.start.row:1/0}else N=W+1;M+=this.getRowLength(W),W=N,z&&(this.$docRowCache.push(W),this.$screenRowCache.push(M))}var Y="";K&&W>=U?(Y=this.getFoldDisplayLine(K,m,C),F=K.start.row):(Y=this.getLine(m).substring(0,C),F=m);var ee=0;if(this.$useWrapMode){var ne=this.$wrapData[F];if(ne){for(var te=0;Y.length>=ne[te];)M++,te++;Y=Y.substring(ne[te-1]||0,Y.length),ee=te>0?ne.indent:0}}return this.lineWidgets&&this.lineWidgets[W]&&this.lineWidgets[W].rowsAbove&&(M+=this.lineWidgets[W].rowsAbove),{row:M,column:ee+this.$getStringScreenWidth(Y)[0]}},w.prototype.documentToScreenColumn=function(m,C){return this.documentToScreenPosition(m,C).column},w.prototype.documentToScreenRow=function(m,C){return this.documentToScreenPosition(m,C).row},w.prototype.getScreenLength=function(){var m=0,C=null;if(this.$useWrapMode)for(var F=this.$wrapData.length,R=0,M=0,C=this.$foldData[M++],N=C?C.start.row:1/0;RN&&(R=C.end.row+1,C=this.$foldData[M++],N=C?C.start.row:1/0)}else{m=this.getLength();for(var x=this.$foldData,M=0;Mx));R++);return[M,R]})},w.prototype.getPrecedingCharacter=function(){var m=this.selection.getCursor();if(m.column===0)return m.row===0?"":this.doc.getNewLineCharacter();var C=this.getLine(m.row);return C[m.column-1]},w.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},w}();b.$uid=0,b.prototype.$modes=s.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=I,o.implement(b.prototype,p);var A=1,D=2,E=3,g=4,S=9,$=10,_=11,T=12;function I(w){return w<4352?!1:w>=4352&&w<=4447||w>=4515&&w<=4519||w>=4602&&w<=4607||w>=9001&&w<=9002||w>=11904&&w<=11929||w>=11931&&w<=12019||w>=12032&&w<=12245||w>=12272&&w<=12283||w>=12288&&w<=12350||w>=12353&&w<=12438||w>=12441&&w<=12543||w>=12549&&w<=12589||w>=12593&&w<=12686||w>=12688&&w<=12730||w>=12736&&w<=12771||w>=12784&&w<=12830||w>=12832&&w<=12871||w>=12880&&w<=13054||w>=13056&&w<=19903||w>=19968&&w<=42124||w>=42128&&w<=42182||w>=43360&&w<=43388||w>=44032&&w<=55203||w>=55216&&w<=55238||w>=55243&&w<=55291||w>=63744&&w<=64255||w>=65040&&w<=65049||w>=65072&&w<=65106||w>=65108&&w<=65126||w>=65128&&w<=65131||w>=65281&&w<=65376||w>=65504&&w<=65510}n("./edit_session/folding").Folding.call(b.prototype),n("./edit_session/bracket_match").BracketMatch.call(b.prototype),s.defineOptions(b.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var m=typeof w=="number"?w:null;this.setWrapLimitRange(m,m),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),u.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,u,y){var o=n("./lib/lang"),h=n("./lib/oop"),d=n("./range").Range,s=function(){function r(){this.$options={}}return r.prototype.set=function(l){return h.mixin(this.$options,l),this},r.prototype.getOptions=function(){return o.copyObject(this.$options)},r.prototype.setOptions=function(l){this.$options=l},r.prototype.find=function(l){var a=this.$options,c=this.$matchIterator(l,a);if(!c)return!1;var f=null;return c.forEach(function(v,b,A,D){return f=new d(v,b,A,D),b==D&&a.start&&a.start.start&&a.skipCurrent!=!1&&f.isEqual(a.start)?(f=null,!1):!0}),f},r.prototype.findAll=function(l){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var c=a.range,f=c?l.getLines(c.start.row,c.end.row):l.doc.getAllLines(),v=[],b=a.re;if(a.$isMultiLine){var A=b.length,D=f.length-A,E;e:for(var g=b.offset||0;g<=D;g++){for(var S=0;ST||(v.push(E=new d(g,T,g+A-1,I)),A>2&&(g=g+A-2))}}else for(var w,m=0;mm&&(m=x),v.push(new d(w.startRow,w.startCol,w.endRow,w.endCol))}}else{w=o.getMatchOffsets(f[m],b);for(var S=0;SR&&v[S].end.row==N;)S--;for(v=v.slice(m,S+1),m=0,S=v.length;m=v){c+="\\";break}var A=l.charCodeAt(f);switch(A){case a.Backslash:c+="\\";break;case a.n:c+=` -`;break;case a.t:c+=" ";break}continue}if(b===a.DollarSign){if(f++,f>=v){c+="$";break}var D=l.charCodeAt(f);if(D===a.DollarSign){c+="$$";continue}if(D===a.Digit0||D===a.Ampersand){c+="$&";continue}if(a.Digit1<=D&&D<=a.Digit9){c+="$"+l[f];continue}}c+=l[f]}return c||l},r.prototype.replace=function(l,a){var c=this.$options,f=this.$assembleRegExp(c);if(c.$isMultiLine)return a;if(f){var v=this.$isMultilineSearch(c);v&&(l=l.replace(/\r\n|\r|\n/g,` -`));var b=f.exec(l);if(!b||!v&&b[0].length!=l.length)return null;if(a=c.regExp?this.parseReplaceString(a):a.replace(/\$/g,"$$$$"),a=l.replace(f,a),c.preserveCase){a=a.split("");for(var A=Math.min(l.length,l.length);A--;){var D=l[A];D&&D.toLowerCase()!=D?a[A]=a[A].toUpperCase():a[A]=a[A].toLowerCase()}a=a.join("")}return a}},r.prototype.$assembleRegExp=function(l,a){if(l.needle instanceof RegExp)return l.re=l.needle;var c=l.needle;if(!l.needle)return l.re=!1;l.regExp||(c=o.escapeRegExp(c));var f=l.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),l.$supportsUnicodeFlag=!0,f+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(c=p(c,l)),l.$isMultiLine=!a&&/[\n\r]/.test(c),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(c,f);try{var v=new RegExp(c,f)}catch{v=!1}return l.re=v},r.prototype.$assembleMultilineRegExp=function(l,a){for(var c=l.replace(/\r\n|\r|\n/g,`$ -^`).split(` -`),f=[],v=0;vf);D++){var E=l.getLine(A++);v=v==null?E:v+` -`+E}var g=a.exec(v);if(a.lastIndex=0,g){var S=v.slice(0,g.index).split(` -`),$=g[0].split(` -`),_=c+S.length-1,T=S[S.length-1].length,I=_+$.length-1,w=$.length==1?T+$[0].length:$[$.length-1].length;return{startRow:_,startCol:T,endRow:I,endCol:w}}}return null},r.prototype.$multiLineBackward=function(l,a,c,f,v){for(var b,A=t(l,f),D=l.getLine(f).length-c,E=f;E>=v;){for(var g=0;g=v;g++){var S=l.getLine(E--);b=b==null?S:S+` -`+b}var $=e(b,a,D);if($){var _=b.slice(0,$.index).split(` -`),T=$[0].split(` -`),I=E+_.length,w=_[_.length-1].length,m=I+T.length-1,C=T.length==1?w+T[0].length:T[T.length-1].length;return{startRow:I,startCol:w,endRow:m,endCol:C}}}return null},r.prototype.$matchIterator=function(l,a){var c=this.$assembleRegExp(a);if(!c)return!1;var f=this.$isMultilineSearch(a),v=this.$multiLineForward,b=this.$multiLineBackward,A=a.backwards==!0,D=a.skipCurrent!=!1,E=c.unicode,g=a.range,S=a.start;S||(S=g?g[A?"end":"start"]:l.selection.getRange()),S.start&&(S=S[D!=A?"end":"start"]);var $=g?g.start.row:0,_=g?g.end.row:l.getLength()-1;if(A)var T=function(m){var C=S.row;if(!w(C,S.column,m)){for(C--;C>=$;C--)if(w(C,Number.MAX_VALUE,m))return;if(a.wrap!=!1){for(C=_,$=S.row;C>=$;C--)if(w(C,Number.MAX_VALUE,m))return}}};else var T=function(C){var x=S.row;if(!w(x,S.column,C)){for(x=x+1;x<=_;x++)if(w(x,0,C))return;if(a.wrap!=!1){for(x=$,_=S.row;x<=_;x++)if(w(x,0,C))return}}};if(a.$isMultiLine)var I=c.length,w=function(m,C,x){var M=A?m-I+1:m;if(!(M<0||M+I>l.getLength())){var F=l.getLine(M),R=F.search(c[0]);if(!(!A&&RC)&&x(M,R,M+I-1,W))return!0}}};else if(A)var w=function(C,x,M){if(f){var F=b(l,c,x,C,$);if(!F)return!1;if(M(F.startRow,F.startCol,F.endRow,F.endCol))return!0}else{var R=l.getLine(C),N=[],W,B=0;for(c.lastIndex=0;W=c.exec(R);){var V=W[0].length;if(B=W.index,!V){if(B>=R.length)break;c.lastIndex=B+=o.skipEmptyMatch(R,B,E)}if(W.index+V>x)break;N.push(W.index,V)}for(var P=N.length-1;P>=0;P-=2){var z=N[P-1],V=N[P];if(M(C,z,C,z+V))return!0}}};else var w=function(C,x,M){if(c.lastIndex=x,f){var F=v(l,c,C,_);if(F){var R=F.endRow<=_?F.endRow-1:_;R>C&&(C=R)}if(!F)return!1;if(M(F.startRow,F.startCol,F.endRow,F.endCol))return!0}else for(var N=l.getLine(C),W,B;B=c.exec(N);){var V=B[0].length;if(W=B.index,M(C,W,C,W+V))return!0;if(!V&&(c.lastIndex=W+=o.skipEmptyMatch(N,W,E),W>=N.length))return!1}};return{forEach:T}},r}();function p(r,l){var a=o.supportsLookbehind();function c(A,D){D===void 0&&(D=!0);var E=a&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(A)||l.regExp?a&&l.$supportsUnicodeFlag?D?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(r),v=f[0],b=f[f.length-1];return c(v)+r+c(b,!1)}function e(r,l,a){for(var c=null,f=0;f<=r.length;){l.lastIndex=f;var v=l.exec(r);if(!v)break;var b=v.index+v[0].length;if(b>r.length-a)break;(!c||b>c.index+c[0].length)&&(c=v),f=v.index+1}return c}function t(r,l){var a=5e3,c={row:l,column:0},f=r.doc.positionToIndex(c),v=f+a,b=r.doc.indexToPosition(v),A=b.row;return A+1}u.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,u,y){var o=this&&this.__extends||function(){var r=function(l,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&(c[v]=f[v])},r(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");r(l,a);function c(){this.constructor=l}l.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),h=n("../lib/keys"),d=n("../lib/useragent"),s=h.KEY_MODS,p=function(){function r(l,a){this.$init(l,a,!1)}return r.prototype.$init=function(l,a,c){this.platform=a||(d.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=c},r.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},r.prototype.removeCommand=function(l,a){var c=l&&(typeof l=="string"?l:l.name);l=this.commands[c],a||delete this.commands[c];var f=this.commandKeyBinding;for(var v in f){var b=f[v];if(b==l)delete f[v];else if(Array.isArray(b)){var A=b.indexOf(l);A!=-1&&(b.splice(A,1),b.length==1&&(f[v]=b[0]))}}},r.prototype.bindKey=function(l,a,c){if(typeof l=="object"&&l&&(c==null&&(c=l.position),l=l[this.platform]),!!l){if(typeof a=="function")return this.addCommand({exec:a,bindKey:l,name:a.name||l});l.split("|").forEach(function(f){var v="";if(f.indexOf(" ")!=-1){var b=f.split(/\s+/);f=b.pop(),b.forEach(function(E){var g=this.parseKeys(E),S=s[g.hashId]+g.key;v+=(v?" ":"")+S,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var A=this.parseKeys(f),D=s[A.hashId]+A.key;this._addCommandToBinding(v+D,a,c)},this)}},r.prototype._addCommandToBinding=function(l,a,c){var f=this.commandKeyBinding,v;if(!a)delete f[l];else if(!f[l]||this.$singleCommand)f[l]=a;else{Array.isArray(f[l])?(v=f[l].indexOf(a))!=-1&&f[l].splice(v,1):f[l]=[f[l]],typeof c!="number"&&(c=e(a));var b=f[l];for(v=0;vc)break}b.splice(v,0,a)}},r.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(a){var c=l[a];if(c){if(typeof c=="string")return this.bindKey(c,a);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=a),this.addCommand(c))}},this)},r.prototype.removeCommands=function(l){Object.keys(l).forEach(function(a){this.removeCommand(l[a])},this)},r.prototype.bindKeys=function(l){Object.keys(l).forEach(function(a){this.bindKey(a,l[a])},this)},r.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},r.prototype.parseKeys=function(l){var a=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),c=a.pop(),f=h[c];if(h.FUNCTION_KEYS[f])c=h.FUNCTION_KEYS[f].toLowerCase();else if(a.length){if(a.length==1&&a[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var v=0,b=a.length;b--;){var A=h.KEY_MODS[a[b]];if(A==null)return typeof console<"u"&&console.error("invalid modifier "+a[b]+" in "+l),!1;v|=A}return{key:c,hashId:v}},r.prototype.findKeyCommand=function(l,a){var c=s[l]+a;return this.commandKeyBinding[c]},r.prototype.handleKeyboard=function(l,a,c,f){if(!(f<0)){var v=s[a]+c,b=this.commandKeyBinding[v];return l.$keyChain&&(l.$keyChain+=" "+v,b=this.commandKeyBinding[l.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||v,{command:"null"}):(l.$keyChain&&((!a||a==4)&&c.length==1?l.$keyChain=l.$keyChain.slice(0,-v.length-1):(a==-1||f>0)&&(l.$keyChain="")),{command:b})}},r.prototype.getStatusText=function(l,a){return a.$keyChain||""},r}();function e(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var t=function(r){o(l,r);function l(a,c){var f=r.call(this,a,c)||this;return f.$singleCommand=!0,f}return l}(p);t.call=function(r,l,a){p.prototype.$init.call(r,l,a,!0)},p.call=function(r,l,a){p.prototype.$init.call(r,l,a,!1)},u.HashHandler=t,u.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,u,y){var o=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(l[c]=a[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function l(){this.constructor=t}t.prototype=r===null?Object.create(r):(l.prototype=r.prototype,new l)}}(),h=n("../lib/oop"),d=n("../keyboard/hash_handler").MultiHashHandler,s=n("../lib/event_emitter").EventEmitter,p=function(e){o(t,e);function t(r,l){var a=e.call(this,l,r)||this;return a.byName=a.commands,a.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),a}return t.prototype.exec=function(r,l,a){if(Array.isArray(r)){for(var c=r.length;c--;)if(this.exec(r[c],l,a))return!0;return!1}if(typeof r=="string"&&(r=this.commands[r]),!this.canExecute(r,l))return!1;var f={editor:l,command:r,args:a};return f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1},t.prototype.canExecute=function(r,l){return typeof r=="string"&&(r=this.commands[r]),!(!r||l&&l.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(l))},t.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(l){this.macro.push([l.command,l.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,r):this.exec(l[0],r,l[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(r){return r.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},t}(d);h.implement(p.prototype,s),u.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,u,y){var o=n("../lib/lang"),h=n("../config"),d=n("../range").Range;function s(e,t){return{win:e,mac:t}}u.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){h.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){h.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){h.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){typeof t=="number"&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){h.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),r=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",r),r.isEmpty()||e.session.remove(r),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){h.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(e.selection.isEmpty())e.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),r=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),l=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(r.row).length,c=e.session.doc.getTextRange(e.selection.getRange()),f=c.replace(/\n\s*/," ").length,v=e.session.doc.getLine(r.row),b=r.row+1;b<=l.row+1;b++){var A=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(b)));A.length!==0&&(A=" "+A),v+=A}l.row+10?(e.selection.moveCursorTo(r.row,r.column),e.selection.selectTo(r.row,r.column+f)):(a=e.session.doc.getLine(r.row).length>a?a+1:a,e.selection.moveCursorTo(r.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,r=e.session.doc.getLine(t).length,l=e.selection.rangeList.ranges,a=[];l.length<1&&(l=[e.selection.getRange()]);for(var c=0;c0||e+t=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},p.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},p.prototype.$focusFoldWidget=function(e){if(e!=null){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},p.prototype.$focusAnnotation=function(e){if(e!=null){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},p.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},p.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=w.length&&(w=void 0),{value:w&&w[x++],done:!w}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},h=n("./lib/oop"),d=n("./lib/dom"),s=n("./lib/lang"),p=n("./lib/useragent"),e=n("./keyboard/textinput").TextInput,t=n("./mouse/mouse_handler").MouseHandler,r=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,a=n("./edit_session").EditSession,c=n("./search").Search,f=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,b=n("./commands/command_manager").CommandManager,A=n("./commands/default_commands").commands,D=n("./config"),E=n("./token_iterator").TokenIterator,g=n("./keyboard/gutter_handler").GutterKeyboardHandler,S=n("./config").nls,$=n("./clipboard"),_=n("./lib/keys"),T=function(){function w(m,C,x){this.session,this.$toDestroy=[];var M=m.getContainerElement();this.container=M,this.renderer=m,this.id="editor"+ ++w.$uid,this.commands=new b(p.isMac?"mac":"win",A),typeof document=="object"&&(this.textInput=new e(m.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new t(this),new r(this)),this.keyBinding=new l(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(F,R){R._$emitInputEvent.schedule(31)}),this.setSession(C||x&&x.session||new a("")),D.resetOptions(this),x&&this.setOptions(x),D._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},w.prototype.startOperation=function(m){this.session.startOperation(m)},w.prototype.endOperation=function(m){this.session.endOperation(m)},w.prototype.onStartOperation=function(m){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,m||(this.previousCommand=null)},w.prototype.onEndOperation=function(m){if(this.curOp&&this.session){if(m&&m.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var C=this.curOp.command,x=C&&C.scrollIntoView;if(x){switch(x){case"center-animate":x="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var M=this.selection.getRange(),F=this.renderer.layerConfig;(M.start.row>=F.lastRow||M.end.row<=F.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}x=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(m){if(this.$mergeUndoDeltas){var C=this.prevOp,x=this.$mergeableCommands,M=C.command&&m.command.name==C.command.name;if(m.command.name=="insertstring"){var F=m.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),M=M&&this.mergeNextCommand&&(!/\s/.test(F)||/\s/.test(C.args)),this.mergeNextCommand=!0}else M=M&&x.indexOf(m.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(M=!1),M?this.session.mergeUndoDeltas=!0:x.indexOf(m.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(m,C){if(m&&typeof m=="string"&&m!="ace"){this.$keybindingId=m;var x=this;D.loadModule(["keybinding",m],function(M){x.$keybindingId==m&&x.keyBinding.setKeyboardHandler(M&&M.handler),C&&C()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(m),C&&C()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.prototype.setSession=function(m){if(this.session!=m){this.curOp&&this.endOperation(),this.curOp={};var C=this.session;if(C){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var x=this.session.getSelection();x.off("changeCursor",this.$onCursorChange),x.off("changeSelection",this.$onSelectionChange)}this.session=m,m?(this.$onDocumentChange=this.onDocumentChange.bind(this),m.on("change",this.$onDocumentChange),this.renderer.setSession(m),this.$onChangeMode=this.onChangeMode.bind(this),m.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),m.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),m.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),m.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),m.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),m.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=m.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(m)),this._signal("changeSession",{session:m,oldSession:C}),this.curOp=null,C&&C._signal("changeEditor",{oldEditor:this}),C&&(C.$editor=null),m&&m._signal("changeEditor",{editor:this}),m&&(m.$editor=this),m&&!m.destroyed&&m.bgTokenizer.scheduleStart()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(m,C){return this.session.doc.setValue(m),C?C==1?this.navigateFileEnd():C==-1&&this.navigateFileStart():this.selectAll(),m},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(m){this.renderer.onResize(m)},w.prototype.setTheme=function(m,C){this.renderer.setTheme(m,C)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(m){this.renderer.setStyle(m)},w.prototype.unsetStyle=function(m){this.renderer.unsetStyle(m)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(m){this.setOption("fontSize",m)},w.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var m=this;this.$highlightPending=!0,setTimeout(function(){m.$highlightPending=!1;var C=m.session;if(!(!C||C.destroyed)){C.$bracketHighlight&&(C.$bracketHighlight.markerIds.forEach(function(P){C.removeMarker(P)}),C.$bracketHighlight=null);var x=m.getCursorPosition(),M=m.getKeyboardHandler(),F=M&&M.$getDirectionForHighlight&&M.$getDirectionForHighlight(m),R=C.getMatchingBracketRanges(x,F);if(!R){var N=new E(C,x.row,x.column),W=N.getCurrentToken();if(W&&/\b(?:tag-open|tag-name)/.test(W.type)){var B=C.getMatchingTags(x);B&&(R=[B.openTagName.isEmpty()?B.openTag:B.openTagName,B.closeTagName.isEmpty()?B.closeTag:B.closeTagName])}}if(!R&&C.$mode.getMatching&&(R=C.$mode.getMatching(m.session)),!R){m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide();return}var V="ace_bracket";Array.isArray(R)?R.length==1&&(V="ace_error_bracket"):R=[R],R.length==2&&(f.comparePoints(R[0].end,R[1].start)==0?R=[f.fromPoints(R[0].start,R[1].end)]:f.comparePoints(R[0].start,R[1].end)==0&&(R=[f.fromPoints(R[1].start,R[0].end)])),C.$bracketHighlight={ranges:R,markerIds:R.map(function(P){return C.addMarker(P,V,"text")})},m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(m){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",m))},w.prototype.onBlur=function(m){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",m))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(m){var C=this.session.$useWrapMode,x=m.start.row==m.end.row?m.end.row:1/0;this.renderer.updateLines(m.start.row,x,C),this._signal("change",m),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(m){var C=m.data;this.renderer.updateLines(C.first,C.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var m=this.getSession(),C;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(C=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(C=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(C=!1)),m.$highlightLineMarker&&!C)m.removeMarker(m.$highlightLineMarker.id),m.$highlightLineMarker=null;else if(!m.$highlightLineMarker&&C){var x=new f(C.row,C.column,C.row,1/0);x.id=m.addMarker(x,"ace_active-line","screenLine"),m.$highlightLineMarker=x}else C&&(m.$highlightLineMarker.start.row=C.row,m.$highlightLineMarker.end.row=C.row,m.$highlightLineMarker.start.column=C.column,m._signal("changeBackMarker"))},w.prototype.onSelectionChange=function(m){var C=this.session;if(C.$selectionMarker&&C.removeMarker(C.$selectionMarker),C.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var x=this.selection.getRange(),M=this.getSelectionStyle();C.$selectionMarker=C.addMarker(x,"ace_selection",M)}var F=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(F),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var m=this.session,C=this.getSelectionRange();if(!(C.isEmpty()||C.isMultiLine())){var x=C.start.column,M=C.end.column,F=m.getLine(C.start.row),R=F.substring(x,M);if(!(R.length>5e3||!/[\w\d]/.test(R))){var N=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:R}),W=F.substring(x-1,M+1);if(N.test(W))return N}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(m){this.renderer.updateText(),this._emit("changeMode",m)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var m=this.getSelectedText(),C=this.session.doc.getNewLineCharacter(),x=!1;if(!m&&this.$copyWithEmptySelection){x=!0;for(var M=this.selection.getAllRanges(),F=0;FP.search(/\S|$/)){var W=P.substr(F.column).search(/\S|$/);x.doc.removeInLine(F.row,F.column,F.column+W)}}this.clearSelection();var B=F.column,V=x.getState(F.row),P=x.getLine(F.row),z=M.checkOutdent(V,P,m);if(x.insert(F,m),R&&R.selection&&(R.selection.length==2?this.selection.setSelectionRange(new f(F.row,B+R.selection[0],F.row,B+R.selection[1])):this.selection.setSelectionRange(new f(F.row+R.selection[0],R.selection[1],F.row+R.selection[2],R.selection[3]))),this.$enableAutoIndent){if(x.getDocument().isNewLine(m)){var K=M.getNextLineIndent(V,P.slice(0,F.column),x.getTabString());x.insert({row:F.row+1,column:0},K)}z&&M.autoOutdent(V,x,F.row)}},w.prototype.autoIndent=function(){for(var m=this.session,C=m.getMode(),x=this.selection.isEmpty()?[new f(0,0,m.doc.getLength()-1,0)]:this.selection.getAllRanges(),M="",F="",R="",N=m.getTabString(),W=0;W0&&(M=m.getState(P-1),F=m.getLine(P-1),R=C.getNextLineIndent(M,F,N));var z=m.getLine(P),K=C.$getIndent(z);if(R!==K){if(K.length>0){var U=new f(P,0,P,K.length);m.remove(U)}R.length>0&&m.insert({row:P,column:0},R)}C.autoOutdent(M,m,P)}},w.prototype.onTextInput=function(m,C){if(!C)return this.keyBinding.onTextInput(m);this.startOperation({command:{name:"insertstring"}});var x=this.applyComposition.bind(this,m,C);this.selection.rangeCount?this.forEachSelection(x):x(),this.endOperation()},w.prototype.applyComposition=function(m,C){if(C.extendLeft||C.extendRight){var x=this.selection.getRange();x.start.column-=C.extendLeft,x.end.column+=C.extendRight,x.start.column<0&&(x.start.row--,x.start.column+=this.session.getLine(x.start.row).length+1),this.selection.setRange(x),!m&&!x.isEmpty()&&this.remove()}if((m||!this.selection.isEmpty())&&this.insert(m,!0),C.restoreStart||C.restoreEnd){var x=this.selection.getRange();x.start.column-=C.restoreStart,x.end.column-=C.restoreEnd,this.selection.setRange(x)}},w.prototype.onCommandKey=function(m,C,x){return this.keyBinding.onCommandKey(m,C,x)},w.prototype.setOverwrite=function(m){this.session.setOverwrite(m)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(m){this.setOption("scrollSpeed",m)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(m){this.setOption("dragDelay",m)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(m){this.setOption("selectionStyle",m)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(m){this.setOption("highlightActiveLine",m)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(m){this.setOption("highlightGutterLine",m)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(m){this.setOption("highlightSelectedWord",m)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(m){this.renderer.setAnimatedScroll(m)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(m){this.renderer.setShowInvisibles(m)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(m){this.renderer.setDisplayIndentGuides(m)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(m){this.renderer.setHighlightIndentGuides(m)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(m){this.renderer.setShowPrintMargin(m)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(m){this.renderer.setPrintMarginColumn(m)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(m){this.setOption("readOnly",m)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(m){this.setOption("behavioursEnabled",m)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(m){this.setOption("wrapBehavioursEnabled",m)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(m){this.setOption("showFoldWidgets",m)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(m){this.setOption("fadeFoldWidgets",m)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(m){this.selection.isEmpty()&&(m=="left"?this.selection.selectLeft():this.selection.selectRight());var C=this.getSelectionRange();if(this.getBehavioursEnabled()){var x=this.session,M=x.getState(C.start.row),F=x.getMode().transformAction(M,"deletion",this,x,C);if(C.end.column===0){var R=x.getTextRange(C);if(R[R.length-1]==` -`){var N=x.getLine(C.end.row);/^\s+$/.test(N)&&(C.end.column=N.length)}}F&&(C=F)}this.session.remove(C),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var m=this.getSelectionRange();m.start.column==m.end.column&&m.start.row==m.end.row&&(m.end.column=0,m.end.row++),this.session.remove(m),this.clearSelection()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var m=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(m)},w.prototype.setGhostText=function(m,C){this.renderer.setGhostText(m,C)},w.prototype.removeGhostText=function(){this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var m=this.getCursorPosition(),C=m.column;if(C!==0){var x=this.session.getLine(m.row),M,F;CW.toLowerCase()?1:0});for(var F=new f(0,0,0,0),M=m.first;M<=m.last;M++){var R=C.getLine(M);F.start.row=M,F.end.row=M,F.end.column=R.length,C.replace(F,x[M-m.first])}},w.prototype.toggleCommentLines=function(){var m=this.session.getState(this.getCursorPosition().row),C=this.$getSelectedRows();this.session.getMode().toggleCommentLines(m,this.session,C.first,C.last)},w.prototype.toggleBlockComment=function(){var m=this.getCursorPosition(),C=this.session.getState(m.row),x=this.getSelectionRange();this.session.getMode().toggleBlockComment(C,this.session,x,m)},w.prototype.getNumberAt=function(m,C){var x=/[\-]?[0-9]+(?:\.[0-9]+)?/g;x.lastIndex=0;for(var M=this.session.getLine(m);x.lastIndex=C){var R={value:F[0],start:F.index,end:F.index+F[0].length};return R}}return null},w.prototype.modifyNumber=function(m){var C=this.selection.getCursor().row,x=this.selection.getCursor().column,M=new f(C,x-1,C,x),F=this.session.getTextRange(M);if(!isNaN(parseFloat(F))&&isFinite(F)){var R=this.getNumberAt(C,x);if(R){var N=R.value.indexOf(".")>=0?R.start+R.value.indexOf(".")+1:R.end,W=R.start+R.value.length-N,B=parseFloat(R.value);B*=Math.pow(10,W),N!==R.end&&x=N&&R<=W&&(x=te,B.selection.clearSelection(),B.moveCursorTo(m,N+M),B.selection.selectTo(m,W+M)),N=W});for(var V=this.$toggleWordPairs,P,z=0;z=W&&N<=B&&K.match(/((?:https?|ftp):\/\/[\S]+)/)){V=K.replace(/[\s:.,'";}\]]+$/,"");break}W=B}}catch(U){x={error:U}}finally{try{z&&!z.done&&(M=P.return)&&M.call(P)}finally{if(x)throw x.error}}return V},w.prototype.openLink=function(){var m=this.selection.getCursor(),C=this.findLinkAt(m.row,m.column);return C&&window.open(C,"_blank"),C!=null},w.prototype.removeLines=function(){var m=this.$getSelectedRows();this.session.removeFullLines(m.first,m.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var m=this.selection,C=this.session,x=m.getRange(),M=m.isBackwards();if(x.isEmpty()){var F=x.start.row;C.duplicateLines(F,F)}else{var R=M?x.start:x.end,N=C.insert(R,C.getTextRange(x));x.start=R,x.end=N,m.setSelectionRange(x,M)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(m,C,x){return this.session.moveText(m,C,x)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(m,C){var x,M,F=this.selection;if(!F.inMultiSelectMode||this.inVirtualSelectionMode){var R=F.toOrientedRange();x=this.$getSelectedRows(R),M=this.session.$moveLines(x.first,x.last,C?0:m),C&&m==-1&&(M=0),R.moveBy(M,0),F.fromOrientedRange(R)}else{var N=F.rangeList.ranges;F.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var W=0,B=0,V=N.length,P=0;PU+1)break;U=Y.last}for(P--,W=this.session.$moveLines(K,U,C?0:m),C&&m==-1&&(z=P+1);z<=P;)N[z].moveBy(W,0),z++;C||(W=0),B+=W}F.fromOrientedRange(F.ranges[0]),F.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(m){return m=(m||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(m.start.row),last:this.session.getRowFoldEnd(m.end.row)}},w.prototype.onCompositionStart=function(m){this.renderer.showComposition(m)},w.prototype.onCompositionUpdate=function(m){this.renderer.setCompositionText(m)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(m){return m>=this.getFirstVisibleRow()&&m<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(m){return m>=this.renderer.getFirstFullyVisibleRow()&&m<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(m,C){var x=this.renderer,M=this.renderer.layerConfig,F=m*Math.floor(M.height/M.lineHeight);C===!0?this.selection.$moveSelection(function(){this.moveCursorBy(F,0)}):C===!1&&(this.selection.moveCursorBy(F,0),this.selection.clearSelection());var R=x.scrollTop;x.scrollBy(0,F*M.lineHeight),C!=null&&x.scrollCursorIntoView(null,.5),x.animateScrolling(R)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(m){this.renderer.scrollToRow(m)},w.prototype.scrollToLine=function(m,C,x,M){this.renderer.scrollToLine(m,C,x,M)},w.prototype.centerSelection=function(){var m=this.getSelectionRange(),C={row:Math.floor(m.start.row+(m.end.row-m.start.row)/2),column:Math.floor(m.start.column+(m.end.column-m.start.column)/2)};this.renderer.alignCursor(C,.5)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(m,C){this.selection.moveCursorTo(m,C)},w.prototype.moveCursorToPosition=function(m){this.selection.moveCursorToPosition(m)},w.prototype.jumpToMatching=function(m,C){var x=this.getCursorPosition(),M=new E(this.session,x.row,x.column),F=M.getCurrentToken(),R=0;F&&F.type.indexOf("tag-name")!==-1&&(F=M.stepBackward());var N=F||M.stepForward();if(N){var W,B=!1,V={},P=x.column-N.start,z,K={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(N.value.match(/[{}()\[\]]/g)){for(;P1?V[N.value]++:F.value==="=0;--R)this.$tryReplace(x[R],m)&&M++;return this.selection.setSelectionRange(F),M},w.prototype.$tryReplace=function(m,C){var x=this.session.getTextRange(m);return C=this.$search.replace(x,C),C!==null?(m.end=this.session.replace(m,C),m):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(m,C,x){C||(C={}),typeof m=="string"||m instanceof RegExp?C.needle=m:typeof m=="object"&&h.mixin(C,m);var M=this.selection.getRange();C.needle==null&&(m=this.session.getTextRange(M)||this.$search.$options.needle,m||(M=this.session.getWordRange(M.start.row,M.start.column),m=this.session.getTextRange(M)),this.$search.set({needle:m})),this.$search.set(C),C.start||this.$search.set({start:M});var F=this.$search.find(this.session);if(C.preventScroll)return F;if(F)return this.revealRange(F,x),F;C.backwards?M.start=M.end:M.end=M.start,this.selection.setRange(M)},w.prototype.findNext=function(m,C){this.find({skipCurrent:!0,backwards:!1},m,C)},w.prototype.findPrevious=function(m,C){this.find(m,{skipCurrent:!0,backwards:!0},C)},w.prototype.revealRange=function(m,C){this.session.unfold(m),this.selection.setSelectionRange(m);var x=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(m.start,m.end,.5),C!==!1&&this.renderer.animateScrolling(x)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(m){m.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},w.prototype.setAutoScrollEditorIntoView=function(m){if(m){var C,x=this,M=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var F=this.$scrollAnchor;F.style.cssText="position:absolute",this.container.insertBefore(F,this.container.firstChild);var R=this.on("changeSelection",function(){M=!0}),N=this.renderer.on("beforeRender",function(){M&&(C=x.renderer.container.getBoundingClientRect())}),W=this.renderer.on("afterRender",function(){if(M&&C&&(x.isFocused()||x.searchBox&&x.searchBox.isFocused())){var B=x.renderer,V=B.$cursorLayer.$pixelPos,P=B.layerConfig,z=V.top-P.offset;V.top>=0&&z+C.top<0?M=!0:V.topwindow.innerHeight?M=!1:M=null,M!=null&&(F.style.top=z+"px",F.style.left=V.left+"px",F.style.height=P.lineHeight+"px",F.scrollIntoView(M)),M=C=null}});this.setAutoScrollEditorIntoView=function(B){B||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",R),this.renderer.off("afterRender",W),this.renderer.off("beforeRender",N))}}},w.prototype.$resetCursorStyle=function(){var m=this.$cursorStyle||"ace",C=this.renderer.$cursorLayer;C&&(C.setSmoothBlinking(/smooth/.test(m)),C.isBlinking=!this.$readOnly&&m!="wide",d.setCssClass(C.element,"ace_slim-cursors",/slim/.test(m)))},w.prototype.prompt=function(m,C,x){var M=this;D.loadModule("ace/ext/prompt",function(F){F.prompt(M,m,C,x)})},w}();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],h.implement(T.prototype,v),D.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){this.textInput.setReadOnly(w),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?I.attach(this):I.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?I.attach(this):I.detach(this)}},placeholder:{set:function(w){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var m=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(m&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!m&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var C=d.createElement("div");C.className="ace_placeholder",C.textContent=this.$placeholder||"",this.renderer.placeholderNode=C,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!m&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(w){var m={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(M){M.blur(),M.renderer.scroller.focus()},readOnly:!0},C=function(M){if(M.target==this.renderer.scroller&&M.keyCode===_.enter){M.preventDefault();var F=this.getCursorPosition().row;this.isRowVisible(F)||this.scrollToLine(F,!0,!0),this.focus()}},x;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",S("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",S("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",C.bind(this)),this.commands.addCommand(m),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",S("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",S("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),x||(x=new g(this)),x.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",C.bind(this)),this.commands.removeCommand(m),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),x&&x.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var I={getText:function(w,m){return(Math.abs(w.selection.lead.row-m)||m+1+(m<9?"·":""))+""},getWidth:function(w,m,C){return Math.max(m.toString().length,(C.lastRow+1).toString().length,2)*C.characterWidth},update:function(w,m){m.renderer.$loop.schedule(m.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};u.Editor=T}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,u,y){var o=n("../lib/dom"),h=function(){function d(s,p){this.element=s,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(s){o.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(s,p){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(s,p,e){var t=p.firstRowScreen*p.lineHeight,r=Math.floor(t/this.canvasHeight),l=e.documentToScreenRow(s,0)*p.lineHeight;return l-r*this.canvasHeight},d.prototype.computeLineHeight=function(s,p,e){return p.lineHeight*e.getRowLineCount(s)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(s){return this.cells[s]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var p=o.createFragment(this.element),e=0;eA&&(g=b.end.row+1,b=c.getNextFoldLine(g,b),A=b?b.start.row:1/0),g>v){for(;this.$lines.getLength()>E+1;)this.$lines.pop();break}D=this.$lines.get(++E),D?D.row=g:(D=this.$lines.createCell(g,a,this.session,r),this.$lines.push(D)),this.$renderCell(D,a,b,g),g++}this._signal("afterRender"),this.$updateGutterWidth(a)},l.prototype.$updateGutterWidth=function(a){var c=this.session,f=c.gutterRenderer||this.$renderer,v=c.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(b=c.getLength()+v-1);var A=f?f.getWidth(c,b,a):b.toString().length*a.characterWidth,D=this.$padding||this.$computePadding();A+=D.left+D.right,A!==this.gutterWidth&&!isNaN(A)&&(this.gutterWidth=A,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",A))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var a=this.session.selection.getCursor();this.$cursorRow!==a.row&&(this.$cursorRow=a.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var a=this.session.selection.cursor.row;if(this.$cursorRow=a,!(this.$cursorCell&&this.$cursorCell.row==a)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var f=0;f=this.$cursorRow){if(v.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(f>0&&b&&b.start.row==c[f-1].row)v=c[f-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},l.prototype.scrollLines=function(a){var c=this.config;if(this.config=a,this.$updateCursorRow(),this.$lines.pageChanged(c,a))return this.update(a);this.$lines.moveContainer(a);var f=Math.min(a.lastRow+a.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=f,!c||v0;b--)this.$lines.shift();if(v>f)for(var b=this.session.getFoldedRowCount(f+1,v);b>0;b--)this.$lines.pop();a.firstRowv&&this.$lines.push(this.$renderLines(a,v+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(a)},l.prototype.$renderLines=function(a,c,f){for(var v=[],b=c,A=this.session.getNextFoldLine(b),D=A?A.start.row:1/0;b>D&&(b=A.end.row+1,A=this.session.getNextFoldLine(b,A),D=A?A.start.row:1/0),!(b>f);){var E=this.$lines.createCell(b,a,this.session,r);this.$renderCell(E,a,A,b),v.push(E),b++}return v},l.prototype.$renderCell=function(a,c,f,v){var b=a.element,A=this.session,D=b.childNodes[0],E=b.childNodes[1],g=b.childNodes[2],S=g.firstChild,$=A.$firstLineNumber,_=A.$breakpoints,T=A.$decorations,I=A.gutterRenderer||this.$renderer,w=this.$showFoldWidgets&&A.foldWidgets,m=f?f.start.row:Number.MAX_VALUE,C=c.lineHeight+"px",x=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=(I?I.getText(A,v):v+$).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||f&&v=m&&this.$cursorRow<=f.end.row)&&(x+="ace_gutter-active-line ",this.$cursorCell!=a&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=a)),_[v]&&(x+=_[v]),T[v]&&(x+=T[v]),this.$annotations[v]&&v!==m&&(x+=this.$annotations[v].className),w){var R=w[v];R==null&&(R=w[v]=A.getFoldWidget(v))}if(R){var N="ace_fold-widget ace_"+R,W=R=="start"&&v==m&&vf.right-c.right)return"foldWidgets"},l}();t.prototype.$fixedWidth=!1,t.prototype.$highlightGutterLine=!0,t.prototype.$renderer="",t.prototype.$showLineNumbers=!0,t.prototype.$showFoldWidgets=!0,h.implement(t.prototype,s);function r(l){var a=document.createTextNode("");l.appendChild(a);var c=o.createElement("span");l.appendChild(c);var f=o.createElement("span");l.appendChild(f);var v=o.createElement("span");return f.appendChild(v),l}u.Gutter=t}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,u,y){var o=n("../range").Range,h=n("../lib/dom"),d=function(){function p(e){this.element=h.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return p.prototype.setPadding=function(e){this.$padding=e},p.prototype.setSession=function(e){this.session=e},p.prototype.setMarkers=function(e){this.markers=e},p.prototype.elt=function(e,t){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=t,r.className=e},p.prototype.update=function(e){if(e){this.config=e,this.i=0;var t;for(var r in this.markers){var l=this.markers[r];if(!l.range){l.update(t,this,this.session,e);continue}var a=l.range.clipRows(e.firstRow,e.lastRow);if(!a.isEmpty())if(a=a.toScreenRange(this.session),l.renderer){var c=this.$getTop(a.start.row,e),f=this.$padding+a.start.column*e.characterWidth;l.renderer(t,a,f,c,e)}else l.type=="fullLine"?this.drawFullLineMarker(t,a,l.clazz,e):l.type=="screenLine"?this.drawScreenLineMarker(t,a,l.clazz,e):a.isMultiLine()?l.type=="text"?this.drawTextMarker(t,a,l.clazz,e):this.drawMultiLineMarker(t,a,l.clazz,e):this.drawSingleLineMarker(t,a,l.clazz+" ace_start ace_br15",e)}if(this.i!=-1)for(;this.iE,b==v),l,b==v?0:1,a)},p.prototype.drawMultiLineMarker=function(e,t,r,l,a){var c=this.$padding,f=l.lineHeight,v=this.$getTop(t.start.row,l),b=c+t.start.column*l.characterWidth;if(a=a||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var A=t.clone();A.end.row=A.start.row,A.end.column=this.session.getLine(A.start.row).length,this.drawBidiSingleLineMarker(e,A,r+" ace_br1 ace_start",l,null,a)}else this.elt(r+" ace_br1 ace_start","height:"+f+"px;right:"+c+"px;top:"+v+"px;left:"+b+"px;"+(a||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var A=t.clone();A.start.row=A.end.row,A.start.column=0,this.drawBidiSingleLineMarker(e,A,r+" ace_br12",l,null,a)}else{v=this.$getTop(t.end.row,l);var D=t.end.column*l.characterWidth;this.elt(r+" ace_br12","height:"+f+"px;width:"+D+"px;top:"+v+"px;left:"+c+"px;"+(a||""))}if(f=(t.end.row-t.start.row-1)*l.lineHeight,!(f<=0)){v=this.$getTop(t.start.row+1,l);var E=(t.start.column?1:0)|(t.end.column?0:8);this.elt(r+(E?" ace_br"+E:""),"height:"+f+"px;right:"+c+"px;top:"+v+"px;left:"+c+"px;"+(a||""))}},p.prototype.drawSingleLineMarker=function(e,t,r,l,a,c){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,r,l,a,c);var f=l.lineHeight,v=(t.end.column+(a||0)-t.start.column)*l.characterWidth,b=this.$getTop(t.start.row,l),A=this.$padding+t.start.column*l.characterWidth;this.elt(r,"height:"+f+"px;width:"+v+"px;top:"+b+"px;left:"+A+"px;"+(c||""))},p.prototype.drawBidiSingleLineMarker=function(e,t,r,l,a,c){var f=l.lineHeight,v=this.$getTop(t.start.row,l),b=this.$padding,A=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);A.forEach(function(D){this.elt(r,"height:"+f+"px;width:"+(D.width+(a||0))+"px;top:"+v+"px;left:"+(b+D.left)+"px;"+(c||""))},this)},p.prototype.drawFullLineMarker=function(e,t,r,l,a){var c=this.$getTop(t.start.row,l),f=l.lineHeight;t.start.row!=t.end.row&&(f+=this.$getTop(t.end.row,l)-c),this.elt(r,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(a||""))},p.prototype.drawScreenLineMarker=function(e,t,r,l,a){var c=this.$getTop(t.start.row,l),f=l.lineHeight;this.elt(r,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(a||""))},p}();d.prototype.$padding=0;function s(p,e,t,r){return(p?1:0)|(e?2:0)|(t?4:0)|(r?8:0)}u.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,u,y){var o=new Set(["text","rparen","lparen"]);u.isTextToken=function(h){return o.has(h)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,u,y){var o=n("../lib/oop"),h=n("../lib/dom"),d=n("../lib/lang"),s=n("./lines").Lines,p=n("../lib/event_emitter").EventEmitter,e=n("../config").nls,t=n("./text_util").isTextToken,r=function(){function l(a){this.dom=h,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return l.prototype.$updateEolChar=function(){var a=this.session.doc,c=a.getNewLineCharacter()==` -`&&a.getNewLineMode()!="windows",f=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},l.prototype.setPadding=function(a){this.$padding=a,this.element.style.margin="0 "+a+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(c){this._signal("changeCharacterSize",c)}.bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(a){this.session=a,a&&this.$computeTabString()},l.prototype.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,typeof a=="string"?(this.showSpaces=/tab/i.test(a),this.showTabs=/space/i.test(a),this.showEOL=/eol/i.test(a)):this.showSpaces=this.showTabs=this.showEOL=a,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(a){return this.$highlightIndentGuides===a?!1:(this.$highlightIndentGuides=a,a)},l.prototype.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var c=this.$tabStrings=[0],f=1;f$&&(g=S.end.row+1,S=this.session.getNextFoldLine(g,S),$=S?S.start.row:1/0),!(g>b);){var _=A[D++];if(_){this.dom.removeChildren(_),this.$renderLine(_,g,g==$?S:!1),E&&(_.style.top=this.$lines.computeLineTop(g,a,this.session)+"px");var T=a.lineHeight*this.session.getRowLength(g)+"px";_.style.height!=T&&(E=!0,_.style.height=T)}g++}if(E)for(;D0;b--)this.$lines.shift();if(c.lastRow>a.lastRow)for(var b=this.session.getFoldedRowCount(a.lastRow+1,c.lastRow);b>0;b--)this.$lines.pop();a.firstRowc.lastRow&&this.$lines.push(this.$renderLinesFragment(a,c.lastRow+1,a.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(a,c,f){for(var v=[],b=c,A=this.session.getNextFoldLine(b),D=A?A.start.row:1/0;b>D&&(b=A.end.row+1,A=this.session.getNextFoldLine(b,A),D=A?A.start.row:1/0),!(b>f);){var E=this.$lines.createCell(b,a,this.session),g=E.element;this.dom.removeChildren(g),h.setStyle(g.style,"height",this.$lines.computeLineHeight(b,a,this.session)+"px"),h.setStyle(g.style,"top",this.$lines.computeLineTop(b,a,this.session)+"px"),this.$renderLine(g,b,b==D?A:!1),this.$useLineGroups()?g.className="ace_line_group":g.className="ace_line",v.push(E),b++}return v},l.prototype.update=function(a){this.$lines.moveContainer(a),this.config=a;for(var c=a.firstRow,f=a.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(a,c,f))},l.prototype.$renderToken=function(a,c,f,v){for(var b=this,A=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,D=this.dom.createFragment(this.element),E,g=0;E=A.exec(v);){var S=E[1],$=E[2],_=E[3],T=E[4],I=E[5];if(!(!b.showSpaces&&$)){var w=g!=E.index?v.slice(g,E.index):"";if(g=E.index+E[0].length,w&&D.appendChild(this.dom.createTextNode(w,this.element)),S){var m=b.session.getScreenTabSize(c+E.index);D.appendChild(b.$tabStrings[m].cloneNode(!0)),c+=m-1}else if($)if(b.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=d.stringRepeat(b.SPACE_CHAR,$.length),D.appendChild(C)}else D.appendChild(this.dom.createTextNode($,this.element));else if(_){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=d.stringRepeat(b.SPACE_CHAR,_.length),D.appendChild(C)}else if(T){c+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=b.showSpaces?b.SPACE_CHAR:T,D.appendChild(C)}else if(I){c+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=I,D.appendChild(C)}}}if(D.appendChild(this.dom.createTextNode(g?v.slice(g):v,this.element)),t(f.type))a.appendChild(D);else{var x="ace_"+f.type.replace(/\./g," ace_"),C=this.dom.createElement("span");f.type=="fold"&&(C.style.width=f.value.length*this.config.characterWidth+"px",C.setAttribute("title",e("inline-fold.closed.title","Unfold code"))),C.className=x,C.appendChild(D),a.appendChild(C)}return c+v.length},l.prototype.renderIndentGuide=function(a,c,f){var v=c.search(this.$indentGuideRe);if(v<=0||v>=f)return c;if(c[0]==" "){v-=v%this.tabSize;for(var b=v/this.tabSize,A=0;AA[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&a[c.row]!==""&&c.column===a[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var D=c.row+1;D0)v=a.element.childNodes[0];else return;var b=v.childNodes;if(b){var A=b[c-1];A&&A.classList&&A.classList.contains("ace_indent-guide")&&A.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var a=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var f=0;f=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,c)}}else for(var f=a.length-1;f>=0;f--){var v=a[f];if(this.$highlightIndentGuideMarker.end&&v.row=A;)D=this.$renderToken(E,D,S,$.substring(0,A-v)),$=$.substring(A-v),v=A,E=this.$createLineElement(),a.appendChild(E),E.appendChild(this.dom.createTextNode(d.stringRepeat(" ",f.indent),this.element)),b++,D=0,A=f[b]||Number.MAX_VALUE;$.length!=0&&(v+=$.length,D=this.$renderToken(E,D,S,$))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(E,D,null,"",!0)},l.prototype.$renderSimpleLine=function(a,c){for(var f=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(a,f,b,A);f=this.$renderToken(a,f,b,A)}}},l.prototype.$renderOverflowMessage=function(a,c,f,v,b){f&&this.$renderToken(a,c,f,v.slice(0,this.MAX_LINE_LENGTH-c));var A=this.dom.createElement("span");A.className="ace_inline_button ace_keyword ace_toggle_wrap",A.textContent=b?"":"",a.appendChild(A)},l.prototype.$renderLine=function(a,c,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(c)),f)var v=this.$getFoldLineTokens(c,f);else var v=this.session.getTokens(c);var b=a;if(v.length){var A=this.session.getRowSplitData(c);if(A&&A.length){this.$renderWrappedLine(a,v,A);var b=a.lastChild}else{var b=a;this.$useLineGroups()&&(b=this.$createLineElement(),a.appendChild(b)),this.$renderSimpleLine(b,v)}}else this.$useLineGroups()&&(b=this.$createLineElement(),a.appendChild(b));if(this.showEOL&&b){f&&(c=f.end.row);var D=this.dom.createElement("span");D.className="ace_invisible ace_invisible_eol",D.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(D)}},l.prototype.$getFoldLineTokens=function(a,c){var f=this.session,v=[];function b(D,E,g){for(var S=0,$=0;$+D[S].value.lengthg-E&&(_=_.substring(0,g-E)),v.push({type:D[S].type,value:_}),$=E+_.length,S+=1}for(;$g?v.push({type:D[S].type,value:_.substring(0,g-$)}):v.push(D[S]),$+=_.length,S+=1}}var A=f.getTokens(a);return c.walk(function(D,E,g,S,$){D!=null?v.push({type:"fold",value:D}):($&&(A=f.getTokens(E)),A.length&&b(A,S,g))},c.end.row,this.session.getLine(c.end.row).length),v},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,o.implement(r.prototype,p),u.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,u,y){var o=n("../lib/dom"),h=function(){function d(s){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(s){for(var p=this.cursors,e=p.length;e--;)o.setStyle(p[e].style,"opacity",s?"":"0")},d.prototype.$startCssAnimation=function(){for(var s=this.cursors,p=s.length;p--;)s[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(s){this.$padding=s},d.prototype.setSession=function(s){this.session=s},d.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},d.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},d.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,o.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var s=o.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},d.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},d.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){s(!0),p()},this.blinkInterval),p()}},d.prototype.getPixelPosition=function(s,p){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var e=this.session.documentToScreenPosition(s),t=this.$padding+(this.session.$bidiHandler.isBidiRow(e.row,s.row)?this.session.$bidiHandler.getPosLeft(e.column):e.column*this.config.characterWidth),r=(e.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:r}},d.prototype.isCursorInView=function(s,p){return s.top>=0&&s.tops.height+s.offset||l.top<0)&&e>1)){var a=this.cursors[t++]||this.addCursor(),c=a.style;this.drawCursor?this.drawCursor(a,l,s,p[e],this.session):this.isCursorInView(l,s)?(o.setStyle(c,"display","block"),o.translate(a,l.left,l.top),o.setStyle(c,"width",Math.round(s.characterWidth)+"px"),o.setStyle(c,"height",s.lineHeight+"px")):o.setStyle(c,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=l,this.restartTimer()},d.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();h.prototype.$padding=0,h.prototype.drawCursor=null,u.Cursor=h}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,u,y){var o=this&&this.__extends||function(){var a=function(c,f){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(v[A]=b[A])},a(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");a(c,f);function v(){this.constructor=c}c.prototype=f===null?Object.create(f):(v.prototype=f.prototype,new v)}}(),h=n("./lib/oop"),d=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter,e=32768,t=function(){function a(c,f){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+f,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return a.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},a}();h.implement(t.prototype,p);var r=function(a){o(c,a);function c(f,v){var b=a.call(this,f,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,v.$scrollbarWidth=b.width=d.scrollbarWidth(f.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(f){this.element.style.height=f+"px"},c.prototype.setScrollHeight=function(f){this.scrollHeight=f,f>e?(this.coeff=e/f,f=e):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},c.prototype.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)},c}(t);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var l=function(a){o(c,a);function c(f,v){var b=a.call(this,f,"-h")||this;return b.scrollLeft=0,b.height=v.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(f){this.element.style.width=f+"px"},c.prototype.setInnerWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)},c}(t);u.ScrollBar=r,u.ScrollBarV=r,u.ScrollBarH=l,u.VScrollBar=r,u.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,u,y){var o=this&&this.__extends||function(){var l=function(a,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,v){f.__proto__=v}||function(f,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(f[b]=v[b])},l(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(a,c);function f(){this.constructor=a}a.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),h=n("./lib/oop"),d=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ - position: absolute; - background: rgba(128, 128, 128, 0.6); - -moz-box-sizing: border-box; - box-sizing: border-box; - border: 1px solid #bbb; - border-radius: 2px; - z-index: 8; -} -.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { - position: absolute; - z-index: 6; - background: none; - overflow: hidden!important; -} -.ace_editor>.ace_sb-v { - z-index: 6; - right: 0; - top: 0; - width: 12px; -} -.ace_editor>.ace_sb-v div { - z-index: 8; - right: 0; - width: 100%; -} -.ace_editor>.ace_sb-h { - bottom: 0; - left: 0; - height: 12px; -} -.ace_editor>.ace_sb-h div { - bottom: 0; - height: 100%; -} -.ace_editor>.ace_sb_grabbed { - z-index: 8; - background: #000; -}`,"ace_scrollbar.css",!1);var e=function(){function l(a,c){this.element=d.createElement("div"),this.element.className="ace_sb"+c,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a,this.coeff=1},l}();h.implement(e.prototype,p);var t=function(l){o(a,l);function a(c,f){var v=l.call(this,c,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=c,v.width=v.VScrollWidth,v.renderer=f,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return a.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(s.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var v=this,b=f.clientY,A=function(T){b=T.clientY},D=function(){clearInterval($)},E=f.clientY,g=this.thumbTop,S=function(){if(b!==void 0){var T=v.scrollTopFromThumbTop(g+b-E);T!==v.scrollTop&&v._emit("scroll",{data:T})}};s.capture(this.inner,A,D);var $=setInterval(S,20);return s.preventDefault(f)}var _=f.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(_)}),s.preventDefault(f)}},a.prototype.getHeight=function(){return this.height},a.prototype.scrollTopFromThumbTop=function(c){var f=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return f=f>>0,f<0?f=0:f>this.pageHeight-this.viewHeight&&(f=this.pageHeight-this.viewHeight),f},a.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},a.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},a.prototype.setScrollHeight=function(c,f){this.pageHeight===c&&!f||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},a.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},a}(e);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var r=function(l){o(a,l);function a(c,f){var v=l.call(this,c,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=f,v}return a.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(s.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var v=this,b=f.clientX,A=function(T){b=T.clientX},D=function(){clearInterval($)},E=f.clientX,g=this.thumbLeft,S=function(){if(b!==void 0){var T=v.scrollLeftFromThumbLeft(g+b-E);T!==v.scrollLeft&&v._emit("scroll",{data:T})}};s.capture(this.inner,A,D);var $=setInterval(S,20);return s.preventDefault(f)}var _=f.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(_)}),s.preventDefault(f)}},a.prototype.getHeight=function(){return this.isVisible?this.height:0},a.prototype.scrollLeftFromThumbLeft=function(c){var f=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return f=f>>0,f<0?f=0:f>this.pageWidth-this.viewWidth&&(f=this.pageWidth-this.viewWidth),f},a.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},a.prototype.setScrollWidth=function(c,f){this.pageWidth===c&&!f||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},a.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},a}(e);r.prototype.setInnerWidth=r.prototype.setScrollWidth,u.ScrollBar=t,u.ScrollBarV=t,u.ScrollBarH=r,u.VScrollBar=t,u.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,u,y){var o=n("./lib/event"),h=function(){function d(s,p){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var e=this;this._flush=function(t){e.pending=!1;var r=e.changes;if(r&&(o.blockIdle(100),e.changes=0,e.onRender(r)),e.changes){if(e.$recursionLimit--<0)return;e.schedule()}else e.$recursionLimit=2}}return d.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(s){var p=this.changes;return this.changes=0,p},d}();u.RenderLoop=h}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,u,y){var o=n("../lib/oop"),h=n("../lib/dom"),d=n("../lib/lang"),s=n("../lib/event"),p=n("../lib/useragent"),e=n("../lib/event_emitter").EventEmitter,t=512,r=typeof ResizeObserver=="function",l=200,a=function(){function c(f){this.el=h.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=h.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=h.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",t),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(f,v){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",p.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=v?"hidden":"visible"},c.prototype.checkForSizeChanges=function(f){if(f===void 0&&(f=this.$measureSizes()),f&&(this.$characterSize.width!==f.width||this.$characterSize.height!==f.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===f.width&&v.height===f.height,this._emit("changeCharacterSize",{data:f})}},c.prototype.$addObserver=function(){var f=this;this.$observer=new window.ResizeObserver(function(v){f.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=s.onIdle(function v(){f.checkForSizeChanges(),s.onIdle(v,500)},500)},c.prototype.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(f){var v={height:(f||this.$measureNode).clientHeight,width:(f||this.$measureNode).clientWidth/t};return v.width===0||v.height===0?null:v},c.prototype.$measureCharWidth=function(f){this.$main.textContent=d.stringRepeat(f,t);var v=this.$main.getBoundingClientRect();return v.width/t},c.prototype.getCharacterWidth=function(f){var v=this.charSizes[f];return v===void 0&&(v=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),v},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(f){return!f||!f.parentElement?1:(Number(window.getComputedStyle(f).zoom)||1)*this.$getZoom(f.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var f=function(v,b){return["div",{style:"position: absolute;top:"+v+"px;left:"+b+"px;"}]};this.els=h.buildDom([f(0,0),f(l,0),f(0,l),f(l,l)],this.el)},c.prototype.transformCoordinates=function(f,v){if(f){var b=this.$getZoom(this.el);f=g(1/b,f)}function A(W,B,V){var P=W[1]*B[0]-W[0]*B[1];return[(-B[1]*V[0]+B[0]*V[1])/P,(+W[1]*V[0]-W[0]*V[1])/P]}function D(W,B){return[W[0]-B[0],W[1]-B[1]]}function E(W,B){return[W[0]+B[0],W[1]+B[1]]}function g(W,B){return[W*B[0],W*B[1]]}this.els||this.$initTransformMeasureNodes();function S(W){var B=W.getBoundingClientRect();return[B.left,B.top]}var $=S(this.els[0]),_=S(this.els[1]),T=S(this.els[2]),I=S(this.els[3]),w=A(D(I,_),D(I,T),D(E(_,T),E(I,$))),m=g(1+w[0],D(_,$)),C=g(1+w[1],D(T,$));if(v){var x=v,M=w[0]*x[0]/l+w[1]*x[1]/l+1,F=E(g(x[0],m),g(x[1],C));return E(g(1/M/l,F),$)}var R=D(f,$),N=A(D(m,g(w[0],R)),D(C,g(w[1],R)),R);return g(l,N)},c}();a.prototype.$characterSize={width:0,height:0},o.implement(a.prototype,e),u.FontMetrics=a}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,u,y){y.exports=` -.ace_br1 {border-top-left-radius : 3px;} -.ace_br2 {border-top-right-radius : 3px;} -.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} -.ace_br4 {border-bottom-right-radius: 3px;} -.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} -.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} -.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} -.ace_br8 {border-bottom-left-radius : 3px;} -.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} -.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} -.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} -.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} - - -.ace_editor { - position: relative; - overflow: hidden; - padding: 0; - font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; - direction: ltr; - text-align: left; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - forced-color-adjust: none; -} - -.ace_scroller { - position: absolute; - overflow: hidden; - top: 0; - bottom: 0; - background-color: inherit; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - cursor: text; -} - -.ace_content { - position: absolute; - box-sizing: border-box; - min-width: 100%; - contain: style size layout; - font-variant-ligatures: no-common-ligatures; -} - -.ace_keyboard-focus:focus { - box-shadow: inset 0 0 0 2px #5E9ED6; - outline: none; -} - -.ace_dragging .ace_scroller:before{ - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - content: ''; - background: rgba(250, 250, 250, 0.01); - z-index: 1000; -} -.ace_dragging.ace_dark .ace_scroller:before{ - background: rgba(0, 0, 0, 0.01); -} - -.ace_gutter { - position: absolute; - overflow : hidden; - width: auto; - top: 0; - bottom: 0; - left: 0; - cursor: default; - z-index: 4; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - contain: style size layout; -} - -.ace_gutter-active-line { - position: absolute; - left: 0; - right: 0; -} - -.ace_scroller.ace_scroll-left:after { - content: ""; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; - pointer-events: none; -} - -.ace_gutter-cell, .ace_gutter-cell_svg-icons { - position: absolute; - top: 0; - left: 0; - right: 0; - padding-left: 19px; - padding-right: 6px; - background-repeat: no-repeat; -} - -.ace_gutter-cell_svg-icons .ace_gutter_annotation { - margin-left: -14px; - float: left; -} - -.ace_gutter-cell .ace_gutter_annotation { - margin-left: -19px; - float: left; -} - -.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); - background-repeat: no-repeat; - background-position: 2px center; -} - -.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); -} - -.ace_icon_svg.ace_error { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); - background-color: crimson; -} -.ace_icon_svg.ace_security { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); - background-color: crimson; -} -.ace_icon_svg.ace_warning { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); - background-color: darkorange; -} -.ace_icon_svg.ace_info { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); - background-color: royalblue; -} -.ace_icon_svg.ace_hint { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); - background-color: silver; -} - -.ace_icon_svg.ace_error_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); - background-color: crimson; -} -.ace_icon_svg.ace_security_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); - background-color: crimson; -} -.ace_icon_svg.ace_warning_fold { - -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); - background-color: darkorange; -} - -.ace_scrollbar { - contain: strict; - position: absolute; - right: 0; - bottom: 0; - z-index: 6; -} - -.ace_scrollbar-inner { - position: absolute; - cursor: text; - left: 0; - top: 0; -} - -.ace_scrollbar-v{ - overflow-x: hidden; - overflow-y: scroll; - top: 0; -} - -.ace_scrollbar-h { - overflow-x: scroll; - overflow-y: hidden; - left: 0; -} - -.ace_print-margin { - position: absolute; - height: 100%; -} - -.ace_text-input { - position: absolute; - z-index: 0; - width: 0.5em; - height: 1em; - opacity: 0; - background: transparent; - -moz-appearance: none; - appearance: none; - border: none; - resize: none; - outline: none; - overflow: hidden; - font: inherit; - padding: 0 1px; - margin: 0 -1px; - contain: strict; - -ms-user-select: text; - -moz-user-select: text; - -webkit-user-select: text; - user-select: text; - /*with \`pre-line\` chrome inserts   instead of space*/ - white-space: pre!important; -} -.ace_text-input.ace_composition { - background: transparent; - color: inherit; - z-index: 1000; - opacity: 1; -} -.ace_composition_placeholder { color: transparent } -.ace_composition_marker { - border-bottom: 1px solid; - position: absolute; - border-radius: 0; - margin-top: 1px; -} - -[ace_nocontext=true] { - transform: none!important; - filter: none!important; - clip-path: none!important; - mask : none!important; - contain: none!important; - perspective: none!important; - mix-blend-mode: initial!important; - z-index: auto; -} - -.ace_layer { - z-index: 1; - position: absolute; - overflow: hidden; - /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ - word-wrap: normal; - white-space: pre; - height: 100%; - width: 100%; - box-sizing: border-box; - /* setting pointer-events: auto; on node under the mouse, which changes - during scroll, will break mouse wheel scrolling in Safari */ - pointer-events: none; -} - -.ace_gutter-layer { - position: relative; - width: auto; - text-align: right; - pointer-events: auto; - height: 1000000px; - contain: style size layout; -} - -.ace_text-layer { - font: inherit !important; - position: absolute; - height: 1000000px; - width: 1000000px; - contain: style size layout; -} - -.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { - contain: style size layout; - position: absolute; - top: 0; - left: 0; - right: 0; -} - -.ace_hidpi .ace_text-layer, -.ace_hidpi .ace_gutter-layer, -.ace_hidpi .ace_content, -.ace_hidpi .ace_gutter { - contain: strict; -} -.ace_hidpi .ace_text-layer > .ace_line, -.ace_hidpi .ace_text-layer > .ace_line_group { - contain: strict; -} - -.ace_cjk { - display: inline-block; - text-align: center; -} - -.ace_cursor-layer { - z-index: 4; -} - -.ace_cursor { - z-index: 4; - position: absolute; - box-sizing: border-box; - border-left: 2px solid; - /* workaround for smooth cursor repaintng whole screen in chrome */ - transform: translatez(0); -} - -.ace_multiselect .ace_cursor { - border-left-width: 1px; -} - -.ace_slim-cursors .ace_cursor { - border-left-width: 1px; -} - -.ace_overwrite-cursors .ace_cursor { - border-left-width: 0; - border-bottom: 1px solid; -} - -.ace_hidden-cursors .ace_cursor { - opacity: 0.2; -} - -.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { - opacity: 0; -} - -.ace_smooth-blinking .ace_cursor { - transition: opacity 0.18s; -} - -.ace_animate-blinking .ace_cursor { - animation-duration: 1000ms; - animation-timing-function: step-end; - animation-name: blink-ace-animate; - animation-iteration-count: infinite; -} - -.ace_animate-blinking.ace_smooth-blinking .ace_cursor { - animation-duration: 1000ms; - animation-timing-function: ease-in-out; - animation-name: blink-ace-animate-smooth; -} - -@keyframes blink-ace-animate { - from, to { opacity: 1; } - 60% { opacity: 0; } -} - -@keyframes blink-ace-animate-smooth { - from, to { opacity: 1; } - 45% { opacity: 1; } - 60% { opacity: 0; } - 85% { opacity: 0; } -} - -.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { - position: absolute; - z-index: 3; -} - -.ace_marker-layer .ace_selection { - position: absolute; - z-index: 5; -} - -.ace_marker-layer .ace_bracket { - position: absolute; - z-index: 6; -} - -.ace_marker-layer .ace_error_bracket { - position: absolute; - border-bottom: 1px solid #DE5555; - border-radius: 0; -} - -.ace_marker-layer .ace_active-line { - position: absolute; - z-index: 2; -} - -.ace_marker-layer .ace_selected-word { - position: absolute; - z-index: 4; - box-sizing: border-box; -} - -.ace_line .ace_fold { - box-sizing: border-box; - - display: inline-block; - height: 11px; - margin-top: -2px; - vertical-align: middle; - - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); - background-repeat: no-repeat, repeat-x; - background-position: center center, top left; - color: transparent; - - border: 1px solid black; - border-radius: 2px; - - cursor: pointer; - pointer-events: auto; -} - -.ace_dark .ace_fold { -} - -.ace_fold:hover{ - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); -} - -.ace_tooltip { - background-color: #f5f5f5; - border: 1px solid gray; - border-radius: 1px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); - color: black; - max-width: 100%; - padding: 3px 4px; - position: fixed; - z-index: 999999; - box-sizing: border-box; - cursor: default; - white-space: pre-wrap; - word-wrap: break-word; - line-height: normal; - font-style: normal; - font-weight: normal; - letter-spacing: normal; - pointer-events: none; - overflow: auto; - max-width: min(60em, 66vw); - overscroll-behavior: contain; -} -.ace_tooltip pre { - white-space: pre-wrap; -} - -.ace_tooltip.ace_dark { - background-color: #636363; - color: #fff; -} - -.ace_tooltip:focus { - outline: 1px solid #5E9ED6; -} - -.ace_icon { - display: inline-block; - width: 18px; - vertical-align: top; -} - -.ace_icon_svg { - display: inline-block; - width: 12px; - vertical-align: top; - -webkit-mask-repeat: no-repeat; - -webkit-mask-size: 12px; - -webkit-mask-position: center; -} - -.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { - padding-right: 13px; -} - -.ace_fold-widget { - box-sizing: border-box; - - margin: 0 -12px 0 1px; - display: none; - width: 11px; - vertical-align: top; - - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); - background-repeat: no-repeat; - background-position: center; - - border-radius: 3px; - - border: 1px solid transparent; - cursor: pointer; -} - -.ace_folding-enabled .ace_fold-widget { - display: inline-block; -} - -.ace_fold-widget.ace_end { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); -} - -.ace_fold-widget.ace_closed { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); -} - -.ace_fold-widget:hover { - border: 1px solid rgba(0, 0, 0, 0.3); - background-color: rgba(255, 255, 255, 0.2); - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); -} - -.ace_fold-widget:active { - border: 1px solid rgba(0, 0, 0, 0.4); - background-color: rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); -} -/** - * Dark version for fold widgets - */ -.ace_dark .ace_fold-widget { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); -} -.ace_dark .ace_fold-widget.ace_end { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); -} -.ace_dark .ace_fold-widget.ace_closed { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); -} -.ace_dark .ace_fold-widget:hover { - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); - background-color: rgba(255, 255, 255, 0.1); -} -.ace_dark .ace_fold-widget:active { - box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); -} - -.ace_inline_button { - border: 1px solid lightgray; - display: inline-block; - margin: -1px 8px; - padding: 0 5px; - pointer-events: auto; - cursor: pointer; -} -.ace_inline_button:hover { - border-color: gray; - background: rgba(200,200,200,0.2); - display: inline-block; - pointer-events: auto; -} - -.ace_fold-widget.ace_invalid { - background-color: #FFB4B4; - border-color: #DE5555; -} - -.ace_fade-fold-widgets .ace_fold-widget { - transition: opacity 0.4s ease 0.05s; - opacity: 0; -} - -.ace_fade-fold-widgets:hover .ace_fold-widget { - transition: opacity 0.05s ease 0.05s; - opacity:1; -} - -.ace_underline { - text-decoration: underline; -} - -.ace_bold { - font-weight: bold; -} - -.ace_nobold .ace_bold { - font-weight: normal; -} - -.ace_italic { - font-style: italic; -} - - -.ace_error-marker { - background-color: rgba(255, 0, 0,0.2); - position: absolute; - z-index: 9; -} - -.ace_highlight-marker { - background-color: rgba(255, 255, 0,0.2); - position: absolute; - z-index: 8; -} - -.ace_mobile-menu { - position: absolute; - line-height: 1.5; - border-radius: 4px; - -ms-user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - background: white; - box-shadow: 1px 3px 2px grey; - border: 1px solid #dcdcdc; - color: black; -} -.ace_dark > .ace_mobile-menu { - background: #333; - color: #ccc; - box-shadow: 1px 3px 2px grey; - border: 1px solid #444; - -} -.ace_mobile-button { - padding: 2px; - cursor: pointer; - overflow: hidden; -} -.ace_mobile-button:hover { - background-color: #eee; - opacity:1; -} -.ace_mobile-button:active { - background-color: #ddd; -} - -.ace_placeholder { - position: relative; - font-family: arial; - transform: scale(0.9); - transform-origin: left; - white-space: pre; - opacity: 0.7; - margin: 0 10px; - z-index: 1; -} - -.ace_ghost_text { - opacity: 0.5; - font-style: italic; -} - -.ace_ghost_text_container > div { - white-space: pre; -} - -.ghost_text_line_wrapped::after { - content: "↩"; - position: absolute; -} - -.ace_lineWidgetContainer.ace_ghost_text { - margin: 0px 4px -} - -.ace_screenreader-only { - position:absolute; - left:-10000px; - top:auto; - width:1px; - height:1px; - overflow:hidden; -} - -.ace_hidden_token { - display: none; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,u,y){var o=n("../lib/dom"),h=n("../lib/oop"),d=n("../lib/event_emitter").EventEmitter,s=function(){function p(e,t){this.canvas=o.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(e){var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(e){this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height;var r=(e.lastRow+1)*this.lineHeight;rw.priority?1:0}var c=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),c){var f={info:1,warning:2,error:3};c.forEach(function(I){I.priority=f[I.type]||null}),c=c.sort(a);for(var v=this.renderer.session.$foldData,b=0;bthis.canvasHeight&&(_=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(_-this.halfMinDecorationHeight),S=Math.round(_+this.halfMinDecorationHeight)}l.fillStyle=t[c[b].type]||null,l.fillRect(0,E,this.canvasWidth,S-g)}}var T=this.renderer.session.selection.getCursor();if(T){var D=this.compensateFoldRows(T.row,v),E=Math.round((T.row-D)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,E,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(e,t){var r=0;if(t&&t.length>0)for(var l=0;lt[l].start.row&&e=t[l].end.row&&(r+=t[l].end.row-t[l].start.row);return r},p}();h.implement(s.prototype,d),u.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(n,u,y){var o=n("./lib/oop"),h=n("./lib/dom"),d=n("./lib/lang"),s=n("./config"),p=n("./layer/gutter").Gutter,e=n("./layer/marker").Marker,t=n("./layer/text").Text,r=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,a=n("./scrollbar").VScrollBar,c=n("./scrollbar_custom").HScrollBar,f=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,b=n("./layer/font_metrics").FontMetrics,A=n("./lib/event_emitter").EventEmitter,D=n("./css/editor-css"),E=n("./layer/decorators").Decorator,g=n("./lib/useragent"),S=n("./layer/text_util").isTextToken;h.importCssString(D,"ace_editor.css",!1);var $=function(){function _(T,I){var w=this;this.container=T||h.createElement("div"),h.addCssClass(this.container,"ace_editor"),h.HI_DPI&&h.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new e(this.content);var m=this.$textLayer=new t(this.content);this.canvas=m.element,this.$markerFront=new e(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new a(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(C){w.$scrollAnimation||w.session.setScrollTop(C.data-w.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){w.$scrollAnimation||w.session.setScrollLeft(C.data-w.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(C){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",C)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return _.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),h.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},_.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},_.prototype.updateLines=function(T,I,w){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},_.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},_.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},_.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},_.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},_.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},_.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},_.prototype.onResize=function(T,I,w,m){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var C=this.container;m||(m=C.clientHeight||C.scrollHeight),!m&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",m=C.clientHeight||C.scrollHeight),w||(w=C.clientWidth||C.scrollWidth);var x=this.$updateCachedSize(T,I,w,m);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!w&&!m)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(x|this.$changes,!0):this.$loop.schedule(x|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},_.prototype.$updateCachedSize=function(T,I,w,m){m-=this.$extraHeight||0;var C=0,x=this.$size,M={width:x.width,height:x.height,scrollerHeight:x.scrollerHeight,scrollerWidth:x.scrollerWidth};if(m&&(T||x.height!=m)&&(x.height=m,C|=this.CHANGE_SIZE,x.scrollerHeight=x.height,this.$horizScroll&&(x.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(x.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),w&&(T||x.width!=w)){C|=this.CHANGE_SIZE,x.width=w,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,h.setStyle(this.scrollBarH.element.style,"left",I+"px"),h.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),x.scrollerWidth=Math.max(0,w-I-this.scrollBarV.getWidth()-this.margin.h),h.setStyle(this.$gutter.style,"left",this.margin.left+"px");var F=this.scrollBarV.getWidth()+"px";h.setStyle(this.scrollBarH.element.style,"right",F),h.setStyle(this.scroller.style,"right",F),h.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(x.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(C|=this.CHANGE_FULL)}return x.$dirty=!w||!m,C&&this._signal("resize",M),C},_.prototype.onGutterResize=function(T){var I=this.$showGutter?T:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},_.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},_.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},_.prototype.getAnimatedScroll=function(){return this.$animatedScroll},_.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},_.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},_.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},_.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},_.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},_.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},_.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},_.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},_.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},_.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},_.prototype.getShowGutter=function(){return this.getOption("showGutter")},_.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},_.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=h.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=h.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},_.prototype.getContainerElement=function(){return this.container},_.prototype.getMouseEventTarget=function(){return this.scroller},_.prototype.getTextAreaContainer=function(){return this.container},_.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){h.translate(this.textarea,-100,0);return}var w=this.$cursorLayer.$pixelPos;if(w){I&&I.markerRange&&(w=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var m=this.layerConfig,C=w.top,x=w.left;C-=m.offset;var M=I&&I.useTextareaForIME||g.isMobile?this.lineHeight:1;if(C<0||C>m.height-M){h.translate(this.textarea,0,0);return}var F=1,R=this.$size.height-M;if(!I)C+=this.lineHeight;else if(I.useTextareaForIME){var N=this.textarea.value;F=this.characterWidth*this.session.$getStringScreenWidth(N)[0]}else C+=this.lineHeight+2;x-=this.scrollLeft,x>this.$size.scrollerWidth-F&&(x=this.$size.scrollerWidth-F),x+=this.gutterWidth+this.margin.left,h.setStyle(T,"height",M+"px"),h.setStyle(T,"width",F+"px"),h.translate(this.textarea,Math.min(x,this.$size.scrollerWidth-F),Math.min(C,R))}}},_.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},_.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},_.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,I=T.lastRow,w=this.session.documentToScreenRow(I,0)*T.lineHeight;return w-this.session.getScrollTop()>T.height-T.lineHeight?I-1:I},_.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},_.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},_.prototype.setScrollMargin=function(T,I,w,m){var C=this.scrollMargin;C.top=T|0,C.bottom=I|0,C.right=m|0,C.left=w|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},_.prototype.setMargin=function(T,I,w,m){var C=this.margin;C.top=T|0,C.bottom=I|0,C.right=m|0,C.left=w|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},_.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},_.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},_.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},_.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},_.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-I&&(T=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},_.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},_.prototype.freeze=function(){this.$frozen=!0},_.prototype.unfreeze=function(){this.$frozen=!1},_.prototype.$renderChanges=function(T,I){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!I){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var w=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),w.firstRow!=this.layerConfig.firstRow&&w.firstRowScreen==this.layerConfig.firstRowScreen){var m=this.scrollTop+(w.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;m>0&&(this.scrollTop=m,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}w=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),h.translate(this.content,-this.scrollLeft,-w.offset);var C=w.width+2*this.$padding+"px",x=w.minHeight+"px";h.setStyle(this.content.style,"width",C),h.setStyle(this.content.style,"height",x)}if(T&this.CHANGE_H_SCROLL&&(h.translate(this.content,-this.scrollLeft,-w.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),T&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(w):this.$textLayer.scrollLines(w),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(w):this.$gutterLayer.scrollLines(w)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(w),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(w),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(w),this._signal("afterRender",T)},_.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,w=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(w+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&w>this.$maxPixelHeight&&(w=this.$maxPixelHeight);var m=w<=2*this.lineHeight,C=!m&&T>I;if(w!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var x=this.container.clientWidth;this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,x,w),this.desiredHeight=w,this._signal("autosize")}},_.prototype.$computeLayerConfig=function(){var T=this.session,I=this.$size,w=I.height<=2*this.lineHeight,m=this.session.getScreenLength(),C=m*this.lineHeight,x=this.$getLongestLine(),M=!w&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-x-2*this.$padding<0),F=this.$horizScroll!==M;F&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),w=I.height<=2*this.lineHeight);var N=I.scrollerHeight+this.lineHeight,W=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=W;var B=this.scrollMargin;this.session.setScrollTop(Math.max(-B.top,Math.min(this.scrollTop,C-I.scrollerHeight+B.bottom))),this.session.setScrollLeft(Math.max(-B.left,Math.min(this.scrollLeft,x+2*this.$padding-I.scrollerWidth+B.right)));var V=!w&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-C+W<0||this.scrollTop>B.top),P=R!==V;P&&(this.$vScroll=V,this.scrollBarV.setVisible(V));var z=this.scrollTop%this.lineHeight,K=Math.ceil(N/this.lineHeight)-1,U=Math.max(0,Math.round((this.scrollTop-z)/this.lineHeight)),Y=U+K,ee,ne,te=this.lineHeight;U=T.screenToDocumentRow(U,0);var se=T.getFoldLine(U);se&&(U=se.start.row),ee=T.documentToScreenRow(U,0),ne=T.getRowLength(U)*te,Y=Math.min(T.screenToDocumentRow(Y,0),T.getLength()-1),N=I.scrollerHeight+T.getRowLength(Y)*te+ne,z=this.scrollTop-ee*te;var ve=0;return(this.layerConfig.width!=x||F)&&(ve=this.CHANGE_H_SCROLL),(F||P)&&(ve|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),P&&(x=this.$getLongestLine())),this.layerConfig={width:x,padding:this.$padding,firstRow:U,firstRowScreen:ee,lastRow:Y,lineHeight:te,characterWidth:this.characterWidth,minHeight:N,maxHeight:C,offset:z,gutterOffset:te?Math.max(0,Math.ceil((z+I.height-I.scrollerHeight)/te)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(x-this.$padding),ve},_.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var w=this.layerConfig;if(!(T>w.lastRow+1)&&!(Ithis.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*this.characterWidth))},_.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},_.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},_.prototype.addGutterDecoration=function(T,I){this.$gutterLayer.addGutterDecoration(T,I)},_.prototype.removeGutterDecoration=function(T,I){this.$gutterLayer.removeGutterDecoration(T,I)},_.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},_.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},_.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},_.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},_.prototype.showCursor=function(){this.$cursorLayer.showCursor()},_.prototype.scrollSelectionIntoView=function(T,I,w){this.scrollCursorIntoView(T,w),this.scrollCursorIntoView(I,w)},_.prototype.scrollCursorIntoView=function(T,I,w){if(this.$size.scrollerHeight!==0){var m=this.$cursorLayer.getPixelPosition(T),C=m.left,x=m.top,M=w&&w.top||0,F=w&&w.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+M>x?(I&&R+M>x+this.lineHeight&&(x-=I*this.$size.scrollerHeight),x===0&&(x=-this.scrollMargin.top),this.session.setScrollTop(x)):R+this.$size.scrollerHeight-F=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},_.prototype.pixelToScreenCoordinates=function(T,I){var w;if(this.$hasCssTransforms){w={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([T,I]);T=m[1]-this.gutterWidth-this.margin.left,I=m[0]}else w=this.scroller.getBoundingClientRect();var C=T+this.scrollLeft-w.left-this.$padding,x=C/this.characterWidth,M=Math.floor((I+this.scrollTop-w.top)/this.lineHeight),F=this.$blockCursor?Math.floor(x):Math.round(x);return{row:M,column:F,side:x-F>0?1:-1,offsetX:C}},_.prototype.screenToTextCoordinates=function(T,I){var w;if(this.$hasCssTransforms){w={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([T,I]);T=m[1]-this.gutterWidth-this.margin.left,I=m[0]}else w=this.scroller.getBoundingClientRect();var C=T+this.scrollLeft-w.left-this.$padding,x=C/this.characterWidth,M=this.$blockCursor?Math.floor(x):Math.round(x),F=Math.floor((I+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(F,Math.max(M,0),C)},_.prototype.textToScreenCoordinates=function(T,I){var w=this.scroller.getBoundingClientRect(),m=this.session.documentToScreenPosition(T,I),C=this.$padding+(this.session.$bidiHandler.isBidiRow(m.row,T)?this.session.$bidiHandler.getPosLeft(m.column):Math.round(m.column*this.characterWidth)),x=m.row*this.lineHeight;return{pageX:w.left+C-this.scrollLeft,pageY:w.top+x-this.scrollTop}},_.prototype.visualizeFocus=function(){h.addCssClass(this.container,"ace_focus")},_.prototype.visualizeBlur=function(){h.removeCssClass(this.container,"ace_focus")},_.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(h.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},_.prototype.setCompositionText=function(T){var I=this.session.selection.cursor;this.addToken(T,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},_.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),h.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},_.prototype.setGhostText=function(T,I){var w=this.session.selection.cursor,m=I||{row:w.row,column:w.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(T,m);this.addToken(C[0].text,"ghost_text",m.row,m.column),this.$ghostText={text:T,position:{row:m.row,column:m.column}};var x=h.createElement("div");if(C.length>1){var M=this.hideTokensAfterPosition(m.row,m.column),F;C.slice(1).forEach(function(P){var z=h.createElement("div"),K=h.createElement("span");K.className="ace_ghost_text",P.wrapped&&(z.className="ghost_text_line_wrapped"),P.text.length===0&&(P.text=" "),K.appendChild(h.createTextNode(P.text)),z.appendChild(K),x.appendChild(z),F=z}),M.forEach(function(P){var z=h.createElement("span");S(P.type)||(z.className="ace_"+P.type.replace(/\./g," ace_")),z.appendChild(h.createTextNode(P.value)),F.appendChild(z)}),this.$ghostTextWidget={el:x,row:m.row,column:m.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var R=this.$cursorLayer.getPixelPosition(m,!0),N=this.container,W=N.getBoundingClientRect().height,B=C.length*this.lineHeight,V=B0){var N=0;R.push(C[M].length);for(var W=0;W1||Math.abs(T.$size.height-m)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},_}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,o.implement($.prototype,A),s.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(_){!_&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):_&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(_){this.$textLayer.setShowInvisibles(_)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(_){typeof _=="number"&&(this.$printMarginColumn=_),this.$showPrintMargin=!!_,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(_){this.$gutter.style.display=_?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(_){this.$gutterLayer.$useSvgGutterIcons=_},initialValue:!1},showFoldedAnnotations:{set:function(_){this.$gutterLayer.$showFoldedAnnotations=_},initialValue:!1},fadeFoldWidgets:{set:function(_){h.setCssClass(this.$gutter,"ace_fade-fold-widgets",_)},initialValue:!1},showFoldWidgets:{set:function(_){this.$gutterLayer.setShowFoldWidgets(_),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(_){this.$textLayer.setDisplayIndentGuides(_)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(_){this.$textLayer.setHighlightIndentGuides(_)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(_){this.$gutterLayer.setHighlightGutterLine(_),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(_){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(_){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(_){typeof _=="number"&&(_=_+"px"),this.container.style.fontSize=_,this.updateFontSize()},initialValue:12},fontFamily:{set:function(_){this.container.style.fontFamily=_,this.updateFontSize()}},maxLines:{set:function(_){this.updateFull()}},minLines:{set:function(_){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(_){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(_){_=+_||0,this.$scrollPastEnd!=_&&(this.$scrollPastEnd=_,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(_){this.$gutterLayer.$fixedWidth=!!_,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(_){this.$updateCustomScrollbar(_)},initialValue:!1},theme:{set:function(_){this.setTheme(_)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),u.VirtualRenderer=$}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,u,y){var o=n("../lib/oop"),h=n("../lib/net"),d=n("../lib/event_emitter").EventEmitter,s=n("../config");function p(l){var a="importScripts('"+h.qualifyURL(l)+"');";try{return new Blob([a],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new c;return f.append(a),f.getBlob("application/javascript")}}function e(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var a=p(l),c=window.URL||window.webkitURL,f=c.createObjectURL(a);return new Worker(f)}return new Worker(l)}var t=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,d),this.$createWorkerFromOldConfig=function(l,a,c,f,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),s.get("packaged")||!n.toUrl)f=f||s.moduleUrl(a,"worker");else{var b=this.$normalizePath;f=f||b(n.toUrl("ace/worker/worker.js",null,"_"));var A={};l.forEach(function(D){A[D]=b(n.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=e(f),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:A,module:a,classname:c}),this.$worker},this.onMessage=function(l){var a=l.data;switch(a.type){case"event":this._signal(a.name,{data:a.data});break;case"call":var c=this.callbacks[a.id];c&&(c(a.data),delete this.callbacks[a.id]);break;case"error":this.reportError(a.data);break;case"log":window.console&&console.log&&console.log.apply(console,a.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return h.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,a){this.$worker.postMessage({command:l,args:a})},this.call=function(l,a,c){if(c){var f=this.callbackId++;this.callbacks[f]=c,a.push(f)}this.send(l,a)},this.emit=function(l,a){try{a.data&&a.data.err&&(a.data.err={message:a.data.err.message,stack:a.data.err.stack,code:a.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:a.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(t.prototype);var r=function(l,a,c){var f=null,v=!1,b=Object.create(d),A=[],D=new t({messageBuffer:A,terminate:function(){},postMessage:function(g){A.push(g),f&&(v?setTimeout(E):E())}});D.setEmitSync=function(g){v=g};var E=function(){var g=A.shift();g.command?f[g.command].apply(f,g.args):g.event&&b._signal(g.event,g.data)};return b.postMessage=function(g){D.onMessage({data:g})},b.callback=function(g,S){this.postMessage({type:"call",id:S,data:g})},b.emit=function(g,S){this.postMessage({type:"event",name:g,data:S})},s.loadModule(["worker",a],function(g){for(f=new g[c](b);A.length;)E()}),D};u.UIWorkerClient=r,u.WorkerClient=t,u.createWorker=e}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,u,y){var o=n("./range").Range,h=n("./lib/event_emitter").EventEmitter,d=n("./lib/oop"),s=function(){function p(e,t,r,l,a,c){var f=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=a,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){f.onCursorChange()})},this.$pos=r;var v=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var e=this,t=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=r.addMarker(new o(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(a){var c=t.createAnchor(a.row,a.column);c.$insertRight=!0,c.detach(),e.others.push(c)}),r.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=e.addMarker(new o(r.row,r.column,r.row,r.column+t.length),t.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,a=t.start.column-this.pos.column;if(this.updateAnchors(e),l&&(this.length+=r),l&&!this.session.$fromUndo){if(e.action==="insert")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],v={row:f.row,column:f.column+a};this.doc.insertMergedLines(v,e.lines)}else if(e.action==="remove")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],v={row:f.row,column:f.column+a};this.doc.remove(new o(v.row,v.column,v.row,v.column-r))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,r=function(a,c){t.removeMarker(a.markerId),a.markerId=t.addMarker(new o(a.row,a.column,a.row,a.column+e.length),c,null,!1)};r(this.pos,this.mainClass);for(var l=this.others.length;l--;)r(this.others[l],this.othersClass)}},p.prototype.onCursorChange=function(e){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,r=0;r1?h.multiSelect.joinSelections():h.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(h){h.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(h){h.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(h){h.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],u.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(h){h.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(h){return h&&h.inMultiSelectMode}}];var o=n("../keyboard/hash_handler").HashHandler;u.keyboardHandler=new o(u.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,u,y){var o=n("./range_list").RangeList,h=n("./range").Range,d=n("./selection").Selection,s=n("./mouse/multi_select_handler").onMouseDown,p=n("./lib/event"),e=n("./lib/lang"),t=n("./commands/multi_select_commands");u.commands=t.defaultCommands.concat(t.multiSelectCommands);var r=n("./search").Search,l=new r;function a(D,E,g){return l.$options.wrap=!0,l.$options.needle=E,l.$options.backwards=g==-1,l.find(D)}var c=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,E){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),E||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}D.cursor||(D.cursor=D.end);var S=this.rangeList.add(D);return this.$onAddRange(D),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),E||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var E=this.rangeList.removeAll();E.length&&this.$onRemoveRange(E),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var E=this.rangeList.substractPoint(D);if(E)return this.$onRemoveRange(E),E[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var E=this.rangeList.ranges.pop();D.push(E),this.rangeCount=0}for(var g=D.length;g--;){var S=this.ranges.indexOf(D[g]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),E=E||this.ranges[0],E&&!E.isEqual(this.getRange())&&this.fromOrientedRange(E)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],E=[],g=0;g1){var D=this.rangeList.ranges,E=D[D.length-1],g=h.fromPoints(D[0].start,E.end);this.toSingleRange(),this.setSelectionRange(g,E.cursor==E.start)}else{var S=this.session.documentToScreenPosition(this.cursor),$=this.session.documentToScreenPosition(this.anchor),_=this.rectangularRangeBlock(S,$);_.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,E,g){var S=[],$=D.column0;)N--;if(N>0)for(var W=0;S[W].isEmpty();)W++;for(var B=N;B>=W;B--)S[B].isEmpty()&&S.splice(B,1)}return S}}.call(d.prototype);var f=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var E=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",E),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var E=this.session.$selectionMarkers.indexOf(D);E!=-1&&this.session.$selectionMarkers.splice(E,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var E=this.session.$selectionMarkers,g=D.length;g--;){var S=D[g];if(S.marker){this.session.removeMarker(S.marker);var $=E.indexOf(S);$!=-1&&E.splice($,1)}}this.session.selectionMarkerCount=E.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(t.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(t.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var E=D.command,g=D.editor;if(g.multiSelect){if(E.multiSelectAction)E.multiSelectAction=="forEach"?S=g.forEachSelection(E,D.args):E.multiSelectAction=="forEachLine"?S=g.forEachSelection(E,D.args,!0):E.multiSelectAction=="single"?(g.exitMultiSelectMode(),S=E.exec(g,D.args||{})):S=E.multiSelectAction(g,D.args||{});else{var S=E.exec(g,D.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(D,E,g){if(!this.inVirtualSelectionMode){var S=g&&g.keepOrder,$=g==!0||g&&g.$byLines,_=this.session,T=this.selection,I=T.rangeList,w=(S?T:I).ranges,m;if(!w.length)return D.exec?D.exec(this,E||{}):D(this,E||{});var C=T._eventRegistry;T._eventRegistry={};var x=new d(_);this.inVirtualSelectionMode=!0;for(var M=w.length;M--;){if($)for(;M>0&&w[M].start.row==w[M-1].end.row;)M--;x.fromOrientedRange(w[M]),x.index=M,this.selection=_.selection=x;var F=D.exec?D.exec(this,E||{}):D(this,E||{});!m&&F!==void 0&&(m=F),x.toOrientedRange(w[M])}x.detach(),this.selection=_.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=C,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),m}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var E=this.multiSelect.rangeList.ranges,g=[],S=0;S0);T<0&&(T=0),I>=m&&(I=m-1)}var x=this.session.removeFullLines(T,I);x=this.$reAlignText(x,w),this.session.insert({row:T,column:0},x.join(` -`)+` -`),w||(_.start.column=0,_.end.column=x[x.length-1].length),this.selection.setRange(_)}else{$.forEach(function(N){E.substractPoint(N.cursor)});var M=0,F=1/0,R=g.map(function(N){var W=N.cursor,B=D.getLine(W.row),V=B.substr(W.column).search(/\S/g);return V==-1&&(V=0),W.column>M&&(M=W.column),VP?D.insert(B,e.stringRepeat(" ",V-P)):D.remove(new h(B.row,B.column,B.row,B.column-V+P)),N.start.column=N.end.column=M,N.start.row=N.end.row=B.row,N.cursor=N.end}),E.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,E){var g=!0,S=!0,$,_,T;return D.map(function(x){var M=x.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?$==null?($=M[1].length,_=M[2].length,T=M[3].length,M):($+_+T!=M[1].length+M[2].length+M[3].length&&(S=!1),$!=M[1].length&&(g=!1),$>M[1].length&&($=M[1].length),_M[3].length&&(T=M[3].length),M):[x]}).map(E?w:g?S?m:w:C);function I(x){return e.stringRepeat(" ",x)}function w(x){return x[2]?I($)+x[2]+I(_-x[2].length+T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function m(x){return x[2]?I($+_-x[2].length)+x[2]+I(T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function C(x){return x[2]?I($)+x[2]+I(T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}}}).call(f.prototype);function v(D,E){return D.row==E.row&&D.column==E.column}u.onSessionChange=function(D){var E=D.session;E&&!E.multiSelect&&(E.$selectionMarkers=[],E.selection.$initRangeList(),E.multiSelect=E.selection),this.multiSelect=E&&E.multiSelect;var g=D.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),E&&(E.multiSelect.on("addRange",this.$onAddRange),E.multiSelect.on("removeRange",this.$onRemoveRange),E.multiSelect.on("multiSelect",this.$onMultiSelect),E.multiSelect.on("singleSelect",this.$onSingleSelect),E.multiSelect.lead.on("change",this.$checkMultiselectChange),E.multiSelect.anchor.on("change",this.$checkMultiselectChange)),E&&this.inMultiSelectMode!=E.selection.inMultiSelectMode&&(E.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=u.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",s),D.commands.addCommands(t.defaultCommands),A(D))}function A(D){if(!D.textInput)return;var E=D.textInput.getElement(),g=!1;p.addListener(E,"keydown",function($){var _=$.keyCode==18&&!($.ctrlKey||$.shiftKey||$.metaKey);D.$blockSelectEnabled&&_?g||(D.renderer.setMouseCursor("crosshair"),g=!0):g&&S()},D),p.addListener(E,"keyup",S,D),p.addListener(E,"blur",S,D);function S($){g&&(D.renderer.setMouseCursor(""),g=!1)}}u.MultiSelect=b,n("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(D){b(this),D?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,u,y){var o=n("../../range").Range,h=u.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,s,p){var e=d.getLine(p);return this.foldingStartMarker.test(e)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(d,s,p){return null},this.indentationBlock=function(d,s,p){var e=/\S/,t=d.getLine(s),r=t.search(e);if(r!=-1){for(var l=p||t.length,a=d.getLength(),c=s,f=s;++sc){var A=d.getLine(f).length;return new o(c,l,f,A)}}},this.openingBracketBlock=function(d,s,p,e,t){var r={row:p,column:e+1},l=d.$findClosingBracket(s,r,t);if(l){var a=d.foldWidgets[l.row];return a==null&&(a=d.getFoldWidget(l.row)),a=="start"&&l.row>r.row&&(l.row--,l.column=d.getLine(l.row).length),o.fromPoints(r,l)}},this.closingBracketBlock=function(d,s,p,e,t){var r={row:p,column:e},l=d.$findOpeningBracket(s,r);if(l)return l.column++,r.column--,o.fromPoints(l,r)}}).call(h.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,u,y){var o=n("../lib/dom"),h=n("../range").Range,d=n("../config").nls;function s(e,t,r){for(var l=0,a=e.length-1;l<=a;){var c=l+a>>1,f=r(t,e[c]);if(f>0)l=c+1;else if(f<0)a=c-1;else return c}return-(l+1)}function p(e,t,r){var l=e.getAnnotations().sort(h.comparePoints);if(l.length){var a=s(l,{row:t,column:-1},h.comparePoints);a<0&&(a=-a-1),a>=l.length?a=r>0?0:l.length-1:a===0&&r<0&&(a=l.length-1);var c=l[a];if(!(!c||!r)){if(c.row===t){do c=l[a+=r];while(c&&c.row===t);if(!c)return l.slice()}var f=[];t=c.row;do f[r<0?"unshift":"push"](c),c=l[a+=r];while(c&&c.row==t);return f.length&&f}}}u.showErrorMarker=function(e,t){var r=e.session,l=e.getCursorPosition(),a=l.row,c=r.widgetManager.getWidgetsAtRow(a).filter(function($){return $.type=="errorMarker"})[0];c?c.destroy():a-=t;var f=p(r,a,t),v;if(f){var b=f[0];l.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,l.row=b.row,v=e.renderer.$gutterLayer.$annotations[l.row]}else{if(c)return;v={displayText:[d("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(l.row),e.selection.moveToPosition(l);var A={row:l.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},D=A.el.appendChild(o.createElement("div")),E=A.el.appendChild(o.createElement("div"));E.className="error_widget_arrow "+v.className;var g=e.renderer.$cursorLayer.getPixelPosition(l).left;E.style.left=g+e.renderer.gutterWidth-5+"px",A.el.className="error_widget_wrapper",D.className="error_widget "+v.className,v.displayText.forEach(function($,_){D.appendChild(o.createTextNode($)),_-1}function yr(H,J){var q=this.__data__,ie=Xt(q,H);return ie<0?(++this.size,q.push([H,J])):q[ie][1]=J,this}qe.prototype.clear=fr,qe.prototype.delete=gr,qe.prototype.get=mr,qe.prototype.has=vr,qe.prototype.set=yr;function vt(H){var J=-1,q=H==null?0:H.length;for(this.clear();++JLe))return!1;var $e=he.get(H);if($e&&he.get(J))return $e==J;var Pe=-1,Ue=!0,Oe=q&o?new Qt:void 0;for(he.set(H,J),he.set(J,H);++Pe-1&&H%1==0&&H-1&&H%1==0&&H<=h}function ai(H){var J=typeof H;return H!=null&&(J=="object"||J=="function")}function Ht(H){return H!=null&&typeof H=="object"}var li=_e?Rt(_e):Rr;function Yr(H){return Kr(H)?Mr(H):Or(H)}function Qr(){return[]}function Xr(){return!1}L.exports=Jr})(gn,gn.exports);var Gi=gn.exports,Je={};Object.defineProperty(Je,"__esModule",{value:!0});Je.getAceInstance=Je.debounce=Je.editorEvents=Je.editorOptions=void 0;var uo=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Je.editorOptions=uo;var ho=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Je.editorEvents=ho;var co=function(){var L;return typeof window>"u"?(He.window={},L=fn,delete He.window):window.ace?(L=window.ace,L.acequire=window.ace.require||window.ace.acequire):L=fn,L};Je.getAceInstance=co;var po=function(L,i){var n=null;return function(){var u=this,y=arguments;clearTimeout(n),n=setTimeout(function(){L.apply(u,y)},i)}};Je.debounce=po;var fo=St&&St.__extends||function(){var L=function(i,n){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,y){u.__proto__=y}||function(u,y){for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(u[o]=y[o])},L(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");L(i,n);function u(){this.constructor=i}i.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}(),jn=St&&St.__assign||function(){return jn=Object.assign||function(L){for(var i,n=1,u=arguments.length;n0&&this.handleMarkers(S);var I=this.editor.$options;Lt.editorOptions.forEach(function(w){I.hasOwnProperty(w)?n.editor.setOption(w,n.props[w]):n.props[w]&&console.warn("ReactAce: editor option ".concat(w," 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(E)&&E.forEach(function(w){typeof w.exec=="string"?n.editor.commands.bindKey(w.bindKey,w.exec):n.editor.commands.addCommand(w)}),A&&this.editor.setKeyboardHandler("ace/keyboard/"+A),y&&(this.refEditor.className+=" "+y),D&&D(this.editor),this.editor.resize(),s&&this.editor.focus()},i.prototype.componentDidUpdate=function(n){for(var u=n,y=this.props,o=0;o 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splitst;)r=this.$editors[this.$splits-1],this.$container.removeChild(r.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(r){r.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(r){r.setKeyboardHandler(t)})},this.forEach=function(t,r){this.$editors.forEach(t,r)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(r){r.setFontSize(t)})},this.$cloneSession=function(t){var r=new p(t.getDocument(),t.getMode()),l=t.getUndoManager();return r.setUndoManager(l),r.setTabSize(t.getTabSize()),r.setUseSoftTabs(t.getUseSoftTabs()),r.setOverwrite(t.getOverwrite()),r.setBreakpoints(t.getBreakpoints()),r.setUseWrapMode(t.getUseWrapMode()),r.setUseWorker(t.getUseWorker()),r.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),r.$foldData=t.$cloneFoldData(),r},this.setSession=function(t,r){var l;r==null?l=this.$cEditor:l=this.$editors[r];var a=this.$editors.some(function(c){return c.session===t});return a&&(t=this.$cloneSession(t)),l.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t=this.$container.clientWidth,r=this.$container.clientHeight,l;if(this.$orientation==this.BESIDE)for(var a=t/this.$splits,c=0;c-1}function Ko(L,i){var n=this.__data__,u=vn(n,L);return u<0?n.push([L,i]):n[u][1]=i,this}Ft.prototype.clear=jo;Ft.prototype.delete=Vo;Ft.prototype.get=Uo;Ft.prototype.has=Go;Ft.prototype.set=Ko;function xt(L){var i=-1,n=L?L.length:0;for(this.clear();++i0&&n.handleMarkers(R,w);for(var C=0;C"u"&&(this.Diff_Timeout<=0?s=Number.MAX_VALUE:s=new Date().getTime()+this.Diff_Timeout*1e3);var p=s;if(o==null||h==null)throw new Error("Null input. (diff_main)");if(o==h)return o?[new i.Diff(y,o)]:[];typeof d>"u"&&(d=!0);var e=d,t=this.diff_commonPrefix(o,h),r=o.substring(0,t);o=o.substring(t),h=h.substring(t),t=this.diff_commonSuffix(o,h);var l=o.substring(o.length-t);o=o.substring(0,o.length-t),h=h.substring(0,h.length-t);var a=this.diff_compute_(o,h,e,p);return r&&a.unshift(new i.Diff(y,r)),l&&a.push(new i.Diff(y,l)),this.diff_cleanupMerge(a),a},i.prototype.diff_compute_=function(o,h,d,s){var p;if(!o)return[new i.Diff(u,h)];if(!h)return[new i.Diff(n,o)];var e=o.length>h.length?o:h,t=o.length>h.length?h:o,r=e.indexOf(t);if(r!=-1)return p=[new i.Diff(u,e.substring(0,r)),new i.Diff(y,t),new i.Diff(u,e.substring(r+t.length))],o.length>h.length&&(p[0][0]=p[2][0]=n),p;if(t.length==1)return[new i.Diff(n,o),new i.Diff(u,h)];var l=this.diff_halfMatch_(o,h);if(l){var a=l[0],c=l[1],f=l[2],v=l[3],b=l[4],A=this.diff_main(a,f,d,s),D=this.diff_main(c,v,d,s);return A.concat([new i.Diff(y,b)],D)}return d&&o.length>100&&h.length>100?this.diff_lineMode_(o,h,s):this.diff_bisect_(o,h,s)},i.prototype.diff_lineMode_=function(o,h,d){var s=this.diff_linesToChars_(o,h);o=s.chars1,h=s.chars2;var p=s.lineArray,e=this.diff_main(o,h,!1,d);this.diff_charsToLines_(e,p),this.diff_cleanupSemantic(e),e.push(new i.Diff(y,""));for(var t=0,r=0,l=0,a="",c="";t=1&&l>=1){e.splice(t-r-l,r+l),t=t-r-l;for(var f=this.diff_main(a,c,!1,d),v=f.length-1;v>=0;v--)e.splice(t,0,f[v]);t=t+f.length}l=0,r=0,a="",c="";break}t++}return e.pop(),e},i.prototype.diff_bisect_=function(o,h,d){for(var s=o.length,p=h.length,e=Math.ceil((s+p)/2),t=e,r=2*e,l=new Array(r),a=new Array(r),c=0;cd);g++){for(var S=-g+b;S<=g-A;S+=2){var $=t+S,_;S==-g||S!=g&&l[$-1]s)A+=2;else if(T>p)b+=2;else if(v){var I=t+f-S;if(I>=0&&I=w)return this.diff_bisectSplit_(o,h,_,T,d)}}}for(var m=-g+D;m<=g-E;m+=2){var I=t+m,w;m==-g||m!=g&&a[I-1]s)E+=2;else if(C>p)D+=2;else if(!v){var $=t+f-m;if($>=0&&$=w)return this.diff_bisectSplit_(o,h,_,T,d)}}}}return[new i.Diff(n,o),new i.Diff(u,h)]},i.prototype.diff_bisectSplit_=function(o,h,d,s,p){var e=o.substring(0,d),t=h.substring(0,s),r=o.substring(d),l=h.substring(s),a=this.diff_main(e,t,!1,p),c=this.diff_main(r,l,!1,p);return a.concat(c)},i.prototype.diff_linesToChars_=function(o,h){var d=[],s={};d[0]="";function p(l){for(var a="",c=0,f=-1,v=d.length;fs?o=o.substring(d-s):dh.length?o:h,s=o.length>h.length?h:o;if(d.length<4||s.length*2=A.length?[_,T,I,w,$]:null}var t=e(d,s,Math.ceil(d.length/4)),r=e(d,s,Math.ceil(d.length/2)),l;if(!t&&!r)return null;r?t?l=t[4].length>r[4].length?t:r:l=r:l=t;var a,c,f,v;o.length>h.length?(a=l[0],c=l[1],f=l[2],v=l[3]):(f=l[0],v=l[1],a=l[2],c=l[3]);var b=l[4];return[a,c,f,v,b]},i.prototype.diff_cleanupSemantic=function(o){for(var h=!1,d=[],s=0,p=null,e=0,t=0,r=0,l=0,a=0;e0?d[s-1]:-1,t=0,r=0,l=0,a=0,p=null,h=!0)),e++;for(h&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),e=1;e=b?(v>=c.length/2||v>=f.length/2)&&(o.splice(e,0,new i.Diff(y,f.substring(0,v))),o[e-1][1]=c.substring(0,c.length-v),o[e+1][1]=f.substring(v),e++):(b>=c.length/2||b>=f.length/2)&&(o.splice(e,0,new i.Diff(y,c.substring(0,b))),o[e-1][0]=u,o[e-1][1]=f.substring(0,f.length-b),o[e+1][0]=n,o[e+1][1]=c.substring(b),e++),e++}e++}},i.prototype.diff_cleanupSemanticLossless=function(o){function h(b,A){if(!b||!A)return 6;var D=b.charAt(b.length-1),E=A.charAt(0),g=D.match(i.nonAlphaNumericRegex_),S=E.match(i.nonAlphaNumericRegex_),$=g&&D.match(i.whitespaceRegex_),_=S&&E.match(i.whitespaceRegex_),T=$&&D.match(i.linebreakRegex_),I=_&&E.match(i.linebreakRegex_),w=T&&b.match(i.blanklineEndRegex_),m=I&&A.match(i.blanklineStartRegex_);return w||m?5:T||I?4:g&&!$&&_?3:$||_?2:g||S?1:0}for(var d=1;d=f&&(f=v,l=s,a=p,c=e)}o[d-1][1]!=l&&(l?o[d-1][1]=l:(o.splice(d-1,1),d--),o[d][1]=a,c?o[d+1][1]=c:(o.splice(d+1,1),d--))}d++}},i.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,i.whitespaceRegex_=/\s/,i.linebreakRegex_=/[\r\n]/,i.blanklineEndRegex_=/\n\r?\n$/,i.blanklineStartRegex_=/^\r?\n\r?\n/,i.prototype.diff_cleanupEfficiency=function(o){for(var h=!1,d=[],s=0,p=null,e=0,t=!1,r=!1,l=!1,a=!1;e0?d[s-1]:-1,l=a=!1),h=!0)),e++;h&&this.diff_cleanupMerge(o)},i.prototype.diff_cleanupMerge=function(o){o.push(new i.Diff(y,""));for(var h=0,d=0,s=0,p="",e="",t;h1?(d!==0&&s!==0&&(t=this.diff_commonPrefix(e,p),t!==0&&(h-d-s>0&&o[h-d-s-1][0]==y?o[h-d-s-1][1]+=e.substring(0,t):(o.splice(0,0,new i.Diff(y,e.substring(0,t))),h++),e=e.substring(t),p=p.substring(t)),t=this.diff_commonSuffix(e,p),t!==0&&(o[h][1]=e.substring(e.length-t)+o[h][1],e=e.substring(0,e.length-t),p=p.substring(0,p.length-t))),h-=d+s,o.splice(h,d+s),p.length&&(o.splice(h,0,new i.Diff(n,p)),h++),e.length&&(o.splice(h,0,new i.Diff(u,e)),h++),h++):h!==0&&o[h-1][0]==y?(o[h-1][1]+=o[h][1],o.splice(h,1)):h++,s=0,d=0,p="",e="";break}o[o.length-1][1]===""&&o.pop();var r=!1;for(h=1;hh));t++)p=d,e=s;return o.length!=t&&o[t][0]===n?e:e+(h-p)},i.prototype.diff_prettyHtml=function(o){for(var h=[],d=/&/g,s=//g,e=/\n/g,t=0;t");switch(r){case u:h[t]=''+a+"";break;case n:h[t]=''+a+"";break;case y:h[t]=""+a+"";break}}return h.join("")},i.prototype.diff_text1=function(o){for(var h=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var s=this.match_alphabet_(h),p=this;function e(_,T){var I=_/h.length,w=Math.abs(d-T);return p.Match_Distance?I+w/p.Match_Distance:w?1:I}var t=this.Match_Threshold,r=o.indexOf(h,d);r!=-1&&(t=Math.min(e(0,r),t),r=o.lastIndexOf(h,d+h.length),r!=-1&&(t=Math.min(e(0,r),t)));var l=1<=A;g--){var S=s[o.charAt(g-1)];if(b===0?E[g]=(E[g+1]<<1|1)&S:E[g]=(E[g+1]<<1|1)&S|((v[g+1]|v[g])<<1|1)|v[g+1],E[g]&l){var $=e(b,g-1);if($<=t)if(t=$,r=g-1,r>d)A=Math.max(1,2*d-r);else break}}if(e(b+1,d)>t)break;v=E}return r},i.prototype.match_alphabet_=function(o){for(var h={},d=0;d"u")s=o,p=this.diff_main(s,h,!0),p.length>2&&(this.diff_cleanupSemantic(p),this.diff_cleanupEfficiency(p));else if(o&&typeof o=="object"&&typeof h>"u"&&typeof d>"u")p=o,s=this.diff_text1(p);else if(typeof o=="string"&&h&&typeof h=="object"&&typeof d>"u")s=o,p=h;else if(typeof o=="string"&&typeof h=="string"&&d&&typeof d=="object")s=o,p=d;else throw new Error("Unknown call format to patch_make.");if(p.length===0)return[];for(var e=[],t=new i.patch_obj,r=0,l=0,a=0,c=s,f=s,v=0;v=2*this.Patch_Margin&&r&&(this.patch_addContext_(t,c),e.push(t),t=new i.patch_obj,r=0,c=f,l=a);break}b!==u&&(l+=A.length),b!==n&&(a+=A.length)}return r&&(this.patch_addContext_(t,c),e.push(t)),e},i.prototype.patch_deepCopy=function(o){for(var h=[],d=0;dthis.Match_MaxBits?(l=this.match_main(h,r.substring(0,this.Match_MaxBits),t),l!=-1&&(a=this.match_main(h,r.substring(r.length-this.Match_MaxBits),t+r.length-this.Match_MaxBits),(a==-1||l>=a)&&(l=-1))):l=this.match_main(h,r,t),l==-1)p[e]=!1,s-=o[e].length2-o[e].length1;else{p[e]=!0,s=l-t;var c;if(a==-1?c=h.substring(l,l+r.length):c=h.substring(l,a+this.Match_MaxBits),r==c)h=h.substring(0,l)+this.diff_text2(o[e].diffs)+h.substring(l+r.length);else{var f=this.diff_main(r,c,!1);if(r.length>this.Match_MaxBits&&this.diff_levenshtein(f)/r.length>this.Patch_DeleteThreshold)p[e]=!1;else{this.diff_cleanupSemanticLossless(f);for(var v=0,b,A=0;Ae[0][1].length){var t=h-e[0][1].length;e[0][1]=d.substring(e[0][1].length)+e[0][1],p.start1-=t,p.start2-=t,p.length1+=t,p.length2+=t}if(p=o[o.length-1],e=p.diffs,e.length==0||e[e.length-1][0]!=y)e.push(new i.Diff(y,d)),p.length1+=h,p.length2+=h;else if(h>e[e.length-1][1].length){var t=h-e[e.length-1][1].length;e[e.length-1][1]+=d.substring(0,t),p.length1+=t,p.length2+=t}return d},i.prototype.patch_splitMax=function(o){for(var h=this.Match_MaxBits,d=0;d2*h?(r.length1+=c.length,p+=c.length,l=!1,r.diffs.push(new i.Diff(a,c)),s.diffs.shift()):(c=c.substring(0,h-r.length1-this.Patch_Margin),r.length1+=c.length,p+=c.length,a===y?(r.length2+=c.length,e+=c.length):l=!1,r.diffs.push(new i.Diff(a,c)),c==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(c.length))}t=this.diff_text2(r.diffs),t=t.substring(t.length-this.Patch_Margin);var f=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);f!==""&&(r.length1+=f.length,r.length2+=f.length,r.diffs.length!==0&&r.diffs[r.diffs.length-1][0]===y?r.diffs[r.diffs.length-1][1]+=f:r.diffs.push(new i.Diff(y,f))),l||o.splice(++d,0,r)}}},i.prototype.patch_toText=function(o){for(var h=[],d=0;dv)break;var b=this.getFoldWidgetRange(p,"all",e);if(b){if(b.start.row<=l)break;if(b.isMultiLine())e=b.end.row;else if(r==v)break}c=e}}return new h(l,a,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,e,t){for(var r=e.search(/\s*$/),l=p.getLength(),a=t,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++ta)return new h(a,r,b,e.length)}}.call(s.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(n,u,y){var o=n("../lib/oop"),h=n("./text").Mode,d=n("./json_highlight_rules").JsonHighlightRules,s=n("./matching_brace_outdent").MatchingBraceOutdent,p=n("./folding/cstyle").FoldMode,e=n("../worker/worker_client").WorkerClient,t=function(){this.HighlightRules=d,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};o.inherits(t,h),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,l,a){var c=this.$getIndent(l);if(r=="start"){var f=l.match(/^.*[\{\(\[]\s*$/);f&&(c+=a)}return c},this.checkOutdent=function(r,l,a){return this.$outdent.checkOutdent(l,a)},this.autoOutdent=function(r,l,a){this.$outdent.autoOutdent(l,a)},this.createWorker=function(r){var l=new e(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(r.getDocument()),l.on("annotate",function(a){r.setAnnotations(a.data)}),l.on("terminate",function(){r.clearAnnotations()}),l},this.$id="ace/mode/json"}.call(t.prototype),u.Mode=t}),function(){ace.require(["ace/mode/json"],function(n){L&&(L.exports=n)})}()})(Ta);var _a={exports:{}};(function(L,i){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,u,y){var o=n("../lib/oop"),h=n("./text_highlight_rules").TextHighlightRules,d=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"}]}};o.inherits(d,h),u.JsonHighlightRules=d}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(n,u,y){var o=n("../lib/oop"),h=n("./json_highlight_rules").JsonHighlightRules,d=function(){h.call(this);var s=[{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 p in this.$rules)this.$rules[p].unshift.apply(this.$rules[p],s);this.normalizeRules()};o.inherits(d,h),u.Json5HighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,u,y){var o=n("../range").Range,h=function(){};(function(){this.checkOutdent=function(d,s){return/^\s+$/.test(d)?/^\s*\}/.test(s):!1},this.autoOutdent=function(d,s){var p=d.getLine(s),e=p.match(/^(\s*\})/);if(!e)return 0;var t=e[1].length,r=d.findMatchingBracket({row:s,column:t});if(!r||r.row==s)return 0;var l=this.$getIndent(d.getLine(r.row));d.replace(new o(s,0,s,t-1),l)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(h.prototype),u.MatchingBraceOutdent=h}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,u,y){var o=n("../../lib/oop"),h=n("../../range").Range,d=n("./fold_mode").FoldMode,s=u.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};o.inherits(s,d),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(p,e,t){var r=p.getLine(t);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var l=this._getFoldWidgetBase(p,e,t);return!l&&this.startRegionRe.test(r)?"start":l},this.getFoldWidgetRange=function(p,e,t,r){var l=p.getLine(t);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(p,l,t);var f=l.match(this.foldingStartMarker);if(f){var a=f.index;if(f[1])return this.openingBracketBlock(p,f[1],t,a);var c=p.getCommentFoldRange(t,a+f[0].length,1);return c&&!c.isMultiLine()&&(r?c=this.getSectionRange(p,t):e!="all"&&(c=null)),c}if(e!=="markbegin"){var f=l.match(this.foldingStopMarker);if(f){var a=f.index+f[0].length;return f[1]?this.closingBracketBlock(p,f[1],t,a):p.getCommentFoldRange(t,a,-1)}}},this.getSectionRange=function(p,e){var t=p.getLine(e),r=t.search(/\S/),l=e,a=t.length;e+=1;for(var c=e,f=p.getLength();++ev)break;var b=this.getFoldWidgetRange(p,"all",e);if(b){if(b.start.row<=l)break;if(b.isMultiLine())e=b.end.row;else if(r==v)break}c=e}}return new h(l,a,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,e,t){for(var r=e.search(/\s*$/),l=p.getLength(),a=t,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++ta)return new h(a,r,b,e.length)}}.call(s.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(n,u,y){var o=n("../lib/oop"),h=n("./text").Mode,d=n("./json5_highlight_rules").Json5HighlightRules,s=n("./matching_brace_outdent").MatchingBraceOutdent,p=n("./folding/cstyle").FoldMode,e=function(){this.HighlightRules=d,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};o.inherits(e,h),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(t,r,l){return this.$outdent.checkOutdent(r,l)},this.autoOutdent=function(t,r,l){this.$outdent.autoOutdent(r,l)},this.$id="ace/mode/json5"}.call(e.prototype),u.Mode=e}),function(){ace.require(["ace/mode/json5"],function(n){L&&(L.exports=n)})}()})(_a);var ka={};(function(L){function i(y,o){for(var h=y,d="";h;){var s=o[h];if(typeof s=="string")return s+d;if(s)return s.location.replace(/\/*$/,"/")+(d||s.main||s.name);if(s===!1)return"";var p=h.lastIndexOf("/");if(p===-1)break;d=h.substr(p)+d,h=h.slice(0,p)}return y}if(!(typeof L.window<"u"&&L.document)&&!(L.require&&L.define)){L.console||(L.console=function(){var y=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:y})},L.console.error=L.console.warn=L.console.log=L.console.trace=L.console),L.window=L,L.ace=L,L.onerror=function(y,o,h,d,s){postMessage({type:"error",data:{message:y,data:s&&s.data,file:o,line:h,col:d,stack:s&&s.stack}})},L.normalizeModule=function(y,o){if(o.indexOf("!")!==-1){var h=o.split("!");return L.normalizeModule(y,h[0])+"!"+L.normalizeModule(y,h[1])}if(o.charAt(0)=="."){var d=y.split("/").slice(0,-1).join("/");for(o=(d?d+"/":"")+o;o.indexOf(".")!==-1&&s!=o;){var s=o;o=o.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},L.require=function(y,o){if(o||(o=y,y=null),!o.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");o=L.normalizeModule(y,o);var h=L.require.modules[o];if(h)return h.initialized||(h.initialized=!0,h.exports=h.factory().exports),h.exports;if(!L.require.tlns)return console.log("unable to load "+o);var d=i(o,L.require.tlns);return d.slice(-3)!=".js"&&(d+=".js"),L.require.id=o,L.require.modules[o]={},importScripts(d),L.require(y,o)},L.require.modules={},L.require.tlns={},L.define=function(y,o,h){if(arguments.length==2?(h=o,typeof y!="string"&&(o=y,y=L.require.id)):arguments.length==1&&(h=y,o=[],y=L.require.id),typeof h!="function"){L.require.modules[y]={exports:h,initialized:!0};return}o.length||(o=["require","exports","module"]);var d=function(s){return L.require(y,s)};L.require.modules[y]={exports:{},factory:function(){var s=this,p=h.apply(this,o.slice(0,h.length).map(function(e){switch(e){case"require":return d;case"exports":return s.exports;case"module":return s;default:return d(e)}}));return p&&(s.exports=p),s}}},L.define.amd={},L.require.tlns={},L.initBaseUrls=function(y){for(var o in y)this.require.tlns[o]=y[o]},L.initSender=function(){var y=L.require("ace/lib/event_emitter").EventEmitter,o=L.require("ace/lib/oop"),h=function(){};return function(){o.implement(this,y),this.callback=function(d,s){postMessage({type:"call",id:s,data:d})},this.emit=function(d,s){postMessage({type:"event",name:d,data:s})}}.call(h.prototype),new h};var n=L.main=null,u=L.sender=null;L.onmessage=function(y){var o=y.data;if(o.event&&u)u._signal(o.event,o.data);else if(o.command)if(n[o.command])n[o.command].apply(n,o.args);else{if(!L[o.command])throw new Error("Unknown command:"+o.command);L[o.command].apply(L,o.args)}else if(o.init){L.initBaseUrls(o.tlns),u=L.sender=L.initSender();var h=this.require(o.module)[o.classname];n=L.main=new h(u)}}}})(ka),ace.define("ace/lib/oop",[],function(L,i,n){i.inherits=function(u,y){u.super_=y,u.prototype=Object.create(y.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(u,y){for(var o in y)u[o]=y[o];return u},i.implement=function(u,y){i.mixin(u,y)}}),ace.define("ace/apply_delta",[],function(L,i,n){i.applyDelta=function(u,y,o){var h=y.start.row,d=y.start.column,s=u[h]||"";switch(y.action){case"insert":var p=y.lines;if(p.length===1)u[h]=s.substring(0,d)+y.lines[0]+s.substring(d);else{var e=[h,1].concat(y.lines);u.splice.apply(u,e),u[h]=s.substring(0,d)+u[h],u[h+y.lines.length-1]+=s.substring(d)}break;case"remove":var t=y.end.column,r=y.end.row;h===r?u[h]=s.substring(0,d)+s.substring(t):u.splice(h,r-h+1,s.substring(0,d)+u[r].substring(t))}}}),ace.define("ace/lib/event_emitter",[],function(L,i,n){var u={},y=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};u._emit=u._dispatchEvent=function(h,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],p=this._defaultHandlers[h];if(!(!s.length&&!p)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=h),d.stopPropagation||(d.stopPropagation=y),d.preventDefault||(d.preventDefault=o),s=s.slice();for(var e=0;e ["+this.end.row+"/"+this.end.column+"]"},y.prototype.contains=function(o,h){return this.compare(o,h)==0},y.prototype.compareRange=function(o){var h,d=o.end,s=o.start;return h=this.compare(d.row,d.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},y.prototype.comparePoint=function(o){return this.compare(o.row,o.column)},y.prototype.containsRange=function(o){return this.comparePoint(o.start)==0&&this.comparePoint(o.end)==0},y.prototype.intersects=function(o){var h=this.compareRange(o);return h==-1||h==0||h==1},y.prototype.isEnd=function(o,h){return this.end.row==o&&this.end.column==h},y.prototype.isStart=function(o,h){return this.start.row==o&&this.start.column==h},y.prototype.setStart=function(o,h){typeof o=="object"?(this.start.column=o.column,this.start.row=o.row):(this.start.row=o,this.start.column=h)},y.prototype.setEnd=function(o,h){typeof o=="object"?(this.end.column=o.column,this.end.row=o.row):(this.end.row=o,this.end.column=h)},y.prototype.inside=function(o,h){return this.compare(o,h)==0?!(this.isEnd(o,h)||this.isStart(o,h)):!1},y.prototype.insideStart=function(o,h){return this.compare(o,h)==0?!this.isEnd(o,h):!1},y.prototype.insideEnd=function(o,h){return this.compare(o,h)==0?!this.isStart(o,h):!1},y.prototype.compare=function(o,h){return!this.isMultiLine()&&o===this.start.row?hthis.end.column?1:0:othis.end.row?1:this.start.row===o?h>=this.start.column?0:-1:this.end.row===o?h<=this.end.column?0:1:0},y.prototype.compareStart=function(o,h){return this.start.row==o&&this.start.column==h?-1:this.compare(o,h)},y.prototype.compareEnd=function(o,h){return this.end.row==o&&this.end.column==h?1:this.compare(o,h)},y.prototype.compareInside=function(o,h){return this.end.row==o&&this.end.column==h?1:this.start.row==o&&this.start.column==h?-1:this.compare(o,h)},y.prototype.clipRows=function(o,h){if(this.end.row>h)var d={row:h+1,column:0};else if(this.end.rowh)var s={row:h+1,column:0};else if(this.start.rowthis.row)){var e=y(p,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},s.prototype.setPosition=function(p,e,t){var r;if(t?r={row:p,column:e}:r=this.$clipPositionToDocument(p,e),!(this.row==r.row&&this.column==r.column)){var l={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:l,value:r})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(p){this.document=p||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(p,e){var t={};return p>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):p<0?(t.row=0,t.column=0):(t.row=p,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,e))),e<0&&(t.column=0),t},s}();d.prototype.$insertRight=!1,o.implement(d.prototype,h),i.Anchor=d}),ace.define("ace/document",[],function(L,i,n){var u=L("./lib/oop"),y=L("./apply_delta").applyDelta,o=L("./lib/event_emitter").EventEmitter,h=L("./range").Range,d=L("./anchor").Anchor,s=function(){function p(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return p.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new h(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},p.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},p.prototype.createAnchor=function(e,t){return new d(this,e,t)},p.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:` -`,this._signal("changeNewLineMode")},p.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r -`;case"unix":return` -`;default:return this.$autoNewLine||` -`}},p.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},p.prototype.getNewLineMode=function(){return this.$newLineMode},p.prototype.isNewLine=function(e){return e==`\r -`||e=="\r"||e==` -`},p.prototype.getLine=function(e){return this.$lines[e]||""},p.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},p.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},p.prototype.getLength=function(){return this.$lines.length},p.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},p.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var r=t.length-1;e.end.row-e.start.row==r&&(t[r]=t[r].substring(0,e.end.column))}return t},p.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},p.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},p.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},p.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},p.prototype.insertInLine=function(e,t){var r=this.clippedPos(e.row,e.column),l=this.pos(e.row,e.column+t.length);return this.applyDelta({start:r,end:l,action:"insert",lines:[t]},!0),this.clonePos(l)},p.prototype.clippedPos=function(e,t){var r=this.getLength();e===void 0?e=r:e<0?e=0:e>=r&&(e=r-1,t=void 0);var l=this.getLine(e);return t==null&&(t=l.length),t=Math.min(Math.max(t,0),l.length),{row:e,column:t}},p.prototype.clonePos=function(e){return{row:e.row,column:e.column}},p.prototype.pos=function(e,t){return{row:e,column:t}},p.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},p.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var r=0;e0,l=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},p.prototype.replace=function(e,t){if(e instanceof h||(e=h.fromPoints(e.start,e.end)),t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var r;return t?r=this.insert(e.start,t):r=e.start,r},p.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},p.prototype.applyDelta=function(e,t){var r=e.action=="insert";(r?e.lines.length<=1&&!e.lines[0]:!h.comparePoints(e.start,e.end))||(r&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(y(this.$lines,e,t),this._signal("change",e)))},p.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row0;)h&1&&(d+=o),(h>>=1)&&(o+=o);return d};var u=/^\s\s*/,y=/\s\s*$/;i.stringTrimLeft=function(o){return o.replace(u,"")},i.stringTrimRight=function(o){return o.replace(y,"")},i.copyObject=function(o){var h={};for(var d in o)h[d]=o[d];return h},i.copyArray=function(o){for(var h=[],d=0,s=o.length;d65535?2:1}}),ace.define("ace/worker/mirror",[],function(L,i,n){var u=L("../document").Document,y=L("../lib/lang"),o=i.Mirror=function(h){this.sender=h;var d=this.doc=new u(""),s=this.deferredUpdate=y.delayedCall(this.onUpdate.bind(this)),p=this;h.on("change",function(e){var t=e.data;if(t[0].start)d.applyDeltas(t);else for(var r=0;r=d.$lines.length)throw a=new Error("Invalid delta"),a.data={path:p.$path,linesLength:d.$lines.length,start:l.start,end:l.end},a;d.applyDelta(l,!0)}if(p.$timeout)return s.schedule(p.$timeout);p.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(h){this.$timeout=h},this.setValue=function(h){this.doc.setValue(h),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(h){this.sender.callback(this.doc.getValue(),h)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(o.prototype)}),ace.define("ace/mode/json/json_parse",[],function(L,i,n){var u,y,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` -`,r:"\r",t:" "},h,d=function(f){throw{name:"SyntaxError",message:f,at:u,text:h}},s=function(f){return f&&f!==y&&d("Expected '"+f+"' instead of '"+y+"'"),y=h.charAt(u),u+=1,y},p=function(){var f,v="";for(y==="-"&&(v="-",s("-"));y>="0"&&y<="9";)v+=y,s();if(y===".")for(v+=".";s()&&y>="0"&&y<="9";)v+=y;if(y==="e"||y==="E")for(v+=y,s(),(y==="-"||y==="+")&&(v+=y,s());y>="0"&&y<="9";)v+=y,s();if(f=+v,!isNaN(f))return f;d("Bad number")},e=function(){var f,v,b="",A;if(y==='"')for(;s();){if(y==='"')return s(),b;if(y==="\\")if(s(),y==="u"){for(A=0,v=0;v<4&&(f=parseInt(s(),16),!!isFinite(f));v+=1)A=A*16+f;b+=String.fromCharCode(A)}else{if(typeof o[y]!="string")break;b+=o[y]}else{if(y==` -`||y=="\r")break;b+=y}}d("Bad string")},t=function(){for(;y&&y<=" ";)s()},r=function(){switch(y){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}d("Unexpected '"+y+"'")},l,a=function(){var f=[];if(y==="["){if(s("["),t(),y==="]")return s("]"),f;for(;y;){if(f.push(l()),t(),y==="]")return s("]"),f;s(","),t()}}d("Bad array")},c=function(){var f,v={};if(y==="{"){if(s("{"),t(),y==="}")return s("}"),v;for(;y;){if(f=e(),t(),s(":"),Object.hasOwnProperty.call(v,f)&&d('Duplicate key "'+f+'"'),v[f]=l(),t(),y==="}")return s("}"),v;s(","),t()}}d("Bad object")};return l=function(){switch(t(),y){case"{":return c();case"[":return a();case'"':return e();case"-":return p();default:return y>="0"&&y<="9"?p():r()}},function(f,v){var b;return h=f,u=0,y=" ",b=l(),t(),y&&d("Syntax error"),typeof v=="function"?function A(D,E){var g,S,$=D[E];if($&&typeof $=="object")for(g in $)Object.hasOwnProperty.call($,g)&&(S=A($,g),S!==void 0?$[g]=S:delete $[g]);return v.call(D,E,$)}({"":b},""):b}}),ace.define("ace/mode/json_worker",[],function(L,i,n){var u=L("../lib/oop"),y=L("../worker/mirror").Mirror,o=L("./json/json_parse"),h=i.JsonWorker=function(d){y.call(this,d),this.setTimeout(200)};u.inherits(h,y),function(){this.onUpdate=function(){var d=this.doc.getValue(),s=[];try{d&&o(d)}catch(e){var p=this.doc.indexToPosition(e.at-1);s.push({row:p.row,column:p.column,text:e.message,type:"error"})}this.sender.emit("annotate",s)}}.call(h.prototype)});var Ma={exports:{}};(function(L,i){ace.define("ace/theme/clouds_midnight-css",["require","exports","module"],function(n,u,y){y.exports=`.ace-clouds-midnight .ace_gutter { - background: #232323; - color: #929292 -} - -.ace-clouds-midnight .ace_print-margin { - width: 1px; - background: #232323 -} - -.ace-clouds-midnight { - background-color: #191919; - color: #929292 -} - -.ace-clouds-midnight .ace_cursor { - color: #7DA5DC -} - -.ace-clouds-midnight .ace_marker-layer .ace_selection { - background: #000000 -} - -.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start { - box-shadow: 0 0 3px 0px #191919; -} - -.ace-clouds-midnight .ace_marker-layer .ace_step { - background: rgb(102, 82, 0) -} - -.ace-clouds-midnight .ace_marker-layer .ace_bracket { - margin: -1px 0 0 -1px; - border: 1px solid #BFBFBF -} - -.ace-clouds-midnight .ace_marker-layer .ace_active-line { - background: rgba(215, 215, 215, 0.031) -} - -.ace-clouds-midnight .ace_gutter-active-line { - background-color: rgba(215, 215, 215, 0.031) -} - -.ace-clouds-midnight .ace_marker-layer .ace_selected-word { - border: 1px solid #000000 -} - -.ace-clouds-midnight .ace_invisible { - color: #666 -} - -.ace-clouds-midnight .ace_keyword, -.ace-clouds-midnight .ace_meta, -.ace-clouds-midnight .ace_support.ace_constant.ace_property-value { - color: #927C5D -} - -.ace-clouds-midnight .ace_keyword.ace_operator { - color: #4B4B4B -} - -.ace-clouds-midnight .ace_keyword.ace_other.ace_unit { - color: #366F1A -} - -.ace-clouds-midnight .ace_constant.ace_language { - color: #39946A -} - -.ace-clouds-midnight .ace_constant.ace_numeric { - color: #46A609 -} - -.ace-clouds-midnight .ace_constant.ace_character.ace_entity { - color: #A165AC -} - -.ace-clouds-midnight .ace_invalid { - color: #FFFFFF; - background-color: #E92E2E -} - -.ace-clouds-midnight .ace_fold { - background-color: #927C5D; - border-color: #929292 -} - -.ace-clouds-midnight .ace_storage, -.ace-clouds-midnight .ace_support.ace_class, -.ace-clouds-midnight .ace_support.ace_function, -.ace-clouds-midnight .ace_support.ace_other, -.ace-clouds-midnight .ace_support.ace_type { - color: #E92E2E -} - -.ace-clouds-midnight .ace_string { - color: #5D90CD -} - -.ace-clouds-midnight .ace_comment { - color: #3C403B -} - -.ace-clouds-midnight .ace_entity.ace_name.ace_tag, -.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name { - color: #606060 -} - -.ace-clouds-midnight .ace_indent-guide { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y -} - -.ace-clouds-midnight .ace_indent-guide-active { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y; -} -`}),ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"],function(n,u,y){u.isDark=!0,u.cssClass="ace-clouds-midnight",u.cssText=n("./clouds_midnight-css");var o=n("../lib/dom");o.importCssString(u.cssText,u.cssClass,!1)}),function(){ace.require(["ace/theme/clouds_midnight"],function(n){L&&(L.exports=n)})}()})(Ma);var La={exports:{}};(function(L,i){ace.define("ace/theme/chrome-css",["require","exports","module"],function(n,u,y){y.exports=`.ace-chrome .ace_gutter { - background: #ebebeb; - color: #333; - overflow : hidden; -} - -.ace-chrome .ace_print-margin { - width: 1px; - background: #e8e8e8; -} - -.ace-chrome { - background-color: #FFFFFF; - color: black; -} - -.ace-chrome .ace_cursor { - color: black; -} - -.ace-chrome .ace_invisible { - color: rgb(191, 191, 191); -} - -.ace-chrome .ace_constant.ace_buildin { - color: rgb(88, 72, 246); -} - -.ace-chrome .ace_constant.ace_language { - color: rgb(88, 92, 246); -} - -.ace-chrome .ace_constant.ace_library { - color: rgb(6, 150, 14); -} - -.ace-chrome .ace_invalid { - background-color: rgb(153, 0, 0); - color: white; -} - -.ace-chrome .ace_fold { -} - -.ace-chrome .ace_support.ace_function { - color: rgb(60, 76, 114); -} - -.ace-chrome .ace_support.ace_constant { - color: rgb(6, 150, 14); -} - -.ace-chrome .ace_support.ace_type, -.ace-chrome .ace_support.ace_class -.ace-chrome .ace_support.ace_other { - color: rgb(109, 121, 222); -} - -.ace-chrome .ace_variable.ace_parameter { - font-style:italic; - color:#FD971F; -} -.ace-chrome .ace_keyword.ace_operator { - color: rgb(104, 118, 135); -} - -.ace-chrome .ace_comment { - color: #236e24; -} - -.ace-chrome .ace_comment.ace_doc { - color: #236e24; -} - -.ace-chrome .ace_comment.ace_doc.ace_tag { - color: #236e24; -} - -.ace-chrome .ace_constant.ace_numeric { - color: rgb(0, 0, 205); -} - -.ace-chrome .ace_variable { - color: rgb(49, 132, 149); -} - -.ace-chrome .ace_xml-pe { - color: rgb(104, 104, 91); -} - -.ace-chrome .ace_entity.ace_name.ace_function { - color: #0000A2; -} - - -.ace-chrome .ace_heading { - color: rgb(12, 7, 255); -} - -.ace-chrome .ace_list { - color:rgb(185, 6, 144); -} - -.ace-chrome .ace_marker-layer .ace_selection { - background: rgb(181, 213, 255); -} - -.ace-chrome .ace_marker-layer .ace_step { - background: rgb(252, 255, 0); -} - -.ace-chrome .ace_marker-layer .ace_stack { - background: rgb(164, 229, 101); -} - -.ace-chrome .ace_marker-layer .ace_bracket { - margin: -1px 0 0 -1px; - border: 1px solid rgb(192, 192, 192); -} - -.ace-chrome .ace_marker-layer .ace_active-line { - background: rgba(0, 0, 0, 0.07); -} - -.ace-chrome .ace_gutter-active-line { - background-color : #dcdcdc; -} - -.ace-chrome .ace_marker-layer .ace_selected-word { - background: rgb(250, 250, 255); - border: 1px solid rgb(200, 200, 250); -} - -.ace-chrome .ace_storage, -.ace-chrome .ace_keyword, -.ace-chrome .ace_meta.ace_tag { - color: rgb(147, 15, 128); -} - -.ace-chrome .ace_string.ace_regex { - color: rgb(255, 0, 0) -} - -.ace-chrome .ace_string { - color: #1A1AA6; -} - -.ace-chrome .ace_entity.ace_other.ace_attribute-name { - color: #994409; -} - -.ace-chrome .ace_indent-guide { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; -} - -.ace-chrome .ace_indent-guide-active { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; -} -`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(n,u,y){u.isDark=!1,u.cssClass="ace-chrome",u.cssText=n("./chrome-css");var o=n("../lib/dom");o.importCssString(u.cssText,u.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(n){L&&(L.exports=n)})}()})(La);var Ia={exports:{}};(function(L,i){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(n,u,y){function o(g){var S=new Date().toLocaleString("en-us",g);return S.length==1?"0"+S:S}var h=n("./lib/dom"),d=n("./lib/oop"),s=n("./lib/event_emitter").EventEmitter,p=n("./lib/lang"),e=n("./range").Range,t=n("./range_list").RangeList,r=n("./keyboard/hash_handler").HashHandler,l=n("./tokenizer").Tokenizer,a=n("./clipboard"),c={CURRENT_WORD:function(g){return g.session.getTextRange(g.session.getWordRange())},SELECTION:function(g,S,$){var _=g.session.getTextRange();return $?_.replace(/\n\r?([ \t]*\S)/g,` -`+$+"$1"):_},CURRENT_LINE:function(g){return g.session.getLine(g.getCursorPosition().row)},PREV_LINE:function(g){return g.session.getLine(g.getCursorPosition().row-1)},LINE_INDEX:function(g){return g.getCursorPosition().row},LINE_NUMBER:function(g){return g.getCursorPosition().row+1},SOFT_TABS:function(g){return g.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(g){return g.session.getTabSize()},CLIPBOARD:function(g){return a.getText&&a.getText()},FILENAME:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0]},FILENAME_BASE:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(g){return this.FILEPATH(g).replace(/[^/\\]*$/,"")},FILEPATH:function(g){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(g){var S=g.session.$mode||{};return S.blockComment&&S.blockComment.start||""},BLOCK_COMMENT_END:function(g){var S=g.session.$mode||{};return S.blockComment&&S.blockComment.end||""},LINE_COMMENT:function(g){var S=g.session.$mode||{};return S.lineCommentStart||""},CURRENT_YEAR:o.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:o.bind(null,{year:"2-digit"}),CURRENT_MONTH:o.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:o.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:o.bind(null,{month:"short"}),CURRENT_DATE:o.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:o.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:o.bind(null,{weekday:"short"}),CURRENT_HOUR:o.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:o.bind(null,{minute:"2-digit"}),CURRENT_SECOND:o.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var f=function(){function g(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return g.prototype.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},g.prototype.createTokenizer=function(){function S(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function $(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var _={regex:"/("+$("/")+"+)/",onMatch:function(T,I,w){var m=w[0];return m.fmtString=!0,m.guard=T.slice(1,-1),m.flag="",""},next:"formatString"};return g.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(T,I,w){var m=T[1];return(m=="}"&&w.length||"`$\\".indexOf(m)!=-1)&&(T=m),[T]}},{regex:/}/,onMatch:function(T,I,w){return[w.length?w.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:S},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,I,w){var m=S(T.substr(1));return w.unshift(m[0]),m},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+$("\\|")+"*\\|",onMatch:function(T,I,w){var m=T.slice(1,-1).replace(/\\[,|\\]|,/g,function(C){return C.length==2?C[1]:"\0"}).split("\0").map(function(C){return{value:C}});return w[0].choices=m,[m[0]]},next:"start"},_,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,I,w){return w.length&&w[0].expectElse?(w[0].expectElse=!1,w[0].ifEnd={elseEnd:w[0]},[w[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,I,w){var m=T[1];return m=="}"&&w.length||"`$\\".indexOf(m)!=-1?T=m:m=="n"?T=` -`:m=="t"?T=" ":"ulULE".indexOf(m)!=-1&&(T={changeCase:m,local:m>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,I,w){var m=w.shift();return m&&(m.flag=T.slice(1,-1)),this.next=m&&m.tabstopId?"start":"",[m||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,I,w){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,I,w){var m={text:T.slice(2)};return w.unshift(m),[m]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,I,w){var m=w.shift();return this.next=m&&m.tabstopId?"start":"",[m||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,I,w){var m=w[0];return m.formatFunction=T.slice(2,-1),[w.shift()]},next:"formatString"},_,{regex:/:[\?\-+]?/,onMatch:function(T,I,w){T[1]=="+"&&(w[0].ifEnd=w[0]),T[1]=="?"&&(w[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),g.$tokenizer},g.prototype.tokenizeTmSnippet=function(S,$){return this.getTokenizer().getLineTokens(S,$).tokens.map(function(_){return _.value||_})},g.prototype.getVariableValue=function(S,$,_){if(/^\d+$/.test($))return(this.variables.__||{})[$]||"";if(/^[A-Z]\d+$/.test($))return(this.variables[$[0]+"__"]||{})[$.substr(1)]||"";if($=$.replace(/^TM_/,""),!this.variables.hasOwnProperty($))return"";var T=this.variables[$];return typeof T=="function"&&(T=this.variables[$](S,$,_)),T??""},g.prototype.tmStrFormat=function(S,$,_){if(!$.fmt)return S;var T=$.flag||"",I=$.guard;I=new RegExp(I,T.replace(/[^gim]/g,""));var w=typeof $.fmt=="string"?this.tokenizeTmSnippet($.fmt,"formatString"):$.fmt,m=this,C=S.replace(I,function(){var x=m.variables.__;m.variables.__=[].slice.call(arguments);for(var M=m.resolveVariables(w,_),F="E",R=0;R=0&&C.splice(x,1)}}var T=this.snippetMap,I=this.snippetNameMap;S.content?_(S):Array.isArray(S)&&S.forEach(_)},g.prototype.parseSnippetFile=function(S){S=S.replace(/\r/g,"");for(var $=[],_={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,I;I=T.exec(S);){if(I[1])try{_=JSON.parse(I[1]),$.push(_)}catch{}if(I[4])_.content=I[4].replace(/^\t/gm,""),$.push(_),_={};else{var w=I[2],m=I[3];if(w=="regex"){var C=/\/((?:[^\/\\]|\\.)*)|$/g;_.guard=C.exec(m)[1],_.trigger=C.exec(m)[1],_.endTrigger=C.exec(m)[1],_.endGuard=C.exec(m)[1]}else w=="snippet"?(_.tabTrigger=m.match(/^\S*/)[0],_.name||(_.name=m)):w&&(_[w]=m)}}return $},g.prototype.getSnippetByName=function(S,$){var _=this.snippetNameMap,T;return this.getActiveScopes($).some(function(I){var w=_[I];return w&&(T=w[S]),!!T},this),T},g}();d.implement(f.prototype,s);var v=function(g,S,$){function _(U){for(var Y=[],ee=0;ee1?(z=Y[Y.length-1].length,P+=Y.length-1):z+=U.length,K+=U}else U&&(U.start?U.end={row:P,column:z}:U.start={row:P,column:z})}),{text:K,tabstops:x,tokens:C}},b=function(){function g(S){if(this.index=0,this.ranges=[],this.tabstops=[],S.tabstopManager)return S.tabstopManager;S.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(S)}return g.prototype.attach=function(S){this.$openTabstops=null,this.selectedTabstop=null,this.editor=S,this.session=S.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},g.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},g.prototype.onChange=function(S){for(var $=S.action[0]=="r",_=this.selectedTabstop||{},T=_.parents||{},I=this.tabstops.slice(),w=0;w2&&(this.tabstops.length&&m.push(m.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,m))},g.prototype.addTabstopMarkers=function(S){var $=this.session;S.forEach(function(_){_.markerId||(_.markerId=$.addMarker(_,"ace_snippet-marker","text"))})},g.prototype.removeTabstopMarkers=function(S){var $=this.session;S.forEach(function(_){$.removeMarker(_.markerId),_.markerId=null})},g.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var S=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&S--,this.tabstops.forEach(function($){$.snippetId===S?this.addTabstopMarkers($):this.removeTabstopMarkers($)},this)}},g.prototype.removeRange=function(S){var $=S.tabstop.indexOf(S);$!=-1&&S.tabstop.splice($,1),$=this.ranges.indexOf(S),$!=-1&&this.ranges.splice($,1),$=S.tabstop.rangeList.ranges.indexOf(S),$!=-1&&S.tabstop.splice($,1),this.session.removeMarker(S.markerId),S.tabstop.length||($=this.tabstops.indexOf(S.tabstop),$!=-1&&this.tabstops.splice($,1),this.tabstops.length||this.detach())},g}();b.prototype.keyboardHandler=new r,b.prototype.keyboardHandler.bindKeys({Tab:function(g){u.snippetManager&&u.snippetManager.expandWithTab(g)||(g.tabstopManager.tabNext(1),g.renderer.scrollCursorIntoView())},"Shift-Tab":function(g){g.tabstopManager.tabNext(-1),g.renderer.scrollCursorIntoView()},Esc:function(g){g.tabstopManager.detach()}});var A=function(g,S){g.row==0&&(g.column+=S.column),g.row+=S.row},D=function(g,S){g.row==S.row&&(g.column-=S.column),g.row-=S.row};h.importCssString(` -.ace_snippet-marker { - -moz-box-sizing: border-box; - box-sizing: border-box; - background: rgba(194, 193, 208, 0.09); - border: 1px dotted rgba(211, 208, 235, 0.62); - position: absolute; -}`,"snippets.css",!1),u.snippetManager=new f;var E=n("./editor").Editor;(function(){this.insertSnippet=function(g,S){return u.snippetManager.insertSnippet(this,g,S)},this.expandSnippet=function(g){return u.snippetManager.expandWithTab(this,g)}}).call(E.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(n,u,y){var o=n("../virtual_renderer").VirtualRenderer,h=n("../editor").Editor,d=n("../range").Range,s=n("../lib/event"),p=n("../lib/lang"),e=n("../lib/dom"),t=n("../config").nls,r=n("./../lib/useragent"),l=function(A){return"suggest-aria-id:".concat(A)},a=r.isSafari?"menu":"listbox",c=r.isSafari?"menuitem":"option",f=r.isSafari?"aria-current":"aria-selected",v=function(A){var D=new o(A);D.$maxLines=4;var E=new h(D);return E.setHighlightActiveLine(!1),E.setShowPrintMargin(!1),E.renderer.setShowGutter(!1),E.renderer.setHighlightGutterLine(!1),E.$mouseHandler.$focusTimeout=0,E.$highlightTagPending=!0,E},b=function(){function A(D){var E=e.createElement("div"),g=v(E);D&&D.appendChild(E),E.style.display="none",g.renderer.content.style.cursor="default",g.renderer.setStyle("ace_autocomplete"),g.renderer.$textLayer.element.setAttribute("role",a),g.renderer.$textLayer.element.setAttribute("aria-roledescription",t("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),g.renderer.$textLayer.element.setAttribute("aria-label",t("autocomplete.popup.aria-label","Autocomplete suggestions")),g.renderer.textarea.setAttribute("aria-hidden","true"),g.setOption("displayIndentGuides",!1),g.setOption("dragDelay",150);var S=function(){};g.focus=S,g.$isFocused=!0,g.renderer.$cursorLayer.restartTimer=S,g.renderer.$cursorLayer.element.style.opacity="0",g.renderer.$maxLines=8,g.renderer.$keepTextAreaAtCursor=!1,g.setHighlightActiveLine(!1),g.session.highlight(""),g.session.$searchHighlight.clazz="ace_highlight-marker",g.on("mousedown",function(C){var x=C.getDocumentPosition();g.selection.moveToPosition(x),T.start.row=T.end.row=x.row,C.stop()});var $,_=new d(-1,0,-1,1/0),T=new d(-1,0,-1,1/0);T.id=g.session.addMarker(T,"ace_active-line","fullLine"),g.setSelectOnHover=function(C){C?_.id&&(g.session.removeMarker(_.id),_.id=null):_.id=g.session.addMarker(_,"ace_line-hover","fullLine")},g.setSelectOnHover(!1),g.on("mousemove",function(C){if(!$){$=C;return}if(!($.x==C.x&&$.y==C.y)){$=C,$.scrollTop=g.renderer.scrollTop,g.isMouseOver=!0;var x=$.getDocumentPosition().row;_.start.row!=x&&(_.id||g.setRow(x),w(x))}}),g.renderer.on("beforeRender",function(){if($&&_.start.row!=-1){$.$pos=null;var C=$.getDocumentPosition().row;_.id||g.setRow(C),w(C,!0)}}),g.renderer.on("afterRender",function(){for(var C=g.renderer.$textLayer,x=C.config.firstRow,M=C.config.lastRow;x<=M;x++){var F=C.element.childNodes[x-C.config.firstRow];F.setAttribute("role",c),F.setAttribute("aria-roledescription",t("autocomplete.popup.item.aria-roledescription","item")),F.setAttribute("aria-setsize",g.data.length),F.setAttribute("aria-describedby","doc-tooltip"),F.setAttribute("aria-posinset",x+1);var R=g.getData(x);if(R){var N="".concat(R.caption||R.value).concat(R.meta?", ".concat(R.meta):"");F.setAttribute("aria-label",N)}var W=F.querySelectorAll(".ace_completion-highlight");W.forEach(function(B){B.setAttribute("role","mark")})}}),g.renderer.on("afterRender",function(){var C=g.getRow(),x=g.renderer.$textLayer,M=x.element.childNodes[C-x.config.firstRow],F=document.activeElement;if(M!==g.selectedNode&&g.selectedNode&&(e.removeCssClass(g.selectedNode,"ace_selected"),g.selectedNode.removeAttribute(f),g.selectedNode.removeAttribute("id")),F.removeAttribute("aria-activedescendant"),g.selectedNode=M,M){var R=l(C);e.addCssClass(M,"ace_selected"),M.id=R,x.element.setAttribute("aria-activedescendant",R),F.setAttribute("aria-activedescendant",R),M.setAttribute(f,"true")}});var I=function(){w(-1)},w=function(C,x){C!==_.start.row&&(_.start.row=_.end.row=C,x||g.session._emit("changeBackMarker"),g._emit("changeHoverMarker"))};g.getHoveredRow=function(){return _.start.row},s.addListener(g.container,"mouseout",function(){g.isMouseOver=!1,I()}),g.on("hide",I),g.on("changeSelection",I),g.session.doc.getLength=function(){return g.data.length},g.session.doc.getLine=function(C){var x=g.data[C];return typeof x=="string"?x:x&&x.value||""};var m=g.session.bgTokenizer;return m.$tokenizeRow=function(C){function x(U,Y){U&&F.push({type:(M.className||"")+(Y||""),value:U})}var M=g.data[C],F=[];if(!M)return F;typeof M=="string"&&(M={value:M});for(var R=M.caption||M.value||M.name,N=R.toLowerCase(),W=(g.filterText||"").toLowerCase(),B=0,V=0,P=0;P<=W.length;P++)if(P!=V&&(M.matchMask&1<=V?M="bottom":M="top"),M==="top"?(P.bottom=C.top-this.$borderSize,P.top=P.bottom-V):M==="bottom"&&(P.top=C.top+x+this.$borderSize,P.bottom=P.top+V);var U=P.top>=0&&P.bottom<=N;if(!F&&!U)return!1;U?B.$maxPixelHeight=null:M==="top"?B.$maxPixelHeight=K:B.$maxPixelHeight=z,M==="top"?(R.style.top="",R.style.bottom=N-P.bottom+"px",g.isTopdown=!1):(R.style.top=P.top+"px",R.style.bottom="",g.isTopdown=!0),R.style.display="";var Y=C.left;return Y+R.offsetWidth>W&&(Y=W-R.offsetWidth),R.style.left=Y+"px",R.style.right="",g.isOpen||(g.isOpen=!0,this._signal("show"),$=null),g.anchorPos=C,g.anchor=M,!0},g.show=function(C,x,M){this.tryShow(C,x,M?"bottom":void 0,!0)},g.goTo=function(C){var x=this.getRow(),M=this.session.getLength()-1;switch(C){case"up":x=x<=0?M:x-1;break;case"down":x=x>=M?-1:x+1;break;case"start":x=0;break;case"end":x=M}this.setRow(x)},g.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},g.$imageSize=0,g.$borderSize=1,g}return A}();e.importCssString(` -.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { - background-color: #CAD6FA; - z-index: 1; -} -.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { - background-color: #3a674e; -} -.ace_editor.ace_autocomplete .ace_line-hover { - border: 1px solid #abbffe; - margin-top: -1px; - background: rgba(233,233,253,0.4); - position: absolute; - z-index: 2; -} -.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { - border: 1px solid rgba(109, 150, 13, 0.8); - background: rgba(58, 103, 78, 0.62); -} -.ace_completion-meta { - opacity: 0.5; - margin-left: 0.9em; -} -.ace_completion-message { - margin-left: 0.9em; - color: blue; -} -.ace_editor.ace_autocomplete .ace_completion-highlight{ - color: #2d69c7; -} -.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ - color: #93ca12; -} -.ace_editor.ace_autocomplete { - width: 300px; - z-index: 200000; - border: 1px lightgray solid; - position: fixed; - box-shadow: 2px 3px 5px rgba(0,0,0,.2); - line-height: 1.4; - background: #fefefe; - color: #111; -} -.ace_dark.ace_editor.ace_autocomplete { - border: 1px #484747 solid; - box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); - line-height: 1.4; - background: #25282c; - color: #c1c1c1; -} -.ace_autocomplete .ace_text-layer { - width: calc(100% - 8px); -} -.ace_autocomplete .ace_line { - display: flex; - align-items: center; -} -.ace_autocomplete .ace_line > * { - min-width: 0; - flex: 0 0 auto; -} -.ace_autocomplete .ace_line .ace_ { - flex: 0 1 auto; - overflow: hidden; - text-overflow: ellipsis; -} -.ace_autocomplete .ace_completion-spacer { - flex: 1; -} -.ace_autocomplete.ace_loading:after { - content: ""; - position: absolute; - top: 0px; - height: 2px; - width: 8%; - background: blue; - z-index: 100; - animation: ace_progress 3s infinite linear; - animation-delay: 300ms; - transform: translateX(-100%) scaleX(1); -} -@keyframes ace_progress { - 0% { transform: translateX(-100%) scaleX(1) } - 50% { transform: translateX(625%) scaleX(2) } - 100% { transform: translateX(1500%) scaleX(3) } -} -@media (prefers-reduced-motion) { - .ace_autocomplete.ace_loading:after { - transform: translateX(625%) scaleX(2); - animation: none; - } -} -`,"autocompletion.css",!1),u.AcePopup=b,u.$singleLineEditor=v,u.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,u,y){var o=function(){function h(d){this.editor=d,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return h.prototype.setScreenReaderContent=function(d){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var p=this.popup.getRow(),e=this.popup.renderer.$textLayer,t=e.element.childNodes[p-e.config.firstRow];if(t){for(var r="doc-tooltip ",l=0;l=0&&s.test(h[e]);e--)p.push(h[e]);return p.reverse().join("")},u.retrieveFollowingIdentifier=function(h,d,s){s=s||o;for(var p=[],e=d;e0)for(var g=this.popup.getFirstVisibleRow();g<=this.popup.getLastVisibleRow();g++){var S=this.popup.getData(g);S&&(!E||S.hideInlinePreview)&&this.$seen(S)}},D.prototype.$onPopupShow=function(E){this.$onPopupChange(E),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},D.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,g=[];E;)g.push(E),E.addEventListener("scroll",this.onLayoutChange,{passive:!0}),E=E.parentNode;this.$elements=g}},D.prototype.unObserveLayoutChanges=function(){var E=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(g){g.removeEventListener("scroll",E.onLayoutChange,{passive:!0})}),this.$elements=null},D.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},D.prototype.$updatePopupPosition=function(){var E=this.editor,g=E.renderer,S=g.layerConfig.lineHeight,$=g.$cursorLayer.getPixelPosition(this.base,!0);$.left-=this.popup.getTextLeftOffset();var _=E.container.getBoundingClientRect();$.top+=_.top-g.layerConfig.offset,$.left+=_.left-E.renderer.scrollLeft,$.left+=g.gutterWidth;var T={top:$.top,left:$.left};g.$ghostText&&g.$ghostTextWidget&&this.base.row===g.$ghostText.position.row&&(T.top+=g.$ghostTextWidget.el.offsetHeight);var I=E.container.getBoundingClientRect().bottom-S,w=Ithis.filterText&&E.lastIndexOf(this.filterText,0)===0)var g=this.filtered;else var g=this.all;this.filterText=E,g=this.filterCompletions(g,this.filterText),g=g.sort(function($,_){return _.exactMatch-$.exactMatch||_.$score-$.$score||($.caption||$.value).localeCompare(_.caption||_.value)});var S=null;g=g.filter(function($){var _=$.snippet||$.caption||$.value;return _===S?!1:(S=_,!0)}),this.filtered=g},D.prototype.filterCompletions=function(E,g){var S=[],$=g.toUpperCase(),_=g.toLowerCase();e:for(var T=0,I;I=E[T];T++){if(I.skipFilter){I.$score=I.score,S.push(I);continue}var w=!this.ignoreCaption&&I.caption||I.value||I.snippet;if(w){var m=-1,C=0,x=0,M,F;if(this.exactMatch){if(g!==w.substr(0,g.length))continue e}else{var R=w.toLowerCase().indexOf(_);if(R>-1)x=R;else for(var N=0;N=0&&(B<0||W0&&(m===-1&&(x+=10),x+=F,C|=1<",s.escapeHTML($.caption),"","
",s.escapeHTML(r($.snippet))].join(""))},id:"snippetCompleter"},a=[l,e,t];u.setCompleters=function($){a.length=0,$&&a.push.apply(a,$)},u.addCompleter=function($){a.push($)},u.textCompleter=e,u.keyWordCompleter=t,u.snippetCompleter=l;var c={name:"expandSnippet",exec:function($){return o.expandWithTab($)},bindKey:"Tab"},f=function($,_){v(_.session.$mode)},v=function($){typeof $=="string"&&($=d.$modes[$]),$&&(o.files||(o.files={}),b($.$id,$.snippetFileId),$.modes&&$.modes.forEach(v))},b=function($,_){!_||!$||o.files[$]||(o.files[$]={},d.loadModule(_,function(T){T&&(o.files[$]=T,!T.snippets&&T.snippetText&&(T.snippets=o.parseSnippetFile(T.snippetText)),o.register(T.snippets||[],T.scope),T.includeScopes&&(o.snippetMap[T.scope].includeScopes=T.includeScopes,T.includeScopes.forEach(function(I){v("ace/mode/"+I)})))}))},A=function($){var _=$.editor,T=_.completer&&_.completer.activated;if($.command.name==="backspace")T&&!p.getCompletionPrefix(_)&&_.completer.detach();else if($.command.name==="insertstring"&&!T){D=$;var I=$.editor.$liveAutocompletionDelay;I?E.delay(I):g($)}},D,E=s.delayedCall(function(){g(D)},0),g=function($){var _=$.editor,T=p.getCompletionPrefix(_),I=$.args,w=p.triggerAutocomplete(_,I);if(T&&T.length>=_.$liveAutocompletionThreshold||w){var m=h.for(_);m.autoShown=!0,m.showPopup(_)}},S=n("../editor").Editor;n("../config").defineOptions(S.prototype,"editor",{enableBasicAutocompletion:{set:function($){$?(this.completers||(this.completers=Array.isArray($)?$:a),this.commands.addCommand(h.startCommand)):this.commands.removeCommand(h.startCommand)},value:!1},enableLiveAutocompletion:{set:function($){$?(this.completers||(this.completers=Array.isArray($)?$:a),this.commands.on("afterExec",A)):this.commands.off("afterExec",A)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function($){$?(this.commands.addCommand(c),this.on("changeMode",f),f(null,this)):(this.commands.removeCommand(c),this.off("changeMode",f))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){L&&(L.exports=n)})}()})(Ia);const Ai={jsonError:{border:"1px solid red",minHeight:200},jsonNoError:{border:"1px solid #00000000",minHeight:200}};function Fa(L){return k.createElement($a,{style:L.error===!0?Ai.jsonError:L.error===!1?Ai.jsonNoError:void 0,mode:L.mode||"json",width:"100%",height:"100%",showPrintMargin:L.editValueMode,showGutter:L.editValueMode,highlightActiveLine:L.editValueMode,defaultValue:L.defaultValue,theme:L.themeType==="dark"?"clouds_midnight":"chrome",value:L.value,readOnly:!L.onChange,onChange:i=>L.onChange(i),name:L.name||"UNIQUE_ID_OF_DIV1",fontSize:L.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:L.editValueMode,tabSize:L.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}const Rn={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class Ra extends G{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=G.getValue(i,n)||"{}";this.setState({value:u,initialized:!0,jsonError:this.validateJson(u)})}validateJson(i){let n=!1;if(this.props.schema.validateJson!==!1&&(i||!this.props.schema.allowEmpty))try{this.props.schema.json5?Vi.parse(i):JSON.parse(i)}catch(u){console.log("Error in JSON",u),n=!0}return n}renderItem(i,n){if(!this.state.initialized)return null;const{schema:u,data:y,attr:o}=this.props,{value:h,showSelectId:d}=this.state;return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},k.createElement("div",{style:Rn.flex},k.createElement(O.Button,{color:"grey",disabled:n,style:Rn.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},j.I18n.t("ra_JSON editor"))),d?k.createElement(lo,{title:this.getText(u.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError,onClose:()=>this.setState({showSelectId:!1,value:G.getValue(y,o)||{}}),onApply:()=>this.setState({showSelectId:!1},()=>this.onChange(o,h))},k.createElement("div",{style:{...Rn.wrapper,border:this.state.jsonError?"2px solid red":"2px solid transparent"}},k.createElement(Fa,{mode:this.props.schema.json5?"json5":"json",value:typeof h=="object"?JSON.stringify(h):h,onChange:s=>this.setState({value:s,jsonError:this.validateJson(s)}),name:"ConfigJsonEditor",themeType:this.props.oContext.themeType}))):null,u.help||this.state.jsonError?k.createElement(O.FormHelperText,null,this.state.jsonError?j.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Oa=[{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:"简体中文"}];class Na extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr),n=[...Oa];this.props.schema.system?n.unshift({value:"",label:j.I18n.t("ra_System language")}):n.unshift({value:"",label:j.I18n.t("ra_none")}),this.setState({value:this.props.schema.system?i||"":i||j.I18n.getLanguage(),selectOptions:n})}renderItem(i,n){var y,o;if(!this.state.selectOptions)return null;const u=(y=this.state.selectOptions)==null?void 0:y.find(h=>h.value===this.state.value||!h.value&&!this.state.value);return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,disabled:n,value:this.state.value||"_",renderValue:()=>this.getText(u==null?void 0:u.label,this.props.schema.noTranslation),onChange:h=>{let{value:d}=h.target;d==="_"&&(d=""),this.setState({value:d},()=>{const s=this.onChange(this.props.attr,d);if(s instanceof Promise&&s.catch(p=>console.error(p)),this.props.schema.changeGuiLanguage)if(d){if(d===j.I18n.getLanguage())return;j.I18n.setLanguage(d),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage()}else this.props.oContext.socket.getSystemConfig().then(p=>{p.common.language!==j.I18n.getLanguage()&&p.common.language&&(j.I18n.setLanguage(p.common.language),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage())}).catch(p=>console.error(`Cannot read system config: ${p}`))})}},(o=this.state.selectOptions)==null?void 0:o.map(h=>k.createElement(O.MenuItem,{key:h.value,value:h.value},h.label))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Ba extends G{scrollRef;constructor(i){super(i),this.scrollRef=k.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}componentDidMount(){super.componentDidMount(),G.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(i=>i.text()).then(i=>this.setState({license:i,loading:!1})).catch(i=>this.setState({license:i.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(i,n){return this.state.showLicenseDialog?k.createElement(O.Dialog,{maxWidth:"lg",open:!0,onClose:(u,y)=>{y!=="escapeKeyDown"&&y!=="backdropClick"&&this.setState({showLicenseDialog:!1})}},k.createElement(O.DialogTitle,null,this.props.schema.title?j.I18n.t(this.props.schema.title):j.I18n.t("ra_License agreement")),k.createElement(O.DialogContent,null,this.props.schema.licenseUrl?k.createElement(k.Fragment,null,this.state.loading?k.createElement(O.LinearProgress,null):null,k.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?k.createElement("div",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.props.schema.texts.map((u,y)=>this.props.schema.noTranslation?k.createElement("p",{key:y},u):k.createElement("p",{key:y},j.I18n.t(u)))):null),k.createElement(O.DialogActions,null,this.props.schema.checkBox?k.createElement(O.FormControlLabel,{control:k.createElement(O.Checkbox,{disabled:n,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:j.I18n.t(this.props.schema.checkBox)}):null,k.createElement(O.Button,{disabled:n||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{this.setState({showLicenseDialog:!1});const u=this.onChange(this.props.attr,!0);u instanceof Promise&&u.catch(y=>console.error(`Cannot set value: ${y}`))},color:"primary",variant:"contained",startIcon:k.createElement(X.Check,null)},this.props.schema.agreeText?j.I18n.t(this.props.schema.agreeText):j.I18n.t("ra_Accept license")),k.createElement(O.Button,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:"grey",variant:"contained",startIcon:k.createElement(X.Close,null)},j.I18n.t("ra_Close")))):null}}const xi={indeterminate:{opacity:.5},control:{flexDirection:"row",width:"100%"}};class Pa extends G{updateTimeout;componentDidMount(){super.componentDidMount();let i=G.getValue(this.props.data,this.props.attr);if(i==null&&(i=""),Array.isArray(i)&&this.props.oContext.multiEdit){i=G.DIFFERENT_VALUE,this.setState({_value:i,oldValue:i});return}this.setState({_value:i.toString(),oldValue:i.toString()})}static getDerivedStateFromProps(i,n){if(i.schema.min!==void 0&&i.schema.min<0||i.schema.max!==void 0&&i.schema.max<0)return null;const u=G.getValue(i.data,i.attr);return i.oContext.multiEdit&&n._value===G.DIFFERENT_VALUE?{_value:G.DIFFERENT_VALUE}:u==null||n.oldValue===null||n.oldValue===void 0||u.toString()!==parseFloat(n._value).toString()&&u.toString()!==n.oldValue.toString()?{_value:u}:null}checkValue(i){if(i==null)return null;i=i.toString().trim();const n=i===""?0:parseFloat(i);return i!==""&&Number.isNaN(n)?"ra_Not a number":i!==""&&window.isFinite(n)?this.props.schema.min!==void 0&&nthis.props.schema.max?"ra_Too big":i===""||i==="-"||Number.isNaN(n)?"ra_Not a number":null:"ra_Not a number"}renderItem(i,n){const u=Array.isArray(this.state._value)||this.state._value===G.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),this.updateTimeout=void 0),u){const y=G.getValue(this.props.data,this.props.attr),o=(y==null?void 0:y.filter(h=>h||h===0).map(h=>({label:h.toString(),value:h})))||[];return o.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),k.createElement(O.Autocomplete,{style:xi.indeterminate,fullWidth:!0,freeSolo:!0,value:o[0],getOptionSelected:(h,d)=>h.label===d.label,onChange:(h,d)=>{const s=this.onChange(this.props.attr,d==null?void 0:d.value,()=>{this.setState({_value:d==null?void 0:d.value,oldValue:this.state._value})});s instanceof Promise&&s.catch(p=>console.error(p))},options:o,getOptionLabel:h=>h.label,renderInput:h=>k.createElement(O.TextField,{...h,label:this.getText(this.props.schema.label),variant:"standard",slotProps:{htmlInput:{...h.inputProps,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):void 0}},error:!!i,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!n})})}return!i&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(i=this.checkValue(this.state._value),i&&(i=j.I18n.t(i))),k.createElement(O.FormControl,{variant:"standard",style:xi.control},k.createElement(O.TextField,{variant:"standard",type:"number",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):void 0}},value:this.state._value===null||this.state._value===void 0?"":this.state._value,error:!!i,disabled:!!n,onChange:y=>{const o=y.target.value,h=this.checkValue(o);h?this.onError(this.props.attr,j.I18n.t(h)):this.onError(this.props.attr),this.setState({_value:o,oldValue:this.state._value},()=>this.onChange(this.props.attr,parseFloat(o)))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:i&&typeof i=="string"?i:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}}const $i={flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class Wa extends G{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=G.getValue(i,n)||"";this.setState({value:u,initialized:!0})}renderItem(i,n){if(!this.state.initialized)return null;const u=this.props.oContext.socket,{schema:y,attr:o}=this.props,{value:h,showSelectId:d}=this.state;return k.createElement(O.FormControl,{fullWidth:!0,variant:"standard"},y.label?k.createElement(O.InputLabel,{shrink:!0},this.getText(y.label)):null,k.createElement("div",{style:$i.flex},k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:h,error:!!i,disabled:n,placeholder:this.getText(y.placeholder),label:this.getText(y.label),helperText:this.renderHelp(y.help,y.helpLink,y.noTranslation),onChange:s=>{const p=s.target.value;this.setState({value:p},()=>this.onChange(o,p))}}),k.createElement(O.Button,{color:"grey",disabled:n,style:$i.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},"...")),d?k.createElement(j.DialogSelectID,{imagePrefix:this.props.oContext.imagePrefix===void 0?"../..":this.props.oContext.imagePrefix,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:y.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:y.types?Array.isArray(y.types)?y.types:[y.types]:void 0,customFilter:y.customFilter,filters:y.filters,socket:u,selected:h,root:y.root,onClose:()=>this.setState({showSelectId:!1}),onOk:s=>this.setState({showSelectId:!1,value:s},()=>this.onChange(o,s))}):null)}}const On={fullWidth:{width:"100%",display:"inline-block"},halfWidth1:{width:"calc(50% - 5px)",display:"inline-block",marginRight:8},halfWidth2:{width:"calc(50% - 5px)",display:"inline-block"}},an="____ppp____";class Ha extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.setState({_repeat:i?an:"",_visible:!1,value:i?an:"",_notEqual:!1})}onChangePassword(i,n){i===void 0&&(i=this.state.value),n===void 0&&(n=this.state._repeat);const u=!!this.props.schema.repeat&&n!==i;this.setState({value:i,_repeat:n,_notEqual:u},()=>{if(u)this.onError(this.props.attr,j.I18n.t("ra_Passwords are not equal!"));else{this.onError(this.props.attr);const y=this.onChange(this.props.attr,i);y instanceof Promise&&y.catch(o=>this.onError(this.props.attr,o))}})}renderItem(i,n){if(this.state._notEqual===void 0)return null;const u=k.createElement(O.TextField,{variant:"standard",fullWidth:!0,type:this.state._visible&&this.state.value!==an?"text":"password",value:this.state.value,error:!!i||this.state._notEqual,disabled:!!n,onChange:y=>this.onChangePassword(y.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:"new-password",endAdornment:this.state.value&&this.state.value!==an&&this.props.schema.visible&&!n&&!this.props.schema.readOnly?k.createElement(O.InputAdornment,{position:"end"},k.createElement(O.IconButton,{size:"large",tabIndex:-1,onClick:y=>{y.preventDefault(),y.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:"end"},this.state._visible?k.createElement(X.VisibilityOff,null):k.createElement(X.Visibility,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.I18n.t("ra_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){const y=this.state._visible?null:k.createElement(O.TextField,{variant:"standard",fullWidth:!0,type:"password",value:this.state._repeat,error:!!i||this.state._notEqual,disabled:!!n,onChange:o=>this.onChangePassword(void 0,o.target.value),label:`${this.getText(this.props.schema.label)} (${j.I18n.t("ra_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.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return k.createElement("div",{style:On.fullWidth},k.createElement("div",{style:On.halfWidth1},u),k.createElement("div",{style:On.halfWidth2},y))}return u}}class za extends G{renderItem(i,n){return k.createElement(O.TextField,{variant:"standard",fullWidth:!0,disabled:!!n,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?k.createElement(O.IconButton,{size:"small",onClick:()=>{j.Utils.copyToClipboard(this.getPattern(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(j.I18n.t("ra_Copied"))}},k.createElement(j.IconCopy,null)):void 0}},value:this.getPattern(this.props.schema.pattern,null,!0),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const ja={warning:{"& .Mui-error":{color:"orange"}}};class Va extends G{updateTimeout;async componentDidMount(){super.componentDidMount();let i=G.getValue(this.props.data,this.props.attr);i==null&&(i=""),this.setState({_value:i.toString(),oldValue:i.toString()});const n=await this.props.oContext.socket.getAdapterInstances(),u=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,y=await this.props.oContext.socket.getObject(u),o=y==null?void 0:y.common.host,h=[];n.forEach(d=>{var p,e,t,r;if(!d||d._id===u||d.common.host!==o||!((p=d.native)!=null&&p.bind))return;if(d!=null&&d.native&&d.native.secure&&d.native.leEnabled&&d.native.leUpdate){const l=parseInt(d.native.leCheckPort||d.native.lePort,10);l&&h.push({name:`${d._id.replace("system.adapter.","")} (LE)`,port:l,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,bind:d.native.bind,enabled:!!((e=d.common)!=null&&e.enabled)})}const s=parseInt((t=d==null?void 0:d.native)==null?void 0:t.port,10);s&&h.push({name:d._id.replace("system.adapter.",""),bind:d.native.bind,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,port:s,enabled:!!((r=d.common)!=null&&r.enabled)})}),this.setState({ports:h})}static getDerivedStateFromProps(i,n){const u=G.getValue(i.data,i.attr);return u==null||n.oldValue===null||n.oldValue===void 0||u.toString()!==parseInt(n._value,10).toString()&&u.toString()!==n.oldValue.toString()?{_value:u}:null}checkValue(i){if(i==null)return null;const n=this.props.schema.min===void 0?20:this.props.schema.min,u=this.props.schema.max||65535;i=i.toString().trim();const y=i===""?0:parseInt(i,10);return i!==""&&Number.isNaN(y)?"ra_Not a number":i!==""&&window.isFinite(Number(i))?yu?"ra_Too big":i===""||i==="-"||Number.isNaN(y)?"ra_Not a number":null:"ra_Not a number"}renderItem(i,n){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),this.updateTimeout=void 0);const u=this.props.schema.min===void 0?20:this.props.schema.min,y=this.props.schema.max||65535;let o;if(this.state.ports){const h=parseInt(this.state._value,10);if(h){const d=this.state.ports.filter(p=>!this.props.data.bind||this.props.data.bind===p.bind||this.props.data.bind==="0.0.0.0"||p.bind==="0.0.0.0");let s=d.findIndex(p=>p.port===h&&p.enabled);s!==-1?i=j.I18n.t("ra_Port is already used by %s",this.state.ports[s].name):(s=d.findIndex(p=>p.port===h&&!p.enabled),s!==-1&&(o=!0,i=j.I18n.t("ra_Port could be used by %s",this.state.ports[s].name)))}}return!i&&this.state._value!==null&&this.state._value!==void 0&&(i=this.checkValue(this.state._value),typeof i=="string"&&(i=j.I18n.t(i))),k.createElement(O.TextField,{variant:"standard",type:"number",fullWidth:!0,slotProps:{htmlInput:{min:u,max:y,readOnly:this.props.schema.readOnly||!1}},value:this.state._value===null||this.state._value===void 0?"":this.state._value,error:!!i,disabled:!!n,sx:o?ja.warning:void 0,onChange:h=>{const d=Number(h.target.value.toString().replace(/[^0-9]/g,"")).toString(),s=this.checkValue(d);s?this.onError(this.props.attr,j.I18n.t(s)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{if(d.trim()===parseInt(d,10).toString()){const p=this.onChange(this.props.attr,parseInt(d,10)||0);p instanceof Promise&&p.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:i&&typeof i=="string"?i:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}class Ua extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("rooms").then(n=>{const u=Object.keys(n).map(y=>({value:this.props.schema.short?y.replace("enum.rooms.",""):y,label:this.getText(n[y].common.name),obj:n[y]}));this.props.schema.allowDeactivate!==!1&&u.unshift({label:j.I18n.t(G.NONE_LABEL),value:G.NONE_VALUE}),this.setState({value:i,selectOptions:u})}).catch(n=>console.error(`Cannot get enums: ${n}`))}renderItem(i,n){if(!this.state.selectOptions)return null;const u=this.state.selectOptions.find(y=>y.value===this.state.value);return k.createElement(O.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>u?u.obj?k.createElement(j.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):u.label:"",onChange:y=>{this.setState({value:y.target.value==="_"?"":y.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(y=>k.createElement(O.MenuItem,{key:y.value,value:y.value,style:y.value===G.DIFFERENT_VALUE?{opacity:.5}:{}},y.obj?k.createElement(j.TextWithIcon,{value:y.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):y.label))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ga={noMargin:{"&>div":{marginTop:0}}};class Ka extends G{initialValue="";componentDidMount(){super.componentDidMount();let i=G.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[]));const n=[];(this.props.schema.options||[]).forEach(u=>{const y=u;Array.isArray(y.items)?(n.push({label:this.getText(u.label,this.props.schema.noTranslation),value:u.value,group:!0}),y.items.forEach(o=>n.push({label:this.getText(o.label,this.props.schema.noTranslation),value:o.value,hidden:o.hidden}))):n.push({label:this.getText(u.label,this.props.schema.noTranslation),value:u.value,hidden:u.hidden})}),Array.isArray(i)&&!this.props.schema.multiple?(this.initialValue=[...i],n.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),this.setState({value:G.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}_getValue(){let i=this.state.value===null||this.state.value===void 0?G.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[])),i}renderItem(i,n){if(!this.state.selectOptions)return null;const u=(this.state.selectOptions||[]).filter(h=>h.hidden?this.props.custom?!this.executeCustom(h.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!this.execute(h.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!0),y=this._getValue(),o=this.props.schema.multiple?null:u.find(h=>h.value==y);return k.createElement(O.FormControl,{variant:"standard",fullWidth:!0,sx:this.props.table!==void 0&&Ga.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,multiple:this.props.schema.multiple,disabled:!!n,value:y||"_",renderValue:h=>this.props.schema.multiple?k.createElement(O.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},h.map(d=>{const s=u.find(p=>p.value===d);if(s||this.props.schema.showAllValues!==!1){const p=(s==null?void 0:s.label)||d;return k.createElement(O.Chip,{key:d,label:p})}return null})):this.getText(o==null?void 0:o.label,this.props.schema.noTranslation),onChange:h=>{this.setState({value:h.target.value==="_"?"":h.target.value},()=>{let d;this.state.value===G.DIFFERENT_VALUE?d=this.onChange(this.props.attr,this.initialValue):d=this.onChange(this.props.attr,this.state.value),d instanceof Promise&&d.catch(s=>console.error(s))})}},u.map((h,d)=>h.group?k.createElement(O.ListSubheader,{key:d},this.getText(h.label,this.props.schema.noTranslation)):k.createElement(O.MenuItem,{key:d,value:h.value,style:h.value===G.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?k.createElement(O.Checkbox,{checked:y.includes(h.value),onClick:()=>{const s=JSON.parse(JSON.stringify(this._getValue())),p=y.indexOf(h.value);p!==-1?s.splice(p,1):(s.push(h.value),s.sort()),this.setState({value:s},()=>this.onChange(this.props.attr,s))}}):null,k.createElement(O.ListItemText,{primary:this.getText(h.label,this.props.schema.noTranslation)})))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ja={menuPaper:{maxHeight:800}};class Ya extends G{initialized=!1;localContext;askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}i===void 0&&(i=null),this.setState({running:!0},()=>{this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>this.setState({list:n,running:!1})).catch(n=>{console.error(`Cannot send command: ${n}`)})})}else{const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i,running:!1})}}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=G.getValue(this.props.data,n)),JSON.stringify(i)}_getValue(){let i=this.state.value===null||this.state.value===void 0?G.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[])),i}renderItem(i,n){var h;if(this.props.alive){const d=this.getContext();(d!==this.localContext||!this.initialized)&&(this.localContext=d,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}const u=this._getValue();if(!this.props.alive||!this.state.running&&!((h=this.state.list)!=null&&h.length))return this.props.schema.multiple||this.props.schema.manual===!1?j.I18n.t("ra_Cannot retrieve options, as instance is offline"):k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:u,error:!!i,disabled:!!n,onChange:d=>{const s=d.target.value;this.setState({value:s},()=>this.onChange(this.props.attr,(s||"").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?k.createElement(O.InputAdornment,{position:"end"},k.createElement(O.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({value:""},()=>this.onChange(this.props.attr,""))},k.createElement(X.Close,null))):null}}});if(this.state.running)return k.createElement(O.CircularProgress,{size:"24"});const y=this.state.list.filter(d=>d.hidden?this.props.custom?!this.executeCustom(d.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!this.execute(d.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!0),o=y.find(d=>d.value===u);return k.createElement(O.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,k.createElement(O.Select,{variant:"standard",error:!!i,multiple:this.props.schema.multiple,disabled:!!n,sx:{"&.MuiSelect-paper":this.props.schema.multiple?Ja.menuPaper:void 0},value:u,renderValue:d=>this.props.schema.multiple?k.createElement(O.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},d.map(s=>{const p=y.find(e=>e.value===s);if(p||this.props.schema.showAllValues!==!1){const e=(p==null?void 0:p.label)||s;return k.createElement(O.Chip,{key:s,label:e})}return null})):this.getText((o==null?void 0:o.label)||d,this.props.schema.noTranslation),onChange:d=>{const s=this.onChange(this.props.attr,d.target.value);s instanceof Promise&&s.catch(p=>console.error(`Cannot set value: ${p}`))}},y.map((d,s)=>d.group?k.createElement(O.ListSubheader,{key:s},this.getText(d.label,this.props.schema.noTranslation)):k.createElement(O.MenuItem,{key:s,value:d.value},this.props.schema.multiple?k.createElement(O.Checkbox,{checked:u.includes(d.value),onClick:()=>{const p=JSON.parse(JSON.stringify(this._getValue())),e=u.indexOf(d.value);e!==-1?p.splice(e,1):(p.push(d.value),p.sort()),this.setState({value:p},()=>this.onChange(this.props.attr,p))}}):null,k.createElement(O.ListItemText,{primary:d.label})))),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ti={fullWidth:{width:"100%"}};function ut(L){return L.split(".").reduce((i,n)=>(i<<8)+parseInt(n,10),0)>>>0}function Qa(L,i){var y,o;const n=(o=(y=L==null?void 0:L.native)==null?void 0:y.hardware)==null?void 0:o.networkInterfaces;if(!n)return null;let u;return Object.keys(n).forEach(h=>n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv4"&&!d.address.startsWith("172")&&(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/))?u=d.address:u||(d.family==="IPv4"&&i.includes(".")&&(ut(i)&ut(d.netmask),ut(d.address)&ut(d.netmask)),u=d.address))})),u||Object.keys(n).forEach(h=>n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv6"&&(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/))?u=d.address:u||(d.family==="IPv4"&&i.includes(".")&&(ut(i)&ut(d.netmask),ut(d.address)&ut(d.netmask)),u=d.address))})),u||Object.keys(n).forEach(h=>{n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/),u=d.address)})}),u||Object.keys(n).forEach(h=>{n[h].forEach(d=>{d.internal||(u=d.address)})}),u}class _i extends G{async componentDidMount(){var n;super.componentDidMount();let i=window.location.hostname;if(this.props.schema.openUrl){const u=await this.props.oContext.socket.getCurrentInstance(),y=await this.props.oContext.socket.getObject(`system.adapter.${u}`);if(y){const o=await this.props.oContext.socket.getObject(`system.host.${(n=y==null?void 0:y.common)==null?void 0:n.host}`);if(o){const h=Qa(o,window.location.hostname);if(h)i=`${h}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${y.common.host} for ${y._id}`);return}}}}await new Promise(u=>{this.setState({_error:"",_message:"",hostname:i},u)}),this.props.schema.onLoaded&&this._onClick()}renderErrorDialog(){return this.state._error?k.createElement(j.DialogError,{text:this.state._error,onClose:()=>this.setState({_error:""})}):null}renderMessageDialog(){return this.state._message?k.createElement(j.DialogMessage,{text:this.state._message,onClose:()=>this.setState({_message:""})}):null}_onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});const i=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,"")}`,n=`${window.location.protocol}//${this.state.hostname.split(":").length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,"")}`;let u=this.props.schema.data;if(u===void 0&&this.props.schema.jsonData){const o=this.getPattern(this.props.schema.jsonData,{_origin:i,_originIp:n,...this.props.data},!0);try{u=JSON.parse(o)}catch{console.error(`Cannot parse json data: ${o}`)}}u===void 0&&(u=null),this.props.schema.openUrl&&!u&&(u={_origin:i,_originIp:n});let y;this.props.schema.timeout&&(y=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:j.I18n.t("ra_Request timed out"),running:!1})},parseInt(this.props.schema.timeout,10)||1e4)),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",u).then(async o=>{if(y&&(clearTimeout(y),y=void 0),o!=null&&o.error)if(this.props.schema.error&&this.props.schema.error[o.error]){let h=this.getText(this.props.schema.error[o.error]);o.args&&o.args.forEach(d=>h=h.replace("%s",d)),this.setState({_error:h})}else this.setState({_error:o.error?j.I18n.t(o.error):j.I18n.t("ra_Error")});else{if(o!=null&&o.command){this.props.oContext.onBackEndCommand&&this.props.oContext.onBackEndCommand(o.command);return}if(o!=null&&o.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(o!=null&&o.openUrl&&this.props.schema.openUrl)window.open(o.openUrl,o.window||this.props.schema.window||"_blank");else if(o!=null&&o.result&&this.props.schema.result&&this.props.schema.result[o.result]){let h=this.getText(this.props.schema.result[o.result]);o.args&&o.args.forEach(d=>h=h.replace("%s",d)),window.alert(h)}if(o!=null&&o.native&&this.props.schema.useNative){for(const[h,d]of Object.entries(o.native))await this.onChangeAsync(h,d);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(o.native),this.props.data),300)}else o!=null&&o.result?window.alert(typeof o.result=="object"?JSON.stringify(o.result):o.result):window.alert(j.I18n.t("ra_Ok"));o!=null&&o.saveConfig&&this.props.onChange(null,null,null,!0)}}).catch(o=>{this.props.schema.error&&this.props.schema.error[o.toString()]?this.setState({_error:this.getText(this.props.schema.error[o.toString()])}):this.setState({_error:j.I18n.t(o.toString())||j.I18n.t("ra_Error")})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=k.createElement(X.Warning,null):i.type==="error"?n=k.createElement(X.Error,null):i.type==="info"&&(n=k.createElement(X.Info,null)),k.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n||void 0,onClose:u=>this.setState({confirmDialog:!1},()=>u&&this._onClick())})}renderItem(i,n){const u=this.getIcon();return k.createElement("div",{style:Ti.fullWidth},k.createElement(O.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...Ti.fullWidth,...this.props.schema.controlStyle||void 0},disabled:n||!this.props.alive,startIcon:u,title:this.props.alive?this.getText(this.props.schema.title)||"":j.I18n.t("ra_Instance is not alive"),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick()}},this.props.schema.showProcess&&this.state.running?k.createElement(O.CircularProgress,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog())}}const ki={fullWidth:{width:"100%"},icon:{width:24,height:24,marginRight:4}};class Xa extends G{async _onClick(){var u,y;let i=this.props.schema.val;if(typeof i=="string"&&i.includes("${")){i=this.getPattern(i,null,!0);const o=await this.props.oContext.socket.getObject(this.props.schema.id);((u=o==null?void 0:o.common)==null?void 0:u.type)==="number"?i=parseFloat(i):((y=o==null?void 0:o.common)==null?void 0:y.type)==="boolean"&&(i=i==="true"||i===!0||i==="1"||i===1)}const n=(this.props.schema.id||"").replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(n,{val:i,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(o){this.props.schema.error&&this.props.schema.error[o.toString()]?window.alert(this.getText(this.props.schema.error[o.toString()])):window.alert(j.I18n.t(o.toString())||j.I18n.t("ra_Error"))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=k.createElement(X.Warning,null):i.type==="error"?n=k.createElement(X.Error,null):i.type==="info"&&(n=k.createElement(X.Info,null)),k.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n,onClose:u=>this.setState({confirmDialog:!1},()=>u&&this._onClick())})}renderItem(i,n){return k.createElement(O.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:ki.fullWidth,disabled:n,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()}},this.props.schema.icon?k.createElement(j.Icon,{src:this.props.schema.icon,style:ki.icon}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation))}}const Mi={fullWidth:{width:"100%"},slider:{marginLeft:10,marginRight:10,width:"calc(100% - 20px)"}};class Za extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.setState({_value:i})}static getDerivedStateFromProps(i,n){if(i.schema.min!==void 0&&i.schema.min<0||i.schema.max!==void 0&&i.schema.max<0)return null;const u=G.getValue(i.data,i.attr);return u==null||u.toString()!==parseFloat(n._value).toString()?{_value:u}:null}renderItem(i,n){const u=this.props.schema.min||0,y=this.props.schema.max||100,o=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):"",h=[{value:u,label:u+o},{value:y,label:y+o}];return k.createElement(O.Box,{style:Mi.fullWidth},this.props.schema.label?k.createElement(O.Typography,{gutterBottom:!0},this.getText(this.props.schema.label)):null,k.createElement(O.Slider,{style:Mi.slider,value:this.state._value,getAriaValueText:d=>d+o,step:this.props.schema.step||(y-u)/100,valueLabelDisplay:"auto",marks:h,min:u,max:y,disabled:!!n,onChange:d=>{const s=d.target.value;this.setState({_value:s},()=>this.onChange(this.props.attr,s))}}),this.props.schema.help?k.createElement(O.Typography,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}function ht(L,i){return L==="edit"||L==="rename"?k.createElement(X.Edit,{style:i}):L==="delete"?k.createElement(X.Delete,{style:i}):L==="refresh"?k.createElement(X.Refresh,{style:i}):L==="newDevice"||L==="new"||L==="add"?k.createElement(X.Add,{style:i}):L==="discover"||L==="search"?k.createElement(X.Search,{style:i}):L==="unpairDevice"||L==="unpair"?k.createElement(X.LinkOff,{style:i}):L==="pairDevice"||L==="pair"?k.createElement(X.Link,{style:i}):L==="identify"?k.createElement(X.NotListedLocation,{style:i}):L==="play"?k.createElement(X.PlayArrow,{style:i}):L==="stop"?k.createElement(X.Stop,{style:i}):L==="pause"?k.createElement(X.Pause,{style:i}):L==="forward"||L==="next"?k.createElement(X.FastForward,{style:i}):L==="rewind"||L==="previous"?k.createElement(X.FastRewind,{style:i}):L==="lamp"||L==="light"?k.createElement(X.Lightbulb,{style:i}):L==="backlight"?k.createElement(X.Fluorescent,{style:i}):L==="dimmer"?k.createElement(X.WbIncandescent,{style:i}):L==="socket"?k.createElement(X.Power,{style:i}):L==="settings"?k.createElement(X.Settings,{style:i}):L==="users"||L==="group"?k.createElement(X.Group,{style:i}):L==="user"?k.createElement(X.Person,{style:i}):L==="qrcode"?k.createElement(X.QrCode,{style:i}):L==="connection"?k.createElement(X.Wifi,{style:i}):L==="no-connection"?k.createElement(X.WifiOff,{style:i}):L==="visible"?k.createElement(X.Visibility,{style:i}):null}function qa(L,i){return typeof i=="string"?{"@keyframes newStateAnimationOnceColor":{"0%":{color:i},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnceColor 2s ease-in-out"}:{"@keyframes newStateAnimationOnce":{"0%":{color:"#00f900"},"80%":{color:L.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnce 2s ease-in-out"}}class el extends G{controlTimeout=null;delayedUpdate={timer:null,value:null};getObjectID(){let i=this.props.schema.oid;return i.includes("${")&&(i=this.getPattern(i,null,!0)),this.props.schema.foreign?i:`${this.props.schema.system?"system.adapter.":""}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${i}`}async componentDidMount(){super.componentDidMount();const i=await this.props.oContext.socket.getObject(this.getObjectID()),n=this.props.schema.control||this.detectType(i);try{const u=await this.props.oContext.socket.getState(this.getObjectID());this.setState({stateValue:u?u.val:null,controlType:n,obj:i},async()=>{await this.props.oContext.socket.subscribeState(this.getObjectID(),this.onStateChanged)})}catch(u){console.error(`Cannot get state ${this.getObjectID()}: ${u}`),this.setState({controlType:n,obj:i})}}componentWillUnmount(){super.componentWillUnmount(),this.props.oContext.socket.unsubscribeState(this.getObjectID(),this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1).catch(i=>console.error(`Cannot control value: ${i.toString()}`)))}onStateChanged=(i,n)=>{let u=n?n.val:null;this.state.controlType==="button"||this.state.controlType==="switch"?(u=!!u,this.state.stateValue!==u&&this.setState({stateValue:u})):u!==null&&(this.state.controlType==="slider"||this.state.controlType==="number")?(u=parseFloat(u),console.log(`${Date.now()} Received new value: ${u}`),u!==this.state.stateValue?(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=u,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500)):this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null)):this.state.stateValue.toString()!==u.toString()&&this.setState({stateValue:u})};detectType(i){if(i=i||{},i.common=i.common||{},i.common.type==="boolean"){if(this.props.schema.controlled!==!1){if(i.common.read===!1||this.props.schema.controlled===!0)return"button";if(i.common.write||this.props.schema.controlled===!0)return"switch"}return"text"}return i.common.type==="number"&&this.props.schema.controlled!==!1?i.common.write||this.props.schema.controlled===!0?i.common.max!==void 0?"slider":"input":"text":i.common.write&&this.props.schema.controlled!==!1?"input":"text"}renderItem(i,n){var y,o,h,d,s;if(!this.state.obj)return null;let u;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||(y=this.state.obj.common.role)!=null&&y.includes("button"))){let p=null;this.props.schema.falseImage&&(p=ht(this.props.schema.falseImage));const e=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);!e&&p?u=k.createElement(O.IconButton,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async t=>{t&&await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},p):u=k.createElement(O.Button,{variant:this.props.schema.variant||"contained",startIcon:p,style:this.props.schema.falseTextStyle,disabled:n||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async t=>{t&&await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},e||this.getObjectID().split(".").pop())}else if(this.state.controlType==="input"||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type==="string")u=k.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:8,alignItems:"baseline"}},k.createElement(O.TextField,{style:{flex:1},value:this.state.stateValue,variant:"standard",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:p=>{this.props.schema.setOnEnterKey&&p.key==="Enter"&&this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)},onChange:p=>{this.setState({stateValue:p.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null,await this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!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&&k.createElement(O.Button,{variant:"outlined",onClick:()=>{this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)}},this.getText(typeof this.props.schema.showEnterButton=="string"?this.props.schema.showEnterButton:"Set")));else{let p;this.props.schema.size==="normal"?p=16:this.props.schema.size==="large"?p=20:typeof this.props.schema.size=="number"&&(p=this.props.schema.size);let e=this.getText(this.props.schema.label,this.props.schema.noTranslation);const t={display:"flex",alignItems:"center",fontSize:p||"1rem",gap:8};this.props.schema.narrow||(t.width="100%",t.justifyContent="space-between"),e.trim()&&!e.trim().endsWith(":")&&this.props.schema.addColon&&(e=`${e.trim()}:`);let r;this.props.schema.blinkOnUpdate&&(r=qa(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let l;this.props.schema.labelIcon&&(l=k.createElement(j.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let a;if(e&&l?a=k.createElement("div",{style:{whiteSpace:"nowrap"}},l,e):e?a=k.createElement("div",{style:{whiteSpace:"nowrap"}},e):l&&(a=l),this.state.controlType==="switch"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(o=this.state.obj.common.role)!=null&&o.includes("switch"))){let c=null;const f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=ht(this.props.schema.trueImage,b?{marginRight:8}:void 0)),u=k.createElement(O.Switch,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async A=>{A&&await this.props.oContext.socket.setState(this.getObjectID(),!this.state.stateValue,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),!this.state.stateValue,!1)}}),(f||c||b||v)&&(u=k.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14}},k.createElement("span",{style:this.props.schema.falseTextStyle},f,c),u,k.createElement("span",{style:this.props.schema.trueTextStyle},v,b))),a&&(u=k.createElement("div",{style:t},a,u))}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==="%")||(h=this.state.obj.common.role)!=null&&h.includes("slider")||(d=this.state.obj.common.role)!=null&&d.includes("dimmer")||(s=this.state.obj.common.role)!=null&&s.includes("blind"))){let c=null;const f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=ht(this.props.schema.trueImage,b?{marginRight:8}:void 0));const A=this.props.schema.min===void 0?this.state.obj.common.min||0:this.props.schema.min,D=this.props.schema.max===void 0?this.state.obj.common.max===void 0?100:this.state.obj.common.max:this.props.schema.max,E=this.props.schema.step===void 0?this.state.obj.common.step||1:this.props.schema.step;u=k.createElement(O.Slider,{style:{width:"100%",flexGrow:1},min:A,max:D,disabled:!!this.props.schema.readOnly,step:E,value:this.state.stateValue,valueLabelDisplay:"auto",valueLabelFormat:g=>`${g}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||""}`,onChange:(g,S)=>{this.setState({stateValue:S},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,await this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)},this.props.schema.controlDelay||0)})}}),(f||c||b||v)&&(u=k.createElement("div",{style:{display:"flex",width:"100%",flexGrow:1,alignItems:"center"}},k.createElement("span",{style:{marginRight:16,...this.props.schema.falseTextStyle}},f,c),u,k.createElement("span",{style:{marginLeft:16,...this.props.schema.trueTextStyle}},v,b))),a&&(u=k.createElement("div",{style:t},a,u))}else if(this.state.obj.common.type==="number"&&this.state.obj.common.write){const c=this.props.schema.min===void 0?this.state.obj.common.min===void 0?void 0:this.state.obj.common.min:this.props.schema.min,f=this.props.schema.max===void 0?this.state.obj.common.max===void 0?void 0:this.state.obj.common.max:this.props.schema.max,v=this.props.schema.step===void 0?this.state.obj.common.step===void 0?void 0:this.state.obj.common.step:this.props.schema.step;u=k.createElement(O.TextField,{variant:"standard",style:{width:"100%"},value:this.state.stateValue,type:"number",slotProps:{htmlInput:{min:c,max:f,step:v,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:b=>{this.setState({stateValue:b.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;const A=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.getObjectID(),A,!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 c=null,f,v;this.state.stateValue?(f=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(c=ht(this.props.schema.falseImage,f?{marginRight:8}:void 0)),v=this.props.schema.trueTextStyle):(f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0)),v=this.props.schema.falseTextStyle),v=Object.assign(t,v),u=k.createElement("div",{style:v},a,k.createElement(O.Box,{style:{display:"flex",alignItems:"center",gap:8},sx:r,key:this.props.schema.blinkOnUpdate?f:void 0},c,f||(this.state.stateValue?j.I18n.t("ra_true"):j.I18n.t("ra_false"))))}else{const c=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit;let f,v;this.state.controlType==="html"?(v=(this.state.stateValue||"").toString(),f=k.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.stateValue}})):this.state.stateValue===null?(f="null",v=f):this.state.stateValue===void 0?(f="undefined",v=f):(f=this.state.stateValue.toString(),v=f),u=k.createElement("div",{style:t},a,k.createElement("div",{style:{display:"flex",alignItems:"baseline",gap:4}},k.createElement(O.Box,{sx:r,key:this.props.schema.blinkOnUpdate?v:void 0},f),c?k.createElement("span",{style:{opacity:.7,fontSize:"smaller"}},c):null))}}return u}}const Nn={fullWidth:L=>({width:"100%",backgroundColor:L.palette.mode==="dark"?"#FFF":"#000",borderStyle:"hidden"}),primary:L=>({backgroundColor:L.palette.primary.main}),secondary:L=>({backgroundColor:L.palette.secondary.main})};class tl extends G{renderItem(){return k.createElement(O.Box,{component:"hr",sx:j.Utils.getStyle(this.props.oContext.theme,Nn.fullWidth,this.props.schema.color==="primary"?Nn.primary:this.props.schema.color==="secondary"?Nn.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})})}}const nl={header:L=>({width:"100%",background:L.palette.primary.main,color:L.palette.primary.contrastText,padding:"4px !important",borderRadius:"3px",marginBlockEnd:0,marginBlockStart:0})};class il extends G{renderItem(){let i="h5";switch((this.props.schema.size||5).toString()){case"1":i="h1";break;case"2":i="h2";break;case"3":i="h3";break;case"4":i="h4";break;case"5":default:i="h5";break}return k.createElement(O.Box,{component:i,sx:nl.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}}class rl extends G{renderItem(){let i=this.props.schema.src;return i&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!i.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(i=`adapter/${this.props.oContext.adapterName}/${i}`),k.createElement("img",{src:i,style:{cursor:this.props.schema.href?"pointer":void 0,width:"100%",height:"100%"},onClick:this.props.schema.href?()=>this.props.schema.href&&window.open(this.props.schema.href,"_blank"):null,alt:""})}}function Li(L,i,n){return typeof n=="string"?{"@keyframes newValueAnimationOnceColor":{"0%":{color:i?`${n} !important`:n},"100%":{color:L.palette.mode==="dark"?i?"#fff !important":"#fff":i?"#000 !important":"#000"}},animation:"newValueAnimationOnceColor 2s ease-in-out"}:{"@keyframes newValueAnimationOnce":{"0%":{color:i?"#00f900 !important":"#00f900"},"80%":{color:L.palette.mode==="dark"?i?"#518851 !important":"#518851":i?"#008000 !important":"#008000"},"100%":{color:L.palette.mode==="dark"?i?"#fff !important":"#fff":i?"#000 !important":"#000"}},animation:"newValueAnimationOnce 2s ease-in-out"}}function Ii(L,i){return typeof i=="string"?{"@keyframes blinkAnimationColor":{"0%":{color:i},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimationColor 2s ease-in-out infinite"}:{"@keyframes blinkAnimation":{"0%":{color:"#00f900"},"80%":{color:L.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimation 2s ease-in-out infinite"}}const Mt={label:{fontWeight:"bold",whiteSpace:"nowrap"},valueImage:{maxHeight:"100%"},valueAndUnit:{display:"flex",gap:4,alignItems:"baseline"},value:{},unit:{fontSize:"smaller",opacity:.7}};class sl extends G{renderItem(i){let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof n=="string"&&!n.trim().endsWith(":")&&(n=`${n.trim()}:`),n&&(n.includes("
")||n.includes(""))&&(n=j.Utils.renderTextWithA(n));let u;this.props.schema.size==="normal"?u=16:this.props.schema.size==="large"?u=20:typeof this.props.schema.size=="number"&&(u=this.props.schema.size);const y={width:"100%",height:"100%",display:"flex",alignItems:"center",position:"relative",fontSize:u};this.props.schema.narrow?y.gap=8:y.justifyContent="space-between";let o,h;this.props.schema.data&&typeof this.props.schema.data=="object"&&this.props.schema.data.en?h=this.getText(this.props.schema.data):typeof this.props.schema.data=="object"||this.props.schema.data===void 0||this.props.schema.data===null?h=JSON.stringify(this.props.schema.data):typeof this.props.schema.data=="number"?(h=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(h=h.replace(".",","))):(!this.props.schema.booleanAsCheckbox||typeof this.props.schema.data!="boolean")&&(h=this.props.schema.data.toString());let d=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data=="boolean")o=k.createElement(O.Checkbox,{checked:!!o,disabled:!0,size:this.props.schema.size==="small"?"small":this.props.schema.size==="large"?"large":void 0});else if(h.startsWith("data:image/"))o=k.createElement("div",{style:{...Mt.value,...Mt.valueImage,...this.props.schema.styleValue||void 0}},k.createElement(j.Icon,{src:h}));else{const t={...Mt.value,...this.props.schema.styleValue||void 0};this.props.schema.html?o=k.createElement("div",{style:t,dangerouslySetInnerHTML:{__html:h}}):Array.isArray(this.props.schema.data)?(d=!0,o=k.createElement("div",{style:t},this.props.schema.data.map((r,l)=>k.createElement("div",{key:l},typeof r=="object"||r===null||r===void 0?JSON.stringify(r):r)))):h.includes(` -`)?(d=!0,o=k.createElement("div",{style:t},j.Utils.renderTextWithA(h))):o=k.createElement("div",{style:t},h)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){const t=Li(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),r=Ii(this.props.oContext.theme,this.props.schema.blink);o=k.createElement(O.Box,{key:h,sx:{...t,...r}},o)}else if(this.props.schema.blinkOnUpdate){const t=Li(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);o=k.createElement(O.Box,{key:h,sx:t},o)}else if(this.props.schema.blink){const t=Ii(this.props.oContext.theme,this.props.schema.blink);o=k.createElement(O.Box,{sx:t},o)}this.props.schema.unit&&(o=k.createElement("div",{style:Mt.valueAndUnit},o,k.createElement("div",{style:{...Mt.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=k.createElement(j.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let p;this.props.schema.copyToClipboard&&(p=k.createElement(X.ContentCopy,{className:"staticCopyButton",style:{position:"absolute",top:"calc(50% - 12px)",right:0,cursor:"pointer"},onClick:()=>{j.Utils.copyToClipboard(h),window.alert(j.I18n.t("ra_Copied"))}}));const e={"& .staticCopyButton":{display:"none"},"& .staticCopyButton:action":{transform:"scale(0.9)"},"&:hover .staticCopyButton":{display:"block"}};return this.props.schema.highlight&&(e["&:hover"]={backgroundColor:this.props.oContext.themeType==="dark"?"#51515180":"#b8b8b880"}),d&&(y.alignItems="top"),k.createElement(O.Box,{component:"div",style:y,sx:e},k.createElement("div",{style:{...Mt.label,...this.props.schema.styleLabel||void 0}},s,n),o,p)}}const Fi={fullWidth:{height:"100%",width:"100%"},link:L=>({textDecoration:"underline",color:L.palette.mode==="dark"?"#4dabf5":"#254e72",cursor:"pointer"})};function Ri(L,i,n){let u,y="";L?L.toString().startsWith("#")||L.toString().startsWith("/")?(u=i||"_self",y=L):L.startsWith("http://")||L.startsWith("https://")?(u=i||"_blank",y=L):(y=`#tab-instances/config/${n}/${L}`,u=i||"_self"):(y=`#tab-instances/config/${n}`,u=i||"_self"),u==="_self"?setTimeout(o=>{o.startsWith("#")?window.location.hash=o:o.startsWith("/")?y=`${window.location.protocol}:${window.location.host}${y}`:(o.startsWith("http://")||o.startsWith("https://"))&&(window.location.href=o)},100,y):(y.startsWith("#")?y=`${window.location.protocol}:${window.location.host}${window.location.pathname}${y}`:y.startsWith("/")&&(y=`${window.location.protocol}:${window.location.host}${y}`),window.open(y,u))}class Oi extends G{renderItem(i,n){if(this.props.schema.button){const y=this.getIcon();return k.createElement(O.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...Fi.fullWidth,...this.props.schema.controlStyle||void 0},disabled:n,startIcon:y,onClick:this.props.schema.href?()=>{const o=this.props.schema.href?this.getText(this.props.schema.href,!0):null;o&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:o,target:this.props.schema.target,close:this.props.schema.close}):Ri(o,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let u=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);return u&&(u.includes("")||u.includes(""))&&(u=j.Utils.renderTextWithA(u)),k.createElement(O.Box,{component:"span",style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?Fi.link:void 0,onClick:this.props.schema.href?()=>{const y=this.props.schema.href?this.getText(this.props.schema.href,!0):null;y&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:y,target:this.props.schema.target||"_blank",close:this.props.schema.close}):Ri(y,this.props.schema.target||"_blank",`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},u)}}const Bn=1024*1024,fe={paper:{width:"100%",marginBottom:16,backgroundColor:"rgba(255, 255, 255, 0.1)"},headerText:{width:"100%"},table:{minWidth:750},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)"},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"},tooltip:{pointerEvents:"none"}};function ol(L,i,n){i=i||"key";const u=[];return Object.keys(L).forEach(y=>{const o={};o[i]=y,n?(o[n]=L[y],u.push(o)):u.push(Object.assign(o,L[y]))}),u}function Ni(L,i,n){i=i||"key";const u={};return L.forEach(y=>{let o=y[i];o==null&&(o=""),delete y[i],n?u[o]=y[n]:u[o]=y}),u}function al(L,i){let n="";for(let u=0;u{n.filter&&(this.filterRefs[n.attr]=pt.createRef())}),this.refDiv=k.createRef()}async componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr)||[];let n;if(this.props.schema.objKeyName?n=ol(i,this.props.schema.objKeyName,this.props.schema.objValueName):n=i,Array.isArray(n)||(n=[]),this.props.schema.encryptedAttributes){const u=await this.props.oContext.socket.getCompactSystemConfig();this.secret=(u==null?void 0:u.native.secret)||this.secret,i.forEach(y=>{this.props.schema.encryptedAttributes.forEach(o=>{y[o]&&(y[o]=ll(this.secret,y[o]))})})}this.setState({value:n,visibleValue:null,orderBy:"",order:"asc",iteration:0,filterOn:[],width:0},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),super.componentWillUnmount()}itemTable(i,n,u){var d;const{schema:y}=this.props,o=(d=y.items)==null?void 0:d.find(s=>s.attr===i);if(!o)return null;const h={items:{[i]:o}};return k.createElement($t,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:u,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:n,globalData:this.props.data,index:u+this.state.iteration,onChange:(s,p)=>{const e=JSON.parse(JSON.stringify(this.state.value));e[u][s]=p,this.setState({value:e},()=>{this.validateUniqueProps(),this.onChangeWrapper(e,!0)})},onError:(s,p)=>this.onError(s,p),originalData:this.props.originalData,schema:h,table:!0,themeName:this.props.themeName})}validateUniqueProps(){if(this.props.schema.uniqueColumns)for(const i of this.props.schema.uniqueColumns){const n=[];this.state.value.find(y=>{const o=y[i];return n.includes(o)?(this.onError(i,"is not unique"),this.setState({errorMessage:j.I18n.t('Non-allowed duplicate entry "%s" in column "%s"',o,i)}),!0):(n.push(o),!1)})||(this.onError(i,null),this.setState({errorMessage:""}))}}static descendingComparator(i,n,u){return n[u]i[u]?1:0}static getComparator(i,n){return i==="desc"?(u,y)=>Ve.descendingComparator(u,y,n):(u,y)=>-Ve.descendingComparator(u,y,n)}static getFilterValue(i){var n,u,y;return(y=(u=(n=i==null?void 0:i.current)==null?void 0:n.children[0])==null?void 0:u.children[0])==null?void 0:y.value}static setFilterValue(i,n){return i.current.children[0].children[0].value=n}handleRequestSort=(i,n=!1)=>{const{order:u,orderBy:y}=this.state,h=n?u:y===i&&u==="asc"?"desc":"asc",d=this.stableSort(h,i);JSON.stringify(d)!==JSON.stringify(this.state.value)&&this.setState({value:d,order:h,orderBy:i,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,d))};stableSort=(i,n)=>{const{value:u}=this.state,y=Ve.getComparator(i,n),o=u.map((h,d)=>({el:h,index:d}));return o.sort((h,d)=>{const s=y(h.el,d.el);return s!==0?s:h.index-d.index}),o.map(h=>h.el)};renderShowHideFilter(i){return i.filter?k.createElement(O.IconButton,{title:j.I18n.t("ra_Show/hide filter input"),size:"small",onClick:()=>{const n=[...this.state.filterOn],u=this.state.filterOn.indexOf(i.attr);u===-1?n.push(i.attr):n.splice(u,1),this.setState({filterOn:n},()=>{u&&Ve.getFilterValue(this.filterRefs[i.attr])&&(Ve.setFilterValue(this.filterRefs[i.attr],""),this.applyFilter())})}},this.state.filterOn.includes(i.attr)?k.createElement(X.FilterAltOff,null):k.createElement(X.FilterAlt,null)):null}renderImportExportButtons(i){return k.createElement(k.Fragment,null,!i.noDelete&&i.import?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Import data from %s file","CSV"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:()=>this.setState({showImportDialog:!0})},k.createElement(X.UploadFile,null))):null,i.export?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Export data to %s file","CSV"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:()=>this.onExport()},k.createElement(X.Download,null))):null,k.createElement(O.IconButton,{disabled:!0,size:"small"},k.createElement(X.Delete,null)))}renderAddButton(i){return k.createElement(O.Tooltip,{title:i?j.I18n.t("ra_Cannot add items with set filter"):j.I18n.t("ra_Add row"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement("span",null,k.createElement(O.IconButton,{size:"small",color:"primary",disabled:!!i&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},k.createElement(X.Add,null))))}enhancedTableHead(i,n){var h;const{schema:u}=this.props,{order:y,orderBy:o}=this.state;return k.createElement(O.TableHead,null,k.createElement(O.TableRow,null,(h=u.items)==null?void 0:h.map((d,s)=>this.renderOneFilter({schema:u,style:{width:d.width},showAddButton:!s&&!u.noDelete,headCell:d,order:y,orderBy:o,index:s,doAnyFilterSet:n})),!u.noDelete&&k.createElement(O.TableCell,{style:{paddingLeft:20,paddingRight:20,width:i,textAlign:"right"},padding:"checkbox"},this.renderImportExportButtons(u))))}onDelete=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value));n.splice(i,1),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};onExport(){const{schema:i}=this.props,{value:n}=this.state,y=[i.items.map(d=>d.attr).join(";")];n.forEach(d=>{const s=[];i.items.forEach(p=>{var e;(e=d[p.attr])!=null&&e.includes(";")?s.push(`"${d[p.attr]}"`):s.push(d[p.attr]===void 0||d[p.attr]===null?"":d[p.attr])}),y.push(s.join(";"))});const o=document.createElement("a");o.setAttribute("href",`data:text/csv;charset=utf-8,${encodeURIComponent(y.join(` -`))}`);const h=new Date;o.setAttribute("download",`${h.getFullYear()}_${(h.getMonth()+1).toString().padStart(2,"0")}_${h.getDate().toString().padStart(2,"0")}_${this.props.oContext.adapterName}.${this.props.oContext.instance}_${this.props.attr}.csv`),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)}onImport(i){var h;const n=i.split(` -`).map(d=>d.replace("\r","").trim()),{schema:u}=this.props,y=n.shift().split(";").filter(d=>d&&u.items.find(s=>s.attr===d)),o=[];n.forEach(d=>{const s=d.split(";"),p={};for(let e=0;ea.attr===y[e]);l&&l.type==="number"?r=parseFloat(t):r=t}else r=t;p[y[e]]=r}o.push(p)}),o.length?(h=this.state.value)!=null&&h.length?this.setState({showTypeOfImportDialog:o,showImportDialog:!1}):this.setState({value:o,showImportDialog:!1}):window.alert("ra_No data found in file")}onClone=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value)),u=JSON.parse(JSON.stringify(n[i]));if(typeof this.props.schema.clone=="string"&&typeof u[this.props.schema.clone]=="string"){let y=1,o=u[this.props.schema.clone];const h=o.match(/(\d+)$/);for(h?(o=o.replace(h[0],""),y=parseInt(h[0],10)+1):o+="_";n.find(d=>d[this.props.schema.clone]===o+y.toString());)y++;u[this.props.schema.clone]=`${u[this.props.schema.clone]}_${y}`}n.splice(i,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};onChangeWrapper=(i,n)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((u,y)=>{this.typingTimer=null;let o;if(this.props.schema.encryptedAttributes){const h=JSON.parse(JSON.stringify(u));if(h.forEach(d=>{this.props.schema.encryptedAttributes.forEach(s=>{d[s]&&(d[s]=al(this.secret,d[s]))})}),this.props.schema.objKeyName){const d=Ni(h,this.props.schema.objKeyName,this.props.schema.objValueName);o=this.onChange(this.props.attr,d)}else o=this.onChange(this.props.attr,h)}else if(this.props.schema.objKeyName){const h=Ni(JSON.parse(JSON.stringify(u)),this.props.schema.objKeyName,this.props.schema.objValueName);o=this.onChange(this.props.attr,h)}else o=this.onChange(this.props.attr,u);o instanceof Promise&&o.catch(h=>console.error(`Cannot save: ${h}`)),y&&(this.applyFilter(!1,u),this.handleRequestSort(this.state.orderBy,!0))},300,i,n)};onAdd=()=>{var y;const{schema:i}=this.props,n=JSON.parse(JSON.stringify(this.state.value)),u=(y=i.items)==null?void 0:y.reduce((o,h)=>{let d;return h.defaultFunc?this.props.custom?d=h.defaultFunc?this.executeCustom(h.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,n.length,this.props.data):this.props.schema.default:d=h.defaultFunc?this.execute(h.defaultFunc,this.props.schema.default,this.props.data,n.length,this.props.data):this.props.schema.default:d=h.default===void 0?null:h.default,o[h.attr]=d,o},{});n.push(u),this.setState({value:n},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(i=>Ve.getFilterValue(this.filterRefs[i]))}applyFilter=(i,n,u)=>{n=n||this.state.value;let y=n.map((o,h)=>h);if(Object.keys(this.filterRefs).forEach(o=>{let h=Ve.getFilterValue(this.filterRefs[o]);!i&&h?(h=h.toLowerCase(),y=y.filter(d=>n[d]&&n[d][o]&&n[d][o].toLowerCase().includes(h))):this.filterRefs[o].current&&Ve.setFilterValue(this.filterRefs[o],"")}),y.length===n.length&&(y=null),y===null&&this.state.visibleValue===null){u&&u();return}JSON.stringify(y)!==JSON.stringify(this.state.visibleValue)?this.setState({visibleValue:y},()=>u&&u()):u&&u()};onMoveUp(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i-1,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))}onMoveDown(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i+1,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))}onDrop(i){const n=i[0],u=new FileReader;u.onabort=()=>console.log("file reading was aborted"),u.onerror=()=>console.log("file reading has failed"),u.onload=()=>{if(n.size>Bn){window.alert(j.I18n.t("ra_File is too big. Max %sk allowed. Try use SVG.",Math.round(Bn/1024)));return}const y=new Uint8Array(u.result).reduce((o,h)=>o+String.fromCharCode(h),"");this.onImport(y)},u.readAsArrayBuffer(n)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?k.createElement(O.Dialog,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:"md"},k.createElement(O.DialogTitle,null,j.I18n.t("ra_Append or replace?")),k.createElement(O.DialogContent,null,j.I18n.t("ra_Append %s entries or replace existing?",this.state.showTypeOfImportDialog.length)),k.createElement(O.DialogActions,null,k.createElement(O.Button,{variant:"contained",color:"primary",autoFocus:!0,onClick:()=>{const i=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(n=>i.push(n)),this.setState({value:i,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(i)))}},j.I18n.t("ra_Append")),k.createElement(O.Button,{variant:"contained",color:"secondary",autoFocus:!0,onClick:()=>{const i=this.state.showTypeOfImportDialog;this.setState({value:i,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(i)))}},j.I18n.t("ra_Replace")))):null}showImportDialog(){return this.state.showImportDialog?k.createElement(O.Dialog,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:"md",fullWidth:!0},k.createElement(O.DialogTitle,null,j.I18n.t("ra_Import from %s","CSV")),k.createElement(O.DialogContent,null,k.createElement(Wi,{multiple:!1,accept:{"text/csv":[".csv"]},maxSize:Bn,onDragEnter:()=>this.setState({uploadFile:"dragging"}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(i,n)=>{this.setState({uploadFile:!1}),i.length?this.onDrop(i):window.alert(n&&n[0]&&n[0].errors&&n[0].errors[0]&&n[0].errors[0].message||j.I18n.t("ra_Cannot upload"))}},({getRootProps:i,getInputProps:n})=>k.createElement("div",{style:{...fe.uploadDiv,...this.state.uploadFile==="dragging"?fe.uploadDivDragging:void 0,...fe.dropZone,...this.state.icon?void 0:fe.dropZoneEmpty},...i()},k.createElement("input",{...n()}),k.createElement("div",{style:fe.uploadCenterDiv},k.createElement("div",{style:fe.uploadCenterTextAndIcon},k.createElement(X.UploadFile,{style:fe.uploadCenterIcon}),k.createElement("div",{style:fe.uploadCenterText},this.state.uploadFile==="dragging"?j.I18n.t("ra_Drop file here"):j.I18n.t("ra_Place your files here or click here to open the browse dialog"))))))),k.createElement(O.DialogActions,null,k.createElement(O.Button,{variant:"contained",onClick:()=>this.setState({showImportDialog:!1}),color:"primary",startIcon:k.createElement(X.Close,null)},j.I18n.t("Cancel")))):null}renderOneFilter(i){return k.createElement(O.TableCell,{key:`${i.headCell.attr}_${i.index}`,style:i.style,align:"left",sortDirection:i.orderBy===i.headCell.attr?i.order:!1},k.createElement("div",{style:{...fe.flex,...i.schema.showFirstAddOnTop?{flexDirection:"column"}:void 0}},i.showAddButton?this.renderAddButton(i.doAnyFilterSet):null,i.headCell.sort&&k.createElement(O.TableSortLabel,{active:!0,style:i.orderBy!==i.headCell.attr?fe.silver:void 0,direction:i.orderBy===i.headCell.attr?i.order:"asc",onClick:()=>this.handleRequestSort(i.headCell.attr)}),i.headCell.filter&&this.state.filterOn.includes(i.headCell.attr)?k.createElement(O.TextField,{variant:"standard",ref:this.filterRefs[i.headCell.attr],onChange:()=>this.applyFilter(),title:j.I18n.t("ra_You can filter entries by entering here some text"),slotProps:{input:{endAdornment:Ve.getFilterValue(this.filterRefs[i.headCell.attr])&&k.createElement(O.InputAdornment,{position:"end"},k.createElement(O.IconButton,{size:"small",tabIndex:-1,onClick:()=>{Ve.setFilterValue(this.filterRefs[i.headCell.attr],""),this.applyFilter()}},k.createElement(X.Close,null)))}},fullWidth:!0,placeholder:this.getText(i.headCell.title)}):k.createElement("span",{style:fe.headerText},this.getText(i.headCell.title)),this.renderShowHideFilter(i.headCell)))}enhancedFilterCard(){var o;const{schema:i}=this.props,{order:n,orderBy:u}=this.state;let y;return this.props.schema.compact&&(y={paddingTop:1,paddingBottom:1}),k.createElement(O.Grid2,{size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},k.createElement(O.Card,null,k.createElement(O.Paper,{style:fe.paper},k.createElement(O.Accordion,{style:fe.paper},k.createElement(O.AccordionSummary,{expandIcon:k.createElement(X.ExpandMore,null)},k.createElement(O.Typography,null,j.I18n.t("ra_Filter and Data Actions"))),k.createElement(O.AccordionDetails,null,k.createElement(O.Table,null,k.createElement(O.TableBody,null,(o=i.items)==null?void 0:o.map((h,d)=>k.createElement(O.TableRow,{key:`${h.attr}_${d}`},this.renderOneFilter({schema:i,style:y,showAddButton:!1,headCell:h,order:n,orderBy:u,index:d,doAnyFilterSet:!1}))),k.createElement(O.TableRow,null,k.createElement(O.TableCell,{align:"left",style:y},k.createElement("span",{style:fe.headerText},j.I18n.t("ra_Actions"))),k.createElement(O.TableCell,{style:y},this.renderImportExportButtons(i))))))))))}enhancedBottomCard(){const{schema:i}=this.props;let n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});const u=this.isAnyFilterSet();return k.createElement(O.Grid2,{size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},k.createElement(O.Card,null,k.createElement(O.Paper,{style:fe.paper},k.createElement(O.Table,null,k.createElement(O.TableBody,null,k.createElement(O.TableRow,null,k.createElement(O.TableCell,{colSpan:i.items.length+1,style:n},this.renderAddButton(u))))))))}renderCards(){const{schema:i}=this.props;let{visibleValue:n}=this.state,u;this.props.schema.compact&&(u={paddingTop:1,paddingBottom:1}),n=n||this.state.value.map((o,h)=>h);const y=this.isAnyFilterSet();return k.createElement(O.Grid2,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),n.map((o,h)=>{var d;return k.createElement(O.Grid2,{key:`${o}_${h}`,size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},k.createElement(O.Card,null,k.createElement(O.Paper,{style:fe.paper},k.createElement(O.Table,null,k.createElement(O.TableBody,null,(d=i.items)==null?void 0:d.map(s=>k.createElement(O.TableRow,{key:`${s.attr}_${o}`},k.createElement(O.TableCell,{align:"left",style:u},k.createElement("span",{style:fe.headerText},this.getText(s.title))),k.createElement(O.TableCell,{align:"left",style:u},this.itemTable(s.attr,this.state.value[o],o)))),k.createElement(O.TableRow,null,k.createElement(O.TableCell,{align:"left",style:u},k.createElement("span",{style:fe.headerText},this.getText("Actions"))),k.createElement(O.TableCell,{align:"left",style:u},!y&&!this.state.orderBy?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement("span",null,k.createElement(O.IconButton,{size:"small",onClick:()=>this.onMoveUp(o),disabled:h===0},k.createElement(X.ArrowUpward,null)))):null,!y&&!this.state.orderBy?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Move down"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement("span",null,k.createElement(O.IconButton,{size:"small",onClick:()=>this.onMoveDown(o),disabled:h===n.length-1},k.createElement(X.ArrowDownward,null)))):null,k.createElement(O.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onDelete(o)},k.createElement(X.Delete,null))),this.props.schema.clone?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onClone(o)},k.createElement(X.ContentCopy,null))):null)))))))}),this.enhancedBottomCard())}renderTable(){const{schema:i}=this.props;let{visibleValue:n}=this.state;n=n||this.state.value.map((o,h)=>h);const u=this.isAnyFilterSet();let y;return this.props.schema.compact&&(y={paddingTop:1,paddingBottom:1}),k.createElement(O.Paper,{style:fe.paper},this.showImportDialog(),this.showTypeOfImportDialog(),i.label?k.createElement("div",{style:fe.label},k.createElement(O.Toolbar,{variant:"dense",style:fe.rootTool},k.createElement(O.Typography,{style:fe.title,variant:"h6",id:"tableTitle",component:"div"},this.getText(i.label)))):null,k.createElement(O.TableContainer,null,k.createElement(O.Table,{style:fe.table,size:"small"},this.enhancedTableHead(!u&&!this.state.orderBy?120:64,u),k.createElement(O.TableBody,null,n.map((o,h)=>{var d;return k.createElement(O.TableRow,{hover:!0,key:`${o}_${h}`},(d=i.items)==null?void 0:d.map(s=>k.createElement(O.TableCell,{key:`${s.attr}_${o}`,align:"left",style:y},this.itemTable(s.attr,this.state.value[o],o))),!i.noDelete&&k.createElement(O.TableCell,{align:"left",style:{...y,...fe.buttonCell}},!u&&!this.state.orderBy?h?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:()=>this.onMoveUp(o)},k.createElement(X.ArrowUpward,null))):k.createElement("div",{style:fe.buttonEmpty}):null,!u&&!this.state.orderBy?hthis.onMoveDown(o)},k.createElement(X.ArrowDownward,null))):k.createElement("div",{style:fe.buttonEmpty}):null,k.createElement(O.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onDelete(o)},k.createElement(X.Delete,null))),this.props.schema.clone?k.createElement(O.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:fe.tooltip}}},k.createElement(O.IconButton,{size:"small",onClick:this.onClone(o)},k.createElement(X.ContentCopy,null))):null))}),!i.noDelete&&n.length>=(i.showSecondAddAt||5)?k.createElement(O.TableRow,null,k.createElement(O.TableCell,{colSpan:i.items.length+1,style:{...y}},this.renderAddButton(u))):null)),!n.length&&this.state.value.length?k.createElement("div",{style:fe.filteredOut},k.createElement(O.Typography,{style:fe.title,variant:"h6",id:"tableTitle",component:"div"},j.I18n.t("ra_All items are filtered out"),k.createElement(O.IconButton,{size:"small",onClick:()=>this.applyFilter(!0)},k.createElement(X.Close,null)))):null),i.help?k.createElement(O.FormHelperText,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?k.createElement("div",{style:{display:"flex",padding:"5px"}},k.createElement(X.Warning,{color:"error"}),k.createElement("span",{style:{color:"red",alignSelf:"center"}},this.state.errorMessage)):null)}componentDidUpdate(){var i;(i=this.refDiv.current)!=null&&i.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var n;this.resizeTimeout=null,this.setState({width:(n=this.refDiv.current)==null?void 0:n.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(){const{schema:i}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;const n=this.getCurrentBreakpoint();let u;return n&&(i.useCardFor||["xs"]).includes(n)?u=this.renderCards():u=this.renderTable(),k.createElement("div",{ref:this.refDiv,style:{width:"100%"}},u)}}const ln={indeterminate:{opacity:.5},label:{width:"100%",fontSize:14,marginBottom:2},helper:{width:"100%",fontSize:12},error:{width:"100%",fontSize:12,color:"#FF0000"}};class ul extends G{updateTimeout=null;componentDidMount(){super.componentDidMount();let i=G.getValue(this.props.data,this.props.attr);if(Array.isArray(i)&&this.props.oContext.multiEdit){i=G.DIFFERENT_VALUE,this.setState({value:i,oldValue:i,jsonError:!1});return}this.setState({value:i,oldValue:i,jsonError:this.validateJson(i)})}validateJson(i){let n=!1;if(this.props.schema.validateJson&&(i||!this.props.schema.allowEmpty))try{JSON.parse(i)}catch(u){console.log("Error in JSON",u),n=!0}return n}static getDerivedStateFromProps(i,n){if(i.oContext.multiEdit&&n.value===G.DIFFERENT_VALUE)return{value:G.DIFFERENT_VALUE};let u=G.getValue(i.data,i.attr);return u!=null&&(u=u.toString()),u==null||u!==n.value&&u!==n.oldValue?{value:u}:null}renderItem(i,n){const u=Array.isArray(this.state.value)||this.state.value===G.DIFFERENT_VALUE;if(this.props.schema.time){let h="";return typeof this.state.value=="number"?this.state.value&&this.state.value<9466596e5?h=new Date(this.state.value*1e3).toLocaleString():h=new Date(this.state.value).toLocaleString():typeof this.state.value=="string"&&(h=new Date(this.state.value).toLocaleString()),k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:h,error:!!i||!!this.state.jsonError,disabled:!!n,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.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=null),u){const h=G.getValue(this.props.data,this.props.attr),d=(h==null?void 0:h.filter(s=>s||s===0).map(s=>({label:s.toString()||"",value:s})))||[];return d.unshift({label:j.I18n.t(G.DIFFERENT_LABEL),value:G.DIFFERENT_VALUE}),k.createElement(O.Autocomplete,{style:ln.indeterminate,fullWidth:!0,value:d[0],onChange:(s,p)=>{const e=p?p.value:"",t=this.onChange(this.props.attr,e,()=>{this.setState({value:e,oldValue:e,jsonError:this.validateJson(p)})});t instanceof Promise&&t.catch(r=>console.error(`Cannot set value: ${r}`))},options:d,getOptionLabel:s=>s.label,renderInput:s=>k.createElement(O.TextField,{variant:"standard",...s,error:!!i,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...s.inputProps,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:!!n})})}let y,o;if((this.props.schema.readOnly||n)&&this.props.schema.copyToClipboard?(this.props.schema.minRows>1&&(o={position:"absolute",right:3,top:20,zIndex:1e3}),y=k.createElement(O.IconButton,{style:o,size:"small",onClick:()=>{j.Utils.copyToClipboard(this.state.value),window.alert(j.I18n.t("ra_Copied"))}},k.createElement(j.IconCopy,null))):!this.props.schema.readOnly&&!n&&this.state.value&&!this.props.schema.noClearButton&&(this.props.schema.minRows>1&&(o={position:"absolute",right:3,top:20,zIndex:1e3}),y=k.createElement(O.IconButton,{style:o,size:"small",tabIndex:-1,onClick:()=>this.setState({value:"",oldValue:this.state.value},()=>this.onChange(this.props.attr,""))},k.createElement(X.Close,null)),this.props.schema.minRows<=1&&(y=k.createElement(O.InputAdornment,{position:"end"},y))),this.props.schema.minRows>1){const h=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return k.createElement("div",{style:{width:"100%",position:"relative"}},this.props.schema.label?k.createElement("div",{style:ln.label},this.getText(this.props.schema.label)):null,k.createElement(O.TextareaAutosize,{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===null||this.state.value===void 0?"":this.state.value,disabled:!!n,readOnly:this.props.schema.readOnly||!1,onChange:d=>{const s=d.target.value;this.setState({value:s,oldValue:this.state.value,jsonError:this.validateJson(s)},()=>this.onChange(this.props.attr,s||""))},placeholder:this.getText(this.props.schema.placeholder)}),h||i||this.state.jsonError?k.createElement("div",{style:i?ln.error:ln.helper},i||(this.state.jsonError?j.I18n.t("ra_Invalid JSON"):h)):null)}return k.createElement(O.TextField,{variant:"standard",fullWidth:!0,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i||!!this.state.jsonError,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:y}},onChange:h=>{const d=h.target.value;this.setState({value:d,oldValue:this.state.value,jsonError:this.validateJson(d)},()=>this.onChange(this.props.attr,d))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?j.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const hl={fullWidth:{width:"100%"}};class cl extends G{initialized=!1;localContext;askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>{if(typeof n=="object"){const u=n;this.setState({text:u.text||"",style:u.style,icon:u.icon,iconStyle:u.iconStyle})}else typeof n=="string"&&this.setState({text:n||""})}).catch(n=>console.error(`Cannot send command: ${n}`))}}getLocalContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=G.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(){if(this.props.alive){const n=this.getLocalContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let i=null;return this.state.icon&&(i=ht(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),i||(i=k.createElement(j.Icon,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}}))),this.props.schema.container==="text"?k.createElement(O.TextField,{variant:"standard",fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?k.createElement(O.IconButton,{size:"small",onClick:()=>{j.Utils.copyToClipboard(this.state.text),window.alert(j.I18n.t("ra_Copied"))}},k.createElement(j.IconCopy,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)}):k.createElement("div",{style:{...hl.fullWidth,...this.state.style||void 0}},i,this.props.schema.container==="html"?k.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.text||""}}):this.state.text)}}class pl extends G{componentDidMount(){super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);this.setState({value:i})}renderItem(i,n){const u=this.props.schema.returnFormat!=="HH:mm:ss",y=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||"00:00:00"}`));return k.createElement(Hi.TimePicker,{sx:o=>({width:"100%",borderBottom:`1px solid ${o.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${o.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:!!n,value:y,onChange:o=>{let h;h=o instanceof Date?o.toTimeString().split(" ")[0]:o.toTimeString(),u&&(h=h.split(":").slice(0,2).join(":")),this.setState({value:h},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||["hours","minutes","seconds"],label:this.getText(this.props.schema.label)})}}function dl(L,i){let n;return i&&L.substring(0,i.length)===i?n=L.substring(i.length+1):n=L,n=n.replace(/\./g,"/").replace(/_/g," "),n}class fl extends G{componentDidMount(){var n;super.componentDidMount();const i=G.getValue(this.props.data,this.props.attr);if(!i&&((n=this.props.customObj)!=null&&n._id)){const u=dl(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:u})}else this.setState({value:i||""})}renderItem(i,n){return k.createElement(O.TextField,{variant:"standard",fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!i,disabled:n,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:u=>{const y=u.target.value;this.setState({value:y},()=>this.onChange(this.props.attr,y))}})}}class gl extends G{async componentDidMount(){var n;super.componentDidMount();const i=await this.props.oContext.socket.getObject("system.meta.uuid");this.setState({uuid:((n=i==null?void 0:i.native)==null?void 0:n.uuid)||"unknown"})}renderItem(i,n){return k.createElement(O.TextField,{variant:"standard",fullWidth:!0,error:!!i,disabled:!!n,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:k.createElement(O.IconButton,{onClick:()=>{j.Utils.copyToClipboard(this.state.uuid),window.alert(j.I18n.t("ra_Copied %s",this.state.uuid))}},k.createElement(X.ContentCopy,null))}},value:this.state.uuid||"",label:this.getText(this.props.schema.label)||j.I18n.t("ra_Serial number (UUID)"),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const Bi={icon:{width:16,height:16,marginRight:8}};class ml extends G{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getUsers().then(i=>{const n={},u=j.I18n.getLanguage();this.props.schema.short?i.forEach(y=>{var o,h;return n[y._id]={color:(o=y.common)==null?void 0:o.color,icon:(h=y.common)==null?void 0:h.icon,name:j.Utils.getObjectNameFromObj(y,u)}}):i.forEach(y=>{var o,h;return n[y._id.replace(/^system\.user\./,"")]={color:(o=y.common)==null?void 0:o.color,icon:(h=y.common)==null?void 0:h.icon,name:j.Utils.getObjectNameFromObj(y,u)}}),this.setState({users:n})}).catch(i=>console.error(`Cannot get users: ${i}`))}renderItem(i,n){var y,o;const u=G.getValue(this.props.data,this.props.attr);return k.createElement(O.FormControl,{variant:"standard",fullWidth:!0},this.state.users&&this.props.schema.label?k.createElement(O.InputLabel,null,this.getText(this.props.schema.label)):null,this.state.users?k.createElement(O.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:h=>{var d,s,p;return k.createElement("span",null,this.state.users&&((d=this.state.users[h])!=null&&d.icon)?k.createElement(j.Icon,{src:this.state.users&&((s=this.state.users[h])==null?void 0:s.icon),style:Bi.icon}):null,this.state.users&&((p=this.state.users[h])==null?void 0:p.name)||h||"")},style:{color:this.state.users&&((y=this.state.users[u])==null?void 0:y.color)||void 0,backgroundColor:j.Utils.getInvertedColor(this.state.users&&((o=this.state.users[u])==null?void 0:o.color),this.props.oContext.themeType)},onChange:h=>this.onChange(this.props.attr,h.target.value)},this.state.users&&Object.keys(this.state.users).map(h=>k.createElement(O.MenuItem,{style:{color:this.state.users[h].color||void 0,backgroundColor:j.Utils.getInvertedColor(this.state.users[h].color,this.props.oContext.themeType)},key:h,value:h},this.state.users[h].icon?k.createElement(j.Icon,{src:this.state.users[h].icon,style:Bi.icon}):null,this.state.users[h].name))):k.createElement(O.TextField,{variant:"standard",error:!!i,disabled:!!n,value:u,onChange:h=>this.onChange(this.props.attr,h.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?k.createElement(O.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class vl extends G{async componentDidMount(){super.componentDidMount();const i=await os(()=>import("./index-CttBOMyq.js").then(n=>n.i),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);this.setState({QRCode:i.default})}renderItem(){const i=this.state.QRCode;return i?k.createElement(i,{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}):null}}const yl={accordion:Ts,alive:_s,autocomplete:ks,autocompleteSendTo:Ms,certCollection:Rs,certificate:Is,certificates:Fs,checkbox:Os,checkLicense:ct,chip:fi,chips:fi,color:Hs,coordinates:zs,cron:Ls,custom:Ut,datePicker:js,deviceManager:Vs,divider:tl,file:to,fileSelector:mn,func:no,header:il,image:so,imageSendTo:ro,instance:oo,interface:ao,ip:io,jsonEditor:Ra,language:Na,license:Ba,number:Pa,objectId:Wa,password:Ha,pattern:za,port:Va,qrCode:vl,room:Ua,select:Ka,selectSendTo:Ya,sendto:_i,sendTo:_i,setState:Xa,slider:Za,state:el,staticImage:rl,staticInfo:sl,staticLink:Oi,staticText:Oi,table:Ve,text:ul,textSendTo:cl,timePicker:pl,topic:fl,uuid:gl,user:ml},Qe={fullWidth:{width:"100%"},paper:{margin:1,width:"auto !important",overflowY:"auto",paddingBottom:1},paperWithIcons:{height:"calc(100vh - 259px) !important"},paperWithoutIcons:{height:"calc(100vh - 235px) !important"},padding:{padding:"10px"},heading:{},primary:L=>({backgroundColor:L.palette.primary.main,color:L.palette.mode==="dark"?"inherit":"#FFF"}),secondary:L=>({backgroundColor:L.palette.secondary.main})};class $t extends G{componentDidMount(){var i;super.componentDidMount(),(i=this.props.schema)!=null&&i.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)==="true"})}renderItems(i,n){return i?Object.keys(i).map(u=>{if(this.props.oContext.multiEdit&&i[u].noMultiEdit)return null;const y=i[u].type||"panel";let o,h="Use this.props.oContext.socket!";return y==="custom"?(i[u].url?o=Ut:this.props.oContext.customs&&this.props.oContext.customs[i[u].component]?o=this.props.oContext.customs[i[u].component]:(console.error(`Cannot find custom component: ${i[u].component}`),o=G),h=this.props.oContext.socket):y==="panel"?o=$t:o=yl[y]||G,k.createElement(o,{socket:h,globalData:this.props.globalData,oContext:this.props.oContext,key:`${u}_${this.props.index===void 0?"":this.props.index}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:Qe.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,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:i[u],attr:u,table:this.props.table})}):null}render(){const i=this.props.schema;if(!i)return null;const{disabled:n,hidden:u}=this.calculate(i),y=this.props.schema.items,o=this.props.schema.style||{};if(u){if(i.hideOnlyControl){const d=k.createElement(O.Grid2,{size:{xs:i.xs||void 0,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},sx:j.Utils.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:"left"},o,this.props.oContext.themeType==="dark"&&i.darkStyle)});return i.newLine?k.createElement(k.Fragment,null,k.createElement("div",{style:{flexBasis:"100%",height:0}}),d):d}return null}if(this.props.table)return this.renderItems(y,n);if(this.props.custom)return k.createElement(O.Grid2,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:Qe.fullWidth,columnSpacing:2,rowSpacing:1,sx:o},this.renderItems(y,n));let h;if(i.collapsable)h=k.createElement(O.Accordion,{key:`${this.props.attr}_${this.props.index}`,style:Qe.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})}},k.createElement(O.AccordionSummary,{expandIcon:k.createElement(X.ExpandMore,null),sx:j.Utils.getStyle(this.props.oContext.theme,o,this.props.oContext.themeType&&i.darkStyle,i.color==="primary"?Qe.primary:i.color==="secondary"&&Qe.secondary,{width:"100%"})},k.createElement(O.Typography,{style:Qe.heading},this.getText(i.label))),k.createElement(O.AccordionDetails,null,k.createElement(O.Grid2,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...o,width:"100%",padding:"10px"}},this.renderItems(y,n))));else{const d=j.Utils.getStyle(this.props.oContext.theme,this.props.style,o,{width:"100%"},this.props.isParentTab&&Qe.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:"calc(100% - 88px) !important"}:{height:"calc(100% - 64px) !important"}:this.props.withIcons?Qe.paperWithIcons:Qe.paperWithoutIcons));h=k.createElement(O.Box,{component:"div",key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:d},k.createElement(O.Grid2,{container:!0,columnSpacing:2,rowSpacing:1,sx:j.Utils.getStyle(this.props.oContext.theme,{width:"100%"},this.props.isParentTab&&Qe.padding,this.props.schema.innerStyle)},this.renderItems(y,n)))}if(!this.props.isParentTab){const d=k.createElement(O.Grid2,{title:this.getText(i.tooltip),size:{xs:i.xs||void 0,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},sx:{marginBottom:0,textAlign:"left",...o}},h);return i.newLine?k.createElement(k.Fragment,null,k.createElement("div",{style:{flexBasis:"100%",height:0}}),d):d}return h}}const un={tabs:{height:"100%",width:"100%"},panel:{width:"100%",display:"block"},panelWithIcons:{height:"calc(100% - 72px)"},panelWithoutIcons:{height:"calc(100% - 48px)"}};class bl extends G{resizeTimeout=null;refDiv;constructor(i){super(i);let n;if(this.props.root){const u=(window.location.hash||"").replace(/^#/,"").split("/");if(u.length>=3&&u[1]==="config"){const y=u[3],o=parseInt(y,10);y&&o.toString()===y?o>=0&&o{const i=(window.location.hash||"").replace(/^#/,"").split("/");if(i.length>3&&i[1]==="config"){const n=i[3],u=parseInt(n,10);let y;u.toString()===n?u>=0&&u{this.setState({initialBreakpoint:i})},50),i}return this.state.initialBreakpoint}componentDidUpdate(){var i;!this.state.initialBreakpoint&&((i=this.refDiv.current)!=null&&i.clientWidth)&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var n;this.resizeTimeout=null,this.setState({width:(n=this.refDiv.current)==null?void 0:n.clientWidth})},50))}onMenuChange(i){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||"App"}.${this.props.oContext.adapterName}`,i),this.setState({tab:i},()=>{if(this.props.root){const n=(window.location.hash||"").split("/");n.length>=3&&n[1]==="config"&&(n[3]=this.state.tab,window.location.hash=n.join("/"))}})}render(){const i=this.props.schema.items;let n=!1;const u=[];Object.keys(i).map(h=>{let d;if(i[h].expertMode&&!this.props.expertMode)return;if(this.props.custom){if(this.executeCustom(i[h].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData))return;d=this.executeCustom(i[h].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData)}else{if(this.execute(i[h].hidden,!1,this.props.data,this.props.index,this.props.globalData))return;d=this.execute(i[h].disabled,!1,this.props.data,this.props.index,this.props.globalData)}const s=this.getIcon(i[h].icon);n=n||!!s,u.push({icon:s,disabled:d,label:this.getText(i[h].label),name:h})}),u.find(h=>h.name===this.state.tab)||setTimeout(()=>this.setState({tab:u[0].name}),50);const y=this.getCurrentBreakpoint();let o;return y==="xs"&&u.length>2?o=k.createElement(O.Toolbar,{style:{top:2,backgroundColor:this.props.oContext.themeType==="dark"?"#222":"#DDD"},variant:"dense"},k.createElement(O.IconButton,{onClick:h=>this.setState({openMenu:h.currentTarget})},k.createElement(X.Menu,null)),this.state.openMenu?k.createElement(O.Menu,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},u.map(h=>k.createElement(O.MenuItem,{disabled:h.disabled,key:h.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(h.name))},selected:h.name===this.state.tab},n?k.createElement(O.ListItemIcon,null,h.icon):null,h.label))):null):o=k.createElement(O.Tabs,{variant:"scrollable",scrollButtons:"auto",style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(h,d)=>this.onMenuChange(d)},u.map(h=>k.createElement(O.Tab,{id:h.name,wrapped:!0,disabled:h.disabled,key:h.name,value:h.name,iconPosition:this.props.schema.iconPosition||"start",icon:h.icon,label:h.label}))),k.createElement("div",{style:un.tabs,ref:this.refDiv},o,k.createElement($t,{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:{...un.panel,...n?un.panelWithIcons:un.panelWithoutIcons},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.props.onError,customObj:this.props.customObj,custom:this.props.custom,schema:i[this.state.tab],table:this.props.table,withIcons:n}))}}const wl={root:{width:"100%",height:"100%"}};class cn extends pt.Component{forceUpdateHandlers;errorTimeout=null;errorCached=null;oContext;constructor(i){super(i),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData()}static getDerivedStateFromProps(i,n){return i.updateData!==n.updateData?{updateData:i.updateData,originalData:JSON.stringify(i.data),schema:JSON.parse(JSON.stringify(i.schema))}:null}static async loadI18n(i,n,u){if(n===!0||n&&typeof n=="string"){const y=j.I18n.getLanguage(),o=typeof n=="string"?n:"i18n";let h=await i.fileExists(`${u}.admin`,`${o}/${y}.json`),d;if(h?d=`${o}/${y}.json`:(h=await i.fileExists(`${u}.admin`,`${o}/${y}/translations.json`),h?d=`${o}/${y}/translations.json`:y!=="en"&&(h=await i.fileExists(`${u}.admin`,`${o}/en.json`),h?d=`${o}/en.json`:(h=await i.fileExists(`${u}.admin`,`${o}/en/translations.json`),h&&(d=`${o}/en/translations.json`)))),d){const s=await i.readFile(`${u}.admin`,d);let p;s.file!==void 0?p=s.file:p=s;try{const e=JSON.parse(p);j.I18n.extendTranslations(e,y)}catch(e){return console.error(`Cannot parse language file "${u}.admin/${d}: ${e}`),""}return d}return console.warn(`Cannot find i18n for ${u} / ${d}`),""}return n&&typeof n=="object"&&j.I18n.extendTranslations(n),""}onCommandRunning=i=>this.setState({commandRunning:i});readData(){this.props.socket.getCompactSystemConfig().then(i=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(n=>this.setState({systemConfig:i.common,alive:!!(n&&n.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)}))).catch(i=>console.error(`Cannot read system config: ${i}`))}onAlive=(i,n)=>{!!(n!=null&&n.val)!==this.state.alive&&this.setState({alive:!!(n!=null&&n.val)})};onChange=(i,n,u,y)=>{if(this.props.onValueChange)this.props.onValueChange(i,n,y),u&&u();else if(i&&this.props.onChange){const o={changed:JSON.stringify(i)!==this.state.originalData};this.setState(o,()=>{this.props.onChange(i,o.changed,y),u&&u()})}else y&&this.props.onChange(null,null,y)};onError=(i,n)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));const u=this.errorCached;n?u[i]=n:delete u[i],this.errorTimeout&&clearTimeout(this.errorTimeout),JSON.stringify(u)!==JSON.stringify(this.state.errors)?this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50):this.errorCached=null};flatten(i,n){return n=n||{},i.items&&Object.keys(i.items).forEach(u=>{n[u]=i.items[u],this.flatten(i.items[u],n)}),n}buildDependencies(i){const n=this.flatten(i);Object.keys(n).forEach(u=>{var y,o,h,d,s,p,e,t,r,l;(y=n[u].confirm)!=null&&y.alsoDependsOn&&((o=n[u].confirm)==null||o.alsoDependsOn.forEach(a=>{if(!n[a])console.error(`[JsonConfigComponent] Attribute ${a} does not exist!`),a.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${a.replace(/^data\./,"")}" instead of "${a}"`);else{n[a].confirmDependsOn=n[a].confirmDependsOn||[];const c={...n[u],attr:u};c.confirm&&(c.confirm.cancel="Undo"),n[a].confirmDependsOn.push(c)}})),(h=n[u].onChange)!=null&&h.alsoDependsOn&&((d=n[u].onChange)==null||d.alsoDependsOn.forEach(a=>{if(!n[a])console.error(`[JsonConfigComponent] Attribute ${a} does not exist!`),a.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${a.replace(/^data\./,"")}" instead of "${a}"`);else{n[a].onChangeDependsOn=n[a].onChangeDependsOn||[];const c={...n[u],attr:u};n[a].onChangeDependsOn.push(c)}})),(s=n[u].hidden)!=null&&s.alsoDependsOn&&((p=n[u].hidden)==null||p.alsoDependsOn.forEach(a=>{if(!n[a])console.error(`[JsonConfigComponent] Attribute ${a} does not exist!`),a.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${a.replace(/^data\./,"")}" instead of "${a}"`);else{n[a].hiddenDependsOn=n[a].hiddenDependsOn||[];const c={...n[u],attr:u};n[a].hiddenDependsOn.push(c)}})),(e=n[u].label)!=null&&e.alsoDependsOn&&((t=n[u].label)==null||t.alsoDependsOn.forEach(a=>{if(!n[a])console.error(`[JsonConfigComponent] Attribute ${a} does not exist!`),a.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${a.replace(/^data\./,"")}" instead of "${a}"`);else{n[a].labelDependsOn=n[a].labelDependsOn||[];const c={...n[u],attr:u};n[a].labelDependsOn.push(c)}})),(r=n[u].help)!=null&&r.alsoDependsOn&&((l=n[u].help)==null||l.alsoDependsOn.forEach(a=>{if(!n[a])console.error(`[JsonConfigComponent] Attribute ${a} does not exist!`),a.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${a.replace(/^data\./,"")}" instead of "${a}"`);else{n[a].helpDependsOn=n[a].helpDependsOn||[];const c={...n[u],attr:u};n[a].helpDependsOn.push(c)}}))})}updateContext(i){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},i&&this.forceUpdate()}renderItem(i){return i.type==="tabs"?k.createElement(bl,{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:(n,u)=>this.onError(n,u),originalData:JSON.parse(this.state.originalData),root:!0,schema:i,expertMode:this.props.expertMode,themeName:this.props.themeName}):i.type==="panel"||!i.type?k.createElement($t,{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:(n,u)=>this.onError(n,u),originalData:JSON.parse(this.state.originalData),root:!0,schema:i,themeName:this.props.themeName}):(console.error(`Unknown item type in root: ${JSON.stringify(i)}`),null)}changeLanguage=()=>{this.forceUpdate()};forceAttrUpdate=(i,n)=>{Array.isArray(i)?i.forEach(u=>this.forceUpdateHandlers[u]&&this.forceUpdateHandlers[u](n)):this.forceUpdateHandlers[i]&&this.forceUpdateHandlers[i](n)};registerOnForceUpdate=(i,n)=>{n?this.forceUpdateHandlers[i]=n:this.forceUpdateHandlers[i]&&delete this.forceUpdateHandlers[i]};render(){return!this.state.systemConfig||!this.oContext?k.createElement(O.LinearProgress,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),k.createElement("div",{style:{...!this.props.embedded||this.props.withoutSaveButtons?wl.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}}const Et={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 Cl(L,i){let n="";for(let u=0;u{const y=document.createElement("script");y.setAttribute("id",i),y.onload=u,y.src=L,document.getElementsByTagName("head")[0].appendChild(y)})}let Al=class extends j.Router{fileSubscribed=[];fileLangSubscribed="";secret;constructor(i){super(i),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:j.Theme(i.themeName),saveConfigDialog:!1,hash:"_"},this.secret=i.secret||"",this.getInstanceObject().then(n=>this.getConfigFile().then(u=>cn.loadI18n(this.props.socket,u==null?void 0:u.i18n,this.props.adapterName).then(y=>{y&&(this.fileLangSubscribed||(this.fileLangSubscribed=y,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),n?this.setState({schema:u,data:n.native,common:n.common,hash:pi(JSON.stringify(u)).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),this.fileLangSubscribed="")}handleFileSelect=i=>{const n=i.target.files[0];if(n){const u=new FileReader;u.onload=y=>{if(!y.target)return;const o=y.target.result;try{const h=JSON.parse(o);this.setState({data:h,changed:JSON.stringify(h)!==JSON.stringify(this.state.originalData)})}catch{window.alert(j.I18n.t("[JsonConfig] Failed to parse JSON file"))}},u.readAsText(n)}else window.alert(j.I18n.t("[JsonConfig] Failed to open JSON File"))};getExportImportButtons(){return k.createElement("div",{style:Et.exportImportButtons},k.createElement(O.Tooltip,{title:this.props.t("Import settings from JSON file"),slotProps:{popper:{sx:Et.tooltip}}},k.createElement(O.Fab,{size:"small",sx:{"&.MuiFab-root":Et.button},onClick:()=>{const i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("id","files"),i.setAttribute("opacity",0),i.addEventListener("change",n=>this.handleFileSelect(n),!1),i.click()}},k.createElement(X.Publish,null))),k.createElement(O.Tooltip,{title:this.props.t("Export setting to JSON file"),slotProps:{popper:{sx:Et.tooltip}}},k.createElement(O.Fab,{size:"small",sx:{"&.MuiFab-root":Et.button},onClick:()=>{this.state.data&&j.Utils.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},k.createElement(X.Publish,{style:{transform:"rotate(180deg)"}}))))}onFileChange=async(i,n,u)=>{var y;if(i===`${this.props.adapterName}.admin`&&u){if(n===this.fileLangSubscribed)try{await cn.loadI18n(this.props.socket,(y=this.state.schema)==null?void 0:y.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(n))try{const o=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:o,hash:pi(JSON.stringify(o)).toString()})}catch{}}};async getInstanceObject(){var i;try{const n=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(n.encryptedNative)){if(!this.secret){const u=await this.props.socket.getSystemConfig();await Pi("../../lib/js/crypto-js/crypto-js.js","crypto-js"),this.secret=u.native.secret}return(i=n.encryptedNative)==null||i.forEach(u=>{n.native[u]&&(n.native[u]=Dl(this.secret,n.native[u]))}),n}return n}catch(n){window.alert(`[JsonConfig] Cannot read instance object: ${n}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?k.createElement(j.DialogConfirm,{title:j.I18n.t("ra_Please confirm"),text:j.I18n.t("ra_Some data are not stored. Discard?"),ok:j.I18n.t("ra_Discard"),cancel:j.I18n.t("ra_Cancel"),onClose:i=>this.setState({confirmDialog:!1},()=>i&&j.Router.doNavigate(null))}):null}async scanForInclude(i,n){if(typeof i["#include"]=="string"){const y=await this._getConfigFile(i["#include"],[...n]);return delete i["#include"],y&&(i={...i,...y}),i}const u=Object.keys(i);for(let y=0;y ${n.join(" => ")}`),null;n.push(i);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,i)||(i="jsonConfig.json");const y=await this.props.socket.readFile(`${this.props.adapterName}.admin`,i);let o="",h="";if(y.file!==void 0&&(h=y.file),typeof h=="string")o=h;else if(h.type==="Buffer"){let d="";const s=new Uint8Array(h.data),p=s.byteLength;for(let e=0;ethis.setState({saveConfigDialog:!1},()=>i&&this.onSave(!0))}):null}findAttr(i,n){if(n=n||this.state.schema,n!=null&&n.items){if(i in n.items)return n.items[i];for(const u of Object.values(n.items)){const y=this.findAttr(i,u);if(y)return y}}return null}postProcessing(i,n,u){if(u=u||this.state.schema,!i){console.error(`Data is empty in postProcessing: ${n}, ${JSON.stringify(u)}`);return}const y=i[n];if(u.items)if(u.type==="table"){const o=y;if(!Array.isArray(o))return;for(const h of o)for(const d of u.items)this.postProcessing(h,d.attr,d)}else for(const[o,h]of Object.entries(u.items)){if(h.type==="panel"||h.type==="tabs"||h.type==="accordion")return;this.postProcessing(i,o,h)}else if(n&&typeof y=="string")if(u.type==="text")u.trim!==!1&&(i[n]=y.trim());else if(u.type==="ip")i[n]=y.trim();else if(u.type==="number"){const o=parseFloat(y.toString().replace(",","."));u.min!==void 0&&ou.max?i[n]=u.max:i[n]=o}else if(u.type==="port"){const o=parseInt(y.toString(),10);u.min!==void 0&&ou.max&&(i[n]=u.max),i[n]!==0&&o<20?i[n]=20:o>65535?i[n]=65535:i[n]=o}else u.type==="checkbox"&&(i[n]=i[n]===!0||i[n]==="true"||i[n]==="on"||i[n]===1||i[n]==="1")}async onSave(i,n){if(i){const u=await this.getInstanceObject();if(!u){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;const y={};for(const h of Object.keys(this.state.data)){const d=this.findAttr(h);(!d||!d.doNotSave||d.type==="state")&&!h.startsWith("_")?G.setValue(u.native,h,this.state.data[h]):(G.setValue(u.native,h,null),y[h]=this.state.data[h])}try{const h=JSON.parse(JSON.stringify(u));if(Array.isArray(h.encryptedNative)){await Pi("../../lib/js/crypto-js/crypto-js.js","crypto-js");for(const d of h.encryptedNative)h.native[d]&&(h.native[d]=Sl(this.secret,h.native[d]))}await this.props.socket.setObject(h._id,h)}catch(h){window.alert(`[JsonConfig] Cannot set object: ${h}`)}const o={...u.native,...y};console.log(o),this.setState({changed:!1,data:o,updateData:this.state.updateData+1,originalData:o},()=>n&&j.Router.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):j.Router.doNavigate(null)}componentDidUpdate(i,n){n.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){const i=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${i}`),await fetch(i)}render(){return!this.state.data||!this.state.schema?k.createElement(O.LinearProgress,null):k.createElement("div",{style:Et.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),k.createElement(cn,{key:this.state.hash,style:Et.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:i=>this.setState({error:i}),onChange:(i,n,u)=>{u&&this.state.error&&(window.alert(j.I18n.t("Cannot save configuration because of error in configuration")),u=!1),u&&!this.state.changed&&!n&&(u=!1),i?this.setState({data:i,changed:n,saveConfigDialog:u}):u!==void 0&&this.setState({saveConfigDialog:u})},DeviceManager:this.props.DeviceManager,theme:this.state.theme}),k.createElement(j.SaveCloseButtons,{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:i=>this.onSave(!0,i),onClose:()=>this.onSave(!1)}))}};export{G as ConfigGeneric,$t as ConfigPanel,Al as JsonConfig,cn as JsonConfigComponent}; diff --git a/admin/custom/assets/index-jIr6kOLK.js b/admin/custom/assets/index-jIr6kOLK.js new file mode 100644 index 000000000..32a8e3cbe --- /dev/null +++ b/admin/custom/assets/index-jIr6kOLK.js @@ -0,0 +1,1398 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CttBOMyq.js","./useTheme-MELayQMj.js","./_commonjsHelpers-D6-XlEtG.js","./createTheme-BwMO3rTt.js","./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js","./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js","./useThemeWithoutDefault-C-hl_s0Z.js"])))=>i.map(i=>d[i]); +import{C as pt,R as M}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js";import{a as Zr,c as He,g as qr}from"./_commonjsHelpers-D6-XlEtG.js";import{C as N}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js";import{C as Z,a as es,I as ts,D as Wi}from"./index-B8sZ2j0S.js";import{C as j,A as ns,a as Hi}from"./ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js";import{R as is}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js";import{F as rs}from"./FilledInput-CtcQVKyj.js";import{p as ss}from"./createTheme-BwMO3rTt.js";import{i as Pn}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import{p as Un}from"./useTheme-MELayQMj.js";import{_ as os}from"./preload-helper-Dp1pzeXC.js";import"./DefaultPropsProvider-CHpMCMgA.js";import"./defaultTheme-avbtL0lf.js";import"./DefaultPropsProvider-DbEA5uR6.js";import"./jsx-runtime-o-xyxrOj.js";import"./useEnhancedEffect-CdLBzwyA.js";import"./useThemeWithoutDefault-C-hl_s0Z.js";const as=Object.freeze(Object.defineProperty({__proto__:null,get ConfigGeneric(){return K},get ConfigPanel(){return $t},get JsonConfig(){return Al},get JsonConfigComponent(){return cn}},Symbol.toStringTag,{value:"Module"}));var ls=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,us=/[\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]/,hs=/[\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]/,$n={Space_Separator:ls,ID_Start:us,ID_Continue:hs},Me={isSpaceSeparator(L){return typeof L=="string"&&$n.Space_Separator.test(L)},isIdStartChar(L){return typeof L=="string"&&(L>="a"&&L<="z"||L>="A"&&L<="Z"||L==="$"||L==="_"||$n.ID_Start.test(L))},isIdContinueChar(L){return typeof L=="string"&&(L>="a"&&L<="z"||L>="A"&&L<="Z"||L>="0"&&L<="9"||L==="$"||L==="_"||L==="‌"||L==="‍"||$n.ID_Continue.test(L))},isDigit(L){return typeof L=="string"&&/[0-9]/.test(L)},isHexDigit(L){return typeof L=="string"&&/[0-9A-Fa-f]/.test(L)}};let Wn,Be,it,pn,dt,Ye,Ie,Gn,Vt;var cs=function(i,n){Wn=String(i),Be="start",it=[],pn=0,dt=1,Ye=0,Ie=void 0,Gn=void 0,Vt=void 0;do Ie=ps(),gs[Be]();while(Ie.type!=="eof");return typeof n=="function"?Hn({"":Vt},"",n):Vt};function Hn(L,i,n){const u=L[i];if(u!=null&&typeof u=="object")if(Array.isArray(u))for(let v=0;v0;){const n=rt();if(!Me.isHexDigit(n))throw Ae(q());L+=q()}return String.fromCodePoint(parseInt(L,16))}const gs={start(){if(Ie.type==="eof")throw Ct();Tn()},beforePropertyName(){switch(Ie.type){case"identifier":case"string":Gn=Ie.value,Be="afterPropertyName";return;case"punctuator":nn();return;case"eof":throw Ct()}},afterPropertyName(){if(Ie.type==="eof")throw Ct();Be="beforePropertyValue"},beforePropertyValue(){if(Ie.type==="eof")throw Ct();Tn()},beforeArrayValue(){if(Ie.type==="eof")throw Ct();if(Ie.type==="punctuator"&&Ie.value==="]"){nn();return}Tn()},afterPropertyValue(){if(Ie.type==="eof")throw Ct();switch(Ie.value){case",":Be="beforePropertyName";return;case"}":nn()}},afterArrayValue(){if(Ie.type==="eof")throw Ct();switch(Ie.value){case",":Be="beforeArrayValue";return;case"]":nn()}},end(){}};function Tn(){let L;switch(Ie.type){case"punctuator":switch(Ie.value){case"{":L={};break;case"[":L=[];break}break;case"null":case"boolean":case"numeric":case"string":L=Ie.value;break}if(Vt===void 0)Vt=L;else{const i=it[it.length-1];Array.isArray(i)?i.push(L):Object.defineProperty(i,Gn,{value:L,writable:!0,enumerable:!0,configurable:!0})}if(L!==null&&typeof L=="object")it.push(L),Array.isArray(L)?Be="beforeArrayValue":Be="beforePropertyName";else{const i=it[it.length-1];i==null?Be="end":Array.isArray(i)?Be="afterArrayValue":Be="afterPropertyValue"}}function nn(){it.pop();const L=it[it.length-1];L==null?Be="end":Array.isArray(L)?Be="afterArrayValue":Be="afterPropertyValue"}function Ae(L){return dn(L===void 0?`JSON5: invalid end of input at ${dt}:${Ye}`:`JSON5: invalid character '${ji(L)}' at ${dt}:${Ye}`)}function Ct(){return dn(`JSON5: invalid end of input at ${dt}:${Ye}`)}function hi(){return Ye-=5,dn(`JSON5: invalid identifier character at ${dt}:${Ye}`)}function ms(L){console.warn(`JSON5: '${ji(L)}' in strings is not valid ECMAScript; consider escaping`)}function ji(L){const i={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(i[L])return i[L];if(L<" "){const n=L.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return L}function dn(L){const i=new SyntaxError(L);return i.lineNumber=dt,i.columnNumber=Ye,i}var vs=function(i,n,u){const v=[];let a="",h,d,o="",p;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(u=n.space,p=n.quote,n=n.replacer),typeof n=="function")d=n;else if(Array.isArray(n)){h=[];for(const c of n){let f;typeof c=="string"?f=c:(typeof c=="number"||c instanceof String||c instanceof Number)&&(f=String(c)),f!==void 0&&h.indexOf(f)<0&&h.push(f)}}return u instanceof Number?u=Number(u):u instanceof String&&(u=String(u)),typeof u=="number"?u>0&&(u=Math.min(10,Math.floor(u)),o=" ".substr(0,u)):typeof u=="string"&&(o=u.substr(0,10)),e("",{"":i});function e(c,f){let m=f[c];switch(m!=null&&(typeof m.toJSON5=="function"?m=m.toJSON5(c):typeof m.toJSON=="function"&&(m=m.toJSON(c))),d&&(m=d.call(f,c,m)),m instanceof Number?m=Number(m):m instanceof String?m=String(m):m instanceof Boolean&&(m=m.valueOf()),m){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof m=="string")return t(m);if(typeof m=="number")return String(m);if(typeof m=="object")return Array.isArray(m)?s(m):r(m)}function t(c){const f={"'":.1,'"':.2},m={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let y="";for(let E=0;Ef[E]=0)throw TypeError("Converting circular structure to JSON5");v.push(c);let f=a;a=a+o;let m=h||Object.keys(c),y=[];for(const E of m){const b=e(E,c);if(b!==void 0){let g=l(E)+":";o!==""&&(g+=" "),g+=b,y.push(g)}}let D;if(y.length===0)D="{}";else{let E;if(o==="")E=y.join(","),D="{"+E+"}";else{let b=`, +`+a;E=y.join(b),D=`{ +`+a+E+`, +`+f+"}"}}return v.pop(),a=f,D}function l(c){if(c.length===0)return t(c);const f=String.fromCodePoint(c.codePointAt(0));if(!Me.isIdStartChar(f))return t(c);for(let m=f.length;m=0)throw TypeError("Converting circular structure to JSON5");v.push(c);let f=a;a=a+o;let m=[];for(let D=0;D>>2]>>>24-S%4*8&255;D[b+S>>>2]|=T<<24-(b+S)%4*8}else for(var k=0;k>>2]=E[k>>>2];return this.sigBytes+=g,this},clamp:function(){var y=this.words,D=this.sigBytes;y[D>>>2]&=4294967295<<32-D%4*8,y.length=u.ceil(D/4)},clone:function(){var y=e.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var D=[],E=0;E>>2]>>>24-g%4*8&255;b.push((S>>>4).toString(16)),b.push((S&15).toString(16))}return b.join("")},parse:function(y){for(var D=y.length,E=[],b=0;b>>3]|=parseInt(y.substr(b,2),16)<<24-b%8*4;return new t.init(E,D/2)}},s=r.Latin1={stringify:function(y){for(var D=y.words,E=y.sigBytes,b=[],g=0;g>>2]>>>24-g%4*8&255;b.push(String.fromCharCode(S))}return b.join("")},parse:function(y){for(var D=y.length,E=[],b=0;b>>2]|=(y.charCodeAt(b)&255)<<24-b%4*8;return new t.init(E,D)}},c=r.Utf8={stringify:function(y){try{return decodeURIComponent(escape(s.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return s.parse(unescape(encodeURIComponent(y)))}},f=p.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=c.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var D,E=this._data,b=E.words,g=E.sigBytes,S=this.blockSize,T=S*4,k=g/T;y?k=u.ceil(k):k=u.max((k|0)-this._minBufferSize,0);var _=k*S,R=u.min(_*4,g);if(_){for(var x=0;x<_;x+=S)this._doProcessBlock(b,x);D=b.splice(0,_),E.sigBytes-=R}return new t.init(D,R)},clone:function(){var y=e.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});p.Hasher=f.extend({cfg:e.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var D=this._doFinalize();return D},blockSize:16,_createHelper:function(y){return function(D,E){return new y.init(E).finalize(D)}},_createHmacHelper:function(y){return function(D,E){return new m.HMAC.init(y,E).finalize(D)}}});var m=o.algo={};return o}(Math);return n})}(hn)),hn.exports}var As=Kn.exports;(function(L,i){(function(n,u){L.exports=u(Ds())})(As,function(n){return function(u){var v=n,a=v.lib,h=a.WordArray,d=a.Hasher,o=v.algo,p=[];(function(){for(var c=0;c<64;c++)p[c]=u.abs(u.sin(c+1))*4294967296|0})();var e=o.MD5=d.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,f){for(var m=0;m<16;m++){var y=f+m,D=c[y];c[y]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var E=this._hash.words,b=c[f+0],g=c[f+1],S=c[f+2],T=c[f+3],k=c[f+4],_=c[f+5],R=c[f+6],x=c[f+7],A=c[f+8],C=c[f+9],w=c[f+10],$=c[f+11],I=c[f+12],F=c[f+13],O=c[f+14],B=c[f+15],P=E[0],V=E[1],W=E[2],H=E[3];P=t(P,V,W,H,b,7,p[0]),H=t(H,P,V,W,g,12,p[1]),W=t(W,H,P,V,S,17,p[2]),V=t(V,W,H,P,T,22,p[3]),P=t(P,V,W,H,k,7,p[4]),H=t(H,P,V,W,_,12,p[5]),W=t(W,H,P,V,R,17,p[6]),V=t(V,W,H,P,x,22,p[7]),P=t(P,V,W,H,A,7,p[8]),H=t(H,P,V,W,C,12,p[9]),W=t(W,H,P,V,w,17,p[10]),V=t(V,W,H,P,$,22,p[11]),P=t(P,V,W,H,I,7,p[12]),H=t(H,P,V,W,F,12,p[13]),W=t(W,H,P,V,O,17,p[14]),V=t(V,W,H,P,B,22,p[15]),P=r(P,V,W,H,g,5,p[16]),H=r(H,P,V,W,R,9,p[17]),W=r(W,H,P,V,$,14,p[18]),V=r(V,W,H,P,b,20,p[19]),P=r(P,V,W,H,_,5,p[20]),H=r(H,P,V,W,w,9,p[21]),W=r(W,H,P,V,B,14,p[22]),V=r(V,W,H,P,k,20,p[23]),P=r(P,V,W,H,C,5,p[24]),H=r(H,P,V,W,O,9,p[25]),W=r(W,H,P,V,T,14,p[26]),V=r(V,W,H,P,A,20,p[27]),P=r(P,V,W,H,F,5,p[28]),H=r(H,P,V,W,S,9,p[29]),W=r(W,H,P,V,x,14,p[30]),V=r(V,W,H,P,I,20,p[31]),P=l(P,V,W,H,_,4,p[32]),H=l(H,P,V,W,A,11,p[33]),W=l(W,H,P,V,$,16,p[34]),V=l(V,W,H,P,O,23,p[35]),P=l(P,V,W,H,g,4,p[36]),H=l(H,P,V,W,k,11,p[37]),W=l(W,H,P,V,x,16,p[38]),V=l(V,W,H,P,w,23,p[39]),P=l(P,V,W,H,F,4,p[40]),H=l(H,P,V,W,b,11,p[41]),W=l(W,H,P,V,T,16,p[42]),V=l(V,W,H,P,R,23,p[43]),P=l(P,V,W,H,C,4,p[44]),H=l(H,P,V,W,I,11,p[45]),W=l(W,H,P,V,B,16,p[46]),V=l(V,W,H,P,S,23,p[47]),P=s(P,V,W,H,b,6,p[48]),H=s(H,P,V,W,x,10,p[49]),W=s(W,H,P,V,O,15,p[50]),V=s(V,W,H,P,_,21,p[51]),P=s(P,V,W,H,I,6,p[52]),H=s(H,P,V,W,T,10,p[53]),W=s(W,H,P,V,w,15,p[54]),V=s(V,W,H,P,g,21,p[55]),P=s(P,V,W,H,A,6,p[56]),H=s(H,P,V,W,B,10,p[57]),W=s(W,H,P,V,R,15,p[58]),V=s(V,W,H,P,F,21,p[59]),P=s(P,V,W,H,k,6,p[60]),H=s(H,P,V,W,$,10,p[61]),W=s(W,H,P,V,S,15,p[62]),V=s(V,W,H,P,C,21,p[63]),E[0]=E[0]+P|0,E[1]=E[1]+V|0,E[2]=E[2]+W|0,E[3]=E[3]+H|0},_doFinalize:function(){var c=this._data,f=c.words,m=this._nDataBytes*8,y=c.sigBytes*8;f[y>>>5]|=128<<24-y%32;var D=u.floor(m/4294967296),E=m;f[(y+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,f[(y+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,c.sigBytes=(f.length+1)*4,this._process();for(var b=this._hash,g=b.words,S=0;S<4;S++){var T=g[S];g[S]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}return b},clone:function(){var c=d.clone.call(this);return c._hash=this._hash.clone(),c}});function t(c,f,m,y,D,E,b){var g=c+(f&m|~f&y)+D+b;return(g<>>32-E)+f}function r(c,f,m,y,D,E,b){var g=c+(f&y|m&~y)+D+b;return(g<>>32-E)+f}function l(c,f,m,y,D,E,b){var g=c+(f^m^y)+D+b;return(g<>>32-E)+f}function s(c,f,m,y,D,E,b){var g=c+(m^(f|~y))+D+b;return(g<>>32-E)+f}v.MD5=d._createHelper(e),v.HmacMD5=d._createHmacHelper(e)}(Math),n.MD5})})(Kn);var xs=Kn.exports;const pi=qr(xs),$s=window.innerWidth<=600?12:void 0;function _n(L){return Object.prototype.toString.call(L)==="[object Object]"}class K extends pt.Component{static DIFFERENT_VALUE="__different__";static DIFFERENT_LABEL="ra___different__";static NONE_VALUE="";static NONE_LABEL="ra_none";defaultValue;isError;lang;defaultSendToDone;sendToTimeout;noPlaceRequired;constructor(i){super(i),this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},i.schema&&(i.custom?this.defaultValue=i.schema.defaultFunc?this.executeCustom(i.schema.defaultFunc,i.data,i.customObj,i.oContext.instanceObj,i.arrayIndex,i.globalData):i.schema.default:i.schema.type!=="state"&&(this.defaultValue=i.schema.defaultFunc?this.execute(i.schema.defaultFunc,i.schema.default,i.data,i.arrayIndex,i.globalData):i.schema.default)),this.lang=j.I18n.getLanguage()}componentDidMount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr,this.onUpdate);const i=["select","autocomplete","autocompleteSendTo"];if(this.defaultValue!==void 0){const n=K.getValue(this.props.data,this.props.attr);(n===void 0||i.includes(this.props.schema.type)&&(n===""||n===null))&&setTimeout(()=>{this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(K.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)))},100)}else this.props.schema.defaultSendTo&&this.sendTo()}sendTo(){if(this.props.alive){this.defaultSendToDone=!0;let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}else i={attr:this.props.attr,value:K.getValue(this.props.data,this.props.attr)};i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.defaultSendTo,i).then(n=>{n!=null&&(this.props.custom?this.props.onChange(this.props.attr,n,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(K.setValue(this.props.data,this.props.attr,n),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data))))})}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,j.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()))}componentWillUnmount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr),this.sendToTimeout&&(clearTimeout(this.sendToTimeout),this.sendToTimeout=null)}onUpdate=i=>{const n=K.getValue(i||this.props.data,this.props.attr)||"";this.state.value!==n?this.setState({value:n}):this.forceUpdate()};static getValue(i,n){if(typeof n=="string")return K.getValue(i,n.split("."));if(n.length===1)return i[n[0]];const u=n.shift();if(typeof u=="string"&&typeof i[u]=="object")return K.getValue(i[u],n)}static setValue(i,n,u){if(typeof n=="string"){K.setValue(i,n.split("."),u);return}if(n.length===1)u===null?delete i[n[0]]:i[n[0]]=u;else{const v=n.shift();if(typeof v!="string")return;(!i[v]||typeof i[v]=="object")&&(i[v]=i[v]||{}),K.setValue(i[v],n,u)}}getText(i,n){if(!i)return"";if(typeof i=="string"){const u=n?i:j.I18n.t(i);return u.includes("${")?this.getPattern(u,null,n):u}return _n(i)?i.func?typeof i.func=="object"?this.getPattern(i.func[this.lang]||i.func.en||"",null,!0):this.getPattern(i.func,null,n):i[this.lang]||i.en||"":i.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=M.createElement(Z.Warning,null):i.type==="error"?n=M.createElement(Z.Error,null):i.type==="info"&&(n=M.createElement(Z.Info,null)),M.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n||void 0,onClose:u=>this.setState({confirmDialog:!1},()=>{if(u){if(this.state.confirmCallback){const a=this.state.confirmCallback;this.setState({confirmCallback:null},()=>a(!0));return}const v=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&K.setValue(v,this.state.confirmDepAttr,this.state.confirmDepNewValue),K.setValue(v,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(v))}else{const v=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{v&&v(!1)})}})})}getIcon(i){i=i||this.props.schema.icon;let n=null;return i==="auth"?n=M.createElement(Z.Key,null):i==="send"?n=M.createElement(Z.Send,null):i==="web"?n=M.createElement(Z.Public,null):i==="warning"?n=M.createElement(Z.Warning,null):i==="error"?n=M.createElement(Z.Error,null):i==="info"?n=M.createElement(Z.Info,null):i==="search"?n=M.createElement(Z.Search,null):i==="book"?n=M.createElement(Z.MenuBook,null):i==="help"?n=M.createElement(Z.Help,null):i==="upload"?n=M.createElement(Z.UploadFile,null):i==="edit"?n=M.createElement(Z.Edit,null):i==="user"?n=M.createElement(Z.Person,null):i==="group"?n=M.createElement(Z.Group,null):i==="delete"?n=M.createElement(Z.Delete,null):i==="refresh"?n=M.createElement(Z.Refresh,null):i==="add"?n=M.createElement(Z.Add,null):i==="unpair"?n=M.createElement(Z.LinkOff,null):i==="pair"?n=M.createElement(Z.Link,null):i==="save"?n=M.createElement(Z.Save,null):i==="open"?n=M.createElement(Z.OpenInNew,null):i&&((i.endsWith(".png")||i.endsWith(".svg")||i.endsWith(".jpg"))&&!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`./adapter/${this.props.oContext.adapterName}/${i}`),n=M.createElement(j.Icon,{src:i,style:{width:22,height:22}})),n}onChangeAsync(i,n){return new Promise(u=>{const v=this.onChange(i,n,u);v instanceof Promise&&v.catch(a=>console.error(`Cannot set value: ${a}`))})}onChange(i,n,u){const v=JSON.parse(JSON.stringify(this.props.data));if(K.setValue(v,i,n),this.props.schema.confirm&&this.execute(this.props.schema.confirm.condition,!1,v,this.props.arrayIndex,this.props.globalData))return new Promise(h=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:i,confirmData:null},()=>{typeof u=="function"?u():h()})});if(this.props.schema.confirmDependsOn)for(let h=0;h{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:i,confirmDepNewValue:o,confirmDepAttr:d.attr,confirmData:d.confirm},()=>{typeof u=="function"?u():p()})})}}const a=[];if(this.props.schema.onChangeDependsOn)for(let h=0;hu&&u()),a!=null&&a.length&&a.forEach((h,d)=>setTimeout(()=>this.props.onChange(h,K.getValue(v,h)),d*50))):this.props.onChange(v,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,v),u&&u()}),Promise.resolve()}execute(i,n,u,v,a){let h;if(_n(i))h=i.func;else if(typeof i=="string")h=i;else return i;if(!h)return n;try{return new Function("data","originalData","_system","_alive","_common","_socket","_instance","arrayIndex","globalData","_changed",h.includes("return")?h:`return ${h}`)(u||this.props.data,this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,v,a,this.props.changed)}catch(d){return console.error(`Cannot execute ${JSON.stringify(i)}: ${d}`),n}}executeCustom(i,n,u,v,a,h){let d;if(_n(i))d=i.func;else if(typeof i=="string")d=i;else return i;if(!d)return null;try{return new Function("data","originalData","_system","instanceObj","customObj","_socket","arrayIndex","globalData","_changed",d.includes("return")?d:`return ${d}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,v,u,this.props.oContext.socket,a,h,this.props.changed)}catch(o){return console.error(`Cannot execute ${d}: ${o}`),null}}calculate(i){let n,u,v,a;return this.props.custom?(n=i.validator?!this.executeCustom(i.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i.disabled===!0?u=!0:u=i.disabled?this.executeCustom(i.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i.hidden===!0?v=!0:v=i.hidden?this.executeCustom(i.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,a=i.defaultFunc?this.executeCustom(i.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):i.default):(n=i.validator?!this.execute(i.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i.disabled===!0?u=!0:u=i.disabled?this.execute(i.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i.hidden===!0?v=!0:v=i.hidden?this.execute(i.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,a=i.defaultFunc?this.execute(i.defaultFunc,i.default,this.props.data,this.props.arrayIndex,this.props.globalData):i.default),{error:n,disabled:u,hidden:v,defaultValue:a}}onError(i,n){n?this.isError[i]=n:delete this.isError[i],this.props.onError&&this.props.onError(i,n)}renderItem(i,n,u){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(i,n,u){return n?M.createElement("a",{href:n,target:"_blank",rel:"noreferrer",style:{color:this.props.oContext.themeType==="dark"?"#a147ff":"#5b238f",textDecoration:"underline"}},this.getText(i,u)):(i=this.getText(i,u)||"",i&&(i.includes("")||i.includes(""))?j.Utils.renderTextWithA(i):i)}static escapeString(i,n){return typeof i!="string"?"":(i=i.replace(/`/g,"\\`"),i=i.replace(/\${([^}]+)}/g,(u,v)=>{if(v&&typeof v=="string"&&v.startsWith("data.")){const a=K.getValue(n,v.replace(/^data\./,""));if(typeof a=="string"&&a.includes('"'))return`\${${v}.replace(/"/g, '\\\\"')}`}return u}),i)}getPattern(i,n,u){if(n=n||this.props.data,!i)return"";let v;typeof i=="object"?i.func?v=i.func:(console.log(`Object must be stringified: ${JSON.stringify(i)}`),v=JSON.stringify(i)):v=i;try{if(this.props.custom)return new Function("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed",`return \`${K.escapeString(v,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);const h=new Function("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed",`return \`${K.escapeString(v,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);return u?h:j.I18n.t(h)}catch(a){return console.error(`Cannot execute ${v}: ${a}`),v}}render(){const i=this.props.schema;if(!i||this.props.expertMode===!1&&i.expertMode)return null;this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(()=>{this.sendToTimeout=null,this.sendTo()},200));const{error:n,disabled:u,hidden:v,defaultValue:a}=this.calculate(i);if(v){if(Object.keys(this.isError).length&&(setTimeout(o=>Object.keys(o).forEach(p=>this.props.onError(p)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),i.hideOnlyControl){const o=M.createElement(N.Grid2,{size:{xs:i.xs||$s,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},style:{marginBottom:0,textAlign:"left",...i.style,...this.props.oContext.themeType==="dark"?i.darkStyle:{}}});return i.newLine?M.createElement(M.Fragment,null,M.createElement("div",{style:{flexBasis:"100%",height:0}}),o):o}return null}i.validatorNoSaveOnError&&(n&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:i.validatorErrorText?j.I18n.t(i.validatorErrorText):!0},setTimeout(o=>Object.keys(o).forEach(p=>this.props.onError(p,o[p])),100,JSON.parse(JSON.stringify(this.isError)))):!n&&Object.keys(this.isError).length&&(setTimeout(o=>Object.keys(o).forEach(p=>this.props.onError(p)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));const h=this.renderItem(n,u||this.props.commandRunning||this.props.disabled,a);if(this.noPlaceRequired)return h;const d=M.createElement(N.Grid2,{title:this.getText(i.tooltip),size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},style:{marginBottom:0,textAlign:"left",width:i.type==="divider"||i.type==="header"?i.width||"100%":void 0,...i.style,...this.props.oContext.themeType==="dark"?i.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?M.createElement(N.Grid2,{container:!0,style:{width:"100%"}},M.createElement(N.Grid2,{flex:1},h),M.createElement(N.Grid2,null,M.createElement(N.Button,{disabled:u,variant:"outlined",onClick:()=>this.sendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):j.I18n.t("ra_Request data by instance")},this.getText(this.props.schema.button)))):h);return i.newLine?M.createElement(M.Fragment,null,M.createElement("div",{style:{flexBasis:"100%",height:0}}),this.renderDialogConfirm(),d):this.state.confirmDialog?M.createElement(M.Fragment,null,this.renderDialogConfirm(),d):d}}const Ge={fullWidth:{width:"100%"},accordionSummary:L=>({backgroundColor:L.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)"}),accordionTitle:{},toolbar:L=>({backgroundColor:L.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)",borderRadius:"3px"}),tooltip:{pointerEvents:"none"}};class Ts extends K{typingTimer=null;constructor(i){super(i),this.props.schema.items=this.props.schema.items||[]}componentDidMount(){super.componentDidMount();let i=K.getValue(this.props.data,this.props.attr)||[];Array.isArray(i)||(i=[]),this.setState({value:i,activeIndex:-1,iteration:0})}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),super.componentWillUnmount()}itemAccordion(i,n){const{value:u}=this.state,{schema:v}=this.props,a={type:"panel",items:v.items.reduce((h,d)=>(h[d.attr]=d,h),{}),style:{marginLeft:"-8px",marginTop:"10px",marginBottom:"10px"}};return M.createElement($t,{oContext:this.props.oContext,index:n+this.state.iteration,arrayIndex:n,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:i,custom:!0,schema:a,originalData:this.props.originalData,onChange:(h,d)=>{const o=JSON.parse(JSON.stringify(u));o[n][h]=d,this.setState({value:o},()=>this.onChangeWrapper(o))},onError:(h,d)=>this.onError(h,d),table:this.props.table})}onDelete=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value));n.splice(i,1),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))};onClone=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value)),u=JSON.parse(JSON.stringify(n[i]));if(typeof this.props.schema.clone=="string"&&typeof u[this.props.schema.clone]=="string"){let v=1,a=u[this.props.schema.clone];const h=a.match(/(\d+)$/);for(h?(a=a.replace(h[0],""),v=parseInt(h[0],10)+1):a+="_";n.find(d=>d[this.props.schema.clone]===a+v.toString());)v++;u[this.props.schema.clone]=`${u[this.props.schema.clone]}_${v}`}n.splice(i,0,u),this.setState({value:n,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))};onChangeWrapper=i=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(n=>{this.typingTimer=null;const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(v=>this.onError(v))},300,i)};onAdd=()=>{const{schema:i}=this.props,n=JSON.parse(JSON.stringify(this.state.value)),u=i.items&&i.items.reduce((v,a)=>{let h;return a.defaultFunc?this.props.custom?h=a.defaultFunc?this.executeCustom(a.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,n.length,this.props.data):this.props.schema.default:h=a.defaultFunc?this.execute(a.defaultFunc,this.props.schema.default,this.props.data,n.length,this.props.data):this.props.schema.default:h=a.default===void 0?null:a.default,v[a.attr]=h,v},{});n.push(u),this.setState({value:n,activeIndex:n.length-1},()=>this.onChangeWrapper(n))};onMoveUp(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i-1,0,u);const v=this.state.activeIndex-1;this.setState({value:n,activeIndex:v,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))}onMoveDown(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i+1,0,u);const v=this.state.activeIndex+1;this.setState({value:n,activeIndex:v,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(n))}renderItem(){const{schema:i}=this.props,{value:n}=this.state;return n?M.createElement(N.Paper,null,i.label||!i.noDelete?M.createElement(N.Toolbar,{variant:"dense"},i.label?M.createElement(N.Typography,{variant:"h6",id:"tableTitle",component:"div"},this.getText(i.label)):null,i.noDelete?null:M.createElement(N.IconButton,{size:"small",color:"primary",onClick:this.onAdd},M.createElement(Z.Add,null))):null,n.map((u,v)=>M.createElement(N.Accordion,{key:`${u}_${v}`,expanded:this.state.activeIndex===v,onChange:(a,h)=>this.setState({activeIndex:h?v:-1})},M.createElement(N.AccordionSummary,{expandIcon:M.createElement(Z.ExpandMore,null),sx:j.Utils.getStyle(this.props.oContext.theme,Ge.fullWidth,Ge.accordionSummary)},M.createElement(N.Typography,{style:Ge.accordionTitle},u[i.titleAttr])),M.createElement(N.AccordionDetails,{style:{...i.style,...this.props.oContext.themeType?i.darkStyle:void 0}},this.itemAccordion(n[v],v),M.createElement(N.Toolbar,{sx:Ge.toolbar},v?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:Ge.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:()=>this.onMoveUp(v)},M.createElement(Z.ArrowUpward,null))):M.createElement("div",{style:Ge.buttonEmpty}),vthis.onMoveDown(v)},M.createElement(Z.ArrowDownward,null))):M.createElement("div",{style:Ge.buttonEmpty}),i.noDelete?null:M.createElement(N.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:Ge.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onDelete(v)},M.createElement(Z.Delete,null))),i.clone?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:Ge.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onClone(v)},M.createElement(Z.ContentCopy,null))):null)))),!i.noDelete&&n.length>0?M.createElement(N.Toolbar,{variant:"dense",sx:Ge.rootTool},M.createElement(N.IconButton,{size:"small",color:"primary",onClick:this.onAdd},M.createElement(Z.Add,null))):null,i.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}}const di={root:{width:"100%"},notAlive:{color:"#a30000"}};class _s extends K{componentDidMount(){super.componentDidMount();const i=this.getInstance();this.props.oContext.socket.getState(`${i}.alive`).then(n=>this.setState({alive:!!(n&&n.val),instance:i}))}getInstance(){let i=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return i.includes("${")&&(i=this.getPattern(i,null,!0)),i&&!i.startsWith("system.adapter.")&&(i=`system.adapter.${i}`),i}renderItem(){if(this.getInstance()!==this.state.instance&&setTimeout(()=>{const n=this.getInstance();n?this.props.oContext.socket.getState(`${n}.alive`).then(u=>this.setState({alive:!!(u&&u.val),instance:n})):this.setState({alive:null,instance:n})},200),this.state.alive!==!1&&this.state.alive!==!0)return null;const i=this.state.instance.replace(/^system.adapter./,"");return M.createElement("div",{style:{...di.root,...this.state.alive?void 0:di.notAlive}},this.state.alive?this.props.schema.textAlive!==void 0?this.props.schema.textAlive?j.I18n.t(this.props.schema.textAlive,i):"":j.I18n.t("ra_Instance %s is alive",i):this.props.schema.textNotAlive!==void 0?this.props.schema.textNotAlive?j.I18n.t(this.props.schema.textNotAlive,i):"":j.I18n.t("ra_Instance %s is not alive",i))}}class ks extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr),n=this.props.schema.options.map(u=>typeof u=="string"?{label:u,value:u}:JSON.parse(JSON.stringify(u)));Array.isArray(i)?(n.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),this.setState({value:K.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}renderItem(i,n){if(!this.state.selectOptions)return null;let u;const v=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===K.DIFFERENT_VALUE?([...this.state.value].filter(h=>!v.find(d=>typeof d=="object"?d.value===h:d===h)).forEach(h=>v.push({label:h.toString(),value:h})),u={label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE},v.unshift(u)):(u=this.state.value!==null&&this.state.value!==void 0&&v.find(h=>typeof h=="object"?h.value==this.state.value:h==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!u&&this.props.schema.freeSolo&&(u={value:this.state.value,label:this.state.value},v.push(u))),M.createElement(N.Autocomplete,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:u,options:v,isOptionEqualToValue:(h,d)=>h.value===d.value,filterOptions:(h,d)=>{const o=h.filter(p=>d.inputValue===""?!0:p.label.toLowerCase().includes(d.inputValue.toLowerCase())||p.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},onInputChange:h=>{if(!h||!this.props.schema.freeSolo)return;const d=h.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(h,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},getOptionLabel:h=>typeof h=="object"?(h==null?void 0:h.label)??"":"",renderInput:h=>M.createElement(N.TextField,{variant:"standard",...h,error:!!i,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:n})})}}class Ms extends K{initialized=!1;localContext;askInstance(){const i=K.getValue(this.props.data,this.props.attr),n=this.props.schema.options?this.props.schema.options.map(u=>typeof u=="string"?{label:u,value:u}:JSON.parse(JSON.stringify(u))):[];if(this.props.alive){let u=this.props.schema.data;if(u===void 0&&this.props.schema.jsonData){const v=this.getPattern(this.props.schema.jsonData,null,!0);try{typeof v=="string"&&(u=JSON.parse(v))}catch{console.error(`Cannot parse json data: ${JSON.stringify(u)}`)}}u===void 0&&(u=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",u).then(v=>{v&&Array.isArray(v)&&v.forEach(a=>n.push(typeof a=="string"?{label:a,value:a}:JSON.parse(JSON.stringify(a)))),Array.isArray(i)?(n.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),this.setState({value:K.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})})}else Array.isArray(i)?(n.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),this.setState({value:K.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=K.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(i,n){if(this.props.alive){const h=this.getContext();(h!==this.localContext||!this.initialized)&&(this.localContext=h,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let u;const v=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===K.DIFFERENT_LABEL?([...this.state.value].filter(h=>!v.find(d=>d.value===h)).forEach(h=>v.push({label:h.toString(),value:h})),u={label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE},v.unshift(u)):(u=this.state.value!==null&&this.state.value!==void 0&&v.find(h=>h.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!u&&this.props.schema.freeSolo&&(u={value:this.state.value,label:this.state.value},v.push(u)),u=u||null),v.length?M.createElement(N.Autocomplete,{value:u,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:v,isOptionEqualToValue:(h,d)=>h.value===d.value,filterOptions:(h,d)=>{const o=h.filter(p=>d.inputValue===""?!0:p.label.toLowerCase().includes(d.inputValue.toLowerCase())||p.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},getOptionLabel:h=>(h==null?void 0:h.label)??"",onInputChange:h=>{if(!h||!this.props.schema.freeSolo)return;const d=h.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(h,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},renderInput:h=>M.createElement(N.TextField,{variant:"standard",...h,error:!!i,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:n})}):M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},onChange:h=>{const d=h.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").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)})}}const kn={fullWidth:{width:"100%"},flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class Ls extends K{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=K.getValue(i,n)||"";this.setState({value:u,showDialog:!1})}renderItem(i,n){const{schema:u,attr:v}=this.props,{value:a,showDialog:h}=this.state;return M.createElement(N.FormControl,{style:kn.fullWidth,variant:"standard"},u.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(u.label)):null,M.createElement("div",{style:kn.flex},M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:a??"",error:!!i,disabled:n,placeholder:this.getText(u.placeholder),label:this.getText(u.label),helperText:this.renderHelp(u.help,u.helpLink,u.noTranslation),onChange:d=>{const o=d.target.value;this.setState({value:o},()=>this.onChange(v,o))}}),M.createElement(N.Button,{color:"grey",disabled:n,style:kn.button,size:"small",variant:"outlined",onClick:()=>this.setState({showDialog:!0})},"...")),h?M.createElement(j.DialogCron,{title:j.I18n.t("ra_Define schedule"),simple:u.simple,complex:u.complex,cron:a,onClose:()=>this.setState({showDialog:!1}),cancel:j.I18n.t("ra_Cancel"),ok:j.I18n.t("ra_Ok"),theme:this.props.oContext.theme,onOk:d=>this.setState({showDialog:!1,value:d},()=>this.onChange(v,d))}):null)}}class Is extends K{async componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr),u=(await this.props.oContext.socket.getCertificates()).filter(v=>{const a=this.props.attr.toLowerCase();return a.includes(v.type)||v.type==="public"&&a.includes("cert")||v.type==="private"&&(a.includes("priv")||a.includes("key"))?!0:!!(v.type==="chained"&&(a.includes("chain")||a.includes("ca")))}).map(v=>({label:v.name,value:v.name}));u.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),this.setState({value:i,selectOptions:u})}renderItem(i,n){var v,a;if(!this.state.selectOptions)return null;const u=(v=this.state.selectOptions)==null?void 0:v.find(h=>h.value===this.state.value);return M.createElement(N.FormControl,{style:{width:"100%"},variant:"standard"},this.props.schema.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:this.state.value,renderValue:()=>this.getText(u==null?void 0:u.label,this.props.schema.noTranslation!==!1),onChange:h=>this.setState({value:h.target.value},()=>this.onChange(this.props.attr,this.state.value))},(a=this.state.selectOptions)==null?void 0:a.map(h=>M.createElement(N.MenuItem,{key:h.value,value:h.value,style:h.value===K.NONE_VALUE?{opacity:.5}:{}},this.getText(h.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const zt={fullWidth:{width:"100%"},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}};class Fs extends K{async componentDidMount(){var d;super.componentDidMount();const i=await this.props.oContext.socket.getCertificates(),n=[],u=[],v=[];let a=[];const h=await this.props.oContext.socket.getObject("system.certificates");(d=h==null?void 0:h.native)!=null&&d.collections?a=Object.keys(h.native.collections):a=null,i.forEach(o=>{o.type==="public"?n.push({label:o.name,value:o.name}):o.type==="private"?u.push({label:o.name,value:o.name}):o.type==="chained"?v.push({label:o.name,value:o.name}):(n.push({label:o.name,value:o.name}),u.push({label:o.name,value:o.name}),v.push({label:o.name,value:o.name}))}),n.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),u.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),v.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:v,certsPrivateOptions:u,collectionsOptions:a})}renderItem(i,n){var e,t,r,l,s,c,f;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;const u=(K.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString(),v=K.getValue(this.props.data,this.props.schema.certPublicName||"certPublic"),a=K.getValue(this.props.data,this.props.schema.certPrivateName||"certPrivate"),h=K.getValue(this.props.data,this.props.schema.certChainedName||"certChained"),d=(e=this.state.certsPublicOptions)==null?void 0:e.find(m=>m.value===v),o=(t=this.state.certsPrivateOptions)==null?void 0:t.find(m=>m.value===a),p=(r=this.state.certsChainOptions)==null?void 0:r.find(m=>m.value===h);return M.createElement("div",{style:zt.fullWidth},this.state.collectionsOptions?M.createElement(N.FormControl,{style:zt.leWidth,variant:"standard"},M.createElement(N.InputLabel,{shrink:!0},"Let's encrypt"),M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:u,onChange:m=>this.onChange(this.props.schema.leCollectionName||"leCollection",m.target.value==="false"?!1:m.target.value==="true"?!0:m.target.value)},M.createElement(N.MenuItem,{key:"_false",value:"false",style:{fontWeight:"bold"}},j.I18n.t("ra_Do not use let's encrypt")),M.createElement(N.MenuItem,{key:"_true",value:"true",style:{fontWeight:"bold"}},j.I18n.t("ra_Use all available let's encrypt certificates")),(l=this.state.collectionsOptions)==null?void 0:l.map(m=>M.createElement(N.MenuItem,{key:m,value:m},m)))):null,this.state.collectionsOptions?M.createElement("br",null):null,this.state.collectionsOptions&&u!=="false"?M.createElement("div",null,j.I18n.t("ra_Fallback custom certificates")):null,M.createElement(N.FormControl,{style:zt.certWidth,variant:"standard"},M.createElement(N.InputLabel,{shrink:!0},j.I18n.t("ra_Public certificate")),M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:v||"",renderValue:()=>this.getText(d==null?void 0:d.label),onChange:m=>this.onChange(this.props.schema.certPublicName||"certPublic",m.target.value)},(s=this.state.certsPublicOptions)==null?void 0:s.map((m,y)=>M.createElement(N.MenuItem,{key:`${m.value}_${y}`,value:m.value,style:m.value===K.NONE_VALUE?{opacity:.5}:{}},this.getText(m.label))))),M.createElement(N.FormControl,{style:zt.certWidth,variant:"standard"},M.createElement(N.InputLabel,{shrink:!0},j.I18n.t("ra_Private certificate")),M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:a||"",renderValue:()=>this.getText(o==null?void 0:o.label),onChange:m=>this.onChange(this.props.schema.certPrivateName||"certPrivate",m.target.value)},(c=this.state.certsPrivateOptions)==null?void 0:c.map((m,y)=>M.createElement(N.MenuItem,{key:`${m.value}_${y}`,value:m.value,style:m.value===K.NONE_VALUE?{opacity:.5}:{}},this.getText(m.label))))),M.createElement(N.FormControl,{style:zt.certWidth,variant:"standard"},M.createElement(N.InputLabel,{shrink:!0},j.I18n.t("ra_Chained certificate")),M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:h||"",renderValue:()=>this.getText(p==null?void 0:p.label),onChange:m=>this.onChange(this.props.schema.certChainedName||"certChained",m.target.value)},(f=this.state.certsChainOptions)==null?void 0:f.map((m,y)=>M.createElement(N.MenuItem,{key:`${m.value}_${y}`,value:m.value,style:m.value===K.NONE_VALUE?{opacity:.5}:{}},this.getText(m.label))))))}}class Rs extends K{async componentDidMount(){var u;super.componentDidMount();let i;const n=await this.props.oContext.socket.getObject("system.certificates");(u=n==null?void 0:n.native)!=null&&u.collections?i=Object.keys(n.native.collections):i=[],this.setState({collectionsOptions:i})}renderItem(i,n){var v;if(!this.state.collectionsOptions)return null;const u=(K.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString();return M.createElement(N.FormControl,{style:{width:"100%"},variant:"standard"},this.props.schema.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:u,onChange:a=>this.onChange(this.props.schema.leCollectionName||"leCollection",a.target.value==="false"?!1:a.target.value==="true"?!0:a.target.value)},M.createElement(N.MenuItem,{key:"_false",value:"false",style:{fontWeight:"bold"}},j.I18n.t("ra_Do not use let's encrypt")),M.createElement(N.MenuItem,{key:"_true",value:"true",style:{fontWeight:"bold"}},j.I18n.t("ra_Use all available let's encrypt certificates")),(v=this.state.collectionsOptions)==null?void 0:v.map(a=>M.createElement(N.MenuItem,{key:a,value:a},a))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const We={fullWidth:{width:"100%"},licLabel:{fontWeight:"bold",minWidth:100,marginRight:10,textTransform:"capitalize",display:"inline-block"},errorTitle:L=>({color:L.palette.mode==="dark"?"#e39191":"#b62020"}),okTitle:L=>({color:L.palette.mode==="dark"?"#6fd56f":"#007c00"}),errorText:L=>({color:L.palette.mode==="dark"?"#e39191":"#b62020",mb:"30px"})};class ct extends K{componentDidMount(){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 i=this.state._error;return this.state.allLicenses&&(i=[M.createElement("div",{key:"error"},i)],i.push(M.createElement(N.Button,{key:"button",variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},j.I18n.t("iobroker.net"))),this.state.allLicenses.length?i.push(M.createElement(N.TableContainer,{key:"table"},M.createElement(N.Table,{size:"small"},M.createElement(N.TableHead,null,M.createElement(N.TableRow,null,M.createElement(N.TableCell,null,j.I18n.t("ra_Product")),M.createElement(N.TableCell,null,j.I18n.t("ra_Version")),M.createElement(N.TableCell,null,"UUID"),M.createElement(N.TableCell,null,j.I18n.t("ra_ValidTill")),M.createElement(N.TableCell,null,j.I18n.t("ra_Commercial")),M.createElement(N.TableCell,null,"ID"))),M.createElement(N.TableBody,null,this.state.allLicenses.map(n=>M.createElement(N.TableRow,{key:n.id},M.createElement(N.TableCell,{sx:n.validName?null:We.errorText},n.license.product),M.createElement(N.TableCell,{sx:n.validVersion?null:We.errorText},n.license.version),M.createElement(N.TableCell,{sx:n.validUuid?null:We.errorText},n.license.uuid||"--"),M.createElement(N.TableCell,{sx:n.validTill?null:We.errorText},n.license.validTill&&n.license.validTill!=="0000-00-00 00:00:00"?new Date(n.license.validTill).toLocaleDateString():"--"),M.createElement(N.TableCell,null,n.license.invoice!=="free"?n.license.invoice==="MANUALLY_CREATED"?"✓":n.license.invoice:"-"),M.createElement(N.TableCell,null,n.id))))))):(i.push(M.createElement("div",{key:"text1"},j.I18n.t("ra_No one license found in license manager"))),i.push(M.createElement("div",{key:"text2"},j.I18n.t("ra_Please create license"))))),M.createElement(N.Dialog,{open:!0,maxWidth:"xl",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClick:()=>this.setState({_error:"",allLicenses:null})},M.createElement(N.DialogTitle,null,j.I18n.t("ra_Error")),M.createElement(N.DialogContent,null,M.createElement(N.DialogContentText,null,i)),M.createElement(N.DialogActions,null,M.createElement(N.Button,{variant:"contained",onClick:()=>this.setState({_error:"",allLicenses:null}),color:"primary",autoFocus:!0,startIcon:M.createElement(Z.Check,null)},j.I18n.t("ra_Ok"))))}return null}renderMessageDialog(){if(this.state.showLicenseData){const i=[],n=this.state.showLicenseData;return Object.keys(n).forEach(u=>{if(!(n[u]===null||n[u]===void 0))if(typeof n[u]=="object"){const v=n[u];Object.keys(v).forEach(a=>{v[a]!==null&&v[a]!==void 0&&(typeof v[a]=="object"?i.push(M.createElement("div",{key:a},M.createElement("div",{style:We.licLabel},a,":"),JSON.stringify(v[a],null,2))):i.push(M.createElement("div",{key:a},M.createElement("div",{style:We.licLabel},u," -",a,":"),v[a].toString())))})}else i.push(M.createElement("div",{key:u},M.createElement("div",{style:We.licLabel},u.replace(/_/g," "),":"),n[u].toString()))}),i.push(M.createElement("div",{key:"checked"},M.createElement("div",{style:We.licLabel},j.I18n.t("ra_Checked"),":"),this.state.licenseOfflineCheck?j.I18n.t("ra_locally"):j.I18n.t("ra_via internet"))),M.createElement(N.Dialog,{open:!0,onClose:()=>this.setState({showLicenseData:null})},M.createElement(N.DialogTitle,null,M.createElement(N.Box,{component:"span",sx:this.state.result?We.okTitle:We.errorTitle},j.I18n.t("ra_License %s",this.state.result?"OK":"INVALID"))),M.createElement(N.DialogContent,null,this.state.showLinkToProfile?M.createElement(N.Button,{variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},"https://iobroker.net"):null,this.state._error?M.createElement(N.Box,{component:"div",sx:We.errorText},this.state._error):null,i),M.createElement(N.DialogActions,null,M.createElement(N.Button,{onClick:()=>this.setState({showLicenseData:null,_error:""}),color:"primary",variant:"contained"},j.I18n.t("ra_Close"))))}return null}static parseJwt(i){const u=i.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),v=decodeURIComponent(atob(u).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));try{return JSON.parse(v)}catch{return null}}static isVersionValid(i,n,u,v){if(!n||!i)return!0;let a=!0;const[h]=i.split(".");return n.startsWith(">=")?a=parseInt(h,10)>=parseInt(n.substring(2,10)):n.startsWith("<=")?a=parseInt(h,10)<=parseInt(n.substring(2,10)):n.startsWith(">")?a=parseInt(h,10)>parseInt(n.substring(1,10)):n.startsWith("<")?a=parseInt(h,10){const l=!r.validTill||r.validTill==="0000-00-00 00:00:00"||new Date(r.validTill).getTime()>p,s=(r.product||"").split("."),c=s[1]===i||i==="vis-2"&&s[1]==="vis",f=!e||!r.uuid||r.uuid===e,m=ct.isVersionValid(t,r.version,r.invoice,i);(!o||r.invoice!=="free")&&l&&c&&f&&m&&(o=r),u.push({id:r.id,validName:c,validUuid:f,validVersion:m,validTill:l,license:r})}),o&&(u.find(r=>r.id===o.id).used=!0)}return u}async checkLicense(i,n){var d,o,p;let u;if(this.props.schema.uuid){const e=await this.props.oContext.socket.getObject("system.meta.uuid");u=(d=e==null?void 0:e.native)==null?void 0:d.uuid}let v;if(this.props.schema.version){const e=await this.props.oContext.socket.getObject(`system.adapter.${n}`);v=(o=e==null?void 0:e.common)==null?void 0:o.version}const a=new AbortController;let h=setTimeout(()=>{h=null,a.abort()},5e3);try{const e=await window.fetch("https://iobroker.net/api/v1/public/cert/",{method:"POST",body:JSON.stringify({json:i,uuid:u}),headers:{"Content-Type":"text/plain"},signal:a.signal});h&&clearTimeout(h);const t=await e.text();let r;try{r=JSON.parse(t)}catch{}if(r!=null&&r.error)try{const l=ct.parseJwt(i),s=j.I18n.t(`ra_${l.error||r.error||"Unknown error"}`).replace(/^ra_/,"");return this.setState({_error:s,licenseOfflineCheck:!1,showLicenseData:l,result:!1,running:!1})}catch{return console.log("Cannot parse license"),this.setState({_error:r.error,result:!1,running:!1})}else{let l=null;try{l=ct.parseJwt(i)}catch{}if(r){const s=r.validTill||r.valid_till;if(s&&s!=="0000-00-00 00:00:00"&&new Date(s).getTime(){if(i){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(null,null)}catch(n){window.alert(j.I18n.t("ra_Cannot read licenses: %s",n));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(i){const n=this.props.oContext.adapterName==="vis-2"?"vis":this.props.oContext.adapterName;this.setState({running:!0});let u,v;if(this.props.data.useLicenseManager){if(v=await this.findInLicenseManager(n),u=v.find(a=>a.used),u&&(u=u.license.json),!u&&!i){this.setState({askForUpdate:!0});return}}else u=this.props.data.license;u?await this.checkLicense(u,n):this.props.data.useLicenseManager?this.setState({_error:j.I18n.t("ra_Suitable license not found in license manager"),result:!1,running:!1,allLicenses:v}):this.setState({_error:j.I18n.t("ra_Please enter the license"),result:!1,running:!1})}renderItem(){return M.createElement("div",{style:We.fullWidth},M.createElement(N.Button,{variant:this.props.schema.variant||"outlined",color:this.props.schema.color||"primary",style:We.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:M.createElement(Z.Send,null),onClick:()=>this._onClick()},this.state.running?M.createElement(N.CircularProgress,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||"ra_Check license",this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}}class Os extends K{renderItem(i,n){const u=K.getValue(this.props.data,this.props.attr),v=Array.isArray(u);return M.createElement(N.FormControl,{style:{width:"100%"},variant:"standard"},M.createElement(N.FormControlLabel,{onClick:a=>{if(a.preventDefault(),a.stopPropagation(),!n){const h=this.onChange(this.props.attr,!u);h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))}},control:M.createElement(N.Checkbox,{indeterminate:v,checked:!!u,onChange:a=>{let h;v?h=this.onChange(this.props.attr,!0):h=this.onChange(this.props.attr,a.target.checked),h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))},disabled:n||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),M.createElement(N.FormHelperText,{style:{color:"red"}},i?this.props.schema.validatorErrorText?j.I18n.t(this.props.schema.validatorErrorText):j.I18n.t("ra_Error"):null),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ns={standard:N.Input,filled:rs,outlined:N.OutlinedInput},Bs=L=>{const i=L.palette.mode==="light",n=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{},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 ${L.palette.primary[i?"dark":"light"]}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:L.transitions.create("transform",{duration:L.transitions.duration.shorter,easing:L.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:L.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:L.transitions.create("border-bottom-color",{duration:L.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${L.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{"&:after":{backgroundColor:L.palette.error.main,transform:"scaleX(1)"}},chip:{margin:"0 8px 8px 0",float:"left"},marginDense:{}}},rn={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},Ps=({value:L,isFocused:i,isDisabled:n,isReadOnly:u,handleClick:v,handleDelete:a,style:h},d)=>M.createElement(N.Chip,{key:d,style:{...h,pointerEvents:n||u?"none":void 0,backgroundColor:i?ss[300]:void 0},onClick:v,onDelete:a,label:L});class Ws extends M.Component{labelRef;labelNode=null;input;newChipKeyCodes;newChipKeys;actualInput=null;inputBlurTimeout=null;_keyPressed;_preventChipCreation;styles={};styleTheme=null;constructor(i){super(i),this.state={chips:i.defaultValue||[],focusedChip:null,inputValue:"",isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||"standard"},this.newChipKeyCodes=i.newChipKeyCodes||[13],this.newChipKeys=i.newChipKeys||["Enter"],this.labelRef=M.createRef(),this.input=M.createRef()}componentDidMount(){this.state.variant==="outlined"&&(this.labelNode=is.findDOMNode(this.labelRef.current),this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(i,n){let u=null;return i.value&&i.value.length!==n.prevPropsValue.length&&(u={prevPropsValue:i.value},i.clearInputValueOnChange&&(u.inputValue="")),i.clearInputValueOnChange&&i.value&&i.value.length!==n.prevPropsValue.length&&(u={prevPropsValue:i.value,inputValue:""}),i.disabled&&(u={...u,focusedChip:null}),!n.chipsUpdated&&i.defaultValue&&(u={...u,chips:i.defaultValue}),u}focus=()=>{var i;(i=this.actualInput)==null||i.focus(),this.state.focusedChip&&this.setState({focusedChip:null})};handleInputBlur=i=>{this.props.onBlur&&this.props.onBlur(i),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});const n=i.target.value;let u;switch(this.props.blurBehavior||"clear"){case"add-or-clear":u={clearInputOnFail:!0};case"add":if(this.props.delayBeforeAdd){const v=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{const a=(this.props.value||this.state.chips).length;v===a?this.handleAddChip(n,u):this.clearInput()},150)}else this.handleAddChip(n,u);break;case"clear":this.clearInput();break}};handleInputFocus=i=>{this.setState({isFocused:!0}),this.props.onFocus&&this.props.onFocus(i)};handleKeyDown=i=>{const{focusedChip:n}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(i),i.isDefaultPrevented()))return;const u=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(i.keyCode)||this.newChipKeys.includes(i.key)){this.handleAddChip(i.target.value)!==!1&&i.preventDefault();return}switch(i.keyCode){case rn.BACKSPACE:i.target.value===""&&(n?(this.handleDeleteChip(u[n],n),n&&this.setState({focusedChip:n-1})):this.setState({focusedChip:u.length-1}));break;case rn.DELETE:i.target.value===""&&n&&(this.handleDeleteChip(u[n],n),n<=u.length-1&&this.setState({focusedChip:n}));break;case rn.LEFT_ARROW:n===null&&i.target.value===""&&u.length?this.setState({focusedChip:u.length-1}):n!==null&&n>0&&this.setState({focusedChip:n-1});break;case rn.RIGHT_ARROW:n!==null&&n{!this._preventChipCreation&&(this.newChipKeyCodes.includes(i.keyCode)||this.newChipKeys.includes(i.key))&&this._keyPressed?this.clearInput():this.updateInput(i.target.value),this.props.onKeyUp&&this.props.onKeyUp(i)};handleUpdateInput=i=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(i.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(i)};handleAddChip(i,n){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(i))return this._preventChipCreation=!0,n&&n.clearInputOnFail&&this.clearInput(),!1;this.clearInput();const u=this.props.value||this.state.chips;return i.trim().length?((this.props.allowDuplicates||!u.includes(i))&&(this.props.value&&this.props.onAdd?this.props.onAdd(i):this.updateChips([...this.state.chips,i])),!0):!1}handleDeleteChip(i,n){if(this.props.value)this.props.onDelete&&this.props.onDelete(i,n);else{const u=this.state.chips.slice();if(u.splice(n,1)){let a=this.state.focusedChip;this.state.focusedChip===n?a=null:this.state.focusedChip>n&&(a=this.state.focusedChip-1),this.updateChips(u,{focusedChip:a})}}}updateChips(i,n={}){this.setState({chips:i,chipsUpdated:!0,...n}),this.props.onChange&&this.props.onChange(i)}clearInput(){this.updateInput("")}updateInput(i){this.setState({inputValue:i})}setActualInputRef=i=>{this.actualInput=i,this.props.inputRef&&this.props.inputRef(i)};render(){const{alwaysShowPlaceholder:i,chipRenderer:n=Ps,className:u,disabled:v,disableUnderline:a,error:h,FormHelperTextProps:d,fullWidth:o,fullWidthInput:p,helperText:e,id:t,InputProps:r={},InputLabelProps:l={},inputValue:s,label:c,placeholder:f,readOnly:m,required:y,rootRef:D,value:E,margin:b}=this.props,g=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=j.Utils.getStyle(this.props.theme,Bs));let S=E||this.state.chips||[];Array.isArray(S)||(S=(S||"").toString().split(/[,\s]+/).map(C=>C.trim()));const T=s??this.state.inputValue,k=(this.props.value||T).length||T.length,_=typeof l.shrink=="boolean"?l.shrink:c!==null&&(k||this.state.isFocused||S.length),R=S.map((C,w)=>n({value:C,isDisabled:!!v,isReadOnly:m,isFocused:this.state.focusedChip===w,handleClick:()=>this.setState({focusedChip:w}),handleDelete:()=>this.handleDeleteChip(C,w),style:this.styles.chip},w.toString())),x={};g==="outlined"&&(x.notched=!!_,x.labelWidth=_&&this.labelNode&&this.labelNode.offsetWidth||0),g!=="standard"?x.startAdornment=R:r.disableUnderline=!0;const A=Ns[g];return M.createElement(N.FormControl,{ref:D,fullWidth:o,className:u,sx:{...this.styles.root,...b==="dense"?this.styles.marginDense:{}},error:h,required:S.length>0?void 0:y,onClick:this.focus,disabled:v,variant:g,component:"div",margin:b},c&&M.createElement(N.InputLabel,{htmlFor:t,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!_,focused:this.state.isFocused,variant:g,ref:this.labelRef,required:y,component:"label",...l},c),M.createElement(N.Box,{component:"div",id:"input-chip-container",sx:{...this.styles[g],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!a&&g==="standard"?this.styles.underline:void 0,...v?this.styles.disabled:void 0,...c?this.styles.labeled:void 0,...h?this.styles.error:void 0}},g==="standard"&&R,M.createElement(A,{ref:this.input,className:`mui-variant-${this.styles[g]} ${c?"mui-chip-with-label":"mui-chip-no-label"}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[g]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:t,value:T,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:v,fullWidth:p,placeholder:!k&&(_||c===null||c===void 0)||i?f:null,readOnly:m,...r,...x})),e&&M.createElement(N.FormHelperText,{...d,className:d==null?void 0:d.className,style:this.styles.helperText},e))}}class fi extends K{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=K.getValue(i,n);if(this.props.schema.delimiter&&typeof u=="string"){const v=u.split(this.props.schema.delimiter).map(a=>a.trim()).filter(a=>a);this.setState({value:v})}else this.setState({value:u||[]})}renderItem(i,n){const{attr:u,schema:v}=this.props,{value:a}=this.state;return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},M.createElement(Ws,{value:a,disabled:!!n,label:this.getText(v.label),error:!!i,onAdd:h=>{const d=JSON.parse(JSON.stringify(a));d.push(h),this.setState({value:d},()=>{let o;this.props.schema.delimiter?o=this.onChange(u,d.join(`${this.props.schema.delimiter} `)):o=this.onChange(u,d),o instanceof Promise&&o.catch(p=>console.error(p))})},theme:this.props.oContext.theme,onDelete:(h,d)=>{const o=JSON.parse(JSON.stringify(a));o.splice(d,1),this.setState({value:o},()=>{let p;this.props.schema.delimiter?p=this.onChange(u,o.join(`${this.props.schema.delimiter} `)):p=this.onChange(u,o),p instanceof Promise&&p.catch(e=>console.error(e))})}}),M.createElement(N.FormHelperText,null,j.I18n.t("ra_Press ENTER Key to add new item")),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Hs extends K{renderColorDialog(){return!!this.state.showColorDialog&&M.createElement(N.Dialog,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},M.createElement(es,{color:this.state.colorDialogValue,onChange:i=>this.setState({colorDialogValue:i.hex},()=>this.onChange(this.props.attr,this.state.colorDialogValue))}))}renderItem(i,n){const u=K.getValue(this.props.data,this.props.attr);let v=j.Utils.isUseBright(u,null);return v===null&&(v=void 0),M.createElement(M.Fragment,null,this.renderColorDialog(),M.createElement(N.TextField,{variant:"standard",disabled:!!n,style:{minWidth:100,width:"calc(100% - 8px)"},label:this.getText(this.props.schema.label),value:u||"",onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:u||""}),onChange:a=>{const h=a.target.value,d=this.onChange(this.props.attr,h);d instanceof Promise&&d.catch(o=>console.error(`Cannot set value: ${o}`))},slotProps:{htmlInput:{style:{backgroundColor:u,color:v?"#FFF":"#000"},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&u&&!this.props.schema.noClearButton?M.createElement(N.IconButton,{tabIndex:-1,size:"small",onClick:a=>{a.stopPropagation();const h=this.onChange(this.props.attr,"");h instanceof Promise&&h.catch(d=>console.error(`Cannot set value: ${d}`))}},M.createElement(Z.Close,null)):void 0},inputLabel:{shrink:!0}}}))}}const Mn={width:{width:"calc(100% - 85px)"},width50:{width:120,marginRight:5}};class zs extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i});const n={};this.props.schema.useSystemName&&(n.useSystem=!!K.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(n.longitude=K.getValue(this.props.data,this.props.schema.longitudeName),n.latitude=K.getValue(this.props.data,this.props.schema.latitudeName),!n.longitude&&!n.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!K.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(n).length&&setTimeout(()=>this.setState(n),50)}async getSystemCoordinates(){const i=await this.props.oContext.socket.getCompactSystemConfig();if(i!=null&&i.common&&(i.common.longitude||i.common.latitude))if(window.alert(j.I18n.t("ra_Used system settings")),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:i.common.longitude,latitude:i.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,i.common.longitude),await this.onChange(this.props.schema.latitudeName,i.common.latitude)});else{const n=i.common.latitude+(this.props.schema.divider||",")+i.common.longitude;this.setState({value:n},()=>{const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(v=>console.error(`Cannot set value: ${v}`))})}else window.alert(j.I18n.t("ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser"))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async i=>{if(i!=null&&i.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:i.coords.longitude,latitude:i.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,i.coords.longitude||""),await this.onChange(this.props.schema.latitudeName,i.coords.latitude||"")});else{const n=i.coords.latitude+(this.props.schema.divider||",")+i.coords.longitude;this.setState({value:n},()=>{const u=this.onChange(this.props.attr,n);u instanceof Promise&&u.catch(v=>console.error(`Cannot set value: ${v}`))})}else await this.getSystemCoordinates()},async i=>{console.error(`Cannot determine coordinates from browser: ${i.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(i=>{console.error(`Cannot determine coordinates: ${i}`)})}renderItem(i,n){return M.createElement(M.Fragment,null,this.props.schema.useSystemName?M.createElement(N.FormControlLabel,{control:M.createElement(N.Checkbox,{checked:!!this.state.useSystem,onChange:u=>{const v=u.target.checked;v&&this.getSystemCoordinates().catch(a=>console.error(`Cannot determine coordinates: ${a}`)),this.setState({useSystem:v},()=>this.onChange(this.props.schema.useSystemName,v))}}),label:j.I18n.t("ra_Use system settings for position")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?M.createElement(N.TextField,{variant:"standard",style:Mn.width50,value:this.state.longitude??"",error:!!i,disabled:this.state.useSystem||!!n,onChange:u=>{const v=u.target.value;this.setState({longitude:v},()=>{const a=this.onChange(this.props.schema.longitudeName,(v||"").trim());a instanceof Promise&&a.catch(h=>console.error(`Cannot set value: ${h}`))})},label:j.I18n.t("ra_Longitude")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?M.createElement(N.TextField,{variant:"standard",style:Mn.width50,value:this.state.latitude??"",error:!!i,disabled:this.state.useSystem||!!n,onChange:u=>{const v=u.target.value;this.setState({latitude:v},()=>this.onChange(this.props.schema.latitudeName,(v||"").trim()))},label:j.I18n.t("ra_Latitude")}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?M.createElement(N.TextField,{variant:"standard",style:Mn.width,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:u=>{const v=u.target.value;this.setState({value:v},()=>this.onChange(this.props.attr,(v||"").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:M.createElement(N.Fab,{size:"small",onClick:()=>this.getCoordinates(),title:j.I18n.t("ra_Take browser position"),style:{marginRight:4}},M.createElement(Z.LocationOn,null)),this.state.useSystem?null:M.createElement(N.Fab,{size:"small",onClick:()=>this.getSystemCoordinates(),title:j.I18n.t("ra_Take position from system settings")},M.createElement(Z.GpsFixed,null)))}}Pn.init({name:"iobroker_admin",shared:{"@iobroker/adapter-react-v5":{lib:()=>ns,version:"*"},"@mui/icons-material":{lib:()=>ts,version:"*"},"@iobroker/json-config":{lib:()=>as,version:"*"}},remotes:[]});class Ut extends K{static runningLoads={};constructor(i){super(i),Object.assign(this.state,{Component:null,error:""})}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 i;this.props.schema.url.startsWith("http:")||this.props.schema.url.startsWith("https:")?i=this.props.schema.url:this.props.schema.url.startsWith("./")?i=`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,"")}`:i=`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;const[n,u,...v]=this.props.schema.name.split("/"),a=v.join("/");if(!i){console.error('Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema');return}if(!n||!u||!a){console.error('Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema');return}let h=Ut.runningLoads[`${i}!${u}`];if(!(h instanceof Promise)){let d;if(this.props.schema.i18n===!0){const o=i.lastIndexOf("/");let p;o!==-1?p=i.substring(0,o):p=i;const e=j.I18n.getLanguage(),t=`${p}/i18n/${e}.json`;d=fetch(t).then(r=>r.json()).then(r=>j.I18n.extendTranslations(r,e)).catch(r=>{if(e!=="en"){fetch(`${p}/i18n/en.json`).then(l=>l.json()).then(l=>j.I18n.extendTranslations(l,e)).catch(l=>console.log(`Cannot load i18n "${t}": ${l}`));return}console.log(`Cannot load i18n "${t}": ${r}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n=="object")try{j.I18n.extendTranslations(this.props.schema.i18n)}catch(o){console.error(`Cannot import i18n: ${o}`)}try{console.log(i,n,u,a),Pn.registerRemotes([{name:n,entry:i,type:this.props.schema.bundlerType||void 0}]),h=Pn.loadRemote(`${n}/${u}`),d instanceof Promise&&(h=Promise.all([h,d]).then(o=>o[0])),Ut.runningLoads[`${i}!${u}`]=h}catch(o){console.error(o),this.setState({error:`Cannot import from ${this.props.schema.url}: ${o}`})}}try{const d=(await h).default;if(d!=null&&d[a])this.setState({Component:d[a]});else{const o=Object.keys(d||{});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: ${o.join(", ")}`})}}catch(d){console.error(d),this.setState({error:`Cannot import from ${this.props.schema.url}: ${d}`})}}render(){const i=this.state.Component,n=this.props.schema||{};let u=i?M.createElement(i,{...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.error?M.createElement("div",null,this.state.error):M.createElement(N.LinearProgress,null);return n.newLine?M.createElement(M.Fragment,null,M.createElement("div",{style:{flexBasis:"100%",height:0}}),u):u}}class js extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i})}renderItem(i,n){return M.createElement(Hi.DatePicker,{sx:u=>({width:"100%",borderBottom:`1px solid ${u.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${u.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:!!n,value:this.state.value,onChange:u=>{this.setState({value:u},()=>this.onChange(this.props.attr,this.state.value))},label:this.getText(this.props.schema.label)})}}class Vs extends K{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){const n=this.props.oContext.DeviceManager;return M.createElement(n,{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})}return M.createElement("div",null,"DeviceManager not found")}}const Ke={fullWidth:{width:"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}},Us=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Gs=["mp3","ogg","wav","aac"],Ks=["avi","mp4","mov"],Js=["txt","log","html","htm"],Ys=["json","js","ts"];class mn extends K{dropzoneRef;imagePrefix;objectID;path;constructor(i){super(i),this.dropzoneRef=M.createRef(),this.imagePrefix=this.props.oContext.imagePrefix===void 0?"./files":this.props.oContext.imagePrefix}componentDidMount(){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(()=>{const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(n=>console.error(`Cannot subscribe: ${n}`))})}onFolderChanged=(i,n)=>{this.path&&n.startsWith(this.path)&&this.updateFiles().catch(u=>console.error(`Cannot update files: ${u}`))};componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(i=>console.error(`Cannot subscribe: ${i}`)),super.componentWillUnmount()}async updateFiles(){const i=await this.readFiles(this.props.schema.pattern);await new Promise(n=>this.setState({files:i},n))}async readFolder(i,n,u){try{const v=await this.props.oContext.socket.readDir(this.objectID,i.replace(/^\//,"")||null);for(let a=0;aconsole.log("file reading was aborted"),u.onerror=()=>console.log("file reading has failed"),u.onload=()=>{if(n.size>v){window.alert(j.I18n.t("File is too big. Max %sk allowed. Try use SVG.",Math.round(v/1024)));return}this.props.oContext.socket.writeFile64(this.objectID,this.path+n.name,u.result).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+n.name},()=>this.onChange(this.props.attr,this.path+n.name))).catch(a=>window.alert(`Cannot upload file: ${a}`))},u.readAsArrayBuffer(n)}renderDeleteDialog(){return this.state.deleteFile?M.createElement(j.DialogConfirm,{title:j.I18n.t("ra_Are you sure?"),text:j.I18n.t("ra_File will be deleted"),ok:j.I18n.t("ra_Delete"),cancel:j.I18n.t("ra_Cancel"),onClose:i=>{const n=this.state.deleteFile;this.setState({deleteFile:""},()=>{i&&this.props.oContext.socket.deleteFile(this.objectID,n).then(()=>this.updateFiles()).catch(u=>window.alert(`Cannot delete file: ${u}`))})}}):null}static base64ToArrayBuffer(i){const n=window.atob(i),u=n.length,v=new Uint8Array(u);for(let a=0;a{if(typeof AudioContext<"u"){const n=new AudioContext,u=mn.base64ToArrayBuffer(i.file);n.decodeAudioData(u,v=>{const a=n.createBufferSource();a.buffer=v,a.connect(n.destination),a.start(0)},v=>window.alert(`Cannot play: ${v.message}`))}})}getFileIcon(i){return i!=null&&i.extension?Us.includes(i.extension)?M.createElement("div",{style:{...Ke.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${i.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Gs.includes(i.extension)?M.createElement(Z.MusicNote,null):Js.includes(i.extension)?M.createElement(Z.Article,null):Ks.includes(i.extension)?M.createElement(Z.Videocam,null):Ys.includes(i.extension)?M.createElement(Z.Code,null):null:null}renderItem(i,n){if(!this.state.files)return null;const u=[];this.props.schema.withFolder||this.state.files.forEach(e=>{const t=e.name.lastIndexOf("/");if(t===-1)u.includes("/")||u.push("/");else{const r=e.name.substring(0,t+1);u.includes(r)||u.push(r)}});const v=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&u.length===1?`${e.name.substring(u[0].length)}`:`${e.name}${this.props.schema.noSize?"":`(${e.size})`}`,extension:e.name.toLowerCase().split(".").pop()}));this.props.schema.noNone||v.unshift({label:j.I18n.t("ra_none"),value:""});const a=v.find(e=>e.value===this.state.value);let h=0;this.props.schema.upload&&h++,this.props.schema.refresh&&h++;const d=this.state.value&&(this.state.value.endsWith(".mp3")||this.state.value.endsWith(".ogg")||this.state.value.endsWith(".wav"));d&&h++;const o=M.createElement("div",{style:Ke.fullWidth},M.createElement(N.FormControl,{variant:"standard",style:{width:`calc(100% - ${h*42}px)`}},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>M.createElement(M.Fragment,null,this.getFileIcon(a),M.createElement("span",null,(a==null?void 0:a.label)||"")),onChange:e=>{this.setState({value:e.target.value==="_"?"":e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},v.map(e=>M.createElement(N.MenuItem,{key:e.value,value:e.value},M.createElement(N.ListItemIcon,null,this.getFileIcon(e)),M.createElement(N.ListItemText,null,e.label),this.props.schema.delete&&a.value?M.createElement(N.IconButton,{style:Ke.deleteButton,size:"small",onClick:()=>this.setState({deleteFile:a.value})},M.createElement(Z.Delete,null)):null))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&M.createElement(N.IconButton,{onClick:()=>this.updateFiles()},M.createElement(Z.Refresh,null)),this.props.schema.upload&&M.createElement(N.IconButton,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},M.createElement(Z.UploadFile,null)),d&&M.createElement(N.IconButton,{style:{color:"#00FF00"},onClick:()=>this.play()},M.createElement(Z.PlayArrow,null)));if(!this.props.schema.upload)return M.createElement(M.Fragment,null,o,this.renderDeleteDialog());let p={"*/*":[]};if(this.props.schema.fileTypes==="image"?p={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:this.props.schema.fileTypes==="audio"?p={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:this.props.schema.fileTypes==="text"&&(p={"text/plain":[".txt"]}),this.props.schema.pattern){const e=this.props.schema.pattern.split("/").pop().toLowerCase().replace(/.*\./,"");e==="png"||e==="jpg"||e==="svg"||e==="gif"||e==="apng"||e==="avif"||e==="webp"?p={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:e==="mp3"||e==="ogg"||e==="wav"?p={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:e==="ics"?p={"text/calendar":[".ics"]}:e==="txt"?p={"text/plain":[".txt"]}:e==="pem"?p={"text/plain":[".pem"]}:p={"*/*":[`.${e}`]}}return M.createElement(Wi,{ref:this.dropzoneRef,multiple:!1,accept:p,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2*1024*1024,onDragEnter:()=>{this.setState({uploadFile:"dragging"})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{var r,l,s;this.setState({uploadFile:!1}),e.length?this.onDrop(e):window.alert(((s=(l=(r=t==null?void 0:t[0])==null?void 0:r.errors)==null?void 0:l[0])==null?void 0:s.message)||j.I18n.t("Cannot upload"))}},({getRootProps:e,getInputProps:t})=>M.createElement("div",{style:{...Ke.uploadDiv,...this.state.uploadFile==="dragging"?Ke.uploadDivDragging:void 0,...n?Ke.disabledOpacity:void 0},...e()},M.createElement("input",{...t()}),this.state.uploadFile==="dragging"?M.createElement("div",{style:{...Ke.uploadCenterDiv,...this.state.uploadError?Ke.error:void 0}},M.createElement("div",{style:Ke.uploadCenterTextAndIcon},M.createElement(Z.UploadFile,{style:Ke.uploadCenterIcon}),M.createElement("div",{style:Ke.uploadCenterText},this.state.uploadFile==="dragging"?j.I18n.t("ra_Drop file here"):j.I18n.t("ra_Place your files here or click here to open the browse dialog")))):null,o,this.renderDeleteDialog()))}}const sn={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}},Qs=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Xs=["mp3","ogg","wav","aac"],Zs=["avi","mp4","mov"],qs=["txt","log","html","htm"],eo=["json","js","ts"];class to extends K{imagePrefix="../..";componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix===void 0?"./files":this.props.oContext.imagePrefix,this.setState({value:i??""})}static getDerivedStateFromProps(i,n){const u=K.getValue(i.data,i.attr);return u==null||u.toString().trim()!==(n.value||"").toString().trim()?{value:u??""}:null}loadFile(){const i=this.state.value.indexOf("/");if(i!==-1){const n=this.state.value.substring(0,i),u=this.state.value.substring(i+1);return this.props.oContext.socket.readFile(n,u,!0)}return Promise.resolve(null)}play(){this.loadFile().then(i=>{if(typeof AudioContext<"u"&&(i!=null&&i.file)){const n=new AudioContext,u=mn.base64ToArrayBuffer(i.file);n.decodeAudioData(u,v=>{const a=n.createBufferSource();a.buffer=v,a.connect(n.destination),a.start(0)},v=>window.alert(`Cannot play: ${v.message}`))}})}getIcon(){const i=this.state.value.split(".").pop().toLowerCase();return Qs.includes(i)?M.createElement("div",{style:{...sn.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Xs.includes(i)?M.createElement(N.IconButton,{style:{color:"#00FF00"},onClick:()=>this.play()},M.createElement(Z.PlayArrow,null)):qs.includes(i)?M.createElement(Z.Article,null):Zs.includes(i)?M.createElement(Z.Videocam,null):eo.includes(i)?M.createElement(Z.Code,null):null}renderFileBrowser(){return this.state.showFileBrowser?M.createElement(j.DialogSelectFile,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:i=>{const n=Array.isArray(i)?i[0]:i;this.setState({value:n},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?n:(n||"").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(i,n){const u=this.getIcon();return M.createElement("div",{style:sn.fullWidth},u,M.createElement(N.TextField,{variant:"standard",style:u?sn.fullWidthIcon:sn.fullWidthOneButton,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:v=>{const a=v.target.value;this.setState({value:a},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?a:(a||"").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)}),M.createElement(N.Button,{disabled:n,variant:"outlined",onClick:()=>this.setState({showFileBrowser:!0})},"..."),this.renderFileBrowser())}}class no extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("functions").then(n=>{const u=Object.keys(n).map(v=>({value:this.props.schema.short?v.replace("enum.functions.",""):v,label:this.getText(n[v].common.name),obj:n[v]}));this.props.schema.allowDeactivate!==!1&&u.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),this.setState({value:i,selectOptions:u})})}renderItem(i,n){if(!this.state.selectOptions)return null;const u=this.state.selectOptions.find(v=>v.value===this.state.value);return M.createElement(N.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>u?u.obj?M.createElement(j.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):u.label:"",onChange:v=>{this.setState({value:v.target.value==="_"?"":v.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(v=>M.createElement(N.MenuItem,{key:v.value,value:v.value,style:v.value===K.DIFFERENT_VALUE?{opacity:.5}:{}},v.obj?M.createElement(j.TextWithIcon,{value:v.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):v.label))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class io extends K{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getHostByIp(this.props.common.host).then(i=>{this.props.schema.listenOnAllPorts||(i=i.filter(n=>n.address!=="0.0.0.0"&&n.address!=="::")),this.props.schema.onlyIp4?i=i.filter(n=>n.family==="ipv4"):this.props.schema.onlyIp6&&(i=i.filter(n=>n.family==="ipv6")),this.props.schema.noInternal&&(i=i.filter(n=>!n.internal)),i.forEach(n=>{n.address==="0.0.0.0"?n.name=`[IPv4] 0.0.0.0 - ${j.I18n.t("ra_Listen on all IPs")}`:n.address==="::"&&(n.name=`[IPv6] :: - ${j.I18n.t("ra_Listen on all IPs")}`)}),this.setState({ips:i})}).catch(i=>console.error(i))}renderItem(i,n){var a,h;const u=K.getValue(this.props.data,this.props.attr),v=(a=this.state.ips)==null?void 0:a.find(d=>d.address===u);return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},this.state.ips&&this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,this.state.ips?M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:d=>(v==null?void 0:v.name)||d,onChange:d=>this.onChange(this.props.attr,d.target.value)},(h=this.state.ips)==null?void 0:h.map((d,o)=>M.createElement(N.MenuItem,{key:o,value:d.address},d.name))):M.createElement(N.TextField,{fullWidth:!0,variant:"standard",error:!!i,disabled:!!n,value:u,onChange:d=>this.onChange(this.props.attr,d.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class ro extends K{initialized=!1;localContext;componentDidMount(){super.componentDidMount(),this.askInstance()}askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);if(n)try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(i)}`)}}i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>this.setState({image:n||""}))}}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=K.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(){if(this.props.alive){const i=this.getContext();(i!==this.localContext||!this.initialized)&&(this.localContext=i,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.image===void 0?null:M.createElement("img",{alt:"dynamic content",src:this.state.image,style:{width:this.props.schema.width||"100%",height:this.props.schema.height}})}}class so extends K{index;constructor(i){super(i),this.index=Date.now()}componentDidMount(){if(super.componentDidMount(),this.props.schema.base64){const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i})}else this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(i=>i&&this.loadImage())}_getUrl(i){i&&(this.index=Date.now());let n=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port==="3000"&&(n=`${window.location.protocol}//${window.location.hostname}:8081/${n}`),n}loadImage(){fetch(this._getUrl()).then(i=>i.blob()).then(i=>{const n=new FileReader;n.onload=()=>{this.setState({value:n.result})},n.readAsDataURL(i)}).catch(i=>console.error(i))}renderItem(i,n){return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},this.props.schema.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,M.createElement(j.UploadImage,{error:!!i,disabled:n,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||256*1024,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.schema.base64){const u=this.onChange(this.props.attr,this.state.value);u instanceof Promise&&u.catch(v=>console.error(`Cannot set value: ${v}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(u=>console.error(u))}),onChange:u=>this.setState({value:u},()=>{if(this.props.schema.base64){const v=this.onChange(this.props.attr,this.state.value);v instanceof Promise&&v.catch(a=>console.error(`Cannot set value: ${a}`))}else u.startsWith("data")&&(u=u.split(",")[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,u).catch(v=>console.error(v))})}),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const gi={icon:{width:20,height:20,marginRight:4}};class oo extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);let n=this.props.schema.adapter;n==="_dataSources"&&(n=void 0),this.props.oContext.socket.getAdapterInstances(n,!0).then(async u=>{this.props.schema.adapter==="_dataSources"?u=u.filter(a=>{var h;return(h=a==null?void 0:a.common)==null?void 0:h.getHistory}):this.props.schema.adapter?u=u.filter(a=>a==null?void 0:a._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(u=u.filter(a=>{var h;return this.props.schema.adapters.includes((h=a==null?void 0:a.common)==null?void 0:h.name)})),this.props.schema.onlyEnabled&&(u=u.filter(a=>{var h;return(h=a==null?void 0:a.common)==null?void 0:h.enabled}));const v=u.map(a=>({value:this.props.schema.long?a._id:this.props.schema.short?a._id.split(".").pop():a._id.replace(/^system\.adapter\./,""),label:`${a.common.name} [${a._id.replace(/^system\.adapter\./,"")}]`,icon:`adapter/${a.common.name}/${a.common.icon}`}));v.sort((a,h)=>a.value>h.value?1:a.valueconsole.error(`Cannot get instances: ${u}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject("system.adapter.*",this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}onInstancesUpdate=(i,n)=>{if(!i.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;const u=this.props.schema.long?i:this.props.schema.short?i.split(".").pop():i.replace(/^system\.adapter\./,""),v=this.state.selectOptions.findIndex(a=>a.value===u);if(n){if(this.props.schema.adapter==="_dataSources"&&(!n.common||!n.common.getHistory))return;if(v===-1){const a=JSON.parse(JSON.stringify(this.state.selectOptions)),h=typeof n.common.name=="object"?n.common.name[j.I18n.getLanguage()]||n.common.name.en:n.common.name;a.push({value:this.props.schema.long?n._id:this.props.schema.short?n._id.split(".").pop():n._id.replace(/^system\.adapter\./,""),label:`${h} [${n._id.replace(/^system\.adapter\./,"")}]`,icon:`adapter/${h}/${n.common.icon}`}),a.sort((d,o)=>d.label>o.label?1:d.labela.value===this.state.value);return M.createElement(N.FormControl,{fullWidth:!0,key:this.props.attr,variant:"standard"},this.props.schema.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,displayEmpty:!0,disabled:!!n,value:this.state.value,renderValue:()=>M.createElement("span",{style:{display:"flex"}},u!=null&&u.icon?M.createElement("img",{src:`./${u.icon}`,alt:u.value,style:gi.icon}):null,this.getText(u==null?void 0:u.label,!0)),onChange:a=>this.setState({value:a.target.value},()=>this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(a=>M.createElement(N.MenuItem,{key:a.value,value:a.value,style:a.value===K.NONE_VALUE?{opacity:.5}:{}},a.icon?M.createElement("img",{src:`./${a.icon}`,alt:a.value,style:gi.icon}):null,this.getText(a.label,!0)))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const mi={address:{fontSize:"smaller",opacity:.5,marginLeft:8}};class ao extends K{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getObject(`system.host.${this.props.common.host}`).then(i=>{var u,v;const n=[];if((v=(u=i==null?void 0:i.native)==null?void 0:u.hardware)!=null&&v.networkInterfaces){const a=i.native.hardware.networkInterfaces;Object.keys(a).forEach(h=>{if(this.props.schema.ignoreInternal&&!a[h].find(o=>!o.internal)||this.props.schema.ignoreLoopback&&a[h].find(o=>o.address==="127.0.0.1"||o.address==="::1"))return;let d=a[h].find(o=>o.family==="IPv4");d=d||a[h].find(o=>o.family==="IPv6"),n.push({value:h,address:d.address})})}this.setState({interfaces:n})}).catch(i=>window.alert(`Cannot read interfaces: ${i}`))}renderItem(i,n){var a,h,d;const u=K.getValue(this.props.data,this.props.attr),v=(a=this.state.interfaces)==null?void 0:a.find(o=>o.value===u);return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},(h=this.state.interfaces)!=null&&h.length&&this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,(d=this.state.interfaces)!=null&&d.length?M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:o=>v?M.createElement("span",null,v.value,M.createElement("span",{style:mi.address},v.address)):o,onChange:o=>this.onChange(this.props.attr,o.target.value)},this.state.interfaces.map((o,p)=>M.createElement(N.MenuItem,{key:p,value:o.value},M.createElement("span",null,o.value,M.createElement("span",{style:mi.address},o.address))))):M.createElement(N.TextField,{fullWidth:!0,variant:"standard",error:!!i,disabled:!!n,value:u,onChange:o=>this.onChange(this.props.attr,o.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const kt={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"}},lo=({toggleTranslation:L,noTranslation:i,title:n,fullWidth:u,help:v,maxWidth:a,progress:h,icon:d,applyDisabled:o,applyButton:p,onClose:e,children:t,titleButtonApply:r,titleButtonClose:l,onApply:s,textInput:c,defaultValue:f,overflowHidden:m})=>{const[y,D]=pt.useState(f);pt.useEffect(()=>{D(f)},[f]);let E=null;return d&&(E=d),M.createElement(N.Dialog,{open:!0,maxWidth:a||"md",fullWidth:!!u,disableEscapeKeyDown:!1,onClose:e,sx:{"& .MuiPaper-root":kt.modalDialog}},n&&M.createElement(N.DialogTitle,null,d?M.createElement(E,{style:kt.titleIcon}):null,n,j.I18n.getLanguage()!=="en"&&L?M.createElement(N.IconButton,{size:"large",style:{...kt.languageButton,...i?kt.languageButtonActive:{}},onClick:()=>L(),title:j.I18n.t("Disable/Enable translation")},M.createElement(Z.Language,null)):null),M.createElement(N.DialogContent,{sx:{...m?kt.overflowHidden:{},...kt.content},style:{paddingTop:8}},c&&M.createElement(N.TextField,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:y,onChange:b=>D(b.target.value)}),t,v?M.createElement("div",null,v):null),M.createElement(N.DialogActions,null,p!==!1&&M.createElement(N.Button,{startIcon:M.createElement(Z.Check,null),disabled:h||o&&f===y,onClick:()=>s&&s(c?y:""),variant:"contained",color:"primary"},j.I18n.t(r||"Ok")),M.createElement(N.Button,{color:"grey",onClick:()=>e&&e(),disabled:h,variant:"contained",startIcon:M.createElement(Z.Close,null)},j.I18n.t(l||"Cancel"))))};var It={},Dt={},Ui={exports:{}};(function(L,i){(function(){var n="ace",u=function(){return this}();!u&&typeof window<"u"&&(u=window);var v=function(e,t,r){if(typeof e!="string"){v.original?v.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=t),v.modules[e]||(v.payloads[e]=r,v.modules[e]=null)};v.modules={},v.payloads={};var a=function(e,t,r){if(typeof t=="string"){var l=o(e,t);if(l!=null)return r&&r(),l}else if(Object.prototype.toString.call(t)==="[object Array]"){for(var s=[],c=0,f=t.length;co.length)&&(d=o.length),d-=h.length;var p=o.indexOf(h,d);return p!==-1&&p===d}),String.prototype.repeat||a(String.prototype,"repeat",function(h){for(var d="",o=this;h>0;)h&1&&(d+=o),(h>>=1)&&(o+=o);return d}),String.prototype.includes||a(String.prototype,"includes",function(h,d){return this.indexOf(h,d)!=-1}),Object.assign||(Object.assign=function(h){if(h==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(h),o=1;o>>0,p=arguments[1],e=p>>0,t=e<0?Math.max(o+e,0):Math.min(e,o),r=arguments[2],l=r===void 0?o:r>>0,s=l<0?Math.max(o+l,0):Math.min(l,o);t0;)o&1&&(p+=d),(o>>=1)&&(d+=d);return p};var a=/^\s\s*/,h=/\s\s*$/;u.stringTrimLeft=function(d){return d.replace(a,"")},u.stringTrimRight=function(d){return d.replace(h,"")},u.copyObject=function(d){var o={};for(var p in d)o[p]=d[p];return o},u.copyArray=function(d){for(var o=[],p=0,e=d.length;p65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,u,v){u.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},u.getOS=function(){return u.isMac?u.OS.MAC:u.isLinux?u.OS.LINUX:u.OS.WINDOWS};var a=typeof navigator=="object"?navigator:{},h=(/mac|win|linux/i.exec(a.platform)||["other"])[0].toLowerCase(),d=a.userAgent||"",o=a.appName||"";u.isWin=h=="win",u.isMac=h=="mac",u.isLinux=h=="linux",u.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),u.isOldIE=u.isIE&&u.isIE<9,u.isGecko=u.isMozilla=d.match(/ Gecko\/\d+/),u.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",u.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,u.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,u.isSafari=parseFloat(d.split(" Safari/")[1])&&!u.isChrome||void 0,u.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,u.isAIR=d.indexOf("AdobeAIR")>=0,u.isAndroid=d.indexOf("Android")>=0,u.isChromeOS=d.indexOf(" CrOS ")>=0,u.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,u.isIOS&&(u.isMac=!0),u.isMobile=u.isIOS||u.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,u,v){var a=n("./useragent"),h="http://www.w3.org/1999/xhtml";u.buildDom=function r(l,s,c){if(typeof l=="string"&&l){var f=document.createTextNode(l);return s&&s.appendChild(f),f}if(!Array.isArray(l))return l&&l.appendChild&&s&&s.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var m=[],y=0;y"u")){if(o){if(s)p();else if(s===!1)return o.push([r,l])}if(!d){var c=s;!s||!s.getRootNode?c=document:(c=s.getRootNode(),(!c||c==s)&&(c=document));var f=c.ownerDocument||c;if(l&&u.hasCssString(l,c))return null;l&&(r+=` +/*# sourceURL=ace/css/`+l+" */");var m=u.createElement("style");m.appendChild(f.createTextNode(r)),l&&(m.id=l),c==f&&(c=u.getDocumentHead(f)),c.insertBefore(m,c.firstChild)}}}if(u.importCssString=e,u.importCssStylsheet=function(r,l){u.buildDom(["link",{rel:"stylesheet",href:r}],u.getDocumentHead(l))},u.scrollbarWidth=function(r){var l=u.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var s=u.createElement("ace_outer"),c=s.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",s.appendChild(l);var f=r&&r.documentElement||document&&document.documentElement;if(!f)return 0;f.appendChild(s);var m=l.offsetWidth;c.overflow="scroll";var y=l.offsetWidth;return m===y&&(y=s.clientWidth),f.removeChild(s),m-y},u.computedStyle=function(r,l){return window.getComputedStyle(r,"")||{}},u.setStyle=function(r,l,s){r[l]!==s&&(r[l]=s)},u.HAS_CSS_ANIMATION=!1,u.HAS_CSS_TRANSFORMS=!1,u.HI_DPI=a.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,a.isChromeOS&&(u.HI_DPI=!1),typeof document<"u"){var t=document.createElement("div");u.HI_DPI&&t.style.transform!==void 0&&(u.HAS_CSS_TRANSFORMS=!0),!a.isEdge&&typeof t.style.animationName<"u"&&(u.HAS_CSS_ANIMATION=!0),t=null}u.HAS_CSS_TRANSFORMS?u.translate=function(r,l,s){r.style.transform="translate("+Math.round(l)+"px, "+Math.round(s)+"px)"}:u.translate=function(r,l,s){r.style.top=Math.round(s)+"px",r.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,u,v){/* +* based on code from: +* +* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. +* Available via the MIT or new BSD license. +* see: http://github.com/jrburke/requirejs for details +*/var a=n("./dom");u.get=function(h,d){var o=new XMLHttpRequest;o.open("GET",h,!0),o.onreadystatechange=function(){o.readyState===4&&d(o.responseText)},o.send(null)},u.loadScript=function(h,d){var o=a.getDocumentHead(),p=document.createElement("script");p.src=h,o.appendChild(p),p.onload=p.onreadystatechange=function(e,t){(t||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,t||d())}},u.qualifyURL=function(h){var d=document.createElement("a");return d.href=h,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,u,v){u.inherits=function(a,h){a.super_=h,a.prototype=Object.create(h.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})},u.mixin=function(a,h){for(var d in h)a[d]=h[d];return a},u.implement=function(a,h){u.mixin(a,h)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,u,v){var a={},h=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};a._emit=a._dispatchEvent=function(o,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var e=this._eventRegistry[o]||[],t=this._defaultHandlers[o];if(!(!e.length&&!t)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=o),p.stopPropagation||(p.stopPropagation=h),p.preventDefault||(p.preventDefault=d),e=e.slice();for(var r=0;r1&&(m=c[c.length-2]);var D=p[s+"Path"];return D==null?D=p.basePath:f=="/"&&(s=f=""),D&&D.slice(-1)!="/"&&(D+="/"),D+s+f+m+this.get("suffix")},u.setModuleUrl=function(l,s){return p.$moduleUrls[l]=s};var e=function(l,s){if(l==="ace/theme/textmate"||l==="./theme/textmate")return s(null,n("./theme/textmate"));if(t)return t(l,s);console.error("loader is not configured")},t;u.setLoader=function(l){t=l},u.dynamicModules=Object.create(null),u.$loading={},u.$loaded={},u.loadModule=function(l,s){var c;if(Array.isArray(l))var f=l[0],m=l[1];else if(typeof l=="string")var m=l;var y=function(D){if(D&&!u.$loading[m])return s&&s(D);if(u.$loading[m]||(u.$loading[m]=[]),u.$loading[m].push(s),!(u.$loading[m].length>1)){var E=function(){e(m,function(b,g){g&&(u.$loaded[m]=g),u._emit("load.module",{name:m,module:g});var S=u.$loading[m];u.$loading[m]=null,S.forEach(function(T){T&&T(g)})})};if(!u.get("packaged"))return E();h.loadScript(u.moduleUrl(m,f),E),r()}};if(u.dynamicModules[m])u.dynamicModules[m]().then(function(D){D.default?y(D.default):y(D)});else{try{c=this.$require(m)}catch{}y(c||u.$loaded[m])}},u.$require=function(l){if(typeof v.require=="function"){var s="require";return v[s](l)}},u.setModuleLoader=function(l,s){u.dynamicModules[l]=s};var r=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};u.version="1.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,u,v){n("./lib/fixoldbrowsers");var a=n("./config");a.setLoader(function(p,e){n([p],function(t){e(null,t)})});var h=function(){return this||typeof window<"u"&&window}();v.exports=function(p){a.init=d,a.$require=n,p.require=n},d(!0);function d(p){if(!(!h||!h.document)){a.set("packaged",p||n.packaged||v.packaged||h.define&&(void 0).packaged);var e={},t="",r=document.currentScript||document._currentScript,l=r&&r.ownerDocument||document;r&&r.src&&(t=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=l.getElementsByTagName("script"),c=0;c ["+this.end.row+"/"+this.end.column+"]"},h.prototype.contains=function(d,o){return this.compare(d,o)==0},h.prototype.compareRange=function(d){var o,p=d.end,e=d.start;return o=this.compare(p.row,p.column),o==1?(o=this.compare(e.row,e.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(e.row,e.column),o==-1?-1:o==1?42:0)},h.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},h.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},h.prototype.intersects=function(d){var o=this.compareRange(d);return o==-1||o==0||o==1},h.prototype.isEnd=function(d,o){return this.end.row==d&&this.end.column==o},h.prototype.isStart=function(d,o){return this.start.row==d&&this.start.column==o},h.prototype.setStart=function(d,o){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=o)},h.prototype.setEnd=function(d,o){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=o)},h.prototype.inside=function(d,o){return this.compare(d,o)==0?!(this.isEnd(d,o)||this.isStart(d,o)):!1},h.prototype.insideStart=function(d,o){return this.compare(d,o)==0?!this.isEnd(d,o):!1},h.prototype.insideEnd=function(d,o){return this.compare(d,o)==0?!this.isStart(d,o):!1},h.prototype.compare=function(d,o){return!this.isMultiLine()&&d===this.start.row?othis.end.column?1:0:dthis.end.row?1:this.start.row===d?o>=this.start.column?0:-1:this.end.row===d?o<=this.end.column?0:1:0},h.prototype.compareStart=function(d,o){return this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},h.prototype.compareEnd=function(d,o){return this.end.row==d&&this.end.column==o?1:this.compare(d,o)},h.prototype.compareInside=function(d,o){return this.end.row==d&&this.end.column==o?1:this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},h.prototype.clipRows=function(d,o){if(this.end.row>o)var p={row:o+1,column:0};else if(this.end.rowo)var e={row:o+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,h.isIE){var w=Math.abs(C.clientX-k)>5||Math.abs(C.clientY-_)>5;(!R||w)&&(T=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},E[T-1]||600),T==1&&(k=C.clientX,_=C.clientY)}if(C._clicks=T,b[g]("mousedown",C),T>4)T=0;else if(T>1)return b[g](x[T],C)}Array.isArray(D)||(D=[D]),D.forEach(function(C){l(C,"mousedown",A,S)})};function c(D){return 0|(D.ctrlKey?1:0)|(D.altKey?2:0)|(D.shiftKey?4:0)|(D.metaKey?8:0)}u.getModifierString=function(D){return a.KEY_MODS[c(D)]};function f(D,E,b){var g=c(E);if(!b&&E.code&&(b=a.$codeToKeyCode[E.code]||b),!h.isMac&&d){if(E.getModifierState&&(E.getModifierState("OS")||E.getModifierState("Win"))&&(g|=8),d.altGr)if((3&g)!=3)d.altGr=0;else return;if(b===18||b===17){var S=E.location;if(b===17&&S===1)d[b]==1&&(o=E.timeStamp);else if(b===18&&g===3&&S===2){var T=E.timeStamp-o;T<50&&(d.altGr=!0)}}}if(b in a.MODIFIER_KEYS&&(b=-1),!(!g&&b===13&&E.location===3&&(D(E,g,-b),E.defaultPrevented))){if(h.isChromeOS&&g&8){if(D(E,g,b),E.defaultPrevented)return;g&=-9}return!g&&!(b in a.FUNCTION_KEYS)&&!(b in a.PRINTABLE_KEYS)?!1:D(E,g,b)}}u.addCommandKeyListener=function(D,E,b){var g=null;l(D,"keydown",function(S){d[S.keyCode]=(d[S.keyCode]||0)+1;var T=f(E,S,S.keyCode);return g=S.defaultPrevented,T},b),l(D,"keypress",function(S){g&&(S.ctrlKey||S.altKey||S.shiftKey||S.metaKey)&&(u.stopEvent(S),g=null)},b),l(D,"keyup",function(S){d[S.keyCode]=null},b),d||(m(),l(window,"focus",m))};function m(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!h.isOldIE){var y=1;u.nextTick=function(D,E){E=E||window;var b="zero-timeout-message-"+y++,g=function(S){S.data==b&&(u.stopPropagation(S),s(E,"message",g),D())};l(E,"message",g),E.postMessage(b,"*")}}u.$idleBlocked=!1,u.onIdle=function(D,E){return setTimeout(function b(){u.$idleBlocked?setTimeout(b,100):D()},E)},u.$idleBlockId=null,u.blockIdle=function(D){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},D||100)},u.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(D){setTimeout(D,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,u,v){var a;v.exports={lineMode:!1,pasteCancelled:function(){return a&&a>Date.now()-50?!0:a=!1},cancel:function(){a=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,u,v){var a=n("../lib/event"),h=n("../config").nls,d=n("../lib/useragent"),o=n("../lib/dom"),p=n("../lib/lang"),e=n("../clipboard"),t=d.isChrome<18,r=d.isIE,l=d.isChrome>63,s=400,c=n("../lib/keys"),f=c.KEY_MODS,m=d.isIOS,y=m?/\s/:/\n/,D=d.isMobile,E;E=function(b,g){var S=o.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck","false"),S.style.opacity="0",b.insertBefore(S,b.firstChild);var T=!1,k=!1,_=!1,R=!1,x="";D||(S.style.fontSize="1px");var A=!1,C=!1,w="",$=0,I=0,F=0,O=Number.MAX_SAFE_INTEGER,B=Number.MIN_SAFE_INTEGER,P=0;try{var V=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(X){if(O=Number.MAX_SAFE_INTEGER,B=Number.MIN_SAFE_INTEGER,X<0){P=0;return}P=X},this.setAriaLabel=function(){var X="";if(g.$textInputAriaLabel&&(X+="".concat(g.$textInputAriaLabel,", ")),g.session){var re=g.session.selection.cursor.row;X+=h("text-input.aria-label","Cursor at row $0",[re+1])}S.setAttribute("aria-label",X)},this.setAriaOptions=function(X){X.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",X.inline?"both":"list"),S.setAttribute("aria-activedescendant",X.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),X.role&&S.setAttribute("role",X.role),X.setLabel&&(S.setAttribute("aria-roledescription",h("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),a.addListener(S,"blur",function(X){C||(g.onBlur(X),V=!1)},g),a.addListener(S,"focus",function(X){if(!C){if(V=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(X),d.isEdge?setTimeout(H):H()}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),x||l||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var X=S.style.top;S.style.position="fixed",S.style.top="0px";try{var re=S.getBoundingClientRect().top!=0}catch{return}var ae=[];if(re)for(var de=S.parentElement;de&&de.nodeType==1;)ae.push(de),de.setAttribute("ace_nocontext","true"),!de.parentElement&&de.getRootNode?de=de.getRootNode().host:de=de.parentElement;S.focus({preventScroll:!0}),re&&ae.forEach(function(ce){ce.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=X)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return V},g.on("beforeEndOperation",function(){var X=g.curOp,re=X&&X.command&&X.command.name;if(re!="insertstring"){var ae=re&&(X.docChanged||X.selectionChanged);_&&ae&&(w=S.value="",Ze()),H()}}),g.on("changeSelection",this.setAriaLabel);var W=function(X,re){for(var ae=re,de=1;de<=X-O&&de<2*P+1;de++)ae+=g.session.getLine(X-de).length+1;return ae},H=m?function(X){if(!(!V||T&&!X||R)){X||(X="");var re=` + ab`+X+`cde fg +`;re!=S.value&&(S.value=w=re);var ae=4,de=4+(X.length||(g.selection.isEmpty()?0:1));($!=ae||I!=de)&&S.setSelectionRange(ae,de),$=ae,I=de}}:function(){if(!(_||R)&&!(!V&&!Q)){_=!0;var X=0,re=0,ae="";if(g.session){var de=g.selection,ce=de.getRange(),Ee=de.cursor.row;Ee===B+1?(O=B+1,B=O+2*P):Ee===O-1?(B=O-1,O=B-2*P):(EeB+1)&&(O=Ee>P?Ee-P:0,B=Ee>P?Ee+P:2*P);for(var $e=[],xe=O;xe<=B;xe++)$e.push(g.session.getLine(xe));if(ae=$e.join(` +`),X=W(ce.start.row,ce.start.column),re=W(ce.end.row,ce.end.column),ce.start.rowB){var ve=g.session.getLine(B+1);re=ce.end.row>B+1?ve.length:ce.end.column,re+=ae.length+1,ae=ae+` +`+ve}else D&&Ee>0&&(ae=` +`+ae,re+=1,X+=1);ae.length>s&&(X=w.length&&X.value===w&&w&&X.selectionEnd!==I},G=function(X){_||(T?T=!1:U(S)?(g.selectAll(),H()):D&&S.selectionStart!=$&&H())},Y=null;this.setInputHandler=function(X){Y=X},this.getInputHandler=function(){return Y};var Q=!1,ee=function(X,re){if(Q&&(Q=!1),k)return H(),X&&g.onPaste(X),k=!1,"";for(var ae=S.selectionStart,de=S.selectionEnd,ce=$,Ee=w.length-I,$e=X,xe=X.length-ae,we=X.length-de,ve=0;ce>0&&w[ve]==X[ve];)ve++,ce--;for($e=$e.slice(ve),ve=1;Ee>0&&w.length-ve>$-1&&w[w.length-ve]==X[X.length-ve];)ve++,Ee--;xe-=ve-1,we-=ve-1;var Fe=$e.length-ve+1;if(Fe<0&&(ce=-Fe,Fe=0),$e=$e.slice(0,Fe),!re&&!$e&&!xe&&!ce&&!Ee&&!we)return"";R=!0;var st=!1;return d.isAndroid&&$e==". "&&($e=" ",st=!0),$e&&!ce&&!Ee&&!xe&&!we||A?g.onTextInput($e):g.onTextInput($e,{extendLeft:ce,extendRight:Ee,restoreStart:xe,restoreEnd:we}),R=!1,w=X,$=ae,I=de,F=we,st?` +`:$e},ne=function(X){if(_)return Xe();if(X&&X.inputType){if(X.inputType=="historyUndo")return g.execCommand("undo");if(X.inputType=="historyRedo")return g.execCommand("redo")}var re=S.value,ae=ee(re,!0);(re.length>s+100||y.test(ae)||D&&$<1&&$==I)&&H()},se=function(X,re,ae){var de=X.clipboardData||window.clipboardData;if(!(!de||t)){var ce=r||ae?"Text":"text/plain";try{return re?de.setData(ce,re)!==!1:de.getData(ce)}catch(Ee){if(!ae)return se(Ee,re,!0)}}},ge=function(X,re){var ae=g.getCopyText();if(!ae)return a.preventDefault(X);se(X,ae)?(m&&(H(ae),T=ae,setTimeout(function(){T=!1},10)),re?g.onCut():g.onCopy(),a.preventDefault(X)):(T=!0,S.value=ae,S.select(),setTimeout(function(){T=!1,H(),re?g.onCut():g.onCopy()}))},be=function(X){ge(X,!0)},ke=function(X){ge(X,!1)},Ce=function(X){var re=se(X);e.pasteCancelled()||(typeof re=="string"?(re&&g.onPaste(re,X),d.isIE&&setTimeout(H),a.preventDefault(X)):(S.value="",k=!0))};a.addCommandKeyListener(S,function(X,re,ae){if(!_)return g.onCommandKey(X,re,ae)},g),a.addListener(S,"select",G,g),a.addListener(S,"input",ne,g),a.addListener(S,"cut",be,g),a.addListener(S,"copy",ke,g),a.addListener(S,"paste",Ce,g),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&a.addListener(b,"keydown",function(X){if(!(d.isMac&&!X.metaKey||!X.ctrlKey))switch(X.keyCode){case 67:ke(X);break;case 86:Ce(X);break;case 88:be(X);break}},g);var Ne=function(X){if(!(_||!g.onCompositionStart||g.$readOnly)&&(_={},!A)){X.data&&(_.useTextareaForIME=!1),setTimeout(Xe,0),g._signal("compositionStart"),g.on("mousedown",Rt);var re=g.getSelectionRange();re.end.row=re.start.row,re.end.column=re.start.column,_.markerRange=re,_.selectionStart=$,g.onCompositionStart(_),_.useTextareaForIME?(w=S.value="",$=0,I=0):(S.msGetInputContext&&(_.context=S.msGetInputContext()),S.getInputContext&&(_.context=S.getInputContext()))}},Xe=function(){if(!(!_||!g.onCompositionUpdate||g.$readOnly)){if(A)return Rt();if(_.useTextareaForIME)g.onCompositionUpdate(S.value);else{var X=S.value;ee(X),_.markerRange&&(_.context&&(_.markerRange.start.column=_.selectionStart=_.context.compositionStartOffset),_.markerRange.end.column=_.markerRange.start.column+I-_.selectionStart+F)}}},Ze=function(X){!g.onCompositionEnd||g.$readOnly||(_=!1,g.onCompositionEnd(),g.off("mousedown",Rt),X&&ne())};function Rt(){C=!0,S.blur(),S.focus(),C=!1}var Jt=p.delayedCall(Xe,50).schedule.bind(null,null);function bn(X){X.keyCode==27&&S.value.lengthI&&w[we]==` +`?ve=c.end:xe<$&&w[xe-1]==" "?(ve=c.left,Fe=f.option):xe<$||xe==$&&I!=$&&xe==we?ve=c.left:we>I&&w.slice(0,we).split(` +`).length>2?ve=c.down:we>I&&w[we-1]==" "?(ve=c.right,Fe=f.option):(we>I||we==I&&I!=$&&xe==we)&&(ve=c.right),xe!==we&&(Fe|=f.shift),ve){var st=re.onCommandKey({},Fe,ve);if(!st&&re.commands){ve=c.keyCodeToString(ve);var Yt=re.commands.findKeyCommand(Fe,ve);Yt&&re.execCommand(Yt)}$=xe,I=we,H("")}}};document.addEventListener("selectionchange",Ee),re.on("destroy",function(){document.removeEventListener("selectionchange",Ee)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}},u.TextInput=E,u.$setUserAgentForTests=function(b,g){D=b,m=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,u,v){var a=n("../lib/useragent"),h=0,d=550,o=function(){function t(r){r.$clickSelection=null;var l=r.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(c){r[c]=this[c]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return t.prototype.onMouseDown=function(r){var l=r.inSelection(),s=r.getDocumentPosition();this.mousedownEvent=r;var c=this.editor,f=r.getButton();if(f!==0){var m=c.getSelectionRange(),y=m.isEmpty();(y||f==1)&&c.selection.moveToPosition(s),f==2&&(c.textInput.onContextMenu(r.domEvent),a.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(s,r.domEvent._clicks>1),r.preventDefault()},t.prototype.startSelect=function(r,l){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(r):l||s.selection.moveToPosition(r),l||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},t.prototype.select=function(){var r,l=this.editor,s=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s);if(c==-1)r=this.$clickSelection.end;else if(c==1)r=this.$clickSelection.start;else{var f=e(this.$clickSelection,s);s=f.cursor,r=f.anchor}l.selection.setSelectionAnchor(r.row,r.column)}l.selection.selectToPosition(s),l.renderer.scrollCursorIntoView()},t.prototype.extendSelectionBy=function(r){var l,s=this.editor,c=s.renderer.screenToTextCoordinates(this.x,this.y),f=s.selection[r](c.row,c.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(f.start),y=this.$clickSelection.comparePoint(f.end);if(m==-1&&y<=0)l=this.$clickSelection.end,(f.end.row!=c.row||f.end.column!=c.column)&&(c=f.start);else if(y==1&&m>=0)l=this.$clickSelection.start,(f.start.row!=c.row||f.start.column!=c.column)&&(c=f.end);else if(m==-1&&y==1)c=f.end,l=f.start;else{var D=e(this.$clickSelection,c);c=D.cursor,l=D.anchor}s.selection.setSelectionAnchor(l.row,l.column)}s.selection.selectToPosition(c),s.renderer.scrollCursorIntoView()},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},t.prototype.focusWait=function(){var r=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(r>h||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},t.prototype.onDoubleClick=function(r){var l=r.getDocumentPosition(),s=this.editor,c=s.session,f=c.getBracketRange(l);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=s.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},t.prototype.onTripleClick=function(r){var l=r.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var c=s.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=s.selection.getLineRange(c.start.row),this.$clickSelection.end=s.selection.getLineRange(c.end.row).end):this.$clickSelection=s.selection.getLineRange(l.row),this.select()},t.prototype.onQuadClick=function(r){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},t.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,c=r.domEvent.timeStamp,f=c-s.t,m=f?r.wheelX/f:s.vx,y=f?r.wheelY/f:s.vy;f=1&&l.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(E=!0),D<=1&&l.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(E=!0),E)s.allowed=c;else if(c-s.allowedd.clientHeight;o||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,u,v){var a=this&&this.__extends||function(){var c=function(f,m){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,D){y.__proto__=D}||function(y,D){for(var E in D)Object.prototype.hasOwnProperty.call(D,E)&&(y[E]=D[E])},c(f,m)};return function(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");c(f,m);function y(){this.constructor=f}f.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),h=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&c[f],y=0;if(m)return m.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&y>=c.length&&(c=void 0),{value:c&&c[y++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("./lib/dom");n("./lib/event");var o=n("./range").Range,p=n("./lib/scroll").preventParentScroll,e="ace_tooltip",t=function(){function c(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return c.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=e,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(f){this.getElement().textContent=f},c.prototype.setHtml=function(f){this.getElement().innerHTML=f},c.prototype.setPosition=function(f,m){this.getElement().style.left=f+"px",this.getElement().style.top=m+"px"},c.prototype.setClassName=function(f){d.addCssClass(this.getElement(),f)},c.prototype.setTheme=function(f){this.$element.className=e+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},c.prototype.show=function(f,m,y){f!=null&&this.setText(f),m!=null&&y!=null&&this.setPosition(m,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=e,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),r=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},c.prototype.removePopup=function(f){var m=this.popups.indexOf(f);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},c.prototype.updatePopups=function(){var f,m,y,D;this.popups.sort(function(x,A){return A.priority-x.priority});var E=[];try{for(var b=h(this.popups),g=b.next();!g.done;g=b.next()){var S=g.value,T=!0;try{for(var k=(y=void 0,h(E)),_=k.next();!_.done;_=k.next()){var R=_.value;if(this.doPopupsOverlap(R,S)){T=!1;break}}}catch(x){y={error:x}}finally{try{_&&!_.done&&(D=k.return)&&D.call(k)}finally{if(y)throw y.error}}T?E.push(S):S.hide()}}catch(x){f={error:x}}finally{try{g&&!g.done&&(m=b.return)&&m.call(b)}finally{if(f)throw f.error}}},c.prototype.doPopupsOverlap=function(f,m){var y=f.getElement().getBoundingClientRect(),D=m.getElement().getBoundingClientRect();return y.leftD.left&&y.topD.top},c}(),l=new r;u.popupManager=l,u.Tooltip=t;var s=function(c){a(f,c);function f(m){m===void 0&&(m=document.body);var y=c.call(this,m)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var D=y.getElement();return D.style.whiteSpace="pre-wrap",D.style.pointerEvents="auto",D.addEventListener("mouseout",y.onMouseOut),D.tabIndex=-1,D.addEventListener("blur",function(){D.contains(document.activeElement)||this.hide()}.bind(y)),D.addEventListener("wheel",p),y}return f.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(m,y){this.lastEvent=m,this.lastT=Date.now();var D=y.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||D||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||D||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(m){var y=m.editor,D=m.getDocumentPosition(),E=y.session.getLine(D.row);if(D.column==E.length){var b=y.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),g=y.session.documentToScreenPosition(D.row,D.column);if(g.column!=b.column||g.row!=b.row)return!0}return!1},f.prototype.setDataProvider=function(m){this.$gatherData=m},f.prototype.showForRange=function(m,y,D,E){var b=10;if(!(E&&E!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var g=m.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.addMarker(y,m.session),this.range=o.fromPoints(y.start,y.end);var S=g.textToScreenCoordinates(y.start.row,y.start.column),T=g.scroller.getBoundingClientRect();S.pageX=c.length&&(c=void 0),{value:c&&c[y++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("../lib/dom"),o=n("../lib/event"),p=n("../tooltip").Tooltip,e=n("../config").nls,t=5,r=3;u.GUTTER_TOOLTIP_LEFT_OFFSET=t,u.GUTTER_TOOLTIP_TOP_OFFSET=r;function l(c){var f=c.editor,m=f.renderer.$gutterLayer,y=new s(f,!0);c.editor.setDefaultHandler("guttermousedown",function(T){if(!(!f.isFocused()||T.getButton()!=0)){var k=m.getRegion(T);if(k!="foldWidgets"){var _=T.getDocumentPosition().row,R=f.session.selection;if(T.getShiftKey())R.selectTo(_,0);else{if(T.domEvent.detail==2)return f.selectAll(),T.preventDefault();c.$clickSelection=f.selection.getLineRange(_)}return c.setState("selectByLines"),c.captureMouse(T),T.preventDefault()}}});var D,E;function b(){var T=E.getDocumentPosition().row,k=f.session.getLength();if(T==k){var _=f.renderer.pixelToScreenCoordinates(0,E.y).row,R=E.$pos;if(_>f.session.documentToScreenRow(R.row,R.column))return g()}if(y.showTooltip(T),!!y.isOpen)if(f.on("mousewheel",g),f.on("changeSession",g),window.addEventListener("keydown",g,!0),c.$tooltipFollowsMouse)S(E);else{var x=E.getGutterRow(),A=m.$lines.get(x);if(A){var C=A.element.querySelector(".ace_gutter_annotation"),w=C.getBoundingClientRect(),$=y.getElement().style;$.left=w.right-t+"px",$.top=w.bottom-r+"px"}else S(E)}}function g(T){T&&T.type==="keydown"&&(T.ctrlKey||T.metaKey)||T&&T.type==="mouseout"&&(!T.relatedTarget||y.getElement().contains(T.relatedTarget))||(D&&(D=clearTimeout(D)),y.isOpen&&(y.hideTooltip(),f.off("mousewheel",g),f.off("changeSession",g),window.removeEventListener("keydown",g,!0)))}function S(T){y.setPosition(T.x,T.y)}c.editor.setDefaultHandler("guttermousemove",function(T){var k=T.domEvent.target||T.domEvent.srcElement;if(d.hasCssClass(k,"ace_fold-widget")||d.hasCssClass(k,"ace_custom-widget"))return g();y.isOpen&&c.$tooltipFollowsMouse&&S(T),E=T,!D&&(D=setTimeout(function(){D=null,E&&!c.isMousePressed&&b()},50))}),o.addListener(f.renderer.$gutter,"mouseout",function(T){E=null,y.isOpen&&(D=setTimeout(function(){D=null,g(T)},50))},f)}u.GutterHandler=l;var s=function(c){a(f,c);function f(m,y){y===void 0&&(y=!1);var D=c.call(this,m.container)||this;D.editor=m,D.visibleTooltipRow;var E=D.getElement();return E.setAttribute("role","tooltip"),E.style.pointerEvents="auto",y&&(D.onMouseOut=D.onMouseOut.bind(D),E.addEventListener("mouseout",D.onMouseOut)),D}return f.prototype.onMouseOut=function(m){this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||this.hideTooltip())},f.prototype.setPosition=function(m,y){var D=window.innerWidth||document.documentElement.clientWidth,E=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),g=this.getHeight();m+=15,y+=15,m+b>D&&(m-=m+b-D),y+g>E&&(y-=20+g),p.prototype.setPosition.call(this,m,y)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:e("gutter-tooltip.aria-label.error.singular","error"),plural:e("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:e("gutter-tooltip.aria-label.security.singular","security finding"),plural:e("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:e("gutter-tooltip.aria-label.warning.singular","warning"),plural:e("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:e("gutter-tooltip.aria-label.info.singular","information message"),plural:e("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:e("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:e("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(m){var y,D=this.editor.renderer.$gutterLayer,E=D.$annotations[m],b;E?b={displayText:Array.from(E.displayText),type:Array.from(E.type)}:b={displayText:[],type:[]};var g=D.session.getFoldLine(m);if(g&&D.$showFoldedAnnotations){for(var S={error:[],security:[],warning:[],info:[],hint:[]},T={error:1,security:2,warning:3,info:4,hint:5},k,_=m+1;_<=g.end.row;_++)if(D.$annotations[_])for(var R=0;Re?x=null:U-x>=p&&(s.renderer.scrollCursorIntoView(),x=null)}}function w(W,H){var U=Date.now(),G=s.renderer.layerConfig.lineHeight,Y=s.renderer.layerConfig.characterWidth,Q=s.renderer.scroller.getBoundingClientRect(),ee={x:{left:D-Q.left,right:Q.right-D},y:{top:E-Q.top,bottom:Q.bottom-E}},ne=Math.min(ee.x.left,ee.x.right),se=Math.min(ee.y.top,ee.y.bottom),ge={row:W.row,column:W.column};ne/Y<=2&&(ge.column+=ee.x.left=o&&s.renderer.scrollCursorIntoView(ge):R=U:R=null}function $(){var W=S;S=s.renderer.screenToTextCoordinates(D,E),C(S,W),w(S,W)}function I(){g=s.selection.toOrientedRange(),y=s.session.addMarker(g,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),$(),b=setInterval($,20),T=0,h.addListener(document,"mousemove",B)}function F(){clearInterval(b),s.session.removeMarker(y),y=null,s.selection.fromOrientedRange(g),s.isFocused()&&!_&&s.$resetCursorStyle(),g=null,S=null,T=0,R=null,x=null,h.removeListener(document,"mousemove",B)}var O=null;function B(){O==null&&(O=setTimeout(function(){O!=null&&y&&F()},20))}function P(W){var H=W.types;return!H||Array.prototype.some.call(H,function(U){return U=="text/plain"||U=="Text"})}function V(W){var H=["copy","copymove","all","uninitialized"],U=["move","copymove","linkmove","all","uninitialized"],G=d.isMac?W.altKey:W.ctrlKey,Y="uninitialized";try{Y=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var Q="none";return G&&H.indexOf(Y)>=0?Q="copy":U.indexOf(Y)>=0?Q="move":H.indexOf(Y)>=0&&(Q="copy"),Q}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,s=l.container;s.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=d.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var s=this.editor.container;if(d.isIE&&this.state=="dragReady"){var c=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&s.dragDrop()}if(this.state==="dragWait"){var c=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var s=this.editor,c=l.inSelection(),f=l.getButton(),m=l.domEvent.detail||1;if(m===1&&f===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),s.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var D=s.container;D.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(t.prototype);function r(l,s,c,f){return Math.sqrt(Math.pow(c-l,2)+Math.pow(f-s,2))}u.DragdropHandler=t}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,u,v){var a=n("./mouse_event").MouseEvent,h=n("../lib/event"),d=n("../lib/dom");u.addTouchListeners=function(o,p){var e="scroll",t,r,l,s,c,f,m=0,y,D=0,E=0,b=0,g,S;function T(){var C=window.navigator&&window.navigator.clipboard,w=!1,$=function(){var O=p.getCopyText(),B=p.session.getUndoManager().hasUndo();S.replaceChild(d.buildDom(w?["span",!O&&I("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],O&&I("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],O&&I("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&I("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&I("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],I("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],I("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},I=function(O){return p.commands.canExecute(O,p)},F=function(O){var B=O.target.getAttribute("action");if(B=="more"||!w)return w=!w,$();B=="paste"?C.readText().then(function(P){p.execCommand(B,P)}):B&&((B=="cut"||B=="copy")&&(C?C.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(B)),S.firstChild.style.display="none",w=!1,B!="openCommandPalette"&&p.focus()};S=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(O){e="menu",O.stopPropagation(),O.preventDefault(),p.textInput.focus()},ontouchend:function(O){O.stopPropagation(),O.preventDefault(),F(O)},onclick:F},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function k(){if(!p.getOption("enableMobileMenu")){S&&_();return}S||T();var C=p.selection.cursor,w=p.renderer.textToScreenCoordinates(C.row,C.column),$=p.renderer.textToScreenCoordinates(0,0).pageX,I=p.renderer.scrollLeft,F=p.container.getBoundingClientRect();S.style.top=w.pageY-F.top-3+"px",w.pageX-F.left=2?p.selection.getLineRange(y.row):p.session.getBracketRange(y);C&&!C.isEmpty()?p.selection.setRange(C):p.selection.selectWord(),e="wait"}h.addListener(o,"contextmenu",function(C){if(g){var w=p.textInput.getElement();w.focus()}},p),h.addListener(o,"touchstart",function(C){var w=C.touches;if(c||w.length>1){clearTimeout(c),c=null,l=-1,e="zoom";return}g=p.$mouseHandler.isMousePressed=!0;var $=p.renderer.layerConfig.lineHeight,I=p.renderer.layerConfig.lineHeight,F=C.timeStamp;s=F;var O=w[0],B=O.clientX,P=O.clientY;Math.abs(t-B)+Math.abs(r-P)>$&&(l=-1),t=C.clientX=B,r=C.clientY=P,E=b=0;var V=new a(C,p);if(y=V.getDocumentPosition(),F-l<500&&w.length==1&&!m)D++,C.preventDefault(),C.button=0,x();else{D=0;var W=p.selection.cursor,H=p.selection.isEmpty()?W:p.selection.anchor,U=p.renderer.$cursorLayer.getPixelPosition(W,!0),G=p.renderer.$cursorLayer.getPixelPosition(H,!0),Y=p.renderer.scroller.getBoundingClientRect(),Q=p.renderer.layerConfig.offset,ee=p.renderer.scrollLeft,ne=function(be,ke){return be=be/I,ke=ke/$-.75,be*be+ke*ke};if(C.clientXge?"cursor":"anchor"),ge<3.5?e="anchor":se<3.5?e="cursor":e="scroll",c=setTimeout(R,450)}l=F},p),h.addListener(o,"touchend",function(C){g=p.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),e=="zoom"?(e="",m=0):c?(p.selection.moveToPosition(y),m=0,k()):e=="scroll"?(A(),_()):k(),clearTimeout(c),c=null},p),h.addListener(o,"touchmove",function(C){c&&(clearTimeout(c),c=null);var w=C.touches;if(!(w.length>1||e=="zoom")){var $=w[0],I=t-$.clientX,F=r-$.clientY;if(e=="wait")if(I*I+F*F>4)e="cursor";else return C.preventDefault();t=$.clientX,r=$.clientY,C.clientX=$.clientX,C.clientY=$.clientY;var O=C.timeStamp,B=O-s;if(s=O,e=="scroll"){var P=new a(C,p);P.speed=1,P.wheelX=I,P.wheelY=F,10*Math.abs(I)0)if(ge==16){for(Ce=ke;Ce-1){for(Ce=ke;Ce=0&&G[Ze]==g;Ze--)H[Ze]=a}}}function B(W,H,U){if(!(h=W){for(Q=Y+1;Q=W;)Q++;for(ee=Y,ne=Q-1;ee=H.length||(Q=U[G-1])!=f&&Q!=m||(ee=H[G+1])!=f&&ee!=m?y:(d&&(ee=m),ee==Q?ee:y);case T:return Q=G>0?U[G-1]:D,Q==f&&G+10&&U[G-1]==f)return f;if(d)return y;for(se=G+1,ne=H.length;se=1425&&ge<=2303||ge==64286;if(Q=H[se],be&&(Q==c||Q==b))return c}return G<1||(Q=H[G-1])==D?y:U[G-1];case D:return d=!1,o=!0,a;case E:return p=!0,y;case R:case x:case C:case w:case A:d=!1;case $:return y}}function V(W){var H=W.charCodeAt(0),U=H>>8;return U==0?H>191?s:I[H]:U==5?/[\u0591-\u05f4]/.test(W)?c:s:U==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?_:/[\u0660-\u0669\u066b-\u066c]/.test(W)?m:H==1642?k:/[\u06f0-\u06f9]/.test(W)?f:b:U==32&&H<=8287?F[H&255]:U==254&&H>=65136?b:y}u.L=s,u.R=c,u.EN=f,u.ON_R=3,u.AN=4,u.R_H=5,u.B=6,u.RLE=7,u.DOT="·",u.doBidiReorder=function(W,H,U){if(W.length<2)return{};var G=W.split(""),Y=new Array(G.length),Q=new Array(G.length),ee=[];a=U?l:r,O(G,ee,G.length,H);for(var ne=0;neb&&H[ne]0&&G[ne-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(G[ne])&&(ee[ne-1]=ee[ne]=u.R_H,ne++);G[G.length-1]===u.DOT&&(ee[G.length-1]=u.B),G[0]==="‫"&&(ee[0]=u.RLE);for(var ne=0;ne=0&&(e=this.session.$docRowCache[r])}return e},p.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var r,l=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(r=this.session.$getRowCacheIndex(t,this.currentRow-e-1),r===l);)l=r,e++;else e=this.currentRow;return e},p.prototype.updateRowLine=function(e,t){e===void 0&&(e=this.getDocumentRow());var r=e===this.session.getLength()-1,l=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[e];s&&(t===void 0&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[a.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,l=a.getVisualFromLogicalIdx(r,this.bidiMap),s=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&e<=t&&s[l]%2!==0&&l++;for(var f=0;ft&&s[l]%2===0&&(c+=this.charWidths[s[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},p.prototype.getSelections=function(e,t){var r=this.bidiMap,l=r.bidiLevels,s,c=[],f=0,m=Math.min(e,t)-this.wrapIndent,y=Math.max(e,t)-this.wrapIndent,D=!1,E=!1,b=0;this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,S=0;S=m&&gl+f/2;){if(l+=f,s===c.length-1){f=0;break}f=this.charWidths[c[++s]]}return s>0&&c[s-1]%2!==0&&c[s]%2===0?(r0&&c[s-1]%2===0&&c[s]%2!==0?t=1+(r>l?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===c.length-1&&f===0&&c[s-1]%2===0||!this.isRtlDir&&s===0&&c[s]%2!==0?t=1+this.bidiMap.logicalFromVisual[s]:(s>0&&c[s-1]%2!==0&&f!==0&&s--,t=this.bidiMap.logicalFromVisual[s]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},p}();u.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,u,v){var a=n("./lib/oop"),h=n("./lib/lang"),d=n("./lib/event_emitter").EventEmitter,o=n("./range").Range,p=function(){function e(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(l){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(t,r){this.$isEmpty=!1,this.anchor.setPosition(t,r)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var t=this.anchor,r=this.lead;return t.row>r.row||t.row==r.row&&t.column>r.column},e.prototype.getRange=function(){var t=this.anchor,r=this.lead;return this.$isEmpty?o.fromPoints(r,r):this.isBackwards()?o.fromPoints(r,t):o.fromPoints(t,r)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(t,r){var l=r?t.end:t.start,s=r?t.start:t.end;this.$setSelection(l.row,l.column,s.row,s.column)},e.prototype.$setSelection=function(t,r,l,s){if(!this.$silent){var c=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,r),this.cursor.setPosition(l,s),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||f)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(t){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),t.call(this)},e.prototype.selectTo=function(t,r){this.$moveSelection(function(){this.moveCursorTo(t,r)})},e.prototype.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},e.prototype.moveTo=function(t,r){this.clearSelection(),this.moveCursorTo(t,r)},e.prototype.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(t,r){if(typeof r>"u"){var l=t||this.lead;t=l.row,r=l.column}return this.session.getWordRange(t,r)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var t=this.getCursor(),r=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(r)},e.prototype.getLineRange=function(t,r){var l=typeof t=="number"?t:this.lead.row,s,c=this.session.getFoldLine(l);return c?(l=c.start.row,s=c.end.row):s=l,r===!0?new o(l,0,s,this.session.getLine(s).length):new o(l,0,s+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(t,r,l){var s=t.column,c=t.column+r;return l<0&&(s=t.column-r,c=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(s,c).split(" ").length-1==r},e.prototype.moveCursorLeft=function(){var t=this.lead.getPosition(),r;if(r=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var t=this.lead.getPosition(),r;if(r=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(r.column=s)}}this.moveCursorTo(r.row,r.column)},e.prototype.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,r=this.doc.getLine(t).length;this.moveCursorTo(t,r)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var t=this.lead.row,r=this.lead.column,l=this.doc.getLine(t),s=l.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(t,r,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(s)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=l.substring(r)),r>=l.length){this.moveCursorTo(t,l.length),this.moveCursorRight(),t0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,r)},e.prototype.$shortWordEndIndex=function(t){var r=0,l,s=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(t))r=this.session.tokenRe.lastIndex;else{for(;(l=t[r])&&s.test(l);)r++;if(r<1){for(c.lastIndex=0;(l=t[r])&&!c.test(l);)if(c.lastIndex=0,r++,s.test(l))if(r>2){r--;break}else{for(;(l=t[r])&&s.test(l);)r++;if(r>2)break}}}return c.lastIndex=0,r},e.prototype.moveCursorShortWordRight=function(){var t=this.lead.row,r=this.lead.column,l=this.doc.getLine(t),s=l.substring(r),c=this.session.getFoldAt(t,r,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(r==l.length){var f=this.doc.getLength();do t++,s=this.doc.getLine(t);while(t0&&/^\s*$/.test(s));r=s.length,/\s+$/.test(s)||(s="")}var c=h.stringReverse(s),f=this.$shortWordEndIndex(c);return this.moveCursorTo(t,r-f)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(t,r){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(r===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];t<0?t-=c.rowsAbove||0:t>0&&(t+=c.rowCount-(c.rowsAbove||0))}var f=this.session.screenToDocumentPosition(l.row+t,l.column,s);t!==0&&r===0&&f.row===this.lead.row&&(f.column,this.lead.column),this.moveCursorTo(f.row,f.column+r,r===0)},e.prototype.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorTo=function(t,r,l){var s=this.session.getFoldAt(t,r,1);s&&(t=s.start.row,r=s.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(c.charAt(r))&&c.charAt(r-1)&&(this.lead.row==t&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(t,r),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(t,r,l){var s=this.session.screenToDocumentPosition(t,r);this.moveCursorTo(s.row,s.column,l)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(t){var r=this.getRange();return t?(t.start.column=r.start.column,t.start.row=r.start.row,t.end.column=r.end.column,t.end.row=r.end.row):t=r,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},e.prototype.getRangeOfMovements=function(t){var r=this.getCursor();try{t(this);var l=this.getCursor();return o.fromPoints(r,l)}catch{return o.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},e.prototype.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(r){var l=r.clone();return l.isBackwards=r.cursor==r.start,l});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},e.prototype.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var r=t.length;r--;){var l=o.fromPoints(t[r].start,t[r].end);t[r].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},e.prototype.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(t[r]))return!1;return!0},e}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,a.implement(p.prototype,d),u.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,u,v){var a=n("./lib/report_error").reportError,h=2e3,d=function(){function o(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var e in this.states){for(var t=this.states[e],r=[],l=0,s=this.matchMappings[e]={defaultToken:"text"},c="g",f=[],m=0;m1?y.onMatch=this.$applyToken:y.onMatch=y.token),E>1&&(/\\\d/.test(y.regex)?D=y.regex.replace(/\\([0-9]+)/g,function(b,g){return"\\"+(parseInt(g,10)+l+1)}):(E=1,D=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&f.push(y)),s[l]=m,l+=E,r.push(D),y.onMatch||(y.onMatch=null)}}r.length||(s[0]=0,r.push("$")),f.forEach(function(b){b.splitRegex=this.createSplitterRegexp(b.regex,c)},this),this.regExps[e]=new RegExp("("+r.join(")|(")+")|($)",c)}}return o.prototype.$setMaxTokenCount=function(p){h=p|0},o.prototype.$applyToken=function(p){var e=this.splitRegex.exec(p).slice(1),t=this.token.apply(this,e);if(typeof t=="string")return[{type:t,value:p}];for(var r=[],l=0,s=t.length;ly){var k=p.substring(y,T-S.length);E.type==b?E.value+=k:(E.type&&m.push(E),E={type:b,value:k})}for(var _=0;_h){for(D>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:p});y1&&t[0]!==r&&t.unshift("#tmp",r),{tokens:m,state:t.length?t:r}},o}();d.prototype.reportError=a,u.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,u,v){var a=n("../lib/deep_copy").deepCopy,h;h=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(p,e){if(!e){for(var t in p)this.$rules[t]=p[t];return}for(var t in p){for(var r=p[t],l=0;l=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,p=this.$tokenIndex,e=o[p].start;if(e!==void 0)return e;for(e=0;p>0;)p-=1,e+=o[p].value.length;return e},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new a(this.$row,p,this.$row,p+o.value.length)},d}();u.TokenIterator=h}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,u,v){var a=n("../../lib/oop"),h=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,o=n("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],e=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],t,r={},l={'"':'"',"'":"'"},s=function(m){var y=-1;if(m.multiSelect&&(y=m.selection.index,r.rangeCount!=m.multiSelect.rangeCount&&(r={rangeCount:m.multiSelect.rangeCount})),r[y])return t=r[y];t=r[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(m,y,D,E){var b=m.end.row-m.start.row;return{text:D+y+E,selection:[0,m.start.column+1,b,m.end.column+(b?0:1)]}},f;f=function(m){m=m||{},this.add("braces","insertion",function(y,D,E,b,g){var S=E.getCursorPosition(),T=b.doc.getLine(S.row);if(g=="{"){s(E);var k=E.getSelectionRange(),_=b.doc.getTextRange(k),R=b.getTokenAt(S.row,S.column);if(_!==""&&_!=="{"&&E.getWrapBehavioursEnabled())return c(k,_,"{","}");if(R&&/(?:string)\.quasi|\.xml/.test(R.type)){var x=[/tag\-(?:open|name)/,/attribute\-name/];return x.some(function(O){return O.test(R.type)})||/(string)\.quasi/.test(R.type)&&R.value[S.column-R.start-1]!=="$"?void 0:(f.recordAutoInsert(E,b,"}"),{text:"{}",selection:[1,1]})}else if(f.isSaneInsertion(E,b))return/[\]\}\)]/.test(T[S.column])||E.inMultiSelectMode||m.braces?(f.recordAutoInsert(E,b,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(E,b,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){s(E);var A=T.substring(S.column,S.column+1);if(A=="}"){var C=b.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(C!==null&&f.isAutoInsertedClosing(S,T,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==` +`||g==`\r +`){s(E);var w="";f.isMaybeInsertedClosing(S,T)&&(w=o.stringRepeat("}",t.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var A=T.substring(S.column,S.column+1);if(A==="}"){var $=b.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!$)return null;var I=this.$getIndent(b.getLine($.row))}else if(w)var I=this.$getIndent(T);else{f.clearMaybeInsertedClosing();return}var F=I+b.getTabString();return{text:` +`+F+` +`+I+w,selection:[1,F.length,1,F.length]}}else f.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,D,E,b,g){var S=b.doc.getTextRange(g);if(!g.isMultiLine()&&S=="{"){s(E);var T=b.doc.getLine(g.start.row),k=T.substring(g.end.column,g.end.column+1);if(k=="}")return g.end.column++,g;t.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,D,E,b,g){if(g=="("){s(E);var S=E.getSelectionRange(),T=b.doc.getTextRange(S);if(T!==""&&E.getWrapBehavioursEnabled())return c(S,T,"(",")");if(f.isSaneInsertion(E,b))return f.recordAutoInsert(E,b,")"),{text:"()",selection:[1,1]}}else if(g==")"){s(E);var k=E.getCursorPosition(),_=b.doc.getLine(k.row),R=_.substring(k.column,k.column+1);if(R==")"){var x=b.$findOpeningBracket(")",{column:k.column+1,row:k.row});if(x!==null&&f.isAutoInsertedClosing(k,_,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,D,E,b,g){var S=b.doc.getTextRange(g);if(!g.isMultiLine()&&S=="("){s(E);var T=b.doc.getLine(g.start.row),k=T.substring(g.start.column+1,g.start.column+2);if(k==")")return g.end.column++,g}}),this.add("brackets","insertion",function(y,D,E,b,g){if(g=="["){s(E);var S=E.getSelectionRange(),T=b.doc.getTextRange(S);if(T!==""&&E.getWrapBehavioursEnabled())return c(S,T,"[","]");if(f.isSaneInsertion(E,b))return f.recordAutoInsert(E,b,"]"),{text:"[]",selection:[1,1]}}else if(g=="]"){s(E);var k=E.getCursorPosition(),_=b.doc.getLine(k.row),R=_.substring(k.column,k.column+1);if(R=="]"){var x=b.$findOpeningBracket("]",{column:k.column+1,row:k.row});if(x!==null&&f.isAutoInsertedClosing(k,_,g))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,D,E,b,g){var S=b.doc.getTextRange(g);if(!g.isMultiLine()&&S=="["){s(E);var T=b.doc.getLine(g.start.row),k=T.substring(g.start.column+1,g.start.column+2);if(k=="]")return g.end.column++,g}}),this.add("string_dquotes","insertion",function(y,D,E,b,g){var S=b.$mode.$quotes||l;if(g.length==1&&S[g]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(g)!=-1)return;s(E);var T=g,k=E.getSelectionRange(),_=b.doc.getTextRange(k);if(_!==""&&(_.length!=1||!S[_])&&E.getWrapBehavioursEnabled())return c(k,_,T,T);if(!_){var R=E.getCursorPosition(),x=b.doc.getLine(R.row),A=x.substring(R.column-1,R.column),C=x.substring(R.column,R.column+1),w=b.getTokenAt(R.row,R.column),$=b.getTokenAt(R.row,R.column+1);if(A=="\\"&&w&&/escape/.test(w.type))return null;var I=w&&/string|escape/.test(w.type),F=!$||/string|escape/.test($.type),O;if(C==T)O=I!==F,O&&/string\.end/.test($.type)&&(O=!1);else{if(I&&!F||I&&F)return null;var B=b.$mode.tokenRe;B.lastIndex=0;var P=B.test(A);B.lastIndex=0;var V=B.test(C),W=b.$mode.$pairQuotesAfter,H=W&&W[T]&&W[T].test(A);if(!H&&P||V||C&&!/[\s;,.})\]\\]/.test(C))return null;var U=x[R.column-2];if(A==T&&(U==T||B.test(U)))return null;O=!0}return{text:O?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,D,E,b,g){var S=b.$mode.$quotes||l,T=b.doc.getTextRange(g);if(!g.isMultiLine()&&S.hasOwnProperty(T)){s(E);var k=b.doc.getLine(g.start.row),_=k.substring(g.start.column+1,g.start.column+2);if(_==T)return g.end.column++,g}}),m.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,D,E,b,g){if(y==="doc-start"&&(g===` +`||g===`\r +`)&&E.selection.isEmpty()){var S=E.getCursorPosition();if(S.column===0)return;for(var T=b.doc.getLine(S.row),k=b.doc.getLine(S.row+1),_=b.getTokens(S.row),R=0,x=0;x<_.length;x++){R+=_[x].value.length;var A=_[x];if(R>=S.column){if(R===S.column){if(!/\.doc/.test(A.type))return;if(/\*\//.test(A.value)){var C=_[x+1];if(!C||!/\.doc/.test(C.type))return}}var w=S.column-(R-A.value.length),$=A.value.indexOf("*/"),I=A.value.indexOf("/**",$>-1?$+2:0);if(I!==-1&&w>I&&w=$&&w<=I||!/\.doc/.test(A.type))return;break}}var F=this.$getIndent(T);if(/\s*\*/.test(k))return/^\s*\*/.test(T)?{text:g+F+"* ",selection:[1,2+F.length,1,2+F.length]}:{text:g+F+" * ",selection:[1,3+F.length,1,3+F.length]};if(/\/\*\*/.test(T.substring(0,S.column)))return{text:g+F+" * "+g+" "+F+"*/",selection:[1,4+F.length,1,4+F.length]}}})},f.isSaneInsertion=function(m,y){var D=m.getCursorPosition(),E=new d(y,D.row,D.column);if(!this.$matchTokenType(E.getCurrentToken()||"text",p)){if(/[)}\]]/.test(m.session.getLine(D.row)[D.column]))return!0;var b=new d(y,D.row,D.column+1);if(!this.$matchTokenType(b.getCurrentToken()||"text",p))return!1}return E.stepForward(),E.getCurrentTokenRow()!==D.row||this.$matchTokenType(E.getCurrentToken()||"text",e)},f.$matchTokenType=function(m,y){return y.indexOf(m.type||m)>-1},f.recordAutoInsert=function(m,y,D){var E=m.getCursorPosition(),b=y.doc.getLine(E.row);this.isAutoInsertedClosing(E,b,t.autoInsertedLineEnd[0])||(t.autoInsertedBrackets=0),t.autoInsertedRow=E.row,t.autoInsertedLineEnd=D+b.substr(E.column),t.autoInsertedBrackets++},f.recordMaybeInsert=function(m,y,D){var E=m.getCursorPosition(),b=y.doc.getLine(E.row);this.isMaybeInsertedClosing(E,b)||(t.maybeInsertedBrackets=0),t.maybeInsertedRow=E.row,t.maybeInsertedLineStart=b.substr(0,E.column)+D,t.maybeInsertedLineEnd=b.substr(E.column),t.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(m,y,D){return t.autoInsertedBrackets>0&&m.row===t.autoInsertedRow&&D===t.autoInsertedLineEnd[0]&&y.substr(m.column)===t.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(m,y){return t.maybeInsertedBrackets>0&&m.row===t.maybeInsertedRow&&y.substr(m.column)===t.maybeInsertedLineEnd&&y.substr(0,m.column)==t.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){t.autoInsertedLineEnd=t.autoInsertedLineEnd.substr(1),t.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){t&&(t.maybeInsertedBrackets=0,t.maybeInsertedRow=-1)},a.inherits(f,h),u.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(n,u,v){for(var a=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],h=0,d=[],o=0;o2?U%g!=g-1:U%g==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,k=this.blockComment.end,_=new RegExp("^(\\s*)(?:"+e.escapeRegExp(T)+")"),R=new RegExp("(?:"+e.escapeRegExp(k)+")\\s*$"),x=function(O,B){C(O,B)||(!D||/\S/.test(O))&&(y.insertInLine({row:B,column:O.length},k),y.insertInLine({row:B,column:b},T))},A=function(O,B){var P;(P=O.match(R))&&y.removeInLine(B,O.length-P[0].length,O.length),(P=O.match(_))&&y.removeInLine(B,P[1].length,P[0].length)},C=function(O,B){if(_.test(O))return!0;for(var P=c.getTokens(B),V=0;VO.length&&(F=O.length)}),b==1/0&&(b=F,D=!1,E=!1),S&&b%g!=0&&(b=Math.floor(b/g)*g),I(E?A:x)},this.toggleBlockComment=function(s,c,f,m){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var D=new t(c,m.row,m.column),E=D.getCurrentToken();c.selection;var b=c.selection.toOrientedRange(),g,S;if(E&&/comment/.test(E.type)){for(var T,k;E&&/comment/.test(E.type);){var _=E.value.indexOf(y.start);if(_!=-1){var R=D.getCurrentTokenRow(),x=D.getCurrentTokenColumn()+_;T=new r(R,x,R,x+y.start.length);break}E=D.stepBackward()}for(var D=new t(c,m.row,m.column),E=D.getCurrentToken();E&&/comment/.test(E.type);){var _=E.value.indexOf(y.end);if(_!=-1){var R=D.getCurrentTokenRow(),x=D.getCurrentTokenColumn()+_;k=new r(R,x,R,x+y.end.length);break}E=D.stepForward()}k&&c.remove(k),T&&(c.remove(T),g=T.start.row,S=-y.start.length)}else S=y.start.length,g=f.start.row,c.insert(f.end,y.end),c.insert(f.start,y.start);b.start.row==g&&(b.start.column+=S),b.end.row==g&&(b.end.column+=S),c.selection.fromOrientedRange(b)}},this.getNextLineIndent=function(s,c,f){return this.$getIndent(c)},this.checkOutdent=function(s,c,f){return!1},this.autoOutdent=function(s,c,f){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var c in s)if(s[c]){var f=s[c],m=f.prototype.$id,y=a.$modes[m];y||(a.$modes[m]=y=new f),a.$modes[c]||(a.$modes[c]=y),this.$embeds.push(c),this.$modes[c]=y}for(var D=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],E=function(g){(function(S){var T=D[g],k=S[T];S[D[g]]=function(){return this.$delegator(T,arguments,k)}})(b)},b=this,c=0;cp[e].column&&e++,l.unshift(e,0),p.splice.apply(p,l),this.$updateRows()}}},d.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(o){var p=!0;o.forEach(function(e,t){if(e)for(p=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),p&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[o.row];return p&&(o.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},d.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var p=this.editor.renderer;o.html&&!o.el&&(o.el=a.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=a.createElement("div"),o.el.textContent=o.text),o.el&&(a.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&a.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex="5",p.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex="3"),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/p.layerConfig.lineHeight);var e=this.session.getFoldAt(o.row,0);if(o.$fold=e,e){var t=this.session.lineWidgets;o.row==e.end.row&&!t[e.start.row]?t[e.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(o),o},d.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[o.row];if(p==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;p;){if(p.$oldWidget==o){p.$oldWidget=o.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(o){for(var p=this.session.lineWidgets,e=p&&p[o],t=[];e;)t.push(e),e=e.$oldWidget;return t},d.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(o,p){var e=this.session._changedWidgets,t=p.layerConfig;if(!(!e||!e.length)){for(var r=1/0,l=0;l0&&!t[r];)r--;this.firstRow=e.firstRow,this.lastRow=e.lastRow,p.$cursorLayer.config=e;for(var s=r;s<=l;s++){var c=t[s];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,p.container.appendChild(c.el));var f=p.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;c.coverLine||(f+=e.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=f-e.offset+"px";var m=c.coverGutter?0:p.gutterWidth;c.fixedWidth||(m-=p.scrollLeft),c.el.style.left=m+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=e.width+2*e.padding+"px"),c.fixedWidth?c.el.style.right=p.scrollBar.getWidth()+"px":c.el.style.right=""}}}},d}();u.LineWidgets=h}),ace.define("ace/apply_delta",["require","exports","module"],function(n,u,v){u.applyDelta=function(a,h,d){var o=h.start.row,p=h.start.column,e=a[o]||"";switch(h.action){case"insert":var t=h.lines;if(t.length===1)a[o]=e.substring(0,p)+h.lines[0]+e.substring(p);else{var r=[o,1].concat(h.lines);a.splice.apply(a,r),a[o]=e.substring(0,p)+a[o],a[o+h.lines.length-1]+=e.substring(p)}break;case"remove":var l=h.end.column,s=h.end.row;o===s?a[o]=e.substring(0,p)+e.substring(l):a.splice(o,s-o+1,e.substring(0,p)+a[s].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,u,v){var a=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,d=function(){function e(t,r,l){this.$onChange=this.onChange.bind(this),this.attach(t),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,l)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row)&&!(t.start.row>this.row)){var r=p(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},e.prototype.setPosition=function(t,r,l){var s;if(l?s={row:t,column:r}:s=this.$clipPositionToDocument(t,r),!(this.row==s.row&&this.column==s.column)){var c={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:c,value:s})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(t,r){var l={};return t>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):t<0?(l.row=0,l.column=0):(l.row=t,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,r))),r<0&&(l.column=0),l},e}();d.prototype.$insertRight=!1,a.implement(d.prototype,h);function o(e,t,r){var l=r?e.column<=t.column:e.column=s&&(r=s-1,l=void 0);var c=this.getLine(r);return l==null&&(l=c.length),l=Math.min(Math.max(l,0),c.length),{row:r,column:l}},t.prototype.clonePos=function(r){return{row:r.row,column:r.column}},t.prototype.pos=function(r,l){return{row:r,column:l}},t.prototype.$clipPosition=function(r){var l=this.getLength();return r.row>=l?(r.row=Math.max(0,l-1),r.column=this.getLine(l-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},t.prototype.insertFullLines=function(r,l){r=Math.min(Math.max(r,0),this.getLength());var s=0;r0,c=l=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},t.prototype.replace=function(r,l){if(r instanceof o||(r=o.fromPoints(r.start,r.end)),l.length===0&&r.isEmpty())return r.start;if(l==this.getTextRange(r))return r.end;this.remove(r);var s;return l?s=this.insert(r.start,l):s=r.start,s},t.prototype.applyDeltas=function(r){for(var l=0;l=0;l--)this.revertDelta(r[l])},t.prototype.applyDelta=function(r,l){var s=r.action=="insert";(s?r.lines.length<=1&&!r.lines[0]:!o.comparePoints(r.start,r.end))||(s&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(h(this.$lines,r,l),this._signal("change",r)))},t.prototype.$safeApplyDelta=function(r){var l=this.$lines.length;(r.action=="remove"&&r.start.row20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=l,s==-1&&(s=l),f<=s&&t.fireUpdateEvent(f,s)}}}return o.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(p,e){var t={first:p,last:e};this._signal("update",{data:t})},o.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(p){var e=p.start.row,t=p.end.row-e;if(t===0)this.lines[e]=null;else if(p.action=="remove")this.lines.splice(e,t+1,null),this.states.splice(e,t+1,null);else{var r=Array(t+1);r.unshift(e,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},o.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},o.prototype.$tokenizeRow=function(p){var e=this.doc.getLine(p),t=this.states[p-1],r=this.tokenizer.getLineTokens(e,t,p);return this.states[p]+""!=r.state+""?(this.states[p]=r.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=r.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o}();a.implement(d.prototype,h),u.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,u,v){var a=n("./lib/lang"),h=n("./range").Range,d=function(){function o(p,e,t){t===void 0&&(t="text"),this.setRegexp(p),this.clazz=e,this.type=t,this.docLen=0}return o.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},o.prototype.update=function(p,e,t,r){if(this.regExp){for(var l=r.firstRow,s=r.lastRow,c={},f=t.$editor.$search,m=f.$isMultilineSearch(t.$editor.getLastSearchOptions()),y=l;y<=s;y++){var D=this.cache[y];if(D==null||t.getValue().length!=this.docLen){if(m){D=[];var E=f.$multiLineForward(t,this.regExp,y,s);if(E){var b=E.endRow<=s?E.endRow-1:s;b>y&&(y=b),D.push(new h(E.startRow,E.startCol,E.endRow,E.endCol))}D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES))}else D=a.getMatchOffsets(t.getLine(y),this.regExp),D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES)),D=D.map(function(k){return new h(y,k.offset,y,k.offset+k.length)});this.cache[y]=D.length?D:""}if(D.length!==0)for(var g=D.length;g--;){var S=D[g].toScreenRange(t),T=S.toString();c[T]||(c[T]=!0,e.drawSingleLineMarker(p,S,this.clazz,r))}}this.docLen=t.getValue().length}},o}();d.prototype.MAX_RANGES=500,u.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,u,v){var a=function(){function b(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return b.prototype.addSession=function(g){this.$session=g},b.prototype.add=function(g,S,T){if(!this.$fromUndo&&g!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var k=this.$undoStack.length;k>this.$undoDepth-1&&this.$undoStack.splice(0,k-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),g.id=this.$rev=++this.$maxRev}(g.action=="remove"||g.action=="insert")&&(this.$lastDelta=g),this.lastDeltas.push(g)}},b.prototype.addSelection=function(g,S){this.selections.push({value:g,rev:S||this.$rev})},b.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},b.prototype.markIgnored=function(g,S){S==null&&(S=this.$rev+1);for(var T=this.$undoStack,k=T.length;k--;){var _=T[k][0];if(_.id<=g)break;_.id0},b.prototype.canRedo=function(){return this.$redoStack.length>0},b.prototype.bookmark=function(g){g==null&&(g=this.$rev),this.mark=g},b.prototype.isAtBookmark=function(){return this.$rev===this.mark},b.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},b.prototype.fromJSON=function(g){this.reset(),this.$undoStack=g.$undoStack,this.$redoStack=g.$redoStack},b.prototype.$prettyPrint=function(g){return g?t(g):t(this.$undoStack)+` +--- +`+t(this.$redoStack)},b}();a.prototype.hasUndo=a.prototype.canUndo,a.prototype.hasRedo=a.prototype.canRedo,a.prototype.isClean=a.prototype.isAtBookmark,a.prototype.markClean=a.prototype.bookmark;function h(b,g){for(var S=g;S--;){var T=b[S];if(T&&!T[0].ignore){for(;S"+b.end.row+":"+b.end.column}function l(b,g){var S=b.action=="insert",T=g.action=="insert";if(S&&T)if(o(g.start,b.end)>=0)f(g,b,-1);else if(o(g.start,b.start)<=0)f(b,g,1);else return null;else if(S&&!T)if(o(g.start,b.end)>=0)f(g,b,-1);else if(o(g.end,b.start)<=0)f(b,g,-1);else return null;else if(!S&&T)if(o(g.start,b.start)>=0)f(g,b,1);else if(o(g.start,b.start)<=0)f(b,g,1);else return null;else if(!S&&!T)if(o(g.start,b.start)>=0)f(g,b,1);else if(o(g.end,b.start)<=0)f(b,g,-1);else return null;return[g,b]}function s(b,g){for(var S=b.length;S--;)for(var T=0;T=0?f(b,g,-1):(o(b.start,g.start)<=0||f(b,d.fromPoints(g.start,b.start),-1),f(g,b,1));else if(!S&&T)o(g.start,b.end)>=0?f(g,b,-1):(o(g.start,b.start)<=0||f(g,d.fromPoints(b.start,g.start),-1),f(b,g,1));else if(!S&&!T)if(o(g.start,b.end)>=0)f(g,b,-1);else if(o(g.end,b.start)<=0)f(b,g,-1);else{var k,_;return o(b.start,g.start)<0&&(k=b,b=y(b,g.start)),o(b.end,g.end)>0&&(_=y(b,g.end)),m(g.end,b.start,b.end,-1),_&&!k&&(b.lines=_.lines,b.start=_.start,b.end=_.end,_=b),[g,k,_].filter(Boolean)}return[g,b]}function f(b,g,S){m(b.start,g.start,g.end,S),m(b.end,g.start,g.end,S)}function m(b,g,S,T){b.row==(T==1?g:S).row&&(b.column+=T*(S.column-g.column)),b.row+=T*(S.row-g.row)}function y(b,g){var S=b.lines,T=b.end;b.end=p(g);var k=b.end.row-b.start.row,_=S.splice(k,S.length),R=k?g.column:g.column-b.start.column;S.push(_[0].substring(0,R)),_[0]=_[0].substr(R);var x={start:p(g),end:T,lines:_,action:b.action};return x}function D(b,g){g=e(g);for(var S=b.length;S--;){for(var T=b[S],k=0;kthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(p,e){return-p.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},d.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},d.prototype.walk=function(o,p,e){var t=0,r=this.folds,l,s,c,f=!0;p==null&&(p=this.end.row,e=this.end.column);for(var m=0;m0)){var f=h(p,s.start);return c===0?e&&f!==0?-l-2:l:f>0||f===0&&!e?l:-l-1}}return-l-1},o.prototype.add=function(p){var e=!p.isEmpty(),t=this.pointIndex(p.start,e);t<0&&(t=-t-1);var r=this.pointIndex(p.end,e,t);return r<0?r=-r-1:r++,this.ranges.splice(t,r-t,p)},o.prototype.addList=function(p){for(var e=[],t=p.length;t--;)e.push.apply(e,this.add(p[t]));return e},o.prototype.substractPoint=function(p){var e=this.pointIndex(p);if(e>=0)return this.ranges.splice(e,1)},o.prototype.merge=function(){var p=[],e=this.ranges;e=e.sort(function(c,f){return h(c.start,f.start)});for(var t=e[0],r,l=1;l=0},o.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},o.prototype.rangeAtPoint=function(p){var e=this.pointIndex(p);if(e>=0)return this.ranges[e]},o.prototype.clipRows=function(p,e){var t=this.ranges;if(t[0].start.row>e||t[t.length-1].start.row=r)break}if(p.action=="insert")for(var y=l-r,D=-e.column+t.column;cr)break;if(m.start.row==r&&m.start.column>=e.column&&(m.start.column==e.column&&this.$bias<=0||(m.start.column+=D,m.start.row+=y)),m.end.row==r&&m.end.column>=e.column){if(m.end.column==e.column&&this.$bias<0)continue;m.end.column==e.column&&D>0&&cm.start.column&&m.end.column==s[c+1].start.column&&(m.end.column-=D),m.end.column+=D,m.end.row+=y}}else for(var y=r-l,D=e.column-t.column;cl)break;m.end.rowe.column)&&(m.end.column=e.column,m.end.row=e.row):(m.end.column+=D,m.end.row+=y):m.end.row>l&&(m.end.row+=y),m.start.rowe.column)&&(m.start.column=e.column,m.start.row=e.row):(m.start.column+=D,m.start.row+=y):m.start.row>l&&(m.start.row+=y)}if(y!=0&&c=t)return c;if(c.end.row>t)return null}return null},this.getNextFoldLine=function(t,r){var l=this.$foldData,s=0;for(r&&(s=l.indexOf(r)),s==-1&&(s=0),s;s=t)return c}return null},this.getFoldedRowCount=function(t,r){for(var l=this.$foldData,s=r-t+1,c=0;c=r){y=t?s-=r-y:s=0);break}else m>=t&&(y>=t?s-=m-y:s-=m-t+1)}return s},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(r,l){return r.start.row-l.start.row}),t},this.addFold=function(t,r){var l=this.$foldData,s=!1,c;t instanceof d?c=t:(c=new d(r,t),c.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(c.range);var f=c.start.row,m=c.start.column,y=c.end.row,D=c.end.column,E=this.getFoldAt(f,m,1),b=this.getFoldAt(y,D,-1);if(E&&b==E)return E.addSubFold(c);E&&!E.range.isStart(f,m)&&this.removeFold(E),b&&!b.range.isEnd(y,D)&&this.removeFold(b);var g=this.getFoldsInRange(c.range);g.length>0&&(this.removeFolds(g),c.collapseChildren||g.forEach(function(_){c.addSubFold(_)}));for(var S=0;S0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(t,r){var l,s;if(t==null)l=new a(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof t=="number")l=new a(t,0,t,this.getLine(t).length);else if("row"in t)l=a.fromPoints(t,t);else{if(Array.isArray(t))return s=[],t.forEach(function(f){s=s.concat(this.unfold(f))},this),s;l=t}s=this.getFoldsInRangeList(l);for(var c=s;s.length==1&&a.comparePoints(s[0].start,l.start)<0&&a.comparePoints(s[0].end,l.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(l);if(r!=!1?this.removeFolds(s):this.expandFolds(s),c.length)return c},this.isRowFolded=function(t,r){return!!this.getFoldLine(t,r)},this.getRowFoldEnd=function(t,r){var l=this.getFoldLine(t,r);return l?l.end.row:t},this.getRowFoldStart=function(t,r){var l=this.getFoldLine(t,r);return l?l.start.row:t},this.getFoldDisplayLine=function(t,r,l,s,c){s==null&&(s=t.start.row),c==null&&(c=0),r==null&&(r=t.end.row),l==null&&(l=this.getLine(r).length);var f=this.doc,m="";return t.walk(function(y,D,E,b){if(!(DE)break;while(c&&m.test(c.type));c=s.stepBackward()}else c=s.getCurrentToken();return y.end.row=s.getCurrentTokenRow(),y.end.column=s.getCurrentTokenColumn(),y.start.row==y.end.row&&y.start.column>y.end.column?void 0:y}},this.foldAll=function(t,r,l,s){l==null&&(l=1e5);var c=this.foldWidgets;if(c){r=r||this.getLength(),t=t||0;for(var f=t;f=t&&(f=m.end.row,m.collapseChildren=l,this.addFold("...",m))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(r){for(var l=t.getTokens(r),s=0;s=0;){var f=l[s];if(f==null&&(f=l[s]=this.getFoldWidget(s)),f=="start"){var m=this.getFoldWidgetRange(s);if(c||(c=m),m&&m.end.row>=t)break}s--}return{range:s!==-1&&m,firstRange:c}},this.onFoldWidgetClick=function(t,r){r instanceof p&&(r=r.domEvent);var l={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},s=this.$toggleFoldWidget(t,l);if(!s){var c=r.target||r.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,r){if(this.getFoldWidget){var l=this.getFoldWidget(t),s=this.getLine(t),c=l==="end"?-1:1,f=this.getFoldAt(t,c===-1?0:s.length,c);if(f)return r.children||r.all?this.removeFold(f):this.expandFold(f),f;var m=this.getFoldWidgetRange(t,!0);if(m&&!m.isMultiLine()&&(f=this.getFoldAt(m.start.row,m.start.column,1),f&&m.isEqual(f.range)))return this.removeFold(f),f;if(r.siblings){var y=this.getParentFoldRangeData(t);if(y.range)var D=y.range.start.row+1,E=y.range.end.row;this.foldAll(D,E,r.all?1e4:0)}else r.children?(E=m?m.end.row:this.getLength(),this.foldAll(t+1,E,r.all?1e4:0)):m&&(r.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(t){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var l=this.$toggleFoldWidget(r,{});if(!l){var s=this.getParentFoldRangeData(r,!0);if(l=s.range||s.firstRange,l){r=l.start.row;var c=this.getFoldAt(r,this.getLine(r).length,1);c?this.removeFold(c):this.addFold("...",l)}}},this.updateFoldWidgets=function(t){var r=t.start.row,l=t.end.row-r;if(l===0)this.foldWidgets[r]=null;else if(t.action=="remove")this.foldWidgets.splice(r,l+1,null);else{var s=Array(l+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(t){var r=t.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}u.Folding=e}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,u,v){var a=n("../token_iterator").TokenIterator,h=n("../range").Range;function d(){this.findMatchingBracket=function(o,p){if(o.column==0)return null;var e=p||this.getLine(o.row).charAt(o.column-1);if(e=="")return null;var t=e.match(/([\(\[\{])|([\)\]\}])/);return t?t[1]?this.$findClosingBracket(t[1],o):this.$findOpeningBracket(t[2],o):null},this.getBracketRange=function(o){var p=this.getLine(o.row),e=!0,t,r=p.charAt(o.column-1),l=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(l||(r=p.charAt(o.column),o={row:o.row,column:o.column+1},l=r&&r.match(/([\(\[\{])|([\)\]\}])/),e=!1),!l)return null;if(l[1]){var s=this.$findClosingBracket(l[1],o);if(!s)return null;t=h.fromPoints(o,s),e||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(l[2],o);if(!s)return null;t=h.fromPoints(s,o),e||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(o,p){var e=this.getLine(o.row),t=/([\(\[\{])|([\)\]\}])/,r=!p&&e.charAt(o.column-1),l=r&&r.match(t);if(l||(r=(p===void 0||p)&&e.charAt(o.column),o={row:o.row,column:o.column+1},l=r&&r.match(t)),!l)return null;var s=new h(o.row,o.column-1,o.row,o.column),c=l[1]?this.$findClosingBracket(l[1],o):this.$findOpeningBracket(l[2],o);if(!c)return[s];var f=new h(c.row,c.column,c.row,c.column+1);return[s,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,p,e){var t=this.$brackets[o],r=1,l=new a(this,p.row,p.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){e||(e=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=p.column-l.getCurrentTokenColumn()-2,f=s.value;;){for(;c>=0;){var m=f.charAt(c);if(m==t){if(r-=1,r==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else m==o&&(r+=1);c-=1}do s=l.stepBackward();while(s&&!e.test(s.type));if(s==null)break;f=s.value,c=f.length-1}return null}},this.$findClosingBracket=function(o,p,e){var t=this.$brackets[o],r=1,l=new a(this,p.row,p.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){e||(e=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=p.column-l.getCurrentTokenColumn();;){for(var f=s.value,m=f.length;c"?t=!0:p.type.indexOf("tag-name")!==-1&&(e=!0));while(p&&!e);return p},this.$findClosingTag=function(o,p){var e,t=p.value,r=p.value,l=0,s=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);p=o.stepForward();var c=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p.value.length),f=!1;do{if(e=p,e.type.indexOf("tag-close")!==-1&&!f){var m=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);f=!0}if(p=o.stepForward(),p){if(p.value===">"&&!f){var m=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);f=!0}if(p.type.indexOf("tag-name")!==-1){if(t=p.value,r===t){if(e.value==="<")l++;else if(e.value==="")var E=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(r===t&&p.value==="/>"&&(l--,l<0))var y=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),D=y,E=D,m=new h(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(p&&l>=0);if(s&&m&&y&&E&&c&&D)return{openTag:new h(s.start.row,s.start.column,m.end.row,m.end.column),closeTag:new h(y.start.row,y.start.column,E.end.row,E.end.column),openTagName:c,closeTagName:D}},this.$findOpeningTag=function(o,p){var e=o.getCurrentToken(),t=p.value,r=0,l=o.getCurrentTokenRow(),s=o.getCurrentTokenColumn(),c=s+2,f=new h(l,s,l,c);o.stepForward();var m=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=o.stepForward()),!(!p||p.value!==">")){var y=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(p=e,l=o.getCurrentTokenRow(),s=o.getCurrentTokenColumn(),c=s+p.value.length,e=o.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(t===p.value)if(e.value==="<"){if(r++,r>0){var D=new h(l,s,l,c),E=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do p=o.stepForward();while(p&&p.value!==">");var b=new h(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else e.value===""){for(var g=0,S=e;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===t){r--;break}else if(S.value==="<")break;S=o.stepBackward(),g++}for(var T=0;Tw&&(this.$docRowCache.splice(w,C),this.$screenRowCache.splice(w,C))},x.prototype.$getRowCacheIndex=function(A,C){for(var w=0,$=A.length-1;w<=$;){var I=w+$>>1,F=A[I];if(C>F)w=I+1;else if(C=C));F++);return $=w[F],$?($.index=F,$.start=I-$.value.length,$):null},x.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var C=this;A.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=h.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},x.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},x.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},x.prototype.getTabString=function(){return this.getUseSoftTabs()?h.stringRepeat(" ",this.getTabSize()):" "},x.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},x.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},x.prototype.setTabSize=function(A){this.setOption("tabSize",A)},x.prototype.getTabSize=function(){return this.$tabSize},x.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},x.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},x.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},x.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},x.prototype.getOverwrite=function(){return this.$overwrite},x.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},x.prototype.addGutterDecoration=function(A,C){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+C,this._signal("changeBreakpoint",{})},x.prototype.removeGutterCustomWidget=function(A){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(A)},x.prototype.addGutterCustomWidget=function(A,C){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(A,C)},x.prototype.removeGutterDecoration=function(A,C){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},x.prototype.getBreakpoints=function(){return this.$breakpoints},x.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var C=0;C0&&($=!!w.charAt(C-1).match(this.tokenRe)),$||($=!!w.charAt(C).match(this.tokenRe)),$)var I=this.tokenRe;else if(/^\s+$/.test(w.slice(C-1,C+1)))var I=/\s/;else var I=this.nonTokenRe;var F=C;if(F>0){do F--;while(F>=0&&w.charAt(F).match(I));F++}for(var O=C;OA&&(A=C.screenWidth)}),this.lineWidgetWidth=A},x.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),w=this.$rowLengthCache,$=0,I=0,F=this.$foldData[I],O=F?F.start.row:1/0,B=C.length,P=0;PO){if(P=F.end.row+1,P>=B)break;F=this.$foldData[I++],O=F?F.start.row:1/0}w[P]==null&&(w[P]=this.$getStringScreenWidth(C[P])[0]),w[P]>$&&($=w[P])}this.screenWidth=$}},x.prototype.getLine=function(A){return this.doc.getLine(A)},x.prototype.getLines=function(A,C){return this.doc.getLines(A,C)},x.prototype.getLength=function(){return this.doc.getLength()},x.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},x.prototype.insert=function(A,C){return this.doc.insert(A,C)},x.prototype.remove=function(A){return this.doc.remove(A)},x.prototype.removeFullLines=function(A,C){return this.doc.removeFullLines(A,C)},x.prototype.undoChanges=function(A,C){if(A.length){this.$fromUndo=!0;for(var w=A.length-1;w!=-1;w--){var $=A[w];$.action=="insert"||$.action=="remove"?this.doc.revertDelta($):$.folds&&this.addFolds($.folds)}!C&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},x.prototype.redoChanges=function(A,C){if(A.length){this.$fromUndo=!0;for(var w=0;wA.end.column&&(F.start.column+=B),F.end.row==A.end.row&&F.end.column>A.end.column&&(F.end.column+=B)),O&&F.start.row>=A.end.row&&(F.start.row+=O,F.end.row+=O)}if(F.end=this.insert(F.start,$),I.length){var P=A.start,V=F.start,O=V.row-P.row,B=V.column-P.column;this.addFolds(I.map(function(U){return U=U.clone(),U.start.row==P.row&&(U.start.column+=B),U.end.row==P.row&&(U.end.column+=B),U.start.row+=O,U.end.row+=O,U}))}return F},x.prototype.indentRows=function(A,C,w){w=w.replace(/\t/g,this.getTabString());for(var $=A;$<=C;$++)this.doc.insertInLine({row:$,column:0},w)},x.prototype.outdentRows=function(A){for(var C=A.collapseRows(),w=new r(0,0,0,0),$=this.getTabSize(),I=C.start.row;I<=C.end.row;++I){var F=this.getLine(I);w.start.row=I,w.end.row=I;for(var O=0;O<$&&F.charAt(O)==" ";++O);O<$&&F.charAt(O)==" "?(w.start.column=O,w.end.column=O+1):(w.start.column=0,w.end.column=O),this.remove(w)}},x.prototype.$moveLines=function(A,C,w){if(A=this.getRowFoldStart(A),C=this.getRowFoldEnd(C),w<0){var $=this.getRowFoldStart(A+w);if($<0)return 0;var I=$-A}else if(w>0){var $=this.getRowFoldEnd(C+w);if($>this.doc.getLength()-1)return 0;var I=$-C}else{A=this.$clipRowToDocument(A),C=this.$clipRowToDocument(C);var I=C-A+1}var F=new r(A,0,C,Number.MAX_VALUE),O=this.getFoldsInRange(F).map(function(P){return P=P.clone(),P.start.row+=I,P.end.row+=I,P}),B=w==0?this.doc.getLines(A,C):this.doc.removeFullLines(A,C);return this.doc.insertFullLines(A+I,B),O.length&&this.addFolds(O),I},x.prototype.moveLinesUp=function(A,C){return this.$moveLines(A,C,-1)},x.prototype.moveLinesDown=function(A,C){return this.$moveLines(A,C,1)},x.prototype.duplicateLines=function(A,C){return this.$moveLines(A,C,0)},x.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},x.prototype.$clipColumnToRow=function(A,C){return C<0?0:Math.min(this.doc.getLine(A).length,C)},x.prototype.$clipPositionToDocument=function(A,C){if(C=Math.max(0,C),A<0)A=0,C=0;else{var w=this.doc.getLength();A>=w?(A=w-1,C=this.doc.getLine(w-1).length):C=Math.min(this.doc.getLine(A).length,C)}return{row:A,column:C}},x.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var C=this.doc.getLength()-1;return A.end.row>C?(A.end.row=C,A.end.column=this.doc.getLine(C).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},x.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},x.prototype.getUseWrapMode=function(){return this.$useWrapMode},x.prototype.setWrapLimitRange=function(A,C){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:A,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},x.prototype.adjustWrapLimit=function(A,C){var w=this.$wrapLimitRange;w.max<0&&(w={min:C,max:C});var $=this.$constrainWrapLimit(A,w.min,w.max);return $!=this.$wrapLimit&&$>1?(this.$wrapLimit=$,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},x.prototype.$constrainWrapLimit=function(A,C,w){return C&&(A=Math.max(C,A)),w&&(A=Math.min(w,A)),A},x.prototype.getWrapLimit=function(){return this.$wrapLimit},x.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},x.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},x.prototype.$updateInternalDataOnChange=function(A){var C=this.$useWrapMode,w=A.action,$=A.start,I=A.end,F=$.row,O=I.row,B=O-F,P=null;if(this.$updating=!0,B!=0)if(w==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(F,B);var V=this.$foldData;P=this.getFoldsInRange(A),this.removeFolds(P);var W=this.getFoldLine(I.row),H=0;if(W){W.addRemoveChars(I.row,I.column,$.column-I.column),W.shiftRow(-B);var U=this.getFoldLine(F);U&&U!==W&&(U.merge(W),W=U),H=V.indexOf(W)+1}for(H;H=I.row&&W.shiftRow(-B)}O=F}else{var G=Array(B);G.unshift(F,0);var Y=C?this.$wrapData:this.$rowLengthCache;Y.splice.apply(Y,G);var V=this.$foldData,W=this.getFoldLine(F),H=0;if(W){var Q=W.range.compareInside($.row,$.column);Q==0?(W=W.split($.row,$.column),W&&(W.shiftRow(B),W.addRemoveChars(O,0,I.column-$.column))):Q==-1&&(W.addRemoveChars(F,0,I.column-$.column),W.shiftRow(B)),H=V.indexOf(W)+1}for(H;H=F&&W.shiftRow(B)}}else{B=Math.abs(A.start.column-A.end.column),w==="remove"&&(P=this.getFoldsInRange(A),this.removeFolds(P),B=-B);var W=this.getFoldLine(F);W&&W.addRemoveChars(F,$.column,B)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(F,O):this.$updateRowLengthCache(F,O),P},x.prototype.$updateRowLengthCache=function(A,C){this.$rowLengthCache[A]=null,this.$rowLengthCache[C]=null},x.prototype.$updateWrapData=function(A,C){var w=this.doc.getAllLines(),$=this.getTabSize(),I=this.$wrapData,F=this.$wrapLimit,O,B,P=A;for(C=Math.min(C,w.length-1);P<=C;)B=this.getFoldLine(P,B),B?(O=[],B.walk(function(V,W,H,U){var G;if(V!=null){G=this.$getDisplayTokens(V,O.length),G[0]=b;for(var Y=1;YC-U;){var G=F+C-U;if(A[G-1]>=T&&A[G]>=T){H(G);continue}if(A[G]==b||A[G]==g){for(G;G!=F-1&&A[G]!=b;G--);if(G>F){H(G);continue}for(G=F+C,G;G>2)),F-1);G>Y&&A[G]Y&&A[G]Y&&A[G]==S;)G--}else for(;G>Y&&A[G]Y){H(++G);continue}G=F+C,A[G]==E&&G--,H(G-U)}return $},x.prototype.$getDisplayTokens=function(A,C){var w=[],$;C=C||0;for(var I=0;I39&&F<48||F>57&&F<64?w.push(S):F>=4352&&R(F)?w.push(D,E):w.push(D)}return w},x.prototype.$getStringScreenWidth=function(A,C,w){if(C==0)return[0,0];C==null&&(C=1/0),w=w||0;var $,I;for(I=0;I=4352&&R($)?w+=2:w+=1,!(w>C));I++);return[w,I]},x.prototype.getRowLength=function(A){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?C:this.$wrapData[A].length+C},x.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},x.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var C=this.screenToDocumentPosition(A,Number.MAX_VALUE),w=this.$wrapData[C.row];return w.length&&w[0]=0)var B=V[W],I=this.$docRowCache[W],U=A>V[H-1];else var U=!H;for(var G=this.getLength()-1,Y=this.getNextFoldLine(I),Q=Y?Y.start.row:1/0;B<=A&&(P=this.getRowLength(I),!(B+P>A||I>=G));)B+=P,I++,I>Q&&(I=Y.end.row+1,Y=this.getNextFoldLine(I,Y),Q=Y?Y.start.row:1/0),U&&(this.$docRowCache.push(I),this.$screenRowCache.push(B));if(Y&&Y.start.row<=I)$=this.getFoldDisplayLine(Y),I=Y.start.row;else{if(B+P<=A||I>G)return{row:G,column:this.getLine(G).length};$=this.getLine(I),Y=null}var ee=0,ne=Math.floor(A-B);if(this.$useWrapMode){var se=this.$wrapData[I];se&&(O=se[ne],ne>0&&se.length&&(ee=se.indent,F=se[ne-1]||se[se.length-1],$=$.substring(F)))}return w!==void 0&&this.$bidiHandler.isBidiRow(B+ne,I,ne)&&(C=this.$bidiHandler.offsetToCol(w)),F+=this.$getStringScreenWidth($,C-ee)[1],this.$useWrapMode&&F>=O&&(F=O-1),Y?Y.idxToPosition(F):{row:I,column:F}},x.prototype.documentToScreenPosition=function(A,C){if(typeof C>"u")var w=this.$clipPositionToDocument(A.row,A.column);else w=this.$clipPositionToDocument(A,C);A=w.row,C=w.column;var $=0,I=null,F=null;F=this.getFoldAt(A,C,1),F&&(A=F.start.row,C=F.start.column);var O,B=0,P=this.$docRowCache,V=this.$getRowCacheIndex(P,A),W=P.length;if(W&&V>=0)var B=P[V],$=this.$screenRowCache[V],H=A>P[W-1];else var H=!W;for(var U=this.getNextFoldLine(B),G=U?U.start.row:1/0;B=G){if(O=U.end.row+1,O>A)break;U=this.getNextFoldLine(O,U),G=U?U.start.row:1/0}else O=B+1;$+=this.getRowLength(B),B=O,H&&(this.$docRowCache.push(B),this.$screenRowCache.push($))}var Y="";U&&B>=G?(Y=this.getFoldDisplayLine(U,A,C),I=U.start.row):(Y=this.getLine(A).substring(0,C),I=A);var Q=0;if(this.$useWrapMode){var ee=this.$wrapData[I];if(ee){for(var ne=0;Y.length>=ee[ne];)$++,ne++;Y=Y.substring(ee[ne-1]||0,Y.length),Q=ne>0?ee.indent:0}}return this.lineWidgets&&this.lineWidgets[B]&&this.lineWidgets[B].rowsAbove&&($+=this.lineWidgets[B].rowsAbove),{row:$,column:Q+this.$getStringScreenWidth(Y)[0]}},x.prototype.documentToScreenColumn=function(A,C){return this.documentToScreenPosition(A,C).column},x.prototype.documentToScreenRow=function(A,C){return this.documentToScreenPosition(A,C).row},x.prototype.getScreenLength=function(){var A=0,C=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,F=0,$=0,C=this.$foldData[$++],O=C?C.start.row:1/0;FO&&(F=C.end.row+1,C=this.$foldData[$++],O=C?C.start.row:1/0)}else{A=this.getLength();for(var w=this.$foldData,$=0;$w));F++);return[$,F]})},x.prototype.getPrecedingCharacter=function(){var A=this.selection.getCursor();if(A.column===0)return A.row===0?"":this.doc.getNewLineCharacter();var C=this.getLine(A.row);return C[A.column-1]},x.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},x}();y.$uid=0,y.prototype.$modes=o.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=R,a.implement(y.prototype,p);var D=1,E=2,b=3,g=4,S=9,T=10,k=11,_=12;function R(x){return x<4352?!1:x>=4352&&x<=4447||x>=4515&&x<=4519||x>=4602&&x<=4607||x>=9001&&x<=9002||x>=11904&&x<=11929||x>=11931&&x<=12019||x>=12032&&x<=12245||x>=12272&&x<=12283||x>=12288&&x<=12350||x>=12353&&x<=12438||x>=12441&&x<=12543||x>=12549&&x<=12589||x>=12593&&x<=12686||x>=12688&&x<=12730||x>=12736&&x<=12771||x>=12784&&x<=12830||x>=12832&&x<=12871||x>=12880&&x<=13054||x>=13056&&x<=19903||x>=19968&&x<=42124||x>=42128&&x<=42182||x>=43360&&x<=43388||x>=44032&&x<=55203||x>=55216&&x<=55238||x>=55243&&x<=55291||x>=63744&&x<=64255||x>=65040&&x<=65049||x>=65072&&x<=65106||x>=65108&&x<=65126||x>=65128&&x<=65131||x>=65281&&x<=65376||x>=65504&&x<=65510}n("./edit_session/folding").Folding.call(y.prototype),n("./edit_session/bracket_match").BracketMatch.call(y.prototype),o.defineOptions(y.prototype,"session",{wrap:{set:function(x){if(!x||x=="off"?x=!1:x=="free"?x=!0:x=="printMargin"?x=-1:typeof x=="string"&&(x=parseInt(x,10)||!1),this.$wrap!=x)if(this.$wrap=x,!x)this.setUseWrapMode(!1);else{var A=typeof x=="number"?x:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(x){x=x=="auto"?this.$mode.type!="text":x!="text",x!=this.$wrapAsCode&&(this.$wrapAsCode=x,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(x){this.$useWorker=x,this.$stopWorker(),x&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(x){x=parseInt(x),x>0&&this.$tabSize!==x&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=x,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(x){this.setFoldStyle(x)},handlesSet:!0},overwrite:{set:function(x){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(x){this.doc.setNewLineMode(x)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(x){this.setMode(x)},get:function(){return this.$modeId},handlesSet:!0}}),u.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,u,v){var a=n("./lib/lang"),h=n("./lib/oop"),d=n("./range").Range,o=function(){function r(){this.$options={}}return r.prototype.set=function(l){return h.mixin(this.$options,l),this},r.prototype.getOptions=function(){return a.copyObject(this.$options)},r.prototype.setOptions=function(l){this.$options=l},r.prototype.find=function(l){var s=this.$options,c=this.$matchIterator(l,s);if(!c)return!1;var f=null;return c.forEach(function(m,y,D,E){return f=new d(m,y,D,E),y==E&&s.start&&s.start.start&&s.skipCurrent!=!1&&f.isEqual(s.start)?(f=null,!1):!0}),f},r.prototype.findAll=function(l){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var c=s.range,f=c?l.getLines(c.start.row,c.end.row):l.doc.getAllLines(),m=[],y=s.re;if(s.$isMultiLine){var D=y.length,E=f.length-D,b;e:for(var g=y.offset||0;g<=E;g++){for(var S=0;S_||(m.push(b=new d(g,_,g+D-1,R)),D>2&&(g=g+D-2))}}else for(var x,A=0;AA&&(A=w),m.push(new d(x.startRow,x.startCol,x.endRow,x.endCol))}}else{x=a.getMatchOffsets(f[A],y);for(var S=0;SF&&m[S].end.row==O;)S--;for(m=m.slice(A,S+1),A=0,S=m.length;A=m){c+="\\";break}var D=l.charCodeAt(f);switch(D){case s.Backslash:c+="\\";break;case s.n:c+=` +`;break;case s.t:c+=" ";break}continue}if(y===s.DollarSign){if(f++,f>=m){c+="$";break}var E=l.charCodeAt(f);if(E===s.DollarSign){c+="$$";continue}if(E===s.Digit0||E===s.Ampersand){c+="$&";continue}if(s.Digit1<=E&&E<=s.Digit9){c+="$"+l[f];continue}}c+=l[f]}return c||l},r.prototype.replace=function(l,s){var c=this.$options,f=this.$assembleRegExp(c);if(c.$isMultiLine)return s;if(f){var m=this.$isMultilineSearch(c);m&&(l=l.replace(/\r\n|\r|\n/g,` +`));var y=f.exec(l);if(!y||!m&&y[0].length!=l.length)return null;if(s=c.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=l.replace(f,s),c.preserveCase){s=s.split("");for(var D=Math.min(l.length,l.length);D--;){var E=l[D];E&&E.toLowerCase()!=E?s[D]=s[D].toUpperCase():s[D]=s[D].toLowerCase()}s=s.join("")}return s}},r.prototype.$assembleRegExp=function(l,s){if(l.needle instanceof RegExp)return l.re=l.needle;var c=l.needle;if(!l.needle)return l.re=!1;l.regExp||(c=a.escapeRegExp(c));var f=l.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),l.$supportsUnicodeFlag=!0,f+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(c=p(c,l)),l.$isMultiLine=!s&&/[\n\r]/.test(c),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(c,f);try{var m=new RegExp(c,f)}catch{m=!1}return l.re=m},r.prototype.$assembleMultilineRegExp=function(l,s){for(var c=l.replace(/\r\n|\r|\n/g,`$ +^`).split(` +`),f=[],m=0;mf);E++){var b=l.getLine(D++);m=m==null?b:m+` +`+b}var g=s.exec(m);if(s.lastIndex=0,g){var S=m.slice(0,g.index).split(` +`),T=g[0].split(` +`),k=c+S.length-1,_=S[S.length-1].length,R=k+T.length-1,x=T.length==1?_+T[0].length:T[T.length-1].length;return{startRow:k,startCol:_,endRow:R,endCol:x}}}return null},r.prototype.$multiLineBackward=function(l,s,c,f,m){for(var y,D=t(l,f),E=l.getLine(f).length-c,b=f;b>=m;){for(var g=0;g=m;g++){var S=l.getLine(b--);y=y==null?S:S+` +`+y}var T=e(y,s,E);if(T){var k=y.slice(0,T.index).split(` +`),_=T[0].split(` +`),R=b+k.length,x=k[k.length-1].length,A=R+_.length-1,C=_.length==1?x+_[0].length:_[_.length-1].length;return{startRow:R,startCol:x,endRow:A,endCol:C}}}return null},r.prototype.$matchIterator=function(l,s){var c=this.$assembleRegExp(s);if(!c)return!1;var f=this.$isMultilineSearch(s),m=this.$multiLineForward,y=this.$multiLineBackward,D=s.backwards==!0,E=s.skipCurrent!=!1,b=c.unicode,g=s.range,S=s.start;S||(S=g?g[D?"end":"start"]:l.selection.getRange()),S.start&&(S=S[E!=D?"end":"start"]);var T=g?g.start.row:0,k=g?g.end.row:l.getLength()-1;if(D)var _=function(A){var C=S.row;if(!x(C,S.column,A)){for(C--;C>=T;C--)if(x(C,Number.MAX_VALUE,A))return;if(s.wrap!=!1){for(C=k,T=S.row;C>=T;C--)if(x(C,Number.MAX_VALUE,A))return}}};else var _=function(C){var w=S.row;if(!x(w,S.column,C)){for(w=w+1;w<=k;w++)if(x(w,0,C))return;if(s.wrap!=!1){for(w=T,k=S.row;w<=k;w++)if(x(w,0,C))return}}};if(s.$isMultiLine)var R=c.length,x=function(A,C,w){var $=D?A-R+1:A;if(!($<0||$+R>l.getLength())){var I=l.getLine($),F=I.search(c[0]);if(!(!D&&FC)&&w($,F,$+R-1,B))return!0}}};else if(D)var x=function(C,w,$){if(f){var I=y(l,c,w,C,T);if(!I)return!1;if($(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else{var F=l.getLine(C),O=[],B,P=0;for(c.lastIndex=0;B=c.exec(F);){var V=B[0].length;if(P=B.index,!V){if(P>=F.length)break;c.lastIndex=P+=a.skipEmptyMatch(F,P,b)}if(B.index+V>w)break;O.push(B.index,V)}for(var W=O.length-1;W>=0;W-=2){var H=O[W-1],V=O[W];if($(C,H,C,H+V))return!0}}};else var x=function(C,w,$){if(c.lastIndex=w,f){var I=m(l,c,C,k);if(I){var F=I.endRow<=k?I.endRow-1:k;F>C&&(C=F)}if(!I)return!1;if($(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else for(var O=l.getLine(C),B,P;P=c.exec(O);){var V=P[0].length;if(B=P.index,$(C,B,C,B+V))return!0;if(!V&&(c.lastIndex=B+=a.skipEmptyMatch(O,B,b),B>=O.length))return!1}};return{forEach:_}},r}();function p(r,l){var s=a.supportsLookbehind();function c(D,E){E===void 0&&(E=!0);var b=s&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(D)||l.regExp?s&&l.$supportsUnicodeFlag?E?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(r),m=f[0],y=f[f.length-1];return c(m)+r+c(y,!1)}function e(r,l,s){for(var c=null,f=0;f<=r.length;){l.lastIndex=f;var m=l.exec(r);if(!m)break;var y=m.index+m[0].length;if(y>r.length-s)break;(!c||y>c.index+c[0].length)&&(c=m),f=m.index+1}return c}function t(r,l){var s=5e3,c={row:l,column:0},f=r.doc.positionToIndex(c),m=f+s,y=r.doc.indexToPosition(m),D=y.row;return D+1}u.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,u,v){var a=this&&this.__extends||function(){var r=function(l,s){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])},r(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");r(l,s);function c(){this.constructor=l}l.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}}(),h=n("../lib/keys"),d=n("../lib/useragent"),o=h.KEY_MODS,p=function(){function r(l,s){this.$init(l,s,!1)}return r.prototype.$init=function(l,s,c){this.platform=s||(d.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=c},r.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},r.prototype.removeCommand=function(l,s){var c=l&&(typeof l=="string"?l:l.name);l=this.commands[c],s||delete this.commands[c];var f=this.commandKeyBinding;for(var m in f){var y=f[m];if(y==l)delete f[m];else if(Array.isArray(y)){var D=y.indexOf(l);D!=-1&&(y.splice(D,1),y.length==1&&(f[m]=y[0]))}}},r.prototype.bindKey=function(l,s,c){if(typeof l=="object"&&l&&(c==null&&(c=l.position),l=l[this.platform]),!!l){if(typeof s=="function")return this.addCommand({exec:s,bindKey:l,name:s.name||l});l.split("|").forEach(function(f){var m="";if(f.indexOf(" ")!=-1){var y=f.split(/\s+/);f=y.pop(),y.forEach(function(b){var g=this.parseKeys(b),S=o[g.hashId]+g.key;m+=(m?" ":"")+S,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var D=this.parseKeys(f),E=o[D.hashId]+D.key;this._addCommandToBinding(m+E,s,c)},this)}},r.prototype._addCommandToBinding=function(l,s,c){var f=this.commandKeyBinding,m;if(!s)delete f[l];else if(!f[l]||this.$singleCommand)f[l]=s;else{Array.isArray(f[l])?(m=f[l].indexOf(s))!=-1&&f[l].splice(m,1):f[l]=[f[l]],typeof c!="number"&&(c=e(s));var y=f[l];for(m=0;mc)break}y.splice(m,0,s)}},r.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(s){var c=l[s];if(c){if(typeof c=="string")return this.bindKey(c,s);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=s),this.addCommand(c))}},this)},r.prototype.removeCommands=function(l){Object.keys(l).forEach(function(s){this.removeCommand(l[s])},this)},r.prototype.bindKeys=function(l){Object.keys(l).forEach(function(s){this.bindKey(s,l[s])},this)},r.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},r.prototype.parseKeys=function(l){var s=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),c=s.pop(),f=h[c];if(h.FUNCTION_KEYS[f])c=h.FUNCTION_KEYS[f].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var m=0,y=s.length;y--;){var D=h.KEY_MODS[s[y]];if(D==null)return typeof console<"u"&&console.error("invalid modifier "+s[y]+" in "+l),!1;m|=D}return{key:c,hashId:m}},r.prototype.findKeyCommand=function(l,s){var c=o[l]+s;return this.commandKeyBinding[c]},r.prototype.handleKeyboard=function(l,s,c,f){if(!(f<0)){var m=o[s]+c,y=this.commandKeyBinding[m];return l.$keyChain&&(l.$keyChain+=" "+m,y=this.commandKeyBinding[l.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||m,{command:"null"}):(l.$keyChain&&((!s||s==4)&&c.length==1?l.$keyChain=l.$keyChain.slice(0,-m.length-1):(s==-1||f>0)&&(l.$keyChain="")),{command:y})}},r.prototype.getStatusText=function(l,s){return s.$keyChain||""},r}();function e(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var t=function(r){a(l,r);function l(s,c){var f=r.call(this,s,c)||this;return f.$singleCommand=!0,f}return l}(p);t.call=function(r,l,s){p.prototype.$init.call(r,l,s,!0)},p.call=function(r,l,s){p.prototype.$init.call(r,l,s,!1)},u.HashHandler=t,u.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,u,v){var a=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,s){l.__proto__=s}||function(l,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[c]=s[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function l(){this.constructor=t}t.prototype=r===null?Object.create(r):(l.prototype=r.prototype,new l)}}(),h=n("../lib/oop"),d=n("../keyboard/hash_handler").MultiHashHandler,o=n("../lib/event_emitter").EventEmitter,p=function(e){a(t,e);function t(r,l){var s=e.call(this,l,r)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),s}return t.prototype.exec=function(r,l,s){if(Array.isArray(r)){for(var c=r.length;c--;)if(this.exec(r[c],l,s))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var f={editor:l,command:r,args:s};return this.canExecute(r,l)?(f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1):(this._signal("commandUnavailable",f),!1)},t.prototype.canExecute=function(r,l){return typeof r=="string"&&(r=this.commands[r]),!(!r||l&&l.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(l))},t.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(l){this.macro.push([l.command,l.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,r):this.exec(l[0],r,l[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(r){return r.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},t}(d);h.implement(p.prototype,o),u.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,u,v){var a=n("../lib/lang"),h=n("../config"),d=n("../range").Range;function o(e,t){return{win:e,mac:t}}u.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){h.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(e){h.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){h.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(e,t){typeof t=="number"&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){h.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),r=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",r),r.isEmpty()||e.session.remove(r),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){h.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(e){if(e.selection.isEmpty())e.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(a.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(e){for(var t=e.selection.isBackwards(),r=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),l=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(r.row).length,c=e.session.doc.getTextRange(e.selection.getRange()),f=c.replace(/\n\s*/," ").length,m=e.session.doc.getLine(r.row),y=r.row+1;y<=l.row+1;y++){var D=a.stringTrimLeft(a.stringTrimRight(e.session.doc.getLine(y)));D.length!==0&&(D=" "+D),m+=D}l.row+10?(e.selection.moveCursorTo(r.row,r.column),e.selection.selectTo(r.row,r.column+f)):(s=e.session.doc.getLine(r.row).length>s?s+1:s,e.selection.moveCursorTo(r.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,r=e.session.doc.getLine(t).length,l=e.selection.rangeList.ranges,s=[];l.length<1&&(l=[e.selection.getRange()]);for(var c=0;c0||e+t=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},p.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},p.prototype.$focusFoldWidget=function(e){if(e!=null){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},p.prototype.$focusCustomWidget=function(e){if(e!=null){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},p.prototype.$focusAnnotation=function(e){if(e!=null){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},p.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},p.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},p.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=C.length&&(C=void 0),{value:C&&C[I++],done:!C}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")},h=n("./lib/oop"),d=n("./lib/dom"),o=n("./lib/lang"),p=n("./lib/useragent"),e=n("./keyboard/textinput").TextInput,t=n("./mouse/mouse_handler").MouseHandler,r=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,s=n("./edit_session").EditSession,c=n("./search").Search,f=n("./range").Range,m=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,D=n("./commands/default_commands").commands,E=n("./config"),b=n("./token_iterator").TokenIterator,g=n("./keyboard/gutter_handler").GutterKeyboardHandler,S=n("./config").nls,T=n("./clipboard"),k=n("./lib/keys"),_=n("./lib/event"),R=n("./tooltip").HoverTooltip,x=function(){function C(w,$,I){this.session,this.$toDestroy=[];var F=w.getContainerElement();this.container=F,this.renderer=w,this.id="editor"+ ++C.$uid,this.commands=new y(p.isMac?"mac":"win",D),typeof document=="object"&&(this.textInput=new e(w.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new t(this),new r(this)),this.keyBinding=new l(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(O,B){B._$emitInputEvent.schedule(31)}),this.setSession($||I&&I.session||new s("")),E.resetOptions(this),I&&this.setOptions(I),E._signal("editor",this)}return C.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},C.prototype.startOperation=function(w){this.session.startOperation(w)},C.prototype.endOperation=function(w){this.session.endOperation(w)},C.prototype.onStartOperation=function(w){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,w||(this.previousCommand=null)},C.prototype.onEndOperation=function(w){if(this.curOp&&this.session){if(w&&w.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var $=this.curOp.command,I=$&&$.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var F=this.selection.getRange(),O=this.renderer.layerConfig;(F.start.row>=O.lastRow||F.end.row<=O.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},C.prototype.$historyTracker=function(w){if(this.$mergeUndoDeltas){var $=this.prevOp,I=this.$mergeableCommands,F=$.command&&w.command.name==$.command.name;if(w.command.name=="insertstring"){var O=w.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),F=F&&this.mergeNextCommand&&(!/\s/.test(O)||/\s/.test($.args)),this.mergeNextCommand=!0}else F=F&&I.indexOf(w.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(F=!1),F?this.session.mergeUndoDeltas=!0:I.indexOf(w.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},C.prototype.setKeyboardHandler=function(w,$){if(w&&typeof w=="string"&&w!="ace"){this.$keybindingId=w;var I=this;E.loadModule(["keybinding",w],function(F){I.$keybindingId==w&&I.keyBinding.setKeyboardHandler(F&&F.handler),$&&$()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(w),$&&$()},C.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},C.prototype.setSession=function(w){if(this.session!=w){this.curOp&&this.endOperation(),this.curOp={};var $=this.session;if($){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=w,w?(this.$onDocumentChange=this.onDocumentChange.bind(this),w.on("change",this.$onDocumentChange),this.renderer.setSession(w),this.$onChangeMode=this.onChangeMode.bind(this),w.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),w.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),w.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),w.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),w.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),w.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=w.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(w)),this._signal("changeSession",{session:w,oldSession:$}),this.curOp=null,$&&$._signal("changeEditor",{oldEditor:this}),$&&($.$editor=null),w&&w._signal("changeEditor",{editor:this}),w&&(w.$editor=this),w&&!w.destroyed&&w.bgTokenizer.scheduleStart()}},C.prototype.getSession=function(){return this.session},C.prototype.setValue=function(w,$){return this.session.doc.setValue(w),$?$==1?this.navigateFileEnd():$==-1&&this.navigateFileStart():this.selectAll(),w},C.prototype.getValue=function(){return this.session.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.resize=function(w){this.renderer.onResize(w)},C.prototype.setTheme=function(w,$){this.renderer.setTheme(w,$)},C.prototype.getTheme=function(){return this.renderer.getTheme()},C.prototype.setStyle=function(w){this.renderer.setStyle(w)},C.prototype.unsetStyle=function(w){this.renderer.unsetStyle(w)},C.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},C.prototype.setFontSize=function(w){this.setOption("fontSize",w)},C.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var w=this;this.$highlightPending=!0,setTimeout(function(){w.$highlightPending=!1;var $=w.session;if(!(!$||$.destroyed)){$.$bracketHighlight&&($.$bracketHighlight.markerIds.forEach(function(U){$.removeMarker(U)}),$.$bracketHighlight=null);var I=w.getCursorPosition(),F=w.getKeyboardHandler(),O=F&&F.$getDirectionForHighlight&&F.$getDirectionForHighlight(w),B=$.getMatchingBracketRanges(I,O);if(!B){var P=new b($,I.row,I.column),V=P.getCurrentToken();if(V&&/\b(?:tag-open|tag-name)/.test(V.type)){var W=$.getMatchingTags(I);W&&(B=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!B&&$.$mode.getMatching&&(B=$.$mode.getMatching(w.session)),!B){w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(B)?B.length==1&&(H="ace_error_bracket"):B=[B],B.length==2&&(f.comparePoints(B[0].end,B[1].start)==0?B=[f.fromPoints(B[0].start,B[1].end)]:f.comparePoints(B[0].start,B[1].end)==0&&(B=[f.fromPoints(B[1].start,B[0].end)])),$.$bracketHighlight={ranges:B,markerIds:B.map(function(U){return $.addMarker(U,H,"text")})},w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide()}},50)}},C.prototype.focus=function(){this.textInput.focus()},C.prototype.isFocused=function(){return this.textInput.isFocused()},C.prototype.blur=function(){this.textInput.blur()},C.prototype.onFocus=function(w){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",w))},C.prototype.onBlur=function(w){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",w))},C.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},C.prototype.onDocumentChange=function(w){var $=this.session.$useWrapMode,I=w.start.row==w.end.row?w.end.row:1/0;this.renderer.updateLines(w.start.row,I,$),this._signal("change",w),this.$cursorChange()},C.prototype.onTokenizerUpdate=function(w){var $=w.data;this.renderer.updateLines($.first,$.last)},C.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},C.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},C.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},C.prototype.$updateHighlightActiveLine=function(){var w=this.getSession(),$;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&($=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&($=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&($=!1)),w.$highlightLineMarker&&!$)w.removeMarker(w.$highlightLineMarker.id),w.$highlightLineMarker=null;else if(!w.$highlightLineMarker&&$){var I=new f($.row,$.column,$.row,1/0);I.id=w.addMarker(I,"ace_active-line","screenLine"),w.$highlightLineMarker=I}else $&&(w.$highlightLineMarker.start.row=$.row,w.$highlightLineMarker.end.row=$.row,w.$highlightLineMarker.start.column=$.column,w._signal("changeBackMarker"))},C.prototype.onSelectionChange=function(w){var $=this.session;if($.$selectionMarker&&$.removeMarker($.$selectionMarker),$.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),F=this.getSelectionStyle();$.$selectionMarker=$.addMarker(I,"ace_selection",F)}var O=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(O),this._signal("changeSelection")},C.prototype.$getSelectionHighLightRegexp=function(){var w=this.session,$=this.getSelectionRange();if(!($.isEmpty()||$.isMultiLine())){var I=$.start.column,F=$.end.column,O=w.getLine($.start.row),B=O.substring(I,F);if(!(B.length>5e3||!/[\w\d]/.test(B))){var P=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:B}),V=O.substring(I-1,F+1);if(P.test(V))return P}}},C.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},C.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},C.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},C.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},C.prototype.onChangeMode=function(w){this.renderer.updateText(),this._emit("changeMode",w)},C.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},C.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},C.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},C.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},C.prototype.getCopyText=function(){var w=this.getSelectedText(),$=this.session.doc.getNewLineCharacter(),I=!1;if(!w&&this.$copyWithEmptySelection){I=!0;for(var F=this.selection.getAllRanges(),O=0;OU.search(/\S|$/)){var V=U.substr(O.column).search(/\S|$/);I.doc.removeInLine(O.row,O.column,O.column+V)}}this.clearSelection();var W=O.column,H=I.getState(O.row),U=I.getLine(O.row),G=F.checkOutdent(H,U,w);if(I.insert(O,w),B&&B.selection&&(B.selection.length==2?this.selection.setSelectionRange(new f(O.row,W+B.selection[0],O.row,W+B.selection[1])):this.selection.setSelectionRange(new f(O.row+B.selection[0],B.selection[1],O.row+B.selection[2],B.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(w)){var Y=F.getNextLineIndent(H,U.slice(0,O.column),I.getTabString());I.insert({row:O.row+1,column:0},Y)}G&&F.autoOutdent(H,I,O.row)}},C.prototype.autoIndent=function(){for(var w=this.session,$=w.getMode(),I=this.selection.isEmpty()?[new f(0,0,w.doc.getLength()-1,0)]:this.selection.getAllRanges(),F="",O="",B="",P=w.getTabString(),V=0;V0&&(F=w.getState(U-1),O=w.getLine(U-1),B=$.getNextLineIndent(F,O,P));var G=w.getLine(U),Y=$.$getIndent(G);if(B!==Y){if(Y.length>0){var Q=new f(U,0,U,Y.length);w.remove(Q)}B.length>0&&w.insert({row:U,column:0},B)}$.autoOutdent(F,w,U)}},C.prototype.onTextInput=function(w,$){if(!$)return this.keyBinding.onTextInput(w);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,w,$);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},C.prototype.applyComposition=function(w,$){if($.extendLeft||$.extendRight){var I=this.selection.getRange();I.start.column-=$.extendLeft,I.end.column+=$.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!w&&!I.isEmpty()&&this.remove()}if((w||!this.selection.isEmpty())&&this.insert(w,!0),$.restoreStart||$.restoreEnd){var I=this.selection.getRange();I.start.column-=$.restoreStart,I.end.column-=$.restoreEnd,this.selection.setRange(I)}},C.prototype.onCommandKey=function(w,$,I){return this.keyBinding.onCommandKey(w,$,I)},C.prototype.setOverwrite=function(w){this.session.setOverwrite(w)},C.prototype.getOverwrite=function(){return this.session.getOverwrite()},C.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},C.prototype.setScrollSpeed=function(w){this.setOption("scrollSpeed",w)},C.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},C.prototype.setDragDelay=function(w){this.setOption("dragDelay",w)},C.prototype.getDragDelay=function(){return this.getOption("dragDelay")},C.prototype.setSelectionStyle=function(w){this.setOption("selectionStyle",w)},C.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},C.prototype.setHighlightActiveLine=function(w){this.setOption("highlightActiveLine",w)},C.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},C.prototype.setHighlightGutterLine=function(w){this.setOption("highlightGutterLine",w)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.setHighlightSelectedWord=function(w){this.setOption("highlightSelectedWord",w)},C.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},C.prototype.setAnimatedScroll=function(w){this.renderer.setAnimatedScroll(w)},C.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},C.prototype.setShowInvisibles=function(w){this.renderer.setShowInvisibles(w)},C.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},C.prototype.setDisplayIndentGuides=function(w){this.renderer.setDisplayIndentGuides(w)},C.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},C.prototype.setHighlightIndentGuides=function(w){this.renderer.setHighlightIndentGuides(w)},C.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},C.prototype.setShowPrintMargin=function(w){this.renderer.setShowPrintMargin(w)},C.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},C.prototype.setPrintMarginColumn=function(w){this.renderer.setPrintMarginColumn(w)},C.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},C.prototype.setReadOnly=function(w){this.setOption("readOnly",w)},C.prototype.getReadOnly=function(){return this.getOption("readOnly")},C.prototype.setBehavioursEnabled=function(w){this.setOption("behavioursEnabled",w)},C.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},C.prototype.setWrapBehavioursEnabled=function(w){this.setOption("wrapBehavioursEnabled",w)},C.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},C.prototype.setShowFoldWidgets=function(w){this.setOption("showFoldWidgets",w)},C.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},C.prototype.setFadeFoldWidgets=function(w){this.setOption("fadeFoldWidgets",w)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.remove=function(w){this.selection.isEmpty()&&(w=="left"?this.selection.selectLeft():this.selection.selectRight());var $=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,F=I.getState($.start.row),O=I.getMode().transformAction(F,"deletion",this,I,$);if($.end.column===0){var B=I.getTextRange($);if(B[B.length-1]==` +`){var P=I.getLine($.end.row);/^\s+$/.test(P)&&($.end.column=P.length)}}O&&($=O)}this.session.remove($),this.clearSelection()},C.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var w=this.getSelectionRange();w.start.column==w.end.column&&w.start.row==w.end.row&&(w.end.column=0,w.end.row++),this.session.remove(w),this.clearSelection()},C.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var w=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(w)},C.prototype.setGhostText=function(w,$){this.renderer.setGhostText(w,$)},C.prototype.removeGhostText=function(){this.renderer.removeGhostText()},C.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var w=this.getCursorPosition(),$=w.column;if($!==0){var I=this.session.getLine(w.row),F,O;$V.toLowerCase()?1:0});for(var O=new f(0,0,0,0),F=w.first;F<=w.last;F++){var B=$.getLine(F);O.start.row=F,O.end.row=F,O.end.column=B.length,$.replace(O,I[F-w.first])}},C.prototype.toggleCommentLines=function(){var w=this.session.getState(this.getCursorPosition().row),$=this.$getSelectedRows();this.session.getMode().toggleCommentLines(w,this.session,$.first,$.last)},C.prototype.toggleBlockComment=function(){var w=this.getCursorPosition(),$=this.session.getState(w.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment($,this.session,I,w)},C.prototype.getNumberAt=function(w,$){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var F=this.session.getLine(w);I.lastIndex<$;){var O=I.exec(F);if(O.index<=$&&O.index+O[0].length>=$){var B={value:O[0],start:O.index,end:O.index+O[0].length};return B}}return null},C.prototype.modifyNumber=function(w){var $=this.selection.getCursor().row,I=this.selection.getCursor().column,F=new f($,I-1,$,I),O=this.session.getTextRange(F);if(!isNaN(parseFloat(O))&&isFinite(O)){var B=this.getNumberAt($,I);if(B){var P=B.value.indexOf(".")>=0?B.start+B.value.indexOf(".")+1:B.end,V=B.start+B.value.length-P,W=parseFloat(B.value);W*=Math.pow(10,V),P!==B.end&&I=P&&B<=V&&(I=ge,W.selection.clearSelection(),W.moveCursorTo(w,P+F),W.selection.selectTo(w,V+F)),P=V});for(var H=this.$toggleWordPairs,U,G=0;G=V&&P<=W&&Y.match(/((?:https?|ftp):\/\/[\S]+)/)){H=Y.replace(/[\s:.,'";}\]]+$/,"");break}V=W}}catch(Q){I={error:Q}}finally{try{G&&!G.done&&(F=U.return)&&F.call(U)}finally{if(I)throw I.error}}return H},C.prototype.openLink=function(){var w=this.selection.getCursor(),$=this.findLinkAt(w.row,w.column);return $&&window.open($,"_blank"),$!=null},C.prototype.removeLines=function(){var w=this.$getSelectedRows();this.session.removeFullLines(w.first,w.last),this.clearSelection()},C.prototype.duplicateSelection=function(){var w=this.selection,$=this.session,I=w.getRange(),F=w.isBackwards();if(I.isEmpty()){var O=I.start.row;$.duplicateLines(O,O)}else{var B=F?I.start:I.end,P=$.insert(B,$.getTextRange(I));I.start=B,I.end=P,w.setSelectionRange(I,F)}},C.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},C.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},C.prototype.moveText=function(w,$,I){return this.session.moveText(w,$,I)},C.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},C.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},C.prototype.$moveLines=function(w,$){var I,F,O=this.selection;if(!O.inMultiSelectMode||this.inVirtualSelectionMode){var B=O.toOrientedRange();I=this.$getSelectedRows(B),F=this.session.$moveLines(I.first,I.last,$?0:w),$&&w==-1&&(F=0),B.moveBy(F,0),O.fromOrientedRange(B)}else{var P=O.rangeList.ranges;O.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var V=0,W=0,H=P.length,U=0;UQ+1)break;Q=ee.last}for(U--,V=this.session.$moveLines(Y,Q,$?0:w),$&&w==-1&&(G=U+1);G<=U;)P[G].moveBy(V,0),G++;$||(V=0),W+=V}O.fromOrientedRange(O.ranges[0]),O.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},C.prototype.$getSelectedRows=function(w){return w=(w||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(w.start.row),last:this.session.getRowFoldEnd(w.end.row)}},C.prototype.onCompositionStart=function(w){this.renderer.showComposition(w)},C.prototype.onCompositionUpdate=function(w){this.renderer.setCompositionText(w)},C.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},C.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},C.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},C.prototype.isRowVisible=function(w){return w>=this.getFirstVisibleRow()&&w<=this.getLastVisibleRow()},C.prototype.isRowFullyVisible=function(w){return w>=this.renderer.getFirstFullyVisibleRow()&&w<=this.renderer.getLastFullyVisibleRow()},C.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},C.prototype.$moveByPage=function(w,$){var I=this.renderer,F=this.renderer.layerConfig,O=w*Math.floor(F.height/F.lineHeight);$===!0?this.selection.$moveSelection(function(){this.moveCursorBy(O,0)}):$===!1&&(this.selection.moveCursorBy(O,0),this.selection.clearSelection());var B=I.scrollTop;I.scrollBy(0,O*F.lineHeight),$!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling(B)},C.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},C.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},C.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},C.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},C.prototype.scrollPageDown=function(){this.$moveByPage(1)},C.prototype.scrollPageUp=function(){this.$moveByPage(-1)},C.prototype.scrollToRow=function(w){this.renderer.scrollToRow(w)},C.prototype.scrollToLine=function(w,$,I,F){this.renderer.scrollToLine(w,$,I,F)},C.prototype.centerSelection=function(){var w=this.getSelectionRange(),$={row:Math.floor(w.start.row+(w.end.row-w.start.row)/2),column:Math.floor(w.start.column+(w.end.column-w.start.column)/2)};this.renderer.alignCursor($,.5)},C.prototype.getCursorPosition=function(){return this.selection.getCursor()},C.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},C.prototype.getSelectionRange=function(){return this.selection.getRange()},C.prototype.selectAll=function(){this.selection.selectAll()},C.prototype.clearSelection=function(){this.selection.clearSelection()},C.prototype.moveCursorTo=function(w,$){this.selection.moveCursorTo(w,$)},C.prototype.moveCursorToPosition=function(w){this.selection.moveCursorToPosition(w)},C.prototype.jumpToMatching=function(w,$){var I=this.getCursorPosition(),F=new b(this.session,I.row,I.column),O=F.getCurrentToken(),B=0;O&&O.type.indexOf("tag-name")!==-1&&(O=F.stepBackward());var P=O||F.stepForward();if(P){var V,W=!1,H={},U=I.column-P.start,G,Y={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(P.value.match(/[{}()\[\]]/g)){for(;U1?H[P.value]++:O.value==="=0;--B)this.$tryReplace(I[B],w)&&F++;return this.selection.setSelectionRange(O),F},C.prototype.$tryReplace=function(w,$){var I=this.session.getTextRange(w);return $=this.$search.replace(I,$),$!==null?(w.end=this.session.replace(w,$),w):null},C.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},C.prototype.find=function(w,$,I){$||($={}),typeof w=="string"||w instanceof RegExp?$.needle=w:typeof w=="object"&&h.mixin($,w);var F=this.selection.getRange();$.needle==null&&(w=this.session.getTextRange(F)||this.$search.$options.needle,w||(F=this.session.getWordRange(F.start.row,F.start.column),w=this.session.getTextRange(F)),this.$search.set({needle:w})),this.$search.set($),$.start||this.$search.set({start:F});var O=this.$search.find(this.session);if($.preventScroll)return O;if(O)return this.revealRange(O,I),O;$.backwards?F.start=F.end:F.end=F.start,this.selection.setRange(F)},C.prototype.findNext=function(w,$){this.find({skipCurrent:!0,backwards:!1},w,$)},C.prototype.findPrevious=function(w,$){this.find(w,{skipCurrent:!0,backwards:!0},$)},C.prototype.revealRange=function(w,$){this.session.unfold(w),this.selection.setSelectionRange(w);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(w.start,w.end,.5),$!==!1&&this.renderer.animateScrolling(I)},C.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(w){w.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},C.prototype.setAutoScrollEditorIntoView=function(w){if(w){var $,I=this,F=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var O=this.$scrollAnchor;O.style.cssText="position:absolute",this.container.insertBefore(O,this.container.firstChild);var B=this.on("changeSelection",function(){F=!0}),P=this.renderer.on("beforeRender",function(){F&&($=I.renderer.container.getBoundingClientRect())}),V=this.renderer.on("afterRender",function(){if(F&&$&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var W=I.renderer,H=W.$cursorLayer.$pixelPos,U=W.layerConfig,G=H.top-U.offset;H.top>=0&&G+$.top<0?F=!0:H.topwindow.innerHeight?F=!1:F=null,F!=null&&(O.style.top=G+"px",O.style.left=H.left+"px",O.style.height=U.lineHeight+"px",O.scrollIntoView(F)),F=$=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",B),this.renderer.off("afterRender",V),this.renderer.off("beforeRender",P))}}},C.prototype.$resetCursorStyle=function(){var w=this.$cursorStyle||"ace",$=this.renderer.$cursorLayer;$&&($.setSmoothBlinking(/smooth/.test(w)),$.isBlinking=!this.$readOnly&&w!="wide",d.setCssClass($.element,"ace_slim-cursors",/slim/.test(w)))},C.prototype.prompt=function(w,$,I){var F=this;E.loadModule("ace/ext/prompt",function(O){O.prompt(F,w,$,I)})},C}();x.$uid=0,x.prototype.curOp=null,x.prototype.prevOp={},x.prototype.$mergeableCommands=["backspace","del","insertstring"],x.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],h.implement(x.prototype,m),E.defineOptions(x.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){var w=this;this.textInput.setReadOnly(C),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(I){var F=!1;if(I&&I.type=="keydown"){if(F=I&&I.key&&I.key.length==1&&!I.ctrlKey&&!I.metaKey,!F)return}else I&&I.type!=="exec"&&(F=!0);if(F){w.hoverTooltip||(w.hoverTooltip=new R);var O=d.createElement("div");O.textContent=S("editor.tooltip.disable-editing","Editing is disabled"),w.hoverTooltip.isOpen||w.hoverTooltip.showForRange(w,w.getSelectionRange(),O)}else w.hoverTooltip&&w.hoverTooltip.isOpen&&w.hoverTooltip.hide()});var $=this.textInput.getElement();C?(_.addListener($,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(_.removeListener($,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(C){this.textInput.setCopyWithEmptySelection(C)},initialValue:!1},cursorStyle:{set:function(C){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(C){this.session.setValue(C)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(C){this.setSession(C)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(C){this.renderer.$gutterLayer.setShowLineNumbers(C),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),C&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(C){this.$showLineNumbers&&C?A.attach(this):A.detach(this)}},placeholder:{set:function(C){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var w=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(w&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!w&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var $=d.createElement("div");$.className="ace_placeholder",$.textContent=this.$placeholder||"",this.renderer.placeholderNode=$,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!w&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(C){var w={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(F){F.blur(),F.renderer.scroller.focus()},readOnly:!0},$=function(F){if(F.target==this.renderer.scroller&&F.keyCode===k.enter){F.preventDefault();var O=this.getCursorPosition().row;this.isRowVisible(O)||this.scrollToLine(O,!0,!0),this.focus()}},I;C?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",S("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",S("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",$.bind(this)),this.commands.addCommand(w),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",S("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",S("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new g(this)),I.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",$.bind(this)),this.commands.removeCommand(w),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(C){this.$textInputAriaLabel=C},initialValue:""},enableMobileMenu:{set:function(C){this.$enableMobileMenu=C},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(C,w){return(Math.abs(C.selection.lead.row-w)||w+1+(w<9?"·":""))+""},getWidth:function(C,w,$){return Math.max(w.toString().length,($.lastRow+1).toString().length,2)*$.characterWidth},update:function(C,w){w.renderer.$loop.schedule(w.renderer.CHANGE_GUTTER)},attach:function(C){C.renderer.$gutterLayer.$renderer=this,C.on("changeSelection",this.update),this.update(null,C)},detach:function(C){C.renderer.$gutterLayer.$renderer==this&&(C.renderer.$gutterLayer.$renderer=null),C.off("changeSelection",this.update),this.update(null,C)}};u.Editor=x}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,u,v){var a=n("../lib/dom"),h=function(){function d(o,p){this.element=o,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(o){a.translate(this.element,0,-(o.firstRowScreen*o.lineHeight%this.canvasHeight)-o.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(o,p){return Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(o,p,e){var t=p.firstRowScreen*p.lineHeight,r=Math.floor(t/this.canvasHeight),l=e.documentToScreenRow(o,0)*p.lineHeight;return l-r*this.canvasHeight},d.prototype.computeLineHeight=function(o,p,e){return p.lineHeight*e.getRowLineCount(o)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(o){return this.cells[o]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(o){if(Array.isArray(o)){this.cells.push.apply(this.cells,o);for(var p=a.createFragment(this.element),e=0;eD&&(g=y.end.row+1,y=c.getNextFoldLine(g,y),D=y?y.start.row:1/0),g>m){for(;this.$lines.getLength()>b+1;)this.$lines.pop();break}E=this.$lines.get(++b),E?E.row=g:(E=this.$lines.createCell(g,s,this.session,r),this.$lines.push(E)),this.$renderCell(E,s,y,g),g++}this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$updateGutterWidth=function(s){var c=this.session,f=c.gutterRenderer||this.$renderer,m=c.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(y=c.getLength()+m-1);var D=f?f.getWidth(c,y,s):y.toString().length*s.characterWidth,E=this.$padding||this.$computePadding();D+=E.left+E.right,D!==this.gutterWidth&&!isNaN(D)&&(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var f=0;f=this.$cursorRow){if(m.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(f>0&&y&&y.start.row==c[f-1].row)m=c[f-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},l.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var f=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=f,!c||m0;y--)this.$lines.shift();if(m>f)for(var y=this.session.getFoldedRowCount(f+1,m);y>0;y--)this.$lines.pop();s.firstRowm&&this.$lines.push(this.$renderLines(s,m+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$renderLines=function(s,c,f){for(var m=[],y=c,D=this.session.getNextFoldLine(y),E=D?D.start.row:1/0;y>E&&(y=D.end.row+1,D=this.session.getNextFoldLine(y,D),E=D?D.start.row:1/0),!(y>f);){var b=this.$lines.createCell(y,s,this.session,r);this.$renderCell(b,s,D,y),m.push(b),y++}return m},l.prototype.$renderCell=function(s,c,f,m){var y=s.element,D=this.session,E=y.childNodes[0],b=y.childNodes[1],g=y.childNodes[2],S=y.childNodes[3],T=g.firstChild,k=D.$firstLineNumber,_=D.$breakpoints,R=D.$decorations,x=D.gutterRenderer||this.$renderer,A=this.$showFoldWidgets&&D.foldWidgets,C=f?f.start.row:Number.MAX_VALUE,w=c.lineHeight+"px",$=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=(x?x.getText(D,m):m+k).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||f&&m=C&&this.$cursorRow<=f.end.row)&&($+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),_[m]&&($+=_[m]),R[m]&&($+=R[m]),this.$annotations[m]&&m!==C&&($+=this.$annotations[m].className),A){var O=A[m];O==null&&(O=A[m]=D.getFoldWidget(m))}if(O){var B="ace_fold-widget ace_"+O,P=O=="start"&&m==C&&mf.right-c.right)return"foldWidgets"},l}();t.prototype.$fixedWidth=!1,t.prototype.$highlightGutterLine=!0,t.prototype.$renderer="",t.prototype.$showLineNumbers=!0,t.prototype.$showFoldWidgets=!0,h.implement(t.prototype,o);function r(l){var s=document.createTextNode("");l.appendChild(s);var c=a.createElement("span");l.appendChild(c);var f=a.createElement("span");l.appendChild(f);var m=a.createElement("span");return f.appendChild(m),l}u.Gutter=t}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,u,v){var a=n("../range").Range,h=n("../lib/dom"),d=function(){function p(e){this.element=h.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return p.prototype.setPadding=function(e){this.$padding=e},p.prototype.setSession=function(e){this.session=e},p.prototype.setMarkers=function(e){this.markers=e},p.prototype.elt=function(e,t){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=t,r.className=e},p.prototype.update=function(e){if(e){this.config=e,this.i=0;var t;for(var r in this.markers){var l=this.markers[r];if(!l.range){l.update(t,this,this.session,e);continue}var s=l.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),l.renderer){var c=this.$getTop(s.start.row,e),f=this.$padding+s.start.column*e.characterWidth;l.renderer(t,s,f,c,e)}else l.type=="fullLine"?this.drawFullLineMarker(t,s,l.clazz,e):l.type=="screenLine"?this.drawScreenLineMarker(t,s,l.clazz,e):s.isMultiLine()?l.type=="text"?this.drawTextMarker(t,s,l.clazz,e):this.drawMultiLineMarker(t,s,l.clazz,e):this.drawSingleLineMarker(t,s,l.clazz+" ace_start ace_br15",e)}if(this.i!=-1)for(;this.ib,y==m),l,y==m?0:1,s)},p.prototype.drawMultiLineMarker=function(e,t,r,l,s){var c=this.$padding,f=l.lineHeight,m=this.$getTop(t.start.row,l),y=c+t.start.column*l.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var D=t.clone();D.end.row=D.start.row,D.end.column=this.session.getLine(D.start.row).length,this.drawBidiSingleLineMarker(e,D,r+" ace_br1 ace_start",l,null,s)}else this.elt(r+" ace_br1 ace_start","height:"+f+"px;right:"+c+"px;top:"+m+"px;left:"+y+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var D=t.clone();D.start.row=D.end.row,D.start.column=0,this.drawBidiSingleLineMarker(e,D,r+" ace_br12",l,null,s)}else{m=this.$getTop(t.end.row,l);var E=t.end.column*l.characterWidth;this.elt(r+" ace_br12","height:"+f+"px;width:"+E+"px;top:"+m+"px;left:"+c+"px;"+(s||""))}if(f=(t.end.row-t.start.row-1)*l.lineHeight,!(f<=0)){m=this.$getTop(t.start.row+1,l);var b=(t.start.column?1:0)|(t.end.column?0:8);this.elt(r+(b?" ace_br"+b:""),"height:"+f+"px;right:"+c+"px;top:"+m+"px;left:"+c+"px;"+(s||""))}},p.prototype.drawSingleLineMarker=function(e,t,r,l,s,c){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,r,l,s,c);var f=l.lineHeight,m=(t.end.column+(s||0)-t.start.column)*l.characterWidth,y=this.$getTop(t.start.row,l),D=this.$padding+t.start.column*l.characterWidth;this.elt(r,"height:"+f+"px;width:"+m+"px;top:"+y+"px;left:"+D+"px;"+(c||""))},p.prototype.drawBidiSingleLineMarker=function(e,t,r,l,s,c){var f=l.lineHeight,m=this.$getTop(t.start.row,l),y=this.$padding,D=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);D.forEach(function(E){this.elt(r,"height:"+f+"px;width:"+(E.width+(s||0))+"px;top:"+m+"px;left:"+(y+E.left)+"px;"+(c||""))},this)},p.prototype.drawFullLineMarker=function(e,t,r,l,s){var c=this.$getTop(t.start.row,l),f=l.lineHeight;t.start.row!=t.end.row&&(f+=this.$getTop(t.end.row,l)-c),this.elt(r,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(s||""))},p.prototype.drawScreenLineMarker=function(e,t,r,l,s){var c=this.$getTop(t.start.row,l),f=l.lineHeight;this.elt(r,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(s||""))},p}();d.prototype.$padding=0;function o(p,e,t,r){return(p?1:0)|(e?2:0)|(t?4:0)|(r?8:0)}u.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,u,v){var a=new Set(["text","rparen","lparen"]);u.isTextToken=function(h){return a.has(h)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,u,v){var a=n("../lib/oop"),h=n("../lib/dom"),d=n("../lib/lang"),o=n("./lines").Lines,p=n("../lib/event_emitter").EventEmitter,e=n("../config").nls,t=n("./text_util").isTextToken,r=function(){function l(s){this.dom=h,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return l.prototype.$updateEolChar=function(){var s=this.session.doc,c=s.getNewLineCharacter()==` +`&&s.getNewLineMode()!="windows",f=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},l.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",function(c){this._signal("changeCharacterSize",c)}.bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},l.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},l.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var c=this.$tabStrings=[0],f=1;fT&&(g=S.end.row+1,S=this.session.getNextFoldLine(g,S),T=S?S.start.row:1/0),!(g>y);){var k=D[E++];if(k){this.dom.removeChildren(k),this.$renderLine(k,g,g==T?S:!1),b&&(k.style.top=this.$lines.computeLineTop(g,s,this.session)+"px");var _=s.lineHeight*this.session.getRowLength(g)+"px";k.style.height!=_&&(b=!0,k.style.height=_)}g++}if(b)for(;E0;y--)this.$lines.shift();if(c.lastRow>s.lastRow)for(var y=this.session.getFoldedRowCount(s.lastRow+1,c.lastRow);y>0;y--)this.$lines.pop();s.firstRowc.lastRow&&this.$lines.push(this.$renderLinesFragment(s,c.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(s,c,f){for(var m=[],y=c,D=this.session.getNextFoldLine(y),E=D?D.start.row:1/0;y>E&&(y=D.end.row+1,D=this.session.getNextFoldLine(y,D),E=D?D.start.row:1/0),!(y>f);){var b=this.$lines.createCell(y,s,this.session),g=b.element;this.dom.removeChildren(g),h.setStyle(g.style,"height",this.$lines.computeLineHeight(y,s,this.session)+"px"),h.setStyle(g.style,"top",this.$lines.computeLineTop(y,s,this.session)+"px"),this.$renderLine(g,y,y==E?D:!1),this.$useLineGroups()?g.className="ace_line_group":g.className="ace_line",m.push(b),y++}return m},l.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var c=s.firstRow,f=s.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(s,c,f))},l.prototype.$renderToken=function(s,c,f,m){for(var y=this,D=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,E=this.dom.createFragment(this.element),b,g=0;b=D.exec(m);){var S=b[1],T=b[2],k=b[3],_=b[4],R=b[5];if(!(!y.showSpaces&&T)){var x=g!=b.index?m.slice(g,b.index):"";if(g=b.index+b[0].length,x&&E.appendChild(this.dom.createTextNode(x,this.element)),S){var A=y.session.getScreenTabSize(c+b.index);E.appendChild(y.$tabStrings[A].cloneNode(!0)),c+=A-1}else if(T)if(y.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=d.stringRepeat(y.SPACE_CHAR,T.length),E.appendChild(C)}else E.appendChild(this.dom.createTextNode(T,this.element));else if(k){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=d.stringRepeat(y.SPACE_CHAR,k.length),E.appendChild(C)}else if(_){c+=1;var C=this.dom.createElement("span");C.style.width=y.config.characterWidth*2+"px",C.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=y.showSpaces?y.SPACE_CHAR:_,E.appendChild(C)}else if(R){c+=1;var C=this.dom.createElement("span");C.style.width=y.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=R,E.appendChild(C)}}}if(E.appendChild(this.dom.createTextNode(g?m.slice(g):m,this.element)),t(f.type))s.appendChild(E);else{var w="ace_"+f.type.replace(/\./g," ace_"),C=this.dom.createElement("span");f.type=="fold"&&(C.style.width=f.value.length*this.config.characterWidth+"px",C.setAttribute("title",e("inline-fold.closed.title","Unfold code"))),C.className=w,C.appendChild(E),s.appendChild(C)}return c+m.length},l.prototype.renderIndentGuide=function(s,c,f){var m=c.search(this.$indentGuideRe);if(m<=0||m>=f)return c;if(c[0]==" "){m-=m%this.tabSize;for(var y=m/this.tabSize,D=0;DD[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[c.row]!==""&&c.column===s[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=c.row+1;E0)m=s.element.childNodes[0];else return;var y=m.childNodes;if(y){var D=y[c-1];D&&D.classList&&D.classList.contains("ace_indent-guide")&&D.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var f=0;f=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,c)}}else for(var f=s.length-1;f>=0;f--){var m=s[f];if(this.$highlightIndentGuideMarker.end&&m.row=D;)E=this.$renderToken(b,E,S,T.substring(0,D-m)),T=T.substring(D-m),m=D,b=this.$createLineElement(),s.appendChild(b),b.appendChild(this.dom.createTextNode(d.stringRepeat(" ",f.indent),this.element)),y++,E=0,D=f[y]||Number.MAX_VALUE;T.length!=0&&(m+=T.length,E=this.$renderToken(b,E,S,T))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(b,E,null,"",!0)},l.prototype.$renderSimpleLine=function(s,c){for(var f=0,m=0;mthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,f,y,D);f=this.$renderToken(s,f,y,D)}}},l.prototype.$renderOverflowMessage=function(s,c,f,m,y){f&&this.$renderToken(s,c,f,m.slice(0,this.MAX_LINE_LENGTH-c));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=y?"":"",s.appendChild(D)},l.prototype.$renderLine=function(s,c,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(c)),f)var m=this.$getFoldLineTokens(c,f);else var m=this.session.getTokens(c);var y=s;if(m.length){var D=this.session.getRowSplitData(c);if(D&&D.length){this.$renderWrappedLine(s,m,D);var y=s.lastChild}else{var y=s;this.$useLineGroups()&&(y=this.$createLineElement(),s.appendChild(y)),this.$renderSimpleLine(y,m)}}else this.$useLineGroups()&&(y=this.$createLineElement(),s.appendChild(y));if(this.showEOL&&y){f&&(c=f.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(E)}},l.prototype.$getFoldLineTokens=function(s,c){var f=this.session,m=[];function y(E,b,g){for(var S=0,T=0;T+E[S].value.lengthg-b&&(k=k.substring(0,g-b)),m.push({type:E[S].type,value:k}),T=b+k.length,S+=1}for(;Tg?m.push({type:E[S].type,value:k.substring(0,g-T)}):m.push(E[S]),T+=k.length,S+=1}}var D=f.getTokens(s);return c.walk(function(E,b,g,S,T){E!=null?m.push({type:"fold",value:E}):(T&&(D=f.getTokens(b)),D.length&&y(D,S,g))},c.end.row,this.session.getLine(c.end.row).length),m},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,a.implement(r.prototype,p),u.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,u,v){var a=n("../lib/dom"),h=function(){function d(o){this.element=a.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),a.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(o){for(var p=this.cursors,e=p.length;e--;)a.setStyle(p[e].style,"opacity",o?"":"0")},d.prototype.$startCssAnimation=function(){for(var o=this.cursors,p=o.length;p--;)o[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&a.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,a.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(o){this.$padding=o},d.prototype.setSession=function(o){this.session=o},d.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},d.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},d.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,a.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var o=a.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},d.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},d.prototype.hideCursor=function(){this.isVisible=!1,a.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,a.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,a.removeCssClass(this.element,"ace_smooth-blinking")),o(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&a.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),a.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),p()},this.blinkInterval),p()}},d.prototype.getPixelPosition=function(o,p){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var e=this.session.documentToScreenPosition(o),t=this.$padding+(this.session.$bidiHandler.isBidiRow(e.row,o.row)?this.session.$bidiHandler.getPosLeft(e.column):e.column*this.config.characterWidth),r=(e.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:r}},d.prototype.isCursorInView=function(o,p){return o.top>=0&&o.topo.height+o.offset||l.top<0)&&e>1)){var s=this.cursors[t++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,l,o,p[e],this.session):this.isCursorInView(l,o)?(a.setStyle(c,"display","block"),a.translate(s,l.left,l.top),a.setStyle(c,"width",Math.round(o.characterWidth)+"px"),a.setStyle(c,"height",o.lineHeight+"px")):a.setStyle(c,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=l,this.restartTimer()},d.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?a.addCssClass(this.element,"ace_overwrite-cursors"):a.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();h.prototype.$padding=0,h.prototype.drawCursor=null,u.Cursor=h}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,u,v){var a=this&&this.__extends||function(){var s=function(c,f){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var D in y)Object.prototype.hasOwnProperty.call(y,D)&&(m[D]=y[D])},s(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");s(c,f);function m(){this.constructor=c}c.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}}(),h=n("./lib/oop"),d=n("./lib/dom"),o=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter,e=32768,t=function(){function s(c,f){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+f,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return s.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},s}();h.implement(t.prototype,p);var r=function(s){a(c,s);function c(f,m){var y=s.call(this,f,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,m.$scrollbarWidth=y.width=d.scrollbarWidth(f.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(f){this.element.style.height=f+"px"},c.prototype.setScrollHeight=function(f){this.scrollHeight=f,f>e?(this.coeff=e/f,f=e):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},c.prototype.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)},c}(t);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var l=function(s){a(c,s);function c(f,m){var y=s.call(this,f,"-h")||this;return y.scrollLeft=0,y.height=m.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(f){this.element.style.width=f+"px"},c.prototype.setInnerWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)},c}(t);u.ScrollBar=r,u.ScrollBarV=r,u.ScrollBarH=l,u.VScrollBar=r,u.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,u,v){var a=this&&this.__extends||function(){var l=function(s,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(f[y]=m[y])},l(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(s,c);function f(){this.constructor=s}s.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),h=n("./lib/oop"),d=n("./lib/dom"),o=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ + position: absolute; + background: rgba(128, 128, 128, 0.6); + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #bbb; + border-radius: 2px; + z-index: 8; +} +.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { + position: absolute; + z-index: 6; + background: none; + overflow: hidden!important; +} +.ace_editor>.ace_sb-v { + z-index: 6; + right: 0; + top: 0; + width: 12px; +} +.ace_editor>.ace_sb-v div { + z-index: 8; + right: 0; + width: 100%; +} +.ace_editor>.ace_sb-h { + bottom: 0; + left: 0; + height: 12px; +} +.ace_editor>.ace_sb-h div { + bottom: 0; + height: 100%; +} +.ace_editor>.ace_sb_grabbed { + z-index: 8; + background: #000; +}`,"ace_scrollbar.css",!1);var e=function(){function l(s,c){this.element=d.createElement("div"),this.element.className="ace_sb"+c,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},l}();h.implement(e.prototype,p);var t=function(l){a(s,l);function s(c,f){var m=l.call(this,c,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=c,m.width=m.VScrollWidth,m.renderer=f,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return s.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(o.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var m=this,y=f.clientY,D=function(_){y=_.clientY},E=function(){clearInterval(T)},b=f.clientY,g=this.thumbTop,S=function(){if(y!==void 0){var _=m.scrollTopFromThumbTop(g+y-b);_!==m.scrollTop&&m._emit("scroll",{data:_})}};o.capture(this.inner,D,E);var T=setInterval(S,20);return o.preventDefault(f)}var k=f.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(k)}),o.preventDefault(f)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(c){var f=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return f=f>>0,f<0?f=0:f>this.pageHeight-this.viewHeight&&(f=this.pageHeight-this.viewHeight),f},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(c,f){this.pageHeight===c&&!f||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(e);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var r=function(l){a(s,l);function s(c,f){var m=l.call(this,c,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=f,m}return s.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(o.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var m=this,y=f.clientX,D=function(_){y=_.clientX},E=function(){clearInterval(T)},b=f.clientX,g=this.thumbLeft,S=function(){if(y!==void 0){var _=m.scrollLeftFromThumbLeft(g+y-b);_!==m.scrollLeft&&m._emit("scroll",{data:_})}};o.capture(this.inner,D,E);var T=setInterval(S,20);return o.preventDefault(f)}var k=f.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(k)}),o.preventDefault(f)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(c){var f=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return f=f>>0,f<0?f=0:f>this.pageWidth-this.viewWidth&&(f=this.pageWidth-this.viewWidth),f},s.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(c,f){this.pageWidth===c&&!f||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(e);r.prototype.setInnerWidth=r.prototype.setScrollWidth,u.ScrollBar=t,u.ScrollBarV=t,u.ScrollBarH=r,u.VScrollBar=t,u.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,u,v){var a=n("./lib/event"),h=function(){function d(o,p){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var e=this;this._flush=function(t){e.pending=!1;var r=e.changes;if(r&&(a.blockIdle(100),e.changes=0,e.onRender(r)),e.changes){if(e.$recursionLimit--<0)return;e.schedule()}else e.$recursionLimit=2}}return d.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(a.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(o){var p=this.changes;return this.changes=0,p},d}();u.RenderLoop=h}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,u,v){var a=n("../lib/oop"),h=n("../lib/dom"),d=n("../lib/lang"),o=n("../lib/event"),p=n("../lib/useragent"),e=n("../lib/event_emitter").EventEmitter,t=512,r=typeof ResizeObserver=="function",l=200,s=function(){function c(f){this.el=h.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=h.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=h.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",t),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(f,m){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",p.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=m?"hidden":"visible"},c.prototype.checkForSizeChanges=function(f){if(f===void 0&&(f=this.$measureSizes()),f&&(this.$characterSize.width!==f.width||this.$characterSize.height!==f.height)){this.$measureNode.style.fontWeight="bold";var m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===f.width&&m.height===f.height,this._emit("changeCharacterSize",{data:f})}},c.prototype.$addObserver=function(){var f=this;this.$observer=new window.ResizeObserver(function(m){f.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=o.onIdle(function m(){f.checkForSizeChanges(),o.onIdle(m,500)},500)},c.prototype.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(f){var m={height:(f||this.$measureNode).clientHeight,width:(f||this.$measureNode).clientWidth/t};return m.width===0||m.height===0?null:m},c.prototype.$measureCharWidth=function(f){this.$main.textContent=d.stringRepeat(f,t);var m=this.$main.getBoundingClientRect();return m.width/t},c.prototype.getCharacterWidth=function(f){var m=this.charSizes[f];return m===void 0&&(m=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),m},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(f){return!f||!f.parentElement?1:(Number(window.getComputedStyle(f).zoom)||1)*this.$getZoom(f.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var f=function(m,y){return["div",{style:"position: absolute;top:"+m+"px;left:"+y+"px;"}]};this.els=h.buildDom([f(0,0),f(l,0),f(0,l),f(l,l)],this.el)},c.prototype.transformCoordinates=function(f,m){if(f){var y=this.$getZoom(this.el);f=g(1/y,f)}function D(B,P,V){var W=B[1]*P[0]-B[0]*P[1];return[(-P[1]*V[0]+P[0]*V[1])/W,(+B[1]*V[0]-B[0]*V[1])/W]}function E(B,P){return[B[0]-P[0],B[1]-P[1]]}function b(B,P){return[B[0]+P[0],B[1]+P[1]]}function g(B,P){return[B*P[0],B*P[1]]}this.els||this.$initTransformMeasureNodes();function S(B){var P=B.getBoundingClientRect();return[P.left,P.top]}var T=S(this.els[0]),k=S(this.els[1]),_=S(this.els[2]),R=S(this.els[3]),x=D(E(R,k),E(R,_),E(b(k,_),b(R,T))),A=g(1+x[0],E(k,T)),C=g(1+x[1],E(_,T));if(m){var w=m,$=x[0]*w[0]/l+x[1]*w[1]/l+1,I=b(g(w[0],A),g(w[1],C));return b(g(1/$/l,I),T)}var F=E(f,T),O=D(E(A,g(x[0],F)),E(C,g(x[1],F)),F);return g(l,O)},c}();s.prototype.$characterSize={width:0,height:0},a.implement(s.prototype,e),u.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,u,v){v.exports=` +.ace_br1 {border-top-left-radius : 3px;} +.ace_br2 {border-top-right-radius : 3px;} +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} +.ace_br4 {border-bottom-right-radius: 3px;} +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} +.ace_br8 {border-bottom-left-radius : 3px;} +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} + + +.ace_editor { + position: relative; + overflow: hidden; + padding: 0; + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; + direction: ltr; + text-align: left; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + forced-color-adjust: none; +} + +.ace_scroller { + position: absolute; + overflow: hidden; + top: 0; + bottom: 0; + background-color: inherit; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + cursor: text; +} + +.ace_content { + position: absolute; + box-sizing: border-box; + min-width: 100%; + contain: style size layout; + font-variant-ligatures: no-common-ligatures; +} +.ace_invisible { + font-variant-ligatures: none; +} + +.ace_keyboard-focus:focus { + box-shadow: inset 0 0 0 2px #5E9ED6; + outline: none; +} + +.ace_dragging .ace_scroller:before{ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + content: ''; + background: rgba(250, 250, 250, 0.01); + z-index: 1000; +} +.ace_dragging.ace_dark .ace_scroller:before{ + background: rgba(0, 0, 0, 0.01); +} + +.ace_gutter { + position: absolute; + overflow : hidden; + width: auto; + top: 0; + bottom: 0; + left: 0; + cursor: default; + z-index: 4; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + contain: style size layout; +} + +.ace_gutter-active-line { + position: absolute; + left: 0; + right: 0; +} + +.ace_scroller.ace_scroll-left:after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; + pointer-events: none; +} + +.ace_gutter-cell, .ace_gutter-cell_svg-icons { + position: absolute; + top: 0; + left: 0; + right: 0; + padding-left: 19px; + padding-right: 6px; + background-repeat: no-repeat; +} + +.ace_gutter-cell_svg-icons .ace_gutter_annotation { + margin-left: -14px; + float: left; +} + +.ace_gutter-cell .ace_gutter_annotation { + margin-left: -19px; + float: left; +} + +.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); +} + +.ace_icon_svg.ace_error { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); + background-color: crimson; +} +.ace_icon_svg.ace_security { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); + background-color: crimson; +} +.ace_icon_svg.ace_warning { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: darkorange; +} +.ace_icon_svg.ace_info { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: royalblue; +} +.ace_icon_svg.ace_hint { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); + background-color: silver; +} + +.ace_icon_svg.ace_error_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); + background-color: crimson; +} +.ace_icon_svg.ace_security_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); + background-color: crimson; +} +.ace_icon_svg.ace_warning_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); + background-color: darkorange; +} + +.ace_scrollbar { + contain: strict; + position: absolute; + right: 0; + bottom: 0; + z-index: 6; +} + +.ace_scrollbar-inner { + position: absolute; + cursor: text; + left: 0; + top: 0; +} + +.ace_scrollbar-v{ + overflow-x: hidden; + overflow-y: scroll; + top: 0; +} + +.ace_scrollbar-h { + overflow-x: scroll; + overflow-y: hidden; + left: 0; +} + +.ace_print-margin { + position: absolute; + height: 100%; +} + +.ace_text-input { + position: absolute; + z-index: 0; + width: 0.5em; + height: 1em; + opacity: 0; + background: transparent; + -moz-appearance: none; + appearance: none; + border: none; + resize: none; + outline: none; + overflow: hidden; + font: inherit; + padding: 0 1px; + margin: 0 -1px; + contain: strict; + -ms-user-select: text; + -moz-user-select: text; + -webkit-user-select: text; + user-select: text; + /*with \`pre-line\` chrome inserts   instead of space*/ + white-space: pre!important; +} +.ace_text-input.ace_composition { + background: transparent; + color: inherit; + z-index: 1000; + opacity: 1; +} +.ace_composition_placeholder { color: transparent } +.ace_composition_marker { + border-bottom: 1px solid; + position: absolute; + border-radius: 0; + margin-top: 1px; +} + +[ace_nocontext=true] { + transform: none!important; + filter: none!important; + clip-path: none!important; + mask : none!important; + contain: none!important; + perspective: none!important; + mix-blend-mode: initial!important; + z-index: auto; +} + +.ace_layer { + z-index: 1; + position: absolute; + overflow: hidden; + /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ + word-wrap: normal; + white-space: pre; + height: 100%; + width: 100%; + box-sizing: border-box; + /* setting pointer-events: auto; on node under the mouse, which changes + during scroll, will break mouse wheel scrolling in Safari */ + pointer-events: none; +} + +.ace_gutter-layer { + position: relative; + width: auto; + text-align: right; + pointer-events: auto; + height: 1000000px; + contain: style size layout; +} + +.ace_text-layer { + font: inherit !important; + position: absolute; + height: 1000000px; + width: 1000000px; + contain: style size layout; +} + +.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { + contain: style size layout; + position: absolute; + top: 0; + left: 0; + right: 0; +} + +.ace_hidpi .ace_text-layer, +.ace_hidpi .ace_gutter-layer, +.ace_hidpi .ace_content, +.ace_hidpi .ace_gutter { + contain: strict; +} +.ace_hidpi .ace_text-layer > .ace_line, +.ace_hidpi .ace_text-layer > .ace_line_group { + contain: strict; +} + +.ace_cjk { + display: inline-block; + text-align: center; +} + +.ace_cursor-layer { + z-index: 4; +} + +.ace_cursor { + z-index: 4; + position: absolute; + box-sizing: border-box; + border-left: 2px solid; + /* workaround for smooth cursor repaintng whole screen in chrome */ + transform: translatez(0); +} + +.ace_multiselect .ace_cursor { + border-left-width: 1px; +} + +.ace_slim-cursors .ace_cursor { + border-left-width: 1px; +} + +.ace_overwrite-cursors .ace_cursor { + border-left-width: 0; + border-bottom: 1px solid; +} + +.ace_hidden-cursors .ace_cursor { + opacity: 0.2; +} + +.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { + opacity: 0; +} + +.ace_smooth-blinking .ace_cursor { + transition: opacity 0.18s; +} + +.ace_animate-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: step-end; + animation-name: blink-ace-animate; + animation-iteration-count: infinite; +} + +.ace_animate-blinking.ace_smooth-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: ease-in-out; + animation-name: blink-ace-animate-smooth; +} + +@keyframes blink-ace-animate { + from, to { opacity: 1; } + 60% { opacity: 0; } +} + +@keyframes blink-ace-animate-smooth { + from, to { opacity: 1; } + 45% { opacity: 1; } + 60% { opacity: 0; } + 85% { opacity: 0; } +} + +.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { + position: absolute; + z-index: 3; +} + +.ace_marker-layer .ace_selection { + position: absolute; + z-index: 5; +} + +.ace_marker-layer .ace_bracket { + position: absolute; + z-index: 6; +} + +.ace_marker-layer .ace_error_bracket { + position: absolute; + border-bottom: 1px solid #DE5555; + border-radius: 0; +} + +.ace_marker-layer .ace_active-line { + position: absolute; + z-index: 2; +} + +.ace_marker-layer .ace_selected-word { + position: absolute; + z-index: 4; + box-sizing: border-box; +} + +.ace_line .ace_fold { + box-sizing: border-box; + + display: inline-block; + height: 11px; + margin-top: -2px; + vertical-align: middle; + + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); + background-repeat: no-repeat, repeat-x; + background-position: center center, top left; + color: transparent; + + border: 1px solid black; + border-radius: 2px; + + cursor: pointer; + pointer-events: auto; +} + +.ace_dark .ace_fold { +} + +.ace_fold:hover{ + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); +} + +.ace_tooltip { + background-color: #f5f5f5; + border: 1px solid gray; + border-radius: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + color: black; + padding: 3px 4px; + position: fixed; + z-index: 999999; + box-sizing: border-box; + cursor: default; + white-space: pre-wrap; + word-wrap: break-word; + line-height: normal; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + pointer-events: none; + overflow: auto; + max-width: min(33em, 66vw); + overscroll-behavior: contain; +} +.ace_tooltip pre { + white-space: pre-wrap; +} + +.ace_tooltip.ace_dark { + background-color: #636363; + color: #fff; +} + +.ace_tooltip:focus { + outline: 1px solid #5E9ED6; +} + +.ace_icon { + display: inline-block; + width: 18px; + vertical-align: top; +} + +.ace_icon_svg { + display: inline-block; + width: 12px; + vertical-align: top; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 12px; + -webkit-mask-position: center; +} + +.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { + padding-right: 13px; +} + +.ace_fold-widget, .ace_custom-widget { + box-sizing: border-box; + + margin: 0 -12px 0 1px; + display: none; + width: 11px; + vertical-align: top; + + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: center; + + border-radius: 3px; + + border: 1px solid transparent; + cursor: pointer; +} + +.ace_custom-widget { + background: none; +} + +.ace_folding-enabled .ace_fold-widget { + display: inline-block; +} + +.ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); +} + +.ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); +} + +.ace_fold-widget:hover { + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(255, 255, 255, 0.2); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); +} + +.ace_fold-widget:active { + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} +/** + * Dark version for fold widgets + */ +.ace_dark .ace_fold-widget { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); +} +.ace_dark .ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget:hover { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.1); +} +.ace_dark .ace_fold-widget:active { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); +} + +.ace_inline_button { + border: 1px solid lightgray; + display: inline-block; + margin: -1px 8px; + padding: 0 5px; + pointer-events: auto; + cursor: pointer; +} +.ace_inline_button:hover { + border-color: gray; + background: rgba(200,200,200,0.2); + display: inline-block; + pointer-events: auto; +} + +.ace_fold-widget.ace_invalid { + background-color: #FFB4B4; + border-color: #DE5555; +} + +.ace_fade-fold-widgets .ace_fold-widget { + transition: opacity 0.4s ease 0.05s; + opacity: 0; +} + +.ace_fade-fold-widgets:hover .ace_fold-widget { + transition: opacity 0.05s ease 0.05s; + opacity:1; +} + +.ace_underline { + text-decoration: underline; +} + +.ace_bold { + font-weight: bold; +} + +.ace_nobold .ace_bold { + font-weight: normal; +} + +.ace_italic { + font-style: italic; +} + + +.ace_error-marker { + background-color: rgba(255, 0, 0,0.2); + position: absolute; + z-index: 9; +} + +.ace_highlight-marker { + background-color: rgba(255, 255, 0,0.2); + position: absolute; + z-index: 8; +} + +.ace_mobile-menu { + position: absolute; + line-height: 1.5; + border-radius: 4px; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + background: white; + box-shadow: 1px 3px 2px grey; + border: 1px solid #dcdcdc; + color: black; +} +.ace_dark > .ace_mobile-menu { + background: #333; + color: #ccc; + box-shadow: 1px 3px 2px grey; + border: 1px solid #444; + +} +.ace_mobile-button { + padding: 2px; + cursor: pointer; + overflow: hidden; +} +.ace_mobile-button:hover { + background-color: #eee; + opacity:1; +} +.ace_mobile-button:active { + background-color: #ddd; +} + +.ace_placeholder { + position: relative; + font-family: arial; + transform: scale(0.9); + transform-origin: left; + white-space: pre; + opacity: 0.7; + margin: 0 10px; + z-index: 1; +} + +.ace_ghost_text { + opacity: 0.5; + font-style: italic; +} + +.ace_ghost_text_container > div { + white-space: pre; +} + +.ghost_text_line_wrapped::after { + content: "↩"; + position: absolute; +} + +.ace_lineWidgetContainer.ace_ghost_text { + margin: 0px 4px +} + +.ace_screenreader-only { + position:absolute; + left:-10000px; + top:auto; + width:1px; + height:1px; + overflow:hidden; +} + +.ace_hidden_token { + display: none; +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,u,v){var a=n("../lib/dom"),h=n("../lib/oop"),d=n("../lib/event_emitter").EventEmitter,o=function(){function p(e,t){this.canvas=a.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(e){var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(e){this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height;var r=(e.lastRow+1)*this.lineHeight;rx.priority?1:0}var c=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),c){var f={info:1,warning:2,error:3};c.forEach(function(R){R.priority=f[R.type]||null}),c=c.sort(s);for(var m=this.renderer.session.$foldData,y=0;ythis.canvasHeight&&(k=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(k-this.halfMinDecorationHeight),S=Math.round(k+this.halfMinDecorationHeight)}l.fillStyle=t[c[y].type]||null,l.fillRect(0,b,this.canvasWidth,S-g)}}var _=this.renderer.session.selection.getCursor();if(_){var E=this.compensateFoldRows(_.row,m),b=Math.round((_.row-E)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,b,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(e,t){var r=0;if(t&&t.length>0)for(var l=0;lt[l].start.row&&e=t[l].end.row&&(r+=t[l].end.row-t[l].start.row);return r},p}();h.implement(o.prototype,d),u.Decorator=o}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(n,u,v){var a=n("./lib/oop"),h=n("./lib/dom"),d=n("./lib/lang"),o=n("./config"),p=n("./layer/gutter").Gutter,e=n("./layer/marker").Marker,t=n("./layer/text").Text,r=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,s=n("./scrollbar").VScrollBar,c=n("./scrollbar_custom").HScrollBar,f=n("./scrollbar_custom").VScrollBar,m=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,D=n("./lib/event_emitter").EventEmitter,E=n("./css/editor-css"),b=n("./layer/decorators").Decorator,g=n("./lib/useragent"),S=n("./layer/text_util").isTextToken;h.importCssString(E,"ace_editor.css",!1);var T=function(){function k(_,R){var x=this;this.container=_||h.createElement("div"),h.addCssClass(this.container,"ace_editor"),h.HI_DPI&&h.addCssClass(this.container,"ace_hidpi"),this.setTheme(R),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new e(this.content);var A=this.$textLayer=new t(this.content);this.canvas=A.element,this.$markerFront=new e(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(C){x.$scrollAnimation||x.session.setScrollTop(C.data-x.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){x.$scrollAnimation||x.session.setScrollLeft(C.data-x.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(C){x.updateCharacterSize(),x.onResize(!0,x.gutterWidth,x.$size.width,x.$size.height),x._signal("changeCharacterSize",C)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),o.resetOptions(this),o._signal("renderer",this)}return k.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),h.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},k.prototype.setSession=function(_){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=_,_&&this.scrollMargin.top&&_.getScrollTop()<=0&&_.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(_),this.$markerBack.setSession(_),this.$markerFront.setSession(_),this.$gutterLayer.setSession(_),this.$textLayer.setSession(_),_&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},k.prototype.updateLines=function(_,R,x){if(R===void 0&&(R=1/0),this.$changedLines?(this.$changedLines.firstRow>_&&(this.$changedLines.firstRow=_),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},k.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},k.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},k.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},k.prototype.updateFull=function(_){_?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},k.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},k.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},k.prototype.onResize=function(_,R,x,A){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=_?1:0;var C=this.container;A||(A=C.clientHeight||C.scrollHeight),!A&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",A=C.clientHeight||C.scrollHeight),x||(x=C.clientWidth||C.scrollWidth);var w=this.$updateCachedSize(_,R,x,A);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!x&&!A)return this.resizing=0;_&&(this.$gutterLayer.$padding=null),_?this.$renderChanges(w|this.$changes,!0):this.$loop.schedule(w|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},k.prototype.$updateCachedSize=function(_,R,x,A){A-=this.$extraHeight||0;var C=0,w=this.$size,$={width:w.width,height:w.height,scrollerHeight:w.scrollerHeight,scrollerWidth:w.scrollerWidth};if(A&&(_||w.height!=A)&&(w.height=A,C|=this.CHANGE_SIZE,w.scrollerHeight=w.height,this.$horizScroll&&(w.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(w.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),x&&(_||w.width!=x)){C|=this.CHANGE_SIZE,w.width=x,R==null&&(R=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=R,h.setStyle(this.scrollBarH.element.style,"left",R+"px"),h.setStyle(this.scroller.style,"left",R+this.margin.left+"px"),w.scrollerWidth=Math.max(0,x-R-this.scrollBarV.getWidth()-this.margin.h),h.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";h.setStyle(this.scrollBarH.element.style,"right",I),h.setStyle(this.scroller.style,"right",I),h.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(w.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||_)&&(C|=this.CHANGE_FULL)}return w.$dirty=!x||!A,C&&this._signal("resize",$),C},k.prototype.onGutterResize=function(_){var R=this.$showGutter?_:0;R!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,R,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},k.prototype.adjustWrapLimit=function(){var _=this.$size.scrollerWidth-this.$padding*2,R=Math.floor(_/this.characterWidth);return this.session.adjustWrapLimit(R,this.$showPrintMargin&&this.$printMarginColumn)},k.prototype.setAnimatedScroll=function(_){this.setOption("animatedScroll",_)},k.prototype.getAnimatedScroll=function(){return this.$animatedScroll},k.prototype.setShowInvisibles=function(_){this.setOption("showInvisibles",_),this.session.$bidiHandler.setShowInvisibles(_)},k.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},k.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},k.prototype.setDisplayIndentGuides=function(_){this.setOption("displayIndentGuides",_)},k.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},k.prototype.setHighlightIndentGuides=function(_){this.setOption("highlightIndentGuides",_)},k.prototype.setShowPrintMargin=function(_){this.setOption("showPrintMargin",_)},k.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},k.prototype.setPrintMarginColumn=function(_){this.setOption("printMarginColumn",_)},k.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},k.prototype.getShowGutter=function(){return this.getOption("showGutter")},k.prototype.setShowGutter=function(_){return this.setOption("showGutter",_)},k.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},k.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},k.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},k.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},k.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var _=h.createElement("div");_.className="ace_layer ace_print-margin-layer",this.$printMarginEl=h.createElement("div"),this.$printMarginEl.className="ace_print-margin",_.appendChild(this.$printMarginEl),this.content.insertBefore(_,this.content.firstChild)}var R=this.$printMarginEl.style;R.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",R.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},k.prototype.getContainerElement=function(){return this.container},k.prototype.getMouseEventTarget=function(){return this.scroller},k.prototype.getTextAreaContainer=function(){return this.container},k.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var _=this.textarea.style,R=this.$composition;if(!this.$keepTextAreaAtCursor&&!R){h.translate(this.textarea,-100,0);return}var x=this.$cursorLayer.$pixelPos;if(x){R&&R.markerRange&&(x=this.$cursorLayer.getPixelPosition(R.markerRange.start,!0));var A=this.layerConfig,C=x.top,w=x.left;C-=A.offset;var $=R&&R.useTextareaForIME||g.isMobile?this.lineHeight:1;if(C<0||C>A.height-$){h.translate(this.textarea,0,0);return}var I=1,F=this.$size.height-$;if(!R)C+=this.lineHeight;else if(R.useTextareaForIME){var O=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(O)[0]}else C+=this.lineHeight+2;w-=this.scrollLeft,w>this.$size.scrollerWidth-I&&(w=this.$size.scrollerWidth-I),w+=this.gutterWidth+this.margin.left,h.setStyle(_,"height",$+"px"),h.setStyle(_,"width",I+"px"),h.translate(this.textarea,Math.min(w,this.$size.scrollerWidth-I),Math.min(C,F))}}},k.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},k.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},k.prototype.getLastFullyVisibleRow=function(){var _=this.layerConfig,R=_.lastRow,x=this.session.documentToScreenRow(R,0)*_.lineHeight;return x-this.session.getScrollTop()>_.height-_.lineHeight?R-1:R},k.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},k.prototype.setPadding=function(_){this.$padding=_,this.$textLayer.setPadding(_),this.$cursorLayer.setPadding(_),this.$markerFront.setPadding(_),this.$markerBack.setPadding(_),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},k.prototype.setScrollMargin=function(_,R,x,A){var C=this.scrollMargin;C.top=_|0,C.bottom=R|0,C.right=A|0,C.left=x|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},k.prototype.setMargin=function(_,R,x,A){var C=this.margin;C.top=_|0,C.bottom=R|0,C.right=A|0,C.left=x|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},k.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},k.prototype.setHScrollBarAlwaysVisible=function(_){this.setOption("hScrollBarAlwaysVisible",_)},k.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},k.prototype.setVScrollBarAlwaysVisible=function(_){this.setOption("vScrollBarAlwaysVisible",_)},k.prototype.$updateScrollBarV=function(){var _=this.layerConfig.maxHeight,R=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(_-=(R-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>_-R&&(_=this.scrollTop+R,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(_+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},k.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},k.prototype.freeze=function(){this.$frozen=!0},k.prototype.unfreeze=function(){this.$frozen=!1},k.prototype.$renderChanges=function(_,R){if(this.$changes&&(_|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!_&&!R){this.$changes|=_;return}if(this.$size.$dirty)return this.$changes|=_,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",_),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var x=this.layerConfig;if(_&this.CHANGE_FULL||_&this.CHANGE_SIZE||_&this.CHANGE_TEXT||_&this.CHANGE_LINES||_&this.CHANGE_SCROLL||_&this.CHANGE_H_SCROLL){if(_|=this.$computeLayerConfig()|this.$loop.clear(),x.firstRow!=this.layerConfig.firstRow&&x.firstRowScreen==this.layerConfig.firstRowScreen){var A=this.scrollTop+(x.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;A>0&&(this.scrollTop=A,_=_|this.CHANGE_SCROLL,_|=this.$computeLayerConfig()|this.$loop.clear())}x=this.layerConfig,this.$updateScrollBarV(),_&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),h.translate(this.content,-this.scrollLeft,-x.offset);var C=x.width+2*this.$padding+"px",w=x.minHeight+"px";h.setStyle(this.content.style,"width",C),h.setStyle(this.content.style,"height",w)}if(_&this.CHANGE_H_SCROLL&&(h.translate(this.content,-this.scrollLeft,-x.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),_&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(x),this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x),this.$markerBack.update(x),this.$markerFront.update(x),this.$cursorLayer.update(x),this.$moveTextAreaToCursor(),this._signal("afterRender",_);return}if(_&this.CHANGE_SCROLL){this.$changedLines=null,_&this.CHANGE_TEXT||_&this.CHANGE_LINES?this.$textLayer.update(x):this.$textLayer.scrollLines(x),this.$showGutter&&(_&this.CHANGE_GUTTER||_&this.CHANGE_LINES?this.$gutterLayer.update(x):this.$gutterLayer.scrollLines(x)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x),this.$markerBack.update(x),this.$markerFront.update(x),this.$cursorLayer.update(x),this.$moveTextAreaToCursor(),this._signal("afterRender",_);return}_&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(x),this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):_&this.CHANGE_LINES?((this.$updateLines()||_&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):_&this.CHANGE_TEXT||_&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):_&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)),_&this.CHANGE_CURSOR&&(this.$cursorLayer.update(x),this.$moveTextAreaToCursor()),_&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(x),_&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(x),this._signal("afterRender",_)},k.prototype.$autosize=function(){var _=this.session.getScreenLength()*this.lineHeight,R=this.$maxLines*this.lineHeight,x=Math.min(R,Math.max((this.$minLines||1)*this.lineHeight,_))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(x+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&x>this.$maxPixelHeight&&(x=this.$maxPixelHeight);var A=x<=2*this.lineHeight,C=!A&&_>R;if(x!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var w=this.container.clientWidth;this.container.style.height=x+"px",this.$updateCachedSize(!0,this.$gutterWidth,w,x),this.desiredHeight=x,this._signal("autosize")}},k.prototype.$computeLayerConfig=function(){var _=this.session,R=this.$size,x=R.height<=2*this.lineHeight,A=this.session.getScreenLength(),C=A*this.lineHeight,w=this.$getLongestLine(),$=!x&&(this.$hScrollBarAlwaysVisible||R.scrollerWidth-w-2*this.$padding<0),I=this.$horizScroll!==$;I&&(this.$horizScroll=$,this.scrollBarH.setVisible($));var F=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),x=R.height<=2*this.lineHeight);var O=R.scrollerHeight+this.lineHeight,B=!this.$maxLines&&this.$scrollPastEnd?(R.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=B;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,C-R.scrollerHeight+P.bottom))),this.session.setScrollLeft(Math.max(-P.left,Math.min(this.scrollLeft,w+2*this.$padding-R.scrollerWidth+P.right)));var V=!x&&(this.$vScrollBarAlwaysVisible||R.scrollerHeight-C+B<0||this.scrollTop>P.top),W=F!==V;W&&(this.$vScroll=V,this.scrollBarV.setVisible(V));var H=this.scrollTop%this.lineHeight,U=Math.ceil(O/this.lineHeight)-1,G=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),Y=G+U,Q,ee,ne=this.lineHeight;G=_.screenToDocumentRow(G,0);var se=_.getFoldLine(G);se&&(G=se.start.row),Q=_.documentToScreenRow(G,0),ee=_.getRowLength(G)*ne,Y=Math.min(_.screenToDocumentRow(Y,0),_.getLength()-1),O=R.scrollerHeight+_.getRowLength(Y)*ne+ee,H=this.scrollTop-Q*ne;var ge=0;return(this.layerConfig.width!=w||I)&&(ge=this.CHANGE_H_SCROLL),(I||W)&&(ge|=this.$updateCachedSize(!0,this.gutterWidth,R.width,R.height),this._signal("scrollbarVisibilityChanged"),W&&(w=this.$getLongestLine())),this.layerConfig={width:w,padding:this.$padding,firstRow:G,firstRowScreen:Q,lastRow:Y,lineHeight:ne,characterWidth:this.characterWidth,minHeight:O,maxHeight:C,offset:H,gutterOffset:ne?Math.max(0,Math.ceil((H+R.height-R.scrollerHeight)/ne)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(w-this.$padding),ge},k.prototype.$updateLines=function(){if(this.$changedLines){var _=this.$changedLines.firstRow,R=this.$changedLines.lastRow;this.$changedLines=null;var x=this.layerConfig;if(!(_>x.lastRow+1)&&!(Rthis.$textLayer.MAX_LINE_LENGTH&&(_=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(_*this.characterWidth))},k.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},k.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},k.prototype.addGutterDecoration=function(_,R){this.$gutterLayer.addGutterDecoration(_,R)},k.prototype.removeGutterDecoration=function(_,R){this.$gutterLayer.removeGutterDecoration(_,R)},k.prototype.updateBreakpoints=function(_){this._rows=_,this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.setAnnotations=function(_){this.$gutterLayer.setAnnotations(_),this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},k.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},k.prototype.showCursor=function(){this.$cursorLayer.showCursor()},k.prototype.scrollSelectionIntoView=function(_,R,x){this.scrollCursorIntoView(_,x),this.scrollCursorIntoView(R,x)},k.prototype.scrollCursorIntoView=function(_,R,x){if(this.$size.scrollerHeight!==0){var A=this.$cursorLayer.getPixelPosition(_),C=A.left,w=A.top,$=x&&x.top||0,I=x&&x.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var F=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;F+$>w?(R&&F+$>w+this.lineHeight&&(w-=R*this.$size.scrollerHeight),w===0&&(w=-this.scrollMargin.top),this.session.setScrollTop(w)):F+this.$size.scrollerHeight-I=1-this.scrollMargin.top||R>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||_<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||_>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},k.prototype.pixelToScreenCoordinates=function(_,R){var x;if(this.$hasCssTransforms){x={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([_,R]);_=A[1]-this.gutterWidth-this.margin.left,R=A[0]}else x=this.scroller.getBoundingClientRect();var C=_+this.scrollLeft-x.left-this.$padding,w=C/this.characterWidth,$=Math.floor((R+this.scrollTop-x.top)/this.lineHeight),I=this.$blockCursor?Math.floor(w):Math.round(w);return{row:$,column:I,side:w-I>0?1:-1,offsetX:C}},k.prototype.screenToTextCoordinates=function(_,R){var x;if(this.$hasCssTransforms){x={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([_,R]);_=A[1]-this.gutterWidth-this.margin.left,R=A[0]}else x=this.scroller.getBoundingClientRect();var C=_+this.scrollLeft-x.left-this.$padding,w=C/this.characterWidth,$=this.$blockCursor?Math.floor(w):Math.round(w),I=Math.floor((R+this.scrollTop-x.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max($,0),C)},k.prototype.textToScreenCoordinates=function(_,R){var x=this.scroller.getBoundingClientRect(),A=this.session.documentToScreenPosition(_,R),C=this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,_)?this.session.$bidiHandler.getPosLeft(A.column):Math.round(A.column*this.characterWidth)),w=A.row*this.lineHeight;return{pageX:x.left+C-this.scrollLeft,pageY:x.top+w-this.scrollTop}},k.prototype.visualizeFocus=function(){h.addCssClass(this.container,"ace_focus")},k.prototype.visualizeBlur=function(){h.removeCssClass(this.container,"ace_focus")},k.prototype.showComposition=function(_){this.$composition=_,_.cssText||(_.cssText=this.textarea.style.cssText),_.useTextareaForIME==null&&(_.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(h.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):_.markerId=this.session.addMarker(_.markerRange,"ace_composition_marker","text")},k.prototype.setCompositionText=function(_){var R=this.session.selection.cursor;this.addToken(_,"composition_placeholder",R.row,R.column),this.$moveTextAreaToCursor()},k.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),h.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var _=this.session.selection.cursor;this.removeExtraToken(_.row,_.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},k.prototype.setGhostText=function(_,R){var x=this.session.selection.cursor,A=R||{row:x.row,column:x.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(_,A);this.addToken(C[0].text,"ghost_text",A.row,A.column),this.$ghostText={text:_,position:{row:A.row,column:A.column}};var w=h.createElement("div");if(C.length>1){var $=this.hideTokensAfterPosition(A.row,A.column),I;C.slice(1).forEach(function(W){var H=h.createElement("div"),U=h.createElement("span");U.className="ace_ghost_text",W.wrapped&&(H.className="ghost_text_line_wrapped"),W.text.length===0&&(W.text=" "),U.appendChild(h.createTextNode(W.text)),H.appendChild(U),w.appendChild(H),I=H}),$.forEach(function(W){var H=h.createElement("span");S(W.type)||(H.className="ace_"+W.type.replace(/\./g," ace_")),H.appendChild(h.createTextNode(W.value)),I.appendChild(H)}),this.$ghostTextWidget={el:w,row:A.row,column:A.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var F=this.$cursorLayer.getPixelPosition(A,!0),O=this.container,B=O.getBoundingClientRect().height,P=C.length*this.lineHeight,V=P0){var O=0;F.push(C[$].length);for(var B=0;B1||Math.abs(_.$size.height-A)>1?_.$resizeTimer.delay():_.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},k}();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,a.implement(T.prototype,D),o.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(k){!k&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):k&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(k){this.$textLayer.setShowInvisibles(k)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(k){typeof k=="number"&&(this.$printMarginColumn=k),this.$showPrintMargin=!!k,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(k){this.$gutter.style.display=k?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(k){this.$gutterLayer.$useSvgGutterIcons=k},initialValue:!1},showFoldedAnnotations:{set:function(k){this.$gutterLayer.$showFoldedAnnotations=k},initialValue:!1},fadeFoldWidgets:{set:function(k){h.setCssClass(this.$gutter,"ace_fade-fold-widgets",k)},initialValue:!1},showFoldWidgets:{set:function(k){this.$gutterLayer.setShowFoldWidgets(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(k){this.$textLayer.setDisplayIndentGuides(k)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(k){this.$textLayer.setHighlightIndentGuides(k)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(k){this.$gutterLayer.setHighlightGutterLine(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(k){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(k){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(k){typeof k=="number"&&(k=k+"px"),this.container.style.fontSize=k,this.updateFontSize()},initialValue:12},fontFamily:{set:function(k){this.container.style.fontFamily=k,this.updateFontSize()}},maxLines:{set:function(k){this.updateFull()}},minLines:{set:function(k){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(k){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(k){k=+k||0,this.$scrollPastEnd!=k&&(this.$scrollPastEnd=k,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(k){this.$gutterLayer.$fixedWidth=!!k,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(k){this.$updateCustomScrollbar(k)},initialValue:!1},theme:{set:function(k){this.setTheme(k)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),u.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,u,v){var a=n("../lib/oop"),h=n("../lib/net"),d=n("../lib/event_emitter").EventEmitter,o=n("../config");function p(l){var s="importScripts('"+h.qualifyURL(l)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new c;return f.append(s),f.getBlob("application/javascript")}}function e(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var s=p(l),c=window.URL||window.webkitURL,f=c.createObjectURL(s);return new Worker(f)}return new Worker(l)}var t=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){a.implement(this,d),this.$createWorkerFromOldConfig=function(l,s,c,f,m){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),o.get("packaged")||!n.toUrl)f=f||o.moduleUrl(s,"worker");else{var y=this.$normalizePath;f=f||y(n.toUrl("ace/worker/worker.js",null,"_"));var D={};l.forEach(function(E){D[E]=y(n.toUrl(E,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=e(f),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:D,module:s,classname:c}),this.$worker},this.onMessage=function(l){var s=l.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var c=this.callbacks[s.id];c&&(c(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return h.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,s){this.$worker.postMessage({command:l,args:s})},this.call=function(l,s,c){if(c){var f=this.callbackId++;this.callbacks[f]=c,s.push(f)}this.send(l,s)},this.emit=function(l,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:s.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(t.prototype);var r=function(l,s,c){var f=null,m=!1,y=Object.create(d),D=[],E=new t({messageBuffer:D,terminate:function(){},postMessage:function(g){D.push(g),f&&(m?setTimeout(b):b())}});E.setEmitSync=function(g){m=g};var b=function(){var g=D.shift();g.command?f[g.command].apply(f,g.args):g.event&&y._signal(g.event,g.data)};return y.postMessage=function(g){E.onMessage({data:g})},y.callback=function(g,S){this.postMessage({type:"call",id:S,data:g})},y.emit=function(g,S){this.postMessage({type:"event",name:g,data:S})},o.loadModule(["worker",s],function(g){for(f=new g[c](y);D.length;)b()}),E};u.UIWorkerClient=r,u.WorkerClient=t,u.createWorker=e}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,u,v){var a=n("./range").Range,h=n("./lib/event_emitter").EventEmitter,d=n("./lib/oop"),o=function(){function p(e,t,r,l,s,c){var f=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){f.onCursorChange()})},this.$pos=r;var m=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var e=this,t=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=r.addMarker(new a(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var c=t.createAnchor(s.row,s.column);c.$insertRight=!0,c.detach(),e.others.push(c)}),r.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=e.addMarker(new a(r.row,r.column,r.row,r.column+t.length),t.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(e),l&&(this.length+=r),l&&!this.session.$fromUndo){if(e.action==="insert")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],m={row:f.row,column:f.column+s};this.doc.insertMergedLines(m,e.lines)}else if(e.action==="remove")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],m={row:f.row,column:f.column+s};this.doc.remove(new a(m.row,m.column,m.row,m.column-r))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,r=function(s,c){t.removeMarker(s.markerId),s.markerId=t.addMarker(new a(s.row,s.column,s.row,s.column+e.length),c,null,!1)};r(this.pos,this.mainClass);for(var l=this.others.length;l--;)r(this.others[l],this.othersClass)}},p.prototype.onCursorChange=function(e){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,r=0;r1?h.multiSelect.joinSelections():h.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(h){h.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(h){h.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(h){h.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],u.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(h){h.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(h){return h&&h.inMultiSelectMode}}];var a=n("../keyboard/hash_handler").HashHandler;u.keyboardHandler=new a(u.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,u,v){var a=n("./range_list").RangeList,h=n("./range").Range,d=n("./selection").Selection,o=n("./mouse/multi_select_handler").onMouseDown,p=n("./lib/event"),e=n("./lib/lang"),t=n("./commands/multi_select_commands");u.commands=t.defaultCommands.concat(t.multiSelectCommands);var r=n("./search").Search,l=new r;function s(E,b,g){return l.$options.wrap=!0,l.$options.needle=b,l.$options.backwards=g==-1,l.find(E)}var c=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(E,b){if(E){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(E),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),b||this.fromOrientedRange(E);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}E.cursor||(E.cursor=E.end);var S=this.rangeList.add(E);return this.$onAddRange(E),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(E)}},this.toSingleRange=function(E){E=E||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),E&&this.fromOrientedRange(E)},this.substractPoint=function(E){var b=this.rangeList.substractPoint(E);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var E=this.rangeList.merge();E.length&&this.$onRemoveRange(E)},this.$onAddRange=function(E){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(E),this._signal("addRange",{range:E})},this.$onRemoveRange=function(E){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();E.push(b),this.rangeCount=0}for(var g=E.length;g--;){var S=this.ranges.indexOf(E[g]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:E}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var E=this.ranges.length?this.ranges:[this.getRange()],b=[],g=0;g1){var E=this.rangeList.ranges,b=E[E.length-1],g=h.fromPoints(E[0].start,b.end);this.toSingleRange(),this.setSelectionRange(g,b.cursor==b.start)}else{var S=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),k=this.rectangularRangeBlock(S,T);k.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(E,b,g){var S=[],T=E.column0;)O--;if(O>0)for(var B=0;S[B].isEmpty();)B++;for(var P=O;P>=B;P--)S[P].isEmpty()&&S.splice(P,1)}return S}}.call(d.prototype);var f=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(E){E.cursor||(E.cursor=E.end);var b=this.getSelectionStyle();return E.marker=this.session.addMarker(E,"ace_selection",b),this.session.$selectionMarkers.push(E),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,E},this.removeSelectionMarker=function(E){if(E.marker){this.session.removeMarker(E.marker);var b=this.session.$selectionMarkers.indexOf(E);b!=-1&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(E){for(var b=this.session.$selectionMarkers,g=E.length;g--;){var S=E[g];if(S.marker){this.session.removeMarker(S.marker);var T=b.indexOf(S);T!=-1&&b.splice(T,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(E){this.addSelectionMarker(E.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(E){this.removeSelectionMarkers(E.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(E){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(t.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(E){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(t.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(E){var b=E.command,g=E.editor;if(g.multiSelect){if(b.multiSelectAction)b.multiSelectAction=="forEach"?S=g.forEachSelection(b,E.args):b.multiSelectAction=="forEachLine"?S=g.forEachSelection(b,E.args,!0):b.multiSelectAction=="single"?(g.exitMultiSelectMode(),S=b.exec(g,E.args||{})):S=b.multiSelectAction(g,E.args||{});else{var S=b.exec(g,E.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(E,b,g){if(!this.inVirtualSelectionMode){var S=g&&g.keepOrder,T=g==!0||g&&g.$byLines,k=this.session,_=this.selection,R=_.rangeList,x=(S?_:R).ranges,A;if(!x.length)return E.exec?E.exec(this,b||{}):E(this,b||{});var C=_._eventRegistry;_._eventRegistry={};var w=new d(k);this.inVirtualSelectionMode=!0;for(var $=x.length;$--;){if(T)for(;$>0&&x[$].start.row==x[$-1].end.row;)$--;w.fromOrientedRange(x[$]),w.index=$,this.selection=k.selection=w;var I=E.exec?E.exec(this,b||{}):E(this,b||{});!A&&I!==void 0&&(A=I),w.toOrientedRange(x[$])}w.detach(),this.selection=k.selection=_,this.inVirtualSelectionMode=!1,_._eventRegistry=C,_.mergeOverlappingRanges(),_.ranges[0]&&_.fromOrientedRange(_.ranges[0]);var F=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),F&&F.from==F.to&&this.renderer.animateScrolling(F.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var E="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,g=[],S=0;S0);_<0&&(_=0),R>=A&&(R=A-1)}var w=this.session.removeFullLines(_,R);w=this.$reAlignText(w,x),this.session.insert({row:_,column:0},w.join(` +`)+` +`),x||(k.start.column=0,k.end.column=w[w.length-1].length),this.selection.setRange(k)}else{T.forEach(function(O){b.substractPoint(O.cursor)});var $=0,I=1/0,F=g.map(function(O){var B=O.cursor,P=E.getLine(B.row),V=P.substr(B.column).search(/\S/g);return V==-1&&(V=0),B.column>$&&($=B.column),VW?E.insert(P,e.stringRepeat(" ",V-W)):E.remove(new h(P.row,P.column,P.row,P.column-V+W)),O.start.column=O.end.column=$,O.start.row=O.end.row=P.row,O.cursor=O.end}),b.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(E,b){var g=!0,S=!0,T,k,_;return E.map(function(w){var $=w.match(/(\s*)(.*?)(\s*)([=:].*)/);return $?T==null?(T=$[1].length,k=$[2].length,_=$[3].length,$):(T+k+_!=$[1].length+$[2].length+$[3].length&&(S=!1),T!=$[1].length&&(g=!1),T>$[1].length&&(T=$[1].length),k<$[2].length&&(k=$[2].length),_>$[3].length&&(_=$[3].length),$):[w]}).map(b?x:g?S?A:x:C);function R(w){return e.stringRepeat(" ",w)}function x(w){return w[2]?R(T)+w[2]+R(k-w[2].length+_)+w[4].replace(/^([=:])\s+/,"$1 "):w[0]}function A(w){return w[2]?R(T+k-w[2].length)+w[2]+R(_)+w[4].replace(/^([=:])\s+/,"$1 "):w[0]}function C(w){return w[2]?R(T)+w[2]+R(_)+w[4].replace(/^([=:])\s+/,"$1 "):w[0]}}}).call(f.prototype);function m(E,b){return E.row==b.row&&E.column==b.column}u.onSessionChange=function(E){var b=E.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var g=E.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(E){E.$multiselectOnSessionChange||(E.$onAddRange=E.$onAddRange.bind(E),E.$onRemoveRange=E.$onRemoveRange.bind(E),E.$onMultiSelect=E.$onMultiSelect.bind(E),E.$onSingleSelect=E.$onSingleSelect.bind(E),E.$multiselectOnSessionChange=u.onSessionChange.bind(E),E.$checkMultiselectChange=E.$checkMultiselectChange.bind(E),E.$multiselectOnSessionChange(E),E.on("changeSession",E.$multiselectOnSessionChange),E.on("mousedown",o),E.commands.addCommands(t.defaultCommands),D(E))}function D(E){if(!E.textInput)return;var b=E.textInput.getElement(),g=!1;p.addListener(b,"keydown",function(T){var k=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);E.$blockSelectEnabled&&k?g||(E.renderer.setMouseCursor("crosshair"),g=!0):g&&S()},E),p.addListener(b,"keyup",S,E),p.addListener(b,"blur",S,E);function S(T){g&&(E.renderer.setMouseCursor(""),g=!1)}}u.MultiSelect=y,n("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(E){y(this),E?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(E){this.$blockSelectEnabled=E},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,u,v){var a=n("../../range").Range,h=u.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,o,p){var e=d.getLine(p);return this.foldingStartMarker.test(e)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(d,o,p){return null},this.indentationBlock=function(d,o,p){var e=/\S/,t=d.getLine(o),r=t.search(e);if(r!=-1){for(var l=p||t.length,s=d.getLength(),c=o,f=o;++oc){var D=d.getLine(f).length;return new a(c,l,f,D)}}},this.openingBracketBlock=function(d,o,p,e,t){var r={row:p,column:e+1},l=d.$findClosingBracket(o,r,t);if(l){var s=d.foldWidgets[l.row];return s==null&&(s=d.getFoldWidget(l.row)),s=="start"&&l.row>r.row&&(l.row--,l.column=d.getLine(l.row).length),a.fromPoints(r,l)}},this.closingBracketBlock=function(d,o,p,e,t){var r={row:p,column:e},l=d.$findOpeningBracket(o,r);if(l)return l.column++,r.column--,a.fromPoints(l,r)}}).call(h.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,u,v){var a=n("../lib/dom"),h=n("../range").Range,d=n("../config").nls;function o(e,t,r){for(var l=0,s=e.length-1;l<=s;){var c=l+s>>1,f=r(t,e[c]);if(f>0)l=c+1;else if(f<0)s=c-1;else return c}return-(l+1)}function p(e,t,r){var l=e.getAnnotations().sort(h.comparePoints);if(l.length){var s=o(l,{row:t,column:-1},h.comparePoints);s<0&&(s=-s-1),s>=l.length?s=r>0?0:l.length-1:s===0&&r<0&&(s=l.length-1);var c=l[s];if(!(!c||!r)){if(c.row===t){do c=l[s+=r];while(c&&c.row===t);if(!c)return l.slice()}var f=[];t=c.row;do f[r<0?"unshift":"push"](c),c=l[s+=r];while(c&&c.row==t);return f.length&&f}}}u.showErrorMarker=function(e,t){var r=e.session,l=e.getCursorPosition(),s=l.row,c=r.widgetManager.getWidgetsAtRow(s).filter(function(T){return T.type=="errorMarker"})[0];c?c.destroy():s-=t;var f=p(r,s,t),m;if(f){var y=f[0];l.column=(y.pos&&typeof y.column!="number"?y.pos.sc:y.column)||0,l.row=y.row,m=e.renderer.$gutterLayer.$annotations[l.row]}else{if(c)return;m={displayText:[d("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(l.row),e.selection.moveToPosition(l);var D={row:l.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},E=D.el.appendChild(a.createElement("div")),b=D.el.appendChild(a.createElement("div"));b.className="error_widget_arrow "+m.className;var g=e.renderer.$cursorLayer.getPixelPosition(l).left;b.style.left=g+e.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",E.className="error_widget "+m.className,m.displayText.forEach(function(T,k){E.appendChild(a.createTextNode(T)),k-1}function yr(z,J){var te=this.__data__,ie=Xt(te,z);return ie<0?(++this.size,te.push([z,J])):te[ie][1]=J,this}qe.prototype.clear=fr,qe.prototype.delete=gr,qe.prototype.get=mr,qe.prototype.has=vr,qe.prototype.set=yr;function vt(z){var J=-1,te=z==null?0:z.length;for(this.clear();++JLe))return!1;var Te=he.get(z);if(Te&&he.get(J))return Te==J;var Pe=-1,Ue=!0,Oe=te&a?new Qt:void 0;for(he.set(z,J),he.set(J,z);++Pe-1&&z%1==0&&z-1&&z%1==0&&z<=h}function ai(z){var J=typeof z;return z!=null&&(J=="object"||J=="function")}function Ht(z){return z!=null&&typeof z=="object"}var li=ke?Rt(ke):Rr;function Yr(z){return Kr(z)?Mr(z):Or(z)}function Qr(){return[]}function Xr(){return!1}L.exports=Jr})(gn,gn.exports);var Gi=gn.exports,Je={};Object.defineProperty(Je,"__esModule",{value:!0});Je.getAceInstance=Je.debounce=Je.editorEvents=Je.editorOptions=void 0;var uo=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Je.editorOptions=uo;var ho=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Je.editorEvents=ho;var co=function(){var L;return typeof window>"u"?(He.window={},L=fn,delete He.window):window.ace?(L=window.ace,L.acequire=window.ace.require||window.ace.acequire):L=fn,L};Je.getAceInstance=co;var po=function(L,i){var n=null;return function(){var u=this,v=arguments;clearTimeout(n),n=setTimeout(function(){L.apply(u,v)},i)}};Je.debounce=po;var fo=Dt&&Dt.__extends||function(){var L=function(i,n){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,v){u.__proto__=v}||function(u,v){for(var a in v)Object.prototype.hasOwnProperty.call(v,a)&&(u[a]=v[a])},L(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");L(i,n);function u(){this.constructor=i}i.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}(),jn=Dt&&Dt.__assign||function(){return jn=Object.assign||function(L){for(var i,n=1,u=arguments.length;n0&&this.handleMarkers(S);var R=this.editor.$options;Lt.editorOptions.forEach(function(x){R.hasOwnProperty(x)?n.editor.setOption(x,n.props[x]):n.props[x]&&console.warn("ReactAce: editor option ".concat(x," 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(b)&&b.forEach(function(x){typeof x.exec=="string"?n.editor.commands.bindKey(x.bindKey,x.exec):n.editor.commands.addCommand(x)}),D&&this.editor.setKeyboardHandler("ace/keyboard/"+D),v&&(this.refEditor.className+=" "+v),E&&E(this.editor),this.editor.resize(),o&&this.editor.focus()},i.prototype.componentDidUpdate=function(n){for(var u=n,v=this.props,a=0;a 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splitst;)r=this.$editors[this.$splits-1],this.$container.removeChild(r.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(r){r.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(r){r.setKeyboardHandler(t)})},this.forEach=function(t,r){this.$editors.forEach(t,r)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(r){r.setFontSize(t)})},this.$cloneSession=function(t){var r=new p(t.getDocument(),t.getMode()),l=t.getUndoManager();return r.setUndoManager(l),r.setTabSize(t.getTabSize()),r.setUseSoftTabs(t.getUseSoftTabs()),r.setOverwrite(t.getOverwrite()),r.setBreakpoints(t.getBreakpoints()),r.setUseWrapMode(t.getUseWrapMode()),r.setUseWorker(t.getUseWorker()),r.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),r.$foldData=t.$cloneFoldData(),r},this.setSession=function(t,r){var l;r==null?l=this.$cEditor:l=this.$editors[r];var s=this.$editors.some(function(c){return c.session===t});return s&&(t=this.$cloneSession(t)),l.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t=this.$container.clientWidth,r=this.$container.clientHeight,l;if(this.$orientation==this.BESIDE)for(var s=t/this.$splits,c=0;c-1}function Ko(L,i){var n=this.__data__,u=vn(n,L);return u<0?n.push([L,i]):n[u][1]=i,this}Ft.prototype.clear=jo;Ft.prototype.delete=Vo;Ft.prototype.get=Uo;Ft.prototype.has=Go;Ft.prototype.set=Ko;function xt(L){var i=-1,n=L?L.length:0;for(this.clear();++i0&&n.handleMarkers(F,x);for(var C=0;C"u"&&(this.Diff_Timeout<=0?o=Number.MAX_VALUE:o=new Date().getTime()+this.Diff_Timeout*1e3);var p=o;if(a==null||h==null)throw new Error("Null input. (diff_main)");if(a==h)return a?[new i.Diff(v,a)]:[];typeof d>"u"&&(d=!0);var e=d,t=this.diff_commonPrefix(a,h),r=a.substring(0,t);a=a.substring(t),h=h.substring(t),t=this.diff_commonSuffix(a,h);var l=a.substring(a.length-t);a=a.substring(0,a.length-t),h=h.substring(0,h.length-t);var s=this.diff_compute_(a,h,e,p);return r&&s.unshift(new i.Diff(v,r)),l&&s.push(new i.Diff(v,l)),this.diff_cleanupMerge(s),s},i.prototype.diff_compute_=function(a,h,d,o){var p;if(!a)return[new i.Diff(u,h)];if(!h)return[new i.Diff(n,a)];var e=a.length>h.length?a:h,t=a.length>h.length?h:a,r=e.indexOf(t);if(r!=-1)return p=[new i.Diff(u,e.substring(0,r)),new i.Diff(v,t),new i.Diff(u,e.substring(r+t.length))],a.length>h.length&&(p[0][0]=p[2][0]=n),p;if(t.length==1)return[new i.Diff(n,a),new i.Diff(u,h)];var l=this.diff_halfMatch_(a,h);if(l){var s=l[0],c=l[1],f=l[2],m=l[3],y=l[4],D=this.diff_main(s,f,d,o),E=this.diff_main(c,m,d,o);return D.concat([new i.Diff(v,y)],E)}return d&&a.length>100&&h.length>100?this.diff_lineMode_(a,h,o):this.diff_bisect_(a,h,o)},i.prototype.diff_lineMode_=function(a,h,d){var o=this.diff_linesToChars_(a,h);a=o.chars1,h=o.chars2;var p=o.lineArray,e=this.diff_main(a,h,!1,d);this.diff_charsToLines_(e,p),this.diff_cleanupSemantic(e),e.push(new i.Diff(v,""));for(var t=0,r=0,l=0,s="",c="";t=1&&l>=1){e.splice(t-r-l,r+l),t=t-r-l;for(var f=this.diff_main(s,c,!1,d),m=f.length-1;m>=0;m--)e.splice(t,0,f[m]);t=t+f.length}l=0,r=0,s="",c="";break}t++}return e.pop(),e},i.prototype.diff_bisect_=function(a,h,d){for(var o=a.length,p=h.length,e=Math.ceil((o+p)/2),t=e,r=2*e,l=new Array(r),s=new Array(r),c=0;cd);g++){for(var S=-g+y;S<=g-D;S+=2){var T=t+S,k;S==-g||S!=g&&l[T-1]o)D+=2;else if(_>p)y+=2;else if(m){var R=t+f-S;if(R>=0&&R=x)return this.diff_bisectSplit_(a,h,k,_,d)}}}for(var A=-g+E;A<=g-b;A+=2){var R=t+A,x;A==-g||A!=g&&s[R-1]o)b+=2;else if(C>p)E+=2;else if(!m){var T=t+f-A;if(T>=0&&T=x)return this.diff_bisectSplit_(a,h,k,_,d)}}}}return[new i.Diff(n,a),new i.Diff(u,h)]},i.prototype.diff_bisectSplit_=function(a,h,d,o,p){var e=a.substring(0,d),t=h.substring(0,o),r=a.substring(d),l=h.substring(o),s=this.diff_main(e,t,!1,p),c=this.diff_main(r,l,!1,p);return s.concat(c)},i.prototype.diff_linesToChars_=function(a,h){var d=[],o={};d[0]="";function p(l){for(var s="",c=0,f=-1,m=d.length;fo?a=a.substring(d-o):dh.length?a:h,o=a.length>h.length?h:a;if(d.length<4||o.length*2=D.length?[k,_,R,x,T]:null}var t=e(d,o,Math.ceil(d.length/4)),r=e(d,o,Math.ceil(d.length/2)),l;if(!t&&!r)return null;r?t?l=t[4].length>r[4].length?t:r:l=r:l=t;var s,c,f,m;a.length>h.length?(s=l[0],c=l[1],f=l[2],m=l[3]):(f=l[0],m=l[1],s=l[2],c=l[3]);var y=l[4];return[s,c,f,m,y]},i.prototype.diff_cleanupSemantic=function(a){for(var h=!1,d=[],o=0,p=null,e=0,t=0,r=0,l=0,s=0;e0?d[o-1]:-1,t=0,r=0,l=0,s=0,p=null,h=!0)),e++;for(h&&this.diff_cleanupMerge(a),this.diff_cleanupSemanticLossless(a),e=1;e=y?(m>=c.length/2||m>=f.length/2)&&(a.splice(e,0,new i.Diff(v,f.substring(0,m))),a[e-1][1]=c.substring(0,c.length-m),a[e+1][1]=f.substring(m),e++):(y>=c.length/2||y>=f.length/2)&&(a.splice(e,0,new i.Diff(v,c.substring(0,y))),a[e-1][0]=u,a[e-1][1]=f.substring(0,f.length-y),a[e+1][0]=n,a[e+1][1]=c.substring(y),e++),e++}e++}},i.prototype.diff_cleanupSemanticLossless=function(a){function h(y,D){if(!y||!D)return 6;var E=y.charAt(y.length-1),b=D.charAt(0),g=E.match(i.nonAlphaNumericRegex_),S=b.match(i.nonAlphaNumericRegex_),T=g&&E.match(i.whitespaceRegex_),k=S&&b.match(i.whitespaceRegex_),_=T&&E.match(i.linebreakRegex_),R=k&&b.match(i.linebreakRegex_),x=_&&y.match(i.blanklineEndRegex_),A=R&&D.match(i.blanklineStartRegex_);return x||A?5:_||R?4:g&&!T&&k?3:T||k?2:g||S?1:0}for(var d=1;d=f&&(f=m,l=o,s=p,c=e)}a[d-1][1]!=l&&(l?a[d-1][1]=l:(a.splice(d-1,1),d--),a[d][1]=s,c?a[d+1][1]=c:(a.splice(d+1,1),d--))}d++}},i.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,i.whitespaceRegex_=/\s/,i.linebreakRegex_=/[\r\n]/,i.blanklineEndRegex_=/\n\r?\n$/,i.blanklineStartRegex_=/^\r?\n\r?\n/,i.prototype.diff_cleanupEfficiency=function(a){for(var h=!1,d=[],o=0,p=null,e=0,t=!1,r=!1,l=!1,s=!1;e0?d[o-1]:-1,l=s=!1),h=!0)),e++;h&&this.diff_cleanupMerge(a)},i.prototype.diff_cleanupMerge=function(a){a.push(new i.Diff(v,""));for(var h=0,d=0,o=0,p="",e="",t;h1?(d!==0&&o!==0&&(t=this.diff_commonPrefix(e,p),t!==0&&(h-d-o>0&&a[h-d-o-1][0]==v?a[h-d-o-1][1]+=e.substring(0,t):(a.splice(0,0,new i.Diff(v,e.substring(0,t))),h++),e=e.substring(t),p=p.substring(t)),t=this.diff_commonSuffix(e,p),t!==0&&(a[h][1]=e.substring(e.length-t)+a[h][1],e=e.substring(0,e.length-t),p=p.substring(0,p.length-t))),h-=d+o,a.splice(h,d+o),p.length&&(a.splice(h,0,new i.Diff(n,p)),h++),e.length&&(a.splice(h,0,new i.Diff(u,e)),h++),h++):h!==0&&a[h-1][0]==v?(a[h-1][1]+=a[h][1],a.splice(h,1)):h++,o=0,d=0,p="",e="";break}a[a.length-1][1]===""&&a.pop();var r=!1;for(h=1;hh));t++)p=d,e=o;return a.length!=t&&a[t][0]===n?e:e+(h-p)},i.prototype.diff_prettyHtml=function(a){for(var h=[],d=/&/g,o=//g,e=/\n/g,t=0;t");switch(r){case u:h[t]=''+s+"";break;case n:h[t]=''+s+"";break;case v:h[t]=""+s+"";break}}return h.join("")},i.prototype.diff_text1=function(a){for(var h=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(h),p=this;function e(k,_){var R=k/h.length,x=Math.abs(d-_);return p.Match_Distance?R+x/p.Match_Distance:x?1:R}var t=this.Match_Threshold,r=a.indexOf(h,d);r!=-1&&(t=Math.min(e(0,r),t),r=a.lastIndexOf(h,d+h.length),r!=-1&&(t=Math.min(e(0,r),t)));var l=1<=D;g--){var S=o[a.charAt(g-1)];if(y===0?b[g]=(b[g+1]<<1|1)&S:b[g]=(b[g+1]<<1|1)&S|((m[g+1]|m[g])<<1|1)|m[g+1],b[g]&l){var T=e(y,g-1);if(T<=t)if(t=T,r=g-1,r>d)D=Math.max(1,2*d-r);else break}}if(e(y+1,d)>t)break;m=b}return r},i.prototype.match_alphabet_=function(a){for(var h={},d=0;d"u")o=a,p=this.diff_main(o,h,!0),p.length>2&&(this.diff_cleanupSemantic(p),this.diff_cleanupEfficiency(p));else if(a&&typeof a=="object"&&typeof h>"u"&&typeof d>"u")p=a,o=this.diff_text1(p);else if(typeof a=="string"&&h&&typeof h=="object"&&typeof d>"u")o=a,p=h;else if(typeof a=="string"&&typeof h=="string"&&d&&typeof d=="object")o=a,p=d;else throw new Error("Unknown call format to patch_make.");if(p.length===0)return[];for(var e=[],t=new i.patch_obj,r=0,l=0,s=0,c=o,f=o,m=0;m=2*this.Patch_Margin&&r&&(this.patch_addContext_(t,c),e.push(t),t=new i.patch_obj,r=0,c=f,l=s);break}y!==u&&(l+=D.length),y!==n&&(s+=D.length)}return r&&(this.patch_addContext_(t,c),e.push(t)),e},i.prototype.patch_deepCopy=function(a){for(var h=[],d=0;dthis.Match_MaxBits?(l=this.match_main(h,r.substring(0,this.Match_MaxBits),t),l!=-1&&(s=this.match_main(h,r.substring(r.length-this.Match_MaxBits),t+r.length-this.Match_MaxBits),(s==-1||l>=s)&&(l=-1))):l=this.match_main(h,r,t),l==-1)p[e]=!1,o-=a[e].length2-a[e].length1;else{p[e]=!0,o=l-t;var c;if(s==-1?c=h.substring(l,l+r.length):c=h.substring(l,s+this.Match_MaxBits),r==c)h=h.substring(0,l)+this.diff_text2(a[e].diffs)+h.substring(l+r.length);else{var f=this.diff_main(r,c,!1);if(r.length>this.Match_MaxBits&&this.diff_levenshtein(f)/r.length>this.Patch_DeleteThreshold)p[e]=!1;else{this.diff_cleanupSemanticLossless(f);for(var m=0,y,D=0;De[0][1].length){var t=h-e[0][1].length;e[0][1]=d.substring(e[0][1].length)+e[0][1],p.start1-=t,p.start2-=t,p.length1+=t,p.length2+=t}if(p=a[a.length-1],e=p.diffs,e.length==0||e[e.length-1][0]!=v)e.push(new i.Diff(v,d)),p.length1+=h,p.length2+=h;else if(h>e[e.length-1][1].length){var t=h-e[e.length-1][1].length;e[e.length-1][1]+=d.substring(0,t),p.length1+=t,p.length2+=t}return d},i.prototype.patch_splitMax=function(a){for(var h=this.Match_MaxBits,d=0;d2*h?(r.length1+=c.length,p+=c.length,l=!1,r.diffs.push(new i.Diff(s,c)),o.diffs.shift()):(c=c.substring(0,h-r.length1-this.Patch_Margin),r.length1+=c.length,p+=c.length,s===v?(r.length2+=c.length,e+=c.length):l=!1,r.diffs.push(new i.Diff(s,c)),c==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(c.length))}t=this.diff_text2(r.diffs),t=t.substring(t.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);f!==""&&(r.length1+=f.length,r.length2+=f.length,r.diffs.length!==0&&r.diffs[r.diffs.length-1][0]===v?r.diffs[r.diffs.length-1][1]+=f:r.diffs.push(new i.Diff(v,f))),l||a.splice(++d,0,r)}}},i.prototype.patch_toText=function(a){for(var h=[],d=0;dm)break;var y=this.getFoldWidgetRange(p,"all",e);if(y){if(y.start.row<=l)break;if(y.isMultiLine())e=y.end.row;else if(r==m)break}c=e}}return new h(l,s,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,e,t){for(var r=e.search(/\s*$/),l=p.getLength(),s=t,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++ts)return new h(s,r,y,e.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(n,u,v){var a=n("../lib/oop"),h=n("./text").Mode,d=n("./json_highlight_rules").JsonHighlightRules,o=n("./matching_brace_outdent").MatchingBraceOutdent,p=n("./folding/cstyle").FoldMode,e=n("../worker/worker_client").WorkerClient,t=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};a.inherits(t,h),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,l,s){var c=this.$getIndent(l);if(r=="start"){var f=l.match(/^.*[\{\(\[]\s*$/);f&&(c+=s)}return c},this.checkOutdent=function(r,l,s){return this.$outdent.checkOutdent(l,s)},this.autoOutdent=function(r,l,s){this.$outdent.autoOutdent(l,s)},this.createWorker=function(r){var l=new e(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(r.getDocument()),l.on("annotate",function(s){r.setAnnotations(s.data)}),l.on("terminate",function(){r.clearAnnotations()}),l},this.$id="ace/mode/json"}.call(t.prototype),u.Mode=t}),function(){ace.require(["ace/mode/json"],function(n){L&&(L.exports=n)})}()})(Ta);var _a={exports:{}};(function(L,i){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,u,v){var a=n("../lib/oop"),h=n("./text_highlight_rules").TextHighlightRules,d=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"}]}};a.inherits(d,h),u.JsonHighlightRules=d}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(n,u,v){var a=n("../lib/oop"),h=n("./json_highlight_rules").JsonHighlightRules,d=function(){h.call(this);var o=[{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 p in this.$rules)this.$rules[p].unshift.apply(this.$rules[p],o);this.normalizeRules()};a.inherits(d,h),u.Json5HighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,u,v){var a=n("../range").Range,h=function(){};(function(){this.checkOutdent=function(d,o){return/^\s+$/.test(d)?/^\s*\}/.test(o):!1},this.autoOutdent=function(d,o){var p=d.getLine(o),e=p.match(/^(\s*\})/);if(!e)return 0;var t=e[1].length,r=d.findMatchingBracket({row:o,column:t});if(!r||r.row==o)return 0;var l=this.$getIndent(d.getLine(r.row));d.replace(new a(o,0,o,t-1),l)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(h.prototype),u.MatchingBraceOutdent=h}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,u,v){var a=n("../../lib/oop"),h=n("../../range").Range,d=n("./fold_mode").FoldMode,o=u.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};a.inherits(o,d),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(p,e,t){var r=p.getLine(t);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var l=this._getFoldWidgetBase(p,e,t);return!l&&this.startRegionRe.test(r)?"start":l},this.getFoldWidgetRange=function(p,e,t,r){var l=p.getLine(t);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(p,l,t);var f=l.match(this.foldingStartMarker);if(f){var s=f.index;if(f[1])return this.openingBracketBlock(p,f[1],t,s);var c=p.getCommentFoldRange(t,s+f[0].length,1);return c&&!c.isMultiLine()&&(r?c=this.getSectionRange(p,t):e!="all"&&(c=null)),c}if(e!=="markbegin"){var f=l.match(this.foldingStopMarker);if(f){var s=f.index+f[0].length;return f[1]?this.closingBracketBlock(p,f[1],t,s):p.getCommentFoldRange(t,s,-1)}}},this.getSectionRange=function(p,e){var t=p.getLine(e),r=t.search(/\S/),l=e,s=t.length;e+=1;for(var c=e,f=p.getLength();++em)break;var y=this.getFoldWidgetRange(p,"all",e);if(y){if(y.start.row<=l)break;if(y.isMultiLine())e=y.end.row;else if(r==m)break}c=e}}return new h(l,s,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,e,t){for(var r=e.search(/\s*$/),l=p.getLength(),s=t,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++ts)return new h(s,r,y,e.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(n,u,v){var a=n("../lib/oop"),h=n("./text").Mode,d=n("./json5_highlight_rules").Json5HighlightRules,o=n("./matching_brace_outdent").MatchingBraceOutdent,p=n("./folding/cstyle").FoldMode,e=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};a.inherits(e,h),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(t,r,l){return this.$outdent.checkOutdent(r,l)},this.autoOutdent=function(t,r,l){this.$outdent.autoOutdent(r,l)},this.$id="ace/mode/json5"}.call(e.prototype),u.Mode=e}),function(){ace.require(["ace/mode/json5"],function(n){L&&(L.exports=n)})}()})(_a);var ka={};(function(L){function i(v,a){for(var h=v,d="";h;){var o=a[h];if(typeof o=="string")return o+d;if(o)return o.location.replace(/\/*$/,"/")+(d||o.main||o.name);if(o===!1)return"";var p=h.lastIndexOf("/");if(p===-1)break;d=h.substr(p)+d,h=h.slice(0,p)}return v}if(!(typeof L.window<"u"&&L.document)&&!(L.require&&L.define)){L.console||(L.console=function(){var v=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:v})},L.console.error=L.console.warn=L.console.log=L.console.trace=L.console),L.window=L,L.ace=L,L.onerror=function(v,a,h,d,o){postMessage({type:"error",data:{message:v,data:o&&o.data,file:a,line:h,col:d,stack:o&&o.stack}})},L.normalizeModule=function(v,a){if(a.indexOf("!")!==-1){var h=a.split("!");return L.normalizeModule(v,h[0])+"!"+L.normalizeModule(v,h[1])}if(a.charAt(0)=="."){var d=v.split("/").slice(0,-1).join("/");for(a=(d?d+"/":"")+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},L.require=function(v,a){if(a||(a=v,v=null),!a.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");a=L.normalizeModule(v,a);var h=L.require.modules[a];if(h)return h.initialized||(h.initialized=!0,h.exports=h.factory().exports),h.exports;if(!L.require.tlns)return console.log("unable to load "+a);var d=i(a,L.require.tlns);return d.slice(-3)!=".js"&&(d+=".js"),L.require.id=a,L.require.modules[a]={},importScripts(d),L.require(v,a)},L.require.modules={},L.require.tlns={},L.define=function(v,a,h){if(arguments.length==2?(h=a,typeof v!="string"&&(a=v,v=L.require.id)):arguments.length==1&&(h=v,a=[],v=L.require.id),typeof h!="function"){L.require.modules[v]={exports:h,initialized:!0};return}a.length||(a=["require","exports","module"]);var d=function(o){return L.require(v,o)};L.require.modules[v]={exports:{},factory:function(){var o=this,p=h.apply(this,a.slice(0,h.length).map(function(e){switch(e){case"require":return d;case"exports":return o.exports;case"module":return o;default:return d(e)}}));return p&&(o.exports=p),o}}},L.define.amd={},L.require.tlns={},L.initBaseUrls=function(v){for(var a in v)this.require.tlns[a]=v[a]},L.initSender=function(){var v=L.require("ace/lib/event_emitter").EventEmitter,a=L.require("ace/lib/oop"),h=function(){};return function(){a.implement(this,v),this.callback=function(d,o){postMessage({type:"call",id:o,data:d})},this.emit=function(d,o){postMessage({type:"event",name:d,data:o})}}.call(h.prototype),new h};var n=L.main=null,u=L.sender=null;L.onmessage=function(v){var a=v.data;if(a.event&&u)u._signal(a.event,a.data);else if(a.command)if(n[a.command])n[a.command].apply(n,a.args);else{if(!L[a.command])throw new Error("Unknown command:"+a.command);L[a.command].apply(L,a.args)}else if(a.init){L.initBaseUrls(a.tlns),u=L.sender=L.initSender();var h=this.require(a.module)[a.classname];n=L.main=new h(u)}}}})(ka),ace.define("ace/lib/oop",[],function(L,i,n){i.inherits=function(u,v){u.super_=v,u.prototype=Object.create(v.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(u,v){for(var a in v)u[a]=v[a];return u},i.implement=function(u,v){i.mixin(u,v)}}),ace.define("ace/apply_delta",[],function(L,i,n){i.applyDelta=function(u,v,a){var h=v.start.row,d=v.start.column,o=u[h]||"";switch(v.action){case"insert":var p=v.lines;if(p.length===1)u[h]=o.substring(0,d)+v.lines[0]+o.substring(d);else{var e=[h,1].concat(v.lines);u.splice.apply(u,e),u[h]=o.substring(0,d)+u[h],u[h+v.lines.length-1]+=o.substring(d)}break;case"remove":var t=v.end.column,r=v.end.row;h===r?u[h]=o.substring(0,d)+o.substring(t):u.splice(h,r-h+1,o.substring(0,d)+u[r].substring(t))}}}),ace.define("ace/lib/event_emitter",[],function(L,i,n){var u={},v=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};u._emit=u._dispatchEvent=function(h,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[h]||[],p=this._defaultHandlers[h];if(!(!o.length&&!p)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=h),d.stopPropagation||(d.stopPropagation=v),d.preventDefault||(d.preventDefault=a),o=o.slice();for(var e=0;e ["+this.end.row+"/"+this.end.column+"]"},v.prototype.contains=function(a,h){return this.compare(a,h)==0},v.prototype.compareRange=function(a){var h,d=a.end,o=a.start;return h=this.compare(d.row,d.column),h==1?(h=this.compare(o.row,o.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(o.row,o.column),h==-1?-1:h==1?42:0)},v.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},v.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},v.prototype.intersects=function(a){var h=this.compareRange(a);return h==-1||h==0||h==1},v.prototype.isEnd=function(a,h){return this.end.row==a&&this.end.column==h},v.prototype.isStart=function(a,h){return this.start.row==a&&this.start.column==h},v.prototype.setStart=function(a,h){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=h)},v.prototype.setEnd=function(a,h){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=h)},v.prototype.inside=function(a,h){return this.compare(a,h)==0?!(this.isEnd(a,h)||this.isStart(a,h)):!1},v.prototype.insideStart=function(a,h){return this.compare(a,h)==0?!this.isEnd(a,h):!1},v.prototype.insideEnd=function(a,h){return this.compare(a,h)==0?!this.isStart(a,h):!1},v.prototype.compare=function(a,h){return!this.isMultiLine()&&a===this.start.row?hthis.end.column?1:0:athis.end.row?1:this.start.row===a?h>=this.start.column?0:-1:this.end.row===a?h<=this.end.column?0:1:0},v.prototype.compareStart=function(a,h){return this.start.row==a&&this.start.column==h?-1:this.compare(a,h)},v.prototype.compareEnd=function(a,h){return this.end.row==a&&this.end.column==h?1:this.compare(a,h)},v.prototype.compareInside=function(a,h){return this.end.row==a&&this.end.column==h?1:this.start.row==a&&this.start.column==h?-1:this.compare(a,h)},v.prototype.clipRows=function(a,h){if(this.end.row>h)var d={row:h+1,column:0};else if(this.end.rowh)var o={row:h+1,column:0};else if(this.start.rowthis.row)){var e=v(p,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},o.prototype.setPosition=function(p,e,t){var r;if(t?r={row:p,column:e}:r=this.$clipPositionToDocument(p,e),!(this.row==r.row&&this.column==r.column)){var l={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:l,value:r})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(p){this.document=p||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(p,e){var t={};return p>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):p<0?(t.row=0,t.column=0):(t.row=p,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,e))),e<0&&(t.column=0),t},o}();d.prototype.$insertRight=!1,a.implement(d.prototype,h),i.Anchor=d}),ace.define("ace/document",[],function(L,i,n){var u=L("./lib/oop"),v=L("./apply_delta").applyDelta,a=L("./lib/event_emitter").EventEmitter,h=L("./range").Range,d=L("./anchor").Anchor,o=function(){function p(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return p.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new h(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},p.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},p.prototype.createAnchor=function(e,t){return new d(this,e,t)},p.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:` +`,this._signal("changeNewLineMode")},p.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r +`;case"unix":return` +`;default:return this.$autoNewLine||` +`}},p.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},p.prototype.getNewLineMode=function(){return this.$newLineMode},p.prototype.isNewLine=function(e){return e==`\r +`||e=="\r"||e==` +`},p.prototype.getLine=function(e){return this.$lines[e]||""},p.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},p.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},p.prototype.getLength=function(){return this.$lines.length},p.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},p.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var r=t.length-1;e.end.row-e.start.row==r&&(t[r]=t[r].substring(0,e.end.column))}return t},p.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},p.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},p.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},p.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},p.prototype.insertInLine=function(e,t){var r=this.clippedPos(e.row,e.column),l=this.pos(e.row,e.column+t.length);return this.applyDelta({start:r,end:l,action:"insert",lines:[t]},!0),this.clonePos(l)},p.prototype.clippedPos=function(e,t){var r=this.getLength();e===void 0?e=r:e<0?e=0:e>=r&&(e=r-1,t=void 0);var l=this.getLine(e);return t==null&&(t=l.length),t=Math.min(Math.max(t,0),l.length),{row:e,column:t}},p.prototype.clonePos=function(e){return{row:e.row,column:e.column}},p.prototype.pos=function(e,t){return{row:e,column:t}},p.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},p.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var r=0;e0,l=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},p.prototype.replace=function(e,t){if(e instanceof h||(e=h.fromPoints(e.start,e.end)),t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var r;return t?r=this.insert(e.start,t):r=e.start,r},p.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},p.prototype.applyDelta=function(e,t){var r=e.action=="insert";(r?e.lines.length<=1&&!e.lines[0]:!h.comparePoints(e.start,e.end))||(r&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(v(this.$lines,e,t),this._signal("change",e)))},p.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row0;)h&1&&(d+=a),(h>>=1)&&(a+=a);return d};var u=/^\s\s*/,v=/\s\s*$/;i.stringTrimLeft=function(a){return a.replace(u,"")},i.stringTrimRight=function(a){return a.replace(v,"")},i.copyObject=function(a){var h={};for(var d in a)h[d]=a[d];return h},i.copyArray=function(a){for(var h=[],d=0,o=a.length;d65535?2:1}}),ace.define("ace/worker/mirror",[],function(L,i,n){var u=L("../document").Document,v=L("../lib/lang"),a=i.Mirror=function(h){this.sender=h;var d=this.doc=new u(""),o=this.deferredUpdate=v.delayedCall(this.onUpdate.bind(this)),p=this;h.on("change",function(e){var t=e.data;if(t[0].start)d.applyDeltas(t);else for(var r=0;r=d.$lines.length)throw s=new Error("Invalid delta"),s.data={path:p.$path,linesLength:d.$lines.length,start:l.start,end:l.end},s;d.applyDelta(l,!0)}if(p.$timeout)return o.schedule(p.$timeout);p.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(h){this.$timeout=h},this.setValue=function(h){this.doc.setValue(h),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(h){this.sender.callback(this.doc.getValue(),h)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(a.prototype)}),ace.define("ace/mode/json/json_parse",[],function(L,i,n){var u,v,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "},h,d=function(f){throw{name:"SyntaxError",message:f,at:u,text:h}},o=function(f){return f&&f!==v&&d("Expected '"+f+"' instead of '"+v+"'"),v=h.charAt(u),u+=1,v},p=function(){var f,m="";for(v==="-"&&(m="-",o("-"));v>="0"&&v<="9";)m+=v,o();if(v===".")for(m+=".";o()&&v>="0"&&v<="9";)m+=v;if(v==="e"||v==="E")for(m+=v,o(),(v==="-"||v==="+")&&(m+=v,o());v>="0"&&v<="9";)m+=v,o();if(f=+m,!isNaN(f))return f;d("Bad number")},e=function(){var f,m,y="",D;if(v==='"')for(;o();){if(v==='"')return o(),y;if(v==="\\")if(o(),v==="u"){for(D=0,m=0;m<4&&(f=parseInt(o(),16),!!isFinite(f));m+=1)D=D*16+f;y+=String.fromCharCode(D)}else{if(typeof a[v]!="string")break;y+=a[v]}else{if(v==` +`||v=="\r")break;y+=v}}d("Bad string")},t=function(){for(;v&&v<=" ";)o()},r=function(){switch(v){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}d("Unexpected '"+v+"'")},l,s=function(){var f=[];if(v==="["){if(o("["),t(),v==="]")return o("]"),f;for(;v;){if(f.push(l()),t(),v==="]")return o("]"),f;o(","),t()}}d("Bad array")},c=function(){var f,m={};if(v==="{"){if(o("{"),t(),v==="}")return o("}"),m;for(;v;){if(f=e(),t(),o(":"),Object.hasOwnProperty.call(m,f)&&d('Duplicate key "'+f+'"'),m[f]=l(),t(),v==="}")return o("}"),m;o(","),t()}}d("Bad object")};return l=function(){switch(t(),v){case"{":return c();case"[":return s();case'"':return e();case"-":return p();default:return v>="0"&&v<="9"?p():r()}},function(f,m){var y;return h=f,u=0,v=" ",y=l(),t(),v&&d("Syntax error"),typeof m=="function"?function D(E,b){var g,S,T=E[b];if(T&&typeof T=="object")for(g in T)Object.hasOwnProperty.call(T,g)&&(S=D(T,g),S!==void 0?T[g]=S:delete T[g]);return m.call(E,b,T)}({"":y},""):y}}),ace.define("ace/mode/json_worker",[],function(L,i,n){var u=L("../lib/oop"),v=L("../worker/mirror").Mirror,a=L("./json/json_parse"),h=i.JsonWorker=function(d){v.call(this,d),this.setTimeout(200)};u.inherits(h,v),function(){this.onUpdate=function(){var d=this.doc.getValue(),o=[];try{d&&a(d)}catch(e){var p=this.doc.indexToPosition(e.at-1);o.push({row:p.row,column:p.column,text:e.message,type:"error"})}this.sender.emit("annotate",o)}}.call(h.prototype)});var Ma={exports:{}};(function(L,i){ace.define("ace/theme/clouds_midnight-css",["require","exports","module"],function(n,u,v){v.exports=`.ace-clouds-midnight .ace_gutter { + background: #232323; + color: #929292 +} + +.ace-clouds-midnight .ace_print-margin { + width: 1px; + background: #232323 +} + +.ace-clouds-midnight { + background-color: #191919; + color: #929292 +} + +.ace-clouds-midnight .ace_cursor { + color: #7DA5DC +} + +.ace-clouds-midnight .ace_marker-layer .ace_selection { + background: #000000 +} + +.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start { + box-shadow: 0 0 3px 0px #191919; +} + +.ace-clouds-midnight .ace_marker-layer .ace_step { + background: rgb(102, 82, 0) +} + +.ace-clouds-midnight .ace_marker-layer .ace_bracket { + margin: -1px 0 0 -1px; + border: 1px solid #BFBFBF +} + +.ace-clouds-midnight .ace_marker-layer .ace_active-line { + background: rgba(215, 215, 215, 0.031) +} + +.ace-clouds-midnight .ace_gutter-active-line { + background-color: rgba(215, 215, 215, 0.031) +} + +.ace-clouds-midnight .ace_marker-layer .ace_selected-word { + border: 1px solid #000000 +} + +.ace-clouds-midnight .ace_invisible { + color: #666 +} + +.ace-clouds-midnight .ace_keyword, +.ace-clouds-midnight .ace_meta, +.ace-clouds-midnight .ace_support.ace_constant.ace_property-value { + color: #927C5D +} + +.ace-clouds-midnight .ace_keyword.ace_operator { + color: #4B4B4B +} + +.ace-clouds-midnight .ace_keyword.ace_other.ace_unit { + color: #366F1A +} + +.ace-clouds-midnight .ace_constant.ace_language { + color: #39946A +} + +.ace-clouds-midnight .ace_constant.ace_numeric { + color: #46A609 +} + +.ace-clouds-midnight .ace_constant.ace_character.ace_entity { + color: #A165AC +} + +.ace-clouds-midnight .ace_invalid { + color: #FFFFFF; + background-color: #E92E2E +} + +.ace-clouds-midnight .ace_fold { + background-color: #927C5D; + border-color: #929292 +} + +.ace-clouds-midnight .ace_storage, +.ace-clouds-midnight .ace_support.ace_class, +.ace-clouds-midnight .ace_support.ace_function, +.ace-clouds-midnight .ace_support.ace_other, +.ace-clouds-midnight .ace_support.ace_type { + color: #E92E2E +} + +.ace-clouds-midnight .ace_string { + color: #5D90CD +} + +.ace-clouds-midnight .ace_comment { + color: #3C403B +} + +.ace-clouds-midnight .ace_entity.ace_name.ace_tag, +.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name { + color: #606060 +} + +.ace-clouds-midnight .ace_indent-guide { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y +} + +.ace-clouds-midnight .ace_indent-guide-active { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y; +} +`}),ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"],function(n,u,v){u.isDark=!0,u.cssClass="ace-clouds-midnight",u.cssText=n("./clouds_midnight-css");var a=n("../lib/dom");a.importCssString(u.cssText,u.cssClass,!1)}),function(){ace.require(["ace/theme/clouds_midnight"],function(n){L&&(L.exports=n)})}()})(Ma);var La={exports:{}};(function(L,i){ace.define("ace/theme/chrome-css",["require","exports","module"],function(n,u,v){v.exports=`.ace-chrome .ace_gutter { + background: #ebebeb; + color: #333; + overflow : hidden; +} + +.ace-chrome .ace_print-margin { + width: 1px; + background: #e8e8e8; +} + +.ace-chrome { + background-color: #FFFFFF; + color: black; +} + +.ace-chrome .ace_cursor { + color: black; +} + +.ace-chrome .ace_invisible { + color: rgb(191, 191, 191); +} + +.ace-chrome .ace_constant.ace_buildin { + color: rgb(88, 72, 246); +} + +.ace-chrome .ace_constant.ace_language { + color: rgb(88, 92, 246); +} + +.ace-chrome .ace_constant.ace_library { + color: rgb(6, 150, 14); +} + +.ace-chrome .ace_invalid { + background-color: rgb(153, 0, 0); + color: white; +} + +.ace-chrome .ace_fold { +} + +.ace-chrome .ace_support.ace_function { + color: rgb(60, 76, 114); +} + +.ace-chrome .ace_support.ace_constant { + color: rgb(6, 150, 14); +} + +.ace-chrome .ace_support.ace_type, +.ace-chrome .ace_support.ace_class +.ace-chrome .ace_support.ace_other { + color: rgb(109, 121, 222); +} + +.ace-chrome .ace_variable.ace_parameter { + font-style:italic; + color:#FD971F; +} +.ace-chrome .ace_keyword.ace_operator { + color: rgb(104, 118, 135); +} + +.ace-chrome .ace_comment { + color: #236e24; +} + +.ace-chrome .ace_comment.ace_doc { + color: #236e24; +} + +.ace-chrome .ace_comment.ace_doc.ace_tag { + color: #236e24; +} + +.ace-chrome .ace_constant.ace_numeric { + color: rgb(0, 0, 205); +} + +.ace-chrome .ace_variable { + color: rgb(49, 132, 149); +} + +.ace-chrome .ace_xml-pe { + color: rgb(104, 104, 91); +} + +.ace-chrome .ace_entity.ace_name.ace_function { + color: #0000A2; +} + + +.ace-chrome .ace_heading { + color: rgb(12, 7, 255); +} + +.ace-chrome .ace_list { + color:rgb(185, 6, 144); +} + +.ace-chrome .ace_marker-layer .ace_selection { + background: rgb(181, 213, 255); +} + +.ace-chrome .ace_marker-layer .ace_step { + background: rgb(252, 255, 0); +} + +.ace-chrome .ace_marker-layer .ace_stack { + background: rgb(164, 229, 101); +} + +.ace-chrome .ace_marker-layer .ace_bracket { + margin: -1px 0 0 -1px; + border: 1px solid rgb(192, 192, 192); +} + +.ace-chrome .ace_marker-layer .ace_active-line { + background: rgba(0, 0, 0, 0.07); +} + +.ace-chrome .ace_gutter-active-line { + background-color : #dcdcdc; +} + +.ace-chrome .ace_marker-layer .ace_selected-word { + background: rgb(250, 250, 255); + border: 1px solid rgb(200, 200, 250); +} + +.ace-chrome .ace_storage, +.ace-chrome .ace_keyword, +.ace-chrome .ace_meta.ace_tag { + color: rgb(147, 15, 128); +} + +.ace-chrome .ace_string.ace_regex { + color: rgb(255, 0, 0) +} + +.ace-chrome .ace_string { + color: #1A1AA6; +} + +.ace-chrome .ace_entity.ace_other.ace_attribute-name { + color: #994409; +} + +.ace-chrome .ace_indent-guide { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; +} + +.ace-chrome .ace_indent-guide-active { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; +} +`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(n,u,v){u.isDark=!1,u.cssClass="ace-chrome",u.cssText=n("./chrome-css");var a=n("../lib/dom");a.importCssString(u.cssText,u.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(n){L&&(L.exports=n)})}()})(La);var Ia={exports:{}};(function(L,i){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(n,u,v){function a(g){var S=new Date().toLocaleString("en-us",g);return S.length==1?"0"+S:S}var h=n("./lib/dom"),d=n("./lib/oop"),o=n("./lib/event_emitter").EventEmitter,p=n("./lib/lang"),e=n("./range").Range,t=n("./range_list").RangeList,r=n("./keyboard/hash_handler").HashHandler,l=n("./tokenizer").Tokenizer,s=n("./clipboard"),c={CURRENT_WORD:function(g){return g.session.getTextRange(g.session.getWordRange())},SELECTION:function(g,S,T){var k=g.session.getTextRange();return T?k.replace(/\n\r?([ \t]*\S)/g,` +`+T+"$1"):k},CURRENT_LINE:function(g){return g.session.getLine(g.getCursorPosition().row)},PREV_LINE:function(g){return g.session.getLine(g.getCursorPosition().row-1)},LINE_INDEX:function(g){return g.getCursorPosition().row},LINE_NUMBER:function(g){return g.getCursorPosition().row+1},SOFT_TABS:function(g){return g.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(g){return g.session.getTabSize()},CLIPBOARD:function(g){return s.getText&&s.getText()},FILENAME:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0]},FILENAME_BASE:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(g){return this.FILEPATH(g).replace(/[^/\\]*$/,"")},FILEPATH:function(g){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(g){var S=g.session.$mode||{};return S.blockComment&&S.blockComment.start||""},BLOCK_COMMENT_END:function(g){var S=g.session.$mode||{};return S.blockComment&&S.blockComment.end||""},LINE_COMMENT:function(g){var S=g.session.$mode||{};return S.lineCommentStart||""},CURRENT_YEAR:a.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:a.bind(null,{year:"2-digit"}),CURRENT_MONTH:a.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:a.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:a.bind(null,{month:"short"}),CURRENT_DATE:a.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:a.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:a.bind(null,{weekday:"short"}),CURRENT_HOUR:a.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:a.bind(null,{minute:"2-digit"}),CURRENT_SECOND:a.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var f=function(){function g(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return g.prototype.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},g.prototype.createTokenizer=function(){function S(_){return _=_.substr(1),/^\d+$/.test(_)?[{tabstopId:parseInt(_,10)}]:[{text:_}]}function T(_){return"(?:[^\\\\"+_+"]|\\\\.)"}var k={regex:"/("+T("/")+"+)/",onMatch:function(_,R,x){var A=x[0];return A.fmtString=!0,A.guard=_.slice(1,-1),A.flag="",""},next:"formatString"};return g.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(_,R,x){var A=_[1];return(A=="}"&&x.length||"`$\\".indexOf(A)!=-1)&&(_=A),[_]}},{regex:/}/,onMatch:function(_,R,x){return[x.length?x.shift():_]}},{regex:/\$(?:\d+|\w+)/,onMatch:S},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(_,R,x){var A=S(_.substr(1));return x.unshift(A[0]),A},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+T("\\|")+"*\\|",onMatch:function(_,R,x){var A=_.slice(1,-1).replace(/\\[,|\\]|,/g,function(C){return C.length==2?C[1]:"\0"}).split("\0").map(function(C){return{value:C}});return x[0].choices=A,[A[0]]},next:"start"},k,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(_,R,x){return x.length&&x[0].expectElse?(x[0].expectElse=!1,x[0].ifEnd={elseEnd:x[0]},[x[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(_,R,x){var A=_[1];return A=="}"&&x.length||"`$\\".indexOf(A)!=-1?_=A:A=="n"?_=` +`:A=="t"?_=" ":"ulULE".indexOf(A)!=-1&&(_={changeCase:A,local:A>"a"}),[_]}},{regex:"/\\w*}",onMatch:function(_,R,x){var A=x.shift();return A&&(A.flag=_.slice(1,-1)),this.next=A&&A.tabstopId?"start":"",[A||_]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(_,R,x){return[{text:_.slice(1)}]}},{regex:/\${\w+/,onMatch:function(_,R,x){var A={text:_.slice(2)};return x.unshift(A),[A]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(_,R,x){var A=x.shift();return this.next=A&&A.tabstopId?"start":"",[A||_]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(_,R,x){var A=x[0];return A.formatFunction=_.slice(2,-1),[x.shift()]},next:"formatString"},k,{regex:/:[\?\-+]?/,onMatch:function(_,R,x){_[1]=="+"&&(x[0].ifEnd=x[0]),_[1]=="?"&&(x[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),g.$tokenizer},g.prototype.tokenizeTmSnippet=function(S,T){return this.getTokenizer().getLineTokens(S,T).tokens.map(function(k){return k.value||k})},g.prototype.getVariableValue=function(S,T,k){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 _=this.variables[T];return typeof _=="function"&&(_=this.variables[T](S,T,k)),_??""},g.prototype.tmStrFormat=function(S,T,k){if(!T.fmt)return S;var _=T.flag||"",R=T.guard;R=new RegExp(R,_.replace(/[^gim]/g,""));var x=typeof T.fmt=="string"?this.tokenizeTmSnippet(T.fmt,"formatString"):T.fmt,A=this,C=S.replace(R,function(){var w=A.variables.__;A.variables.__=[].slice.call(arguments);for(var $=A.resolveVariables(x,k),I="E",F=0;F<$.length;F++){var O=$[F];if(typeof O=="object")if($[F]="",O.changeCase&&O.local){var B=$[F+1];B&&typeof B=="string"&&(O.changeCase=="u"?$[F]=B[0].toUpperCase():$[F]=B[0].toLowerCase(),$[F+1]=B.substr(1))}else O.changeCase&&(I=O.changeCase);else I=="U"?$[F]=O.toUpperCase():I=="L"&&($[F]=O.toLowerCase())}return A.variables.__=w,$.join("")});return C},g.prototype.tmFormatFunction=function(S,T,k){return T.formatFunction=="upcase"?S.toUpperCase():T.formatFunction=="downcase"?S.toLowerCase():S},g.prototype.resolveVariables=function(S,T){function k(I){var F=S.indexOf(I,A+1);F!=-1&&(A=F)}for(var _=[],R="",x=!0,A=0;A=0&&C.splice(w,1)}}var _=this.snippetMap,R=this.snippetNameMap;S.content?k(S):Array.isArray(S)&&S.forEach(k)},g.prototype.parseSnippetFile=function(S){S=S.replace(/\r/g,"");for(var T=[],k={},_=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,R;R=_.exec(S);){if(R[1])try{k=JSON.parse(R[1]),T.push(k)}catch{}if(R[4])k.content=R[4].replace(/^\t/gm,""),T.push(k),k={};else{var x=R[2],A=R[3];if(x=="regex"){var C=/\/((?:[^\/\\]|\\.)*)|$/g;k.guard=C.exec(A)[1],k.trigger=C.exec(A)[1],k.endTrigger=C.exec(A)[1],k.endGuard=C.exec(A)[1]}else x=="snippet"?(k.tabTrigger=A.match(/^\S*/)[0],k.name||(k.name=A)):x&&(k[x]=A)}}return T},g.prototype.getSnippetByName=function(S,T){var k=this.snippetNameMap,_;return this.getActiveScopes(T).some(function(R){var x=k[R];return x&&(_=x[S]),!!_},this),_},g}();d.implement(f.prototype,o);var m=function(g,S,T){function k(G){for(var Y=[],Q=0;Q1?(H=Y[Y.length-1].length,W+=Y.length-1):H+=G.length,U+=G}else G&&(G.start?G.end={row:W,column:H}:G.start={row:W,column:H})}),{text:U,tabstops:w,tokens:C}},y=function(){function g(S){if(this.index=0,this.ranges=[],this.tabstops=[],S.tabstopManager)return S.tabstopManager;S.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(S)}return g.prototype.attach=function(S){this.$openTabstops=null,this.selectedTabstop=null,this.editor=S,this.session=S.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},g.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},g.prototype.onChange=function(S){for(var T=S.action[0]=="r",k=this.selectedTabstop||{},_=k.parents||{},R=this.tabstops.slice(),x=0;x2&&(this.tabstops.length&&A.push(A.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,A))},g.prototype.addTabstopMarkers=function(S){var T=this.session;S.forEach(function(k){k.markerId||(k.markerId=T.addMarker(k,"ace_snippet-marker","text"))})},g.prototype.removeTabstopMarkers=function(S){var T=this.session;S.forEach(function(k){T.removeMarker(k.markerId),k.markerId=null})},g.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var S=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&S--,this.tabstops.forEach(function(T){T.snippetId===S?this.addTabstopMarkers(T):this.removeTabstopMarkers(T)},this)}},g.prototype.removeRange=function(S){var T=S.tabstop.indexOf(S);T!=-1&&S.tabstop.splice(T,1),T=this.ranges.indexOf(S),T!=-1&&this.ranges.splice(T,1),T=S.tabstop.rangeList.ranges.indexOf(S),T!=-1&&S.tabstop.splice(T,1),this.session.removeMarker(S.markerId),S.tabstop.length||(T=this.tabstops.indexOf(S.tabstop),T!=-1&&this.tabstops.splice(T,1),this.tabstops.length||this.detach())},g}();y.prototype.keyboardHandler=new r,y.prototype.keyboardHandler.bindKeys({Tab:function(g){u.snippetManager&&u.snippetManager.expandWithTab(g)||(g.tabstopManager.tabNext(1),g.renderer.scrollCursorIntoView())},"Shift-Tab":function(g){g.tabstopManager.tabNext(-1),g.renderer.scrollCursorIntoView()},Esc:function(g){g.tabstopManager.detach()}});var D=function(g,S){g.row==0&&(g.column+=S.column),g.row+=S.row},E=function(g,S){g.row==S.row&&(g.column-=S.column),g.row-=S.row};h.importCssString(` +.ace_snippet-marker { + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(194, 193, 208, 0.09); + border: 1px dotted rgba(211, 208, 235, 0.62); + position: absolute; +}`,"snippets.css",!1),u.snippetManager=new f;var b=n("./editor").Editor;(function(){this.insertSnippet=function(g,S){return u.snippetManager.insertSnippet(this,g,S)},this.expandSnippet=function(g){return u.snippetManager.expandWithTab(this,g)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(n,u,v){var a=n("../virtual_renderer").VirtualRenderer,h=n("../editor").Editor,d=n("../range").Range,o=n("../lib/event"),p=n("../lib/lang"),e=n("../lib/dom"),t=n("../config").nls,r=n("./../lib/useragent"),l=function(D){return"suggest-aria-id:".concat(D)},s=r.isSafari?"menu":"listbox",c=r.isSafari?"menuitem":"option",f=r.isSafari?"aria-current":"aria-selected",m=function(D){var E=new a(D);E.$maxLines=4;var b=new h(E);return b.setHighlightActiveLine(!1),b.setShowPrintMargin(!1),b.renderer.setShowGutter(!1),b.renderer.setHighlightGutterLine(!1),b.$mouseHandler.$focusTimeout=0,b.$highlightTagPending=!0,b},y=function(){function D(E){var b=e.createElement("div"),g=m(b);E&&E.appendChild(b),b.style.display="none",g.renderer.content.style.cursor="default",g.renderer.setStyle("ace_autocomplete"),g.renderer.$textLayer.element.setAttribute("role",s),g.renderer.$textLayer.element.setAttribute("aria-roledescription",t("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),g.renderer.$textLayer.element.setAttribute("aria-label",t("autocomplete.popup.aria-label","Autocomplete suggestions")),g.renderer.textarea.setAttribute("aria-hidden","true"),g.setOption("displayIndentGuides",!1),g.setOption("dragDelay",150);var S=function(){};g.focus=S,g.$isFocused=!0,g.renderer.$cursorLayer.restartTimer=S,g.renderer.$cursorLayer.element.style.opacity="0",g.renderer.$maxLines=8,g.renderer.$keepTextAreaAtCursor=!1,g.setHighlightActiveLine(!1),g.session.highlight(""),g.session.$searchHighlight.clazz="ace_highlight-marker",g.on("mousedown",function(C){var w=C.getDocumentPosition();g.selection.moveToPosition(w),_.start.row=_.end.row=w.row,C.stop()});var T,k=new d(-1,0,-1,1/0),_=new d(-1,0,-1,1/0);_.id=g.session.addMarker(_,"ace_active-line","fullLine"),g.setSelectOnHover=function(C){C?k.id&&(g.session.removeMarker(k.id),k.id=null):k.id=g.session.addMarker(k,"ace_line-hover","fullLine")},g.setSelectOnHover(!1),g.on("mousemove",function(C){if(!T){T=C;return}if(!(T.x==C.x&&T.y==C.y)){T=C,T.scrollTop=g.renderer.scrollTop,g.isMouseOver=!0;var w=T.getDocumentPosition().row;k.start.row!=w&&(k.id||g.setRow(w),x(w))}}),g.renderer.on("beforeRender",function(){if(T&&k.start.row!=-1){T.$pos=null;var C=T.getDocumentPosition().row;k.id||g.setRow(C),x(C,!0)}}),g.renderer.on("afterRender",function(){for(var C=g.renderer.$textLayer,w=C.config.firstRow,$=C.config.lastRow;w<=$;w++){var I=C.element.childNodes[w-C.config.firstRow];I.setAttribute("role",c),I.setAttribute("aria-roledescription",t("autocomplete.popup.item.aria-roledescription","item")),I.setAttribute("aria-setsize",g.data.length),I.setAttribute("aria-describedby","doc-tooltip"),I.setAttribute("aria-posinset",w+1);var F=g.getData(w);if(F){var O="".concat(F.caption||F.value).concat(F.meta?", ".concat(F.meta):"");I.setAttribute("aria-label",O)}var B=I.querySelectorAll(".ace_completion-highlight");B.forEach(function(P){P.setAttribute("role","mark")})}}),g.renderer.on("afterRender",function(){var C=g.getRow(),w=g.renderer.$textLayer,$=w.element.childNodes[C-w.config.firstRow],I=document.activeElement;if($!==g.selectedNode&&g.selectedNode&&(e.removeCssClass(g.selectedNode,"ace_selected"),g.selectedNode.removeAttribute(f),g.selectedNode.removeAttribute("id")),I.removeAttribute("aria-activedescendant"),g.selectedNode=$,$){var F=l(C);e.addCssClass($,"ace_selected"),$.id=F,w.element.setAttribute("aria-activedescendant",F),I.setAttribute("aria-activedescendant",F),$.setAttribute(f,"true")}});var R=function(){x(-1)},x=function(C,w){C!==k.start.row&&(k.start.row=k.end.row=C,w||g.session._emit("changeBackMarker"),g._emit("changeHoverMarker"))};g.getHoveredRow=function(){return k.start.row},o.addListener(g.container,"mouseout",function(){g.isMouseOver=!1,R()}),g.on("hide",R),g.on("changeSelection",R),g.session.doc.getLength=function(){return g.data.length},g.session.doc.getLine=function(C){var w=g.data[C];return typeof w=="string"?w:w&&w.value||""};var A=g.session.bgTokenizer;return A.$tokenizeRow=function(C){function w(G,Y){G&&I.push({type:($.className||"")+(Y||""),value:G})}var $=g.data[C],I=[];if(!$)return I;typeof $=="string"&&($={value:$});for(var F=$.caption||$.value||$.name,O=F.toLowerCase(),B=(g.filterText||"").toLowerCase(),P=0,V=0,W=0;W<=B.length;W++)if(W!=V&&($.matchMask&1<=W?$="bottom":$="top"),$==="top"?(H.bottom=C.top-this.$borderSize,H.top=H.bottom-W):$==="bottom"&&(H.top=C.top+w+this.$borderSize,H.bottom=H.top+W);var Y=H.top>=0&&H.bottom<=B;if(!I&&!Y)return!1;Y?V.$maxPixelHeight=null:$==="top"?V.$maxPixelHeight=G:V.$maxPixelHeight=U,$==="top"?(F.style.top="",F.style.bottom=B+O-H.bottom+"px",g.isTopdown=!1):(F.style.top=H.top+"px",F.style.bottom="",g.isTopdown=!0),F.style.display="";var Q=C.left;return Q+F.offsetWidth>P&&(Q=P-F.offsetWidth),F.style.left=Q+"px",F.style.right="",g.isOpen||(g.isOpen=!0,this._signal("show"),T=null),g.anchorPos=C,g.anchor=$,!0},g.show=function(C,w,$){this.tryShow(C,w,$?"bottom":void 0,!0)},g.goTo=function(C){var w=this.getRow(),$=this.session.getLength()-1;switch(C){case"up":w=w<=0?$:w-1;break;case"down":w=w>=$?-1:w+1;break;case"start":w=0;break;case"end":w=$}this.setRow(w)},g.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},g.$imageSize=0,g.$borderSize=1,g}return D}();e.importCssString(` +.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { + background-color: #CAD6FA; + z-index: 1; +} +.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { + background-color: #3a674e; +} +.ace_editor.ace_autocomplete .ace_line-hover { + border: 1px solid #abbffe; + margin-top: -1px; + background: rgba(233,233,253,0.4); + position: absolute; + z-index: 2; +} +.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { + border: 1px solid rgba(109, 150, 13, 0.8); + background: rgba(58, 103, 78, 0.62); +} +.ace_completion-meta { + opacity: 0.5; + margin-left: 0.9em; +} +.ace_completion-message { + margin-left: 0.9em; + color: blue; +} +.ace_editor.ace_autocomplete .ace_completion-highlight{ + color: #2d69c7; +} +.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ + color: #93ca12; +} +.ace_editor.ace_autocomplete { + width: 300px; + z-index: 200000; + border: 1px lightgray solid; + position: fixed; + box-shadow: 2px 3px 5px rgba(0,0,0,.2); + line-height: 1.4; + background: #fefefe; + color: #111; +} +.ace_dark.ace_editor.ace_autocomplete { + border: 1px #484747 solid; + box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); + line-height: 1.4; + background: #25282c; + color: #c1c1c1; +} +.ace_autocomplete .ace_text-layer { + width: calc(100% - 8px); +} +.ace_autocomplete .ace_line { + display: flex; + align-items: center; +} +.ace_autocomplete .ace_line > * { + min-width: 0; + flex: 0 0 auto; +} +.ace_autocomplete .ace_line .ace_ { + flex: 0 1 auto; + overflow: hidden; + text-overflow: ellipsis; +} +.ace_autocomplete .ace_completion-spacer { + flex: 1; +} +.ace_autocomplete.ace_loading:after { + content: ""; + position: absolute; + top: 0px; + height: 2px; + width: 8%; + background: blue; + z-index: 100; + animation: ace_progress 3s infinite linear; + animation-delay: 300ms; + transform: translateX(-100%) scaleX(1); +} +@keyframes ace_progress { + 0% { transform: translateX(-100%) scaleX(1) } + 50% { transform: translateX(625%) scaleX(2) } + 100% { transform: translateX(1500%) scaleX(3) } +} +@media (prefers-reduced-motion) { + .ace_autocomplete.ace_loading:after { + transform: translateX(625%) scaleX(2); + animation: none; + } +} +`,"autocompletion.css",!1),u.AcePopup=y,u.$singleLineEditor=m,u.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,u,v){var a=function(){function h(d){this.editor=d,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return h.prototype.setScreenReaderContent=function(d){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var p=this.popup.getRow(),e=this.popup.renderer.$textLayer,t=e.element.childNodes[p-e.config.firstRow];if(t){for(var r="doc-tooltip ",l=0;l=0&&o.test(h[e]);e--)p.push(h[e]);return p.reverse().join("")},u.retrieveFollowingIdentifier=function(h,d,o){o=o||a;for(var p=[],e=d;e0)for(var g=this.popup.getFirstVisibleRow();g<=this.popup.getLastVisibleRow();g++){var S=this.popup.getData(g);S&&(!b||S.hideInlinePreview)&&this.$seen(S)}},E.prototype.$onPopupShow=function(b){this.$onPopupChange(b),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 b=this.editor.container.parentNode,g=[];b;)g.push(b),b.addEventListener("scroll",this.onLayoutChange,{passive:!0}),b=b.parentNode;this.$elements=g}},E.prototype.unObserveLayoutChanges=function(){var b=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(g){g.removeEventListener("scroll",b.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 b=this.editor,g=b.renderer,S=g.layerConfig.lineHeight,T=g.$cursorLayer.getPixelPosition(this.base,!0);T.left-=this.popup.getTextLeftOffset();var k=b.container.getBoundingClientRect();T.top+=k.top-g.layerConfig.offset,T.left+=k.left-b.renderer.scrollLeft,T.left+=g.gutterWidth;var _={top:T.top,left:T.left};g.$ghostText&&g.$ghostTextWidget&&this.base.row===g.$ghostText.position.row&&(_.top+=g.$ghostTextWidget.el.offsetHeight);var R=b.container.getBoundingClientRect().bottom-S,x=R<_.top?{top:R,left:_.left}:_;this.popup.tryShow(x,S,"bottom")||this.popup.tryShow(T,S,"top")||this.popup.show(T,S)},E.prototype.openPopup=function(b,g,S){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var T=this.popup.getRow(),k=this.popup.data[T];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}),b.keyBinding.addKeyboardHandler(this.keyboardHandler);var _;this.stickySelection&&(_=this.popup.data.indexOf(k)),(!_||_===-1)&&(_=0),this.popup.setRow(this.autoSelect?_:-1),_===T&&k!==this.completions.filtered[_]&&this.$onPopupChange();var R=this.inlineRenderer&&this.inlineEnabled;if(_===T&&R){var x=this.popup.getData(this.popup.getRow());this.$updateGhostText(x)}S||(this.popup.setTheme(b.getTheme()),this.popup.setFontSize(b.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(b){var g=this.editor.selection.lead;(g.row!=this.base.row||g.columnthis.filterText&&b.lastIndexOf(this.filterText,0)===0)var g=this.filtered;else var g=this.all;this.filterText=b,g=this.filterCompletions(g,this.filterText),g=g.sort(function(T,k){return k.exactMatch-T.exactMatch||k.$score-T.$score||(T.caption||T.value).localeCompare(k.caption||k.value)});var S=null;g=g.filter(function(T){var k=T.snippet||T.caption||T.value;return k===S?!1:(S=k,!0)}),this.filtered=g},E.prototype.filterCompletions=function(b,g){var S=[],T=g.toUpperCase(),k=g.toLowerCase();e:for(var _=0,R;R=b[_];_++){if(R.skipFilter){R.$score=R.score,S.push(R);continue}var x=!this.ignoreCaption&&R.caption||R.value||R.snippet;if(x){var A=-1,C=0,w=0,$,I;if(this.exactMatch){if(g!==x.substr(0,g.length))continue e}else{var F=x.toLowerCase().indexOf(k);if(F>-1)w=F;else for(var O=0;O=0&&(P<0||B0&&(A===-1&&(w+=10),w+=I,C|=1<",o.escapeHTML(T.caption),"","
",o.escapeHTML(r(T.snippet))].join(""))},id:"snippetCompleter"},s=[l,e,t];u.setCompleters=function(T){s.length=0,T&&s.push.apply(s,T)},u.addCompleter=function(T){s.push(T)},u.textCompleter=e,u.keyWordCompleter=t,u.snippetCompleter=l;var c={name:"expandSnippet",exec:function(T){return a.expandWithTab(T)},bindKey:"Tab"},f=function(T,k){m(k.session.$mode)},m=function(T){typeof T=="string"&&(T=d.$modes[T]),T&&(a.files||(a.files={}),y(T.$id,T.snippetFileId),T.modes&&T.modes.forEach(m))},y=function(T,k){!k||!T||a.files[T]||(a.files[T]={},d.loadModule(k,function(_){_&&(a.files[T]=_,!_.snippets&&_.snippetText&&(_.snippets=a.parseSnippetFile(_.snippetText)),a.register(_.snippets||[],_.scope),_.includeScopes&&(a.snippetMap[_.scope].includeScopes=_.includeScopes,_.includeScopes.forEach(function(R){m("ace/mode/"+R)})))}))},D=function(T){var k=T.editor,_=k.completer&&k.completer.activated;if(T.command.name==="backspace")_&&!p.getCompletionPrefix(k)&&k.completer.detach();else if(T.command.name==="insertstring"&&!_){E=T;var R=T.editor.$liveAutocompletionDelay;R?b.delay(R):g(T)}},E,b=o.delayedCall(function(){g(E)},0),g=function(T){var k=T.editor,_=p.getCompletionPrefix(k),R=T.args,x=p.triggerAutocomplete(k,R);if(_&&_.length>=k.$liveAutocompletionThreshold||x){var A=h.for(k);A.autoShown=!0,A.showPopup(k)}},S=n("../editor").Editor;n("../config").defineOptions(S.prototype,"editor",{enableBasicAutocompletion:{set:function(T){T?(this.completers||(this.completers=Array.isArray(T)?T:s),this.commands.addCommand(h.startCommand)):this.commands.removeCommand(h.startCommand)},value:!1},enableLiveAutocompletion:{set:function(T){T?(this.completers||(this.completers=Array.isArray(T)?T:s),this.commands.on("afterExec",D)):this.commands.off("afterExec",D)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(T){T?(this.commands.addCommand(c),this.on("changeMode",f),f(null,this)):(this.commands.removeCommand(c),this.off("changeMode",f))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){L&&(L.exports=n)})}()})(Ia);const Ai={jsonError:{border:"1px solid red",minHeight:200},jsonNoError:{border:"1px solid #00000000",minHeight:200}};function Fa(L){return M.createElement($a,{style:L.error===!0?Ai.jsonError:L.error===!1?Ai.jsonNoError:void 0,mode:L.mode||"json",width:"100%",height:"100%",showPrintMargin:L.editValueMode,showGutter:L.editValueMode,highlightActiveLine:L.editValueMode,defaultValue:L.defaultValue,theme:L.themeType==="dark"?"clouds_midnight":"chrome",value:L.value,readOnly:!L.onChange,onChange:i=>L.onChange(i),name:L.name||"UNIQUE_ID_OF_DIV1",fontSize:L.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:L.editValueMode,tabSize:L.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}const Rn={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class Ra extends K{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=K.getValue(i,n)||"{}";this.setState({value:u,initialized:!0,jsonError:this.validateJson(u)})}validateJson(i){let n=!1;if(this.props.schema.validateJson!==!1&&(i||!this.props.schema.allowEmpty))try{this.props.schema.json5?Vi.parse(i):JSON.parse(i)}catch(u){console.log("Error in JSON",u),n=!0}return n}renderItem(i,n){if(!this.state.initialized)return null;const{schema:u,data:v,attr:a}=this.props,{value:h,showSelectId:d}=this.state;return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},M.createElement("div",{style:Rn.flex},M.createElement(N.Button,{color:"grey",disabled:n,style:Rn.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},j.I18n.t("ra_JSON editor"))),d?M.createElement(lo,{title:this.getText(u.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError,onClose:()=>this.setState({showSelectId:!1,value:K.getValue(v,a)||{}}),onApply:()=>this.setState({showSelectId:!1},()=>this.onChange(a,h))},M.createElement("div",{style:{...Rn.wrapper,border:this.state.jsonError?"2px solid red":"2px solid transparent"}},M.createElement(Fa,{mode:this.props.schema.json5?"json5":"json",value:typeof h=="object"?JSON.stringify(h):h,onChange:o=>this.setState({value:o,jsonError:this.validateJson(o)}),name:"ConfigJsonEditor",themeType:this.props.oContext.themeType}))):null,u.help||this.state.jsonError?M.createElement(N.FormHelperText,null,this.state.jsonError?j.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Oa=[{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:"简体中文"}];class Na extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr),n=[...Oa];this.props.schema.system?n.unshift({value:"",label:j.I18n.t("ra_System language")}):n.unshift({value:"",label:j.I18n.t("ra_none")}),this.setState({value:this.props.schema.system?i||"":i||j.I18n.getLanguage(),selectOptions:n})}renderItem(i,n){var v,a;if(!this.state.selectOptions)return null;const u=(v=this.state.selectOptions)==null?void 0:v.find(h=>h.value===this.state.value||!h.value&&!this.state.value);return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,disabled:n,value:this.state.value||"_",renderValue:()=>this.getText(u==null?void 0:u.label,this.props.schema.noTranslation),onChange:h=>{let{value:d}=h.target;d==="_"&&(d=""),this.setState({value:d},()=>{const o=this.onChange(this.props.attr,d);if(o instanceof Promise&&o.catch(p=>console.error(p)),this.props.schema.changeGuiLanguage)if(d){if(d===j.I18n.getLanguage())return;j.I18n.setLanguage(d),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage()}else this.props.oContext.socket.getSystemConfig().then(p=>{p.common.language!==j.I18n.getLanguage()&&p.common.language&&(j.I18n.setLanguage(p.common.language),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage())}).catch(p=>console.error(`Cannot read system config: ${p}`))})}},(a=this.state.selectOptions)==null?void 0:a.map(h=>M.createElement(N.MenuItem,{key:h.value,value:h.value},h.label))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Ba extends K{scrollRef;constructor(i){super(i),this.scrollRef=M.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}componentDidMount(){super.componentDidMount(),K.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(i=>i.text()).then(i=>this.setState({license:i,loading:!1})).catch(i=>this.setState({license:i.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(i,n){return this.state.showLicenseDialog?M.createElement(N.Dialog,{maxWidth:"lg",open:!0,onClose:(u,v)=>{v!=="escapeKeyDown"&&v!=="backdropClick"&&this.setState({showLicenseDialog:!1})}},M.createElement(N.DialogTitle,null,this.props.schema.title?j.I18n.t(this.props.schema.title):j.I18n.t("ra_License agreement")),M.createElement(N.DialogContent,null,this.props.schema.licenseUrl?M.createElement(M.Fragment,null,this.state.loading?M.createElement(N.LinearProgress,null):null,M.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?M.createElement("div",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.props.schema.texts.map((u,v)=>this.props.schema.noTranslation?M.createElement("p",{key:v},u):M.createElement("p",{key:v},j.I18n.t(u)))):null),M.createElement(N.DialogActions,null,this.props.schema.checkBox?M.createElement(N.FormControlLabel,{control:M.createElement(N.Checkbox,{disabled:n,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:j.I18n.t(this.props.schema.checkBox)}):null,M.createElement(N.Button,{disabled:n||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{this.setState({showLicenseDialog:!1});const u=this.onChange(this.props.attr,!0);u instanceof Promise&&u.catch(v=>console.error(`Cannot set value: ${v}`))},color:"primary",variant:"contained",startIcon:M.createElement(Z.Check,null)},this.props.schema.agreeText?j.I18n.t(this.props.schema.agreeText):j.I18n.t("ra_Accept license")),M.createElement(N.Button,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:"grey",variant:"contained",startIcon:M.createElement(Z.Close,null)},j.I18n.t("ra_Close")))):null}}const xi={indeterminate:{opacity:.5},control:{flexDirection:"row",width:"100%"}};class Pa extends K{updateTimeout;componentDidMount(){super.componentDidMount();let i=K.getValue(this.props.data,this.props.attr);if(i==null&&(i=""),Array.isArray(i)&&this.props.oContext.multiEdit){i=K.DIFFERENT_VALUE,this.setState({_value:i,oldValue:i});return}this.setState({_value:i.toString(),oldValue:i.toString()})}static getDerivedStateFromProps(i,n){if(i.schema.min!==void 0&&i.schema.min<0||i.schema.max!==void 0&&i.schema.max<0)return null;const u=K.getValue(i.data,i.attr);return i.oContext.multiEdit&&n._value===K.DIFFERENT_VALUE?{_value:K.DIFFERENT_VALUE}:u==null||n.oldValue===null||n.oldValue===void 0||u.toString()!==parseFloat(n._value).toString()&&u.toString()!==n.oldValue.toString()?{_value:u}:null}checkValue(i){if(i==null)return null;i=i.toString().trim();const n=i===""?0:parseFloat(i);return i!==""&&Number.isNaN(n)?"ra_Not a number":i!==""&&window.isFinite(n)?this.props.schema.min!==void 0&&nthis.props.schema.max?"ra_Too big":i===""||i==="-"||Number.isNaN(n)?"ra_Not a number":null:"ra_Not a number"}renderItem(i,n){const u=Array.isArray(this.state._value)||this.state._value===K.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),this.updateTimeout=void 0),u){const v=K.getValue(this.props.data,this.props.attr),a=(v==null?void 0:v.filter(h=>h||h===0).map(h=>({label:h.toString(),value:h})))||[];return a.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),M.createElement(N.Autocomplete,{style:xi.indeterminate,fullWidth:!0,freeSolo:!0,value:a[0],getOptionSelected:(h,d)=>h.label===d.label,onChange:(h,d)=>{const o=this.onChange(this.props.attr,d==null?void 0:d.value,()=>{this.setState({_value:d==null?void 0:d.value,oldValue:this.state._value})});o instanceof Promise&&o.catch(p=>console.error(p))},options:a,getOptionLabel:h=>h.label,renderInput:h=>M.createElement(N.TextField,{...h,label:this.getText(this.props.schema.label),variant:"standard",slotProps:{htmlInput:{...h.inputProps,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):void 0}},error:!!i,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!n})})}return!i&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(i=this.checkValue(this.state._value),i&&(i=j.I18n.t(i))),M.createElement(N.FormControl,{variant:"standard",style:xi.control},M.createElement(N.TextField,{variant:"standard",type:"number",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):void 0}},value:this.state._value===null||this.state._value===void 0?"":this.state._value,error:!!i,disabled:!!n,onChange:v=>{const a=v.target.value,h=this.checkValue(a);h?this.onError(this.props.attr,j.I18n.t(h)):this.onError(this.props.attr),this.setState({_value:a,oldValue:this.state._value},()=>this.onChange(this.props.attr,parseFloat(a)))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:i&&typeof i=="string"?i:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}}const $i={flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class Wa extends K{componentDidMount(){super.componentDidMount();const{data:i,attr:n}=this.props,u=K.getValue(i,n)||"";this.setState({value:u,initialized:!0})}renderItem(i,n){if(!this.state.initialized)return null;const u=this.props.oContext.socket,{schema:v,attr:a}=this.props,{value:h,showSelectId:d}=this.state;return M.createElement(N.FormControl,{fullWidth:!0,variant:"standard"},v.label?M.createElement(N.InputLabel,{shrink:!0},this.getText(v.label)):null,M.createElement("div",{style:$i.flex},M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:h,error:!!i,disabled:n,placeholder:this.getText(v.placeholder),label:this.getText(v.label),helperText:this.renderHelp(v.help,v.helpLink,v.noTranslation),onChange:o=>{const p=o.target.value;this.setState({value:p},()=>this.onChange(a,p))}}),M.createElement(N.Button,{color:"grey",disabled:n,style:$i.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},"...")),d?M.createElement(j.DialogSelectID,{imagePrefix:this.props.oContext.imagePrefix===void 0?"../..":this.props.oContext.imagePrefix,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:v.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:v.types?Array.isArray(v.types)?v.types:[v.types]:void 0,customFilter:v.customFilter,filters:v.filters,socket:u,selected:h,root:v.root,onClose:()=>this.setState({showSelectId:!1}),onOk:o=>this.setState({showSelectId:!1,value:o},()=>this.onChange(a,o))}):null)}}const On={fullWidth:{width:"100%",display:"inline-block"},halfWidth1:{width:"calc(50% - 5px)",display:"inline-block",marginRight:8},halfWidth2:{width:"calc(50% - 5px)",display:"inline-block"}},an="____ppp____";class Ha extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.setState({_repeat:i?an:"",_visible:!1,value:i?an:"",_notEqual:!1})}onChangePassword(i,n){i===void 0&&(i=this.state.value),n===void 0&&(n=this.state._repeat);const u=!!this.props.schema.repeat&&n!==i;this.setState({value:i,_repeat:n,_notEqual:u},()=>{if(u)this.onError(this.props.attr,j.I18n.t("ra_Passwords are not equal!"));else{this.onError(this.props.attr);const v=this.onChange(this.props.attr,i);v instanceof Promise&&v.catch(a=>this.onError(this.props.attr,a))}})}renderItem(i,n){if(this.state._notEqual===void 0)return null;const u=M.createElement(N.TextField,{variant:"standard",fullWidth:!0,type:this.state._visible&&this.state.value!==an?"text":"password",value:this.state.value,error:!!i||this.state._notEqual,disabled:!!n,onChange:v=>this.onChangePassword(v.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:"new-password",endAdornment:this.state.value&&this.state.value!==an&&this.props.schema.visible&&!n&&!this.props.schema.readOnly?M.createElement(N.InputAdornment,{position:"end"},M.createElement(N.IconButton,{size:"large",tabIndex:-1,onClick:v=>{v.preventDefault(),v.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:"end"},this.state._visible?M.createElement(Z.VisibilityOff,null):M.createElement(Z.Visibility,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.I18n.t("ra_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){const v=this.state._visible?null:M.createElement(N.TextField,{variant:"standard",fullWidth:!0,type:"password",value:this.state._repeat,error:!!i||this.state._notEqual,disabled:!!n,onChange:a=>this.onChangePassword(void 0,a.target.value),label:`${this.getText(this.props.schema.label)} (${j.I18n.t("ra_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.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return M.createElement("div",{style:On.fullWidth},M.createElement("div",{style:On.halfWidth1},u),M.createElement("div",{style:On.halfWidth2},v))}return u}}class za extends K{renderItem(i,n){return M.createElement(N.TextField,{variant:"standard",fullWidth:!0,disabled:!!n,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?M.createElement(N.IconButton,{size:"small",onClick:()=>{j.Utils.copyToClipboard(this.getPattern(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(j.I18n.t("ra_Copied"))}},M.createElement(j.IconCopy,null)):void 0}},value:this.getPattern(this.props.schema.pattern,null,!0),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const ja={warning:{"& .Mui-error":{color:"orange"}}};class Va extends K{updateTimeout;async componentDidMount(){super.componentDidMount();let i=K.getValue(this.props.data,this.props.attr);i==null&&(i=""),this.setState({_value:i.toString(),oldValue:i.toString()});const n=await this.props.oContext.socket.getAdapterInstances(),u=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,v=await this.props.oContext.socket.getObject(u),a=v==null?void 0:v.common.host,h=[];n.forEach(d=>{var p,e,t,r;if(!d||d._id===u||d.common.host!==a||!((p=d.native)!=null&&p.bind))return;if(d!=null&&d.native&&d.native.secure&&d.native.leEnabled&&d.native.leUpdate){const l=parseInt(d.native.leCheckPort||d.native.lePort,10);l&&h.push({name:`${d._id.replace("system.adapter.","")} (LE)`,port:l,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,bind:d.native.bind,enabled:!!((e=d.common)!=null&&e.enabled)})}const o=parseInt((t=d==null?void 0:d.native)==null?void 0:t.port,10);o&&h.push({name:d._id.replace("system.adapter.",""),bind:d.native.bind,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,port:o,enabled:!!((r=d.common)!=null&&r.enabled)})}),this.setState({ports:h})}static getDerivedStateFromProps(i,n){const u=K.getValue(i.data,i.attr);return u==null||n.oldValue===null||n.oldValue===void 0||u.toString()!==parseInt(n._value,10).toString()&&u.toString()!==n.oldValue.toString()?{_value:u}:null}checkValue(i){if(i==null)return null;const n=this.props.schema.min===void 0?20:this.props.schema.min,u=this.props.schema.max||65535;i=i.toString().trim();const v=i===""?0:parseInt(i,10);return i!==""&&Number.isNaN(v)?"ra_Not a number":i!==""&&window.isFinite(Number(i))?vu?"ra_Too big":i===""||i==="-"||Number.isNaN(v)?"ra_Not a number":null:"ra_Not a number"}renderItem(i,n){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),this.updateTimeout=void 0);const u=this.props.schema.min===void 0?20:this.props.schema.min,v=this.props.schema.max||65535;let a;if(this.state.ports){const h=parseInt(this.state._value,10);if(h){const d=this.state.ports.filter(p=>!this.props.data.bind||this.props.data.bind===p.bind||this.props.data.bind==="0.0.0.0"||p.bind==="0.0.0.0");let o=d.findIndex(p=>p.port===h&&p.enabled);o!==-1?i=j.I18n.t("ra_Port is already used by %s",this.state.ports[o].name):(o=d.findIndex(p=>p.port===h&&!p.enabled),o!==-1&&(a=!0,i=j.I18n.t("ra_Port could be used by %s",this.state.ports[o].name)))}}return!i&&this.state._value!==null&&this.state._value!==void 0&&(i=this.checkValue(this.state._value),typeof i=="string"&&(i=j.I18n.t(i))),M.createElement(N.TextField,{variant:"standard",type:"number",fullWidth:!0,slotProps:{htmlInput:{min:u,max:v,readOnly:this.props.schema.readOnly||!1}},value:this.state._value===null||this.state._value===void 0?"":this.state._value,error:!!i,disabled:!!n,sx:a?ja.warning:void 0,onChange:h=>{const d=Number(h.target.value.toString().replace(/[^0-9]/g,"")).toString(),o=this.checkValue(d);o?this.onError(this.props.attr,j.I18n.t(o)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{if(d.trim()===parseInt(d,10).toString()){const p=this.onChange(this.props.attr,parseInt(d,10)||0);p instanceof Promise&&p.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:i&&typeof i=="string"?i:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}class Ua extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("rooms").then(n=>{const u=Object.keys(n).map(v=>({value:this.props.schema.short?v.replace("enum.rooms.",""):v,label:this.getText(n[v].common.name),obj:n[v]}));this.props.schema.allowDeactivate!==!1&&u.unshift({label:j.I18n.t(K.NONE_LABEL),value:K.NONE_VALUE}),this.setState({value:i,selectOptions:u})}).catch(n=>console.error(`Cannot get enums: ${n}`))}renderItem(i,n){if(!this.state.selectOptions)return null;const u=this.state.selectOptions.find(v=>v.value===this.state.value);return M.createElement(N.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:this.state.value||"_",renderValue:()=>u?u.obj?M.createElement(j.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):u.label:"",onChange:v=>{this.setState({value:v.target.value==="_"?"":v.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(v=>M.createElement(N.MenuItem,{key:v.value,value:v.value,style:v.value===K.DIFFERENT_VALUE?{opacity:.5}:{}},v.obj?M.createElement(j.TextWithIcon,{value:v.obj,themeType:this.props.oContext.themeType,lang:j.I18n.getLanguage()}):v.label))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ga={noMargin:{"&>div":{marginTop:0}}};class Ka extends K{initialValue="";componentDidMount(){super.componentDidMount();let i=K.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[]));const n=[];(this.props.schema.options||[]).forEach(u=>{const v=u;Array.isArray(v.items)?(n.push({label:this.getText(u.label,this.props.schema.noTranslation),value:u.value,group:!0}),v.items.forEach(a=>n.push({label:this.getText(a.label,this.props.schema.noTranslation),value:a.value,hidden:a.hidden}))):n.push({label:this.getText(u.label,this.props.schema.noTranslation),value:u.value,hidden:u.hidden})}),Array.isArray(i)&&!this.props.schema.multiple?(this.initialValue=[...i],n.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),this.setState({value:K.DIFFERENT_VALUE,selectOptions:n})):this.setState({value:i,selectOptions:n})}_getValue(){let i=this.state.value===null||this.state.value===void 0?K.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[])),i}renderItem(i,n){if(!this.state.selectOptions)return null;const u=(this.state.selectOptions||[]).filter(h=>h.hidden?this.props.custom?!this.executeCustom(h.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!this.execute(h.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!0),v=this._getValue(),a=this.props.schema.multiple?null:u.find(h=>h.value==v);return M.createElement(N.FormControl,{variant:"standard",fullWidth:!0,sx:this.props.table!==void 0&&Ga.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,multiple:this.props.schema.multiple,disabled:!!n,value:v||"_",renderValue:h=>this.props.schema.multiple?M.createElement(N.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},h.map(d=>{const o=u.find(p=>p.value===d);if(o||this.props.schema.showAllValues!==!1){const p=(o==null?void 0:o.label)||d;return M.createElement(N.Chip,{key:d,label:p})}return null})):this.getText(a==null?void 0:a.label,this.props.schema.noTranslation),onChange:h=>{this.setState({value:h.target.value==="_"?"":h.target.value},()=>{let d;this.state.value===K.DIFFERENT_VALUE?d=this.onChange(this.props.attr,this.initialValue):d=this.onChange(this.props.attr,this.state.value),d instanceof Promise&&d.catch(o=>console.error(o))})}},u.map((h,d)=>h.group?M.createElement(N.ListSubheader,{key:d},this.getText(h.label,this.props.schema.noTranslation)):M.createElement(N.MenuItem,{key:d,value:h.value,style:h.value===K.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?M.createElement(N.Checkbox,{checked:v.includes(h.value),onClick:()=>{const o=JSON.parse(JSON.stringify(this._getValue())),p=v.indexOf(h.value);p!==-1?o.splice(p,1):(o.push(h.value),o.sort()),this.setState({value:o},()=>this.onChange(this.props.attr,o))}}):null,M.createElement(N.ListItemText,{primary:this.getText(h.label,this.props.schema.noTranslation)})))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ja={menuPaper:{maxHeight:800}};class Ya extends K{initialized=!1;localContext;askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}i===void 0&&(i=null),this.setState({running:!0},()=>{this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>this.setState({list:n,running:!1})).catch(n=>{console.error(`Cannot send command: ${n}`)})})}else{const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i,running:!1})}}getContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=K.getValue(this.props.data,n)),JSON.stringify(i)}_getValue(){let i=this.state.value===null||this.state.value===void 0?K.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof i=="string"?i=[i]:i==null&&(i=[])),i}renderItem(i,n){var h;if(this.props.alive){const d=this.getContext();(d!==this.localContext||!this.initialized)&&(this.localContext=d,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}const u=this._getValue();if(!this.props.alive||!this.state.running&&!((h=this.state.list)!=null&&h.length))return this.props.schema.multiple||this.props.schema.manual===!1?j.I18n.t("ra_Cannot retrieve options, as instance is offline"):M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:u,error:!!i,disabled:!!n,onChange:d=>{const o=d.target.value;this.setState({value:o},()=>this.onChange(this.props.attr,(o||"").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?M.createElement(N.InputAdornment,{position:"end"},M.createElement(N.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({value:""},()=>this.onChange(this.props.attr,""))},M.createElement(Z.Close,null))):null}}});if(this.state.running)return M.createElement(N.CircularProgress,{size:"24"});const v=this.state.list.filter(d=>d.hidden?this.props.custom?!this.executeCustom(d.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!this.execute(d.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!0),a=v.find(d=>d.value===u);return M.createElement(N.FormControl,{variant:"standard",fullWidth:!0},this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,M.createElement(N.Select,{variant:"standard",error:!!i,multiple:this.props.schema.multiple,disabled:!!n,sx:{"&.MuiSelect-paper":this.props.schema.multiple?Ja.menuPaper:void 0},value:u,renderValue:d=>this.props.schema.multiple?M.createElement(N.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},d.map(o=>{const p=v.find(e=>e.value===o);if(p||this.props.schema.showAllValues!==!1){const e=(p==null?void 0:p.label)||o;return M.createElement(N.Chip,{key:o,label:e})}return null})):this.getText((a==null?void 0:a.label)||d,this.props.schema.noTranslation),onChange:d=>{const o=this.onChange(this.props.attr,d.target.value);o instanceof Promise&&o.catch(p=>console.error(`Cannot set value: ${p}`))}},v.map((d,o)=>d.group?M.createElement(N.ListSubheader,{key:o},this.getText(d.label,this.props.schema.noTranslation)):M.createElement(N.MenuItem,{key:o,value:d.value},this.props.schema.multiple?M.createElement(N.Checkbox,{checked:u.includes(d.value),onClick:()=>{const p=JSON.parse(JSON.stringify(this._getValue())),e=u.indexOf(d.value);e!==-1?p.splice(e,1):(p.push(d.value),p.sort()),this.setState({value:p},()=>this.onChange(this.props.attr,p))}}):null,M.createElement(N.ListItemText,{primary:d.label})))),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ti={fullWidth:{width:"100%"}};function ut(L){return L.split(".").reduce((i,n)=>(i<<8)+parseInt(n,10),0)>>>0}function Qa(L,i){var v,a;const n=(a=(v=L==null?void 0:L.native)==null?void 0:v.hardware)==null?void 0:a.networkInterfaces;if(!n)return null;let u;return Object.keys(n).forEach(h=>n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv4"&&!d.address.startsWith("172")&&(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/))?u=d.address:u||(d.family==="IPv4"&&i.includes(".")&&(ut(i)&ut(d.netmask),ut(d.address)&ut(d.netmask)),u=d.address))})),u||Object.keys(n).forEach(h=>n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv6"&&(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/))?u=d.address:u||(d.family==="IPv4"&&i.includes(".")&&(ut(i)&ut(d.netmask),ut(d.address)&ut(d.netmask)),u=d.address))})),u||Object.keys(n).forEach(h=>{n[h].forEach(d=>{d.internal||i.includes(":")&&d.family!=="IPv6"||i.includes(".")&&!i.match(/[^.\d]/)&&d.family!=="IPv4"||(i==="127.0.0.0"||i==="localhost"||i.match(/[^.\d]/),u=d.address)})}),u||Object.keys(n).forEach(h=>{n[h].forEach(d=>{d.internal||(u=d.address)})}),u}class _i extends K{async componentDidMount(){var n;super.componentDidMount();let i=window.location.hostname;if(this.props.schema.openUrl){const u=await this.props.oContext.socket.getCurrentInstance(),v=await this.props.oContext.socket.getObject(`system.adapter.${u}`);if(v){const a=await this.props.oContext.socket.getObject(`system.host.${(n=v==null?void 0:v.common)==null?void 0:n.host}`);if(a){const h=Qa(a,window.location.hostname);if(h)i=`${h}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${v.common.host} for ${v._id}`);return}}}}await new Promise(u=>{this.setState({_error:"",_message:"",hostname:i},u)}),this.props.schema.onLoaded&&this._onClick()}renderErrorDialog(){return this.state._error?M.createElement(j.DialogError,{text:this.state._error,onClose:()=>this.setState({_error:""})}):null}renderMessageDialog(){return this.state._message?M.createElement(j.DialogMessage,{text:this.state._message,onClose:()=>this.setState({_message:""})}):null}_onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});const i=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,"")}`,n=`${window.location.protocol}//${this.state.hostname.split(":").length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,"")}`;let u=this.props.schema.data;if(u===void 0&&this.props.schema.jsonData){const a=this.getPattern(this.props.schema.jsonData,{_origin:i,_originIp:n,...this.props.data},!0);try{u=JSON.parse(a)}catch{console.error(`Cannot parse json data: ${a}`)}}u===void 0&&(u=null),this.props.schema.openUrl&&!u&&(u={_origin:i,_originIp:n});let v;this.props.schema.timeout&&(v=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:j.I18n.t("ra_Request timed out"),running:!1})},parseInt(this.props.schema.timeout,10)||1e4)),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",u).then(async a=>{if(v&&(clearTimeout(v),v=void 0),a!=null&&a.error)if(this.props.schema.error&&this.props.schema.error[a.error]){let h=this.getText(this.props.schema.error[a.error]);a.args&&a.args.forEach(d=>h=h.replace("%s",d)),this.setState({_error:h})}else this.setState({_error:a.error?j.I18n.t(a.error):j.I18n.t("ra_Error")});else{if(a!=null&&a.command){this.props.oContext.onBackEndCommand&&this.props.oContext.onBackEndCommand(a.command);return}if(a!=null&&a.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(a!=null&&a.openUrl&&this.props.schema.openUrl)window.open(a.openUrl,a.window||this.props.schema.window||"_blank");else if(a!=null&&a.result&&this.props.schema.result&&this.props.schema.result[a.result]){let h=this.getText(this.props.schema.result[a.result]);a.args&&a.args.forEach(d=>h=h.replace("%s",d)),window.alert(h)}if(a!=null&&a.native&&this.props.schema.useNative){for(const[h,d]of Object.entries(a.native))await this.onChangeAsync(h,d);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(a.native),this.props.data),300)}else a!=null&&a.result?window.alert(typeof a.result=="object"?JSON.stringify(a.result):a.result):window.alert(j.I18n.t("ra_Ok"));a!=null&&a.saveConfig&&this.props.onChange(null,null,null,!0)}}).catch(a=>{this.props.schema.error&&this.props.schema.error[a.toString()]?this.setState({_error:this.getText(this.props.schema.error[a.toString()])}):this.setState({_error:j.I18n.t(a.toString())||j.I18n.t("ra_Error")})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=M.createElement(Z.Warning,null):i.type==="error"?n=M.createElement(Z.Error,null):i.type==="info"&&(n=M.createElement(Z.Info,null)),M.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n||void 0,onClose:u=>this.setState({confirmDialog:!1},()=>u&&this._onClick())})}renderItem(i,n){const u=this.getIcon();return M.createElement("div",{style:Ti.fullWidth},M.createElement(N.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...Ti.fullWidth,...this.props.schema.controlStyle||void 0},disabled:n||!this.props.alive,startIcon:u,title:this.props.alive?this.getText(this.props.schema.title)||"":j.I18n.t("ra_Instance is not alive"),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick()}},this.props.schema.showProcess&&this.state.running?M.createElement(N.CircularProgress,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog())}}const ki={fullWidth:{width:"100%"},icon:{width:24,height:24,marginRight:4}};class Xa extends K{async _onClick(){var u,v;let i=this.props.schema.val;if(typeof i=="string"&&i.includes("${")){i=this.getPattern(i,null,!0);const a=await this.props.oContext.socket.getObject(this.props.schema.id);((u=a==null?void 0:a.common)==null?void 0:u.type)==="number"?i=parseFloat(i):((v=a==null?void 0:a.common)==null?void 0:v.type)==="boolean"&&(i=i==="true"||i===!0||i==="1"||i===1)}const n=(this.props.schema.id||"").replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(n,{val:i,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(a){this.props.schema.error&&this.props.schema.error[a.toString()]?window.alert(this.getText(this.props.schema.error[a.toString()])):window.alert(j.I18n.t(a.toString())||j.I18n.t("ra_Error"))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const i=this.state.confirmData||this.props.schema.confirm;let n=null;return i.type==="warning"?n=M.createElement(Z.Warning,null):i.type==="error"?n=M.createElement(Z.Error,null):i.type==="info"&&(n=M.createElement(Z.Info,null)),M.createElement(j.DialogConfirm,{title:this.getText(i.title)||j.I18n.t("ra_Please confirm"),text:this.getText(i.text),ok:this.getText(i.ok)||j.I18n.t("ra_Ok"),cancel:this.getText(i.cancel)||j.I18n.t("ra_Cancel"),icon:n,onClose:u=>this.setState({confirmDialog:!1},()=>u&&this._onClick())})}renderItem(i,n){return M.createElement(N.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:ki.fullWidth,disabled:n,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()}},this.props.schema.icon?M.createElement(j.Icon,{src:this.props.schema.icon,style:ki.icon}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation))}}const Mi={fullWidth:{width:"100%"},slider:{marginLeft:10,marginRight:10,width:"calc(100% - 20px)"}};class Za extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.setState({_value:i})}static getDerivedStateFromProps(i,n){if(i.schema.min!==void 0&&i.schema.min<0||i.schema.max!==void 0&&i.schema.max<0)return null;const u=K.getValue(i.data,i.attr);return u==null||u.toString()!==parseFloat(n._value).toString()?{_value:u}:null}renderItem(i,n){const u=this.props.schema.min||0,v=this.props.schema.max||100,a=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):"",h=[{value:u,label:u+a},{value:v,label:v+a}];return M.createElement(N.Box,{style:Mi.fullWidth},this.props.schema.label?M.createElement(N.Typography,{gutterBottom:!0},this.getText(this.props.schema.label)):null,M.createElement(N.Slider,{style:Mi.slider,value:this.state._value,getAriaValueText:d=>d+a,step:this.props.schema.step||(v-u)/100,valueLabelDisplay:"auto",marks:h,min:u,max:v,disabled:!!n,onChange:d=>{const o=d.target.value;this.setState({_value:o},()=>this.onChange(this.props.attr,o))}}),this.props.schema.help?M.createElement(N.Typography,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}function ht(L,i){return L==="edit"||L==="rename"?M.createElement(Z.Edit,{style:i}):L==="delete"?M.createElement(Z.Delete,{style:i}):L==="refresh"?M.createElement(Z.Refresh,{style:i}):L==="newDevice"||L==="new"||L==="add"?M.createElement(Z.Add,{style:i}):L==="discover"||L==="search"?M.createElement(Z.Search,{style:i}):L==="unpairDevice"||L==="unpair"?M.createElement(Z.LinkOff,{style:i}):L==="pairDevice"||L==="pair"?M.createElement(Z.Link,{style:i}):L==="identify"?M.createElement(Z.NotListedLocation,{style:i}):L==="play"?M.createElement(Z.PlayArrow,{style:i}):L==="stop"?M.createElement(Z.Stop,{style:i}):L==="pause"?M.createElement(Z.Pause,{style:i}):L==="forward"||L==="next"?M.createElement(Z.FastForward,{style:i}):L==="rewind"||L==="previous"?M.createElement(Z.FastRewind,{style:i}):L==="lamp"||L==="light"?M.createElement(Z.Lightbulb,{style:i}):L==="backlight"?M.createElement(Z.Fluorescent,{style:i}):L==="dimmer"?M.createElement(Z.WbIncandescent,{style:i}):L==="socket"?M.createElement(Z.Power,{style:i}):L==="settings"?M.createElement(Z.Settings,{style:i}):L==="users"||L==="group"?M.createElement(Z.Group,{style:i}):L==="user"?M.createElement(Z.Person,{style:i}):L==="qrcode"?M.createElement(Z.QrCode,{style:i}):L==="connection"?M.createElement(Z.Wifi,{style:i}):L==="no-connection"?M.createElement(Z.WifiOff,{style:i}):L==="visible"?M.createElement(Z.Visibility,{style:i}):null}function qa(L,i){return typeof i=="string"?{"@keyframes newStateAnimationOnceColor":{"0%":{color:i},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnceColor 2s ease-in-out"}:{"@keyframes newStateAnimationOnce":{"0%":{color:"#00f900"},"80%":{color:L.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnce 2s ease-in-out"}}class el extends K{controlTimeout=null;delayedUpdate={timer:null,value:null};getObjectID(){let i=this.props.schema.oid;return i.includes("${")&&(i=this.getPattern(i,null,!0)),this.props.schema.foreign?i:`${this.props.schema.system?"system.adapter.":""}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${i}`}async componentDidMount(){super.componentDidMount();const i=await this.props.oContext.socket.getObject(this.getObjectID()),n=this.props.schema.control||this.detectType(i);try{const u=await this.props.oContext.socket.getState(this.getObjectID());this.setState({stateValue:u?u.val:null,controlType:n,obj:i},async()=>{await this.props.oContext.socket.subscribeState(this.getObjectID(),this.onStateChanged)})}catch(u){console.error(`Cannot get state ${this.getObjectID()}: ${u}`),this.setState({controlType:n,obj:i})}}componentWillUnmount(){super.componentWillUnmount(),this.props.oContext.socket.unsubscribeState(this.getObjectID(),this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1).catch(i=>console.error(`Cannot control value: ${i.toString()}`)))}onStateChanged=(i,n)=>{let u=n?n.val:null;this.state.controlType==="button"||this.state.controlType==="switch"?(u=!!u,this.state.stateValue!==u&&this.setState({stateValue:u})):u!==null&&(this.state.controlType==="slider"||this.state.controlType==="number")?(u=parseFloat(u),console.log(`${Date.now()} Received new value: ${u}`),u!==this.state.stateValue?(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=u,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500)):this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null)):this.state.stateValue.toString()!==u.toString()&&this.setState({stateValue:u})};detectType(i){if(i=i||{},i.common=i.common||{},i.common.type==="boolean"){if(this.props.schema.controlled!==!1){if(i.common.read===!1||this.props.schema.controlled===!0)return"button";if(i.common.write||this.props.schema.controlled===!0)return"switch"}return"text"}return i.common.type==="number"&&this.props.schema.controlled!==!1?i.common.write||this.props.schema.controlled===!0?i.common.max!==void 0?"slider":"input":"text":i.common.write&&this.props.schema.controlled!==!1?"input":"text"}renderItem(i,n){var v,a,h,d,o;if(!this.state.obj)return null;let u;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||(v=this.state.obj.common.role)!=null&&v.includes("button"))){let p=null;this.props.schema.falseImage&&(p=ht(this.props.schema.falseImage));const e=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);!e&&p?u=M.createElement(N.IconButton,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async t=>{t&&await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},p):u=M.createElement(N.Button,{variant:this.props.schema.variant||"contained",startIcon:p,style:this.props.schema.falseTextStyle,disabled:n||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async t=>{t&&await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},e||this.getObjectID().split(".").pop())}else if(this.state.controlType==="input"||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type==="string")u=M.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:8,alignItems:"baseline"}},M.createElement(N.TextField,{style:{flex:1},value:this.state.stateValue,variant:"standard",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:p=>{this.props.schema.setOnEnterKey&&p.key==="Enter"&&this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)},onChange:p=>{this.setState({stateValue:p.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null,await this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!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&&M.createElement(N.Button,{variant:"outlined",onClick:()=>{this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)}},this.getText(typeof this.props.schema.showEnterButton=="string"?this.props.schema.showEnterButton:"Set")));else{let p;this.props.schema.size==="normal"?p=16:this.props.schema.size==="large"?p=20:typeof this.props.schema.size=="number"&&(p=this.props.schema.size);let e=this.getText(this.props.schema.label,this.props.schema.noTranslation);const t={display:"flex",alignItems:"center",fontSize:p||"1rem",gap:8};this.props.schema.narrow||(t.width="100%",t.justifyContent="space-between"),e.trim()&&!e.trim().endsWith(":")&&this.props.schema.addColon&&(e=`${e.trim()}:`);let r;this.props.schema.blinkOnUpdate&&(r=qa(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let l;this.props.schema.labelIcon&&(l=M.createElement(j.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let s;if(e&&l?s=M.createElement("div",{style:{whiteSpace:"nowrap"}},l,e):e?s=M.createElement("div",{style:{whiteSpace:"nowrap"}},e):l&&(s=l),this.state.controlType==="switch"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(a=this.state.obj.common.role)!=null&&a.includes("switch"))){let c=null;const f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0));let m=null;const y=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(m=ht(this.props.schema.trueImage,y?{marginRight:8}:void 0)),u=M.createElement(N.Switch,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async D=>{D&&await this.props.oContext.socket.setState(this.getObjectID(),!this.state.stateValue,!1)}}):await this.props.oContext.socket.setState(this.getObjectID(),!this.state.stateValue,!1)}}),(f||c||y||m)&&(u=M.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14}},M.createElement("span",{style:this.props.schema.falseTextStyle},f,c),u,M.createElement("span",{style:this.props.schema.trueTextStyle},m,y))),s&&(u=M.createElement("div",{style:t},s,u))}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==="%")||(h=this.state.obj.common.role)!=null&&h.includes("slider")||(d=this.state.obj.common.role)!=null&&d.includes("dimmer")||(o=this.state.obj.common.role)!=null&&o.includes("blind"))){let c=null;const f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0));let m=null;const y=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(m=ht(this.props.schema.trueImage,y?{marginRight:8}:void 0));const D=this.props.schema.min===void 0?this.state.obj.common.min||0:this.props.schema.min,E=this.props.schema.max===void 0?this.state.obj.common.max===void 0?100:this.state.obj.common.max:this.props.schema.max,b=this.props.schema.step===void 0?this.state.obj.common.step||1:this.props.schema.step;u=M.createElement(N.Slider,{style:{width:"100%",flexGrow:1},min:D,max:E,disabled:!!this.props.schema.readOnly,step:b,value:this.state.stateValue,valueLabelDisplay:"auto",valueLabelFormat:g=>`${g}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||""}`,onChange:(g,S)=>{this.setState({stateValue:S},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,await this.props.oContext.socket.setState(this.getObjectID(),this.state.stateValue,!1)},this.props.schema.controlDelay||0)})}}),(f||c||y||m)&&(u=M.createElement("div",{style:{display:"flex",width:"100%",flexGrow:1,alignItems:"center"}},M.createElement("span",{style:{marginRight:16,...this.props.schema.falseTextStyle}},f,c),u,M.createElement("span",{style:{marginLeft:16,...this.props.schema.trueTextStyle}},m,y))),s&&(u=M.createElement("div",{style:t},s,u))}else if(this.state.obj.common.type==="number"&&this.state.obj.common.write){const c=this.props.schema.min===void 0?this.state.obj.common.min===void 0?void 0:this.state.obj.common.min:this.props.schema.min,f=this.props.schema.max===void 0?this.state.obj.common.max===void 0?void 0:this.state.obj.common.max:this.props.schema.max,m=this.props.schema.step===void 0?this.state.obj.common.step===void 0?void 0:this.state.obj.common.step:this.props.schema.step;u=M.createElement(N.TextField,{variant:"standard",style:{width:"100%"},value:this.state.stateValue,type:"number",slotProps:{htmlInput:{min:c,max:f,step:m,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:y=>{this.setState({stateValue:y.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;const D=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.getObjectID(),D,!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 c=null,f,m;this.state.stateValue?(f=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(c=ht(this.props.schema.falseImage,f?{marginRight:8}:void 0)),m=this.props.schema.trueTextStyle):(f=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(c=ht(this.props.schema.falseImage,f?{marginLeft:8}:void 0)),m=this.props.schema.falseTextStyle),m=Object.assign(t,m),u=M.createElement("div",{style:m},s,M.createElement(N.Box,{style:{display:"flex",alignItems:"center",gap:8},sx:r,key:this.props.schema.blinkOnUpdate?f:void 0},c,f||(this.state.stateValue?j.I18n.t("ra_true"):j.I18n.t("ra_false"))))}else{const c=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit;let f,m;this.state.controlType==="html"?(m=(this.state.stateValue||"").toString(),f=M.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.stateValue}})):this.state.stateValue===null?(f="null",m=f):this.state.stateValue===void 0?(f="undefined",m=f):(f=this.state.stateValue.toString(),m=f),u=M.createElement("div",{style:t},s,M.createElement("div",{style:{display:"flex",alignItems:"baseline",gap:4}},M.createElement(N.Box,{sx:r,key:this.props.schema.blinkOnUpdate?m:void 0},f),c?M.createElement("span",{style:{opacity:.7,fontSize:"smaller"}},c):null))}}return u}}const Nn={fullWidth:L=>({width:"100%",backgroundColor:L.palette.mode==="dark"?"#FFF":"#000",borderStyle:"hidden"}),primary:L=>({backgroundColor:L.palette.primary.main}),secondary:L=>({backgroundColor:L.palette.secondary.main})};class tl extends K{renderItem(){return M.createElement(N.Box,{component:"hr",sx:j.Utils.getStyle(this.props.oContext.theme,Nn.fullWidth,this.props.schema.color==="primary"?Nn.primary:this.props.schema.color==="secondary"?Nn.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})})}}const nl={header:L=>({width:"100%",background:L.palette.primary.main,color:L.palette.primary.contrastText,padding:"4px !important",borderRadius:"3px",marginBlockEnd:0,marginBlockStart:0})};class il extends K{renderItem(){let i="h5";switch((this.props.schema.size||5).toString()){case"1":i="h1";break;case"2":i="h2";break;case"3":i="h3";break;case"4":i="h4";break;case"5":default:i="h5";break}return M.createElement(N.Box,{component:i,sx:nl.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}}class rl extends K{renderItem(){let i=this.props.schema.src;return i&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!i.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(i=`adapter/${this.props.oContext.adapterName}/${i}`),M.createElement("img",{src:i,style:{cursor:this.props.schema.href?"pointer":void 0,width:"100%",height:"100%"},onClick:this.props.schema.href?()=>this.props.schema.href&&window.open(this.props.schema.href,"_blank"):null,alt:""})}}function Li(L,i,n){return typeof n=="string"?{"@keyframes newValueAnimationOnceColor":{"0%":{color:i?`${n} !important`:n},"100%":{color:L.palette.mode==="dark"?i?"#fff !important":"#fff":i?"#000 !important":"#000"}},animation:"newValueAnimationOnceColor 2s ease-in-out"}:{"@keyframes newValueAnimationOnce":{"0%":{color:i?"#00f900 !important":"#00f900"},"80%":{color:L.palette.mode==="dark"?i?"#518851 !important":"#518851":i?"#008000 !important":"#008000"},"100%":{color:L.palette.mode==="dark"?i?"#fff !important":"#fff":i?"#000 !important":"#000"}},animation:"newValueAnimationOnce 2s ease-in-out"}}function Ii(L,i){return typeof i=="string"?{"@keyframes blinkAnimationColor":{"0%":{color:i},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimationColor 2s ease-in-out infinite"}:{"@keyframes blinkAnimation":{"0%":{color:"#00f900"},"80%":{color:L.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:L.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimation 2s ease-in-out infinite"}}const Mt={label:{fontWeight:"bold",whiteSpace:"nowrap"},valueImage:{maxHeight:"100%"},valueAndUnit:{display:"flex",gap:4,alignItems:"baseline"},value:{},unit:{fontSize:"smaller",opacity:.7}};class sl extends K{renderItem(i){let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof n=="string"&&!n.trim().endsWith(":")&&(n=`${n.trim()}:`),n&&(n.includes("
")||n.includes(""))&&(n=j.Utils.renderTextWithA(n));let u;this.props.schema.size==="normal"?u=16:this.props.schema.size==="large"?u=20:typeof this.props.schema.size=="number"&&(u=this.props.schema.size);const v={width:"100%",height:"100%",display:"flex",alignItems:"center",position:"relative",fontSize:u};this.props.schema.narrow?v.gap=8:v.justifyContent="space-between";let a,h;this.props.schema.data&&typeof this.props.schema.data=="object"&&this.props.schema.data.en?h=this.getText(this.props.schema.data):typeof this.props.schema.data=="object"||this.props.schema.data===void 0||this.props.schema.data===null?h=JSON.stringify(this.props.schema.data):typeof this.props.schema.data=="number"?(h=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(h=h.replace(".",","))):(!this.props.schema.booleanAsCheckbox||typeof this.props.schema.data!="boolean")&&(h=this.props.schema.data.toString());let d=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data=="boolean")a=M.createElement(N.Checkbox,{checked:!!a,disabled:!0,size:this.props.schema.size==="small"?"small":this.props.schema.size==="large"?"large":void 0});else if(h.startsWith("data:image/"))a=M.createElement("div",{style:{...Mt.value,...Mt.valueImage,...this.props.schema.styleValue||void 0}},M.createElement(j.Icon,{src:h}));else{const t={...Mt.value,...this.props.schema.styleValue||void 0};this.props.schema.html?a=M.createElement("div",{style:t,dangerouslySetInnerHTML:{__html:h}}):Array.isArray(this.props.schema.data)?(d=!0,a=M.createElement("div",{style:t},this.props.schema.data.map((r,l)=>M.createElement("div",{key:l},typeof r=="object"||r===null||r===void 0?JSON.stringify(r):r)))):h.includes(` +`)?(d=!0,a=M.createElement("div",{style:t},j.Utils.renderTextWithA(h))):a=M.createElement("div",{style:t},h)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){const t=Li(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),r=Ii(this.props.oContext.theme,this.props.schema.blink);a=M.createElement(N.Box,{key:h,sx:{...t,...r}},a)}else if(this.props.schema.blinkOnUpdate){const t=Li(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);a=M.createElement(N.Box,{key:h,sx:t},a)}else if(this.props.schema.blink){const t=Ii(this.props.oContext.theme,this.props.schema.blink);a=M.createElement(N.Box,{sx:t},a)}this.props.schema.unit&&(a=M.createElement("div",{style:Mt.valueAndUnit},a,M.createElement("div",{style:{...Mt.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let o;this.props.schema.labelIcon&&(o=M.createElement(j.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let p;this.props.schema.copyToClipboard&&(p=M.createElement(Z.ContentCopy,{className:"staticCopyButton",style:{position:"absolute",top:"calc(50% - 12px)",right:0,cursor:"pointer"},onClick:()=>{j.Utils.copyToClipboard(h),window.alert(j.I18n.t("ra_Copied"))}}));const e={"& .staticCopyButton":{display:"none"},"& .staticCopyButton:action":{transform:"scale(0.9)"},"&:hover .staticCopyButton":{display:"block"}};return this.props.schema.highlight&&(e["&:hover"]={backgroundColor:this.props.oContext.themeType==="dark"?"#51515180":"#b8b8b880"}),d&&(v.alignItems="top"),M.createElement(N.Box,{component:"div",style:v,sx:e},M.createElement("div",{style:{...Mt.label,...this.props.schema.styleLabel||void 0}},o,n),a,p)}}const Fi={fullWidth:{height:"100%",width:"100%"},link:L=>({textDecoration:"underline",color:L.palette.mode==="dark"?"#4dabf5":"#254e72",cursor:"pointer"})};function Ri(L,i,n){let u,v="";L?L.toString().startsWith("#")||L.toString().startsWith("/")?(u=i||"_self",v=L):L.startsWith("http://")||L.startsWith("https://")?(u=i||"_blank",v=L):(v=`#tab-instances/config/${n}/${L}`,u=i||"_self"):(v=`#tab-instances/config/${n}`,u=i||"_self"),u==="_self"?setTimeout(a=>{a.startsWith("#")?window.location.hash=a:a.startsWith("/")?v=`${window.location.protocol}:${window.location.host}${v}`:(a.startsWith("http://")||a.startsWith("https://"))&&(window.location.href=a)},100,v):(v.startsWith("#")?v=`${window.location.protocol}:${window.location.host}${window.location.pathname}${v}`:v.startsWith("/")&&(v=`${window.location.protocol}:${window.location.host}${v}`),window.open(v,u))}class Oi extends K{renderItem(i,n){if(this.props.schema.button){const v=this.getIcon();return M.createElement(N.Button,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...Fi.fullWidth,...this.props.schema.controlStyle||void 0},disabled:n,startIcon:v,onClick:this.props.schema.href?()=>{const a=this.props.schema.href?this.getText(this.props.schema.href,!0):null;a&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:a,target:this.props.schema.target,close:this.props.schema.close}):Ri(a,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let u=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);return u&&(u.includes("")||u.includes(""))&&(u=j.Utils.renderTextWithA(u)),M.createElement(N.Box,{component:"span",style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?Fi.link:void 0,onClick:this.props.schema.href?()=>{const v=this.props.schema.href?this.getText(this.props.schema.href,!0):null;v&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:v,target:this.props.schema.target||"_blank",close:this.props.schema.close}):Ri(v,this.props.schema.target||"_blank",`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},u)}}const Bn=1024*1024,fe={paper:{width:"100%",marginBottom:16,backgroundColor:"rgba(255, 255, 255, 0.1)"},headerText:{width:"100%"},table:{minWidth:750},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)"},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"},tooltip:{pointerEvents:"none"}};function ol(L,i,n){i=i||"key";const u=[];return Object.keys(L).forEach(v=>{const a={};a[i]=v,n?(a[n]=L[v],u.push(a)):u.push(Object.assign(a,L[v]))}),u}function Ni(L,i,n){i=i||"key";const u={};return L.forEach(v=>{let a=v[i];a==null&&(a=""),delete v[i],n?u[a]=v[n]:u[a]=v}),u}function al(L,i){let n="";for(let u=0;u{n.filter&&(this.filterRefs[n.attr]=pt.createRef())}),this.refDiv=M.createRef()}async componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr)||[];let n;if(this.props.schema.objKeyName?n=ol(i,this.props.schema.objKeyName,this.props.schema.objValueName):n=i,Array.isArray(n)||(n=[]),this.props.schema.encryptedAttributes){const u=await this.props.oContext.socket.getCompactSystemConfig();this.secret=(u==null?void 0:u.native.secret)||this.secret,i.forEach(v=>{this.props.schema.encryptedAttributes.forEach(a=>{v[a]&&(v[a]=ll(this.secret,v[a]))})})}this.setState({value:n,visibleValue:null,orderBy:"",order:"asc",iteration:0,filterOn:[],width:0},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),super.componentWillUnmount()}itemTable(i,n,u){var d;const{schema:v}=this.props,a=(d=v.items)==null?void 0:d.find(o=>o.attr===i);if(!a)return null;const h={items:{[i]:a}};return M.createElement($t,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:u,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:n,globalData:this.props.data,index:u+this.state.iteration,onChange:(o,p)=>{const e=JSON.parse(JSON.stringify(this.state.value));e[u][o]=p,this.setState({value:e},()=>{this.validateUniqueProps(),this.onChangeWrapper(e,!0)})},onError:(o,p)=>this.onError(o,p),originalData:this.props.originalData,schema:h,table:!0,themeName:this.props.themeName})}validateUniqueProps(){if(this.props.schema.uniqueColumns)for(const i of this.props.schema.uniqueColumns){const n=[];this.state.value.find(v=>{const a=v[i];return n.includes(a)?(this.onError(i,"is not unique"),this.setState({errorMessage:j.I18n.t('Non-allowed duplicate entry "%s" in column "%s"',a,i)}),!0):(n.push(a),!1)})||(this.onError(i,null),this.setState({errorMessage:""}))}}static descendingComparator(i,n,u){return n[u]i[u]?1:0}static getComparator(i,n){return i==="desc"?(u,v)=>Ve.descendingComparator(u,v,n):(u,v)=>-Ve.descendingComparator(u,v,n)}static getFilterValue(i){var n,u,v;return(v=(u=(n=i==null?void 0:i.current)==null?void 0:n.children[0])==null?void 0:u.children[0])==null?void 0:v.value}static setFilterValue(i,n){return i.current.children[0].children[0].value=n}handleRequestSort=(i,n=!1)=>{const{order:u,orderBy:v}=this.state,h=n?u:v===i&&u==="asc"?"desc":"asc",d=this.stableSort(h,i);JSON.stringify(d)!==JSON.stringify(this.state.value)&&this.setState({value:d,order:h,orderBy:i,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,d))};stableSort=(i,n)=>{const{value:u}=this.state,v=Ve.getComparator(i,n),a=u.map((h,d)=>({el:h,index:d}));return a.sort((h,d)=>{const o=v(h.el,d.el);return o!==0?o:h.index-d.index}),a.map(h=>h.el)};renderShowHideFilter(i){return i.filter?M.createElement(N.IconButton,{title:j.I18n.t("ra_Show/hide filter input"),size:"small",onClick:()=>{const n=[...this.state.filterOn],u=this.state.filterOn.indexOf(i.attr);u===-1?n.push(i.attr):n.splice(u,1),this.setState({filterOn:n},()=>{u&&Ve.getFilterValue(this.filterRefs[i.attr])&&(Ve.setFilterValue(this.filterRefs[i.attr],""),this.applyFilter())})}},this.state.filterOn.includes(i.attr)?M.createElement(Z.FilterAltOff,null):M.createElement(Z.FilterAlt,null)):null}renderImportExportButtons(i){return M.createElement(M.Fragment,null,!i.noDelete&&i.import?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Import data from %s file","CSV"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:()=>this.setState({showImportDialog:!0})},M.createElement(Z.UploadFile,null))):null,i.export?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Export data to %s file","CSV"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:()=>this.onExport()},M.createElement(Z.Download,null))):null,M.createElement(N.IconButton,{disabled:!0,size:"small"},M.createElement(Z.Delete,null)))}renderAddButton(i){return M.createElement(N.Tooltip,{title:i?j.I18n.t("ra_Cannot add items with set filter"):j.I18n.t("ra_Add row"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement("span",null,M.createElement(N.IconButton,{size:"small",color:"primary",disabled:!!i&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},M.createElement(Z.Add,null))))}enhancedTableHead(i,n){var h;const{schema:u}=this.props,{order:v,orderBy:a}=this.state;return M.createElement(N.TableHead,null,M.createElement(N.TableRow,null,(h=u.items)==null?void 0:h.map((d,o)=>this.renderOneFilter({schema:u,style:{width:d.width},showAddButton:!o&&!u.noDelete,headCell:d,order:v,orderBy:a,index:o,doAnyFilterSet:n})),!u.noDelete&&M.createElement(N.TableCell,{style:{paddingLeft:20,paddingRight:20,width:i,textAlign:"right"},padding:"checkbox"},this.renderImportExportButtons(u))))}onDelete=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value));n.splice(i,1),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};onExport(){const{schema:i}=this.props,{value:n}=this.state,v=[i.items.map(d=>d.attr).join(";")];n.forEach(d=>{const o=[];i.items.forEach(p=>{var e;(e=d[p.attr])!=null&&e.includes(";")?o.push(`"${d[p.attr]}"`):o.push(d[p.attr]===void 0||d[p.attr]===null?"":d[p.attr])}),v.push(o.join(";"))});const a=document.createElement("a");a.setAttribute("href",`data:text/csv;charset=utf-8,${encodeURIComponent(v.join(` +`))}`);const h=new Date;a.setAttribute("download",`${h.getFullYear()}_${(h.getMonth()+1).toString().padStart(2,"0")}_${h.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(i){var h;const n=i.split(` +`).map(d=>d.replace("\r","").trim()),{schema:u}=this.props,v=n.shift().split(";").filter(d=>d&&u.items.find(o=>o.attr===d)),a=[];n.forEach(d=>{const o=d.split(";"),p={};for(let e=0;es.attr===v[e]);l&&l.type==="number"?r=parseFloat(t):r=t}else r=t;p[v[e]]=r}a.push(p)}),a.length?(h=this.state.value)!=null&&h.length?this.setState({showTypeOfImportDialog:a,showImportDialog:!1}):this.setState({value:a,showImportDialog:!1}):window.alert("ra_No data found in file")}onClone=i=>()=>{const n=JSON.parse(JSON.stringify(this.state.value)),u=JSON.parse(JSON.stringify(n[i]));if(typeof this.props.schema.clone=="string"&&typeof u[this.props.schema.clone]=="string"){let v=1,a=u[this.props.schema.clone];const h=a.match(/(\d+)$/);for(h?(a=a.replace(h[0],""),v=parseInt(h[0],10)+1):a+="_";n.find(d=>d[this.props.schema.clone]===a+v.toString());)v++;u[this.props.schema.clone]=`${u[this.props.schema.clone]}_${v}`}n.splice(i,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};onChangeWrapper=(i,n)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((u,v)=>{this.typingTimer=null;let a;if(this.props.schema.encryptedAttributes){const h=JSON.parse(JSON.stringify(u));if(h.forEach(d=>{this.props.schema.encryptedAttributes.forEach(o=>{d[o]&&(d[o]=al(this.secret,d[o]))})}),this.props.schema.objKeyName){const d=Ni(h,this.props.schema.objKeyName,this.props.schema.objValueName);a=this.onChange(this.props.attr,d)}else a=this.onChange(this.props.attr,h)}else if(this.props.schema.objKeyName){const h=Ni(JSON.parse(JSON.stringify(u)),this.props.schema.objKeyName,this.props.schema.objValueName);a=this.onChange(this.props.attr,h)}else a=this.onChange(this.props.attr,u);a instanceof Promise&&a.catch(h=>console.error(`Cannot save: ${h}`)),v&&(this.applyFilter(!1,u),this.handleRequestSort(this.state.orderBy,!0))},300,i,n)};onAdd=()=>{var v;const{schema:i}=this.props,n=JSON.parse(JSON.stringify(this.state.value)),u=(v=i.items)==null?void 0:v.reduce((a,h)=>{let d;return h.defaultFunc?this.props.custom?d=h.defaultFunc?this.executeCustom(h.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,n.length,this.props.data):this.props.schema.default:d=h.defaultFunc?this.execute(h.defaultFunc,this.props.schema.default,this.props.data,n.length,this.props.data):this.props.schema.default:d=h.default===void 0?null:h.default,a[h.attr]=d,a},{});n.push(u),this.setState({value:n},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))};isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(i=>Ve.getFilterValue(this.filterRefs[i]))}applyFilter=(i,n,u)=>{n=n||this.state.value;let v=n.map((a,h)=>h);if(Object.keys(this.filterRefs).forEach(a=>{let h=Ve.getFilterValue(this.filterRefs[a]);!i&&h?(h=h.toLowerCase(),v=v.filter(d=>n[d]&&n[d][a]&&n[d][a].toLowerCase().includes(h))):this.filterRefs[a].current&&Ve.setFilterValue(this.filterRefs[a],"")}),v.length===n.length&&(v=null),v===null&&this.state.visibleValue===null){u&&u();return}JSON.stringify(v)!==JSON.stringify(this.state.visibleValue)?this.setState({visibleValue:v},()=>u&&u()):u&&u()};onMoveUp(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i-1,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))}onMoveDown(i){const n=JSON.parse(JSON.stringify(this.state.value)),u=n[i];n.splice(i,1),n.splice(i+1,0,u),this.setState({value:n,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(n)))}onDrop(i){const n=i[0],u=new FileReader;u.onabort=()=>console.log("file reading was aborted"),u.onerror=()=>console.log("file reading has failed"),u.onload=()=>{if(n.size>Bn){window.alert(j.I18n.t("ra_File is too big. Max %sk allowed. Try use SVG.",Math.round(Bn/1024)));return}const v=new Uint8Array(u.result).reduce((a,h)=>a+String.fromCharCode(h),"");this.onImport(v)},u.readAsArrayBuffer(n)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?M.createElement(N.Dialog,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:"md"},M.createElement(N.DialogTitle,null,j.I18n.t("ra_Append or replace?")),M.createElement(N.DialogContent,null,j.I18n.t("ra_Append %s entries or replace existing?",this.state.showTypeOfImportDialog.length)),M.createElement(N.DialogActions,null,M.createElement(N.Button,{variant:"contained",color:"primary",autoFocus:!0,onClick:()=>{const i=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(n=>i.push(n)),this.setState({value:i,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(i)))}},j.I18n.t("ra_Append")),M.createElement(N.Button,{variant:"contained",color:"secondary",autoFocus:!0,onClick:()=>{const i=this.state.showTypeOfImportDialog;this.setState({value:i,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(i)))}},j.I18n.t("ra_Replace")))):null}showImportDialog(){return this.state.showImportDialog?M.createElement(N.Dialog,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:"md",fullWidth:!0},M.createElement(N.DialogTitle,null,j.I18n.t("ra_Import from %s","CSV")),M.createElement(N.DialogContent,null,M.createElement(Wi,{multiple:!1,accept:{"text/csv":[".csv"]},maxSize:Bn,onDragEnter:()=>this.setState({uploadFile:"dragging"}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(i,n)=>{this.setState({uploadFile:!1}),i.length?this.onDrop(i):window.alert(n&&n[0]&&n[0].errors&&n[0].errors[0]&&n[0].errors[0].message||j.I18n.t("ra_Cannot upload"))}},({getRootProps:i,getInputProps:n})=>M.createElement("div",{style:{...fe.uploadDiv,...this.state.uploadFile==="dragging"?fe.uploadDivDragging:void 0,...fe.dropZone,...this.state.icon?void 0:fe.dropZoneEmpty},...i()},M.createElement("input",{...n()}),M.createElement("div",{style:fe.uploadCenterDiv},M.createElement("div",{style:fe.uploadCenterTextAndIcon},M.createElement(Z.UploadFile,{style:fe.uploadCenterIcon}),M.createElement("div",{style:fe.uploadCenterText},this.state.uploadFile==="dragging"?j.I18n.t("ra_Drop file here"):j.I18n.t("ra_Place your files here or click here to open the browse dialog"))))))),M.createElement(N.DialogActions,null,M.createElement(N.Button,{variant:"contained",onClick:()=>this.setState({showImportDialog:!1}),color:"primary",startIcon:M.createElement(Z.Close,null)},j.I18n.t("Cancel")))):null}renderOneFilter(i){return M.createElement(N.TableCell,{key:`${i.headCell.attr}_${i.index}`,style:i.style,align:"left",sortDirection:i.orderBy===i.headCell.attr?i.order:!1},M.createElement("div",{style:{...fe.flex,...i.schema.showFirstAddOnTop?{flexDirection:"column"}:void 0}},i.showAddButton?this.renderAddButton(i.doAnyFilterSet):null,i.headCell.sort&&M.createElement(N.TableSortLabel,{active:!0,style:i.orderBy!==i.headCell.attr?fe.silver:void 0,direction:i.orderBy===i.headCell.attr?i.order:"asc",onClick:()=>this.handleRequestSort(i.headCell.attr)}),i.headCell.filter&&this.state.filterOn.includes(i.headCell.attr)?M.createElement(N.TextField,{variant:"standard",ref:this.filterRefs[i.headCell.attr],onChange:()=>this.applyFilter(),title:j.I18n.t("ra_You can filter entries by entering here some text"),slotProps:{input:{endAdornment:Ve.getFilterValue(this.filterRefs[i.headCell.attr])&&M.createElement(N.InputAdornment,{position:"end"},M.createElement(N.IconButton,{size:"small",tabIndex:-1,onClick:()=>{Ve.setFilterValue(this.filterRefs[i.headCell.attr],""),this.applyFilter()}},M.createElement(Z.Close,null)))}},fullWidth:!0,placeholder:this.getText(i.headCell.title)}):M.createElement("span",{style:fe.headerText},this.getText(i.headCell.title)),this.renderShowHideFilter(i.headCell)))}enhancedFilterCard(){var a;const{schema:i}=this.props,{order:n,orderBy:u}=this.state;let v;return this.props.schema.compact&&(v={paddingTop:1,paddingBottom:1}),M.createElement(N.Grid2,{size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},M.createElement(N.Card,null,M.createElement(N.Paper,{style:fe.paper},M.createElement(N.Accordion,{style:fe.paper},M.createElement(N.AccordionSummary,{expandIcon:M.createElement(Z.ExpandMore,null)},M.createElement(N.Typography,null,j.I18n.t("ra_Filter and Data Actions"))),M.createElement(N.AccordionDetails,null,M.createElement(N.Table,null,M.createElement(N.TableBody,null,(a=i.items)==null?void 0:a.map((h,d)=>M.createElement(N.TableRow,{key:`${h.attr}_${d}`},this.renderOneFilter({schema:i,style:v,showAddButton:!1,headCell:h,order:n,orderBy:u,index:d,doAnyFilterSet:!1}))),M.createElement(N.TableRow,null,M.createElement(N.TableCell,{align:"left",style:v},M.createElement("span",{style:fe.headerText},j.I18n.t("ra_Actions"))),M.createElement(N.TableCell,{style:v},this.renderImportExportButtons(i))))))))))}enhancedBottomCard(){const{schema:i}=this.props;let n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});const u=this.isAnyFilterSet();return M.createElement(N.Grid2,{size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},M.createElement(N.Card,null,M.createElement(N.Paper,{style:fe.paper},M.createElement(N.Table,null,M.createElement(N.TableBody,null,M.createElement(N.TableRow,null,M.createElement(N.TableCell,{colSpan:i.items.length+1,style:n},this.renderAddButton(u))))))))}renderCards(){const{schema:i}=this.props;let{visibleValue:n}=this.state,u;this.props.schema.compact&&(u={paddingTop:1,paddingBottom:1}),n=n||this.state.value.map((a,h)=>h);const v=this.isAnyFilterSet();return M.createElement(N.Grid2,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),n.map((a,h)=>{var d;return M.createElement(N.Grid2,{key:`${a}_${h}`,size:{xs:i.xs||12,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0}},M.createElement(N.Card,null,M.createElement(N.Paper,{style:fe.paper},M.createElement(N.Table,null,M.createElement(N.TableBody,null,(d=i.items)==null?void 0:d.map(o=>M.createElement(N.TableRow,{key:`${o.attr}_${a}`},M.createElement(N.TableCell,{align:"left",style:u},M.createElement("span",{style:fe.headerText},this.getText(o.title))),M.createElement(N.TableCell,{align:"left",style:u},this.itemTable(o.attr,this.state.value[a],a)))),M.createElement(N.TableRow,null,M.createElement(N.TableCell,{align:"left",style:u},M.createElement("span",{style:fe.headerText},this.getText("Actions"))),M.createElement(N.TableCell,{align:"left",style:u},!v&&!this.state.orderBy?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement("span",null,M.createElement(N.IconButton,{size:"small",onClick:()=>this.onMoveUp(a),disabled:h===0},M.createElement(Z.ArrowUpward,null)))):null,!v&&!this.state.orderBy?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Move down"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement("span",null,M.createElement(N.IconButton,{size:"small",onClick:()=>this.onMoveDown(a),disabled:h===n.length-1},M.createElement(Z.ArrowDownward,null)))):null,M.createElement(N.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onDelete(a)},M.createElement(Z.Delete,null))),this.props.schema.clone?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onClone(a)},M.createElement(Z.ContentCopy,null))):null)))))))}),this.enhancedBottomCard())}renderTable(){const{schema:i}=this.props;let{visibleValue:n}=this.state;n=n||this.state.value.map((a,h)=>h);const u=this.isAnyFilterSet();let v;return this.props.schema.compact&&(v={paddingTop:1,paddingBottom:1}),M.createElement(N.Paper,{style:fe.paper},this.showImportDialog(),this.showTypeOfImportDialog(),i.label?M.createElement("div",{style:fe.label},M.createElement(N.Toolbar,{variant:"dense",style:fe.rootTool},M.createElement(N.Typography,{style:fe.title,variant:"h6",id:"tableTitle",component:"div"},this.getText(i.label)))):null,M.createElement(N.TableContainer,null,M.createElement(N.Table,{style:fe.table,size:"small"},this.enhancedTableHead(!u&&!this.state.orderBy?120:64,u),M.createElement(N.TableBody,null,n.map((a,h)=>{var d;return M.createElement(N.TableRow,{hover:!0,key:`${a}_${h}`},(d=i.items)==null?void 0:d.map(o=>M.createElement(N.TableCell,{key:`${o.attr}_${a}`,align:"left",style:v},this.itemTable(o.attr,this.state.value[a],a))),!i.noDelete&&M.createElement(N.TableCell,{align:"left",style:{...v,...fe.buttonCell}},!u&&!this.state.orderBy?h?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Move up"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:()=>this.onMoveUp(a)},M.createElement(Z.ArrowUpward,null))):M.createElement("div",{style:fe.buttonEmpty}):null,!u&&!this.state.orderBy?hthis.onMoveDown(a)},M.createElement(Z.ArrowDownward,null))):M.createElement("div",{style:fe.buttonEmpty}):null,M.createElement(N.Tooltip,{title:j.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onDelete(a)},M.createElement(Z.Delete,null))),this.props.schema.clone?M.createElement(N.Tooltip,{title:j.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:fe.tooltip}}},M.createElement(N.IconButton,{size:"small",onClick:this.onClone(a)},M.createElement(Z.ContentCopy,null))):null))}),!i.noDelete&&n.length>=(i.showSecondAddAt||5)?M.createElement(N.TableRow,null,M.createElement(N.TableCell,{colSpan:i.items.length+1,style:{...v}},this.renderAddButton(u))):null)),!n.length&&this.state.value.length?M.createElement("div",{style:fe.filteredOut},M.createElement(N.Typography,{style:fe.title,variant:"h6",id:"tableTitle",component:"div"},j.I18n.t("ra_All items are filtered out"),M.createElement(N.IconButton,{size:"small",onClick:()=>this.applyFilter(!0)},M.createElement(Z.Close,null)))):null),i.help?M.createElement(N.FormHelperText,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?M.createElement("div",{style:{display:"flex",padding:"5px"}},M.createElement(Z.Warning,{color:"error"}),M.createElement("span",{style:{color:"red",alignSelf:"center"}},this.state.errorMessage)):null)}componentDidUpdate(){var i;(i=this.refDiv.current)!=null&&i.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var n;this.resizeTimeout=null,this.setState({width:(n=this.refDiv.current)==null?void 0:n.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(){const{schema:i}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;const n=this.getCurrentBreakpoint();let u;return n&&(i.useCardFor||["xs"]).includes(n)?u=this.renderCards():u=this.renderTable(),M.createElement("div",{ref:this.refDiv,style:{width:"100%"}},u)}}const ln={indeterminate:{opacity:.5},label:{width:"100%",fontSize:14,marginBottom:2},helper:{width:"100%",fontSize:12},error:{width:"100%",fontSize:12,color:"#FF0000"}};class ul extends K{updateTimeout=null;componentDidMount(){super.componentDidMount();let i=K.getValue(this.props.data,this.props.attr);if(Array.isArray(i)&&this.props.oContext.multiEdit){i=K.DIFFERENT_VALUE,this.setState({value:i,oldValue:i,jsonError:!1});return}this.setState({value:i,oldValue:i,jsonError:this.validateJson(i)})}validateJson(i){let n=!1;if(this.props.schema.validateJson&&(i||!this.props.schema.allowEmpty))try{JSON.parse(i)}catch(u){console.log("Error in JSON",u),n=!0}return n}static getDerivedStateFromProps(i,n){if(i.oContext.multiEdit&&n.value===K.DIFFERENT_VALUE)return{value:K.DIFFERENT_VALUE};let u=K.getValue(i.data,i.attr);return u!=null&&(u=u.toString()),u==null||u!==n.value&&u!==n.oldValue?{value:u}:null}renderItem(i,n){const u=Array.isArray(this.state.value)||this.state.value===K.DIFFERENT_VALUE;if(this.props.schema.time){let h="";return typeof this.state.value=="number"?this.state.value&&this.state.value<9466596e5?h=new Date(this.state.value*1e3).toLocaleString():h=new Date(this.state.value).toLocaleString():typeof this.state.value=="string"&&(h=new Date(this.state.value).toLocaleString()),M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:h,error:!!i||!!this.state.jsonError,disabled:!!n,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.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=null),u){const h=K.getValue(this.props.data,this.props.attr),d=(h==null?void 0:h.filter(o=>o||o===0).map(o=>({label:o.toString()||"",value:o})))||[];return d.unshift({label:j.I18n.t(K.DIFFERENT_LABEL),value:K.DIFFERENT_VALUE}),M.createElement(N.Autocomplete,{style:ln.indeterminate,fullWidth:!0,value:d[0],onChange:(o,p)=>{const e=p?p.value:"",t=this.onChange(this.props.attr,e,()=>{this.setState({value:e,oldValue:e,jsonError:this.validateJson(p)})});t instanceof Promise&&t.catch(r=>console.error(`Cannot set value: ${r}`))},options:d,getOptionLabel:o=>o.label,renderInput:o=>M.createElement(N.TextField,{variant:"standard",...o,error:!!i,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...o.inputProps,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:!!n})})}let v,a;if((this.props.schema.readOnly||n)&&this.props.schema.copyToClipboard?(this.props.schema.minRows>1&&(a={position:"absolute",right:3,top:20,zIndex:1e3}),v=M.createElement(N.IconButton,{style:a,size:"small",onClick:()=>{j.Utils.copyToClipboard(this.state.value),window.alert(j.I18n.t("ra_Copied"))}},M.createElement(j.IconCopy,null))):!this.props.schema.readOnly&&!n&&this.state.value&&!this.props.schema.noClearButton&&(this.props.schema.minRows>1&&(a={position:"absolute",right:3,top:20,zIndex:1e3}),v=M.createElement(N.IconButton,{style:a,size:"small",tabIndex:-1,onClick:()=>this.setState({value:"",oldValue:this.state.value},()=>this.onChange(this.props.attr,""))},M.createElement(Z.Close,null)),this.props.schema.minRows<=1&&(v=M.createElement(N.InputAdornment,{position:"end"},v))),this.props.schema.minRows>1){const h=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return M.createElement("div",{style:{width:"100%",position:"relative"}},this.props.schema.label?M.createElement("div",{style:ln.label},this.getText(this.props.schema.label)):null,M.createElement(N.TextareaAutosize,{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===null||this.state.value===void 0?"":this.state.value,disabled:!!n,readOnly:this.props.schema.readOnly||!1,onChange:d=>{const o=d.target.value;this.setState({value:o,oldValue:this.state.value,jsonError:this.validateJson(o)},()=>this.onChange(this.props.attr,o||""))},placeholder:this.getText(this.props.schema.placeholder)}),h||i||this.state.jsonError?M.createElement("div",{style:i?ln.error:ln.helper},i||(this.state.jsonError?j.I18n.t("ra_Invalid JSON"):h)):null)}return M.createElement(N.TextField,{variant:"standard",fullWidth:!0,value:this.state.value===null||this.state.value===void 0?"":this.state.value,error:!!i||!!this.state.jsonError,disabled:!!n,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:v}},onChange:h=>{const d=h.target.value;this.setState({value:d,oldValue:this.state.value,jsonError:this.validateJson(d)},()=>this.onChange(this.props.attr,d))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?j.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const hl={fullWidth:{width:"100%"}};class cl extends K{initialized=!1;localContext;askInstance(){if(this.props.alive){let i=this.props.schema.data;if(i===void 0&&this.props.schema.jsonData){const n=this.getPattern(this.props.schema.jsonData,null,!0);try{i=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}i===void 0&&(i=null),this.props.oContext.socket.sendTo(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.schema.command||"send",i).then(n=>{if(typeof n=="object"){const u=n;this.setState({text:u.text||"",style:u.style,icon:u.icon,iconStyle:u.iconStyle})}else typeof n=="string"&&this.setState({text:n||""})}).catch(n=>console.error(`Cannot send command: ${n}`))}}getLocalContext(){const i={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(n=>i[n]=K.getValue(this.props.data,n)),JSON.stringify(i)}renderItem(){if(this.props.alive){const n=this.getLocalContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let i=null;return this.state.icon&&(i=ht(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),i||(i=M.createElement(j.Icon,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}}))),this.props.schema.container==="text"?M.createElement(N.TextField,{variant:"standard",fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?M.createElement(N.IconButton,{size:"small",onClick:()=>{j.Utils.copyToClipboard(this.state.text),window.alert(j.I18n.t("ra_Copied"))}},M.createElement(j.IconCopy,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)}):M.createElement("div",{style:{...hl.fullWidth,...this.state.style||void 0}},i,this.props.schema.container==="html"?M.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.text||""}}):this.state.text)}}class pl extends K{componentDidMount(){super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);this.setState({value:i})}renderItem(i,n){const u=this.props.schema.returnFormat!=="HH:mm:ss",v=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||"00:00:00"}`));return M.createElement(Hi.TimePicker,{sx:a=>({width:"100%",borderBottom:`1px solid ${a.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${a.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:!!n,value:v,onChange:a=>{let h;h=a instanceof Date?a.toTimeString().split(" ")[0]:a.toTimeString(),u&&(h=h.split(":").slice(0,2).join(":")),this.setState({value:h},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||["hours","minutes","seconds"],label:this.getText(this.props.schema.label)})}}function dl(L,i){let n;return i&&L.substring(0,i.length)===i?n=L.substring(i.length+1):n=L,n=n.replace(/\./g,"/").replace(/_/g," "),n}class fl extends K{componentDidMount(){var n;super.componentDidMount();const i=K.getValue(this.props.data,this.props.attr);if(!i&&((n=this.props.customObj)!=null&&n._id)){const u=dl(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:u})}else this.setState({value:i||""})}renderItem(i,n){return M.createElement(N.TextField,{variant:"standard",fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!i,disabled:n,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:u=>{const v=u.target.value;this.setState({value:v},()=>this.onChange(this.props.attr,v))}})}}class gl extends K{async componentDidMount(){var n;super.componentDidMount();const i=await this.props.oContext.socket.getObject("system.meta.uuid");this.setState({uuid:((n=i==null?void 0:i.native)==null?void 0:n.uuid)||"unknown"})}renderItem(i,n){return M.createElement(N.TextField,{variant:"standard",fullWidth:!0,error:!!i,disabled:!!n,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:M.createElement(N.IconButton,{onClick:()=>{j.Utils.copyToClipboard(this.state.uuid),window.alert(j.I18n.t("ra_Copied %s",this.state.uuid))}},M.createElement(Z.ContentCopy,null))}},value:this.state.uuid||"",label:this.getText(this.props.schema.label)||j.I18n.t("ra_Serial number (UUID)"),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const Bi={icon:{width:16,height:16,marginRight:8}};class ml extends K{componentDidMount(){super.componentDidMount(),this.props.oContext.socket.getUsers().then(i=>{const n={},u=j.I18n.getLanguage();this.props.schema.short?i.forEach(v=>{var a,h;return n[v._id]={color:(a=v.common)==null?void 0:a.color,icon:(h=v.common)==null?void 0:h.icon,name:j.Utils.getObjectNameFromObj(v,u)}}):i.forEach(v=>{var a,h;return n[v._id.replace(/^system\.user\./,"")]={color:(a=v.common)==null?void 0:a.color,icon:(h=v.common)==null?void 0:h.icon,name:j.Utils.getObjectNameFromObj(v,u)}}),this.setState({users:n})}).catch(i=>console.error(`Cannot get users: ${i}`))}renderItem(i,n){var v,a;const u=K.getValue(this.props.data,this.props.attr);return M.createElement(N.FormControl,{variant:"standard",fullWidth:!0},this.state.users&&this.props.schema.label?M.createElement(N.InputLabel,null,this.getText(this.props.schema.label)):null,this.state.users?M.createElement(N.Select,{variant:"standard",error:!!i,disabled:!!n,value:u,renderValue:h=>{var d,o,p;return M.createElement("span",null,this.state.users&&((d=this.state.users[h])!=null&&d.icon)?M.createElement(j.Icon,{src:this.state.users&&((o=this.state.users[h])==null?void 0:o.icon),style:Bi.icon}):null,this.state.users&&((p=this.state.users[h])==null?void 0:p.name)||h||"")},style:{color:this.state.users&&((v=this.state.users[u])==null?void 0:v.color)||void 0,backgroundColor:j.Utils.getInvertedColor(this.state.users&&((a=this.state.users[u])==null?void 0:a.color),this.props.oContext.themeType)},onChange:h=>this.onChange(this.props.attr,h.target.value)},this.state.users&&Object.keys(this.state.users).map(h=>M.createElement(N.MenuItem,{style:{color:this.state.users[h].color||void 0,backgroundColor:j.Utils.getInvertedColor(this.state.users[h].color,this.props.oContext.themeType)},key:h,value:h},this.state.users[h].icon?M.createElement(j.Icon,{src:this.state.users[h].icon,style:Bi.icon}):null,this.state.users[h].name))):M.createElement(N.TextField,{variant:"standard",error:!!i,disabled:!!n,value:u,onChange:h=>this.onChange(this.props.attr,h.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?M.createElement(N.FormHelperText,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class vl extends K{async componentDidMount(){super.componentDidMount();const i=await os(()=>import("./index-CttBOMyq.js").then(n=>n.i),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);this.setState({QRCode:i.default})}renderItem(){const i=this.state.QRCode;return i?M.createElement(i,{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}):null}}const yl={accordion:Ts,alive:_s,autocomplete:ks,autocompleteSendTo:Ms,certCollection:Rs,certificate:Is,certificates:Fs,checkbox:Os,checkLicense:ct,chip:fi,chips:fi,color:Hs,coordinates:zs,cron:Ls,custom:Ut,datePicker:js,deviceManager:Vs,divider:tl,file:to,fileSelector:mn,func:no,header:il,image:so,imageSendTo:ro,instance:oo,interface:ao,ip:io,jsonEditor:Ra,language:Na,license:Ba,number:Pa,objectId:Wa,password:Ha,pattern:za,port:Va,qrCode:vl,room:Ua,select:Ka,selectSendTo:Ya,sendto:_i,sendTo:_i,setState:Xa,slider:Za,state:el,staticImage:rl,staticInfo:sl,staticLink:Oi,staticText:Oi,table:Ve,text:ul,textSendTo:cl,timePicker:pl,topic:fl,uuid:gl,user:ml},Qe={fullWidth:{width:"100%"},paper:{margin:1,width:"auto !important",overflowY:"auto",paddingBottom:1},paperWithIcons:{height:"calc(100vh - 259px) !important"},paperWithoutIcons:{height:"calc(100vh - 235px) !important"},padding:{padding:"10px"},heading:{},primary:L=>({backgroundColor:L.palette.primary.main,color:L.palette.mode==="dark"?"inherit":"#FFF"}),secondary:L=>({backgroundColor:L.palette.secondary.main})};class $t extends K{componentDidMount(){var i;super.componentDidMount(),(i=this.props.schema)!=null&&i.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)==="true"})}renderItems(i,n){return i?Object.keys(i).map(u=>{if(this.props.oContext.multiEdit&&i[u].noMultiEdit)return null;const v=i[u].type||"panel";let a,h="Use this.props.oContext.socket!";return v==="custom"?(i[u].url?a=Ut:this.props.oContext.customs&&this.props.oContext.customs[i[u].component]?a=this.props.oContext.customs[i[u].component]:(console.error(`Cannot find custom component: ${i[u].component}`),a=K),h=this.props.oContext.socket):v==="panel"?a=$t:a=yl[v]||K,M.createElement(a,{socket:h,globalData:this.props.globalData,oContext:this.props.oContext,key:`${u}_${this.props.index===void 0?"":this.props.index}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:Qe.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,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:i[u],attr:u,table:this.props.table})}):null}render(){const i=this.props.schema;if(!i)return null;const{disabled:n,hidden:u}=this.calculate(i),v=this.props.schema.items,a=this.props.schema.style||{};if(u){if(i.hideOnlyControl){const d=M.createElement(N.Grid2,{size:{xs:i.xs||void 0,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},sx:j.Utils.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:"left"},a,this.props.oContext.themeType==="dark"&&i.darkStyle)});return i.newLine?M.createElement(M.Fragment,null,M.createElement("div",{style:{flexBasis:"100%",height:0}}),d):d}return null}if(this.props.table)return this.renderItems(v,n);if(this.props.custom)return M.createElement(N.Grid2,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:Qe.fullWidth,columnSpacing:2,rowSpacing:1,sx:a},this.renderItems(v,n));let h;if(i.collapsable)h=M.createElement(N.Accordion,{key:`${this.props.attr}_${this.props.index}`,style:Qe.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})}},M.createElement(N.AccordionSummary,{expandIcon:M.createElement(Z.ExpandMore,null),sx:j.Utils.getStyle(this.props.oContext.theme,a,this.props.oContext.themeType&&i.darkStyle,i.color==="primary"?Qe.primary:i.color==="secondary"&&Qe.secondary,{width:"100%"})},M.createElement(N.Typography,{style:Qe.heading},this.getText(i.label))),M.createElement(N.AccordionDetails,null,M.createElement(N.Grid2,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...a,width:"100%",padding:"10px"}},this.renderItems(v,n))));else{const d=j.Utils.getStyle(this.props.oContext.theme,this.props.style,a,{width:"100%"},this.props.isParentTab&&Qe.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:"calc(100% - 88px) !important"}:{height:"calc(100% - 64px) !important"}:this.props.withIcons?Qe.paperWithIcons:Qe.paperWithoutIcons));h=M.createElement(N.Box,{component:"div",key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:d},M.createElement(N.Grid2,{container:!0,columnSpacing:2,rowSpacing:1,sx:j.Utils.getStyle(this.props.oContext.theme,{width:"100%"},this.props.isParentTab&&Qe.padding,this.props.schema.innerStyle)},this.renderItems(v,n)))}if(!this.props.isParentTab){const d=M.createElement(N.Grid2,{title:this.getText(i.tooltip),size:{xs:i.xs||void 0,sm:i.sm||void 0,md:i.md||void 0,lg:i.lg||void 0,xl:i.xl||void 0},sx:{marginBottom:0,textAlign:"left",...a}},h);return i.newLine?M.createElement(M.Fragment,null,M.createElement("div",{style:{flexBasis:"100%",height:0}}),d):d}return h}}const un={tabs:{height:"100%",width:"100%"},panel:{width:"100%",display:"block"},panelWithIcons:{height:"calc(100% - 72px)"},panelWithoutIcons:{height:"calc(100% - 48px)"}};class bl extends K{resizeTimeout=null;refDiv;constructor(i){super(i);let n;if(this.props.root){const u=(window.location.hash||"").replace(/^#/,"").split("/");if(u.length>=3&&u[1]==="config"){const v=u[3],a=parseInt(v,10);v&&a.toString()===v?a>=0&&a{const i=(window.location.hash||"").replace(/^#/,"").split("/");if(i.length>3&&i[1]==="config"){const n=i[3],u=parseInt(n,10);let v;u.toString()===n?u>=0&&u{this.setState({initialBreakpoint:i})},50),i}return this.state.initialBreakpoint}componentDidUpdate(){var i;!this.state.initialBreakpoint&&((i=this.refDiv.current)!=null&&i.clientWidth)&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var n;this.resizeTimeout=null,this.setState({width:(n=this.refDiv.current)==null?void 0:n.clientWidth})},50))}onMenuChange(i){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||"App"}.${this.props.oContext.adapterName}`,i),this.setState({tab:i},()=>{if(this.props.root){const n=(window.location.hash||"").split("/");n.length>=3&&n[1]==="config"&&(n[3]=this.state.tab,window.location.hash=n.join("/"))}})}render(){const i=this.props.schema.items;let n=!1;const u=[];Object.keys(i).map(h=>{let d;if(i[h].expertMode&&!this.props.expertMode)return;if(this.props.custom){if(this.executeCustom(i[h].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData))return;d=this.executeCustom(i[h].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData)}else{if(this.execute(i[h].hidden,!1,this.props.data,this.props.index,this.props.globalData))return;d=this.execute(i[h].disabled,!1,this.props.data,this.props.index,this.props.globalData)}const o=this.getIcon(i[h].icon);n=n||!!o,u.push({icon:o,disabled:d,label:this.getText(i[h].label),name:h})}),u.find(h=>h.name===this.state.tab)||setTimeout(()=>this.setState({tab:u[0].name}),50);const v=this.getCurrentBreakpoint();let a;return v==="xs"&&u.length>2?a=M.createElement(N.Toolbar,{style:{top:2,backgroundColor:this.props.oContext.themeType==="dark"?"#222":"#DDD"},variant:"dense"},M.createElement(N.IconButton,{onClick:h=>this.setState({openMenu:h.currentTarget})},M.createElement(Z.Menu,null)),this.state.openMenu?M.createElement(N.Menu,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},u.map(h=>M.createElement(N.MenuItem,{disabled:h.disabled,key:h.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(h.name))},selected:h.name===this.state.tab},n?M.createElement(N.ListItemIcon,null,h.icon):null,h.label))):null):a=M.createElement(N.Tabs,{variant:"scrollable",scrollButtons:"auto",style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(h,d)=>this.onMenuChange(d)},u.map(h=>M.createElement(N.Tab,{id:h.name,wrapped:!0,disabled:h.disabled,key:h.name,value:h.name,iconPosition:this.props.schema.iconPosition||"start",icon:h.icon,label:h.label}))),M.createElement("div",{style:un.tabs,ref:this.refDiv},a,M.createElement($t,{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:{...un.panel,...n?un.panelWithIcons:un.panelWithoutIcons},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.props.onError,customObj:this.props.customObj,custom:this.props.custom,schema:i[this.state.tab],table:this.props.table,withIcons:n}))}}const wl={root:{width:"100%",height:"100%"}};class cn extends pt.Component{forceUpdateHandlers;errorTimeout=null;errorCached=null;oContext;constructor(i){super(i),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData()}static getDerivedStateFromProps(i,n){return i.updateData!==n.updateData?{updateData:i.updateData,originalData:JSON.stringify(i.data),schema:JSON.parse(JSON.stringify(i.schema))}:null}static async loadI18n(i,n,u){if(n===!0||n&&typeof n=="string"){const v=j.I18n.getLanguage(),a=typeof n=="string"?n:"i18n";let h=await i.fileExists(`${u}.admin`,`${a}/${v}.json`),d;if(h?d=`${a}/${v}.json`:(h=await i.fileExists(`${u}.admin`,`${a}/${v}/translations.json`),h?d=`${a}/${v}/translations.json`:v!=="en"&&(h=await i.fileExists(`${u}.admin`,`${a}/en.json`),h?d=`${a}/en.json`:(h=await i.fileExists(`${u}.admin`,`${a}/en/translations.json`),h&&(d=`${a}/en/translations.json`)))),d){const o=await i.readFile(`${u}.admin`,d);let p;o.file!==void 0?p=o.file:p=o;try{const e=JSON.parse(p);j.I18n.extendTranslations(e,v)}catch(e){return console.error(`Cannot parse language file "${u}.admin/${d}: ${e}`),""}return d}return console.warn(`Cannot find i18n for ${u} / ${d}`),""}return n&&typeof n=="object"&&j.I18n.extendTranslations(n),""}onCommandRunning=i=>this.setState({commandRunning:i});readData(){this.props.socket.getCompactSystemConfig().then(i=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(n=>this.setState({systemConfig:i.common,alive:!!(n&&n.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)}))).catch(i=>console.error(`Cannot read system config: ${i}`))}onAlive=(i,n)=>{!!(n!=null&&n.val)!==this.state.alive&&this.setState({alive:!!(n!=null&&n.val)})};onChange=(i,n,u,v)=>{if(this.props.onValueChange)this.props.onValueChange(i,n,v),u&&u();else if(i&&this.props.onChange){const a={changed:JSON.stringify(i)!==this.state.originalData};this.setState(a,()=>{this.props.onChange(i,a.changed,v),u&&u()})}else v&&this.props.onChange(null,null,v)};onError=(i,n)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));const u=this.errorCached;n?u[i]=n:delete u[i],this.errorTimeout&&clearTimeout(this.errorTimeout),JSON.stringify(u)!==JSON.stringify(this.state.errors)?this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50):this.errorCached=null};flatten(i,n){return n=n||{},i.items&&Object.keys(i.items).forEach(u=>{n[u]=i.items[u],this.flatten(i.items[u],n)}),n}buildDependencies(i){const n=this.flatten(i);Object.keys(n).forEach(u=>{var v,a,h,d,o,p,e,t,r,l;(v=n[u].confirm)!=null&&v.alsoDependsOn&&((a=n[u].confirm)==null||a.alsoDependsOn.forEach(s=>{if(!n[s])console.error(`[JsonConfigComponent] Attribute ${s} does not exist!`),s.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${s.replace(/^data\./,"")}" instead of "${s}"`);else{n[s].confirmDependsOn=n[s].confirmDependsOn||[];const c={...n[u],attr:u};c.confirm&&(c.confirm.cancel="Undo"),n[s].confirmDependsOn.push(c)}})),(h=n[u].onChange)!=null&&h.alsoDependsOn&&((d=n[u].onChange)==null||d.alsoDependsOn.forEach(s=>{if(!n[s])console.error(`[JsonConfigComponent] Attribute ${s} does not exist!`),s.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${s.replace(/^data\./,"")}" instead of "${s}"`);else{n[s].onChangeDependsOn=n[s].onChangeDependsOn||[];const c={...n[u],attr:u};n[s].onChangeDependsOn.push(c)}})),(o=n[u].hidden)!=null&&o.alsoDependsOn&&((p=n[u].hidden)==null||p.alsoDependsOn.forEach(s=>{if(!n[s])console.error(`[JsonConfigComponent] Attribute ${s} does not exist!`),s.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${s.replace(/^data\./,"")}" instead of "${s}"`);else{n[s].hiddenDependsOn=n[s].hiddenDependsOn||[];const c={...n[u],attr:u};n[s].hiddenDependsOn.push(c)}})),(e=n[u].label)!=null&&e.alsoDependsOn&&((t=n[u].label)==null||t.alsoDependsOn.forEach(s=>{if(!n[s])console.error(`[JsonConfigComponent] Attribute ${s} does not exist!`),s.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${s.replace(/^data\./,"")}" instead of "${s}"`);else{n[s].labelDependsOn=n[s].labelDependsOn||[];const c={...n[u],attr:u};n[s].labelDependsOn.push(c)}})),(r=n[u].help)!=null&&r.alsoDependsOn&&((l=n[u].help)==null||l.alsoDependsOn.forEach(s=>{if(!n[s])console.error(`[JsonConfigComponent] Attribute ${s} does not exist!`),s.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${s.replace(/^data\./,"")}" instead of "${s}"`);else{n[s].helpDependsOn=n[s].helpDependsOn||[];const c={...n[u],attr:u};n[s].helpDependsOn.push(c)}}))})}updateContext(i){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},i&&this.forceUpdate()}renderItem(i){return i.type==="tabs"?M.createElement(bl,{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:(n,u)=>this.onError(n,u),originalData:JSON.parse(this.state.originalData),root:!0,schema:i,expertMode:this.props.expertMode,themeName:this.props.themeName}):i.type==="panel"||!i.type?M.createElement($t,{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:(n,u)=>this.onError(n,u),originalData:JSON.parse(this.state.originalData),root:!0,schema:i,themeName:this.props.themeName}):(console.error(`Unknown item type in root: ${JSON.stringify(i)}`),null)}changeLanguage=()=>{this.forceUpdate()};forceAttrUpdate=(i,n)=>{Array.isArray(i)?i.forEach(u=>this.forceUpdateHandlers[u]&&this.forceUpdateHandlers[u](n)):this.forceUpdateHandlers[i]&&this.forceUpdateHandlers[i](n)};registerOnForceUpdate=(i,n)=>{n?this.forceUpdateHandlers[i]=n:this.forceUpdateHandlers[i]&&delete this.forceUpdateHandlers[i]};render(){return!this.state.systemConfig||!this.oContext?M.createElement(N.LinearProgress,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),M.createElement("div",{style:{...!this.props.embedded||this.props.withoutSaveButtons?wl.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}}const Et={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 Cl(L,i){let n="";for(let u=0;u{const v=document.createElement("script");v.setAttribute("id",i),v.onload=u,v.src=L,document.getElementsByTagName("head")[0].appendChild(v)})}let Al=class extends j.Router{fileSubscribed=[];fileLangSubscribed="";secret;constructor(i){super(i),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:j.Theme(i.themeName),saveConfigDialog:!1,hash:"_"},this.secret=i.secret||"",this.getInstanceObject().then(n=>this.getConfigFile().then(u=>cn.loadI18n(this.props.socket,u==null?void 0:u.i18n,this.props.adapterName).then(v=>{v&&(this.fileLangSubscribed||(this.fileLangSubscribed=v,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),n?this.setState({schema:u,data:n.native,common:n.common,hash:pi(JSON.stringify(u)).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),this.fileLangSubscribed="")}handleFileSelect=i=>{const n=i.target.files[0];if(n){const u=new FileReader;u.onload=v=>{if(!v.target)return;const a=v.target.result;try{const h=JSON.parse(a);this.setState({data:h,changed:JSON.stringify(h)!==JSON.stringify(this.state.originalData)})}catch{window.alert(j.I18n.t("[JsonConfig] Failed to parse JSON file"))}},u.readAsText(n)}else window.alert(j.I18n.t("[JsonConfig] Failed to open JSON File"))};getExportImportButtons(){return M.createElement("div",{style:Et.exportImportButtons},M.createElement(N.Tooltip,{title:this.props.t("Import settings from JSON file"),slotProps:{popper:{sx:Et.tooltip}}},M.createElement(N.Fab,{size:"small",sx:{"&.MuiFab-root":Et.button},onClick:()=>{const i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("id","files"),i.setAttribute("opacity",0),i.addEventListener("change",n=>this.handleFileSelect(n),!1),i.click()}},M.createElement(Z.Publish,null))),M.createElement(N.Tooltip,{title:this.props.t("Export setting to JSON file"),slotProps:{popper:{sx:Et.tooltip}}},M.createElement(N.Fab,{size:"small",sx:{"&.MuiFab-root":Et.button},onClick:()=>{this.state.data&&j.Utils.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},M.createElement(Z.Publish,{style:{transform:"rotate(180deg)"}}))))}onFileChange=async(i,n,u)=>{var v;if(i===`${this.props.adapterName}.admin`&&u){if(n===this.fileLangSubscribed)try{await cn.loadI18n(this.props.socket,(v=this.state.schema)==null?void 0:v.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(n))try{const a=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:a,hash:pi(JSON.stringify(a)).toString()})}catch{}}};async getInstanceObject(){var i;try{const n=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(n.encryptedNative)){if(!this.secret){const u=await this.props.socket.getSystemConfig();await Pi("../../lib/js/crypto-js/crypto-js.js","crypto-js"),this.secret=u.native.secret}return(i=n.encryptedNative)==null||i.forEach(u=>{n.native[u]&&(n.native[u]=Sl(this.secret,n.native[u]))}),n}return n}catch(n){window.alert(`[JsonConfig] Cannot read instance object: ${n}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?M.createElement(j.DialogConfirm,{title:j.I18n.t("ra_Please confirm"),text:j.I18n.t("ra_Some data are not stored. Discard?"),ok:j.I18n.t("ra_Discard"),cancel:j.I18n.t("ra_Cancel"),onClose:i=>this.setState({confirmDialog:!1},()=>i&&j.Router.doNavigate(null))}):null}async scanForInclude(i,n){if(typeof i["#include"]=="string"){const v=await this._getConfigFile(i["#include"],[...n]);return delete i["#include"],v&&(i={...i,...v}),i}const u=Object.keys(i);for(let v=0;v ${n.join(" => ")}`),null;n.push(i);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,i)||(i="jsonConfig.json");const v=await this.props.socket.readFile(`${this.props.adapterName}.admin`,i);let a="",h="";if(v.file!==void 0&&(h=v.file),typeof h=="string")a=h;else if(h.type==="Buffer"){let d="";const o=new Uint8Array(h.data),p=o.byteLength;for(let e=0;ethis.setState({saveConfigDialog:!1},()=>i&&this.onSave(!0))}):null}findAttr(i,n){if(n=n||this.state.schema,n!=null&&n.items){if(i in n.items)return n.items[i];for(const u of Object.values(n.items)){const v=this.findAttr(i,u);if(v)return v}}return null}postProcessing(i,n,u){if(u=u||this.state.schema,!i){console.error(`Data is empty in postProcessing: ${n}, ${JSON.stringify(u)}`);return}const v=i[n];if(u.items)if(u.type==="table"){const a=v;if(!Array.isArray(a))return;for(const h of a)for(const d of u.items)this.postProcessing(h,d.attr,d)}else for(const[a,h]of Object.entries(u.items)){if(h.type==="panel"||h.type==="tabs"||h.type==="accordion")return;this.postProcessing(i,a,h)}else if(n&&typeof v=="string")if(u.type==="text")u.trim!==!1&&(i[n]=v.trim());else if(u.type==="ip")i[n]=v.trim();else if(u.type==="number"){const a=parseFloat(v.toString().replace(",","."));u.min!==void 0&&au.max?i[n]=u.max:i[n]=a}else if(u.type==="port"){const a=parseInt(v.toString(),10);u.min!==void 0&&au.max&&(i[n]=u.max),i[n]!==0&&a<20?i[n]=20:a>65535?i[n]=65535:i[n]=a}else u.type==="checkbox"&&(i[n]=i[n]===!0||i[n]==="true"||i[n]==="on"||i[n]===1||i[n]==="1")}async onSave(i,n){if(i){const u=await this.getInstanceObject();if(!u){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;const v={};for(const h of Object.keys(this.state.data)){const d=this.findAttr(h);(!d||!d.doNotSave||d.type==="state")&&!h.startsWith("_")?K.setValue(u.native,h,this.state.data[h]):(K.setValue(u.native,h,null),v[h]=this.state.data[h])}try{const h=JSON.parse(JSON.stringify(u));if(Array.isArray(h.encryptedNative)){await Pi("../../lib/js/crypto-js/crypto-js.js","crypto-js");for(const d of h.encryptedNative)h.native[d]&&(h.native[d]=Dl(this.secret,h.native[d]))}await this.props.socket.setObject(h._id,h)}catch(h){window.alert(`[JsonConfig] Cannot set object: ${h}`)}const a={...u.native,...v};console.log(a),this.setState({changed:!1,data:a,updateData:this.state.updateData+1,originalData:a},()=>n&&j.Router.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):j.Router.doNavigate(null)}componentDidUpdate(i,n){n.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){const i=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${i}`),await fetch(i)}render(){return!this.state.data||!this.state.schema?M.createElement(N.LinearProgress,null):M.createElement("div",{style:Et.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),M.createElement(cn,{key:this.state.hash,style:Et.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:i=>this.setState({error:i}),onChange:(i,n,u)=>{u&&this.state.error&&(window.alert(j.I18n.t("Cannot save configuration because of error in configuration")),u=!1),u&&!this.state.changed&&!n&&(u=!1),i?this.setState({data:i,changed:n,saveConfigDialog:u}):u!==void 0&&this.setState({saveConfigDialog:u})},DeviceManager:this.props.DeviceManager,theme:this.state.theme}),M.createElement(j.SaveCloseButtons,{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:i=>this.onSave(!0,i),onClose:()=>this.onSave(!1)}))}};export{K as ConfigGeneric,$t as ConfigPanel,Al as JsonConfig,cn as JsonConfigComponent}; diff --git a/admin/custom/customComponents.js b/admin/custom/customComponents.js index 08f1f2b44..63b01183f 100644 --- a/admin/custom/customComponents.js +++ b/admin/custom/customComponents.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-Co3YA5NW.js","./assets/_commonjsHelpers-D6-XlEtG.js","./assets/index-D5apCzjJ.js","./assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js","./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js","./assets/jsx-runtime-o-xyxrOj.js","./assets/createSvgIcon-C_vAELFU.js","./assets/DefaultPropsProvider-CHpMCMgA.js","./assets/defaultTheme-avbtL0lf.js","./assets/createTheme-BwMO3rTt.js","./assets/DefaultPropsProvider-DbEA5uR6.js","./assets/Tabs-C1KOyWRi.js","./assets/useTheme-MELayQMj.js","./assets/useThemeWithoutDefault-C-hl_s0Z.js","./assets/FilledInput-CtcQVKyj.js","./assets/useEnhancedEffect-CdLBzwyA.js","./assets/index-B7G6Jpdl.js","./assets/useTheme-CDtRWagv.js","./assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js","./assets/index-DfBPYXqA.js","./assets/ThemeProvider-Buvx5nSd.js","./assets/index-BGCRznKh.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js","./assets/index-B8sZ2j0S.js","./assets/index-C0zIf7zh.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js","./assets/preload-helper-Dp1pzeXC.js","./assets/index-CWXHfC2L.js","./assets/leaflet-src-A2ZHl6nF.js","./assets/index-DwsbskQy.js"])))=>i.map(i=>d[i]); -import{i as d,C as p}from"./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import s from"./assets/virtualExposes-BPncCdUy.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const n={react:async()=>await a(()=>import("./assets/index-Co3YA5NW.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),"@mui/x-date-pickers":async()=>await a(()=>import("./assets/index-D5apCzjJ.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-DfBPYXqA.js"),__vite__mapDeps([19,9,3,1,4,7,8,10,5,11,12,13,14,15,16,17,6,18,20]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-BGCRznKh.js"),__vite__mapDeps([21,9,3,1,4,22,23,12,13,17,8]),import.meta.url),"@iobroker/json-config":async()=>await a(()=>import("./assets/index-C0zIf7zh.js"),__vite__mapDeps([24,3,1,4,22,23,12,9,13,25,18,14,7,8,10,5,15,26]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-CWXHfC2L.js").then(t=>t.i),__vite__mapDeps([27,1,3,4]),import.meta.url),leaflet:async()=>await a(()=>import("./assets/leaflet-src-A2ZHl6nF.js").then(t=>t.l),__vite__mapDeps([28,1]),import.meta.url),"@mui/icons-material":async()=>await a(()=>import("./assets/index-DwsbskQy.js"),__vite__mapDeps([29,5,3,1,4,6,7,8,9,10]),import.meta.url)},o={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.react.loaded=!0;const{react:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.4.11",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.14",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"7.6.14",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.leaflet.loaded=!0;const{leaflet:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.4.11",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",l="ConfigCustomJavascriptSet";async function k(e={},t=[]){const r=d.init({name:l,remotes:f,shared:o,plugins:[],shareStrategy:"version-first"});var i=u[c];if(i||(i=u[c]={from:l}),!(t.indexOf(i)>=0)){t.push(i),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(m){console.error(m)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-Co3YA5NW.js","./assets/_commonjsHelpers-D6-XlEtG.js","./assets/index-D5apCzjJ.js","./assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js","./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js","./assets/jsx-runtime-o-xyxrOj.js","./assets/createSvgIcon-C_vAELFU.js","./assets/DefaultPropsProvider-CHpMCMgA.js","./assets/defaultTheme-avbtL0lf.js","./assets/createTheme-BwMO3rTt.js","./assets/DefaultPropsProvider-DbEA5uR6.js","./assets/Tabs-C1KOyWRi.js","./assets/useTheme-MELayQMj.js","./assets/useThemeWithoutDefault-C-hl_s0Z.js","./assets/FilledInput-CtcQVKyj.js","./assets/useEnhancedEffect-CdLBzwyA.js","./assets/index-B7G6Jpdl.js","./assets/useTheme-CDtRWagv.js","./assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js","./assets/index-DfBPYXqA.js","./assets/ThemeProvider-Buvx5nSd.js","./assets/index-BGCRznKh.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js","./assets/index-B8sZ2j0S.js","./assets/index-jIr6kOLK.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js","./assets/preload-helper-Dp1pzeXC.js","./assets/index-CWXHfC2L.js","./assets/leaflet-src-A2ZHl6nF.js","./assets/index-DwsbskQy.js"])))=>i.map(i=>d[i]); +import{i as d,C as p}from"./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import s from"./assets/virtualExposes-BPncCdUy.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const n={react:async()=>await a(()=>import("./assets/index-Co3YA5NW.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),"@mui/x-date-pickers":async()=>await a(()=>import("./assets/index-D5apCzjJ.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-DfBPYXqA.js"),__vite__mapDeps([19,9,3,1,4,7,8,10,5,11,12,13,14,15,16,17,6,18,20]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-BGCRznKh.js"),__vite__mapDeps([21,9,3,1,4,22,23,12,13,17,8]),import.meta.url),"@iobroker/json-config":async()=>await a(()=>import("./assets/index-jIr6kOLK.js"),__vite__mapDeps([24,3,1,4,22,23,12,9,13,25,18,14,7,8,10,5,15,26]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-CWXHfC2L.js").then(t=>t.i),__vite__mapDeps([27,1,3,4]),import.meta.url),leaflet:async()=>await a(()=>import("./assets/leaflet-src-A2ZHl6nF.js").then(t=>t.l),__vite__mapDeps([28,1]),import.meta.url),"@mui/icons-material":async()=>await a(()=>import("./assets/index-DwsbskQy.js"),__vite__mapDeps([29,5,3,1,4,6,7,8,9,10]),import.meta.url)},o={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.react.loaded=!0;const{react:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.4.11",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.14",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"7.6.14",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.leaflet.loaded=!0;const{leaflet:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.4.11",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",l="ConfigCustomJavascriptSet";async function k(e={},t=[]){const r=d.init({name:l,remotes:f,shared:o,plugins:[],shareStrategy:"version-first"});var i=u[c];if(i||(i=u[c]={from:l}),!(t.indexOf(i)>=0)){t.push(i),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(m){console.error(m)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init}; diff --git a/admin/mf-manifest.json b/admin/mf-manifest.json index 662edf54f..a145e7c9e 100644 --- a/admin/mf-manifest.json +++ b/admin/mf-manifest.json @@ -1 +1 @@ -{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-x0m5vR1T.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"7.6.14","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BLPltTwe.js","assets/createSvgIcon-ChB2N0i2.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","assets/index-B0CiKPEe.js","assets/useTheme-Do7i4pX2.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.4.11","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-GB1Q3dtw.js","assets/createSvgIcon-ChB2N0i2.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","assets/inheritsLoose-VBbEsHHj.js","assets/useTheme-Do7i4pX2.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Do-nCdWy.js","assets/_commonjsHelpers-Cpj98o6Y.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-DQiceR5U.js","assets/_commonjsHelpers-Cpj98o6Y.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]} \ No newline at end of file +{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"7.6.14","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-DTiA4WdK.js","assets/createSvgIcon-BdRvDw53.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","assets/index-qABB1JVe.js","assets/useTheme-Cl1QmYFL.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.4.11","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-DJfSBoBB.js","assets/createSvgIcon-BdRvDw53.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","assets/inheritsLoose-BW-3V39H.js","assets/useTheme-Cl1QmYFL.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-x0m5vR1T.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Do-nCdWy.js","assets/_commonjsHelpers-Cpj98o6Y.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-DQiceR5U.js","assets/_commonjsHelpers-Cpj98o6Y.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]} \ No newline at end of file diff --git a/admin/remoteEntry.js b/admin/remoteEntry.js index 4f22b60ef..c8e7a5da4 100644 --- a/admin/remoteEntry.js +++ b/admin/remoteEntry.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-x0m5vR1T.js","./assets/_commonjsHelpers-Cpj98o6Y.js","./assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","./assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","./assets/index-BLPltTwe.js","./assets/createSvgIcon-ChB2N0i2.js","./assets/index-B0CiKPEe.js","./assets/useTheme-Do7i4pX2.js","./assets/index-GB1Q3dtw.js","./assets/inheritsLoose-VBbEsHHj.js","./assets/index-Do-nCdWy.js","./assets/index-DQiceR5U.js"])))=>i.map(i=>d[i]); -import{i as d,a as m}from"./assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import s from"./assets/virtualExposes-BIHI7g3E.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const i={"react-dom":async()=>await a(()=>import("./assets/index-x0m5vR1T.js").then(t=>t.i),__vite__mapDeps([0,1,2,3]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-BLPltTwe.js"),__vite__mapDeps([4,5,2,1,3,6,7]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-GB1Q3dtw.js"),__vite__mapDeps([8,5,2,1,3,9,7]),import.meta.url),react:async()=>await a(()=>import("./assets/index-Do-nCdWy.js").then(t=>t.i),__vite__mapDeps([10,1]),import.meta.url),"prop-types":async()=>await a(()=>import("./assets/index-DQiceR5U.js").then(t=>t.i),__vite__mapDeps([11,1]),import.meta.url)},o={"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.14",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.4.11",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o.react.loaded=!0;const{react:e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"prop-types":{name:"prop-types",version:"15.8.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["prop-types"].loaded=!0;const{"prop-types":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},_=[],u={},p="default",c="iobroker_javascript";async function k(e={},t=[]){const r=d.init({name:c,remotes:_,shared:o,plugins:[],shareStrategy:"version-first"});var n=u[p];if(n||(n=u[p]={from:c}),!(t.indexOf(n)>=0)){t.push(n),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(l){console.error(l)}return m.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-DTiA4WdK.js","./assets/createSvgIcon-BdRvDw53.js","./assets/iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js","./assets/_commonjsHelpers-Cpj98o6Y.js","./assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js","./assets/index-qABB1JVe.js","./assets/useTheme-Cl1QmYFL.js","./assets/index-DJfSBoBB.js","./assets/inheritsLoose-BW-3V39H.js","./assets/index-x0m5vR1T.js","./assets/index-Do-nCdWy.js","./assets/index-DQiceR5U.js"])))=>i.map(i=>d[i]); +import{i as d,a as m}from"./assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import s from"./assets/virtualExposes-BIHI7g3E.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const i={"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-DTiA4WdK.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-DJfSBoBB.js"),__vite__mapDeps([7,1,2,3,4,8,6]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-x0m5vR1T.js").then(t=>t.i),__vite__mapDeps([9,3,2,4]),import.meta.url),react:async()=>await a(()=>import("./assets/index-Do-nCdWy.js").then(t=>t.i),__vite__mapDeps([10,3]),import.meta.url),"prop-types":async()=>await a(()=>import("./assets/index-DQiceR5U.js").then(t=>t.i),__vite__mapDeps([11,3]),import.meta.url)},o={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.14",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.4.11",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o.react.loaded=!0;const{react:e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"prop-types":{name:"prop-types",version:"15.8.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){o["prop-types"].loaded=!0;const{"prop-types":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},_=[],u={},p="default",c="iobroker_javascript";async function k(e={},t=[]){const r=d.init({name:c,remotes:_,shared:o,plugins:[],shareStrategy:"version-first"});var n=u[p];if(n||(n=u[p]={from:c}),!(t.indexOf(n)>=0)){t.push(n),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(l){console.error(l)}return m.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init}; diff --git a/admin/tab.html b/admin/tab.html index dce1e284d..fbe260f75 100644 --- a/admin/tab.html +++ b/admin/tab.html @@ -115,13 +115,13 @@ type="text/javascript" src="google-blockly/own/blocks_object.js" > - + - - - + + + diff --git a/io-package.json b/io-package.json index c4cc6ed7a..acdc57cfe 100644 --- a/io-package.json +++ b/io-package.json @@ -1,7 +1,7 @@ { "common": { "name": "javascript", - "version": "8.9.1", + "version": "8.9.2", "blockedVersions": [ "8.0.0", "8.0.1" @@ -40,6 +40,19 @@ "Matthias Kleine " ], "news": { + "8.9.2": { + "en": "Updated packages for GUI\nUsed TypeScript for an admin component", + "de": "Aktualisierte Pakete für GUI\nGebrauchte TypeScript für eine Admin-Komponente", + "ru": "Обновленные пакеты для GUI\nИспользуемый TypeScript для компонента admin", + "pt": "Pacotes atualizados para GUI\nTypeScript usado para um componente admin", + "nl": "Bijgewerkte pakketten voor GUI\nTypeScript gebruikt voor een admin component", + "fr": "Les paquets mis à jour pour GUI\nTypeScript utilisé pour un composant admin", + "it": "Pacchetti aggiornati per GUI\nTipoScript usato per un componente amministratore", + "es": "Paquetes actualizados para GUI\nTipoScript usado para un componente de administración", + "pl": "Aktualizacja pakietów dla GUI\nUżywany TypeScript dla komponentu admin", + "uk": "Оновлені пакети для GUI\nВикористовується TypeScript для компонента адміністратора", + "zh-cn": "更新的图形用户界面软件包\n管理员组件所用的类型脚本" + }, "8.9.1": { "en": "Corrected blockly function editor\nCorrected creation of folders", "de": "Korrigierter blockierender Funktionseditor\nKorrigierte Erstellung von Ordnern", @@ -117,19 +130,6 @@ "pl": "Dodano opcję rejestracji powiadomień za pomocą skryptów\nPoprawiono wysyłanie Blokowanie z pustą listą nazw", "uk": "Додано опцію для реєстрації повідомлень через скрипти\nВиправлена відправка Заблокувати список порожніх імен", "zh-cn": "添加通过脚本注册通知的选项\n固定发送 以空名称列表屏蔽" - }, - "8.7.7": { - "en": "Fixed import scripts dialog\nAllow to remove all custom packages (empty list)", - "de": "Feste Importskripte Dialog\nLassen Sie alle benutzerdefinierte Pakete entfernen (leere Liste)", - "ru": "Диалог сценариев импорта\nПозволить удалить все пользовательские пакеты (пустый список)", - "pt": "Diálogo de scripts de importação fixos\nPermitir remover todos os pacotes personalizados (lista vazia)", - "nl": "Dialoogvenster Vaste importscripts\nAlle aangepaste pakketten verwijderen (lege lijst)", - "fr": "Boîte de dialogue d'importation fixe\nPermettre de supprimer tous les paquets personnalisés (liste vide)", - "it": "Dialogo di script di importazione fissi\nConsentire di rimuovere tutti i pacchetti personalizzati (elenco vuoto)", - "es": "Diálogo de scripts de importación fijos\nPermitir eliminar todos los paquetes personalizados (lista vacía)", - "pl": "Okno importu stałych skryptów\nPozwól usunąć wszystkie niestandardowe pakiety (pusta lista)", - "uk": "Виправлено імпорт сценаріїв діалог\nДозволити видалити всі спеціальні пакети (зразковий список)", - "zh-cn": "固定导入脚本对话框\n允许删除所有自定义软件包( 空列表)" } }, "platform": "Javascript/Node.js", diff --git a/package.json b/package.json index 7f7cfd130..8de07085f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.javascript", - "version": "8.9.1", + "version": "8.9.2", "description": "Rules Engine for ioBroker", "author": "bluefox ", "contributors": [